:root {
  color-scheme: dark;
  --page: #10141c;
  --panel: #181f2b;
  --surface: #121926;
  --line: #36445a;
  --text: #edf2fb;
  --muted: #b4c1d6;
  --accent: #76e3cc;
  --gold: #ffd586;
  font: 16px/1.55 system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); }
h1, h2, h3, h4, p, figure, dl { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; }
h1 { font-size: clamp(2.15rem, 5vw, 3.65rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); letter-spacing: -.02em; }
h3, h4 { font-size: 1.05rem; }
p + p { margin-top: .75rem; }
a { color: var(--accent); text-underline-offset: .21em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.frame { max-width: 76rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.bar, .section-heading, .card-heading, .controls { display: flex; align-items: center; gap: .75rem; }
.bar, .section-heading, .card-heading { justify-content: space-between; }
.section-heading, .controls, nav { flex-wrap: wrap; }
.section { margin-top: clamp(2rem, 5vw, 3.5rem); }
.section-tight { margin-top: 1.5rem; }
.muted, .meta, figcaption, .footer { color: var(--muted); }
.mono, code, .command, .metrics dd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .bar { min-height: 4rem; padding-block: .8rem; flex-wrap: wrap; }
.brand { color: var(--text); letter-spacing: .15em; font-weight: 850; text-decoration: none; }
.brand span { color: var(--accent); }
nav { display: flex; align-items: center; gap: clamp(.85rem, 3vw, 1.7rem); }
nav a { color: var(--muted); font-size: .92rem; }
nav [aria-current] { color: var(--text); font-weight: 650; }
.skip { position: absolute; top: -4rem; left: 1rem; padding: .5rem; background: var(--panel); z-index: 1; }
.skip:focus { top: .8rem; }
.footer { margin-top: 4rem; padding-block: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; }
.footer span { margin-inline: .5rem; }

.page-intro { padding-top: clamp(2.25rem, 6vw, 4rem); }
.page-intro > p:not(.eyebrow) { margin-top: .8rem; color: var(--muted); max-width: 76ch; }
.eyebrow { color: var(--accent); font-weight: 750; font-size: .73rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: .6rem; }
.live-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .25rem; border-radius: 50%; background: var(--accent); }
.metrics, .cards { display: grid; gap: .85rem; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.metrics div, .panel, .card, .table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; }
.metrics div, .panel { padding: clamp(1rem, 3vw, 1.55rem); }
.metrics dt { color: var(--muted); font-size: .9rem; }
.metrics dd { margin: .25rem 0 0; color: var(--accent); font-size: 1.95rem; line-height: 1.2; }
.panel > p, .panel > details { margin-top: .85rem; }
.button, button, select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: .45rem; padding: .55rem .85rem;
}
.button, button { display: inline-flex; cursor: pointer; font-weight: 660; text-decoration: none; }
button[hidden] { display: none; }
.primary { background: var(--accent); color: #0c2123; border-color: var(--accent); }
.button:hover, button:hover { border-color: var(--accent); text-decoration: underline; }
summary { cursor: pointer; color: var(--accent); }
.kit { margin-top: 1.1rem; }
.kit label { color: var(--muted); font-size: .88rem; }
.controls { align-items: end; }
.controls select { display: block; margin-top: .2rem; }
.command {
  max-width: 100%; padding: 1rem; background: #0e1520; color: var(--text);
  border: 1px solid var(--line); border-radius: .5rem; overflow-x: auto; font-size: .85rem;
}
.copy-status:not(:empty) { color: var(--accent); margin-top: .5rem; }
.copy-status:empty { display: none; }
.tier { margin-top: 1.5rem; }
.tier h3 { margin-bottom: .65rem; }
.count, .badge { display: inline-block; font-size: .73rem; background: var(--surface); color: var(--muted); border-radius: 999px; padding: .2rem .55rem; }
.badge { white-space: nowrap; border: 1px solid var(--line); }
.badge.success { color: var(--gold); border-color: #796440; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.card { overflow: hidden; min-width: 0; }
.preview { height: 8rem; background: #0e1520; display: grid; place-items: center; color: var(--muted); font-size: .85rem; padding: .5rem; }
.preview img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.card-body { padding: .85rem; }
.card-heading { align-items: flex-start; margin-bottom: .7rem; }
.card-heading a { color: var(--text); }
.meta { font-size: .82rem; }
progress { display: block; width: 100%; height: .5rem; accent-color: var(--accent); margin: .4rem 0 .65rem; }
.geometry, .chart, .lineage, .table-wrap, .empty, .section > .cards { margin-top: .65rem; }
.geometry img { display: block; width: 100%; height: 15rem; object-fit: contain; margin-top: .7rem; }
.chart svg { width: 100%; display: block; max-height: 16rem; }
.axis, .threshold, .score-line { fill: none; stroke-width: 2; }
.axis { stroke: var(--line); }
.threshold { stroke: var(--gold); }
.score-line { stroke: var(--accent); }
.score-dot { fill: var(--accent); }
.lineage { padding-left: 1.6rem; }
.lineage li { padding: .5rem .75rem; border-left: 1px solid var(--line); }
.lineage li > :not(:first-child) { margin-right: .5rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .6rem .8rem; text-align: left; }
th { background: var(--surface); color: var(--muted); }
td { border-top: 1px solid var(--line); }
.commit { white-space: nowrap; }
.empty { color: var(--muted); padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: .55rem; }
