:root {
  color-scheme: light;
  --bg: #fbfbfa; --fg: #1d1f21; --muted: #5d636b; --line: #dcdedf; --card: #ffffff; --accent: #0b6bcb; --good: #17794a; --warn: #9a6700; --bad: #b3261e; --bar: #8ab4e8;
  --band: rgba(100,110,125,.16); --head: #172a45; --head-fg: #f3f6fb; --head-muted: #b9c6da;
  --c0: #2563eb; --c1: #c2650a; --c2: #0f8a5f; --c3: #8b3fd1; --c4: #d6336c; --c5: #0e8aa3;
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #14161a; --fg: #e8eaed; --muted: #a3a9b1; --line: #2b2f36; --card: #1b1e24; --accent: #7db2f0; --good: #58c58b; --warn: #e0b04a; --bad: #f08a82; --bar: #3d6fa8; --band: rgba(160,170,185,.18); --head: #0e1a2d; --c0: #7db2f0; --c1: #f0b24a; --c2: #58c58b; --c3: #c08cf0; --c4: #f08ab4; --c5: #5fd0e6; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
header { border-bottom: 1px solid var(--line); padding: 24px 0 12px; }
h1 { margin: 0 0 4px; font-size: 1.6rem; }
.lede { margin: 0 0 12px; color: var(--muted); max-width: 70ch; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.theme-toggle { margin-left: auto; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); }
a { color: var(--accent); }
.note { color: var(--muted); font-size: .9rem; margin: 16px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.card b { display: block; font-size: 1.5rem; line-height: 1.2; }
.card b.long { font-size: 1.15rem; overflow-wrap: anywhere; }
.card span { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-top: 16px; }
.tabs button { background: none; border: 1px solid transparent; border-bottom: 4px solid transparent; border-radius: 8px 8px 0 0; color: var(--muted); padding: 12px 26px 10px; font: inherit; font-size: 1.12rem; font-weight: 500; cursor: pointer; margin-bottom: -2px; }
.tabs button:hover { color: var(--fg); background: var(--band); }
.tabs button[aria-selected="true"] { color: var(--fg); font-weight: 700; background: var(--card); border-color: var(--line); border-bottom-color: var(--accent); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 520px) { .tabs button { padding: 10px 14px 8px; font-size: 1rem; } }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.filters label { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
select { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; min-width: 150px; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; user-select: none; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.bar { display: inline-block; height: 8px; background: var(--bar); border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; border: 1px solid currentColor; }
.ok { color: var(--good); } .warnings { color: var(--warn); } .failed { color: var(--bad); }
.hint { color: var(--muted); font-size: .85rem; max-width: 80ch; }
.empty { text-align: center; padding: 40px 0; }
.button { display: inline-block; background: var(--accent); color: var(--bg); padding: 8px 16px; border-radius: 6px; text-decoration: none; font-weight: 600; }
code { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: .88em; }
details summary { cursor: pointer; color: var(--accent); }
details pre { white-space: pre-wrap; word-break: break-all; font-size: .8rem; margin: 6px 0 0; }
footer { color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; }
@media (max-width: 600px) { .lede { font-size: .95rem; } th, td { padding: 6px 8px; } }
.block { margin: 28px 0; }
.block h2 { font-size: 1.2rem; margin: 0 0 4px; }
.block h3 { font-size: 1rem; margin: 16px 0 6px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 6px 0; font-size: .92rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
pre { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-size: .82rem; margin: 6px 0; }
.chart-wrap { max-width: 640px; }
svg.chart { width: 100%; height: auto; font: 11px system-ui, sans-serif; }
svg.chart text { fill: var(--muted); }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .ln { stroke: var(--accent); stroke-width: 2; }
svg.chart .whisker { stroke: var(--accent); stroke-width: 2; opacity: .45; }
svg.chart .pt { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
svg.chart .axis-title { fill: var(--fg); font-size: 11px; }
label.inline { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 8px 0; color: var(--muted); font-size: .9rem; }
.warnlist { margin: 4px 0; padding-left: 20px; color: var(--warn); }
.card .pill { font-size: 1rem; }
table.compare { min-width: 520px; }
table.compare th.colhead { white-space: normal; min-width: 170px; cursor: default; vertical-align: bottom; }
table.compare th.rowhead { font-weight: 500; color: var(--fg); cursor: default; white-space: nowrap; }
table.compare tr.group td { background: var(--bg); color: var(--muted); font-weight: 600; font-size: .85rem; border-bottom: 1px solid var(--line); padding-top: 14px; }
table.compare td.best { color: var(--good); font-weight: 600; }
table.compare .delta { color: var(--muted); font-weight: 400; font-size: .8rem; }
table.compare a.remove { font-size: .8rem; }
.compare-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.compare-bar .button[aria-disabled="true"] { opacity: .45; pointer-events: none; }
td.pick-cell, th.pick-cell { width: 28px; padding-right: 0; }
table.compare td.num { text-align: left; }
td.nowrap { white-space: nowrap; }
tr.openable { cursor: pointer; }
tr.openable:hover td { background: var(--hover, rgba(127,127,127,.08)); }
#perf td:nth-child(2), #perf td:nth-child(3) { white-space: nowrap; }
#perf th, #perf td { padding-left: 8px; padding-right: 8px; }
#perf td:nth-child(2), #perf td:nth-child(3), #perf td:nth-child(4), #perf td.num { white-space: nowrap; }
#perf th { font-size: .86rem; }

/* top band: the same on every page */
header { background: var(--head); color: var(--head-fg); border-bottom: 0; padding: 22px 0 14px; }
header h1 { color: var(--head-fg); letter-spacing: .01em; }
header .lede { color: var(--head-muted); }
header a { color: #cfe0f7; text-decoration: none; }
header nav a { padding: 3px 0; border-bottom: 2px solid transparent; }
header nav a:hover { border-bottom-color: #cfe0f7; }
header .theme-toggle { background: transparent; color: var(--head-fg); border-color: rgba(255,255,255,.35); }
header .theme-toggle:hover { border-color: #fff; }

/* summary strip */
.card.kpi small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; overflow-wrap: anywhere; }
.card.kpi small a { color: var(--accent); }
.card.kpi span { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* overview panels */
.overview { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 4px 0 20px; align-items: start; }
.overview[hidden] { display: none; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 12px; min-width: 0; }
.panel[hidden] { display: none; }
.panel.full { grid-column: 1 / -1; }
.panel h2 { margin: 0 0 4px; font-size: 1.1rem; }
.panel h3 { margin: 14px 0 2px; font-size: .95rem; }
.panel h4 { margin: 8px 0 6px; font-size: .86rem; color: var(--muted); font-weight: 600; }
.panel p { margin: 4px 0; }
@media (max-width: 860px) { .overview { grid-template-columns: 1fr; } }
svg.viz { width: 100%; height: auto; display: block; font: 13px system-ui, sans-serif; margin-top: 6px; }
svg.viz text { fill: var(--muted); }
svg.viz .axis-title { fill: var(--fg); }
svg.viz .grid { stroke: var(--line); stroke-width: 1; }
svg.viz .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
svg.viz .band { fill: var(--band); }
svg.viz .dot { stroke: var(--card); stroke-width: 1.5; }
svg.viz .dot.same { fill: var(--muted); } svg.viz .dot.up { fill: var(--good); } svg.viz .dot.down { fill: var(--bad); }
svg.viz text.val { fill: var(--fg); font-variant-numeric: tabular-nums; font-weight: 600; }
svg.viz a:hover .dot { stroke: var(--fg); }
svg.viz .c0 { fill: var(--c0); } svg.viz .c1 { fill: var(--c1); } svg.viz .c2 { fill: var(--c2); } svg.viz .c3 { fill: var(--c3); } svg.viz .c4 { fill: var(--c4); } svg.viz .c5 { fill: var(--c5); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .84rem; color: var(--muted); margin-top: 6px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
i.sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); }
i.sw.diamond { border-radius: 1px; transform: rotate(45deg) scale(.85); }
i.sw.round { background: var(--muted); }
i.sw.c0, .hbar.c0 { background: var(--c0); } i.sw.c1, .hbar.c1 { background: var(--c1); } i.sw.c2, .hbar.c2 { background: var(--c2); }
i.sw.c3, .hbar.c3 { background: var(--c3); } i.sw.c4, .hbar.c4 { background: var(--c4); } i.sw.c5, .hbar.c5 { background: var(--c5); }
.pair h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pair + .pair { border-top: 1px solid var(--line); margin-top: 10px; }
.same h3 { margin-top: 10px; }
.hrow { display: grid; grid-template-columns: minmax(70px, 38%) 1fr auto; align-items: center; gap: 8px; margin: 4px 0; font-size: .88rem; }
.hrow .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .track { height: 12px; background: var(--band); border-radius: 6px; overflow: hidden; }
.hrow .hbar { display: block; height: 100%; border-radius: 6px; }
.hrow .v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.hrow .v em { font-style: normal; color: var(--good); margin-left: 4px; }
svg.viz text.tag { fill: var(--fg); font-weight: 600; }
.args { font-size: .84rem; color: var(--muted); }
.args code { display: inline-block; margin: 2px 4px 2px 0; }
.args code.add { color: var(--good); } .args code.del { color: var(--bad); }
svg.viz text.tag.c0 { fill: var(--c0); } svg.viz text.tag.c1 { fill: var(--c1); } svg.viz text.tag.c2 { fill: var(--c2); } svg.viz text.tag.c3 { fill: var(--c3); } svg.viz text.tag.c4 { fill: var(--c4); } svg.viz text.tag.c5 { fill: var(--c5); }

/* who won more measures */
#scoreboard { margin: 12px 0 18px; }
#scoreboard .headline { font-size: 1.05rem; font-weight: 600; margin: 6px 0 10px; }
table.board td.win { color: var(--good); font-weight: 700; }
table.board td.tie { color: var(--muted); }
table.board tfoot th, table.board tfoot td { border-top: 2px solid var(--line); font-weight: 700; }
table.board td.total { font-size: 1.05rem; }

/* "What changed": tabs without script (radio buttons), compact tables, collapsible groups */
.ptabs { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 8px; }
.ptabs > input { position: absolute; opacity: 0; pointer-events: none; }
.ptabs > label { padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; font-size: .92rem; }
.ptabs > input:checked + label { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
.ptabs > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
.ptabs .count { color: var(--muted); font-weight: 400; font-size: .8rem; }
.ptabs .pview { display: none; width: 100%; order: 9; padding-top: 6px; }
#ov-tab-rel:checked ~ .v-rel, #ov-tab-gpu:checked ~ .v-gpu, #ov-tab-cfg:checked ~ .v-cfg { display: block; }
table.pairs { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.pairs th { text-align: right; font-weight: 600; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.pairs th:first-child { text-align: left; }
table.pairs td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.pairs td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.pairs td.what small { color: var(--muted); }
table.pairs td.num small { color: var(--muted); font-size: .72rem; white-space: normal; }
.chip { display: inline-block; min-width: 3.6em; padding: 1px 6px; border-radius: 6px; text-align: center; font-weight: 600; background: var(--band); color: var(--muted); }
.chip.up { color: var(--good); } .chip.down { color: var(--bad); }
.val.up { color: var(--good); } .val.down { color: var(--bad); } .val.weak { color: var(--muted); }
table.pairs .val { display: block; font-weight: 600; }
svg.viz.mini { display: block; width: 110px; height: auto; margin: 0 0 1px auto; font-size: 11px; }
.pill.muted { color: var(--muted); }
details.gpu { margin: 6px 0; border-bottom: 1px solid var(--line); }
details.gpu > summary, details.more > summary { cursor: pointer; padding: 6px 0; font-weight: 600; }
details.more > summary { font-weight: 400; color: var(--accent); }
table.pairs .nw, .pill { white-space: nowrap; }
table.pairs th { white-space: normal; }
table.pairs td.what { min-width: 8.5em; }
table.pairs td.num { padding-left: 2px; padding-right: 2px; }
details.gpu > summary { color: var(--fg); }

/* the speed map opens over the page */
#ov-map { position: relative; }
#ov-map .expand { position: absolute; top: 10px; right: 12px; background: var(--card); color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font: inherit; font-size: .84rem; cursor: pointer; }
#ov-map .expand:hover { border-color: var(--accent); }
#ov-map.expanded { position: fixed; inset: 12px; z-index: 50; overflow: auto; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); padding: 18px 22px; }
.axes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 0; font-size: .84rem; color: var(--muted); }
.axes button { background: var(--card); color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font: inherit; cursor: pointer; }
.axes button:hover { border-color: var(--accent); }
.axes button.z { padding: 1px 8px; min-width: 1.9em; font-weight: 700; }
#ov-map svg.viz { cursor: crosshair; touch-action: pan-y; margin-top: 2px; }
svg.viz .sel { fill: var(--accent); fill-opacity: .12; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }
#ov-map .hint { margin: 2px 0; }
#ov-map .legend { margin: 2px 0 0; }
#view-dash > .overview { margin-top: 16px; }

/* the results table: tight enough to fit a laptop screen without sideways scrolling */
#perf th, #perf td { padding: 8px 6px; }
#perf td.by a { display: inline-block; max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Strata reports */
.notice { border: 1px solid var(--warn); border-left-width: 4px; border-radius: 8px; background: var(--card); padding: 10px 14px; margin: 6px 0 10px; }
table.reports td.hw { min-width: 18em; }
.filters input[type="search"] { padding: 6px 10px; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 6px; min-width: 18em; }
table.reports th { cursor: default; vertical-align: bottom; }
table.reports td { vertical-align: top; }
.filters label.check { flex-direction: row; align-items: center; gap: 6px; align-self: end; padding-bottom: 8px; }
table.reports { font-size: .84rem; }
table.reports th { cursor: pointer; white-space: nowrap; }
table.reports td.strata { font-weight: 700; white-space: nowrap; }
table.reports th, table.reports td { padding: 7px 6px; }
#perf { font-size: .84rem; }
#perf td.strata { font-weight: 700; white-space: nowrap; }
#perf .cpu { display: inline-block; max-width: 10.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* the numbers at the top: one quiet line */
.stats { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 10px 0 6px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.stats .stat b { color: var(--fg); font-size: 1.05rem; font-weight: 600; }
.stats .stat a { color: var(--muted); text-decoration: none; }
.stats .stat a:hover { color: var(--accent); text-decoration: underline; }
.stats .stat a b { color: var(--accent); }
table.contributors { font-size: .9rem; }
.lede-text { margin: 14px 0 10px; }
