/* ManiMage — a night concourse for ideas.
   Ground is the lessons' own chalkboard (#0e1116), so videos sit in the wall
   frameless. Gold sign bands (#F5C542, sign-black type) mark wayfinding only:
   the destination, the next step, the primary action. Boards are split-flap:
   chalk characters on dark flaps in a strict character-cell grid. Pictograms
   are white glyphs on hard-edged black squares. Course colours appear only as
   thin line codes. */

/* Self-hosted, SIL Open Font License: Nunito Sans and STIX Two Text (Latin subsets).
   Apple devices keep Avenir Next, the lessons' own face. */
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/assets/fonts/nunitosans-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: italic; font-weight: 200 1000; font-display: swap; src: url("/assets/fonts/nunitosans-italic.woff2") format("woff2"); }
@font-face { font-family: "STIX Two Text"; font-style: normal; font-weight: 400 700; font-display: swap; src: local("STIX Two Text"), url("/assets/fonts/stixtwotext-normal.woff2") format("woff2"); }
@font-face { font-family: "STIX Two Text"; font-style: italic; font-weight: 400 700; font-display: swap; src: local("STIX Two Text Italic"), url("/assets/fonts/stixtwotext-italic.woff2") format("woff2"); }

:root {
  --ground: #0e1116;
  --ground-2: #13171e;
  --sign: #0b0b0b;
  --flap: #1c222b;
  --hinge: #07090c;
  --rule: #222933;
  --rule-2: #343d4a;
  --chalk: #eef1f5;
  --chalk-2: #bac2cd;
  --chalk-3: #8f99a7;
  --gold: #f5c542;
  --gold-hi: #ffd45c;
  --gold-lo: #e3b22e;
  --ink: #0b0b0b;
  --ink-2: #2e2708;
  --c: var(--chalk-3);
  --sans: "Avenir Next", "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --math: "STIX Two Text", Georgia, serif;
  --gutter: clamp(16px, 3.4vw, 48px);
  --max: 1344px;
  --band-h: 64px;
  --dest-h: 60px;
  --hdr: var(--band-h);
  --sec: clamp(88px, 10vw, 152px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* split-flap cell geometry (boards override per breakpoint) */
  --cw: 16px; --ch: 28px; --cg: 2px; --fs: 15px;
  color-scheme: dark;
}
html.has-dest { --hdr: calc(var(--band-h) + var(--dest-h)); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 16px); }
body {
  margin: 0; background: var(--ground); color: var(--chalk);
  font: 500 17px/1.6 var(--sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--gold); color: var(--ink); }
input, textarea { caret-color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
html { scrollbar-color: var(--rule-2) var(--ground); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--rule-2); border: 2px solid var(--ground); }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(238, 241, 245, .38); text-underline-offset: .24em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; border-radius: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.1; text-wrap: balance; letter-spacing: -.012em; }
p { margin: 0; text-wrap: pretty; }
ol, ul { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 700; }
kbd { font: 700 12px/1 var(--sans); }
.math { font-family: var(--math); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--gold); color: var(--ink); padding: 12px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }

main { width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; }
.num, .tnum { font-variant-numeric: tabular-nums lining-nums; }

/* ------------------------------------------------------------ pictograms */
.pg {
  --pg: 32px; flex: none; display: inline-grid; place-items: center;
  width: var(--pg); height: var(--pg); background: #000; color: #fff;
  box-shadow: inset 0 0 0 1px #2b323d;
}
.pg svg { width: 60%; height: 60%; transition: transform .35s var(--ease); }
.pg-l svg { transform: rotate(180deg); }
.pg-u svg { transform: rotate(-90deg); }
.pg-ur svg { transform: rotate(-45deg); }
.pg-sm { --pg: 26px; }
.pg-lg { --pg: 56px; }

/* course line code: a short hairline in the course colour */
.lc { display: inline-block; flex: none; width: 18px; height: 3px; background: var(--c); vertical-align: middle; }

/* ------------------------------------------------------------ sign buttons */
.sign-btn {
  display: inline-flex; align-items: center; gap: 14px; min-height: 56px;
  padding: 6px 24px 6px 6px; background: var(--gold); color: var(--ink);
  border: 0; text-decoration: none; text-align: left; font: 700 18px/1.15 var(--sans);
  transition: background-color .2s;
}
.sign-btn .pg { --pg: 44px; background: var(--ink); box-shadow: none; }
.sign-btn .sb-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sign-btn .sb-main { text-wrap: balance; }
.sign-btn .sb-k { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sign-btn .sb-sub { font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sign-btn .sb-sub b { color: var(--ink); }
.sign-btn:hover { background: var(--gold-hi); }
.sign-btn:active { background: var(--gold-lo); }
.sign-btn:hover .pg:not(.pg-l):not(.pg-u):not(.pg-ur) svg { transform: translateX(3px); }
.sign-btn:focus-visible, .dest-band :focus-visible, .cap-band:focus-visible, .j-next :focus-visible { outline-color: var(--chalk); }
.sign-route { min-height: 76px; padding: 8px 16px 8px 8px; gap: 12px; font-size: 20px; }
.sign-route .pg { --pg: 60px; }
.sign-route .sr-t { max-width: 7em; line-height: 1.1; text-wrap: balance; }
.sign-route .sr-n { display: flex; gap: 12px; margin-left: 0; padding-left: 12px; align-self: stretch; align-items: center; border-left: 1px solid rgba(11, 11, 11, .25); }
.sr-num { display: inline-flex; align-items: baseline; gap: 5px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.sr-num b { font: 700 44px/.8 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.sr-done { font-size: 16px; }
.sign-lg { min-height: 72px; font-size: 21px; padding-right: 30px; gap: 18px; }
.sign-lg .pg { --pg: 60px; }
.sign-sm { min-height: 48px; font-size: 16px; padding-right: 18px; gap: 12px; }
.sign-sm .pg { --pg: 36px; }

.quiet-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--rule-2); background: transparent; color: var(--chalk);
  font: 700 16px/1.2 var(--sans); text-decoration: none; transition: border-color .2s, background-color .2s;
}
.quiet-btn .pg { --pg: 28px; margin-left: -8px; }
.quiet-btn:hover { border-color: var(--chalk-2); background: var(--ground-2); }
.quiet-btn[aria-pressed="true"] { border-color: var(--chalk-2); }
.quiet-btn[aria-pressed="true"] .pg { background: var(--chalk); color: var(--ink); }

/* ------------------------------------------------------------ split-flap cells */
.flaps { display: inline-flex; flex-direction: column; gap: 3px; vertical-align: top; }
.fl { display: flex; gap: var(--cg); }
.fc {
  flex: none; position: relative; width: var(--cw); height: var(--ch);
  background: var(--flap); color: var(--chalk);
  font: 700 var(--fs)/var(--ch) var(--sans); text-align: center; text-transform: uppercase;
  perspective: 80px;
}
.fc.fa::before, .fc.fb::before {
  content: attr(data-p); position: absolute; inset: 0; background: var(--flap); color: inherit;
  clip-path: inset(0 0 50% 0); transform-origin: 50% 50%; backface-visibility: hidden;
}
.fc.fa::before { animation: flap-a 70ms cubic-bezier(.5, 0, .9, .5) both; }
.fc.fb::before { animation: flap-b 70ms cubic-bezier(.5, 0, .9, .5) both; }
@keyframes flap-a { to { transform: rotateX(-90deg); filter: brightness(.45); } }
@keyframes flap-b { to { transform: rotateX(-90deg); filter: brightness(.45); } }

/* ------------------------------------------------------------ masthead */
.masthead { position: sticky; top: 0; z-index: 40; }
.topband {
  view-transition-name: topband;
  height: var(--band-h); background: var(--sign); border-bottom: 1px solid #1d232c;
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px);
  padding: 0 max(var(--gutter), (100% - var(--max)) / 2);
}
.brand { flex: none; display: block; }
.brand img { width: 150px; height: auto; }
.topnav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; }
.topnav a {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  font: 700 16px/1 var(--sans); text-decoration: none; color: var(--chalk);
}
.topnav a .pg { --pg: 28px; }
.topnav a:hover { background: var(--ground-2); }
.topnav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 4px; background: var(--gold); }
.find { position: relative; margin-left: auto; display: flex; align-items: center; width: min(360px, 32vw); height: 44px; background: #14181e; border: 1px solid var(--rule-2); }
.find:focus-within { border-color: var(--chalk-3); }
.find .pg-find { --pg: 42px; box-shadow: none; background: transparent; color: var(--chalk-2); }
.find input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--chalk);
  font: 600 16px/1 var(--sans); padding: 0 8px 0 0; outline: none;
}
.find input::placeholder { color: var(--chalk-3); opacity: 1; }
.find input::-webkit-search-cancel-button { filter: invert(1) grayscale(1); cursor: pointer; }
.find:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.find kbd { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border: 1px solid var(--rule-2); color: var(--chalk-3); }
.find-toggle { display: none; }
.find-results {
  position: absolute; top: calc(100% + 8px); right: -1px; width: min(480px, 92vw); max-height: min(70vh, 560px); overflow: auto;
  background: var(--sign); border: 1px solid var(--rule-2); z-index: 60;
}
.find-results a { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 16px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.find-results a:hover, .find-results a[aria-selected="true"] { background: var(--ground-2); }
.find-results a[aria-selected="true"] .fr-t { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.fr-t { font-weight: 700; font-size: 16px; line-height: 1.3; }
.fr-c { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--chalk-3); white-space: nowrap; }
.fr-s { grid-column: 1 / -1; font-size: 14px; line-height: 1.45; color: var(--chalk-2); }
.fr-s mark, .find-results mark { background: none; color: var(--gold); font-weight: 700; }
.fr-empty { padding: 16px; font-size: 15px; color: var(--chalk-2); }
.fr-empty a { color: var(--chalk); font-weight: 700; }

/* ------------------------------------------------------------ destination band */
.dest-band { view-transition-name: dest; background: var(--gold); color: var(--ink); }
.dest-band:empty { display: none; }
html.has-dest .dest-band:empty { display: block; height: var(--dest-h); }
.db-in {
  height: var(--dest-h); display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px);
  padding: 0 max(var(--gutter), (100% - var(--max)) / 2);
}
.db-in > .pg { --pg: 44px; background: var(--ink); box-shadow: none; }
.db-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.db-dest { min-width: 0; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.db-k { font: 700 14px/1 var(--sans); color: var(--ink-2); }
.db-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 8px 0; font: 700 28px/1.1 var(--sans); letter-spacing: -.02em; text-decoration: none; }
.db-name:hover { text-decoration: underline; }
.db-counts { display: flex; align-items: center; gap: 18px; flex: none; }
.db-c { display: flex; align-items: center; gap: 8px; font: 700 15px/1 var(--sans); white-space: nowrap; }
.dest-band .fc { --cw: 19px; --ch: 32px; --fs: 19px; background: var(--ink); color: #fff; }
.dest-band .fc.fa::before, .dest-band .fc.fb::before { background: var(--ink); }
.db-arrived .fc { color: var(--gold); }
.db-next {
  flex: none; display: flex; align-items: center; gap: 12px; align-self: stretch; padding: 0 0 0 clamp(12px, 2vw, 24px);
  border-left: 1px solid rgba(11, 11, 11, .28); text-decoration: none; font: 700 16px/1.2 var(--sans); max-width: 34ch;
}
.db-next .db-nk { color: var(--ink-2); }
.db-next .db-nn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-next .pg { --pg: 40px; background: var(--ink); box-shadow: none; }
.db-next:hover .db-nn { text-decoration: underline; }
.db-next:hover .pg svg { transform: translateX(3px); }
.db-clear { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(11, 11, 11, .35); color: var(--ink); }
.db-clear svg { width: 18px; height: 18px; }
.db-clear:hover { background: var(--ink); color: var(--gold); }
.dest-band.db-enter { animation: band-in .56s var(--ease) both; }
.dest-band.db-enter .db-in { animation: band-content .7s var(--ease) both; }
.dest-band.db-out { animation: band-out .26s cubic-bezier(.5, 0, .9, .4) both; }
@keyframes band-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes band-content { from { transform: translateY(-14px); opacity: 0; } }
@keyframes band-out { to { clip-path: inset(0 0 100% 0); } }

/* ------------------------------------------------------------ view transitions */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
:root.vt-swap::view-transition-old(dest) { animation: vt-out .2s cubic-bezier(.5, 0, .9, .4) both; }
:root.vt-swap::view-transition-new(dest) { animation: band-in .5s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }

/* ------------------------------------------------------------ home: hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 3vw, 56px);
  align-items: end; padding: clamp(28px, 4.4vh, 64px) 0 clamp(24px, 3.4vh, 44px);
}
.hero h1 { font-size: clamp(44px, 5.2vw, 80px); line-height: .95; letter-spacing: -.035em; }
.hero h1 span { display: block; white-space: nowrap; }
.hero .lede { margin-top: clamp(18px, 1.8vw, 28px); max-width: 38ch; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; color: var(--chalk-2); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin-top: clamp(20px, 2.2vw, 32px); }
.hero-actions .quiet-btn { min-height: 76px; padding: 0 14px; max-width: 6.4em; font-size: 15px; line-height: 1.15; }
.hero-screen { margin: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; background: var(--ground); }
.screen video, .screen img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; }
.cap-band {
  display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 4px 18px 4px 4px;
  background: var(--gold); color: var(--ink); text-decoration: none; font: 700 16px/1.2 var(--sans);
}
.cap-band .pg { --pg: 40px; background: var(--ink); box-shadow: none; }
.cap-band .cb-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap-band .cb-d { font-variant-numeric: tabular-nums; }
.cap-band:hover { background: var(--gold-hi); }
.cap-band:hover .cb-t { text-decoration: underline; }

/* ------------------------------------------------------------ home: the board */
.board {
  --n-dest: 22; --n-route: 16; --n-time: 6; --n-stat: 15; --r-dest: 2; --r-route: 2;
  --cs: calc(var(--cw) + var(--cg));
  --w-dest: calc(var(--n-dest) * var(--cs) - var(--cg));
  --w-route: calc(var(--n-route) * var(--cs) - var(--cg));
  --w-time: calc(var(--n-time) * var(--cs) - var(--cg));
  --w-stat: calc(var(--n-stat) * var(--cs) - var(--cg));
  --w-act: 128px; --colgap: 18px;
  background: var(--sign); border: 1px solid var(--rule); padding: 0 20px 8px;
}
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding: 18px 0 14px; border-bottom: 1px solid var(--rule); }
.board-top h2, .sec-head h2 { display: flex; align-items: center; gap: 16px; }
.board-top h2 { font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -.025em; }
.board-top h2 .pg { --pg: clamp(40px, 3.2vw, 48px); }
.board-note { max-width: 56ch; font-size: 15px; line-height: 1.45; color: var(--chalk-3); }
.board-cols, .row-go, .ssr { display: grid; column-gap: var(--colgap); grid-template-columns: var(--w-dest) var(--w-route) var(--w-time) var(--w-stat); }
.board-cols { grid-template-columns: var(--w-dest) var(--w-route) var(--w-time) var(--w-stat) var(--w-act); padding: 14px 0 10px; font: 700 13px/1 var(--sans); color: var(--chalk-3); }
.board-cols .c-time { text-align: right; }
.ct-short { display: none; }
.row { display: grid; grid-template-columns: auto var(--w-act); column-gap: var(--colgap); align-items: center; border-top: 1px solid #171c23; }
.row-go { align-items: start; padding: 9px 0; background: none; border: 0; text-align: left; color: inherit; }
.row-go:focus-visible { outline-offset: 4px; }
.row[data-kind="lesson"]:hover { background: #111419; }
.row[data-kind="lesson"]:hover .f-dest .fc { color: #fff; }
.row[data-kind="gap"] .row-go, .row[data-kind="query"] .row-go { cursor: default; }
.f-time { justify-self: end; }
.f-route .fc { color: var(--chalk-2); }
.f-stat[data-tone="go"] .fc { color: var(--gold); }
.f-stat[data-tone="dim"] .fc { color: var(--chalk-3); }
.f-stat[data-tone="gap"] .fc { color: var(--chalk-2); }
.row[data-kind="gap"] .f-dest .fc, .row[data-kind="query"] .f-dest .fc { color: var(--chalk-2); }
.row-act { display: flex; justify-content: flex-start; }
.row-play { --pg: 44px; text-decoration: none; transition: background-color .2s, color .2s; }
.row-play:hover { background: var(--gold); color: var(--ink); box-shadow: none; }
.row-ask { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px 0 0; background: transparent; border: 1px solid var(--rule-2); font: 700 15px/1 var(--sans); color: var(--chalk); white-space: nowrap; }
.row-ask .pg { --pg: 40px; box-shadow: none; }
.row-ask:hover { border-color: var(--chalk-2); }
.row-ask:disabled { cursor: default; opacity: .6; }
/* server-rendered rows: shown without JS, replaced by flaps with it */
.ssr { padding: 9px 0; min-height: 46px; align-items: center; text-decoration: none; font: 700 14px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .05em; }
.ssr .s-route { color: var(--chalk-2); }
.ssr .s-time { text-align: right; }
.ssr .s-stat { color: var(--chalk); }
html.js .ssr-row { visibility: hidden; animation: failsafe 0s 3s forwards; }
@keyframes failsafe { to { visibility: visible; } }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0 12px; border-top: 1px solid var(--rule); }
.board-foot .quiet-btn { order: 2; }
.board-count { font-size: 14px; font-weight: 600; color: var(--chalk-3); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ home: section heads */
.sec-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 16px 48px; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-head h2 { font-size: clamp(30px, 3.4vw, 50px); letter-spacing: -.025em; }
.sec-head h2 .pg { --pg: clamp(40px, 3.4vw, 52px); }
.sec-head p { font-size: 17px; line-height: 1.5; color: var(--chalk-2); max-width: 46ch; }

/* ------------------------------------------------------------ home: destination + route corridor */
.route-sec { padding-top: var(--sec); }
.goals { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 48px); }
.goal {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px;
  background: transparent; border: 1px solid var(--rule-2); color: var(--chalk); font: 700 16px/1.2 var(--sans);
  transition: border-color .2s, background-color .2s;
}
.goal:hover { border-color: var(--chalk-2); }
.goal[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.goal .pg { --pg: 28px; margin-left: -10px; }
.cor-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 24px; padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.corridor.chosen .cor-head > .pg { background: var(--gold); color: var(--ink); box-shadow: none; }
.cor-name { font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -.02em; }
.cor-stats { display: flex; gap: 20px; margin-top: 6px; font-size: 16px; font-weight: 600; color: var(--chalk-2); }
.cor-stats b { font-size: 1.5em; color: var(--chalk); font-variant-numeric: tabular-nums; }
.cor-act { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cor-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); padding-top: clamp(20px, 2.4vw, 32px); align-items: start; }
.cor-track { position: relative; }
.cor-line { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cor-line path, .course-line path { fill: none; }
.cl-base { stroke: var(--rule-2); stroke-width: 2; stroke-dasharray: 5 7; }
.cl-gold { stroke: var(--gold); stroke-width: 4; stroke-linecap: square; }
.stops { position: relative; }
.stop { display: grid; grid-template-columns: 64px 24px minmax(0, 1fr) auto; column-gap: 18px; align-items: center; min-height: 80px; padding: 8px 0; }
.st-n { font: 700 44px/1 var(--sans); letter-spacing: -.03em; text-align: right; font-variant-numeric: tabular-nums; color: var(--chalk-3); transition: color .3s; }
.st-mark { justify-self: center; position: relative; z-index: 1; width: 18px; height: 18px; background: var(--ground); border: 2px solid var(--rule-2); transition: background-color .25s, border-color .25s; }
.st-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 6px 0; text-decoration: none; }
.st-t { font-size: 19px; font-weight: 700; line-height: 1.25; }
.st-body:hover .st-t { text-decoration: underline; text-decoration-color: rgba(238, 241, 245, .5); }
.st-m { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--chalk-3); }
.st-d { font-variant-numeric: tabular-nums; color: var(--chalk-2); }
.st-s { --cw: 13px; --ch: 22px; --fs: 12px; min-width: calc(11 * 15px); font: 700 13px/1 var(--sans); letter-spacing: .06em; color: var(--chalk-3); }
.stop .st-s .fc { color: var(--chalk-3); }
.st-s.blank { visibility: hidden; }
@media (max-width: 760px) { .st-s.blank { display: none; } }
.stop.lit .st-n { color: var(--chalk); }
.stop.lit .st-mark { border-color: var(--gold); }
.stop.lit.is-watched .st-mark { background: var(--chalk-2); border-color: var(--chalk-2); }
.stop.lit.is-next .st-mark, .stop.lit.is-dest .st-mark { background: var(--gold); }
.stop.is-next .st-s .fc, .stop.is-dest .st-s .fc { color: var(--gold); }
.corridor:not(.chosen) .stop .st-n { color: var(--chalk-2); }
.corridor:not(.chosen) .st-mark { border-color: var(--chalk-3); }
.next-stop { position: sticky; top: calc(var(--hdr) + 24px); display: flex; flex-direction: column; gap: 14px; }
.ns-k { font: 700 15px/1 var(--sans); color: var(--chalk-2); display: flex; align-items: center; gap: 10px; }
.ns-k::before { content: ""; width: 10px; height: 10px; background: var(--gold); }
.ns-screen { display: block; aspect-ratio: 16 / 9; background: var(--ground); }
.ns-screen img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; }
.next-stop .sign-btn { align-self: stretch; }
.ns-done { font-size: 17px; color: var(--chalk-2); }

/* ------------------------------------------------------------ home: courses as lines */
.lines-sec { padding-top: var(--sec); }
.cline {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: "head track" "blurb track" "blurb go";
  column-gap: clamp(32px, 5vw, 88px); row-gap: 12px; padding: clamp(28px, 3.4vw, 44px) 0; border-top: 1px solid var(--rule);
}
.cline:last-child { border-bottom: 1px solid var(--rule); }
.cl-head { grid-area: head; }
.cl-head h3 { font-size: clamp(24px, 2.3vw, 32px); letter-spacing: -.02em; }
.cl-head h3 a { text-decoration: none; }
.cl-head h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--c); }
.cl-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--chalk-3); }
.cl-stats b { color: var(--chalk); font-size: 1.25em; font-variant-numeric: tabular-nums; }
.cl-prog:empty { display: none; }
.cl-prog { color: var(--chalk-2); }
.cl-blurb { grid-area: blurb; font-size: 16px; line-height: 1.55; color: var(--chalk-2); max-width: 44ch; }
.cl-track { grid-area: track; align-self: center; padding-top: 8px; }
.cl-rail { position: relative; display: flex; justify-content: space-between; align-items: center; height: 44px; }
.cl-rail::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1.5px); height: 3px; background: var(--c); }
.tick { position: relative; z-index: 1; width: 14px; height: 14px; background: var(--ground); border: 2px solid var(--c); }
.tick::before { content: ""; position: absolute; inset: -15px -6px; }
.tick.watched { background: var(--chalk); border-color: var(--chalk); }
.tick::after {
  content: attr(data-name); position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  padding: 7px 10px; background: var(--sign); border: 1px solid var(--rule-2); color: var(--chalk);
  font: 700 14px/1 var(--sans); white-space: nowrap; pointer-events: none; display: none;
}
.tick:first-child::after { left: -8px; transform: none; }
.tick:last-child::after { left: auto; right: -8px; transform: none; }
.tick:hover { background: var(--c); }
.tick:hover::after { display: block; }
.cl-ends { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--chalk-2); }
.cl-ends span:last-child { text-align: right; }
.cl-go { grid-area: go; justify-self: end; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font: 700 16px/1 var(--sans); text-decoration: none; }
.cl-go .pg { --pg: 36px; transition: background-color .2s, color .2s; }
.cl-go:hover .pg { background: var(--gold); color: var(--ink); box-shadow: none; }
.cl-go:hover span { text-decoration: underline; }

/* ------------------------------------------------------------ home: requests */
.ask-sec { padding-top: var(--sec); }
.request { max-width: 920px; }
.request h2 { font-size: clamp(30px, 3.4vw, 50px); letter-spacing: -.025em; }
.request h2 label { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.request h2 .pg { --pg: clamp(40px, 3.4vw, 52px); }
.ask-note { margin-top: 14px; font-size: 17px; color: var(--chalk-2); }
.request-row { display: flex; margin-top: 28px; }
.request-row input:not(.hp) {
  flex: 1; min-width: 0; height: 72px; padding: 0 20px; border: 1px solid var(--rule-2); border-right: 0;
  background: #12161c; color: var(--chalk); font: 600 18px/1 var(--sans); border-radius: 0;
}
.request-row input::placeholder { color: var(--chalk-3); opacity: 1; }
.request-row input:focus { outline: none; border-color: var(--chalk-3); }
.request-row input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.request-row .sign-btn { min-height: 72px; padding-right: 30px; }
.request-row .sign-btn .pg { --pg: 60px; }
.request-row .sign-btn:disabled { opacity: .6; cursor: progress; }
.request-status { min-height: 1.6em; margin-top: 14px; font-size: 16px; font-weight: 600; color: var(--chalk-2); }

/* ------------------------------------------------------------ footer */
.foot { margin-top: var(--sec); background: var(--sign); border-top: 1px solid var(--rule); }
.foot-in { width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 7vw, 104px) 0 36px; }
.foot-line { font: 700 clamp(44px, 8.4vw, 124px)/.92 var(--sans); letter-spacing: -.045em; color: var(--chalk); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: clamp(36px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--rule); }
.foot-row img { width: 150px; height: auto; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.foot-row nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--chalk-2); }
.foot-row nav a:hover { color: var(--chalk); text-decoration: underline; }

/* ------------------------------------------------------------ course page */
.course-head { padding: clamp(40px, 6vw, 88px) 0 clamp(36px, 4.4vw, 64px); }
.lc-xl { display: block; width: 136px; height: 4px; margin-bottom: clamp(20px, 2.4vw, 32px); }
.course-head h1 { font-size: clamp(46px, 7vw, 104px); line-height: .94; letter-spacing: -.04em; max-width: 14ch; }
.course-head .lede { margin-top: 22px; max-width: 58ch; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--chalk-2); }
.course-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 20px; font-size: 16px; font-weight: 600; color: var(--chalk-3); }
.course-stats b { font-size: 1.5em; color: var(--chalk); font-variant-numeric: tabular-nums; }
.course-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 32px; }
.course-actions .quiet-btn { min-height: 72px; padding: 0 24px; }
.course-track { position: relative; border-top: 1px solid var(--rule); }
.course-line { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.course-line .cl-base { stroke: var(--c); stroke-width: 3; stroke-dasharray: 6 8; stroke-linecap: butt; opacity: .9; }
.cstops { position: relative; }
.cstop {
  display: grid; grid-template-columns: clamp(64px, 8vw, 120px) 28px minmax(0, 1fr) 96px 166px minmax(160px, 240px);
  grid-template-areas: "n mark body min state screen";
  column-gap: clamp(14px, 1.8vw, 28px); align-items: start; padding: 28px 0; border-bottom: 1px solid #1a2029;
}
.cs-n { grid-area: n; font: 700 clamp(52px, 6.4vw, 100px)/.8 var(--sans); letter-spacing: -.05em; text-align: right; font-variant-numeric: tabular-nums; color: var(--chalk-3); }
.cstop.watched .cs-n { color: #4b5461; }
.cstop.is-next .cs-n { color: var(--chalk); }
.cs-mark { grid-area: mark; justify-self: center; position: relative; z-index: 1; width: 20px; height: 20px; margin-top: 6px; background: var(--ground); border: 3px solid var(--c); }
.cstop.watched .cs-mark { background: var(--chalk-2); border-color: var(--chalk-2); }
.cstop.is-next .cs-mark { background: var(--gold); border-color: var(--gold); }
.cstop.on-route .cs-mark { border-color: var(--gold); }
.cs-body { grid-area: body; min-width: 0; }
.cs-body h3 { font-size: clamp(21px, 1.9vw, 27px); letter-spacing: -.015em; }
.cs-body h3 a { text-decoration: none; }
.cs-body h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.cs-sub { margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--chalk-2); }
.cs-blurb { margin-top: 10px; font-size: 16px; line-height: 1.55; color: var(--chalk-2); max-width: 58ch; }
.cs-lean { margin-top: 10px; font-size: 14px; color: var(--chalk-3); }
.cs-lean a { color: var(--chalk-2); font-weight: 700; }
.cs-lean .from { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.cs-min { grid-area: min; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-size: 15px; font-weight: 700; color: var(--chalk-2); }
.cs-min b { font: 700 clamp(40px, 3.6vw, 56px)/.85 var(--sans); letter-spacing: -.03em; color: var(--chalk); font-variant-numeric: tabular-nums; }
.cs-d { flex-basis: 100%; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--chalk-3); font-variant-numeric: tabular-nums; }
.cs-state { grid-area: state; padding-top: 6px; --cw: 13px; --ch: 22px; --fs: 12px; }
.cs-state.blank { visibility: hidden; }
.cs-state .fc { color: var(--chalk); }
.cstop.watched .cs-state .fc { color: var(--chalk-3); }
.cstop.on-route .cs-state .fc { color: var(--chalk-2); }
.cstop.is-next .cs-state .fc, .cstop.is-dest .cs-state .fc { color: var(--gold); }
.cs-screen { grid-area: screen; display: block; aspect-ratio: 16 / 9; background: var(--ground); }
.cs-screen img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; }
.leans { margin-top: clamp(56px, 7vw, 96px); max-width: 760px; }

/* ------------------------------------------------------------ junction signs (lesson, course, 404) */
.jsign { background: var(--sign); border: 1px solid var(--rule); }
.jsign > h2 { display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 14px; font-size: 20px; border-bottom: 1px solid var(--rule); }
.jsign > h2 .pg { --pg: 44px; }
.jlist li + li { border-top: 1px solid var(--rule); }
.jlist a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t min" "c min" "s min";
  column-gap: 16px; align-items: center; padding: 14px 16px; text-decoration: none; min-height: 76px;
}
.jlist a:hover { background: var(--ground-2); }
.jlist a:hover .je-t { text-decoration: underline; }
.je-t { grid-area: t; font-size: 18px; font-weight: 700; line-height: 1.25; }
.je-c { grid-area: c; display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--chalk-3); }
.je-s { grid-area: s; font: 700 12px/1 var(--sans); letter-spacing: .08em; color: var(--chalk-3); }
.je-s:not(:empty) { margin-top: 8px; }
.je-min { grid-area: min; display: flex; align-items: baseline; gap: 5px; font-size: 14px; font-weight: 700; color: var(--chalk-2); }
.je-min b { font: 700 clamp(34px, 3vw, 46px)/.85 var(--sans); letter-spacing: -.03em; color: var(--chalk); font-variant-numeric: tabular-nums; }
li.watched .je-t { color: var(--chalk-2); }
.j-empty { padding: 18px 16px; font-size: 15px; line-height: 1.5; color: var(--chalk-3); }

/* ------------------------------------------------------------ lesson page */
.page-lesson main { width: min(var(--max), 100% - 2 * var(--gutter)); }
.player {
  width: min(100%, max(640px, (100svh - var(--hdr) - 104px) * 16 / 9));
  margin: 0 auto; padding-top: 16px;
}
.screen-wrap { position: relative; aspect-ratio: 16 / 9; background: var(--ground); }
.screen-wrap video { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; cursor: pointer; }
.bigplay { position: absolute; left: 0; bottom: 0; z-index: 3; }
.player.started .bigplay { display: none; }
.cc { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); width: min(92%, 1000px); text-align: center; pointer-events: none; z-index: 2; }
.cc span { display: inline; padding: .12em .45em; background: rgba(11, 11, 11, .88); color: #fff; font: 600 clamp(15px, 1.9vw, 24px)/1.5 var(--sans); box-decoration-break: clone; -webkit-box-decoration-break: clone; white-space: pre-line; }
.bar { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--rule); background: var(--ground); }
.ctl { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: #000; color: #fff; border: 0; box-shadow: inset 0 0 0 1px #2b323d; }
.ctl svg { width: 22px; height: 22px; }
.ctl:hover { background: #1a1f27; }
.ctl[aria-pressed="true"] { background: var(--chalk); color: var(--ink); box-shadow: none; }
.ctl.txt { width: auto; min-width: 52px; padding: 0 10px; font: 700 15px/1 var(--sans); font-variant-numeric: tabular-nums; }
.time { flex: none; min-width: 96px; padding: 0 8px; font: 700 15px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--chalk-2); }
.scrub { position: relative; flex: 1; height: 44px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub-rail { position: relative; width: 100%; height: 6px; background: #262d37; }
.scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--chalk); }
.scrub-fill::after { content: ""; position: absolute; right: -2px; top: -7px; width: 4px; height: 20px; background: var(--chalk); }
.scrub-ticks i { position: absolute; top: -3px; width: 3px; height: 12px; margin-left: -1px; background: var(--ground); }
.scrub:focus-visible { outline-offset: 0; }
.scrub-tip { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 8px 10px; background: var(--sign); border: 1px solid var(--rule-2); font: 600 13px/1.3 var(--sans); white-space: nowrap; pointer-events: none; z-index: 5; }
.scrub-tip b { display: block; font-variant-numeric: tabular-nums; color: var(--chalk); }
.player.idle .bar { cursor: none; }
.player:fullscreen { width: 100%; padding: 0; background: #000; display: flex; flex-direction: column; justify-content: center; }
.player:fullscreen .screen-wrap { flex: 1; aspect-ratio: auto; background: #000; }
.player:fullscreen .screen-wrap video { mix-blend-mode: normal; }
.player:fullscreen .bar { background: #000; padding: 0 16px; }
.toast { position: absolute; left: 16px; top: 16px; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: var(--sign); border: 1px solid var(--rule-2); font: 600 15px/1.2 var(--sans); }
.toast button { min-height: 36px; padding: 0 12px; background: transparent; border: 1px solid var(--rule-2); font-weight: 700; font-size: 14px; }
.toast button:hover { border-color: var(--chalk-2); }
.upnext { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(14, 17, 22, .9); }
.un-sign { width: min(560px, 92%); background: var(--gold); color: var(--ink); }
.un-top { display: flex; align-items: center; gap: 16px; padding: 16px; }
.un-top .pg { --pg: 56px; background: var(--ink); box-shadow: none; }
.un-k { font: 700 15px/1.2 var(--sans); color: var(--ink-2); }
.un-t { margin-top: 4px; font: 700 clamp(19px, 2vw, 26px)/1.15 var(--sans); }
.un-count { margin-left: auto; }
.un-count .fc { --cw: 26px; --ch: 42px; --fs: 26px; background: var(--ink); color: #fff; }
.un-count .fc.fa::before, .un-count .fc.fb::before { background: var(--ink); }
.un-row { display: flex; border-top: 1px solid rgba(11, 11, 11, .25); }
.un-row a, .un-row button { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 52px; background: transparent; border: 0; color: var(--ink); font: 700 16px/1 var(--sans); text-decoration: none; }
.un-row a { background: var(--ink); color: var(--gold); }
.un-row a:hover { color: #fff; }
.un-row button:hover { background: var(--gold-hi); }

.lesson-head { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px 56px; align-items: start; margin-top: clamp(28px, 3.4vw, 48px); }
.lesson-head h1 { font-size: clamp(34px, 4.2vw, 62px); line-height: 1; letter-spacing: -.035em; }
.h1-sub { display: block; margin-top: 10px; font-size: clamp(18px, 1.9vw, 28px); line-height: 1.2; letter-spacing: -.01em; font-weight: 600; color: var(--chalk-2); }
.lesson-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 18px; font-size: 15px; font-weight: 600; color: var(--chalk-3); font-variant-numeric: tabular-nums; }
.lesson-meta .lc { margin-right: -6px; }
.lesson-meta a { color: var(--chalk); font-weight: 700; }
.lesson-head .lede { margin-top: 16px; max-width: 62ch; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; color: var(--chalk-2); }
.lh-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 8px; }
.auto { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--chalk-2); cursor: pointer; }
.auto input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.auto .box { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--rule-2); }
.auto .box .pg { --pg: 22px; background: transparent; box-shadow: none; opacity: 0; }
.auto input:checked + .box { background: var(--chalk); border-color: var(--chalk); }
.auto input:checked + .box .pg { opacity: 1; color: var(--ink); }
.auto input:focus-visible + .box { outline: 3px solid var(--gold); outline-offset: 2px; }

.junction { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 5vw, 72px); align-items: start; }
.j-next { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.j-next > h2 { border-bottom-color: rgba(11, 11, 11, .22); }
.j-next > h2 .pg, .j-next .pg { background: var(--ink); box-shadow: none; }
.jn { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t min" "c min"; column-gap: 16px; align-items: center; padding: 18px 16px 20px; text-decoration: none; }
.jn-t { grid-area: t; font-size: clamp(22px, 2vw, 28px); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.jn-c { grid-area: c; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.jn-min { grid-area: min; display: flex; align-items: baseline; gap: 5px; font-size: 15px; font-weight: 700; }
.jn-min b { font: 700 clamp(48px, 4.6vw, 72px)/.8 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.jn:hover { background: var(--gold-hi); }
.jn:hover .jn-t { text-decoration: underline; }
.jn-alt { padding: 12px 16px 16px; border-top: 1px solid rgba(11, 11, 11, .22); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.jn-alt a { color: var(--ink); font-weight: 700; }
.see-also { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--chalk-3); }
.see-also a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--chalk); font-weight: 700; }

.script { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: clamp(64px, 8vw, 112px); max-width: 860px; }
.script.has-ch { grid-template-columns: minmax(220px, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px); max-width: none; }
.chapters { position: sticky; top: calc(var(--hdr) + 24px); align-self: start; }
.chapters h2, .transcript h2 { font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -.02em; }
.chapters ol { margin-top: 18px; border-top: 1px solid var(--rule); }
.chapters li { border-bottom: 1px solid var(--rule); }
.chapters button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 8px 0; background: none; border: 0; text-align: left; font: 700 15px/1.3 var(--sans); color: var(--chalk-2); }
.chapters button:hover { color: var(--chalk); }
.chapters .ch-t { flex: none; display: grid; place-items: center; min-width: 52px; height: 28px; padding: 0 6px; background: #000; box-shadow: inset 0 0 0 1px #2b323d; color: var(--chalk-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.chapters li.now button { color: var(--chalk); }
.chapters li.now .ch-t { background: var(--gold); color: var(--ink); box-shadow: none; }
.tr-hint { margin-top: 8px; font-size: 15px; color: var(--chalk-3); }
.tr-body {
  position: relative; margin-top: 20px; max-height: min(64vh, 620px); overflow: auto; padding: 4px 24px 40px 0;
  font-size: clamp(17px, 1.3vw, 19px); line-height: 1.75; color: var(--chalk-2); overscroll-behavior: contain;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
}
.tr-body:focus-visible { outline-offset: 6px; }
.tr-body p { max-width: 66ch; }
.tr-body p + p, .tr-body p + .ch { margin-top: 1.1em; }
.tr-body .ch { margin: 1.8em 0 .5em; font-size: 14px; }
.tr-body .ch:first-child { margin-top: 0; }
.tr-body .ch-plain { font: 700 16px/1.3 var(--sans); color: var(--chalk); }
.tr-body .ch button { display: inline-flex; align-items: center; gap: 12px; min-height: 36px; padding: 0; background: none; border: 0; font: 700 15px/1.2 var(--sans); color: var(--chalk); }
.tr-body .ch .ch-t { display: grid; place-items: center; min-width: 48px; height: 26px; background: #000; box-shadow: inset 0 0 0 1px #2b323d; font-size: 12px; color: var(--chalk-2); font-variant-numeric: tabular-nums; }
.tr-body .ch.now .ch-t { background: var(--gold); color: var(--ink); box-shadow: none; }
.synced .tr-body .s { cursor: pointer; color: var(--chalk-2); transition: color .25s, background-color .25s; }
.synced.following .tr-body .s { color: var(--chalk-3); }
.synced .tr-body .s:hover, .synced.following .tr-body .s:hover { color: var(--chalk); }
.synced.following .tr-body .s.past { color: var(--chalk-2); }
.synced .tr-body .s.now { color: #fff; background: #1d232d; box-shadow: 0 0 0 3px #1d232d; }

/* ------------------------------------------------------------ 404 */
.lost-in { max-width: 880px; padding: clamp(56px, 12vh, 140px) 0 0; }
.lost h1 { font-size: clamp(48px, 7.4vw, 108px); line-height: 1.02; letter-spacing: -.045em; }
.lost .lede { margin-top: 22px; font-size: clamp(18px, 1.5vw, 21px); color: var(--chalk-2); max-width: 44ch; }
.lost-sign { margin-top: clamp(32px, 4vw, 48px); padding: 6px; }
.lost-sign li + li { border-top: 1px solid var(--rule); }
.lost-sign a, .lost-sign button {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "pg t" "pg s"; column-gap: 20px; align-items: center;
  width: 100%; padding: 14px 20px 14px 14px; background: none; border: 0; text-align: left; text-decoration: none; color: var(--chalk);
  transition: background-color .2s, color .2s;
}
.lost-sign .pg { grid-area: pg; --pg: 60px; }
.ls-t { grid-area: t; font: 700 clamp(22px, 2.2vw, 30px)/1.1 var(--sans); letter-spacing: -.02em; }
.ls-s { grid-area: s; margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--chalk-3); }
.lost-sign a:hover, .lost-sign button:hover { background: var(--gold); color: var(--ink); }
.lost-sign a:hover .ls-s, .lost-sign button:hover .ls-s { color: var(--ink-2); }
.lost-sign a:hover .pg, .lost-sign button:hover .pg { box-shadow: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1399px) {
  .board { --n-route: 0; }
  .board-cols, .row-go, .ssr { grid-template-columns: var(--w-dest) var(--w-time) var(--w-stat); }
  .board-cols { grid-template-columns: var(--w-dest) var(--w-time) var(--w-stat) var(--w-act); }
  .f-route, .c-route, .s-route { display: none !important; }
  .cstop { grid-template-columns: clamp(64px, 8vw, 104px) 28px minmax(0, 1fr) 90px minmax(150px, 200px); grid-template-areas: "n mark body min screen" "n mark state state screen"; }
  .cs-state { padding-top: 12px; }
}
@media (max-width: 1100px) {
  .db-k { display: none; }
  .db-next { max-width: 24ch; }
  .board { --w-act: 44px; --colgap: 16px; }
  .row-ask { width: 44px; padding: 0; }
  .row-ask .ra-t { display: none; }
  .row-ask .pg { --pg: 42px; }
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero h1 { font-size: clamp(44px, 8vw, 80px); }
  .hero-screen { max-width: 900px; }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .cor-body { grid-template-columns: minmax(0, 1fr); }
  .next-stop { position: static; order: -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 12px 24px; }
  .next-stop .ns-k { grid-column: 1 / -1; }
  .cline { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "blurb" "track" "go"; }
  .cl-go { justify-self: start; }
  .junction { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .j-next { grid-column: 1 / -1; order: -1; }
  .lesson-head { grid-template-columns: minmax(0, 1fr); }
  .lh-actions { flex-direction: row; flex-wrap: wrap; align-items: center; padding-top: 0; }
}
@media (max-width: 900px) {
  .board { --cw: 15px; --ch: 26px; --fs: 14px; --n-dest: 15; --n-time: 3; --n-stat: 14; }
  .ct-long { display: none; } .ct-short { display: inline !important; }
  .find { width: min(300px, 38vw); }
  .topnav a .pg { display: none; }
  .script.has-ch { grid-template-columns: minmax(0, 1fr); }
  .chapters { position: static; }
  .cstop { grid-template-columns: 64px 24px minmax(0, 1fr) 80px; grid-template-areas: "n mark body min" "n mark state state" "n mark screen screen"; }
  .cs-screen { max-width: 360px; margin-top: 16px; }
  .cs-n { font-size: 56px; }
}
@media (max-width: 760px) {
  :root { --band-h: 56px; --dest-h: 64px; }
  body { font-size: 16px; }
  .brand img { width: 118px; }
  .topband { gap: 4px; }
  .topnav { margin-left: auto; }
  .topnav a { padding: 0 10px; font-size: 15px; }
  .topnav a[aria-current="page"]::after { left: 10px; right: 10px; }
  .find { display: none; }
  .find-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: #000; border: 0; box-shadow: inset 0 0 0 1px #2b323d; color: #fff; }
  .find-toggle .pg { --pg: 44px; background: transparent; box-shadow: none; }
  .find-toggle[aria-expanded="true"] { background: var(--chalk); color: var(--ink); }
  .masthead.find-open .find {
    display: flex; position: absolute; left: 0; right: 0; top: 100%; width: auto; height: 56px; margin: 0;
    border: 0; border-bottom: 1px solid var(--rule-2); background: var(--sign); padding: 0 var(--gutter) 0 calc(var(--gutter) - 8px);
  }
  .masthead.find-open .find kbd { display: none; }
  .masthead.find-open .find-results { left: 0; right: 0; width: auto; top: 100%; max-height: 70vh; }
  .db-in { gap: 10px; }
  .db-in > .pg { --pg: 36px; }
  .db-main { flex-direction: column; align-items: flex-start; gap: 5px; }
  .db-dest { gap: 8px; width: 100%; }
  .db-k { display: none; }
  .db-name { position: relative; padding: 2px 0; font-size: 20px; line-height: 1.1; }
  .db-name::after { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -6px; }
  .db-counts { gap: 12px; }
  .db-c { font-size: 13px; gap: 6px; }
  .dest-band .fc { --cw: 15px; --ch: 22px; --fs: 14px; }
  .db-next { padding-left: 10px; border-left: 0; }
  .db-next .db-nk, .db-next .db-nn { display: none; }
  .db-clear { width: 40px; height: 40px; }

  .hero { padding-top: 28px; gap: 28px; }
  .hero h1 { font-size: clamp(40px, 11.6vw, 64px); }
  .hero-actions .sign-btn { flex: 1 1 100%; }
  .hero-actions .quiet-btn { min-height: 56px; max-width: none; }
  .cap-band { font-size: 14px; }
  .cap-band .pg { --pg: 36px; }

  .board { --cw: 15px; --ch: 24px; --fs: 13px; --n-dest: 13; --n-time: 3; --n-stat: 14; --r-dest: 3; --colgap: 10px; --w-act: 44px; padding: 0 12px 6px; margin: 0 calc(-1 * var(--gutter) + 4px); }
  .board-top { padding: 18px 0 14px; }
  .board-cols { grid-template-columns: var(--w-dest) var(--w-time) var(--w-act); }
  .board-cols .c-stat { display: none; }
  .row-go { grid-template-columns: var(--w-dest) var(--w-time); grid-template-areas: "dest time" "stat stat"; row-gap: 5px; }
  .row-go .f-dest { grid-area: dest; } .row-go .f-time { grid-area: time; } .row-go .f-stat { grid-area: stat; }
  .row-go .f-stat .fc { --cw: 13px; --ch: 20px; --fs: 11.5px; }
  .ssr { grid-template-columns: var(--w-dest) var(--w-time); }
  .ssr .s-stat { grid-column: 1 / -1; }

  .goal { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .cor-head { grid-template-columns: auto minmax(0, 1fr); }
  .cor-head > .pg { --pg: 44px; }
  .cor-act { grid-column: 1 / -1; justify-content: flex-start; }
  .next-stop { grid-template-columns: minmax(0, 1fr); }
  .stop { grid-template-columns: 44px 20px minmax(0, 1fr); grid-template-areas: "n mark body" "n mark s"; column-gap: 12px; min-height: 0; padding: 12px 0; }
  .st-n { grid-area: n; font-size: 30px; } .st-mark { grid-area: mark; } .st-body { grid-area: body; padding: 0; } .st-s { grid-area: s; margin-top: 6px; }
  .st-t { font-size: 17px; }

  .cl-ends { font-size: 13px; }
  .request-row { flex-direction: column; }
  .request-row input:not(.hp) { flex: none; height: 60px; border-right: 1px solid var(--rule-2); border-bottom: 0; }
  .request-row .sign-btn { min-height: 60px; }
  .request-row .sign-btn .pg { --pg: 48px; }

  .cstop { grid-template-columns: 48px 20px minmax(0, 1fr); grid-template-areas: "n mark body" "n mark min" "n mark state" "n mark screen"; column-gap: 12px; padding: 22px 0; }
  .cs-n { font-size: 40px; }
  .cs-mark { width: 16px; height: 16px; margin-top: 2px; }
  .cs-min { margin-top: 14px; }
  .cs-min b { font-size: 36px; }
  .cs-d { flex-basis: auto; margin: 0 0 0 10px; }
  .cs-state { padding-top: 8px; }
  .cs-screen { max-width: none; margin-top: 14px; }
  .cstop:not(.is-next) .cs-screen { display: none; }
  .course-actions .sign-btn { flex: 1 1 100%; }
  .course-actions .quiet-btn { min-height: 56px; }

  .player { padding-top: 0; margin: 0 calc(-1 * var(--gutter)); width: auto; }
  .bar { padding: 6px 8px; gap: 4px; }
  .time { min-width: 0; font-size: 13px; padding: 0 4px; }
  .ctl.txt { min-width: 44px; padding: 0 6px; }
  .player:not(.started) .screen-wrap { margin-bottom: 44px; }
  .bigplay.sign-lg { top: 100%; bottom: auto; right: 0; min-height: 44px; font-size: 15px; padding: 3px 12px 3px 3px; gap: 10px; white-space: nowrap; }
  .bigplay.sign-lg .pg { --pg: 34px; }
  .bigplay .sb-t { flex-direction: row; align-items: baseline; gap: 8px; }
  .bigplay .sb-sub { font-size: 13px; }
  .cs-state.blank { display: none; }
  .sign-route { min-height: 0; flex-wrap: wrap; gap: 12px 16px; padding: 8px 16px 12px 8px; font-size: 21px; }
  .sign-route .pg { --pg: 56px; }
  .sign-route .sr-t { flex: 1; max-width: none; }
  .sign-route .sr-n { flex-basis: 100%; margin: 0; padding: 10px 0 0 4px; border-left: 0; border-top: 1px solid rgba(11, 11, 11, .25); }
  .sr-num b { font-size: 44px; }
  .junction { grid-template-columns: minmax(0, 1fr); }
  .un-top { padding: 12px; gap: 12px; }
  .un-top .pg { --pg: 44px; }
  .un-count .fc { --cw: 20px; --ch: 32px; --fs: 20px; }
}
@media (max-width: 380px) {
  .board { --cw: 13px; --fs: 12px; }
  .row-go .f-stat .fc { --cw: 12px; --fs: 11px; }
  .brand img { width: 104px; }
  .topnav a { padding: 0 7px; }
}

/* ------------------------------------------------------------ reduced motion: every flip and draw is instant */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
.cstop.is-dest .cs-mark { border-color: var(--gold); }
