:root {
  --bg: #0B0D10; --surface: #14171C; --surface-2: #1B1F26; --border: #2A2F37;
  --text: #E6E8EB; --muted: #9BA3AF; --accent: #56B4E9;
  --ok: #009E73; --esc: #E69F00; --bad: #D55E00; --fail: #CC79A7;
  --ok-bg: rgba(0,158,115,.15); --bad-bg: rgba(213,94,0,.15);
  --sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --radius: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #FFFFFF; --surface: #F6F7F9; --surface-2: #EEF0F3; --border: #D5D9DF;
    --text: #0F1419; --muted: #4B5563; --accent: #0069A8;
    --ok: #00785A; --esc: #9A6400; --bad: #B34700; --fail: #9E4A7F;
    --ok-bg: rgba(0,120,90,.12); --bad-bg: rgba(179,71,0,.12);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code, pre, .mono { font-family: var(--mono); font-size: .9em; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--text); text-decoration: none; font-size: 18px; }
.logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--bg); font-size: 15px; font-weight: 800; }
.nav nav { display: flex; gap: 4px; }
.nav nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: 14px; min-height: 24px; }
.nav nav a:hover { color: var(--text); background: var(--surface); }
.nav nav a.gh { color: var(--text); border: 1px solid var(--border); }
@media (max-width: 720px) { .nav nav a:not(.gh) { display: none; } }

section, section.wrap { padding: 96px 24px; }
section.band { max-width: none; background: var(--surface); border-block: 1px solid var(--border); }
section.band > * { max-width: 1112px; margin-inline: auto; }
.section-lede { color: var(--muted); max-width: 68ch; font-size: 17px; margin-bottom: 32px; }

section.hero { padding-top: 88px; padding-bottom: 72px; }
.eyebrow { font: 500 13px/1 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 24px; }
.accent { color: var(--accent); }
.lede { font-size: 19px; color: var(--muted); max-width: 64ch; }
.lede strong { color: var(--text); font-weight: 600; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0 56px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; background: var(--surface); transition: border-color .15s ease-out, transform .15s ease-out; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--bg); padding: 24px; }
.stat .v { font: 600 44px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 18px; color: var(--muted); font-weight: 500; }
.stat .l { margin-top: 10px; font-size: 14px; color: var(--text); font-weight: 600; }
.stat .d { margin-top: 4px; font-size: 13px; color: var(--muted); }
.stat.ok .v { color: var(--ok); } .stat.bad .v { color: var(--bad); }
.stats-note { font-size: 13px; color: var(--muted); margin-top: 12px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }
.fact { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.fact .big { font: 600 36px/1 var(--mono); margin-bottom: 12px; color: var(--accent); }
.fact.warn .big { color: var(--bad); }
.fact p { font-size: 15px; }
.fact .src { margin-top: auto; font-size: 12px; color: var(--muted); }

.chart { margin: 0 0 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--text); font-family: var(--sans); }
.chart .axis { stroke: var(--border); }
.chart .lbl { fill: var(--muted); font-size: 12px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.results { width: 100%; border-collapse: collapse; font-size: 14px; }
table.results caption { text-align: left; padding: 14px 16px; color: var(--muted); font-size: 13px; caption-side: top; }
table.results th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.results td:first-child { white-space: nowrap; }
table.results td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.results tr:last-child td { border-bottom: 0; }
table.results tbody tr { cursor: pointer; }
table.results tbody tr:hover, table.results tbody tr:focus-visible { background: var(--surface); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.dep { font-family: var(--mono); font-size: 13px; }
.dep .ver { color: var(--muted); display: block; }
.tag { display: inline-block; font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 4px; background: var(--bad-bg); color: var(--bad); margin-left: 6px; }

.verdict { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--mono); padding: 6px 8px; border-radius: 6px; white-space: nowrap; border: 1px solid currentColor; }
.v-REPAIRED, .v-REPAIRED_NEEDS_REVIEW { color: var(--ok); }
.v-ESCALATED { color: var(--esc); }
.v-CHEATED { color: var(--bad); }
.v-OVERSTEPPED { color: var(--esc); }
.v-FAILED { color: var(--fail); }
.v-COMPILES_UNTESTED { color: var(--muted); }
.v-none { color: var(--muted); border-style: dashed; }

.steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.steps .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font: 600 13px var(--mono); margin-bottom: 12px; }
.steps p { font-size: 14px; color: var(--muted); margin: 0; }
.steps strong { color: var(--text); }
.lock { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; }
@media (max-width: 820px) { .lock { grid-template-columns: 1fr; } }
.lock p { color: var(--muted); }
pre.code { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; overflow-x: auto; font-size: 13px; line-height: 1.7; }
pre.code .c { color: var(--muted); } pre.code .s { color: var(--ok); }

.picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.picker button { font: 500 13px var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; cursor: pointer; min-height: 36px; }
.picker button[aria-selected="true"] { color: var(--text); border-color: var(--accent); }
.picker button .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: currentColor; }
.case { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.case-head { padding: 24px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-start; justify-content: space-between; }
.case-head h3 { font: 600 20px var(--mono); margin-bottom: 6px; }
.case-head .meta { color: var(--muted); font-size: 14px; }
.kv { display: flex; gap: 24px; flex-wrap: wrap; }
.kv div { font-size: 13px; color: var(--muted); } .kv b { display: block; color: var(--text); font: 600 18px var(--mono); }
.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
@media (max-width: 900px) { .panes { grid-template-columns: 1fr; } }
.pane { padding: 20px 24px; min-width: 0; }
.pane + .pane { border-left: 1px solid var(--border); }
@media (max-width: 900px) { .pane + .pane { border-left: 0; border-top: 1px solid var(--border); } }
.pane h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.diff { font: 12.5px/1.55 var(--mono); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; overflow: auto; max-height: 520px; }
.diff div { padding: 0 12px; white-space: pre; }
.diff .add { background: var(--ok-bg); } .diff .add::before { content: "+ "; color: var(--ok); }
.diff .del { background: var(--bad-bg); } .diff .del::before { content: "− "; color: var(--bad); }
.diff .ctx::before { content: "  "; }
.diff .hunk { color: var(--accent); background: var(--surface-2); }
.diff .file { color: var(--text); font-weight: 600; background: var(--surface-2); padding-block: 6px; }
.replay { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; }
.replay li { border-left: 2px solid var(--border); padding: 0 0 14px 16px; position: relative; font-size: 13.5px; }
.replay li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.replay li.call::before { background: var(--accent); }
.replay li.result.ok::before { background: var(--ok); } .replay li.result.err::before { background: var(--bad); }
.replay li.say { color: var(--muted); }
.replay .tool { font: 600 12.5px var(--mono); color: var(--accent); }
.replay .res { font: 12px/1.5 var(--mono); color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.replay .hidden { display: none; }
.ctrls { display: flex; gap: 8px; }
.ctrls button, .copy { font: 600 12px var(--sans); background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; cursor: pointer; min-height: 28px; text-transform: none; letter-spacing: 0; }
.ctrls button:hover, .copy:hover { border-color: var(--accent); }
.prose { font-size: 14px; color: var(--text); }
.prose h1, .prose h2, .prose h3 { font-size: 15px; margin: 12px 0 8px; }
.prose ul { padding-left: 20px; margin: 0 0 12px; } .prose li { margin-bottom: 6px; }
.prose code { background: var(--bg); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
.receipt { font: 12.5px/1.6 var(--mono); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; white-space: pre-wrap; max-height: 420px; overflow: auto; }
.verify { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.verify code { background: var(--bg); border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; }

.method details { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px; margin-bottom: 12px; }
.method summary { cursor: pointer; padding: 16px 0; font-weight: 600; min-height: 24px; }
.method details p, .method details ul { color: var(--muted); max-width: 80ch; }
.method details[open] { padding-bottom: 8px; }
.method strong { color: var(--text); }
.foot { padding: 48px 24px 64px; font-size: 14px; color: var(--muted); }

.cmp-detail { margin-top: 6px; font: 12px/1.4 var(--mono); color: var(--muted); max-width: 32ch; }
#compare-table td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.dep .ver { white-space: nowrap; }
