/* The website's pages (casfinder.org and /coordinators): plain HTML that loads at once, separate
   from the app. Colours and fonts come from the app's theme (src/theme/tokens.ts). The page is one
   line: the three strand lines start in the hero, pass behind the phone, bend down the page, become
   the route's track, dim through the privacy band and open into a small network at the end. Each
   section draws its own stretch at the same x (.rail, 56px wide, lines at 12/28/44), so they meet.
   Motion lives in site.js and only runs under .js, so the pages read fine without it;
   prefers-reduced-motion shows everything drawn and still. */

@font-face { font-family: "Jakarta"; font-weight: 400; font-display: swap; src: url("/fonts/PlusJakartaSans_400Regular.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 600; font-display: swap; src: url("/fonts/PlusJakartaSans_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 700; font-display: swap; src: url("/fonts/PlusJakartaSans_700Bold.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 800; font-display: swap; src: url("/fonts/PlusJakartaSans_800ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Voice"; font-style: normal; font-display: swap; src: url("/fonts/SourceSerif4_400Regular.woff2") format("woff2"); }
@font-face { font-family: "Voice"; font-style: italic; font-display: swap; src: url("/fonts/SourceSerif4_400Regular_Italic.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --canvas: #EEEBE3;
  --surface: #FFFFFF;
  --sunken: #E4E0D6;
  --rule: #CFCABE;
  --ink: #161A2C;
  --ink2: #40465C;
  --ink3: #585E72;
  --on-ink: #FFFFFF;
  --c-text: #A11F63; --a-text: #9C3D0A; --s-text: #0B6A4E;
  --c: #B4236F; --c-tint: #F8E3EC; --c-on-tint: #7A1149;
  --a: #B5470D; --a-tint: #FBE6D6; --a-on-tint: #7A2F07; --a-border: #EFBF9B;
  --s: #0E7A5A; --s-tint: #DCEFE6; --s-on-tint: #064A36;
  --on-strand: #FFFFFF;
  --station: #FFFFFF;
  --bezel: #161A2C;
  --night: #161A2C;
  --night-ink: #EEF0F6;
  --night-ink2: #BCC2D4;
  --night-rule: #343C56;
  --night-c: #E0579F; --night-a: #EE8A45; --night-s: #2FB386;
  --track: #CFCABE; /* the route still to build */
  --card-shadow: 0 24px 48px -28px rgba(22, 26, 44, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --wrap: 1180px;
  --gutter: max(16px, 4vw);
  --rail: 76px; /* the line's column, left of every section's content */
}
@media (max-width: 600px) { :root { --rail: 68px; } }

/* Dark is CAS Finder's look (Tejas, 2026-11-04); light only when chosen (theme.js sets data-theme). */
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --canvas: #0A0E1A;
  --surface: #181E31;
  --sunken: #222941;
  --rule: #343C56;
  --ink: #EEF0F6;
  --ink2: #BCC2D4;
  --ink3: #9AA1B8;
  --on-ink: #0A0E1A;
  --c-text: #F27DB9; --a-text: #F5A36B; --s-text: #5CCBA2;
  --c: #E0579F; --c-tint: #33152B; --c-on-tint: #FFC9E4;
  --a: #EE8A45; --a-tint: #35200F; --a-on-tint: #FFD3B3; --a-border: #6E3C1C;
  --s: #2FB386; --s-tint: #0E2E24; --s-on-tint: #B5EFD9;
  --on-strand: #0A0E1A;
  --station: #181E31;
  --bezel: #343C56;
  --night: #0A0E1A; /* the canvas: the whole page is already dark, so no band edge (Tejas, 2026-11-04) */
  --night-rule: #3E4866;
  --night-c: #E0579F; /* the same pink as the rest of the page, so the line never changes colour (5.9:1 on the canvas) */
  --track: #343C56;
  --card-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 18px/1.55 "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
/* Weight contrast: 800 for the two big sizes only, 700 for h3. */
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7.4vw, 6rem); }
h2 { font-size: clamp(2.2rem, 5vw, 3.9rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; border-radius: 6px; }
.wrap { position: relative; z-index: 1; width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.serif { font-family: "Voice", Georgia, serif; }
.voice { font-family: "Voice", Georgia, serif; font-style: italic; }

/* ── Top bar ───────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 10; transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease); }
.top.scrolled { background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 8px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a.link { text-decoration: none; color: var(--ink2); font-weight: 500; font-size: 0.95rem; padding: 8px 12px; border-radius: 999px; transition: color 150ms, background-color 150ms; }
.top nav a.link:hover { color: var(--ink); background: var(--sunken); }
.brand, .top nav a, .top nav .btn { white-space: nowrap; }
@media (max-width: 600px) {
  .top nav a.link.wide-only { display: none; }
  /* One row on a 360–430px phone: logo, name, theme switch, Sign in, Get started. */
  .brand { gap: 8px; font-size: 1rem; }
  .brand svg { width: 26px; height: 26px; flex-shrink: 0; }
  .top nav { gap: 0; }
  .top nav a.link { padding: 8px 10px; }
  .top nav .btn.small { padding: 0 14px; min-height: 40px; font-size: 0.9rem; }
  .theme-toggle { width: 40px; }
  /* On phones the bar's button waits until the hero (and its own button) has scrolled away. */
  .js .top nav .btn.later { opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0s 300ms; }
  .js .past-hero .top nav .btn.later { opacity: 1; visibility: visible; transform: none; transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
}
@media (max-width: 380px) {
  .top .wrap { gap: 4px; }
  .top nav a.link { padding: 8px 6px; }
  .top nav .btn.small { padding: 0 12px; }
  .theme-toggle { width: 36px; }
}
/* The smallest phones: the logo alone says CAS Finder. */
@media (max-width: 359px) { .brand .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }

.logo path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.logo rect { fill: var(--station); stroke: var(--ink); stroke-width: 2; }

/* ── Buttons ───────────────────────────────────────────── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 1.02rem; text-decoration: none; letter-spacing: -0.01em; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn:active { transform: scale(0.97); }
.btn .arr { width: 18px; height: 18px; transition: transform 200ms var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 0.93rem; }
/* The second action is a text link with a full 48px tap target, not a second button. */
.go { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 4px; color: var(--ink); font-weight: 700; font-size: 1.02rem; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); transition: text-decoration-color 200ms var(--ease); }
.go:hover { text-decoration-color: currentColor; }
.go span { transition: transform 200ms var(--ease); }
.go:hover span { transform: translateX(3px); }
.go.quiet { color: var(--ink2); font-weight: 600; }

/* ── Hero ──────────────────────────────────────────────── */
/* Clipped sideways only: the hero phone's shadow runs on below the section. */
.hero { position: relative; overflow-x: clip; padding: clamp(28px, 6vw, 72px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; gap: clamp(48px, 8vw, 72px); align-items: center; }
/* Wide: the words sit high and the lines run under them, behind the phone (or spec card). */
@media (min-width: 980px) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; align-items: end; } .hero .copy { padding-bottom: 120px; } }
/* Coordinators: the spec card sits level with the words, and the lines come down into it (site.js). */
@media (min-width: 980px) { .hero:has(.spec) .wrap { align-items: center; } .hero:has(.spec) .copy { padding-bottom: 0; } }
.hero .lede { font-size: clamp(1.1rem, 1.9vw, 1.35rem); font-weight: 400; color: var(--ink2); margin-top: 26px; max-width: 28em; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin-top: 36px; }
.hero .fine { margin-top: 24px; color: var(--ink3); font-size: 0.93rem; font-weight: 500; }
.hero .fine a { color: var(--ink2); }
@media (max-width: 600px) {
  .hero .actions, .end .actions { justify-content: center; }
  .hero .actions > .btn, .end .actions > .btn { flex: 1 1 100%; }
}
.rail-hero { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; overflow: visible; }
.rail-hero path, .netmap .lines path { fill: none; stroke-width: 8; stroke-linecap: butt; stroke-linejoin: round; }

/* The phone: a station the lines run behind */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; }
@media (max-width: 979px) { .stage .phone { aspect-ratio: 390 / 690; width: min(300px, 80vw); } }
.phone { position: relative; z-index: 1; width: min(310px, 76vw); aspect-ratio: 390 / 800; border-radius: 46px; padding: 6px; background: var(--bezel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -30px rgba(22, 26, 44, 0.45), 0 18px 36px -18px rgba(22, 26, 44, 0.35); }
.phone .screen { position: relative; height: 100%; border-radius: 40px; overflow: hidden; background: var(--canvas); }
.phone picture, .phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* The coach, played out inside the hero phone (site.js) */
.coach { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 16px 14px 14px; font-size: 13px; line-height: 1.4; }
.coach .bar { display: flex; align-items: center; gap: 10px; height: 34px; }
.coach .back { border: 0; padding: 0; color: inherit; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; background: var(--sunken); display: flex; align-items: center; justify-content: center; flex: none; }
.coach .back svg { width: 14px; height: 14px; }
.coach .steps { flex: 1; display: flex; align-items: center; justify-content: center; margin-right: 40px; }
.coach .steps i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink3); background: var(--canvas); transition: all 300ms var(--ease); }
.coach .steps b { width: 14px; height: 2px; background: var(--ink3); opacity: 0.5; transition: all 300ms var(--ease); }
.coach .steps i.done { background: var(--a); border-color: var(--a); }
.coach .steps b.done { background: var(--a); opacity: 1; }
.coach .steps i.now { width: 13px; height: 13px; border-color: var(--a); border-width: 3px; }
.coach .hint { color: var(--ink3); font-size: 11.5px; margin: 6px 0 10px; text-align: center; }
.coach .feed { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; }
.msg { max-width: 86%; padding: 11px 13px; border-radius: 16px; background: var(--surface); box-shadow: 0 1px 0 var(--rule); transform-origin: bottom left; animation: pop 420ms var(--ease) both; }
.msg .quote { display: block; margin-bottom: 8px; padding: 8px 10px; border-radius: 10px; background: var(--a-tint); color: var(--a-on-tint); font-family: "Voice", Georgia, serif; font-style: italic; }
.msg.me { align-self: flex-end; background: var(--a-tint); color: var(--a-on-tint); font-family: "Voice", Georgia, serif; font-style: italic; transform-origin: bottom right; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
.coach .input { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; }
.coach .field { flex: 1; min-height: 40px; padding: 10px 14px; border-radius: 20px; border: 1.5px solid var(--ink3); background: var(--surface); font-family: "Voice", Georgia, serif; font-style: italic; }
.coach .field .ph { color: var(--ink3); }
.coach .field .caret { display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.coach .send { border: 0; padding: 0; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; flex: none; transition: transform 150ms var(--ease); }
.coach .send.press { transform: scale(0.86); }
.coach .send svg { width: 16px; height: 16px; }
/* Rounded like the screen: the scrolling reflection text is drawn on its own layer, which the
   screen's rounded corners don't clip (square black corners on Retina, design review). */
.coach .draft { border-radius: 40px; overflow: hidden; position: absolute; inset: 0; padding: 16px 14px 14px; display: flex; flex-direction: column; background: var(--canvas); opacity: 0; visibility: hidden; transition: opacity 500ms var(--ease), visibility 0s 500ms; }
.coach .draft.show { opacity: 1; visibility: visible; transition: opacity 500ms var(--ease); }
.coach .draft .label { color: var(--ink3); font-size: 11.5px; margin-top: 8px; }
.coach .draft .title { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; margin-top: 2px; }
.coach .draft .text { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: 0 1px 0 var(--rule); font-family: "Voice", Georgia, serif; font-size: 15px; line-height: 1.55; flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.coach .draft .text p + p { margin-top: 10px; }
.coach .draft .text span { opacity: 0.12; transition: opacity 400ms var(--ease), background-size 700ms var(--ease); background: linear-gradient(var(--a-tint), var(--a-tint)) 0 0 / 0 100% no-repeat; }
.coach .draft .text span.on { opacity: 1; background-size: 100% 100%; }
.coach .draft .outs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 12px; min-height: 26px; }
.coach .draft .outs span { padding: 4px 10px; border-radius: 999px; background: var(--sunken); font-weight: 700; font-size: 11px; opacity: 0; transform: translateY(6px); transition: all 400ms var(--ease); }
.coach .draft .outs span.on { opacity: 1; transform: none; }
.coach .draft .copy { width: 100%; border: 0; font: inherit; cursor: pointer; flex: none; margin-top: auto; height: 42px; border-radius: 999px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 13px; transition: transform 150ms var(--ease), background-color 300ms, color 300ms; }
.coach .draft .copy svg { width: 15px; height: 15px; }
.coach .draft .copy.press { transform: scale(0.95); }
.coach .draft .copy.done { background: var(--s); color: var(--on-strand); }
.roundel { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--a); color: var(--on-strand); font-weight: 800; font-size: 11px; letter-spacing: 0; }

.coach [hidden] { display: none !important; }
.coach .copy em { font-style: normal; }

/* ── Sections ──────────────────────────────────────────── */
section.band { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.head { max-width: 46rem; }
.head p { margin-top: 22px; color: var(--ink2); font-size: clamp(1.08rem, 1.7vw, 1.25rem); }

/* The line's stretch in this section: three 8px lines at the same x as every other section's,
   left of the content (the content steps right by --rail). */
.railed > .wrap { padding-left: calc(var(--gutter) + var(--rail)); }
/* 1px past each end, so sections' lines meet without a hairline seam. */
.rail { position: absolute; top: -1px; left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); width: 56px; height: calc(100% + 2px); max-width: none; overflow: visible; pointer-events: none; }
.rail line { stroke-width: 8; stroke-linecap: butt; }
/* Through the privacy band the line runs on at full colour (Tejas, 2026-11-04: dimmed to 40% it looked muddy). */

/* Quotes: set like a magazine pull quote */
.quotes { display: grid; gap: clamp(48px, 6vw, 80px); }
@media (min-width: 900px) { .quotes { grid-template-columns: 1fr 1fr; } }
.quotes blockquote { margin: 0; font-family: "Voice", Georgia, serif; font-style: italic; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.25; letter-spacing: -0.01em; text-indent: -0.42em; }
.quotes figcaption { display: flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--ink3); font-weight: 600; font-size: 0.95rem; }
.quotes figcaption::before { content: ""; width: 36px; height: 6px; border-radius: 3px; background: var(--bar); }

/* The route: the line itself, a station per step, the phone keeping pace on wide screens */
.route { position: relative; display: grid; margin-top: clamp(48px, 7vw, 88px); }
@media (min-width: 980px) { .route { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; max-width: 1180px; } }
.steps-col { position: relative; }
/* The track from station 1 to 4 sits over the line: grey still to build, its strand colour drawn in
   up to the last station lit (site.js sets --p). Same x as the line: 8px lanes at 12/28/44. */
.track { position: absolute; left: calc(-1 * var(--rail)); top: 0; width: 56px; height: 0; }
.track i { position: absolute; top: 0; bottom: 0; width: 8px; background: var(--track); }
.track i:nth-child(1) { left: 8px; --k: var(--c); } .track i:nth-child(2) { left: 24px; --k: var(--a); } .track i:nth-child(3) { left: 40px; --k: var(--s); }
.track i::after { content: ""; position: absolute; inset: 0; background: var(--k); transform: scaleY(var(--p, 0)); transform-origin: top; transition: transform 120ms linear; }
html:not(.js) .track { display: none; }
.stop { position: relative; padding-bottom: clamp(72px, 11vw, 128px); }
.stop:last-child { padding-bottom: 0; }
@media (min-width: 980px) { .stop { min-height: 42vh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 0; } }
.stop .txt { position: relative; }
/* A station: the logo's capsule, across all three lines. */
.stop .stn { position: absolute; z-index: 2; left: calc(-1 * var(--rail)); top: -2px; width: 56px; height: 30px; border-radius: 15px; background: var(--station); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.88rem; transition: background-color 400ms var(--ease), color 400ms var(--ease), transform 400ms var(--ease), border-color 400ms; }
.stop.on .stn { background: var(--seg); border-color: var(--seg); color: var(--on-seg, var(--on-strand)); transform: scale(1.08); }
.stop .num { display: block; font-weight: 700; font-size: 0.95rem; line-height: 26px; color: var(--seg-text, var(--seg)); margin-bottom: 12px; }
.stop p { color: var(--ink2); font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin-top: 16px; max-width: 30em; }

/* Close-ups instead of phones on small screens: the detail that matters, larger, in a card the line
   passes behind. */
.crop { position: relative; z-index: 3; overflow: hidden; border-radius: 24px; background: var(--surface); box-shadow: var(--card-shadow); }
.crop img { width: 100%; height: auto; }
.stop .crop, .stop .arrival { margin: 32px 0 0 calc(-1 * var(--rail)); width: calc(100% + var(--rail)); }
@media (min-width: 980px) { .stop .crop { display: none; } }
.dock { display: none; }
@media (min-width: 980px) {
  .dock { display: block; position: relative; }
  .dock .phone { position: sticky; top: max(84px, calc(50vh - 369px)); width: 360px; margin-left: auto; }
  .dock picture { position: absolute; inset: 0; opacity: 0; transform: scale(1.03); transition: opacity 500ms var(--ease), transform 800ms var(--ease); }
  .dock picture.active { opacity: 1; transform: none; }
}

/* Arrival (as in the app, src/components/transit/Arrival.tsx): one train, the logo's capsule in the
   strand's colour, runs into the station once and stops; the station fills and its sign rises. */
.arrival { position: relative; z-index: 3; display: grid; justify-items: center; gap: 0; padding: 28px 20px 26px; border-radius: 24px; background: var(--surface); box-shadow: var(--card-shadow); text-align: center; }
@media (min-width: 980px) { .stop .arrival { margin: 36px 0 0; width: auto; max-width: 400px; } }
.arrival .trk { position: relative; width: 232px; height: 28px; }
.arrival .trk span { position: absolute; display: block; }
.arrival .todo, .arrival .built { left: 20px; top: 11px; height: 6px; border-radius: 3px; }
.arrival .todo { width: 192px; background: var(--rule); }
.arrival .built { width: 185px; background: var(--a); transform-origin: left; }
.arrival .from, .arrival .to { top: 7px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--a); }
.arrival .from { left: 13px; background: var(--a); }
.arrival .to { left: 205px; background: var(--surface); }
.arrival .to.fill { background: var(--a); }
/* 16 × 8 capsule in a 2px casing; parks beside the platform, 20px short of the station. */
.arrival .train { left: 0; top: 8px; width: 20px; height: 12px; border-radius: 6px; background: var(--a); border: 2px solid var(--surface); transform: translateX(182px); }
.arrival .sign { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 20px; font-size: 1.02rem; }
.arrival .sign .roundel { width: 26px; height: 26px; font-size: 13px; background: var(--a); }
.arrival .sign strong { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; }
.arrival .sign .sep { color: var(--ink3); }
.arrival .sign .got { font-weight: 700; }
.arrival .meta { margin-top: 6px !important; font-size: 0.9rem !important; color: var(--ink2); }
.js .arrival .train { transition: transform 700ms cubic-bezier(0.2, 0, 0, 1); }
.js .arrival .built { transition: transform 700ms cubic-bezier(0.2, 0, 0, 1); }
.js .arrival .to.fill { transition: opacity 240ms var(--ease) 640ms, transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 640ms; }
.js .arrival .sign, .js .arrival .meta { transition: opacity 260ms cubic-bezier(0.33, 1, 0.68, 1) 700ms, transform 260ms cubic-bezier(0.33, 1, 0.68, 1) 700ms; }
.js .arrival:not(.run) .train { transform: translateX(10px); }
.js .arrival:not(.run) .built { transform: scaleX(0); }
.js .arrival:not(.run) .to.fill { opacity: 0; transform: scale(0.6); }
.js .arrival:not(.run) .sign, .js .arrival:not(.run) .meta { opacity: 0; transform: translateY(16px); }

/* Also in the app: a plain index beside a still of the network */
.rest { display: grid; gap: clamp(40px, 6vw, 64px); margin-top: clamp(40px, 6vw, 64px); align-items: start; }
@media (min-width: 900px) { .rest { grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; } }
.index { border-top: 2px solid var(--ink); display: grid; }
.index > div { display: grid; grid-template-columns: 11rem 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.index strong { font-weight: 600; }
.index span { color: var(--ink2); }
@media (max-width: 520px) { .index > div { grid-template-columns: 1fr; gap: 4px; } }
.shot-card { position: relative; z-index: 3; overflow: hidden; border-radius: 24px; background: var(--surface); box-shadow: 0 1px 0 var(--rule), var(--card-shadow); }
.shot-card img { width: 100%; height: auto; }
@media (max-width: 899px) { .rest .shot-card { margin-left: calc(-1 * var(--rail)); width: calc(100% + var(--rail)); } }

/* Night band: privacy, on the ink */
.night { background: var(--night); color: var(--night-ink); }
.night .head p { color: var(--night-ink2); }
.promises { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; counter-reset: p; }
.promises li { position: relative; display: grid; gap: 6px 40px; padding: 28px 0; counter-increment: p; }
@media (min-width: 800px) { .promises li { grid-template-columns: 4rem 1fr 1fr; align-items: baseline; } }
.promises li::before { content: counter(p, decimal-leading-zero); font-weight: 700; color: var(--night-c); font-size: 0.95rem; }
.promises li:nth-child(3n + 2)::before { color: var(--night-a); }
.promises li:nth-child(3n)::before { color: var(--night-s); }
.promises li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--night-rule); transform-origin: left; }
.promises strong { font-size: clamp(1.25rem, 2.2vw, 1.65rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.promises span { color: var(--night-ink2); }

/* Closing: the words, then the line bends out and opens into a small network */
.end { padding-bottom: 0 !important; }
.end h2 { max-width: 13em; }
.end > .wrap > p { color: var(--ink2); font-size: 1.15rem; margin-top: 22px; max-width: 30em; }
.end .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin-top: 32px; }
.end .rail { height: calc(100% - 290px); }
.netwrap { padding-left: var(--gutter) !important; margin-top: clamp(56px, 8vw, 88px); }
.netmap { width: 100%; height: 290px; overflow: visible; }
.netmap .ahead { stroke: var(--ink3) !important; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.5 10; opacity: 0.6; }
.netmap .st { fill: var(--station); stroke: var(--k); stroke-width: 4; transition: fill 400ms var(--ease); transition-delay: var(--d, 0ms); }
.netmap .st.plan { stroke-dasharray: 4 4; stroke-width: 3; }
.netmap.in .st:not(.open):not(.plan), .netmap.lit .st:not(.open):not(.plan), html:not(.js) .netmap .st:not(.open):not(.plan) { fill: var(--k); }
.netmap .names text { font: 700 12.5px "Jakarta", system-ui, sans-serif; fill: var(--ink2); text-anchor: middle; }
.netmap .tag rect { fill: var(--sunken); }
.netmap .tag text { font: 700 12px "Jakarta", system-ui, sans-serif; fill: var(--ink2); text-anchor: middle; letter-spacing: 0.02em; }

/* Coordinators: the short version, as a spec card the lines pass behind */
.spec { position: relative; z-index: 1; width: 100%; max-width: 460px; justify-self: center; margin: 0; padding: 28px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 0 var(--rule), var(--card-shadow); }
.spec > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.spec > div:first-child { padding-top: 0; }
.spec > div:last-child { border-bottom: 0; padding-bottom: 0; }
.spec dt { font-weight: 600; color: var(--ink3); font-size: 0.95rem; }
.spec dd { margin: 0; font-weight: 600; }
.problems { display: grid; gap: 48px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) { .problems { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
/* Each problem is a short stretch of line ending at a station, in the strand's colour. */
.problems .n { display: block; position: relative; width: 84px; height: 8px; border-radius: 4px; background: var(--bar); }
.problems .n::after { content: ""; position: absolute; right: -6px; top: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--station); border: 4px solid var(--bar); }
.problems h3 { font-size: 1.4rem; margin-top: 20px; }
.problems p { color: var(--ink2); margin-top: 12px; }
.ledger { display: grid; gap: 56px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) { .ledger { grid-template-columns: 1fr 1fr; gap: 64px; } }
.ledger h3 { font-size: 1.5rem; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.ledger li strong { display: block; font-weight: 600; }
.ledger li span { display: block; color: var(--ink2); margin-top: 4px; }

/* Who's behind it: the logo mark and a line, no photo */
.byline { display: flex; align-items: center; gap: 16px; max-width: 34rem; margin: 40px 0 0; padding: 18px 22px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 0 var(--rule); text-align: left; }
.byline .mark { flex: none; width: 40px; height: 40px; }
.byline p { margin: 0 !important; font-size: 0.98rem !important; color: var(--ink2); max-width: none !important; }
.byline strong { color: var(--ink); font-weight: 700; }

/* Coordinators: a text to pass on to students, with a copy button */
.share { max-width: 34rem; margin-top: 40px; padding: 24px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 0 var(--rule), var(--card-shadow); }
.share h3 { font-size: 1.2rem; }
.share-text { margin-top: 12px !important; padding: 14px 16px; border-radius: 14px; background: var(--sunken); color: var(--ink) !important; font-family: "Voice", Georgia, serif; font-size: 1.05rem !important; line-height: 1.5; max-width: none !important; }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 14px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink); font: 700 0.95rem/1 "Jakarta", system-ui, sans-serif; cursor: pointer; transition: background-color 250ms var(--ease), color 250ms var(--ease), transform 150ms var(--ease); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn:active { transform: scale(0.97); }
.copy-btn.done { background: var(--s); color: var(--on-strand); }

/* Coordinators: what students see */
.sees { display: grid; gap: 56px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) { .sees { grid-template-columns: 1fr 1fr; gap: 56px 64px; } .sees .wide { grid-column: 1 / -1; } }
.sees figure { display: grid; gap: 24px; justify-items: center; text-align: center; }
.sees .phone { width: min(290px, 74vw); }
.sees .crop { display: none; }
.sees .wide .shot-card { width: 100%; max-width: 520px; }
.sees figcaption { max-width: 26rem; }
.sees figcaption strong { display: block; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.sees figcaption span { display: block; color: var(--ink2); margin-top: 8px; }
@media (max-width: 899px) {
  .sees figure { justify-items: stretch; text-align: left; }
  .sees .phone { display: none; }
  .sees .crop { display: block; }
  .sees .crop, .sees .wide .shot-card { margin-left: calc(-1 * var(--rail)); width: calc(100% + var(--rail)); max-width: none; }
}

/* Legal pages (privacy policy, terms, legal notice): one readable column, and on wide screens a
   contents list drawn as a metro line whose station lights up for the section in view. */
.doc-hero { padding-top: clamp(36px, 6vw, 80px); padding-bottom: clamp(28px, 4vw, 48px); }
.doc-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.doc-hero p { margin-top: 18px; color: var(--ink2); font-size: clamp(1.08rem, 1.7vw, 1.25rem); max-width: 38rem; }
.doc-hero .updated { display: inline-block; margin-top: 22px; padding: 6px 12px; border-radius: 999px; background: var(--sunken); color: var(--ink2); font-size: 0.88rem; font-weight: 700; }
.doc { display: grid; gap: 40px; padding-bottom: clamp(72px, 10vw, 128px); }
@media (min-width: 980px) { .doc { grid-template-columns: 250px minmax(0, 1fr); gap: 72px; } }
.toc { display: none; }
@media (min-width: 980px) {
  .toc { display: block; position: sticky; top: 100px; align-self: start; }
  .toc ol { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
  .toc ol::before { content: ""; position: absolute; left: 10px; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: var(--sunken); }
  .toc li { position: relative; padding: 6px 0 6px 30px; }
  .toc li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 18px; height: 12px; border-radius: 6px; border: 2.5px solid var(--ink3); background: var(--canvas); box-sizing: border-box; transition: background-color 250ms var(--ease), border-color 250ms var(--ease); }
  .toc li.on::before { background: var(--k, var(--c)); border-color: var(--k, var(--c)); }
  .toc li:nth-child(3n + 2) { --k: var(--a); } .toc li:nth-child(3n) { --k: var(--s); }
  .toc a { text-decoration: none; color: var(--ink2); font-weight: 600; font-size: 0.93rem; line-height: 1.35; display: block; }
  .toc li.on a, .toc a:hover { color: var(--ink); }
}
.prose { max-width: 44rem; }
.prose section { padding-top: 8px; scroll-margin-top: 88px; }
.prose section + section { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--rule); }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.03em; line-height: 1.12; }
.prose h3 { font-size: 1.1rem; letter-spacing: -0.01em; margin-top: 26px; }
.prose p, .prose li { color: var(--ink2); }
.prose p { margin-top: 14px; }
.prose ul { margin: 14px 0 0; padding-left: 1.2em; }
.prose li { margin-top: 8px; padding-left: 4px; }
.prose li::marker { color: var(--ink3); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose .short { margin-top: 18px; padding: 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: 0 1px 0 var(--rule); }
.prose .short p:first-child { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 0.96rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); }
.prose th { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--ink); }
.prose td { color: var(--ink2); }
.prose td:first-child { color: var(--ink); font-weight: 600; }
.table-scroll { overflow-x: auto; }
@media (max-width: 640px) { .prose table, .prose thead, .prose tbody, .prose tr, .prose th, .prose td { display: block; } .prose thead { display: none; } .prose tr { padding: 12px 0; border-bottom: 1px solid var(--rule); } .prose td { border: 0; padding: 2px 0; } }
.fr { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--rule); }
.fr p { font-style: italic; }

/* Footer */
footer { padding: 40px 0 48px; color: var(--ink3); font-size: 0.93rem; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
footer .brand { color: var(--ink); font-size: 1rem; }
footer .brand svg { width: 24px; height: 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
footer a { color: var(--ink2); font-weight: 600; text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .small { flex-basis: 100%; padding-top: 20px; border-top: 1px solid var(--rule); }
footer .legal { display: flex; flex-wrap: wrap; gap: 6px 20px; flex-basis: 100%; }
footer .legal a { font-weight: 600; font-size: 0.9rem; padding: 4px 0; }
footer .small + .small { padding-top: 0; border-top: 0; margin-top: -6px; }

/* ── Motion (only with JavaScript on) ──────────────────── */
/* Two signatures: lines draw in, stations light up. Everything else only fades, 400ms, 12px at most. */
.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .rise { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.js .rise > span { display: block; transform: translateY(110%); transition: transform 900ms var(--ease); transition-delay: var(--d, 0ms); }
.js .ready .rise > span { transform: none; }
.js .fade { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); transition-delay: var(--d, 0ms); }
.js .ready .fade { opacity: 1; transform: none; }
.js .draw path, .js .draw line, .js .rail-hero.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease); transition-delay: var(--d, 0ms); }
.js .draw.in path, .js .draw.in line { stroke-dashoffset: 0; }
.js .netmap:not(.lit) .lines path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease); }
.js .netmap:not(.lit) .lines .ahead { opacity: 0; transition: opacity 400ms var(--ease) 700ms; }
.js .netmap.in .lines path { stroke-dashoffset: 0; }
.js .netmap.in .lines .ahead { opacity: 0.6; }
.js .netmap:not(.lit) .st { transition-delay: calc(700ms + var(--d, 0ms)); }
.js .stage .phone { opacity: 0; transform: translateY(12px); transition: opacity 700ms var(--ease) 200ms, transform 700ms var(--ease) 200ms; }
.js .ready .stage .phone { opacity: 1; transform: none; }
.js .promises li { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); transition-delay: var(--d, 0ms); }
.js .promises li::after { transform: scaleX(0); transition: transform 900ms var(--ease); transition-delay: var(--d, 0ms); }
.js .promises.in li { opacity: 1; transform: none; }
.js .promises.in li::after { transform: scaleX(1); }
.js .spec > div { opacity: 0; transition: opacity 400ms var(--ease); transition-delay: var(--d, 0ms); }
.js .ready .spec > div { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}


/* The light/dark switch in the top bar: a moon in dark (switch to light), a sun in light. */
.theme-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink2); cursor: pointer; }
.theme-toggle:hover { background: var(--sunken); color: var(--ink); }
.theme-toggle:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
