/* Token by Token styles. Ported from the approved design prototype, then extended for the full app.
   Layout: app shell. Sticky top bar, phone tab bar. Lessons read in a 66ch column with a part rail on wide screens.
   Identity: every part owns a hue; tokens, chips and progress take the hue of the part they belong to. */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #e9edf5;
  --ink: #131a2b;
  --ink-2: #4a556f;
  --ink-3: #5e6880;
  --line: #d9dfea;
  --accent: #f0a500;
  --accent-ink: #8a5600;
  --accent-soft: #fff1cc;
  --focus: #8a5600; /* focus ring: accent-ink in light mode, since gold on white is only 1.9:1 */
  --good: #1f8a5b;
  --good-soft: #dcf3e8;
  --warn: #b26a00;
  --warn-soft: #fdecc8;
  --bad: #c2384b;
  --bad-soft: #fbe1e5;
  --chip-l: 0.93; --chip-c: 0.055; --chipink-l: 0.40; --chipink-c: 0.13; --dot-l: 0.61; --dot-c: 0.15;
  --shadow: 0 1px 2px rgba(19,26,43,.06), 0 8px 24px -12px rgba(19,26,43,.18);
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Body Digits", "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --r-s: 10px; --r: 14px; --r-l: 20px; /* the only three corner radii, plus pills and circles */
  --top-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c111d; --surface: #141b2b; --surface-2: #1c2538; --ink: #e9edf6; --ink-2: #aab3c8; --ink-3: #939cb2; --line: #273149;
    --accent: #ffc23d; --accent-ink: #ffd27a; --accent-soft: #3a2e10; --focus: #ffc23d;
    --good: #4cc993; --good-soft: #12352a; --warn: #f2b34c; --warn-soft: #3a2c10; --bad: #f2788a; --bad-soft: #3d1a22;
    --chip-l: 0.32; --chip-c: 0.07; --chipink-l: 0.88; --chipink-c: 0.09; --dot-l: 0.74; --dot-c: 0.14;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c111d; --surface: #141b2b; --surface-2: #1c2538; --ink: #e9edf6; --ink-2: #aab3c8; --ink-3: #939cb2; --line: #273149;
  --accent: #ffc23d; --accent-ink: #ffd27a; --accent-soft: #3a2e10; --focus: #ffc23d;
  --good: #4cc993; --good-soft: #12352a; --warn: #f2b34c; --warn-soft: #3a2c10; --bad: #f2788a; --bad-soft: #3d1a22;
  --chip-l: 0.32; --chip-c: 0.07; --chipink-l: 0.88; --chipink-c: 0.09; --dot-l: 0.74; --dot-c: 0.14;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; }
[hidden] { display: none !important; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-s); }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--f-mono); }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Part hue system */
[data-h] { --h: 250; }
/* A theme can squeeze or shift the part hues (--hk, --ho) and set how deep the Next button is (--deep-l, --deep-c). */
.hue { --hh: calc(var(--h) * var(--hk, 1) + var(--ho, 0)); --chip: oklch(var(--chip-l) var(--chip-c) var(--hh)); --chipink: oklch(var(--chipink-l) var(--chipink-c) var(--hh)); --dot: oklch(var(--dot-l) var(--dot-c) var(--hh)); --deep: oklch(var(--deep-l, 0.5) var(--deep-c, 0.13) var(--hh)); }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { height: var(--top-h); display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; background: none; border: 0; padding: 0; }
.brand-mark { display: inline-flex; gap: 2px; }
.brand-mark i { display: block; width: 7px; height: 20px; border-radius: 3px; }
.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav button, .iconbtn { background: none; border: 0; padding: 8px 12px; border-radius: var(--r-s); color: var(--ink-2); font-weight: 700; font-size: 15px; }
.topnav button:hover, .iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.topnav button[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.topbar .spacer { flex: 1; }
.iconbtn { display: inline-flex; align-items: center; gap: 8px; padding: 8px; }
.iconbtn svg { width: 20px; height: 20px; }
.progress-pill { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; background: none; border: 0; padding: 6px 10px; margin-right: -4px; border-radius: 999px; min-height: 44px; }
.progress-pill:hover { background: var(--surface-2); color: var(--ink); }
.progress-pill .streak { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-ink); font-weight: 700; }
.progress-pill .streak svg { width: 18px; height: 18px; color: oklch(0.7 0.19 45); }
.progress-pill .streak.cold svg { color: var(--ink-3); }
.ring { width: 26px; height: 26px; }
.ring circle { fill: none; stroke-width: 4; }
.ring .bgc { stroke: var(--line); }
.ring .fgc { stroke: var(--dot, var(--ink)); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset .6s; }

/* Phone tab bar */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in oklab, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabbar nav { display: grid; grid-template-columns: repeat(4, 1fr); }
.tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11.5px; font-weight: 700; color: var(--ink-3); border-radius: var(--r-s); }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--ink); }
.tabbar button[aria-current="page"] svg { color: var(--ink); }

@media (max-width: 760px) {
  .topnav, .progress-pill .lbl { display: none; }
  .topbar .wrap { gap: 12px; }
  .tabbar { display: block; }
  main { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body { font-size: 16.5px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 16px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--on-accent, #1b1300); border-color: var(--accent); }
/* Next after a finished lesson: filled with the part color. */
.btn.go { background: var(--deep); color: #fff; border-color: var(--deep); text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.btn.accent { background: var(--accent); color: var(--on-accent, #1b1300); border-color: var(--accent); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- HOME ---------- */
.hero { padding-block: 56px 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6.2vw, 74px); font-weight: 800; letter-spacing: -0.035em; line-height: .98; }
.hero h1 .tk { display: inline-block; padding: 0 .12em; margin: 0 -.02em; border-radius: .16em; background: var(--chip); color: var(--chipink); }
.hero .lede { font-size: 20px; color: var(--ink-2); max-width: 34ch; margin-top: 22px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; color: var(--ink-3); font-size: 14px; }
.hero .meta b { color: var(--ink); font-family: var(--f-mono); font-weight: 600; }

.gen { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.gen-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 var(--bad); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--bad) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.gen-text { min-height: 128px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px 4px; font-family: var(--f-mono); font-size: 17px; }
.tok { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: var(--r-s); background: var(--chip); color: var(--chipink); white-space: pre; animation: tokin .35s cubic-bezier(.2,.9,.3,1.3); }
@keyframes tokin { from { transform: translateY(6px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.caret { display: inline-block; width: 10px; height: 26px; background: var(--ink); border-radius: 2px; animation: blink 1s steps(2) infinite; align-self: center; }
@keyframes blink { 50% { opacity: 0; } }
.gen-cands { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 7px; }
.gen-cands .lbl { font-size: 13px; color: var(--ink-3); margin-bottom: 2px; }
.cand { display: grid; grid-template-columns: 110px 1fr 48px; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 14px; }
.cand .bar { height: 10px; border-radius: var(--r-s); background: var(--surface-2); overflow: hidden; }
.cand .bar i { display: block; height: 100%; background: var(--ink-3); border-radius: var(--r-s); transition: width .35s; }
.cand.win .bar i { background: var(--accent); }
.cand.win .w { font-weight: 600; }
.cand .p { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gen-foot { margin-top: 14px; font-size: 14px; color: var(--ink-2); }

.section { padding-block: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.025em; }
.section-head p { color: var(--ink-2); max-width: 52ch; margin-top: 8px; }

.continue { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; text-align: left; width: 100%; box-shadow: var(--shadow); }
.continue .num { font-family: var(--f-mono); font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: var(--r-s); background: var(--chip); color: var(--chipink); }
.continue .t { flex: 1; min-width: 0; }
.continue .t b { display: block; font-family: var(--f-display); font-size: 19px; line-height: 1.2; }
.continue .t span { color: var(--ink-3); font-size: 14px; }
.continue .go { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #1b1300); display: grid; place-items: center; flex: none; }

/* Path strip: the course as a context window of tokens */
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pcard { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 172px; transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--dot); }
.pcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--dot); }
.pcard .n { font-family: var(--f-mono); font-size: 13px; color: var(--chipink); background: var(--chip); padding: 2px 8px; border-radius: var(--r-s); align-self: flex-start; font-weight: 600; }
.pcard h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.pcard .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dots { display: flex; gap: 3px; flex-wrap: wrap; }
.dots i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); }
.dots i.done { background: var(--dot); }

.layers { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.layer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; align-content: start; }
.layer .lvl { display: flex; gap: 4px; }
.layer .lvl i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.layer .lvl i.on { background: var(--ink-2); }
.layer h3 { font-size: 21px; }
.layer p { color: var(--ink-2); font-size: 15.5px; }
.layer .ex { font-size: 14.5px; border-left: 3px solid var(--line); padding-left: 12px; color: var(--ink); }
.layer .ex.m { font-family: var(--f-mono); font-size: 13.5px; }

.demos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dcard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: transform .18s, box-shadow .18s; }
.dcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dcard .viz { height: 74px; border-radius: var(--r-s); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.dcard .viz svg { width: 100%; height: 100%; }
.dcard h3 { font-size: 17px; font-weight: 700; }
.dcard p { font-size: 14px; color: var(--ink-2); }
.dcard .tag { margin-top: auto; font-size: 12px; font-family: var(--f-mono); letter-spacing: .04em; color: var(--ink-3); }
.dcard .tag.live { color: var(--good); }
.dcard.featured { grid-column: span 2; }
.dcard.featured .viz { height: 120px; }

.pace { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 8px; }
.stat .big { font-family: var(--f-display); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .big small { font-size: 18px; color: var(--ink-3); font-weight: 600; }
.stat p { color: var(--ink-2); font-size: 15px; }
.stat .growbar { height: 10px; border-radius: var(--r-s); background: var(--surface-2); position: relative; overflow: hidden; }
.stat .growbar i { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-s); background: var(--ink-2); width: 0; transition: width 1.6s cubic-bezier(.2,.8,.2,1); }
.draft { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }

footer { border-top: 1px solid var(--line); margin-top: 32px; }
footer .wrap { padding-block: 24px 32px; color: var(--ink-3); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 1000px) {
  .strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .demos { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
/* Two columns: the copy spans the card's full height. The eyebrow lines up with the card's top line and the stats
   with its last line; the leftover space is shared between the headline, the lede and the buttons. */
@media (min-width: 861px) {
  .hero-grid { align-items: stretch; }
  .hero-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding-block: 23px 23px; }
  .hero-copy .lede, .hero-copy .ctas, .hero-copy .welcome { margin-top: 0; }
  .hero .gen { display: flex; flex-direction: column; }
  .hero .gen-foot { margin-top: auto; padding-top: 14px; }
  .hero .gen-foot a { padding-block: 0; }
  /* The first-visit questions make the copy taller than the card: then both just start at the top. */
  .hero-grid.has-welcome { align-items: start; }
  .hero-grid.has-welcome .hero-copy { padding-block: 23px 0; }
  .hero-grid.has-welcome .hero-copy .welcome { margin-top: 26px; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-block: 32px 16px; }
  .layers, .pace { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .strip { grid-template-columns: 1fr; }
  .pcard { min-height: 0; }
  .demos { grid-template-columns: 1fr; }
  .dcard.featured { grid-column: auto; }
  .cand { grid-template-columns: 92px 1fr 44px; }
  .hero .lede { font-size: 18px; }
}

/* ---------- PATH ---------- */
.path-head { padding-block: 36px 12px; }
.path-head h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.03em; }
.path-head p { color: var(--ink-2); margin-top: 10px; max-width: 60ch; }
.timeline { position: relative; display: grid; gap: 14px; padding-block: 16px 40px; }
.prow { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.prow .node { position: relative; display: grid; justify-items: center; height: 100%; }
.prow .node b { width: 48px; height: 48px; border-radius: var(--r); background: var(--chip); color: var(--chipink); display: grid; place-items: center; font-family: var(--f-mono); font-size: 18px; font-weight: 600; z-index: 1; border: 2px solid var(--dot); }
.prow .node::after { content: ""; position: absolute; top: 52px; bottom: -18px; width: 2px; background: linear-gradient(var(--dot), var(--line)); }
.prow:last-child .node::after { display: none; }
.pbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pbox > button { width: 100%; text-align: left; background: none; border: 0; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; }
.pbox h2 { font-size: 22px; font-weight: 700; }
.pbox .goal { color: var(--ink-2); font-size: 15px; grid-column: 1; }
.pbox .side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pbox .chev { width: 20px; height: 20px; transition: transform .2s; }
.pbox.open .chev { transform: rotate(180deg); }
.llist { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 2px; }
.llist button { width: 100%; background: none; border: 0; text-align: left; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 10px 8px; border-radius: var(--r-s); }
.llist button:hover { background: var(--surface-2); }
.llist .ln { font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); }
.llist .lt { font-weight: 700; line-height: 1.3; }
.llist .ld { display: block; font-weight: 400; color: var(--ink-3); font-size: 14px; line-height: 1.4; margin-top: 2px; }
.llist .lm { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; padding: 3px 7px; border-radius: var(--r-s); background: var(--surface-2); color: var(--ink-2); text-transform: uppercase; }
.badge.ready { background: var(--good-soft); color: var(--good); }
.check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.check.done { background: var(--dot); border-color: var(--dot); color: #fff; }
.check svg { width: 12px; height: 12px; }
@media (max-width: 600px) {
  .prow { grid-template-columns: 40px 1fr; gap: 10px; }
  .prow .node b { width: 38px; height: 38px; font-size: 15px; border-radius: var(--r-s); }
  .prow .node::after { top: 42px; }
  .pbox > button { grid-template-columns: 1fr; }
  .pbox .side { grid-row: auto; grid-column: 1; }
  .llist button { grid-template-columns: 36px 1fr; }
  .llist .lm { grid-column: 2; }
}

/* ---------- LESSON ---------- */
.readbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h)); z-index: 15; height: 3px; background: transparent; }
.readbar i { display: block; height: 100%; width: 0; background: var(--dot); }
.lesson-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding-block: 28px 48px; }
.rail { position: sticky; top: calc(var(--top-h) + 28px); align-self: start; max-height: calc(100vh - var(--top-h) - 56px); overflow: auto; }
.rail .ptitle { font-family: var(--f-display); font-weight: 700; font-size: 17px; margin: 6px 0 12px; line-height: 1.2; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail button { width: 100%; background: none; border: 0; text-align: left; display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-s); font-size: 14.5px; line-height: 1.35; color: var(--ink-2); }
.rail button:hover { background: var(--surface-2); }
.rail button[aria-current="true"] { background: var(--chip); color: var(--chipink); font-weight: 700; }
.rail .rn { font-family: var(--f-mono); font-size: 12px; padding-top: 2px; min-width: 26px; }
.lesson { max-width: 700px; min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--ink-3); }
.crumbs button { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.lesson h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.03em; margin-top: 14px; }
.lesson .bigidea { margin-top: 18px; font-size: 21px; line-height: 1.45; color: var(--ink); font-family: var(--f-display); font-weight: 400; max-width: 34em; }
.lesson .lmeta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; color: var(--ink-3); font-size: 14px; align-items: center; }

.depth { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; width: fit-content; max-width: 100%; }
.depth .dl { font-size: 13px; color: var(--ink-3); padding-left: 10px; }
.seg { display: flex; gap: 2px; }
.seg button { background: none; border: 0; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-2); display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.seg button .pips { display: inline-flex; gap: 2px; }
.seg button .pips i { width: 4px; height: 12px; border-radius: 2px; background: currentColor; opacity: .3; }
.seg button .pips i.on { opacity: 1; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 520px) { .depth { border-radius: var(--r); width: 100%; } .depth .dl { display: none; } .seg { width: 100%; } .seg button { flex: 1; justify-content: center; padding: 9px 6px; font-size: 13px; } }

.prose { margin-top: 30px; display: grid; gap: 18px; }
.prose p { max-width: 66ch; }
.prose .demo .ctl-label { max-width: none; }
.prose h2 { font-size: 26px; font-weight: 700; margin-top: 18px; }
.term { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted; text-decoration-color: var(--dot, var(--ink-3)); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: help; }
.term:hover { background: var(--chip, var(--surface-2)); border-radius: 3px; }
/* "So that's why" and other asides are summaries to read, so they take the part hue, not gold. */
.aside { border-radius: var(--r); padding: 16px 18px; background: var(--chip, var(--surface-2)); color: var(--ink); display: grid; gap: 4px; max-width: 66ch; border-left: 4px solid var(--dot, var(--line)); }
.aside b { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--chipink, var(--ink-2)); }

.deep { border-top: 1px solid var(--line); }
.deep:not(:has(+ .deep)) { border-bottom: 1px solid var(--line); }
.deep > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 2px; cursor: pointer; }
.deep > summary::-webkit-details-marker { display: none; }
.deep > summary .ic { width: 32px; height: 32px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--surface-2); flex: none; }
.deep > summary .ic svg { width: 18px; height: 18px; }
.deep > summary b { font-family: var(--f-display); font-size: 18px; color: var(--ink); }
.deep > summary span { color: var(--ink-3); font-size: 14px; display: block; }
.deep > summary .chev { margin-left: auto; width: 20px; height: 20px; transition: transform .2s; flex: none; }
.deep[open] > summary .chev { transform: rotate(180deg); }
.deep .body { padding: 4px 2px 22px; display: grid; gap: 14px; }
.deep .body p { font-size: 16px; }
.deep.math > summary .ic { background: var(--ink); color: var(--bg); }
.formula { font-family: var(--f-mono); font-size: 16px; background: var(--surface-2); border-radius: var(--r-s); padding: 14px 16px; overflow-x: auto; white-space: nowrap; }
.formula sup, .formula sub { font-size: 11px; }
.tbl-wrap { overflow-x: auto; }
table.nums { border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; min-width: 420px; width: 100%; }
table.nums th, table.nums td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
table.nums th:first-child, table.nums td:first-child { text-align: left; }
table.nums th { font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; color: var(--ink-3); font-weight: 400; text-transform: uppercase; }

/* Quiz */
.quiz { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--dot, var(--line)); border-radius: var(--r-l); padding: 22px; display: grid; gap: 14px; margin-top: 12px; }
.quiz > .eyebrow:first-child { color: var(--chipink, var(--ink-3)); }
.quiz h3 { font-size: 21px; }
.qcheck { margin: 22px 0; border-top-width: 1px; border-left: 4px solid var(--dot, var(--line)); padding: 18px 20px; gap: 12px; }
.qcheck h3 { font-size: 18px; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.4; }
.opt:hover { border-color: var(--ink-3); }
.opt .k { font-family: var(--f-mono); font-size: 13px; width: 24px; height: 24px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--surface-2); flex: none; }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.right .k { background: var(--good); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .k { background: var(--bad); color: #fff; }
.feedback { font-size: 15.5px; border-radius: var(--r-s); padding: 12px 14px; }
.feedback.ok { background: var(--good-soft); }
.feedback.no { background: var(--bad-soft); }

.lnav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.lnav button { text-align: left; background: none; border: 0; border-top: 2px solid var(--line); border-radius: 0; padding: 14px 4px; display: grid; gap: 2px; min-width: 0; }
.lnav button:hover { border-top-color: var(--dot, var(--ink-3)); }
.lnav button.next.go { background: var(--deep); color: #fff; border: 0; border-radius: var(--r); padding: 16px 18px; box-shadow: 0 8px 20px -10px var(--deep); }
.lnav button.next.go small { color: inherit; opacity: .85; }
.lnav button.next.go b { text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.lnav button.next { text-align: right; }
.lnav small { color: var(--ink-3); font-size: 13px; }
.lnav b { font-family: var(--f-display); font-size: 17px; line-height: 1.25; }
.placeholder { margin-top: 28px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--r-l); padding: 24px; display: grid; gap: 12px; }
.placeholder .row { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 960px) { .lesson-grid { grid-template-columns: 1fr; gap: 0; padding-top: 18px; } .rail { display: none; } }
@media (max-width: 520px) { .lnav { grid-template-columns: 1fr; } .lnav button.next { text-align: left; } }

/* ---------- DEMO SHELL ---------- */
.demo { background: color-mix(in oklab, var(--surface) 93%, var(--dot, var(--ink-3))); border: 0; border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; margin-block: 8px; }
.demo-head { display: flex; justify-content: space-between; gap: 6px 12px; align-items: center; padding: 14px 18px; background: var(--chip, var(--surface-2)); flex-wrap: wrap; }
.demo-head .t { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 17px; }
.demo-head .t svg { width: 20px; height: 20px; color: var(--chipink, var(--ink-2)); }
.demo-head .hint { font-size: 13.5px; color: var(--ink-3); }
.demo-body { padding: 18px; display: grid; gap: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg); border: 1.5px solid var(--line); padding: 7px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.ctl-label { font-size: 13px; font-family: var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; gap: 10px; }
.ctl-label output { color: var(--ink); font-weight: 600; text-transform: none; letter-spacing: 0; }

/* Next-word guesser */
.prompt-line { font-family: var(--f-mono); font-size: 20px; line-height: 1.5; padding: 14px 16px; border-radius: var(--r-s); background: var(--bg); border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 64px; }
.prompt-line .picked { background: var(--accent); color: var(--on-accent, #1b1300); padding: 1px 8px; border-radius: var(--r-s); animation: tokin .4s cubic-bezier(.2,.9,.3,1.3); }
/* A word and the punctuation after it stay together. */
.prompt-line .pgrp { display: inline-flex; gap: 2px; }
/* Earlier picks fade back so the newest word stands out. */
.prompt-line .picked:not(.last) { background: color-mix(in oklch, var(--accent) 30%, transparent); color: var(--ink); animation: none; }
.prompt-line .q { color: var(--ink-3); border: 1.5px dashed var(--ink-3); border-radius: var(--r-s); padding: 0 10px; }
.bars { display: grid; gap: 6px; }
.brow { display: grid; grid-template-columns: 120px 1fr 56px; gap: 12px; align-items: center; font-family: var(--f-mono); font-size: 14.5px; border-radius: var(--r-s); padding: 2px 4px; transition: background .2s; }
.brow .w { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .track { position: relative; height: 18px; background: var(--surface-2); border-radius: var(--r-s); overflow: hidden; }
.brow .fill { position: absolute; inset: 0 auto 0 0; background: var(--ink-3); border-radius: var(--r-s); transition: width .28s ease; }
.brow .tally { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; padding-left: 4px; }
.brow .tally i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--surface); animation: tokin .3s; }
.brow .p { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.brow.top .fill { background: var(--ink); }
.brow.hit { background: var(--accent-soft); }
.brow.hit .fill { background: var(--accent); }
.temp-row { display: grid; gap: 8px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, oklch(0.7 0.12 230), var(--accent), oklch(0.65 0.2 25)); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, oklch(0.7 0.12 230), var(--accent), oklch(0.65 0.2 25)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); margin-top: -10px; box-shadow: var(--shadow); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
input.plain[type="range"]::-webkit-slider-runnable-track { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
input.plain[type="range"]::-moz-range-track { background: var(--surface-2); }
.scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.readout { font-size: 14.5px; color: var(--ink-2); min-height: 1.5em; }
@media (max-width: 520px) { .brow { grid-template-columns: 92px 1fr 48px; gap: 8px; font-size: 13.5px; } .prompt-line { font-size: 17px; } }

/* Will it run */
.wir { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 0; }
.wir .inputs { padding: 18px; display: grid; gap: 20px; align-content: start; border-right: 1px solid var(--line); }
.wir .result { padding: 18px; display: grid; gap: 16px; align-content: start; background: var(--bg); min-width: 0; }
.devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.dev { text-align: left; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; align-items: center; }
.dev svg { width: 26px; height: 26px; grid-row: span 2; color: var(--ink-2); }
.dev b { font-size: 14.5px; line-height: 1.2; }
.dev span { font-size: 12.5px; color: var(--ink-3); line-height: 1.25; }
.dev[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.dev[aria-pressed="true"] svg { color: var(--accent-ink); }
.sizes { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); margin-top: -2px; }
.sizes span.on { color: var(--ink); font-weight: 600; }
.model-desc { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.verdict { display: flex; gap: 14px; align-items: center; }
.verdict .vi { width: 52px; height: 52px; border-radius: var(--r); display: grid; place-items: center; flex: none; }
.verdict .vi svg { width: 28px; height: 28px; }
.verdict b { font-family: var(--f-display); font-size: 26px; line-height: 1.1; display: block; letter-spacing: -0.02em; }
.verdict span { font-size: 14.5px; color: var(--ink-2); }
.v-good .vi { background: var(--good-soft); color: var(--good); }
.v-warn .vi { background: var(--warn-soft); color: var(--warn); }
.v-bad .vi { background: var(--bad-soft); color: var(--bad); }
.mem { display: grid; gap: 6px; }
.mem .mh { display: flex; flex-wrap: wrap; justify-content: space-between; font-size: 13px; color: var(--ink-3); gap: 2px 8px; font-variant-numeric: tabular-nums; }
.mem .mh span:last-child { white-space: nowrap; margin-left: auto; }
.mem .mh b { color: var(--ink); font-weight: 700; }
.membar { position: relative; height: 34px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: flex; }
.membar i { height: 100%; transition: width .45s cubic-bezier(.2,.8,.2,1); position: relative; }
.membar i.w { background: var(--mem-w); }
.membar i.k { background: var(--mem-kv); }
.membar i.o { background: var(--ink-3); opacity: .55; }
.membar i.over { background: repeating-linear-gradient(135deg, var(--bad) 0 6px, color-mix(in oklab, var(--bad) 60%, transparent) 6px 12px); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.speed { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.speed .num { font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.speed .num small { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin-top: 4px; }
.speed .desc { font-size: 14.5px; color: var(--ink-2); }
.speed .stream { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 14px; line-height: 1.5; min-height: 4.5em; border-top: 1px dashed var(--line); padding-top: 10px; color: var(--ink); overflow-wrap: anywhere; }
.speed .stream::after { content: "▍"; color: var(--accent-ink); animation: blink 1s steps(2) infinite; }
.tips { display: grid; gap: 6px; font-size: 14.5px; }
.tips button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 9px 12px; display: flex; gap: 10px; align-items: center; }
.tips button:hover { border-color: var(--ink-3); }
.tips button b { color: var(--accent-ink); font-family: var(--f-mono); font-size: 12px; }
.fineprint { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 820px) { .wir { grid-template-columns: 1fr; } .wir .inputs { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 400px) { .devices { grid-template-columns: 1fr; } }

/* ---------- PLAYGROUND & GLOSSARY ---------- */
.page-head { padding-block: 36px 20px; }
.page-head h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.03em; }
.page-head p { color: var(--ink-2); margin-top: 10px; max-width: 62ch; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 16px; max-width: 520px; margin-top: 18px; }
.search svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search input { border: 0; background: none; font: inherit; color: var(--ink); padding: 10px 0; width: 100%; outline: none; }
.search:focus-within { border-color: var(--ink); }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding-bottom: 40px; }
.gitem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.gitem h3 { font-size: 19px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.gitem h3 small { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.gitem p { color: var(--ink-2); font-size: 15.5px; }
.empty { color: var(--ink-3); padding: 20px 0; }
@media (max-width: 700px) { .gloss { grid-template-columns: 1fr; } }

/* Definition popover / sheet */
.pop { position: fixed; z-index: 50; width: min(340px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 20px 50px -20px rgba(0,0,0,.45); padding: 16px 18px; display: grid; gap: 8px; animation: popin .18s ease-out; }
@keyframes popin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pop h4 { font-size: 20px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pop p { font-size: 15.5px; color: var(--ink-2); line-height: 1.5; }
.pop .x { background: var(--surface-2); border: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.pop .more { font-size: 14px; background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; justify-self: start; }
@media (max-width: 760px) {
  .pop { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%; border-radius: var(--r-l) var(--r-l) 0 0; padding: 18px max(20px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
}
.scrim { position: fixed; inset: 0; z-index: 49; background: rgba(8,12,20,.35); }
@media (min-width: 761px) { .scrim { background: transparent; } }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); animation: popin .2s; white-space: nowrap; }
@media (max-width: 760px) { .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }

.view-enter { animation: viewin .35s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- APP ADDITIONS ---------- */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r-s); }
.skip:focus { left: 8px; }
main:focus { outline: none; }
.boot { padding: 80px 16px; text-align: center; color: var(--ink-3); }
.linkbtn { background: none; border: 0; padding: 10px 0; margin-block: -10px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; font-size: inherit; margin-left: 6px; }
.linkbtn:hover { color: var(--ink); }
.btn.ghost { border-color: transparent; background: none; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.badge.draft { background: var(--surface-2); color: var(--ink-3); }
.badge.muted { opacity: .55; }
.check.sm { margin-left: auto; width: 16px; height: 16px; }
.rail-back { all: unset; cursor: pointer; color: var(--ink-3); font-size: 13px; }
.rail-back:focus-visible { outline: 3px solid var(--focus); border-radius: 4px; }
.bigidea.muted { color: var(--ink-2); }
.lref { color: var(--chipink, var(--ink)); font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--dot, var(--ink-3)) 60%, transparent); text-underline-offset: 3px; }
.ev { display: inline-block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--r-s); vertical-align: 2px; margin: 0 2px; }
.ev-doc { background: var(--good-soft); color: var(--good); }
.ev-rep { background: var(--warn-soft); color: var(--warn); }
.ev-unk { background: var(--surface-2); color: var(--ink-3); }
.plist { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; max-width: 66ch; }
.plist li::marker { color: var(--dot, var(--ink-3)); }
.fig { margin: 0; display: grid; gap: 8px; }
.fig svg { width: 100%; height: auto; }
.fig figcaption { font-size: 14px; color: var(--ink-3); }
table.nums.text td, table.nums.text th { text-align: left; }
/* Tables marked cards: one card per row on narrow screens, each cell labelled with its column. */
@media (max-width: 640px) {
  table.nums.cards { min-width: 0; }
  table.nums.cards thead { display: none; }
  table.nums.cards tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.nums.cards td { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 3px 0; border: 0; text-align: left; }
  table.nums.cards td::before { content: attr(data-label); font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
  table.nums.cards td:first-child { display: block; font-weight: 700; font-size: 16px; padding-bottom: 4px; }
  table.nums.cards td:first-child::before { content: none; }
  table.nums.cards td:empty { display: none; }
}
.draftnote { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; max-width: 66ch; color: var(--ink-2); background: color-mix(in oklab, var(--surface) 60%, transparent); }
.draftnote .eyebrow { color: var(--accent-ink); }
.quiz.finish h3 { font-size: 19px; }
.recap { background: var(--chip); color: var(--chipink); border-radius: var(--r-l); padding: 22px; display: grid; gap: 10px; margin-top: 8px; }
.recap .eyebrow { color: inherit; opacity: .8; }
.recap h3 { font-size: 22px; }
.recap ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--ink); }
.recap .btn { justify-self: start; margin-top: 6px; }
.lsources { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 4px; scroll-margin-top: 80px; }
.lsources summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; list-style: none; }
.lsources summary::-webkit-details-marker { display: none; }
.lsources summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .2s; margin-right: 2px; }
.lsources[open] summary::before { transform: rotate(45deg); }
.lsources summary .n { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.lsources ol { margin: 4px 0 8px; padding-left: 1.4em; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; }
.lsources a { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.lsources span { color: var(--ink-3); }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.pop-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pop .more.quiet { color: var(--ink-3); font-weight: 400; }
.dcard.soon { opacity: .72; }
.dcard.soon .viz { filter: grayscale(.6); }
.demo-soon .demo-body { padding-block: 14px; }
.demo-page { padding-bottom: 8px; }
.demo-page-head .backbtn { min-height: 44px; padding: 10px 18px 10px 14px; }
.demo-page-head .demo-count { margin-top: 18px; }
.demo-page-head h1 { margin-top: 6px; }
.demo-nav { margin: 24px 0 40px; }
.dcard { scroll-margin-top: 90px; }
.demo-page-head .btn svg { width: 18px; height: 18px; }
.actions .fineprint { flex: 1 1 220px; }

/* Reference tabs */
.reftabs { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; max-width: 100%; overflow-x: auto; }
.reftabs button { background: none; border: 0; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.reftabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.refbody { padding-bottom: 40px; }
.refgroup { font-size: 24px; margin: 18px 0 12px; }
.fsheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fsheet .formula { font-size: 14.5px; white-space: normal; }
.gitem h3 small a { color: inherit; }
.gcount { font-size: 13.5px; color: var(--ink-3); margin: 10px 0 14px 4px; }
.srclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.srclist li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; align-items: start; }
.srclist .sn { font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); padding-top: 2px; }
.srclist a { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.srclist a:hover { text-decoration: underline; }
.srclist a svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.srclist span span { display: block; color: var(--ink-3); font-size: 14px; }
@media (max-width: 700px) { .fsheet { grid-template-columns: 1fr; } }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(16px); }

/* Will it run: cap line */
.membar .capline { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--ink); border-radius: 2px; }

/* Tokenizer */
.tk-input { display: grid; gap: 8px; }
.tk-input textarea { width: 100%; font: inherit; font-family: var(--f-mono); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; resize: vertical; min-height: 64px; }
.tk-input textarea:focus { outline: none; border-color: var(--ink); }
.tk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tk-stats div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; display: grid; }
.tk-stats b { font-family: var(--f-display); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tk-stats span { font-size: 12.5px; color: var(--ink-3); }
.tk-stats .hl { background: var(--accent-soft); border-color: transparent; }
.tk-stats .hl span { color: var(--accent-ink); }
.tk-out { display: flex; flex-wrap: wrap; gap: 6px 4px; font-family: var(--f-mono); font-size: 16px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); min-height: 60px; align-content: flex-start; }
.tk-out .tok { flex-direction: column; align-items: flex-start; animation: none; line-height: 1.35; }
.tk-out .tok small { display: none; font-size: 10.5px; opacity: .75; }
.tk-out.ids .tok small { display: block; }
.tk-out .sp { opacity: .45; }
.tk-out .tok.is-byte { border: 1.5px dashed currentColor; padding: 2px 6px; }
.tk-out .byte { font-size: 13px; }
@media (max-width: 520px) { .tk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tk-input textarea { font-size: 16px; } }

/* Attention */
.att-ctl { display: grid; gap: 14px; }
.att-stage { position: relative; padding: 76px 6px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.att-arcs { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.att-arcs path { fill: none; stroke: var(--score); stroke-linecap: round; }
.att-words { position: relative; display: flex; flex-wrap: wrap; gap: 30px 6px; justify-content: center; }
.att-w { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 6px 10px 18px; font-size: 18px; font-weight: 700; line-height: 1.2; min-width: 40px; transition: background .25s, opacity .25s; }
.att-w small { position: absolute; left: 0; right: 0; bottom: 2px; font-family: var(--f-mono); font-size: 11px; font-weight: 400; color: var(--ink-2); text-align: center; }
.att-w.sel { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.att-w.sel small { color: var(--bg); opacity: .7; }
.att-w.future { opacity: .35; background: var(--surface); }
.att-detail { display: grid; gap: 10px; }
.aside-inline { background: var(--accent-soft); border-radius: var(--r-s); padding: 10px 12px; font-size: 15px; }
@media (max-width: 520px) { .att-stage { padding-top: 56px; } .att-w { font-size: 16px; padding: 5px 8px 17px; } .att-words { gap: 26px 5px; } }

/* One weight learns */
.wl-setup { font-size: 15.5px; color: var(--ink-2); }
.wl-setup b { color: var(--ink); }
.wl-plot { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.wl-plot svg { width: 100%; height: auto; max-height: 330px; display: block; }
.wl-plot .ax { stroke: var(--line); stroke-width: 1.5; }
.wl-plot .axl { fill: var(--ink-3); font-size: 12px; font-family: var(--f-mono); }
.wl-plot .tick { fill: var(--ink-3); font-size: 11px; font-family: var(--f-mono); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.wl-plot .warnt { fill: var(--bad); font-weight: 600; }
.wl-plot .target { stroke: var(--good); stroke-width: 1.5; stroke-dasharray: 4 4; }
.wl-plot .curve { fill: none; stroke: var(--ink-3); stroke-width: 2.5; }
.wl-plot .hop { stroke: var(--accent); stroke-width: 2; opacity: .8; }
.wl-plot .arrowhead { fill: var(--accent); }
.wl-plot .ghost { fill: var(--accent); opacity: .45; }
.wl-plot .ball { fill: var(--accent); stroke: var(--ink); stroke-width: 2.5; transition: cx .25s, cy .25s; }
.wl-plot .ball.off { fill: var(--bad); }
.wl-read { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wl-read div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 12px; display: grid; }
.wl-read span { font-size: 12px; color: var(--ink-3); font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .05em; }
.wl-read b { font-family: var(--f-display); font-size: 22px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
table.nums.wl-table { min-width: 0; }
/* The plot's viewBox is 600 wide, so on phones its text needs bigger units to stay legible. */
@media (max-width: 520px) { .wl-read { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wl-plot .axl { font-size: 21px; } .wl-plot .tick { font-size: 20px; }
  table.nums.wl-table { font-size: 13.5px; } table.nums.wl-table th, table.nums.wl-table td { padding-inline: 4px; } table.nums.wl-table th { font-size: 10.5px; letter-spacing: 0; } }

/* Embedding map */
.em-ctl { display: grid; gap: 14px; }
.em-stage { position: relative; }
.em-svg { display: block; width: 100%; height: 400px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); user-select: none; -webkit-user-select: none; }
.em-stage.zoomed .em-svg { touch-action: none; cursor: grab; }
.em-svg.dragging { cursor: grabbing; }
.em-pt { cursor: pointer; transition: opacity .2s; }
.em-pt circle { fill: var(--ink-3); stroke: var(--surface); stroke-width: 1.5; }
.em-pt text { fill: var(--ink); font-family: var(--f-body); font-weight: 700; font-size: 13.5px; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.em-pt.dim { opacity: .28; }
.em-pt.sel circle { stroke: var(--ink); stroke-width: 2.5; }
.em-pt.bank circle { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.em-pt:focus-visible { outline: none; }
.em-pt:focus-visible text { text-decoration: underline; }
.em-nl { stroke: var(--accent); stroke-width: 2; opacity: .7; }
.em-vec { stroke: var(--ink-3); stroke-width: 2.5; stroke-dasharray: 6 5; }
.em-vec2 { stroke: var(--accent); stroke-width: 3; }
.em-ahp { fill: var(--ink-3); }
.em-ahp2 { fill: var(--accent); }
.em-land { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.em-zoom { position: absolute; right: 8px; top: 8px; display: grid; gap: 4px; }
.em-zoom .iconbtn { width: 34px; height: 34px; justify-content: center; background: var(--surface); border: 1px solid var(--line); font-size: 18px; line-height: 1; padding: 0; }
@media (max-width: 520px) { .em-svg { height: 340px; } }

/* Timeline */
.tl-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-height: 160px; }
.tl-card h3 { font-size: 22px; margin: 4px 0 6px; }
.tl-card p:not(.eyebrow) { color: var(--ink-2); font-size: 15.5px; margin-bottom: 8px; }
.tl-year { font-family: var(--f-display); font-weight: 800; font-size: 54px; line-height: .9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.tl-card.cold { background: color-mix(in oklab, oklch(0.75 0.06 240) 18%, var(--bg)); }
.tl-card.cold .eyebrow { color: oklch(0.55 0.1 240); }
.tl-card.hot .tl-year { color: var(--accent-ink); }
.tl-track-wrap { display: grid; gap: 4px; }
.tl-track { position: relative; height: 34px; margin: 0 14px; }
.tl-era { position: absolute; top: 10px; height: 14px; border-radius: 3px; }
.tl-era.warm { background: var(--surface-2); }
.tl-era.cold { background: oklch(0.75 0.06 240 / .45); }
.tl-era.hot { background: var(--accent-soft); }
/* Milestones are thin ticks so crowded years stay readable; the selected one becomes a ringed dot. */
.tl-dot { position: absolute; top: 5px; width: 4px; height: 24px; margin-left: -2px; border-radius: 2px; background: var(--ink-3); border: 0; padding: 0; cursor: pointer; }
.tl-dot::before { content: ""; position: absolute; inset: -4px -4px; }
.tl-dot.past { background: var(--accent); }
.tl-dot.on { top: 8px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px var(--ink); z-index: 2; }
.tl-range { margin: 0; }
.tl-track-wrap .scale { padding: 0 6px; }
@media (max-width: 520px) { .tl-card { grid-template-columns: 1fr; gap: 6px; } .tl-year { font-size: 44px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.em-phone-hint { display: none; }
@media (max-width: 560px) { .em-phone-hint { display: block; margin-top: -10px; } .em-svg { height: 380px; }
  /* On phones the zoom buttons sit under the map so they never cover words. */
  .em-zoom { position: static; display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; } }

/* Tiny classifier (3.4, 3.7) */
.cl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cl-stage { display: grid; gap: 6px; }
.cl-canvas { width: 100%; aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg); cursor: crosshair; touch-action: manipulation; display: block; }
.cl-side { display: grid; gap: 14px; align-content: start; }
.cl-side .chips { gap: 6px; }
.cl-c1 { color: rgb(200, 110, 20) !important; } .cl-c0 { color: rgb(46, 100, 200) !important; }
.cl-chartwrap { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px 6px; display: grid; gap: 4px; }
.cl-chart { width: 100%; height: 70px; display: block; }
.cl-chart .ln { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.cl-chart .ln.tr { stroke: var(--ink-2); }
.cl-chart .ln.te { stroke: var(--bad); stroke-dasharray: 5 4; }
.cl-legend .k { font-family: var(--f-mono); font-size: 12.5px; margin-right: 12px; }
.cl-legend .k.tr { color: var(--ink-2); } .cl-legend .k.te { color: var(--bad); }
@media (max-width: 640px) { .cl-grid { grid-template-columns: minmax(0, 1fr); } }

/* Diffusion denoiser (6.2) */
.df-panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 560px; }
.df-panes figure { margin: 0; display: grid; gap: 6px; }
.df-panes canvas { width: 100%; aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line); image-rendering: auto; display: block; background: var(--bg); }
.df-panes figcaption { font-size: 13.5px; color: var(--ink-3); }

/* Agent loop stepper (7.3, 7.5) */
.ag-meter { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 18px; align-items: end; }
.ag-meter > div:not(.ag-bar) { display: grid; }
.ag-meter b { font-family: var(--f-display); font-size: 20px; font-variant-numeric: tabular-nums; }
.ag-bar { height: 10px; border-radius: var(--r-s); background: var(--surface-2); overflow: hidden; align-self: center; }
.ag-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--r-s); transition: width .4s; }
.ag-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 460px; overflow-y: auto; overscroll-behavior: contain; }
.ag-step { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; opacity: .72; }
.ag-step.now { opacity: 1; border-color: var(--ink-3); }
.ag-step .ag-k { font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.ag-step.k-act .ag-k { color: var(--accent-ink); } .ag-step.k-check .ag-k, .ag-step.k-done .ag-k { color: var(--good); } .ag-step.k-guard .ag-k { color: var(--chipink); }
.ag-step .ag-t { font-weight: 700; font-size: 14.5px; margin: 0 0 2px; }
.ag-step p { margin: 0; font-size: 15px; }
.ag-step pre { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; font-family: var(--f-mono); font-size: 13px; background: var(--surface-2); border-radius: var(--r-s); padding: 8px 10px; }
.ag-step.warn { border-color: var(--bad); background: var(--bad-soft); }
.ag-step.warn mark { background: none; color: var(--bad); font-weight: 600; }
.ag-step.good { border-color: var(--good); }
.ag-step.k-check .actions { margin-top: 8px; }
.ag-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px !important; font-size: 13.5px; }
.ag-tools span { color: var(--ink-3); }
.ag-tools .ag-tool { white-space: nowrap; }
.ag-tools code { font-size: 13px; color: var(--ink); }
@media (max-width: 520px) { .ag-step { grid-template-columns: minmax(0, 1fr); gap: 2px; } .ag-meter { grid-template-columns: auto auto; } .ag-bar { grid-column: 1 / -1; } }
.ag-chose { margin-top: 6px !important; color: var(--ink-2); }
/* Expert router demo */
.moe-toks { display: flex; flex-wrap: wrap; gap: 6px; }
.moe-t { font-family: var(--f-mono); font-size: 14px; padding: 6px 10px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: var(--bg); color: var(--ink-2); }
.moe-t.done { color: var(--ink); background: var(--surface-2); }
.moe-t.now { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.moe-say { margin: 0; font-size: 15px; min-height: 2.8em; }
.moe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.moe-x { border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; background: var(--bg); display: grid; gap: 2px; opacity: .55; transition: opacity .2s, border-color .2s, background .2s; }
.moe-x b { font-size: 14px; line-height: 1.25; }
.moe-x .moe-n, .moe-x .moe-w { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.moe-x.on { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.moe-x.on .moe-w { color: var(--ink); font-weight: 700; }
.moe-use { height: 4px; border-radius: 2px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; margin-top: 4px; }
.moe-use i { display: block; height: 100%; background: var(--score); }
.moe-meter { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.moe-meter b { font-size: 14px; }
.moe-blocks { display: flex; gap: 3px; margin: 6px 0 4px; }
.moe-blocks i { flex: 1; height: 14px; border-radius: 3px; background: var(--chip); }
.moe-blocks.mem i { background: var(--ink-3); }
.moe-blocks.run i.on { background: var(--accent); }
.row-ctl { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; justify-content: space-between; }
@media (prefers-reduced-motion: reduce) { .moe-x { transition: none; } }
@media (max-width: 520px) { .moe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .moe-meter { grid-template-columns: 1fr; } }
/* Pace-of-change charts */
.pc-unit { margin: 0; font-size: 14px; color: var(--ink-2); }
.pc-wrap { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 4px 0; }
.pc-svg { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.pc-grid { stroke: var(--line); stroke-width: 1; }
.pc-tick { stroke: var(--ink-3); stroke-width: 1; }
.pc-ax { font-family: var(--f-body); font-size: 13.5px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.pc-line { fill: none; stroke: var(--dot); stroke-width: 2; stroke-linejoin: round; }
.pc-hit { fill: transparent; cursor: pointer; }
.em-hit { fill: transparent; stroke: none; }
/* Bigger hit areas for small text links, without changing how they look. */
.crumbs button { padding-block: 11px; margin-block: -11px; }
.gitem h3 small a { display: inline-block; padding: 14px 8px; margin: -14px -8px; }
.pc-dot { fill: var(--dot); stroke: var(--bg); stroke-width: 2; }
.pc-pt.on .pc-dot, .pc-pt:focus-visible .pc-dot { fill: var(--accent); r: 7; }
.pc-dot.hollow { fill: var(--bg); stroke: var(--dot); stroke-width: 2.5; }
.pc-pt:focus { outline: none; }
.pc-lab { font-size: 14px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.pc-now { stroke: var(--accent-ink); stroke-width: 1.5; stroke-dasharray: 4 4; }
.pc-nowt { font-size: 13px; font-weight: 700; fill: var(--accent-ink); }
.pc-read { margin: 0; }
.pc-sum { margin: 0; font-size: 15px; }
.pc-table summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.pc-table table { margin-top: 8px; }

/* One at a time, or all at once (unmask demo) */
.um-lane { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 10px; background: var(--surface); transition: border-color .3s; }
.um-lane.done { border-color: var(--accent); }
.um-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14.5px; }
.um-count { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.um-toks { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; }
.um-t { display: inline-flex; align-items: center; min-width: 26px; min-height: 30px; padding: 2px 8px; border-radius: var(--r-s); background: var(--surface-2); font-size: 15px; }
.um-t.empty { background: none; border: 1px dashed var(--line); }
.um-t.next { background: none; color: var(--accent-ink); animation: blink 1s steps(2) infinite; }
.um-t.mask { color: var(--ink-3); letter-spacing: -.1em; font-family: var(--f-mono); font-size: 13px; }
.um-t.new { background: var(--accent); color: var(--on-accent, #1b1300); animation: tokin .35s cubic-bezier(.2,.9,.3,1.3); }
.um-t.rough { text-decoration: underline wavy oklch(0.62 0.2 25); text-underline-offset: 4px; }
.um-t.draft { font-style: italic; color: var(--ink-2); }
.um-t.fixed { box-shadow: inset 0 0 0 2px var(--accent); }
.um-bar { height: 6px; border-radius: var(--r-s); background: var(--surface-2); overflow: hidden; }
.um-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--r-s); transition: width .3s; }
@media (prefers-reduced-motion: reduce) { .um-t.new, .um-t.next { animation: none; } }

.demo [hidden] { display: none !important; }

/* Fit the bakery rule */
.bk-knobs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; align-items: center; }
.bk-knobs label { margin: 0; }
.bk-knobs input[type=range] { width: 100%; accent-color: var(--accent); }
.bk-knobs label:nth-of-type(1) { grid-area: 1 / 1; } .bk-knobs input:nth-of-type(1) { grid-area: 2 / 1; }
.bk-knobs label:nth-of-type(2) { grid-area: 1 / 2; } .bk-knobs input:nth-of-type(2) { grid-area: 2 / 2; }
.wl-plot .bk-miss { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.wl-plot .bk-line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.wl-plot .bk-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.bk-read { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .bk-knobs { grid-template-columns: 1fr; } .bk-knobs label, .bk-knobs input { grid-area: auto !important; } .bk-read { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bk-read b { font-size: 18px; } }

/* Everything is numbers */
.nb-pane { display: grid; gap: 12px; }
.nb-pic { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 16px; align-items: start; }
.nb-canvas { width: 100%; height: auto; border-radius: var(--r-s); image-rendering: pixelated; cursor: crosshair; touch-action: manipulation; display: block; }
.nb-canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.nb-side { display: grid; gap: 10px; }
.nb-swatch { width: 64px; height: 64px; border-radius: var(--r-s); border: 1px solid var(--line); }
.nb-rgb { margin: 0; font-size: 14px; line-height: 1.7; }
.nb-rgb b { font-size: 17px; color: var(--ink); }
.wl-plot .nb-stem { stroke: var(--accent); stroke-width: 1.5; opacity: .6; }
.wl-plot .nb-sample { fill: var(--accent); stroke: var(--ink); stroke-width: 1; }
.nb-samples { margin: 0; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.nb-text { font: inherit; font-size: 18px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--bg); color: var(--ink); width: 100%; box-sizing: border-box; }
.nb-text:focus { outline: none; border-color: var(--ink); }
.nb-bytes { display: flex; flex-wrap: wrap; gap: 6px; }
.nb-ch { display: grid; justify-items: center; gap: 2px; padding: 6px 9px; border-radius: var(--r-s); background: var(--surface-2); min-width: 34px; }
.nb-ch b { font-size: 18px; }
.nb-ch span { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); }
.nb-ch.multi { background: var(--accent-soft); }
@media (max-width: 520px) { .nb-pic { grid-template-columns: 1fr; } .nb-canvas { max-width: 320px; } }

/* Base model versus assistant, and prompt makeover */
.bc-seg { align-self: start; background: var(--surface-2); border-radius: 999px; padding: 3px; width: max-content; }
.bc-screen { display: grid; gap: 10px; }
.bc-msg { border-radius: var(--r); padding: 10px 14px; display: grid; gap: 4px; max-width: 88%; }
.bc-msg p { margin: 0; font-size: 15.5px; }
.bc-msg.you { background: var(--surface-2); justify-self: end; }
.bc-msg.it { background: var(--bg); border: 1.5px solid var(--line); justify-self: start; transition: border-color .25s; }
.bc-msg.it.good { border-color: var(--good); background: var(--good-soft); }
.bc-raw-toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 14.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.bc-raw-toggle input { accent-color: var(--accent); width: 18px; height: 18px; }
.bc-rawtext { margin: 0; font-family: var(--f-mono); font-variant-ligatures: none; font-size: 13px; background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: var(--r-s); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 520px) { .bc-seg { width: 100%; } .bc-msg { max-width: 100%; } }
.mk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: mk; }
.mk-steps li { counter-increment: mk; }
.mk-steps button { background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.mk-steps button::before { content: counter(mk) " · "; font-family: var(--f-mono); font-weight: 400; }
.mk-steps li.done button { color: var(--ink-2); border-color: var(--good); }
.mk-steps li.on button { color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mk-prompt .mk-new { background: color-mix(in oklch, var(--dot, var(--accent)) 30%, transparent); border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Squeeze it */
.sq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sq-fig { margin: 0; display: grid; gap: 6px; align-content: start; }
.sq-fig figcaption { font-size: 13px; color: var(--ink-3); }
.sq-canvas { width: 100%; height: auto; aspect-ratio: 160 / 100; border-radius: var(--r); image-rendering: pixelated; display: block; }
.wl-plot .sq-orig { fill: var(--ink-3); opacity: .55; }
.wl-plot .sq-q { fill: var(--accent); }
.sq-read { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .sq-grid { grid-template-columns: 1fr; } .sq-read b { font-size: 18px; } }

/* Reading versus writing (prefill) */
.pf-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-phase { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 10px; align-content: start; background: var(--bg); }
.pf-grid { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.pf-grid i { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.pf-grid i.on { background: var(--accent); }
.pf-bar { height: 6px; border-radius: var(--r-s); background: var(--surface-2); overflow: hidden; }
.pf-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.pf-answer { margin: 0; font-size: 14px; min-height: 5.5em; color: var(--ink); }
.pf-read { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-mem { display: flex; height: 22px; border-radius: var(--r-s); background: var(--surface-2); overflow: hidden; border: 1.5px solid var(--line); }
.pf-mem i { display: block; height: 100%; transition: width .2s; }
.pf-mem .w { background: var(--mem-w); }
.pf-mem .kv { background: var(--mem-kv); }
.pf-mem.over { border-color: var(--bad); }
.pf-mem.over .kv { box-shadow: inset -12px 0 0 var(--bad); } /* the cache keeps its color; a red end-cap marks the overflow */
.pf-legend { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.pf-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.pf-legend .sw.w { background: var(--mem-w); } .pf-legend .sw.kv { background: var(--mem-kv); margin-left: 8px; }
.pf-legend .pf-overkey { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; } .pf-legend .pf-overkey[hidden] { display: none; } .pf-legend .sw.bad { background: var(--bad); }
@media (max-width: 520px) { .pf-stage { grid-template-columns: 1fr; } .pf-read b { font-size: 17px; } }

/* Guess or pass */
.gp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-card { border: 1.5px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 6px; align-content: start; background: var(--bg); }
.gp-card.right { border-color: var(--good); background: var(--good-soft); }
.gp-card.wrong { border-color: var(--bad); background: var(--bad-soft); }
.gp-q { margin: 0; font-weight: 700; font-size: 15px; }
.gp-g { margin: 0; font-size: 15px; color: var(--ink-2); }
.gp-p { display: inline-block; font-family: var(--f-mono); font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink); margin-left: 4px; white-space: nowrap; }
.gp-seg { background: var(--surface-2); border-radius: 999px; padding: 3px; width: max-content; border: 1.5px solid var(--line); }
.gp-seg button { color: var(--ink); border: 1.5px solid transparent; }
.gp-seg button[aria-pressed="false"]:not(:disabled):hover { border-color: var(--ink-3); }
.gp-list.short > li:nth-child(n+6) { display: none; }
.gp-more { justify-self: start; }
.gp-seg button:disabled { cursor: default; }
.gp-out { margin: 0; font-size: 14px; }
.gp-tbl tr.you td { font-weight: 700; background: var(--accent-soft); }
@media (max-width: 640px) { .gp-list { grid-template-columns: 1fr; } .gp-seg { width: 100%; } }

/* Headline doctor */
.hd-story { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--bg); }
.hd-title { margin: 0 0 8px; font-family: var(--f-display); font-size: 22px; line-height: 1.15; }
.hd-text { margin: 0; font-size: 16px; line-height: 1.9; }
.hd-ph { font: inherit; color: inherit; background: none; border: 0; padding: 1px 2px; margin: 0; border-radius: 4px; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hd-ph:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.hd-ph.sel { background: var(--accent-soft); }
.hd-ph.done { background: var(--good-soft); text-decoration-color: var(--good); }
.hd-ask { display: grid; gap: 4px; }
.hd-qs { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: hd; }
.hd-qs li { counter-increment: hd; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1.5px dashed var(--line); color: var(--ink-3); }
.hd-qs li::before { content: counter(hd) ". "; }
.hd-qs li.on { border-style: solid; border-color: var(--good); color: var(--ink); background: var(--good-soft); }
.hd-qs li.on::before { content: "✓ "; }
.hd-askq { margin: 0; font-size: 15px; color: var(--ink-2); } .hd-askq b { color: var(--ink); }
.gp-result, .gp-list, .gp-card { min-width: 0; }
@media (max-width: 640px) { table.nums.cards.gp-tbl tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; padding: 10px 8px; }
  table.nums.cards.gp-tbl td { grid-template-columns: 1fr; gap: 0; } table.nums.cards.gp-tbl td:first-child { grid-column: 1 / -1; font-weight: 700; } table.nums.cards.gp-tbl td:first-child::before { display: none; } }
.wl-drag svg { touch-action: pan-y; cursor: ew-resize; }
.tl-quiz { display: grid; gap: 8px; }
.tk-langs { border-top: 1px solid var(--line); padding-top: 10px; }
.tk-langs summary { cursor: pointer; font-weight: 700; font-size: 14.5px; color: var(--ink-2); padding: 6px 0; }
.tk-langs .fineprint { margin: 6px 0 10px; }
.tk-lrow { width: 100%; background: none; border: 0; color: inherit; text-align: left; grid-template-columns: 84px 1fr 88px; cursor: pointer; }
.tk-lrow:hover { background: var(--surface-2); }
.tk-lrow:first-child .fill { background: var(--score); }
.ag-perm { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; background: var(--bg); }
.ag-perm legend { font-weight: 700; font-size: 14.5px; padding: 0 6px; }
.ag-perm .fineprint { margin: 0; }
.df-guess { display: grid; gap: 4px; }
.moe-own { margin-top: 10px; font-size: 16px; }
.em-own summary { cursor: pointer; font-weight: 700; font-size: 14.5px; color: var(--ink-2); padding: 4px 0; }
.em-own-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; font-family: var(--f-mono); font-size: 18px; }
.em-own select { font: inherit; font-family: var(--f-body); font-size: 15px; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--bg); color: var(--ink); }
.pc-guess, .um-guess { display: grid; gap: 6px; margin-bottom: 4px; }
.q-label { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.wr-own { display: grid; grid-template-columns: 140px 1fr; gap: 10px 12px; margin-top: 10px; align-items: end; }
.wr-own label { display: grid; gap: 4px; }
.wr-own select { font: inherit; font-size: 15px; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--bg); color: var(--ink); min-width: 0; }
.wr-own .fineprint { grid-column: 1 / -1; margin: 0; }
@media (max-width: 520px) { .wr-own { grid-template-columns: 1fr; } }
/* Recorded model output */
.mk-ans { max-height: 26rem; overflow-y: auto; overscroll-behavior: contain; }
/* A fade at the bottom says there is more to scroll; it goes away at the end. */
.mk-ans.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent); }
.bc-reply { overflow-wrap: anywhere; }

/* Streaks and badges. Medals take the hue of what they reward: part badges use the part's color, milestones the gold accent. */
.medal { --m: 52px; width: var(--m); height: var(--m); flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); border: 2px dashed var(--line); }
.medal svg { width: 46%; height: 46%; }
.medal b { font-family: var(--f-display); font-weight: 800; font-size: calc(var(--m) * .42); line-height: 1; }
.medal.on { background: radial-gradient(circle at 32% 28%, color-mix(in oklab, var(--dot) 55%, white), var(--dot) 62%); color: #fff; border: 3px solid var(--chip); box-shadow: 0 0 0 2px var(--dot), 0 6px 14px -6px var(--dot); }
.medal.on.gold { --dot: var(--accent); color: var(--on-accent, #1b1300); }
.medal.on b { text-shadow: 0 1px 2px rgba(0,0,0,.25); }

.streakbar { margin-top: 12px; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; min-height: 64px; }
.streakbar:hover { border-color: var(--accent); }
.streakbar .sflame { width: 40px; height: 40px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--accent-soft); color: oklch(0.7 0.19 45); flex: none; }
.streakbar .sflame svg { width: 24px; height: 24px; }
.streakbar .sflame.cold, .streakbar .sflame.off { color: var(--ink-3); background: var(--surface-2); }
.streakbar .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.streakbar .t b { font-family: var(--f-display); font-size: 17px; }
.streakbar .t span { font-size: 14px; color: var(--ink-3); }
.streakbar .mini { display: flex; }
.streakbar .mini > span + span { margin-left: -10px; }
.streakbar .mini .medal { --m: 34px; border-width: 2px; box-shadow: 0 0 0 2px var(--surface); }
.streakbar .cnt { font-size: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.streakbar .chev { width: 18px; height: 18px; transform: rotate(-90deg); color: var(--ink-3); flex: none; }
@media (max-width: 560px) {
  .streakbar .mini { display: none; }
  .streakbar { display: grid; grid-template-columns: 40px 1fr 18px; column-gap: 12px; row-gap: 4px; }
  .streakbar .sflame { grid-row: 1 / 3; }
  .streakbar .t { grid-column: 2; }
  .streakbar .cnt { grid-column: 2; grid-row: 2; font-size: 13px; }
  .streakbar .chev { grid-column: 3; grid-row: 1 / 3; }
}

.bstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bstats .bstat.chg { grid-column: 1 / -1; }
.bstat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 6px; align-content: start; }
.bstat .big { font-family: var(--f-display); font-weight: 800; font-size: 34px; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; }
.bstat .big small { font-size: 16px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; align-self: flex-end; padding-bottom: 3px; }
.bstat .big svg { width: 28px; height: 28px; color: oklch(0.7 0.19 45); }
.bstat.off .big svg { color: var(--ink-3); }
.bstat p { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.bstat .ring { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; }
.bstat.hot { grid-column: span 1; }
@media (max-width: 760px) { .bstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bstat.hot, .bstat.chg { grid-column: 1 / -1; } .bstat.hot { order: -1; } }

.cal { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; }
.cal-row { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); gap: 4px; }
.cal-row i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.cal-row i.on { background: oklch(0.72 0.17 50); }
.cal-row i.today { outline: 2px solid var(--ink-3); outline-offset: 1px; }
.cal-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-family: var(--f-mono); }
@media (max-width: 560px) { .cal-row { grid-template-columns: repeat(14, minmax(0, 1fr)); } }

.bgroup { margin-top: 36px; }
.bgroup .section-head { margin-bottom: 14px; }
.bgroup .section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.bcard { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.bcard.earned { border-color: color-mix(in oklab, var(--dot) 45%, var(--line)); }
.bcard .bt { min-width: 0; display: grid; gap: 4px; flex: 1; }
.bcard h3 { font-size: 17px; font-weight: 700; }
.bcard:not(.earned) h3 { color: var(--ink-2); }
.bcard p { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.bwhen { font-size: 12px; font-family: var(--f-mono); color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.bcard.earned .bwhen { color: var(--good); }
.bwhen svg { width: 13px; height: 13px; }
.bprog { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bprog i { display: block; height: 100%; background: var(--dot); border-radius: 3px; }

.toast-badge { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; animation: badgein .45s cubic-bezier(.2,1.4,.4,1); }
.toast-badge .medal { --m: 38px; border-width: 2px; }
.toast-badge span { display: flex; flex-direction: column; line-height: 1.2; }
.toast-badge small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; font-weight: 600; }
@keyframes badgein { from { opacity: 0; transform: translate(-50%, 16px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .toast-badge { animation: none; } }
@media (max-width: 760px) {
  .progress-pill { padding: 6px 4px; gap: 6px; }
  .bstats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bstat { padding: 12px; }
  .bstat .big { font-size: 26px; }
  .bstat .big small { font-size: 13px; }
  .bstat .ring { display: none; }
}
@media (max-width: 420px) { .progress-pill .streak + .ring { display: none; } }

/* Predict, then play: one question before a demo. The first pick is kept; "Check my prediction" shows the answer. */
.predict { background: var(--accent-soft); border-radius: var(--r-l); padding: 18px 20px; display: grid; gap: 14px; }
.predict .ph { display: flex; gap: 12px; align-items: flex-start; }
.predict .pico { width: 36px; height: 36px; border-radius: var(--r-s); background: var(--surface); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.predict .pico svg { width: 20px; height: 20px; }
.predict .eyebrow { color: var(--accent-ink); }
.predict h3 { font-size: 19px; line-height: 1.3; margin-top: 4px; overflow-wrap: anywhere; }
.predict .ph > div { min-width: 0; }
.popts { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 10px 14px; min-height: 44px; font-weight: 700; font-size: 15.5px; line-height: 1.3; text-align: left; color: var(--ink); }
.pchip:not(:disabled):hover { border-color: var(--ink-3); }
.pchip:disabled { cursor: default; color: var(--ink-2); }
.pchip.picked { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pchip.right { border-color: var(--good); background: var(--good-soft); color: var(--ink); }
.pchip.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--ink); }
.pnext { display: grid; gap: 10px; justify-items: start; font-size: 15.5px; }
.pnext[hidden], .preveal[hidden] { display: none; }
.preveal { font-size: 15.5px; }
.predict + .demo { margin-top: -6px; }
.demo-page .predict { margin-bottom: 14px; }
@media (max-width: 560px) { .predict { padding: 16px; } .pchip { flex: 1 1 100%; } }

/* Part reviews */
.rvrow { margin-top: 4px; border-top: 1px dashed var(--line); padding-top: 4px; }
.rvrow .ln svg { width: 20px; height: 20px; color: var(--chipink); }
.rail .rn svg { width: 15px; height: 15px; }
.recap .actions { margin-top: 6px; }
.recap .actions .btn { margin-top: 0; }
.recap-rv { font-size: 15px; color: var(--ink); }
.review-page .page-head .backbtn { min-height: 44px; padding: 10px 18px 10px 14px; }
.rv { max-width: 760px; padding-bottom: 48px; display: grid; gap: 14px; }
.rv .quiz { margin-top: 0; }
.rv-steps { display: flex; gap: 6px; }
.rv-steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); }
.rv-steps i.on { background: var(--dot); }
.rv-steps i.ok { background: var(--good); }
.rv-steps i.no { background: var(--bad); }
.rv .opt:disabled { cursor: default; }
.rv .feedback .lref { font-weight: 700; margin-left: 4px; white-space: nowrap; }
.rv-score { display: flex; align-items: center; gap: 16px; }
.rv-score .ring { width: 64px; height: 64px; }
.rv-score b { display: block; font-family: var(--f-display); font-size: 40px; line-height: 1; margin-top: 4px; }
.rv-score small { font-size: 18px; color: var(--ink-3); font-weight: 700; }
.rv-miss ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.rv-done > p { color: var(--ink-2); }
.rv-next, .preveal, .pnext { scroll-margin-bottom: 110px; scroll-margin-top: 90px; }

/* Finish line (#finish): progress strip, course card, numbers, skills by part, next steps */
.fin-head h1 { margin-top: 10px; }
.fin-title { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: clamp(36px, 7vw, 72px); }
.fin-title .tok { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; padding: 2px 14px 6px; border-radius: var(--r); animation: tokin .5s cubic-bezier(.2,.9,.3,1.3) both; }
.fline { display: flex; gap: 6px; margin-bottom: 28px; }
.fline > span { display: flex; gap: 2px; min-width: 0; }
.fline i { flex: 1; height: 12px; border-radius: 3px; background: var(--surface-2); }
.fline i.on { background: var(--dot); }
.fin-card-wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 24px; align-items: start; }
.fcard { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; display: grid; gap: 14px; box-shadow: var(--shadow); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.fcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, oklch(0.7 0.15 20), oklch(0.78 0.15 85), oklch(0.7 0.14 165), oklch(0.65 0.15 255), oklch(0.68 0.15 320)); }
.fc-top { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 17px; }
.fc-top .brand-mark i { height: 18px; }
.fc-kind { margin-left: auto; font-family: var(--f-mono); font-weight: 600; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 8px; border-radius: var(--r-s); }
.fc-name { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; overflow-wrap: anywhere; margin-top: 6px; }
.fc-line { color: var(--ink-2); }
.fc-parts { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.fc-parts span { aspect-ratio: 1; border-radius: var(--r-s); display: grid; place-items: center; font-family: var(--f-mono); font-weight: 600; font-size: 14px; background: var(--surface-2); color: var(--ink-3); border: 1.5px dashed var(--line); }
.fc-parts span.on { background: var(--dot); color: #fff; border: 0; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
/* In dark mode the green right-answer key and the finished-part squares are light, so white on them was faint (2-2.5:1).
   They take the page's dark ink instead, in every theme. */
:root[data-theme="dark"] :is(.opt.right .k, .fc-parts span.on) { color: var(--bg); text-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.opt.right .k, .fc-parts span.on) { color: var(--bg); text-shadow: none; } }
.fc-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14.5px; color: var(--ink-2); }
.fc-stats b { font-family: var(--f-display); font-size: 18px; color: var(--ink); }
.fc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 12px; font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); }
.fc-foot .medal { --m: 46px; }
.fcard.locked .fc-name { color: var(--ink-3); }
.fcard.locked .fc-kind { color: var(--ink-3); background: var(--surface-2); }
.fc-tools { display: grid; gap: 8px; align-content: start; max-width: 420px; }
.fc-tools label { font-weight: 700; }
.fc-tools input { font: inherit; font-size: 18px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; min-height: 48px; }
.fc-tools input:focus { outline: none; border-color: var(--ink); }
.fc-tools .btn { justify-self: start; margin-top: 6px; }
.fstats .bstat .big { font-size: 30px; }
.fparts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fprow { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.fprow.done { border-color: color-mix(in oklab, var(--dot) 45%, var(--line)); }
.fp-n { width: 40px; height: 40px; flex: none; border-radius: var(--r-s); display: grid; place-items: center; font-family: var(--f-mono); font-weight: 600; background: var(--surface-2); color: var(--ink-3); }
.fp-n svg { width: 20px; height: 20px; }
.fprow.done .fp-n { background: var(--dot); color: #fff; }
.fp-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fp-t b { font-size: 16.5px; line-height: 1.35; }
.fprow:not(.done) .fp-t b { color: var(--ink-2); font-weight: 400; }
.fp-t span { font-size: 13.5px; color: var(--ink-3); }
.fprow .btn { flex: none; white-space: nowrap; }
.fprow .btn svg { width: 16px; height: 16px; }
.fprow .btn.fp-full { color: var(--good); }
.fmiss { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 4px; }
.fmiss > p:not(.eyebrow) { color: var(--ink-2); }
.fnext { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.fn { display: grid; gap: 6px; align-content: start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; transition: transform .15s, border-color .15s; }
.fn:hover { transform: translateY(-2px); border-color: var(--dot); }
.fn-i { width: 40px; height: 40px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--chip); color: var(--chipink); margin-bottom: 4px; }
.fn-i svg { width: 22px; height: 22px; }
.fn b { font-family: var(--f-display); font-size: 19px; }
.fn > span:last-child { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.finrow .node b svg, .continue.fin .num svg, .finbar .sflame svg { width: 22px; height: 22px; }
.finrow .node b { border-style: dashed; --chip: var(--accent-soft); --chipink: var(--accent-ink); --dot: var(--accent); }
.finbox { width: 100%; text-align: left; display: flex; align-items: center; gap: 16px; padding: 16px 18px; color: inherit; }
.finbox > span { flex: 1; display: grid; gap: 4px; }
.finbox .chev { width: 18px; height: 18px; transform: rotate(-90deg); color: var(--ink-3); }
.finbox:hover { border-color: var(--accent); }
.continue.fin .num { background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.fin-cta { margin-top: 14px; padding: 14px; border-radius: var(--r-s); background: var(--accent-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fin-cta p { color: var(--ink); }
@media (max-width: 860px) { .fin-card-wrap { grid-template-columns: minmax(0, 1fr); } .fc-tools { max-width: none; } }
@media (max-width: 760px) { .fstats.bstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .fcard { padding: 20px 18px; border-radius: var(--r-l); }
  .fc-parts { gap: 4px; } .fc-parts span { font-size: 12px; border-radius: var(--r-s); }
  .fc-kind { display: none; }
  .fprow { flex-wrap: wrap; align-items: flex-start; } .fp-t { flex-basis: calc(100% - 54px); } .fprow .btn { margin-left: 54px; }
  .fline { gap: 3px; } .fline > span { gap: 1px; }
  .fn { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 14px; } .fn-i { grid-row: span 2; margin: 0; } 
}
@media (prefers-reduced-motion: reduce) { .fin-title .tok { animation: none; } }
@media print {
  body { background: #fff; }
  body > :not(main), #view > :not(.finish-page), .finish-page > :not(.fin-card-wrap), .fc-tools { display: none !important; }
  .fin-card-wrap { display: block; padding-top: 0; }
  #fcard { max-width: 640px; box-shadow: none; break-inside: avoid; }
}

/* ---------- STUDY FOLLOW-UPS (Oct 26, 2026): part color on lessons, warm-ups, completion, routes, daily warm-up ---------- */
/* Three card roles. Stage: demos (tinted ground, part-colored head, no border). Panel: warm-up, predict and check
   question (filled, the reader's turn). Quiet: layers, sources and lesson nav (no fill, a rule only).
   Gold means "your turn": warm-ups, predicts, primary buttons, the picked token, the streak. */

/* Part covers: drawn in code from the logo's token bar, dot and line */
.cover { display: block; width: 120px; height: auto; flex: none; }
.cover .a { fill: var(--dot); }
.cover .b { fill: var(--chipink); }
.cover .c { fill: color-mix(in oklab, var(--dot) 32%, var(--surface)); }
.cover .l { fill: none; stroke: var(--dot); stroke-linecap: round; }

/* Lesson header band in the part's color */
.lhead { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; padding: 20px 24px 22px; border-radius: var(--r-l); background: linear-gradient(135deg, var(--chip), color-mix(in oklab, var(--chip) 35%, var(--bg)) 75%); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--dot) 18%, transparent); }
.lhead > * { grid-column: 1; }
.lhead .cover { grid-column: 2; grid-row: 1 / span 4; width: 150px; align-self: center; }
.lhead .crumbs, .lhead .crumbs button { color: var(--chipink); }
.lhead .crumbs button { text-decoration-color: color-mix(in oklab, var(--chipink) 35%, transparent); font-weight: 700; }
.lhead h1 { margin-top: 10px; }
.lhead .bigidea { margin-top: 14px; }
.lhead .lmeta { color: color-mix(in oklab, var(--chipink) 70%, var(--ink-3)); }
.lhead .badge { background: color-mix(in oklab, var(--surface) 70%, transparent); color: var(--chipink); }
.lhead .badge.ready { background: var(--good-soft); color: var(--good); }
.lhead + .warm, .lhead + .depth { margin-top: 18px; }
.warm + .depth { margin-top: 16px; }
@media (max-width: 700px) {
  .lhead { padding: 16px 16px 18px; column-gap: 12px; }
  .lhead .cover { grid-row: 1; width: 64px; align-self: start; margin-top: -4px; }
  .lhead h1, .lhead .bigidea, .lhead .lmeta { grid-column: 1 / -1; }
  .lhead h1 { margin-top: 4px; }
  .lesson .bigidea { font-size: 18px; line-height: 1.42; }
  .lhead .lmeta { margin-top: 12px; gap: 6px 14px; }
}
@media (max-width: 960px) { .lesson-grid { padding-top: 14px; } }

/* Warm-up: the reader's turn, so it shares the gold predict panel */
.warm { margin-top: 18px; }
.warm .pico { color: var(--accent-ink); }
.warm .pchip.picked { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.wreveal.ok { background: color-mix(in oklab, var(--good-soft) 80%, var(--surface)); }
.wreveal.no { background: color-mix(in oklab, var(--surface) 70%, var(--bad-soft)); }

/* Demo "Start over": appears once the reader changes something */
.dreset { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; background: var(--surface); color: var(--ink); border: 1px solid color-mix(in oklab, var(--dot, var(--ink-3)) 35%, var(--line)); border-radius: 999px; padding: 6px 12px; min-height: 36px; font-size: 13.5px; font-weight: 700; animation: popin .2s ease-out; }
.dreset svg { width: 15px; height: 15px; }
.dreset:hover { border-color: var(--ink-3); }
.demo-head .hint + .dreset { margin-left: 0; }
.demo-head:has(.dreset:not([hidden])) .hint { flex: 1 1 200px; }

/* Lesson complete */
.btn.big { padding: 14px 20px; font-size: 17px; border-radius: var(--r); text-align: left; justify-content: space-between; gap: 14px; }
.btn.big span { display: grid; gap: 1px; }
.btn.big small { font-size: 12.5px; font-weight: 700; opacity: .85; font-family: var(--f-mono); letter-spacing: .03em; text-transform: uppercase; }
.donecard { margin-top: 4px; background: var(--surface); border-radius: var(--r-l); padding: 20px 22px; display: grid; gap: 14px; border: 2px solid var(--dot); box-shadow: 0 14px 34px -18px var(--dot); animation: donein .5s cubic-bezier(.2,1.3,.4,1); scroll-margin-bottom: 100px; }
@keyframes donein { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.dc-top { display: flex; gap: 16px; align-items: center; }
.dc-top h3 { font-size: 21px; margin-top: 4px; }
.dc-top .eyebrow { color: var(--chipink); }
.dc-ring { width: 56px; height: 56px; flex: none; }
.dc-ring circle { fill: none; stroke-width: 7; }
.dc-ring .bgc { stroke: var(--chip); }
.dc-ring .fgc { stroke: var(--dot); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 1.1s cubic-bezier(.3,.8,.3,1) .35s; }
.dc-row { display: flex; gap: 5px; }
.dc-row i { flex: 1; height: 14px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.dc-row i.on { background: var(--dot); box-shadow: none; }
.dc-row i.new { background: var(--dot); box-shadow: 0 0 0 3px var(--chip); animation: tokdrop .7s cubic-bezier(.3,1.5,.5,1) .15s both; }
@keyframes tokdrop { from { transform: translateY(-26px) scaleY(1.4); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
.dc-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14.5px; color: var(--ink-2); align-items: center; }
.dc-meta svg { width: 16px; height: 16px; }
.dc-flame, .dc-charge { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; }
.dc-flame { color: var(--accent-ink); }
.dc-flame svg { color: oklch(0.7 0.19 45); }
.dc-charge { color: oklch(0.5 0.12 230); }
:root[data-theme="dark"] .dc-charge { color: oklch(0.8 0.1 230); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dc-charge { color: oklch(0.8 0.1 230); } }
.dc-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.dc-badges > span { display: flex; align-items: center; gap: 10px; animation: badgepop .5s cubic-bezier(.2,1.4,.4,1) .6s both; }
.dc-badges .medal { --m: 40px; }
.dc-badges > span > span { display: grid; line-height: 1.2; font-weight: 700; }
.dc-badges small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
@keyframes badgepop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.dc-go { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dc-go .btn.go { flex: 1 1 280px; }
@media (prefers-reduced-motion: reduce) { .donecard, .dc-row i.new, .dc-badges > span { animation: none; } .dc-ring .fgc { transition: none; } }

/* Phones: a slim Next bar once the lesson-complete card scrolls away */
.nextbar { display: none; }
@media (max-width: 760px) {
  .nextbar { display: block; position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); z-index: 19; padding: 0 12px 8px; animation: popin .2s ease-out; }
  .nextbar[hidden] { display: none; }
  .nextbar button { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--deep); color: #fff; border: 0; border-radius: var(--r); padding: 10px 14px; min-height: 48px; text-align: left; box-shadow: 0 8px 24px -8px rgba(0,0,0,.45); }
  .nextbar span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; opacity: .85; white-space: nowrap; }
  .nextbar b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--f-display); font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
  .nextbar svg { width: 18px; height: 18px; flex: none; }
}

/* Welcome question (first visit) */
.welcome { margin-top: 26px; background: var(--accent-soft); border-radius: var(--r-l); padding: 18px 20px 14px; display: grid; gap: 12px; max-width: 560px; }
.welcome .eyebrow { color: var(--accent-ink); }
.welcome h3 { font-size: 21px; }
.welcome .wq { display: grid; gap: 12px; }
.welcome .popts { display: grid; gap: 8px; }
.welcome .pchip { display: grid; gap: 2px; padding: 12px 14px; }
.welcome .pchip b { font-family: var(--f-display); font-size: 17px; }
.welcome .pchip span { font-weight: 400; font-size: 14.5px; color: var(--ink-2); }
.welcome .wq p { color: var(--ink-2); font-size: 16px; }
.welcome .ctas { margin-top: 2px; }
.welcome .wskip { justify-self: start; margin: 0; font-size: 14px; }

/* Route switcher on the Learning path */
.routebar { margin-top: 18px; display: grid; gap: 8px; }
.routebar .dl { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.routebar .rseg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 760px; }
.routebar .rseg button { display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 10px 14px; white-space: normal; }
.routebar .rseg button b { font-family: var(--f-display); font-size: 16px; }
.routebar .rseg button span { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.routebar .rseg button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface); color: var(--ink); }
@media (max-width: 600px) { .routebar .rseg { grid-template-columns: 1fr; } }

/* Path: covers, a row of token bars per part, mastery level, and "you are here" */
.pbox > button { grid-template-columns: auto minmax(0, 1fr) auto; }
.pbox > button .cover { grid-row: 1 / span 3; width: 84px; }
.pbox .pb-t { display: grid; gap: 4px; min-width: 0; }
.pbox .side { grid-column: 3; grid-row: 1 / span 3; }
.tbars { display: flex; gap: 3px; margin-top: 6px; max-width: 260px; }
.tbars i { flex: 1; height: 8px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.tbars i.on { background: var(--dot); box-shadow: none; }
.tbars i.up { background: var(--chip); box-shadow: inset 0 0 0 2px var(--dot); animation: uppulse 1.6s ease-in-out infinite; }
.tbars i.off { opacity: .4; }
@keyframes uppulse { 50% { box-shadow: inset 0 0 0 2px var(--dot), 0 0 0 3px var(--chip); } }
@media (prefers-reduced-motion: reduce) { .tbars i.up { animation: none; } }
.lvl { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--chipink); font-weight: 700; }
.lvl i { width: 6px; height: 14px; border-radius: 2px; background: var(--line); }
.lvl i.on { background: var(--dot); }
.lvl span { margin-left: 5px; }
.prow.here .node b { box-shadow: 0 0 0 4px var(--chip); }
.llist li.here > button { background: var(--chip); box-shadow: inset 3px 0 0 var(--dot); }
.llist li.here .ln { color: var(--chipink); font-weight: 700; }
.upnext { display: inline-block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: var(--deep); color: #fff; border-radius: 999px; padding: 1px 8px; margin: 0 8px 2px 0; vertical-align: 1px; }
.llist li.off > button .lt { color: var(--ink-2); font-weight: 400; }
@media (max-width: 600px) {
  .pbox > button { grid-template-columns: minmax(0, 1fr) auto; }
  .pbox > button .cover { display: none; }
  .pbox .side { grid-column: 1; grid-row: auto; }
  .tbars { max-width: none; }
}

/* Home: part cards carry their cover */
.pcard .cover { position: absolute; top: 12px; right: 12px; width: 64px; opacity: .95; }
.pcard h3 { padding-right: 4px; }
.pcard .n { margin-bottom: 18px; }
.review-page .page-head .cover { width: 110px; margin-top: 18px; }

/* Daily warm-up on Home */
.daily { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: grid; gap: 12px; }
.daily.due { border-color: color-mix(in oklab, var(--accent) 55%, var(--line)); background: color-mix(in oklab, var(--accent-soft) 45%, var(--surface)); }
.dy-head { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.dy-head .sflame { width: 40px; height: 40px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.daily.due .dy-head .sflame { background: var(--accent-soft); color: var(--accent-ink); }
.dy-head .sflame svg { width: 22px; height: 22px; }
.dy-head .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dy-head .t b { font-family: var(--f-display); font-size: 17px; }
.dy-head .t span { font-size: 14px; color: var(--ink-3); }
.dy-body { display: grid; gap: 12px; padding: 4px 0 6px; max-width: 760px; }
.dy-body h3 { font-size: 19px; }
.dy-body .opt:disabled { cursor: default; }

/* Streak Charges */
.charges { display: inline-flex; gap: 3px; flex: none; }
.charges i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); opacity: .6; }
.charges i.on { background: oklch(0.9 0.06 230); color: oklch(0.45 0.13 240); opacity: 1; }
.charges i svg { width: 14px; height: 14px; }
.bstat .big .charges { margin-left: 12px; align-self: center; }
.bstat .big .charges svg { width: 14px; height: 14px; color: inherit; }
.cal-row i.ice, .cal-key i.ice { background: oklch(0.82 0.08 230); }
.cal-key { display: inline-flex; gap: 6px; align-items: center; }
.cal-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
:root[data-theme="dark"] .charges i.on { background: oklch(0.35 0.07 235); color: oklch(0.85 0.09 225); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .charges i.on { background: oklch(0.35 0.07 235); color: oklch(0.85 0.09 225); } }
@media (max-width: 560px) { .streakbar .charges { grid-column: 3; grid-row: 1 / 3; } .streakbar .chev { display: none; } }

/* Wide screens: demos break out of the text column (text keeps its 66ch measure) */
@media (min-width: 1100px) {
  .lesson { max-width: 860px; }
  .lesson > *, .prose > :not(.demo):not(.predict) { max-width: 700px; }
  .lesson > .prose { max-width: none; }
}
@media (max-width: 700px) { .lhead .crumbs > :nth-child(-n+2) { display: none; } }

/* ===== Critique fixes, 2026-10-26 ===== */
/* Hero demo: say what it is, and why a lower-ranked word sometimes wins. */
.gen-intro { margin: -6px 0 12px; font-size: 15px; color: var(--ink-2); }
.gen-text { min-height: 84px; }
.gen-note { min-height: 2.9em; margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.gen-text { overflow: hidden; }
/* Hero playback: back, play/pause, forward, restart. The play button keeps one width so the row never shifts. */
.gen-ctl { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 700; font-size: 14px; }
.gbtn:hover:not(:disabled) { border-color: var(--ink-3); }
.gbtn:disabled { opacity: .4; cursor: default; }
.gbtn svg { width: 18px; height: 18px; }
.gplay { width: 96px; }
.gbtn .gi { display: inline-flex; }
.gen-hint { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.gen.paused .live i { animation: none; background: var(--ink-3); box-shadow: none; }
@media (hover: none) { .gen-hint { display: none; } }
.deep .bysetnote { display: none; } .deep.byset .bysetnote { display: block; margin-top: 4px; font: 500 12px/1.3 var(--f-mono); letter-spacing: .02em; color: var(--chipink, var(--ink-2)); }
.gen-foot a { color: inherit; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
/* Welcome is a quiet panel; only its buttons carry gold. */
.welcome { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.welcome .eyebrow { color: var(--ink-3); }
/* Big numbers in the display face, whose zero has no slash. */
.hero .meta b, .progress-pill b, .stat .big, .bstat .big, .fc-num, .rv-score b { font-family: var(--f-display); font-variant-numeric: tabular-nums; }
/* Phones: a shorter home page. */
@media (max-width: 700px) {
  .home-demos .dcard:nth-child(n+4) { display: none; }
  .strip .pcard { min-height: 0; padding: 12px 14px; gap: 6px; }
  .strip .pcard .cover { width: 44px; top: 10px; }
  .strip .pcard .n { margin-bottom: 4px; }
  .strip .pcard h3 { font-size: 17px; padding-right: 52px; }
}
/* Light mode: demo stages sit on a neutral surface; the part color stays on the head. */
:root:not([data-theme="dark"]) .demo { background: var(--surface); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .demo { background: color-mix(in oklab, var(--surface) 93%, var(--dot, var(--ink-3))); } }
/* Bigger tap targets on phones. */
.tl-dot::before { inset: -12px -9px; }
.tk-lrow { min-height: 40px; }
.lsources li a, .srclist a { padding-block: 6px; display: inline-block; }
/* Badges: the rest folded away. */
.bmore { margin-top: 28px; }
.bmore > summary { cursor: pointer; font-family: var(--f-display); font-weight: 700; font-size: 20px; padding: 12px 0; list-style-position: inside; }
/* Locked quiz options after the right answer */
.quiz .opt:disabled { cursor: default; }
.quiz .opt:disabled:not(.right) { opacity: .55; }
/* A lighter lesson header on phones, so the story starts sooner */
@media (max-width: 520px) {
  .lhead { padding: 12px 14px 14px; }
  .lhead .cover { width: 48px; }
  .lhead h1 { font-size: 27px; }
  .lhead .bigidea { margin-top: 10px; }
  .lhead .lmeta { margin-top: 10px; font-size: 13px; }
  .lhead + .warm, .lhead + .depth { margin-top: 14px; }
}
/* Contrast touch-ups from the recheck */
.demo-head .hint { color: var(--ink-2); }
.ev-doc, .dcard .tag.live { color: color-mix(in oklab, var(--good) 72%, var(--ink)); }
.ev-rep { color: color-mix(in oklab, var(--warn) 72%, var(--ink)); }
.cl-c1 { color: rgb(168, 84, 0) !important; } .cl-c0 { color: rgb(30, 82, 180) !important; }
:root[data-theme="dark"] .cl-c1 { color: rgb(250, 168, 90) !important; } :root[data-theme="dark"] .cl-c0 { color: rgb(130, 170, 250) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cl-c1 { color: rgb(250, 168, 90) !important; } :root:not([data-theme="light"]) .cl-c0 { color: rgb(130, 170, 250) !important; } }
.footer-progress, .gen-foot a { display: inline-block; padding-block: 12px; }
.att-w:not(.sel) small { color: var(--ink); }

/* ===== Demo color grammar =====
   One color per role, the same in every demo:
   gold (--accent)  what you pick, and the step happening now
   --score          how strong or likely something is (probability bars, attention, router weights)
   --cat-*          categories, with fixed hues (embedding groups, the classifier's two classes)
   --mem-w/--mem-kv memory: model weights and the KV cache
   --good / --bad   right and wrong, fits and doesn't fit */
:root {
  --score: var(--ink);
  --cat-people: oklch(var(--dot-l) var(--dot-c) 20); --cat-food: oklch(var(--dot-l) var(--dot-c) 55); --cat-money: oklch(var(--dot-l) var(--dot-c) 95);
  --cat-animal: oklch(var(--dot-l) var(--dot-c) 140); --cat-water: oklch(var(--dot-l) var(--dot-c) 205); --cat-place: oklch(var(--dot-l) var(--dot-c) 250);
  --cat-travel: oklch(var(--dot-l) var(--dot-c) 285); --cat-feel: oklch(var(--dot-l) var(--dot-c) 320);
  --mem-w: var(--cat-place); --mem-kv: var(--cat-animal);
}
/* Attention strength is a bar under each word, like the probability bars, so the word stays easy to read. */
.att-w::after { content: ""; position: absolute; left: 6px; bottom: 3px; height: 3px; width: calc((100% - 12px) * var(--a-n, 0)); background: var(--score); border-radius: 2px; }
.att-w.sel::after { display: none; }
.att-w small { bottom: 7px; }
.att-w { padding-bottom: 23px; } @media (max-width: 520px) { .att-w { padding-bottom: 22px; } }
/* Wide screens: glossary notes in the right margin (placed by mountMarginNotes) */
.mnotes { display: none; }
/* Three columns of equal side width (contents rail | text | notes), so the 700px text column sits exactly in the middle of the page.
   Demos and predicts still break out 160px to the right; notes step down past them. */
@media (min-width: 1360px) {
  .lesson-grid.wrap { max-width: none; grid-template-columns: 270px minmax(0, 700px) 270px; justify-content: center; }
  .lesson { max-width: none; position: relative; }
  .lesson > .prose { max-width: none; width: calc(100% + 160px); }
  .prose > :not(.demo):not(.predict) { max-width: calc(100% - 160px); }
  .mnotes { display: block; position: absolute; top: 0; left: calc(100% + 48px); width: 270px; }
  .mnote { position: absolute; left: 0; right: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); padding-left: 12px; border-left: 2px solid color-mix(in oklab, var(--dot, var(--line)) 60%, var(--line)); }
  .mnote b { color: var(--ink); font-weight: 700; }
  .mnote a { color: var(--chipink, var(--ink-2)); white-space: nowrap; }
  .term.hot { background: color-mix(in oklab, var(--dot, var(--accent)) 22%, transparent); border-radius: 3px; }
}

/* Follow one prompt (journey). Every stage sits in the same grid cell, so the panel keeps the height of the tallest one. */
.jn-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.jn-dot { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); }
.jn-dot.done { background: var(--surface-2); color: var(--ink); }
.jn-dot[aria-current="step"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #1b1300); font-weight: 700; }
.jn-stack { display: grid; }
.jn-panel { grid-area: 1 / 1; visibility: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; align-content: start; gap: 10px; }
.jn-panel.on { visibility: visible; }
.jn-panel .eyebrow { margin: 0; }
.jn-body { display: grid; gap: 12px; align-content: start; }
.jn-body > p { margin: 0; font-size: 15.5px; }
.jn-line { font-family: var(--f-mono); font-size: 20px; display: flex; align-items: center; gap: 4px; padding: 10px 0; }
.jn-sp { color: var(--ink-3); }
.jn-toks { display: flex; flex-wrap: wrap; gap: 6px; }
.jn-tok { display: grid; justify-items: center; gap: 2px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--surface); font-family: var(--f-mono); font-size: 16px; }
.jn-tok b { font-weight: 500; white-space: pre; }
.jn-tok code { font-size: 12px; color: var(--ink-3); }
.jn-tok.new { border-color: var(--accent); background: var(--accent-soft); }
.jn-vecs { display: flex; flex-wrap: wrap; gap: 10px; }
.jn-vec { display: grid; justify-items: center; gap: 4px; font-family: var(--f-mono); font-size: 14px; }
.jn-vec b { font-weight: 500; white-space: pre; }
.jn-bars { display: flex; gap: 2px; height: 52px; align-items: center; padding: 0 6px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); }
.jn-bars i { width: 5px; background: var(--score); border-radius: 1px; }
.jn-blocks { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; }
.jn-blocks i, .jn-key i { display: block; height: 18px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); transition: background .2s; }
.jn-blocks i.full, .jn-key i.full { border: 1.5px solid var(--ink-3); }
.jn-blocks i.on { background: var(--accent); border-color: var(--accent); }
.jn-blocks i.full.on { border-color: var(--ink); }
.jn-count { font-size: 13.5px !important; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.jn-count b { font-family: var(--f-display); font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.jn-key { display: inline-flex; align-items: center; gap: 6px; } .jn-key i { width: 14px; height: 14px; }
.jn-rows { display: grid; gap: 4px; }
.jn-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; font-family: var(--f-mono); font-size: 14.5px; min-height: 24px; }
.jn-row b { font-weight: 500; white-space: pre; }
.jn-row.bar { grid-template-columns: 96px 1fr 54px; }
.jn-row code { text-align: right; font-size: 13.5px; }
.jn-row:not(.bar) code { text-align: left; }
.jn-row.more { color: var(--ink-3); font-size: 13px; grid-template-columns: 1fr; }
.jn-bar { height: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.jn-bar i { display: block; height: 100%; background: var(--score); border-radius: 3px; }
.jn-row.on b { background: var(--accent); color: var(--on-accent, #1b1300); border-radius: 4px; padding: 0 4px; justify-self: start; }
.jn-row.on .jn-bar i { background: var(--accent); }
.jn-picked { font-size: 15px; align-self: center; }
.jn-rows.small .jn-row { font-size: 13.5px; }
@media (max-width: 520px) { .jn-blocks { grid-template-columns: repeat(8, 1fr); } .jn-row, .jn-row.bar { grid-template-columns: 84px 1fr 50px; } .jn-row:not(.bar) { grid-template-columns: 84px 1fr; } .jn-dot { width: 30px; height: 30px; } .jn-track { gap: 4px; } }
/* Where your words go (7.7) */
.tr-ctl { display: grid; gap: 12px; }
.tr-lab { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tr-sets { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.tr-sets .seg button:disabled { opacity: .45; cursor: default; }
.tr-fixed { margin: 0; }
.tr-flow { display: grid; grid-template-columns: 1fr minmax(70px, 1fr) 1fr; align-items: center; gap: 0; }
.tr-node { border: 1.5px solid var(--ink-3); border-radius: var(--r); padding: 10px 12px; background: var(--bg); display: grid; gap: 2px; text-align: center; }
.tr-node b { font-size: 14.5px; } .tr-node span { font-size: 13px; color: var(--ink-2); }
.tr-wire { position: relative; height: 34px; display: grid; place-items: center; }
.tr-wire::before { content: ""; position: absolute; left: 4px; right: 10px; top: 50%; border-top: 2.5px solid var(--ink-2); }
.tr-wire::after { content: ""; position: absolute; right: 2px; top: calc(50% - 6px); border: 6px solid transparent; border-left: 9px solid var(--ink-2); border-right: 0; }
.tr-wlab { position: relative; z-index: 1; background: var(--chip, var(--surface-2)); font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 999px; color: var(--ink-2); text-align: center; line-height: 1.3; }
.tr-flow.local .tr-co { opacity: .4; border-style: dashed; }
.tr-flow.local .tr-wire::before { border-top-style: dashed; opacity: .4; } .tr-flow.local .tr-wire::after { opacity: .4; }
.tr-places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tr-place { border: 2px solid var(--c); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 4px; align-content: start; background: color-mix(in oklab, var(--c) 16%, var(--bg)); transition: opacity .2s, background .2s; }
.tr-place.some { border-style: dashed; background: color-mix(in oklab, var(--c) 7%, var(--bg)); }
.tr-place.off { border-color: var(--line); background: var(--bg); }
.tr-place.off b, .tr-place.off .tr-state { color: var(--ink-3); }
.tr-place b { font-size: 15px; }
.tr-place p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.tr-state { justify-self: start; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--c); color: #10141f; }
.tr-place.some .tr-state { background: none; color: var(--ink); border: 1.5px dashed var(--c); }
.tr-place.off .tr-state { background: var(--surface-2); }
@media (max-width: 900px) { .tr-places { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tr-flow { grid-template-columns: 1fr; } .tr-wire { height: 40px; } .tr-wire::before { left: 50%; right: auto; top: 2px; bottom: 10px; border-top: 0; border-left: 2.5px solid var(--ink-2); }
  .tr-wire::after { right: auto; left: calc(50% - 5px); top: auto; bottom: 0; border: 6px solid transparent; border-top: 9px solid var(--ink-2); border-bottom: 0; } .tr-wlab { margin-left: 70px; } .tr-places { grid-template-columns: 1fr; } }
/* Check before you share (6.5) */
.vf-case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.vf-post { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); overflow: hidden; }
.vf-art { display: block; width: 100%; height: auto; }
.vf-post figcaption { padding: 10px 14px 12px; display: grid; gap: 4px; }
.vf-title { font-size: 16px; line-height: 1.35; } .vf-post.call .vf-title { font-weight: 400; font-style: italic; }
.vf-by { font-size: 13px; color: var(--ink-3); }
.vf-reply { font-size: 13.5px; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 8px; margin-top: 2px; }
.vf-side { display: grid; gap: 8px; min-width: 0; }
.vf-side .tr-lab { margin: 0; }
.vf-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.vf-checks .btn.ran { opacity: .6; cursor: default; }
.vf-finds { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.vf-finds li { font-size: 14px; color: var(--ink-2); padding: 8px 10px; border-radius: var(--r-s); background: var(--surface-2); }
.vf-finds li b { color: var(--ink); display: block; font-size: 13px; }
.vf-finds li.key { background: var(--good-soft); box-shadow: inset 3px 0 0 var(--good); }
.vf-vlab { margin-top: 6px !important; }
.vf-verdicts { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-verdicts .chip:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) { .vf-case { grid-template-columns: 1fr; } }

/* Routes: the top-bar route button and its sheet, route-aware path, lessons, home, playground and the route finish. */
.routechip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 5px; min-height: 40px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.routechip:hover { border-color: var(--ink-3); }
.routechip .rc-i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.routechip .rc-i svg { width: 17px; height: 17px; }
.routechip .rc-t { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.routechip .rc-l { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.routechip .rc-t b { font-size: 14px; }
.routechip .ring { width: 22px; height: 22px; }
.routechip .rc-c { font-size: 13px; color: var(--ink-2); }
.routechip .rc-c b { color: var(--ink); }
.routechip .chev { width: 15px; height: 15px; color: var(--ink-3); }
.progress-pill .pmedal { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink-2); }
.progress-pill .pmedal svg { width: 18px; height: 18px; }
.progress-pill .lbl { margin-left: -3px; }
@media (max-width: 760px) {
  .routechip { padding: 3px 8px 3px 4px; gap: 6px; min-height: 40px; }
  .routechip .rc-l, .routechip .ring { display: none; }
}
@media (max-width: 440px) {
  .brand { font-size: 0; gap: 0; }
  .topbar .wrap { gap: 8px; }
}
@media (max-width: 340px) { .routechip .rc-c { display: none; } }

.routepop { width: min(420px, calc(100vw - 32px)); gap: 12px; }
.routepop h4 { font-size: 20px; }
.routepop > p { font-size: 15px; }
.ropts { display: grid; gap: 8px; }
/* Appearance sheet: light/dark/auto and the theme list. */
.themepop { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - var(--top-h) - 24px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 760px) { .themepop { max-height: 86vh; } }
.themepop .seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface-2); border-radius: var(--r-s); padding: 4px; }
.themepop .seg button { border: 0; background: none; border-radius: calc(var(--r-s) - 3px); padding: 8px; min-height: 40px; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.themepop .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.tp-h { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3) !important; margin-top: 6px; }
.themepop .tp-note { font-size: 14px; margin-top: -4px; }
.topts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.topt { display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 8px 8px 10px; color: var(--ink); min-width: 0; }
.topt:hover { border-color: var(--ink-3); }
.topt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.topt b { font-size: 15px; line-height: 1.25; margin-top: 6px; overflow-wrap: anywhere; font-size-adjust: 0.52; }
.topt small { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; }
.tsw { display: grid; grid-template-columns: 1fr 1fr; height: 40px; border-radius: calc(var(--r) - 5px); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.tsw-h { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.tsw-m { display: inline-flex; gap: 2px; } .tsw-m i { width: 4px; height: 14px; border-radius: 2px; }
.tsw-a { width: 14px; height: 14px; border-radius: 50%; }
.fx-rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .22; }
.ropt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; color: var(--ink); }
.ropt:hover { border-color: var(--ink-3); }
.ropt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ropt .ri { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.ropt[aria-pressed="true"] .ri { background: var(--ink); color: var(--surface); }
.ropt .ri svg { width: 18px; height: 18px; }
.ropt .rt { display: grid; gap: 3px; min-width: 0; flex: 1; }
.ropt .rt b { font-family: var(--f-display); font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ropt .rt b em { font-style: normal; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--surface); padding: 2px 6px; border-radius: var(--r-s); font-weight: 600; }
.ropt .rw { font-size: 13.5px; color: var(--ink-3); line-height: 1.35; }
.ropt .rp { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.ropt .rp i { display: block; height: 100%; background: var(--ink-2); border-radius: 3px; }
.ropt small { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.routebar .ropts.rseg { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
@media (max-width: 760px) { .routebar .ropts.rseg { grid-template-columns: 1fr; } }

.llist li.off .lt, .llist li.off .ln { color: var(--ink-3); }
.llist li.xrow { padding: 4px 8px 2px; }
.llist li.xrow .linkbtn { font-size: 14px; margin: 0; }
.pbox .ponr { font-size: 13px; color: var(--ink-3); }
.prow.offroute .pbox > button { opacity: .62; }
.prow.offroute .pbox.open > button { opacity: 1; }
.pcard.offroute { opacity: .55; }
.pcard.offroute:hover { opacity: .9; }
.dots i.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.dots i.off.done { background: var(--dot); opacity: .5; }
.rail-note { font-size: 12.5px; color: var(--ink-3); margin: -6px 0 10px; }
.rail li.off button { color: var(--ink-3); }
.rail .xtag { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 1px; }
.badge.rbadge { display: inline-flex; align-items: center; gap: 5px; }
.badge.rbadge svg { width: 13px; height: 13px; }
.badge.xbadge { background: var(--surface-2); color: var(--ink-2); }
.recap .rcp-n { font-family: var(--f-mono); font-size: 13px; font-weight: 700; color: var(--chipink); margin-right: 4px; text-decoration: none; }
.recap .recap-x { font-size: 14.5px; color: var(--ink-2); }
.recap .recap-x a { color: var(--ink); }
.dc-row i.off { opacity: .35; }
.hero .meta svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; color: var(--ink-2); }

.routecard { margin-top: 12px; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; min-height: 64px; color: var(--ink); }
.routecard:hover { border-color: var(--ink-3); }
.routecard .sflame { width: 40px; height: 40px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--surface-2); flex: none; }
.routecard .sflame svg { width: 22px; height: 22px; }
.routecard .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.routecard .t b { font-family: var(--f-display); font-size: 17px; }
.routecard .t > span { font-size: 14px; color: var(--ink-3); }
.routecard .rbars { display: flex; gap: 2px; margin-top: 5px; max-width: 520px; }
.routecard .rbars i { flex: 1; height: 7px; border-radius: 2px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.routecard .rbars i.on { background: var(--dot); box-shadow: none; }
.routecard .rc-sw { font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.routecard .chev { width: 18px; height: 18px; transform: rotate(-90deg); color: var(--ink-3); flex: none; }
@media (max-width: 560px) { .routecard .rc-sw { display: none; } .routecard { align-items: flex-start; } .routecard .chev { align-self: center; } }

.pg-group { margin-top: 8px; }
.pg-h { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 18px 0 12px; }
.pg-h svg { width: 20px; height: 20px; color: var(--ink-2); }
.pg-h span { font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); font-weight: 600; }

/* Route finished: title token by token, the route's lessons as one bar of part colors, and a burst of token bars. */
.donecard.routefin { position: relative; overflow: hidden; text-align: left; }
.rf-title { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: clamp(28px, 5.4vw, 44px); line-height: 1.1; }
.rf-title .tok { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; padding: 2px 12px 5px; border-radius: var(--r); animation: tokin .5s cubic-bezier(.2,.9,.3,1.3) both; }
.rf-sub { color: var(--ink-2); font-size: 16px; max-width: 560px; }
.rf-row { display: flex; gap: 3px; }
.rf-row i { flex: 1; height: 16px; border-radius: 3px; background: var(--dot); animation: tokdrop .6s cubic-bezier(.3,1.5,.5,1) both; }
.rf-burst { position: absolute; left: 50%; top: 38%; width: 0; height: 0; pointer-events: none; }
.rf-burst i { position: absolute; width: 8px; height: 18px; margin: -9px 0 0 -4px; border-radius: 3px; background: oklch(0.72 0.15 calc(var(--h) * var(--hk, 1) + var(--ho, 0))); opacity: 0; animation: rfburst 1.1s cubic-bezier(.15,.7,.3,1) both; }
@keyframes rfburst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d) - 60px)) scale(1); } }
.routefin .dc-go { flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .rf-title .tok, .rf-row i { animation: none; } .rf-burst { display: none; } }
@media print { .routechip { display: none !important; } }
.routebar .rseg button.ropt { display: flex; gap: 12px; padding: 12px 14px; }
.routebar .rseg button.ropt .rt > span { color: inherit; font-size: inherit; }
@media (max-width: 600px) { .routebar .rseg button.ropt .rw { display: none; } .routebar .rseg button.ropt { padding: 10px 12px; } }
.routebar .rseg button.ropt .rw { font-size: 13.5px; color: var(--ink-3); }
.routebar .rseg button.ropt small { font-size: 12.5px; color: var(--ink-2); }
.path-head p.eyebrow { max-width: none; }
