:root {
  color-scheme: light;
  --bg: #f7faf8;
  --surface: #ffffff;
  --soft: #edf4f1;
  --line: #d8e4df;
  --line-strong: #b8ccc5;
  --text: #10201d;
  --muted: #5f756f;
  --accent: #087567;
  --accent-strong: #064e45;
  --checked: #087567;
  --empty: #c7d7d1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 18px 30px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
}

.filter-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.filter-section {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.filter-section h2 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-height: 28px;
  padding: 4px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.content {
  padding: 28px clamp(18px, 4vw, 48px) 56px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.topbar h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

.topbar p,
.detail-hero p {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.section-title {
  margin: 30px 0 10px;
  color: var(--accent-strong);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wallet-list {
  display: grid;
  gap: 8px;
}

.wallet-row {
  display: grid;
  grid-template-columns: minmax(130px, 230px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.wallet-row:last-child {
  border-bottom: 1px solid var(--line);
}

.wallet-name {
  font-size: 19px;
  font-weight: 800;
}

.wallet-description {
  color: var(--muted);
  line-height: 1.42;
}

.wallet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.wallet-type {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.details-link {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.detail-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 18px 56px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  font-weight: 800;
}

.detail-hero {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 22px 0;
}

.feature-pill {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

.feature-pill .box {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid var(--empty);
  border-radius: 4px;
  color: transparent;
  font-size: 12px;
  line-height: 1;
}

.feature-pill.checked {
  color: var(--text);
  border-color: var(--line-strong);
}

.feature-pill.checked .box {
  border-color: var(--checked);
  background: var(--checked);
  color: #ffffff;
}

.detail-body {
  max-width: 760px;
  margin-top: 24px;
}

.detail-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.detail-body p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.visit-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
}

.visit-button:hover {
  color: #ffffff;
  background: var(--accent-strong);
  text-decoration: none;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filter-section {
    padding: 12px 0;
  }

  .wallet-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .wallet-type {
    width: fit-content;
  }

  .wallet-actions {
    justify-content: flex-start;
  }
}
