/* ==========================================================================
   Counting to Calculus — The Journey to the Mathematics of AI
   Shared design system for the landing page. Palette and type match the
   companion Journey Planner: royal blue, gold, orange, white.
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #FFFFFF;
  --surface: #F5F7FE;
  --surface-2: #E8EDFB;
  --cream: #FFFDF4;
  --line: #D5DDF3;
  --line-strong: #B9C5E8;

  --ink: #0F1A4A;
  --ink-2: #3C4A7A;
  --ink-3: #5A668C;

  --royal: #2747C9;
  --royal-deep: #1A2F8F;
  --royal-soft: #E3E9FC;
  --navy: #0B1538;

  --gold: #D4A21A;
  --gold-bright: #F2C94C;
  --gold-text: #7F6000;
  --gold-soft: #FBF1D2;

  --orange: #E8731A;
  --orange-text: #B4520A;
  --orange-soft: #FDEAD9;

  --ok: #1F7A4A;
  --ok-soft: #DDF2E6;

  --b-found: #E8731A;
  --b-hs: #2747C9;
  --b-uni: #15246B;
  --b-ai: #D4A21A;
  --b-beyond: #8C96B8;

  --hero-bg: #2747C9;
  --hero-ink: #FFFFFF;
  --hero-sub: #DCE4FF;
  --hero-line: rgba(255, 255, 255, 0.16);

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --shadow-sm: 0 1px 2px rgba(15, 26, 74, 0.05), 0 10px 30px rgba(15, 26, 74, 0.06);
  --shadow-lg: 0 30px 90px rgba(6, 12, 36, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --shell: 1200px;
  --gutter: clamp(20px, 4.2vw, 52px);
  --header-h: 78px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0A1130;
    --surface: #111A44;
    --surface-2: #18235A;
    --cream: #141D49;
    --line: #26336E;
    --line-strong: #3A4A8C;

    --ink: #F3F5FF;
    --ink-2: #B9C3EA;
    --ink-3: #8C97C4;

    --royal: #7D97FF;
    --royal-deep: #A9BAFF;
    --royal-soft: #1A2766;
    --navy: #070D26;

    --gold: #F2C94C;
    --gold-bright: #F2C94C;
    --gold-text: #F2C94C;
    --gold-soft: #3A3010;

    --orange: #FF9A4D;
    --orange-text: #FFAD70;
    --orange-soft: #3D2210;

    --ok: #6BD69A;
    --ok-soft: #123A27;

    --b-found: #FF9A4D;
    --b-hs: #7D97FF;
    --b-uni: #B4C2FF;
    --b-ai: #F2C94C;
    --b-beyond: #69739A;

    --hero-bg: #16246E;
    --hero-ink: #FFFFFF;
    --hero-sub: #C3CEFA;
    --hero-line: rgba(255, 255, 255, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0A1130;
  --surface: #111A44;
  --surface-2: #18235A;
  --cream: #141D49;
  --line: #26336E;
  --line-strong: #3A4A8C;

  --ink: #F3F5FF;
  --ink-2: #B9C3EA;
  --ink-3: #8C97C4;

  --royal: #7D97FF;
  --royal-deep: #A9BAFF;
  --royal-soft: #1A2766;
  --navy: #070D26;

  --gold: #F2C94C;
  --gold-bright: #F2C94C;
  --gold-text: #F2C94C;
  --gold-soft: #3A3010;

  --orange: #FF9A4D;
  --orange-text: #FFAD70;
  --orange-soft: #3D2210;

  --ok: #6BD69A;
  --ok-soft: #123A27;

  --b-found: #FF9A4D;
  --b-hs: #7D97FF;
  --b-uni: #B4C2FF;
  --b-ai: #F2C94C;
  --b-beyond: #69739A;

  --hero-bg: #16246E;
  --hero-ink: #FFFFFF;
  --hero-sub: #C3CEFA;
  --hero-line: rgba(255, 255, 255, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--gold-bright);
  color: var(--navy);
}

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold-bright);
  color: var(--navy);
  border-radius: 8px;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip:focus { top: 12px; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--gold-text);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  flex: none;
  background: var(--gold);
}

.eyebrow--plain::before { display: none; }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.micro {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink-3);
}

.lede {
  max-width: 64ch;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  line-height: 1.65;
  color: var(--ink-2);
}

.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 122px);
}

.section--surface { background: var(--surface); }
.section--tight { padding-block: clamp(56px, 7vw, 88px); }

.section-head {
  max-width: 760px;
  display: grid;
  gap: 18px;
}

.section-head h2 {
  font-size: clamp(2.05rem, 4.3vw, 3.45rem);
}

.section-head .lede { margin-top: 2px; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1.5px solid var(--btn-line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn svg { flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--gold {
  --btn-bg: var(--gold-bright);
  --btn-ink: #0B1538;
  --btn-line: var(--gold-bright);
  box-shadow: 0 8px 24px rgba(242, 201, 76, 0.22);
}
.btn--gold:hover {
  --btn-bg: #FFDA6B;
  --btn-line: #FFDA6B;
  box-shadow: 0 12px 30px rgba(242, 201, 76, 0.32);
}

.btn--royal {
  --btn-bg: var(--royal);
  --btn-ink: #FFFFFF;
  --btn-line: var(--royal);
}
.btn--royal:hover { --btn-bg: var(--royal-deep); --btn-line: var(--royal-deep); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: #FFFFFF;
  --btn-line: rgba(255, 255, 255, 0.42);
}
.btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-line: rgba(255, 255, 255, 0.7);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
}
.btn--outline:hover {
  --btn-bg: var(--surface);
  --btn-line: var(--royal);
}

.btn--lg { min-height: 54px; padding: 15px 26px; font-size: 1.02rem; }
.btn--sm { min-height: 38px; padding: 8px 15px; font-size: 0.84rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--royal);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--royal) 35%, transparent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}
.text-link:hover { color: var(--royal-deep); text-decoration-color: currentColor; }
.text-link svg { transition: transform 0.18s ease; }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--hero-bg);
  color: #FFFFFF;
  border-bottom: 1px solid var(--hero-line);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 34px rgba(6, 12, 36, 0.24); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.18);
}

.brand-text { display: grid; gap: 1px; min-width: 0; }
.brand-text strong {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}
.brand-text span {
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--hero-sub);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 11px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.nav a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.5); }
.icon-btn .icon-moon { display: none; }
:root[data-theme="dark"] .icon-btn .icon-sun { display: none; }
:root[data-theme="dark"] .icon-btn .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn .icon-moon { display: block; }
}

.menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.menu-btn:hover { background: rgba(255, 255, 255, 0.12); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--hero-line);
  background: var(--hero-bg);
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav-inner {
  display: grid;
  gap: 4px;
  padding-block: 14px 20px;
}
.mobile-nav a {
  padding: 11px 4px;
  border-bottom: 1px solid var(--hero-line);
  color: #FFFFFF;
  font-weight: 700;
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav .btn { margin-top: 10px; justify-self: start; }
.mobile-nav a.btn--gold,
.mobile-nav a.btn--gold:hover { color: #0B1538; border-bottom: 0; }

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 620px) {
  .brand-text span { display: none; }
  .header-actions .btn { display: none; }
  .brand-text strong { font-size: 0.95rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding-block: clamp(48px, 7vw, 84px) clamp(40px, 5vw, 62px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -180px;
  top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 201, 76, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}

.hero-copy { display: grid; gap: 24px; justify-items: start; }

.hero .eyebrow { color: var(--gold-bright); }
.hero .eyebrow::before { background: var(--gold-bright); }

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 6vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #FFFFFF;
}
.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--gold-bright);
}

.hero-lede {
  max-width: 55ch;
  font-size: clamp(1.06rem, 1.55vw, 1.22rem);
  line-height: 1.62;
  color: var(--hero-sub);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(220, 228, 255, 0.86);
}
.hero-note span { display: inline-flex; align-items: center; gap: 10px; }
.hero-note span + span::before {
  content: "·";
  color: var(--gold-bright);
  font-weight: 700;
}

/* ---------- Ticket ---------- */

.ticket {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 440px;
  padding: 26px 28px 24px;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.1deg);
  transition: transform 0.3s ease;
}
.ticket:hover { transform: rotate(0deg); }

.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  top: 56.5%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hero-bg);
  border: 1px solid var(--gold);
}
.ticket::before { left: -12px; }
.ticket::after { right: -12px; }

.ticket-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}

.ticket-route-code {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.ticket-stamp {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-top: -6px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  transform: rotate(10deg);
  color: var(--gold-text);
  text-align: center;
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}
.ticket-stamp b { display: block; font-size: 0.66rem; color: var(--orange-text); }

.ticket-kicker {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ticket-title {
  margin-top: 6px;
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}
.ticket-title .arrow { color: var(--gold); }

.ticket-route {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
}
.ticket-route > div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: baseline;
}
.ticket-route dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ticket-route dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
}
.ticket-route dd span { color: var(--ink-3); font-weight: 400; }

.ticket-perf {
  height: 1px;
  margin: 22px -28px 18px;
  background-image: linear-gradient(90deg, var(--gold) 45%, transparent 45%);
  background-size: 12px 1px;
  opacity: 0.7;
}

.ticket-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ticket-stats b {
  display: block;
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--royal);
}
.ticket-stats span {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--ink-2);
}
.ticket-meta span + span::before { content: "·"; margin-right: 8px; color: var(--gold); }

.ticket-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin-top: 16px;
}
.ticket-bars i {
  display: block;
  flex: 1;
  height: var(--h, 60%);
  border-radius: 1px;
  background: var(--c, var(--line));
  opacity: 0.9;
}

/* ---------- Route card ---------- */

.route-card {
  position: relative;
  z-index: 1;
  margin-top: clamp(44px, 6vw, 72px);
  padding: 20px 26px 22px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.route-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.route-card-top .mono {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.route-card-top .mono:first-child { color: var(--gold-text); }

.route-scroll {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 16px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.route-track { position: relative; min-width: 980px; padding-top: 30px; }

.route-line {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 52px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    var(--b-found) 0 25%,
    var(--b-hs) 25% 50%,
    var(--b-uni) 50% 85%,
    var(--b-ai) 85% 95%,
    var(--b-beyond) 95% 100%);
  opacity: 0.75;
}

.route-bands { display: flex; position: relative; }

.route-band { flex: var(--stages, 1); min-width: 0; }

.route-band .band-label {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 22px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.route-band .band-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--band, var(--line));
}

.route-band .stops {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-right: 2px;
}

.stop {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
}

.stop .dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--band, var(--royal));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1;
  position: relative;
  z-index: 1;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.stop:hover .dot,
.stop:focus-visible .dot {
  transform: scale(1.18);
  background: var(--band, var(--royal));
  color: #FFFFFF;
}

.stop .tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 10;
  transform: translate(-50%, 4px);
  width: max-content;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--navy);
  color: #FFFFFF;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}
.stop .tip span { display: block; color: var(--gold-bright); font-family: var(--mono); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.08em; margin-top: 2px; }
.stop:hover .tip,
.stop:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }

.route-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--ink-3);
}
.route-milestones span { display: inline-flex; align-items: center; gap: 6px; }
.route-milestones span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.route-hint {
  display: none;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Numbers ---------- */

.numbers {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding-block: 26px;
}
.number-stat {
  padding: 4px 20px;
  border-left: 1px solid var(--line);
}
.number-stat:first-child { border-left: 0; padding-left: 0; }
.number-stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--royal);
}
.number-stat span {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink-3);
}

.numbers-note {
  margin: 0 auto;
  padding-bottom: 20px;
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---------- Why / ledger ---------- */

.why-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.why-intro {
  position: sticky;
  top: calc(var(--header-h) + 34px);
  display: grid;
  gap: 20px;
}
.why-intro h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); }
.why-intro .lede { max-width: 46ch; }

.why-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.why-mark b {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--gold-text);
}

.ledger { display: grid; gap: 14px; }

.ledger-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ledger-row:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }

.ledger-cell { padding: 22px 24px; }
.ledger-cell--problem { border-right: 1px dashed var(--line-strong); }
.ledger-cell--solution { background: var(--surface); }

.ledger-cell .micro { margin-bottom: 8px; }
.ledger-cell--problem .micro { color: var(--orange-text); }
.ledger-cell--solution .micro { color: var(--gold-text); }
.ledger-cell p { font-size: 0.94rem; line-height: 1.55; color: var(--ink-2); }
.ledger-cell--solution p { color: var(--ink); }

.ledger-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gold-bright);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(15, 26, 74, 0.15);
}

/* ---------- Route explorer ---------- */

.route-section { background: var(--surface); }

.band-tabs {
  display: flex;
  gap: 8px;
  margin-top: 38px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.band-tabs::-webkit-scrollbar { display: none; }

.band-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease;
}
.band-tab::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--band, var(--royal));
  flex: none;
}
.band-tab .count {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink-3);
}
.band-tab:hover { border-color: var(--band, var(--royal)); transform: translateY(-1px); }
.band-tab[aria-selected="true"] {
  background: var(--band, var(--royal));
  border-color: var(--band, var(--royal));
  color: #FFFFFF;
}
.band-tab[aria-selected="true"]::before { background: rgba(255, 255, 255, 0.85); }
.band-tab[aria-selected="true"] .count { color: rgba(255, 255, 255, 0.8); }

.band-tab.band-found[aria-selected="true"],
.band-tab.band-ai[aria-selected="true"],
.band-tab.band-beyond[aria-selected="true"] { color: #0B1538; }
.band-tab.band-found[aria-selected="true"] .count,
.band-tab.band-ai[aria-selected="true"] .count,
.band-tab.band-beyond[aria-selected="true"] .count { color: #0B1538; opacity: 1; }

.band-panel { padding-top: 30px; }
.band-panel[hidden] { display: none; }

.band-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.band-intro strong {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.stage-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px 24px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 22px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.stage-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--band, var(--royal));
}
.stage-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.stage-card.is-highlighted {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft), var(--shadow-sm);
}

.stage-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.stage-code {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--band, var(--royal));
  color: #FFFFFF;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.stage-card.band-found .stage-code,
.stage-card.band-ai .stage-code,
.stage-card.band-beyond .stage-code { color: #0B1538; }
.stage-year,
.stage-topics {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.stage-year { margin-left: auto; }
.stage-topics { padding-left: 10px; border-left: 1px solid var(--line); }

.stage-card h3 {
  font-size: clamp(1.18rem, 1.8vw, 1.42rem);
  line-height: 1.12;
}
.stage-card h3 a { color: var(--ink); }
.stage-card h3 a:hover { color: var(--royal); }

.stage-meta {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.stage-history {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}
.stage-history > div { display: grid; gap: 3px; }
.stage-history .micro { margin: 0; }
.stage-history p { font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }

.units {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 2px;
}
.units summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--royal);
}
.units summary::-webkit-details-marker { display: none; }
.units summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1;
  color: var(--gold-text);
  transition: transform 0.18s ease;
}
.units[open] summary::after { transform: rotate(45deg); }
.units ul {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  list-style: none;
}
.units li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.units li:last-child { border-bottom: 0; }
.units li code {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--ink-3);
}

.no-js .band-tabs { display: none; }
.no-js .band-panel { display: block; padding-top: 30px; }
.no-js .band-panel + .band-panel { border-top: 1px solid var(--line); margin-top: 30px; }

/* ---------- Rules ---------- */

.rules-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.gate {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.gate svg { width: 54px; height: 54px; }
.gate b { display: block; font-family: var(--display); font-size: 0.95rem; line-height: 1.2; }
.gate span { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.rule {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.rule:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.rule-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold-text);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}
.rule h3 { font-size: 1.12rem; line-height: 1.2; }
.rule p { font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); }

/* ---------- Week ---------- */

.week-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.week-badge {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
  padding: 14px 20px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: var(--gold-soft);
}
.week-badge b {
  font-family: var(--display);
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--gold-text);
}
.week-badge span {
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.week-badge small {
  display: block;
  margin-top: 3px;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 1;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}
.day {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 200px;
  padding: 20px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.day::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--day, var(--royal));
}
.day-code {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.day h3 { font-size: 1.05rem; line-height: 1.18; }
.day p { font-size: 0.84rem; line-height: 1.5; color: var(--ink-2); }
.day-tag {
  align-self: end;
  justify-self: start;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.week-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pace-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.pace-options > span {
  margin-right: 4px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pace {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--bg);
}
.pace.is-active {
  background: var(--royal);
  border-color: var(--royal);
  color: #FFFFFF;
}
.week-note {
  max-width: 56ch;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---------- Planner band ---------- */

.planner-band {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: #FFFFFF;
}
.planner-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(242, 201, 76, 0.13), transparent 42%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
  pointer-events: none;
}
.planner-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(36px, 5vw, 68px);
  align-items: center;
}
.planner-copy { display: grid; gap: 20px; justify-items: start; }
.planner-copy .eyebrow { color: var(--gold-bright); }
.planner-copy .eyebrow::before { background: var(--gold-bright); }
.planner-copy h2 { font-size: clamp(2.1rem, 4.3vw, 3.4rem); color: #FFFFFF; }
.planner-copy .lede { color: var(--hero-sub); }

.feature-list { display: grid; gap: 11px; margin: 4px 0 6px; list-style: none; }
.feature-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--hero-sub);
}
.feature-list svg { margin-top: 3px; color: var(--gold-bright); }

.planner-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.planner-note { font-family: var(--mono); font-size: 0.64rem; color: rgba(220, 228, 255, 0.86); }

.browser {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: #0B1538;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: rotate(0.8deg);
  transition: transform 0.3s ease;
}
.browser:hover { transform: rotate(0deg); }
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.browser-url {
  flex: 1;
  margin-left: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--mono);
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser img { width: 100%; aspect-ratio: 1280 / 900; object-fit: cover; object-position: top center; }
.browser-tag {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 5px;
  background: var(--gold-bright);
  color: #0B1538;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- History ---------- */

.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.chapter {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 26px 24px 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.chapter::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  opacity: 0.85;
}
.chapter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chapter-era {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.chapter-no {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--ink-3);
}
.chapter h3 { font-size: 1.24rem; line-height: 1.15; }
.chapter-names {
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.chapter p { font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); }
.chapter p b { color: var(--ink); }
.chapter-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dotted var(--line);
}
.chapter-where span {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stage-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.stage-chip:hover { border-color: var(--gold); color: var(--gold-text); }

.lineage {
  position: relative;
  display: grid;
  gap: 22px;
  margin-top: 28px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--navy);
  color: #FFFFFF;
  overflow: hidden;
}
.lineage::after {
  content: "∑";
  position: absolute;
  right: 18px;
  bottom: -34px;
  font-family: var(--display);
  font-size: 12rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.lineage-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.lineage-names span { color: #FFFFFF; }
.lineage-names span + span::before {
  content: "·";
  margin-right: 26px;
  color: var(--gold-bright);
}
.lineage p {
  max-width: 78ch;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #C3CEFA;
}
.lineage p b { color: var(--gold-bright); }

.sources {
  display: grid;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.sources b {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.sources a { color: var(--royal); text-decoration: underline; text-underline-offset: 3px; }
.sources a:hover { color: var(--royal-deep); }

/* ---------- Schools ---------- */

.table-wrap {
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.school-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.45;
}
.school-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.school-table th,
.school-table td {
  padding: 15px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.school-table thead th {
  background: var(--royal);
  color: #FFFFFF;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.school-table tbody th {
  width: 19%;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--surface);
}
.school-table tbody th span {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.school-table tbody td { color: var(--ink-2); }
.school-table tbody tr:last-child th,
.school-table tbody tr:last-child td { border-bottom: 0; }
.school-table tbody tr:hover td { background: var(--surface); }

.table-note {
  margin-top: 16px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.table-note a { color: var(--royal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Audience ---------- */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.audience-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 26px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.audience-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.audience-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--royal-soft);
  color: var(--royal);
}
.audience-card h3 { font-size: 1.2rem; }
.audience-card p { font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); }
.audience-card .text-link { margin-top: 2px; font-size: 0.84rem; }

/* ---------- FAQ ---------- */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.faq-intro { position: sticky; top: calc(var(--header-h) + 34px); display: grid; gap: 18px; }
.faq-intro h2 { font-size: clamp(2rem, 3.8vw, 3.05rem); }
.faq-intro .text-link { font-size: 0.88rem; }

.faq-list { display: grid; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 2px;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  margin-top: -2px;
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gold-text);
  transition: transform 0.18s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 40px 18px 2px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.faq-item .faq-answer a { color: var(--royal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Final CTA ---------- */

.final-cta {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: #FFFFFF;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 120%, rgba(242, 201, 76, 0.18), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
  pointer-events: none;
}
.final-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 32px 60px;
  align-items: center;
}
.final-grid h2 {
  max-width: 16ch;
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  color: #FFFFFF;
}
.final-grid h2 em { font-style: normal; color: var(--gold-bright); }
.final-grid .lede { margin-top: 16px; color: var(--hero-sub); }
.final-actions { display: grid; gap: 10px; justify-items: stretch; }
.final-actions .btn { width: 100%; }
.final-signup {
  margin-top: 4px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: rgba(220, 228, 255, 0.86);
}
.final-signup a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #C3CEFA;
  padding-block: 60px 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px 40px;
}
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand .brand { color: #FFFFFF; }
.footer-brand .brand-text span { color: #8C97C4; }
.footer-tagline {
  max-width: 32ch;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--gold-bright);
}
.footer-contact { font-size: 0.82rem; line-height: 1.7; color: #8C97C4; }
.footer-contact a { color: #C3CEFA; }
.footer-contact a:hover { color: #FFFFFF; }

.footer-col h3 {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8C97C4;
}
.footer-col ul { display: grid; gap: 8px; list-style: none; }
.footer-col a { font-size: 0.86rem; color: #C3CEFA; }
.footer-col a:hover { color: var(--gold-bright); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: #8C97C4;
}
.footer-bottom a { color: #C3CEFA; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: #FFFFFF; }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticket, .browser { transform: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .ticket { justify-self: start; max-width: 520px; }
  .hero h1 { max-width: 13ch; }
  .why-layout { grid-template-columns: 1fr; }
  .why-intro, .faq-intro { position: static; }
  .numbers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .number-stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day:nth-child(4), .day:nth-child(5) { min-height: 170px; }
  .planner-grid { grid-template-columns: 1fr; }
  .browser { max-width: 780px; }
  .faq-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .route-track { min-width: 920px; }
  .route-hint { display: block; }
  .stage-grid { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .school-table thead { display: none; }
  .school-table, .school-table tbody, .school-table tr, .school-table th, .school-table td { display: block; width: 100%; }
  .school-table tr { padding: 6px 0; border-bottom: 1px solid var(--line); }
  .school-table tbody tr:last-child { border-bottom: 0; }
  .school-table tbody th {
    padding: 12px 18px 4px;
    background: transparent;
    border-bottom: 0;
    width: auto;
  }
  .school-table tbody td {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    padding: 6px 18px;
    border-bottom: 0;
    font-size: 0.84rem;
  }
  .school-table tbody td::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding-top: 2px;
  }
  .final-grid { grid-template-columns: 1fr; }
  .final-actions { max-width: 420px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header-inner { min-height: 70px; }
  .hero h1 { font-size: clamp(2.7rem, 11vw, 4rem); }
  .hero-cta .btn { width: 100%; }
  .ticket { transform: none; padding: 22px 22px 20px; }
  .ticket-perf { margin-inline: -22px; }
  .ticket-stats b { font-size: 1.55rem; }
  .route-card { padding: 16px 18px 18px; }
  .route-card-top .mono:last-child { display: none; }
  .numbers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .number-stat:nth-child(3), .number-stat:nth-child(5) { border-left: 0; padding-left: 0; }
  .number-stat:nth-child(4) { padding-left: 20px; }
  .ledger-row { grid-template-columns: 1fr; }
  .ledger-cell--problem { border-right: 0; border-bottom: 1px dashed var(--line-strong); }
  .ledger-arrow { top: 50%; left: auto; right: 16px; transform: translateY(-50%) rotate(90deg); }
  .rules-grid { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr 1fr; }
  .day { min-height: 170px; }
  .week-badge { width: 100%; }
  .week-foot { display: grid; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .lineage-names { gap: 6px 16px; }
  .lineage-names span + span::before { margin-right: 16px; }
}

@media (max-width: 520px) {
  .brand-text strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .hero-note { display: grid; gap: 2px; }
  .hero-note span + span::before { display: none; }
  .ticket-top { align-items: center; }
  .ticket-stamp { width: 64px; height: 64px; font-size: 0.48rem; }
  .ticket-stamp b { font-size: 0.56rem; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .number-stat { padding-right: 10px; }
  .number-stat b { font-size: 1.55rem; }
  .week-grid { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .school-table tbody td { grid-template-columns: 1fr; gap: 2px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: grid; }
}
