/* Mnemo project site. One stylesheet for index.html and docs.html. */

:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #fcfcfa;
  --sunken: #efeee9;
  --ink: #151514;
  --ink-2: #4f4e4a;
  --muted: #85847d;
  --rule: #e2e0d9;
  --rule-strong: #c8c6bd;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-wash: rgba(42, 120, 214, 0.08);
  --base: #eb6834;
  --ok: #006300;
  --bad: #b3261e;
  --chart-grid: #e2e0d9;
  --chart-axis: #c3c2b7;

  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1120px;
  --gutter: 24px;
  --label-col: 200px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131312;
    --surface: #1a1a19;
    --sunken: #20201e;
    --ink: #efeee9;
    --ink-2: #c3c2b7;
    --muted: #8f8e87;
    --rule: #2c2c2a;
    --rule-strong: #3e3e3b;
    --accent: #3987e5;
    --accent-ink: #86b6ef;
    --accent-wash: rgba(57, 135, 229, 0.12);
    --base: #d95926;
    --ok: #3fb950;
    --bad: #f0857d;
    --chart-grid: #2c2c2a;
    --chart-axis: #3e3e3b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131312;
  --surface: #1a1a19;
  --sunken: #20201e;
  --ink: #efeee9;
  --ink-2: #c3c2b7;
  --muted: #8f8e87;
  --rule: #2c2c2a;
  --rule-strong: #3e3e3b;
  --accent: #3987e5;
  --accent-ink: #86b6ef;
  --accent-wash: rgba(57, 135, 229, 0.12);
  --base: #d95926;
  --ok: #3fb950;
  --bad: #f0857d;
  --chart-grid: #2c2c2a;
  --chart-axis: #3e3e3b;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16.5px/1.62 var(--f-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent-wash); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--ink); }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--f-mono); font-size: 0.88em; }
:not(pre) > code { background: var(--sunken); padding: 0.1em 0.35em; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── top bar ── */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.bar.scrolled { border-bottom-color: var(--rule); }
.bar .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); text-decoration: none; }
.brand b { font: 500 21px/1 var(--f-display); letter-spacing: -0.01em; }
.brand span { font: 500 11px/1 var(--f-mono); color: var(--muted); letter-spacing: 0.06em; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a.active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--rule-strong); }
.menu-btn { display: none; margin-left: auto; font: 500 14px var(--f-sans); color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
@media (max-width: 920px) {
  .menu-btn { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
  .nav .icon-btn { margin-top: 12px; }
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; font: 500 15px var(--f-sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--rule-strong); color: var(--ink); background: transparent;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.solid:hover { opacity: .88; }
.btn .arr { font-family: var(--f-mono); font-size: 13px; }

/* ── hero ── */
.hero { padding: 84px 0 76px; }
.hero-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; margin-top: 44px; }
.eyebrow { font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero h1 {
  font: 400 clamp(42px, 7.4vw, 92px)/1.0 var(--f-display);
  letter-spacing: -0.03em; margin: 20px 0 0; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--ink-2); }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 34em; margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.diary {
  margin: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  font: 400 13.5px/1.55 var(--f-mono); color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 24px 48px -32px rgba(0,0,0,.18);
}
.diary-head {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 12px;
}
.diary-head .rec::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.diary-body { padding: 14px 16px 16px; }
.dl { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 3px 0; }
.dl .t { color: var(--muted); }
.dl .p { color: var(--muted); }
.dl .tag { font-size: 10.5px; color: var(--accent-ink); border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; margin-left: 6px; vertical-align: 1px; }
.qa { border-top: 1px dashed var(--rule-strong); margin-top: 12px; padding-top: 12px; }
.qa .q { color: var(--ink); }
.qa .q::before { content: "Q  "; color: var(--muted); }
.qa .a { color: var(--accent-ink); margin-bottom: 8px; }
.qa .a::before { content: "A  "; color: var(--muted); }
.diary-foot { padding: 10px 16px; border-top: 1px solid var(--rule); font: 400 12px/1.5 var(--f-sans); color: var(--muted); }
.reveal > * { opacity: 0; transform: translateY(4px); animation: in .5s ease forwards; }
@keyframes in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal > * { animation: none; opacity: 1; transform: none; } }

/* ── key numbers ── */
.figures { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.figures .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fig { padding: 28px 24px 30px; border-left: 1px solid var(--rule); }
.fig:first-child { border-left: 0; padding-left: 0; }
.fig .v { font: 600 34px/1.1 var(--f-sans); letter-spacing: -0.02em; }
.fig .v small { font-size: 20px; font-weight: 500; color: var(--muted); }
.fig .k { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* ── sections ── */
.section { padding: 104px 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
.figures + .section { border-top: 0; }
.sec-grid { display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr); gap: 40px; }
.sec-label { font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 14px; }
.sec-label b { color: var(--ink); font-weight: 500; margin-right: 10px; }
.section h2 { font: 400 clamp(30px, 3.6vw, 44px)/1.12 var(--f-display); letter-spacing: -0.02em; max-width: 22em; margin-bottom: 22px; }
.section h3 { font: 500 19px/1.35 var(--f-sans); letter-spacing: -0.005em; margin-bottom: 8px; }
.prose { max-width: 44em; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 500; }
.block { margin-top: 56px; }

.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--rule); }
.cols-3 > div { padding: 24px 28px 4px 0; }
.cols-3 > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.cols-3 .n { font: 500 12px var(--f-mono); color: var(--muted); display: block; margin-bottom: 14px; }
.cols-3 p { font-size: 15.5px; color: var(--ink-2); }

/* objectives */
.objectives { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.objectives li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.objectives .n { font: 500 13px/1.7 var(--f-mono); color: var(--muted); }
.objectives h3 { margin: 0 0 4px; }
.objectives p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.objectives .how { font-size: 14.5px; color: var(--muted); }
.objectives .how b { display: block; font: 500 11px/1.8 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* pipeline diagram */
.pipe { margin-top: 40px; display: grid; gap: 14px; }
.lane { background: var(--sunken); border-radius: 10px; padding: 18px; }
.lane-label { font: 500 11.5px var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.lane-row { display: grid; align-items: stretch; gap: 0; }
.lane-row.l1 { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1.1fr) 28px minmax(0, 0.9fr); }
.lane-row.l2 { grid-template-columns: minmax(0, 1.15fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); }
.node {
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 8px;
  padding: 14px 14px 13px; min-width: 0;
}
.node.ours { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--surface) 90%, var(--accent)); }
.node .nt { font: 600 14.5px/1.3 var(--f-sans); }
.node.ours .nt::after { content: "ours"; margin-left: 8px; font: 500 10px var(--f-mono); color: var(--accent-ink); border: 1px solid currentColor; padding: 0 4px; border-radius: 3px; vertical-align: 2px; }
.node .ns { font-size: 13px; line-height: 1.45; color: var(--ink-2); margin-top: 5px; }
.node.decision { border-style: dashed; }
.arrow { display: grid; place-items: center; color: var(--muted); font: 400 16px var(--f-mono); }
.between { font: 500 12px var(--f-mono); color: var(--muted); padding-left: 18px; }
.between::before { content: "↓  "; color: var(--accent-ink); }

.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 18px 0; border-top: 1px solid var(--rule); }
.steps .n { font: 500 13px/1.75 var(--f-mono); color: var(--muted); }
.steps p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.steps p b { color: var(--ink); font-weight: 500; }

.steps li > .lines-sample { grid-column: 2; }
.lines-sample { margin: 12px 0 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; font: 13px/1.6 var(--f-mono); color: var(--ink); }

/* spec table */
.table-wrap { overflow-x: auto; margin-top: 18px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font: 500 11.5px/1.5 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--rule-strong); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 14px; }
tr.hl td { color: var(--ink); font-weight: 500; }
td { color: var(--ink-2); }
.spec td:first-child { color: var(--ink); width: 34%; }

/* ── charts ── */
.chart-card { margin-top: 56px; }
.chart-card:first-child { margin-top: 32px; }
.chart-title { font: 500 18px/1.35 var(--f-sans); color: var(--ink); max-width: 40em; }
.chart-sub { font-size: 14.5px; color: var(--ink-2); margin-top: 4px; max-width: 46em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 4px; font-size: 13.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 16px; height: 2px; border-radius: 1px; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }
.chart { position: relative; margin-top: 6px; }
.chart svg { width: 100%; height: auto; overflow: visible; font-family: var(--f-sans); }
.chart svg:focus-visible { outline-offset: 6px; }
.chart .grid line { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis line, .chart .axis path { stroke: var(--chart-axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick, .chart .axis-title { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .lbl { fill: var(--ink-2); font-size: 12.5px; }
.chart .lbl.strong { fill: var(--ink); font-weight: 600; }
.chart .ser-1 { stroke: var(--accent); }
.chart .ser-2 { stroke: var(--base); }
.chart .fill-1 { fill: var(--accent); }
.chart .fill-2 { fill: var(--base); }
.chart .ring { stroke: var(--bg); stroke-width: 2; }
.chart .connector { stroke: var(--rule-strong); stroke-width: 2; }
.chart .crosshair { stroke: var(--ink-2); stroke-width: 1; opacity: .5; }
.chart .hit { fill: transparent; cursor: crosshair; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 150px;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2);
  box-shadow: 0 8px 24px -12px rgba(0,0,0,.3); opacity: 0; transition: opacity .12s;
}
.tip.on { opacity: 1; }
.tip .th { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.tip .tr { display: flex; align-items: center; gap: 8px; }
.tip .tr i { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.tip .tr b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2.6em; }
details.data { margin-top: 10px; font-size: 13.5px; }
details.data summary { cursor: pointer; color: var(--muted); font: 500 12px var(--f-mono); letter-spacing: .04em; list-style: none; }
details.data summary::before { content: "+ "; }
details.data[open] summary::before { content: "− "; }
details.data summary::-webkit-details-marker { display: none; }

.honest { margin-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.honest > div { padding: 22px 24px 22px 0; }
.honest > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--rule); }
.honest > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
.honest h3 { font-size: 16px; }
.honest p { font-size: 14.5px; color: var(--ink-2); }

/* ── demo ── */
.player { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.screen { background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.timeline { margin-top: 14px; }
.tl-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.tl-head .key { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; }
.tl-head .key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.tl { position: relative; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 2px; height: 64px; align-items: end; cursor: pointer; }
.tl button { all: unset; position: relative; height: 100%; display: flex; align-items: flex-end; cursor: pointer; }
.tl button span { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--rule-strong); transition: filter .15s; }
.tl button.called span { background: var(--accent); }
.tl button:hover span, .tl button:focus-visible span { filter: brightness(1.15); }
.tl button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl .thr { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--ink-2); opacity: .45; pointer-events: none; }
.tl-head .key i.dash { width: 14px; height: 0; border-top: 1px dashed var(--ink-2); border-radius: 0; }
.tl .head { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; pointer-events: none; left: 0; }
.tl-axis { display: flex; justify-content: space-between; font: 400 11px var(--f-mono); color: var(--muted); margin-top: 6px; }

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--rule); }
.tabs button { all: unset; cursor: pointer; padding: 11px 14px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rows { overflow-y: auto; max-height: 380px; padding: 8px 0; font: 13px/1.5 var(--f-mono); }
.row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 4px 14px; color: var(--ink); }
.row .t { color: var(--muted); }
.row.skip { color: var(--muted); font-style: italic; }
.row.info { display: block; color: var(--muted); font-style: italic; }
.row.new { background: var(--accent-wash); }
.row .b { font-size: 10.5px; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; align-self: center; color: var(--muted); }
.row .b.found { color: var(--ok); }
.row .b.st { color: var(--accent-ink); }
.row.future { display: none; }
.panel-foot { border-top: 1px solid var(--rule); padding: 10px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.caption { font-size: 13.5px; color: var(--muted); margin-top: 14px; max-width: 60em; }

.ask { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { all: unset; cursor: pointer; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qlist { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; border-top: 1px solid var(--rule); }
.qlist button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-2); }
.qlist button:hover { color: var(--ink); }
.qlist button[aria-current="true"] { color: var(--ink); font-weight: 500; box-shadow: inset 2px 0 0 var(--accent); padding-left: 12px; }
.qlist button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.qlist .k { font: 400 11.5px var(--f-mono); color: var(--muted); white-space: nowrap; }
.answer { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 22px; align-self: start; }
.answer h3 { font: 400 24px/1.25 var(--f-display); margin: 6px 0 18px; }
.who { border-top: 1px solid var(--rule); padding: 14px 0 4px; }
.who .wl { display: flex; justify-content: space-between; gap: 12px; font: 500 12px var(--f-mono); color: var(--muted); letter-spacing: .03em; margin-bottom: 6px; }
.who p { margin: 0; color: var(--ink); font-size: 15.5px; }
.verdict { font: 500 11.5px var(--f-mono); }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }
.score { display: flex; gap: 28px; margin-top: 18px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.score b { font: 600 22px var(--f-sans); color: var(--ink); display: block; }

.search { margin-top: 48px; }
.search input {
  width: 100%; max-width: 420px; height: 42px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  font: 15px var(--f-sans);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.search .rows { max-height: 320px; border: 1px solid var(--rule); border-radius: 8px; margin-top: 12px; background: var(--surface); }
.search .row { grid-template-columns: 76px minmax(0, 1fr) minmax(0, 0.7fr); }
.search .row .p { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search mark { background: var(--accent-wash); color: inherit; border-radius: 2px; }

.videos { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.videos figure { margin: 0; }
.videos video { width: 100%; border-radius: 8px; background: #000; aspect-ratio: 16 / 9; }
.videos figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.videos figcaption b { display: block; color: var(--ink); font-weight: 500; }

/* ── progress ── */
.timeline-list { list-style: none; margin: 36px 0 0; padding: 0; position: relative; }
.timeline-list::before { content: ""; position: absolute; left: 132px; top: 8px; bottom: 8px; width: 1px; background: var(--rule-strong); }
.timeline-list li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0; padding: 0 0 30px; position: relative; }
.timeline-list li::before { content: ""; position: absolute; left: 128px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.timeline-list li.next::before { border-color: var(--rule-strong); }
.timeline-list li.now::before { background: var(--accent); border-color: var(--accent); }
.timeline-list .d { font: 500 12.5px/1.75 var(--f-mono); color: var(--muted); padding-right: 20px; }
.timeline-list .c { padding-left: 28px; }
.timeline-list h3 { font-size: 16.5px; margin: 0 0 3px; }
.timeline-list p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 46em; }
.timeline-list li.next h3, .timeline-list li.next p { color: var(--muted); }
.status { font: 500 10.5px var(--f-mono); letter-spacing: .05em; text-transform: uppercase; margin-left: 8px; color: var(--muted); border: 1px solid var(--rule-strong); border-radius: 3px; padding: 1px 5px; vertical-align: 2px; }
.status.done { color: var(--ok); border-color: currentColor; }
.status.wip { color: var(--accent-ink); border-color: currentColor; }

/* ── team ── */
.team { margin-top: 36px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.member { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--rule); }
.member + .member { padding-left: 20px; border-left: 1px solid var(--rule); }
.member .nm { font: 500 17px/1.3 var(--f-sans); }
.member .rl { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.member .ln { margin-top: 10px; font-size: 13.5px; }
.guide { margin-top: 28px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.guide .lab { font: 500 11.5px/1.9 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ── docs links ── */
.links { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.link-card { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 20px; background: var(--surface); transition: border-color .15s; }
.link-card:hover { border-color: var(--ink); text-decoration: none; }
.link-card .lt { font: 500 17px var(--f-sans); display: flex; justify-content: space-between; }
.link-card .lt span { font-family: var(--f-mono); color: var(--muted); }
.link-card p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); }
.cite { position: relative; margin-top: 28px; }
pre {
  margin: 0; padding: 16px 18px; overflow-x: auto; border-radius: 8px;
  background: var(--sunken); color: var(--ink); line-height: 1.6; border: 1px solid var(--rule);
}
.copy { position: absolute; top: 10px; right: 10px; font: 500 12px var(--f-mono); color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 5px; padding: 4px 9px; cursor: pointer; }
.copy:hover { color: var(--ink); }

/* ── footer ── */
.foot { border-top: 1px solid var(--rule); padding: 40px 0 56px; font-size: 13.5px; color: var(--muted); }
.foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot a { color: var(--ink-2); }
.foot p { margin: 0 0 6px; max-width: 52em; }

/* ── docs page ── */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 96px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; }
.toc .tl-t { font: 500 11.5px var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0 0 24px; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--ink); }
.doc { max-width: 760px; }
.doc h1 { font: 400 clamp(36px, 4.6vw, 52px)/1.08 var(--f-display); letter-spacing: -0.02em; margin: 8px 0 18px; }
.doc > section { padding-top: 44px; }
.doc h2 { font: 400 30px/1.2 var(--f-display); letter-spacing: -0.015em; margin: 0 0 14px; padding-top: 4px; }
.doc h3 { font: 600 16px/1.4 var(--f-sans); margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc pre { margin: 12px 0 18px; font-size: 13.5px; }
.doc .code { position: relative; }
.note { border-left: 2px solid var(--accent); padding: 4px 0 4px 16px; margin: 18px 0; color: var(--ink-2); font-size: 15px; }
.note b { color: var(--ink); font-weight: 500; }

/* ── responsive ── */
@media (max-width: 980px) {
  .hero-cols { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 28px; }
  .sec-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sec-label { padding-top: 0; }
  .player, .ask { grid-template-columns: minmax(0, 1fr); }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member:nth-child(3) { padding-left: 0; border-left: 0; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; max-height: none; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
  .toc ol { columns: 2; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .hero { padding: 48px 0 56px; }
  .lead { font-size: 17px; }
  .figures .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fig { padding: 22px 16px 24px; }
  .fig:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fig:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .fig .v { font-size: 28px; }
  .section { padding: 72px 0; }
  .cols-3, .honest { grid-template-columns: minmax(0, 1fr); }
  .cols-3 > div + div, .honest > div:nth-child(n + 2) { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .objectives li { grid-template-columns: 40px minmax(0, 1fr); }
  .objectives .how { grid-column: 2; }
  .lane-row.l1, .lane-row.l2 { grid-template-columns: minmax(0, 1fr); }
  .arrow { height: 22px; }
  .arrow .h { display: none; }
  .arrow::after { content: "↓"; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .videos { grid-template-columns: minmax(0, 1fr); }
  .links { grid-template-columns: minmax(0, 1fr); }
  .team { grid-template-columns: minmax(0, 1fr); }
  .member + .member { padding-left: 0; border-left: 0; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .timeline-list::before { left: 4px; }
  .timeline-list li { grid-template-columns: minmax(0, 1fr); padding-left: 28px; }
  .timeline-list li::before { left: 0; }
  .timeline-list .c { padding-left: 0; }
  .toc ol { columns: 1; }
  .search .row { grid-template-columns: 64px minmax(0, 1fr); }
  .search .row .p { grid-column: 2; }
}
