/* ── About page ─────────────────────────────────────── */
body.doc {
  overflow: auto;
  overflow-x: hidden;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}
.brand-link:hover .brand-name {
  color: var(--color-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-link {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.42rem var(--space-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.nav-link.is-current {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.doc-main {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Hero */
.hero {
  padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  max-width: 46rem;
}
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.6rem + 4.6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.hero-title em {
  font-style: italic;
  color: var(--color-primary);
}
.hero-lede {
  margin-top: var(--space-6);
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.62;
  color: var(--color-text-muted);
  max-width: 38rem;
}
.hero-rule {
  margin-top: var(--space-10);
  color: var(--color-primary);
  max-width: 100%;
  overflow: hidden;
}
.hero-rule svg {
  max-width: 100%;
  height: auto;
}

/* Story + sidebar */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--color-divider);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.story-body {
  max-width: 36rem;
}
.story-body p {
  font-size: var(--text-lg);
  line-height: 1.72;
  color: var(--color-text);
}
.story-body p + p {
  margin-top: var(--space-6);
}
.story-body .drop {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.2rem + 1vw, 1.875rem);
  line-height: 1.42;
  color: var(--color-text);
}

.pull {
  margin: var(--space-10) 0;
  padding-left: var(--space-6);
  border-left: 3px solid var(--color-primary);
}
.pull p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.375rem, 1.2rem + 0.9vw, 1.75rem) !important;
  line-height: 1.4 !important;
  color: var(--color-text) !important;
}

/* Sidebar cards */
.side {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: sticky;
  top: calc(var(--topbar-h) + var(--space-6));
}
.side-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.side-h {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}
.scale {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.scale li {
  display: grid;
  grid-template-columns: 0.7rem 1fr;
  column-gap: var(--space-3);
  row-gap: 0.15rem;
  align-items: center;
  font-size: var(--text-sm);
}
.scale .dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: block;
}
.scale .dot.good {
  background: var(--color-good);
}
.scale .dot.mid {
  background: var(--color-mid);
}
.scale .dot.bad {
  background: var(--color-bad);
}
.scale b {
  font-weight: 600;
}
.scale-note {
  grid-column: 2;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.45;
}
.side-foot {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.55;
}
.rules {
  list-style: none;
  counter-reset: r;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.rules li {
  counter-increment: r;
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.rules li::before {
  content: counter(r);
  flex: 0 0 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
}

/* CTA */
.cta {
  border-top: 1px solid var(--color-divider);
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.1;
}
.cta-sub {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
}
.btn {
  margin-top: var(--space-8);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.85rem var(--space-6);
  border-radius: var(--radius-full);
}
.btn:hover {
  background: var(--color-primary-hover);
}

/* Footer */
.doc-foot {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) 0 var(--space-12);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.doc-foot-note {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* Responsive */
@media (max-width: 900px) {
  .story {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    position: static;
  }
}
@media (max-width: 760px) {
  .doc-main {
    padding: 0 var(--space-5);
  }
  .doc .topbar {
    height: auto;
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4);
    row-gap: var(--space-3);
  }
  /* About page: keep nav + toggle on one row under the brand */
  .doc .topbar-actions {
    display: flex;
    order: 2;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
  /* Map page: nav gets its own full-width row below the search field */
  .nav {
    order: 4;
    flex-basis: 100%;
    justify-content: center;
    gap: var(--space-2);
  }
  .doc .nav {
    order: 0;
    flex-basis: auto;
    justify-content: flex-start;
  }
  .nav-link {
    padding: 0.42rem var(--space-3);
  }
  .side {
    order: 2;
  }
}
