/* ============================================================================
   THE KID — open training log.
   A live technical report. Serif titles, a sans for prose, mono for every
   number. One accent (cobalt). The only playful colour is the subject's LCD.
   ============================================================================ */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #0d1117;
  --ink-2: #353c48;
  --muted: #687080;
  --rule: #e2e5ea;
  --rule-strong: #cbd0d9;
  --accent: #2446d8;
  --accent-ink: #1b37b0;
  --accent-soft: #e9edfc;
  --good: #16794a;
  --good-soft: #e5f3eb;
  --warn: #9a5b07;
  --warn-soft: #fbf1e1;
  --lcd: #c4cfa2;
  --lcd-deep: #afbd86;
  --lcd-ink: #223020;

  --f-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --f-sans: "Geist", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gut: clamp(16px, 3.4vw, 40px);
  --r: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
code, .mono { font-family: var(--f-mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--rule); padding: 1px 5px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ mast */
.mast {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: rgba(245, 246, 248, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.mast-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px var(--gut);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand-pet { width: 26px; height: 26px; image-rendering: pixelated; background: var(--lcd); border-radius: 5px; border: 1px solid var(--lcd-deep); }
.brand-name { font-family: var(--f-mono); font-weight: 600; font-size: 14px; letter-spacing: .14em; }
.brand-sub { font-size: 13px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--rule-strong); }
.mast-nav { display: flex; gap: 20px; margin-left: auto; }
.mast-nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.mast-nav a:hover { color: var(--accent-ink); }
.mast-right { display: flex; align-items: center; gap: 12px; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-2);
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
}
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live.is-live .dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); animation: pulse 2s ease-in-out infinite; }
.live.is-down .dot { background: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(22, 121, 74, .08); } }
@media (max-width: 1080px) { .mast-nav { display: none; } .mast-right { margin-left: auto; } }
@media (max-width: 640px) { .brand-sub, .live { display: none; } }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 14px/1 var(--f-sans);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn.is-off, .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary.is-off:hover { background: var(--ink); }

/* ------------------------------------------------------------------ layout */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gut);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1180px) {
  .page { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
}
.toc { display: none; }
@media (min-width: 1180px) {
  .toc { display: block; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); align-self: start; padding-top: 44px; }
}
.toc-h { margin: 0 0 10px; font: 600 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.toc a {
  display: grid;
  grid-template-columns: 24px 1fr;
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
}
.toc a span { font-family: var(--f-mono); font-size: 12px; color: var(--muted); padding-top: 1px; }
.toc a:hover { background: var(--surface); color: var(--ink); }
.toc a.is-current { background: var(--surface); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
main { min-width: 0; padding-bottom: 40px; }

/* -------------------------------------------------------------------- hero */
.hero { padding: 44px 0 36px; border-bottom: 1px solid var(--rule); scroll-margin-top: 80px; }
.kicker { margin: 0 0 14px; font: 500 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 {
  margin: 0 0 18px;
  max-width: 22ch;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.abstract { margin: 0 0 22px; max-width: 78ch; font-size: 16.5px; line-height: 1.62; color: var(--ink-2); }
.abstract b { color: var(--ink); }
.meta-row {
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.meta-row > div { padding: 10px 14px 10px 0; }
.meta-row > div + div { padding-left: 14px; border-left: 1px solid var(--rule); }
.meta-row dt { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.meta-row dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
@media (max-width: 900px) {
  .meta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-row > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .meta-row > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--rule); }
  .meta-row > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
.notice {
  margin: 0 0 20px;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--warn-soft);
  border: 1px solid #efd9b2;
  border-radius: var(--r);
  color: #4d3208;
}

/* dashboard: the subject + key figures */
.dash { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); } }
.subject {
  margin: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  display: grid;
  gap: 12px;
  align-content: start;
}
.subject-screen {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 6px;
  background: linear-gradient(170deg, var(--lcd), var(--lcd-deep));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25), 0 0 0 5px #23262d, 0 0 0 6px #0d1117;
  margin: 6px;
  overflow: hidden;
}
.subject-screen canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.subject-hud {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 5px;
  margin: 0;
  display: flex;
  justify-content: space-between;
  font: 600 10.5px var(--f-mono);
  letter-spacing: .1em;
  color: var(--lcd-ink);
}
.subject figcaption { display: grid; gap: 2px; font-size: 13px; color: var(--ink-2); }
.subject-id { font: 600 12px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.stage-dots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.stage-dots li { height: 5px; border-radius: 3px; background: var(--rule); }
.stage-dots li.done { background: var(--ink-2); }
.stage-dots li.now { background: var(--accent); }

.kpis {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  gap: 1px;
  overflow: hidden;
}
.kpi { background: var(--surface); padding: 12px 14px; min-width: 0; display: grid; align-content: start; gap: 3px; }
.kpi-wide { grid-column: span 2; }
.kpi dt { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi dd { margin: 0; font: 500 22px/1.2 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.kpi dd .of { font-size: 14px; color: var(--muted); }
.kpi small { font-size: 12px; color: var(--muted); }
.kpi .bar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.kpi .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .8s var(--ease); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-wide { grid-column: span 2; } }

/* ---------------------------------------------------------------- figures */
.fig { margin: 0; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); display: grid; gap: 10px; min-width: 0; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption, caption { font-size: 13px; line-height: 1.5; color: var(--muted); text-align: left; }
.fig figcaption b, caption b { color: var(--ink); font-weight: 600; }
.ax { stroke: var(--rule-strong); stroke-width: 1; }
.grid { stroke: var(--rule); stroke-width: 1; }
.tick { font: 500 11px var(--f-mono); fill: var(--muted); }
.axis-title { font: 500 11px var(--f-sans); fill: var(--muted); }
.series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.series-area { fill: var(--accent); opacity: .07; }
.future { fill: var(--surface-2); }
.future-edge { stroke: var(--rule-strong); stroke-dasharray: 3 3; }
.pt { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.pt-last { fill: var(--accent); }
.mk line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.mk circle { fill: var(--ink); }
.mk text { font: 600 10px var(--f-mono); fill: #fff; }
.empty-plot { font: 500 13px var(--f-sans); fill: var(--muted); }

/* ---------------------------------------------------------------- sections */
.sec { padding: 44px 0 40px; border-bottom: 1px solid var(--rule); scroll-margin-top: 72px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-n { font: 500 13px var(--f-mono); color: var(--accent-ink); min-width: 22px; }
h2 { margin: 0; font-family: var(--f-serif); font-weight: 600; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -.005em; }
h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.lede { margin: 0 0 20px; max-width: 76ch; color: var(--ink-2); }
.note { margin: 10px 0 0; font-size: 13px; color: var(--muted); max-width: 90ch; }
.sec > .fig, .sec > .table-wrap { margin-bottom: 18px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 8px; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.pill { display: inline-block; font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--good-soft); color: var(--good); border: 1px solid #c7e5d3; white-space: nowrap; }
.pill-muted { background: var(--surface-2); color: var(--muted); border-color: var(--rule-strong); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: #efd9b2; }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: #cdd5f6; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data caption { caption-side: top; padding: 12px 14px 10px; border-bottom: 1px solid var(--rule); }
table.data th {
  text-align: left;
  font: 500 11px var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
table.data tbody th { text-transform: none; letter-spacing: 0; font: 500 13.5px var(--f-sans); color: var(--ink-2); background: transparent; width: 36%; }
table.data td { padding: 9px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.mono, table.data .id { font-family: var(--f-mono); font-size: 12.5px; white-space: nowrap; }
table.data td.empty { color: var(--muted); text-align: center; padding: 22px; }
table.data .pending { color: var(--muted); font-family: var(--f-sans); font-size: 12.5px; }
table.data tr.is-latest td { background: var(--accent-soft); }
table.spec td:first-child { color: var(--ink-2); }
table.spec td.num:nth-child(2) { font-weight: 600; }
.sample { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 60ch; }
.sample .prefix { color: var(--muted); }
.ok { color: var(--good); }
.no { color: var(--muted); }

/* ---------------------------------------------------------------- console */
.console { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.console-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.console-bar label { font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.console-bar select, .compare select {
  font: 500 12.5px var(--f-mono);
  color: var(--ink);
  padding: 6px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--surface);
  max-width: 100%;
}
.tag { font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); }
.console-meta { margin-left: auto; font: 500 11.5px var(--f-mono); color: var(--muted); }
.transcript {
  list-style: none;
  margin: 0;
  padding: 14px;
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  align-content: start;
  overscroll-behavior: contain;
}
.turn { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; font-family: var(--f-mono); font-size: 13.5px; line-height: 1.55; }
.role { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.turn-you .role { color: var(--accent-ink); }
.turn-kid .role { color: var(--good); }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.text .prefix { color: var(--muted); }
.text .meta { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.typing::after { content: "\258D"; animation: blink 1s steps(1) infinite; color: var(--accent); }
.turn-err .text { color: var(--warn); }
@keyframes blink { 50% { opacity: 0; } }
.console-input { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--rule); }
.prompt-mark { font-family: var(--f-mono); color: var(--accent); }
.console-input input, .compare-form input {
  flex: 1;
  min-width: 0;
  font: 500 14px var(--f-mono);
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 8px 2px;
}
.console-input input:focus, .compare-form input:focus { outline: none; }
.console-input:focus-within { box-shadow: inset 0 2px 0 var(--accent); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.presets button {
  font: 500 12px var(--f-mono);
  color: var(--ink-2);
  padding: 5px 9px;
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
}
.presets button:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- stages */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.stages li { display: grid; gap: 6px; text-align: center; min-width: 0; align-content: start; }
.stages .scr { aspect-ratio: 1; border-radius: 6px; background: linear-gradient(170deg, var(--lcd), var(--lcd-deep)); box-shadow: inset 0 1px 4px rgba(0, 0, 0, .22); display: grid; place-items: center; }
.stages canvas { width: 82%; aspect-ratio: 1; image-rendering: pixelated; }
.stages b { font-size: 13px; font-weight: 600; }
.stages small { font: 500 11px var(--f-mono); color: var(--muted); }
.stages .locked .scr { background: #e8eadf; }
.stages .locked canvas { opacity: .28; }
.stages .locked b { color: var(--muted); }
.stages .now .scr { box-shadow: inset 0 1px 4px rgba(0, 0, 0, .22), 0 0 0 2px var(--accent); }
.stages .now b::after { content: " · now"; color: var(--accent-ink); font-weight: 500; }
@media (max-width: 760px) { .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- criteria */
.criteria { margin-top: 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 0 14px; }
.criteria summary { cursor: pointer; padding: 11px 0; font-size: 13.5px; font-weight: 600; }
.criteria dl { margin: 0 0 14px; display: grid; gap: 8px; }
.criteria dl > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; font-size: 13.5px; }
.criteria dt { font-weight: 600; }
.criteria dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .criteria dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------------------------------------------------------------- compare */
.compare-form { display: flex; gap: 10px; align-items: center; padding: 6px 6px 6px 14px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r); }
.compare-form:focus-within { border-color: var(--accent); }
.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .compare { grid-template-columns: minmax(0, 1fr); } }
.cmp { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.cmp-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; }
.cmp-scr { aspect-ratio: 1; border-radius: 5px; background: linear-gradient(170deg, var(--lcd), var(--lcd-deep)); display: grid; place-items: center; }
.cmp-scr canvas { width: 84%; aspect-ratio: 1; image-rendering: pixelated; }
.cmp select { width: 100%; }
.cmp-meta { font: 500 11.5px var(--f-mono); color: var(--muted); margin-top: 4px; }
.cmp-out { margin: 0; min-height: 6em; font-family: var(--f-mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; border-top: 1px solid var(--rule); padding-top: 10px; }
.cmp-out .prefix { color: var(--muted); }
.cmp-out.muted { color: var(--muted); }

/* ---------------------------------------------------------------- kv lists */
.kv { margin: 0; display: grid; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.stats-kv dd { font-size: 14px; }
@media (max-width: 560px) { .kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------------------------------------------------------------- funding */
.flow { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.flow li { position: relative; padding: 12px 14px 12px 18px; display: grid; gap: 2px; border-left: 1px solid var(--rule); }
.flow li:first-child { border-left: 0; padding-left: 14px; }
.flow li:not(:first-child)::before { content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; transform: translateY(-50%) rotate(45deg); background: var(--surface); border-top: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.flow li:nth-child(3) { background: var(--accent-soft); }
.flow li:nth-child(4)::before { background: var(--accent-soft); }
.flow b { font-size: 13.5px; font-weight: 600; }
.flow span { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .flow { grid-template-columns: minmax(0, 1fr); } .flow li { border-left: 0; border-top: 1px solid var(--rule); padding-left: 14px; } .flow li:first-child { border-top: 0; } .flow li::before { display: none; } }
.equation { margin: 0 0 6px; padding: 12px 14px; font: 500 14px var(--f-mono); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow-x: auto; white-space: nowrap; }
.equation span { color: var(--accent-ink); }

/* ---------------------------------------------------------------- token */
.buy { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 12px; align-content: start; }
.buy h3 { margin: 0; }
.buy-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.buy-steps b { color: var(--ink); font-weight: 600; }
.ca-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 6px; }
.ca-label { grid-column: 1 / -1; font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ca { font-size: 13px; overflow-wrap: anywhere; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------- disclosures */
.disclosures { margin: 0; padding-left: 18px; display: grid; gap: 8px; max-width: 90ch; color: var(--ink-2); }
.disclosures b { color: var(--ink); font-weight: 600; }
.refs { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); max-width: 100ch; }

/* ------------------------------------------------------------------ footer */
.foot { border-top: 1px solid var(--rule); background: var(--surface); }
.foot-inner { max-width: 1320px; margin: 0 auto; padding: 22px var(--gut) calc(env(safe-area-inset-bottom, 0px) + 28px); display: grid; gap: 10px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.foot-brand em { font-family: var(--f-serif); font-weight: 500; color: var(--muted); }
.foot-links { margin: 0; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.foot-links a { color: var(--ink-2); }
.legal { margin: 0; font-size: 12.5px; color: var(--muted); max-width: 90ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
