/* FrontierBioML. Valen type and colour (valenlabs.com: #f5f3ee light, #0d0c0b dark).
   Light by default, dark through the OS setting or the theme toggle (data-theme on <html>). */

:root {
  color-scheme: light;
  --ground: #f5f3ee;
  --raised: #fbfaf7;
  --ink: #1b1815;
  --muted: #6b635a;
  --faint: #8a8278;
  --line: #dcd6ca;
  --line-soft: #e8e3d9;
  --row-hover: #ebe7df;
  --accent: #b9490f;
  --link-line: #c2b8aa;
  --focus: #b9490f;
  --tip-shadow: 0 6px 24px rgba(27, 24, 21, .12);
  --logo-filter: brightness(0);
  /* provider colours (deeprsi.com model palette): marker and model name share one hue per theme */
  --p-openai: #1f1f1f;    --pt-openai: #1b1815;
  --p-anthropic: #cc785c; --pt-anthropic: #8f5440;
  --p-xai: #d4b069;       --pt-xai: #7f6a3f;
  --p-moonshot: #047afe;  --pt-moonshot: #0355b2;
  --p-google: #34a853;    --pt-google: #24763a;
  --p-meta: #0089f4;      --pt-meta: #0060ab;
  --p-deepseek: #2243e6;  --pt-deepseek: #182fa1;
  --p-nvidia: #76b900;    --pt-nvidia: #538200;
  /* outcomes: beat baseline, no better, failed checks, refused */
  --oc-beat: #6cc07c; --oc-flat: #e0dbd1; --oc-fail: #c2352b; --oc-hatch: #8a8278;
  --partial-mix: 62%;
  --header-h: 72px;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(20px, 3vw, 40px);
  --ease: cubic-bezier(.33, 1, .68, 1);
  --cell: 40px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #201d1a; --raised: #2a2622; --ink: #f3eee6; --muted: #b6ad9f; --faint: #8f877b;
    --line: #433d36; --line-soft: #332e29; --row-hover: #302b27;
    --accent: #ff833f; --link-line: #615950; --focus: #ff833f;
    --tip-shadow: 0 6px 24px rgba(0, 0, 0, .5); --logo-filter: brightness(0) invert(.92);
    --p-openai: #d8d0c3;    --pt-openai: #ece4d6;
    --p-anthropic: #d59079; --pt-anthropic: #e0ae9d;
    --p-xai: #d8b878;       --pt-xai: #e3cc9e;
    --p-moonshot: #3192fe;  --pt-moonshot: #68affe;
    --p-google: #59b872;    --pt-google: #85cb98;
    --p-meta: #2e9ef6;      --pt-meta: #66b8f8;
    --p-deepseek: #4a65ea;  --pt-deepseek: #7a8ef0;
    --p-nvidia: #8fc62e;    --pt-nvidia: #add566;
    --oc-beat: #7fd18e; --oc-flat: #58514a; --oc-fail: #e5483f; --oc-hatch: #9a9184;
    --partial-mix: 80%;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #201d1a; --raised: #2a2622; --ink: #f3eee6; --muted: #b6ad9f; --faint: #8f877b;
  --line: #433d36; --line-soft: #332e29; --row-hover: #302b27;
  --accent: #ff833f; --link-line: #615950; --focus: #ff833f;
  --tip-shadow: 0 6px 24px rgba(0, 0, 0, .5); --logo-filter: brightness(0) invert(.92);
  --p-openai: #d8d0c3;    --pt-openai: #ece4d6;
  --p-anthropic: #d59079; --pt-anthropic: #e0ae9d;
  --p-xai: #d8b878;       --pt-xai: #e3cc9e;
  --p-moonshot: #3192fe;  --pt-moonshot: #68affe;
  --p-google: #59b872;    --pt-google: #85cb98;
  --p-meta: #2e9ef6;      --pt-meta: #66b8f8;
  --p-deepseek: #4a65ea;  --pt-deepseek: #7a8ef0;
  --p-nvidia: #8fc62e;    --pt-nvidia: #add566;
  --oc-beat: #7fd18e; --oc-flat: #58514a; --oc-fail: #e5483f; --oc-hatch: #9a9184;
  --partial-mix: 80%;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.55 var(--serif); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ol, ul, dl, dd, dt, figure { margin: 0; }
[hidden] { display: none !important; }
ol, ul { padding: 0; }
h1, h2, h3, h4 { font-weight: 400; color: var(--ink); text-wrap: balance; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
code { font: .86em/1.4 var(--mono); background: var(--row-hover); padding: 1px 4px; border-radius: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.visually-hidden, .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--ground); padding: 8px 12px; border: 2px solid var(--focus); font: 13px var(--mono); }
.skip:focus { left: 12px; }
table, svg text { font-variant-numeric: tabular-nums; }
.label { font: 400 11px/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* plain explanatory lines under each chart */
.notes-below { margin-top: 12px; display: grid; gap: 3px; max-width: 760px; }
.notes-below p { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* provider logo */
.logo { width: 15px; height: 15px; flex: none; color: var(--pc, var(--faint)); display: inline-block; vertical-align: -2px; }

/* ------------------------------------------------------------ frame */
.wrap { max-width: calc(880px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.valen-logo .valen-logo__symbol { width: 19px; height: 22px; filter: var(--logo-filter); }
.valen-logo .valen-logo__wordmark { font-size: 15px; color: var(--ink); }

/* footer: copyright left, the Valen mark centred, the same three links valenlabs.com carries on the right.
   Type follows valenlabs.com's own footer: mono, 12px, muted, with the separators a shade fainter. */
.site-footer { margin-top: 64px; padding: 22px 0 34px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.site-footer__copy { font: 12px/1.5 var(--mono); color: var(--faint); margin: 0; justify-self: start; }
.site-footer__mark { width: 19px; height: 22px; filter: var(--logo-filter); opacity: .85; justify-self: center; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
  font: 12px/1.4 var(--mono); justify-self: end; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.site-footer nav span { color: var(--faint); }
@media (max-width: 560px) {
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; }
  .site-footer__copy { justify-self: center; text-align: center; }
  .site-footer nav { justify-content: center; justify-self: center; order: -1; }
}
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { font: 400 13px/1 var(--mono); color: var(--muted); text-decoration: none; padding: 8px 0; position: relative; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--ink); }
.theme-toggle { width: 30px; height: 30px; border: 0; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; padding: 0; }
.theme-toggle:hover { color: var(--ink); background: var(--row-hover); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
.theme-toggle[data-resolved="dark"] .i-sun { display: none; }
.theme-toggle[data-resolved="dark"] .i-moon { display: block; }
main { padding-bottom: 48px; }

/* ------------------------------------------------------------ intro */
.intro { padding-top: 48px; }
.intro h1 { font-size: 46px; line-height: 1.06; letter-spacing: -.02em; }
.tagline { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 640px; margin-top: 14px; }
.intro-cta { display: flex; width: fit-content; align-items: center; gap: 10px; margin-top: 24px; font-size: 17px; text-decoration: none; }
.intro-cta-next { margin-top: 12px; }
.intro-cta svg, .back svg, .pn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.intro-cta:hover { color: var(--accent); }

/* ------------------------------------------------------------ sections */
.block { margin-top: 72px; }
.block-tight { margin-top: 44px; }
.block-head, .fig-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.fig-head { align-items: baseline; margin-bottom: 16px; }
h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
.fig-title { font-size: 20px; line-height: 1.25; }
.block-sub { color: var(--muted); font-size: 16px; line-height: 1.5; margin: 8px 0 18px; }
.section-title { margin-bottom: 16px; }
.tabs { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 6px 0 5px; font: 400 12.5px/1.2 var(--mono); color: var(--muted); border-bottom: 1px solid transparent; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t { width: 100%; border-collapse: collapse; }
.t th { font: 400 11px/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: bottom; }
.t td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
.t th:last-child, .t td:last-child { padding-right: 0; }
.t .r { text-align: right; }
.t td.n { font: 13px/1.4 var(--mono); white-space: nowrap; }
.t tbody tr:hover > td, .t tbody tr.hl > td { background: var(--row-hover); }
.t tbody tr[tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.model-cell { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.model-name { font-size: 16px; line-height: 1.3; color: var(--ink); }
.tag { font: 400 10.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-left: 6px; }
/* provider tag (LSVP): the reasoning-tag type in a hairline box, so it reads as a label */
.ptag { display: inline-block; border: 1px solid var(--line); border-radius: 3px; background: none; padding: 1px 4px 0; margin-left: 7px; font: 500 9.5px/1.35 var(--mono); letter-spacing: .07em; color: var(--muted); vertical-align: 2px; cursor: help; }
button.ptag:hover { color: var(--ink); border-color: var(--muted); }
.tip .ptag { margin: 0 1px 0 5px; vertical-align: 1px; }
.harness-cell { font: 12.5px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
tr.partial td { color: var(--muted); }
tr.partial .model-name { font-style: italic; color: color-mix(in srgb, var(--ink) var(--partial-mix), var(--ground)); }
tr.partial .logo { opacity: .55; }
.progress { font: 11.5px var(--mono); color: var(--muted); }
.group-row td { padding: 18px 0 8px !important; border-bottom: 1px solid var(--line); font: 400 11px/1.45 var(--mono) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) !important; background: none !important; }

/* leaderboard: 12 px pills in the benchmarks.bio style, value on the left */
.lb .c-rank { width: 30px; font: 13px var(--mono); color: var(--muted); }
.lb .c-n { width: 34px; }
.lb .c-score { width: 44%; }
.lb .c-spend { width: 78px; font: 13px var(--mono); color: var(--muted); white-space: nowrap; }
.lb tbody .c-spend { color: var(--ink); }
/* the harness now reads as a tag in the model cell; a dot keeps it from running into the reasoning effort */
.lb .harness-inline::before { content: '\00B7'; margin-right: 5px; opacity: .5; }
.score-head { display: block; margin-left: 52px; }
.lb-scale { position: relative; display: block; height: 14px; margin-left: 52px; margin-top: 2px; }
.lb-scale span { position: absolute; transform: translateX(-50%); font: 10.5px var(--mono); letter-spacing: 0; color: var(--muted); }
.lb-scale span:first-child { transform: none; }
.lb-scale span:last-child { transform: translateX(-100%); }
.score-cell { display: flex; align-items: center; gap: 12px; }
.score-val { font: 500 12.5px var(--mono); min-width: 40px; color: var(--ink); }
.track { position: relative; flex: 1 1 auto; height: 16px; min-width: 70px; }
.gridline { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--line-soft); }
.pill { position: absolute; left: 0; top: 2px; height: 12px; border-radius: 6px; background: var(--pc); opacity: .9; transform-origin: 0 50%; }
.whisker { position: absolute; top: 7.5px; height: 1px; background: var(--muted); }
.whisker::before, .whisker::after { content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--muted); }
.whisker::before { left: 0; } .whisker::after { right: 0; }
/* baseline: its own row, and a dashed rule at its score through every track */
.base-rule { position: absolute; top: -10px; bottom: -10px; width: 0; border-left: 1px dashed var(--muted); }
.base-row td, .base-row .score-val { color: var(--muted); }
.base-row .model-name { color: var(--muted); }
.logo-gap { width: 15px; flex: none; }
.pill-base { background: none; border: 1px dashed var(--muted); opacity: 1; }
/* outcomes: 100% stacked bar of graded runs, value on the right */
.oc-bar { position: absolute; left: 0; right: 0; top: 2px; height: 12px; display: flex; gap: 2px; border-radius: 6px; overflow: hidden; transform-origin: 0 50%; }
.seg { display: block; min-width: 2px; height: 100%; }
.seg-beat { background: var(--oc-beat); }
.seg-flat { background: var(--oc-flat); }
.seg-invalid { background: var(--oc-fail); }
/* refused: ground with thin diagonal hatching and a hairline outline, so it reads against the ground in both themes */
.seg-refused { background: repeating-linear-gradient(135deg, var(--oc-hatch) 0 1px, var(--ground) 1px 4px); box-shadow: inset 0 0 0 1px var(--oc-hatch); }
tr.partial .oc-bar { opacity: .5; }
.oc-val { min-width: 92px; text-align: right; font: 12.5px var(--mono); white-space: nowrap; color: var(--ink); }
.oc-val b { font-weight: 500; }
.oc-count { color: var(--muted); }
.oc-count::before { content: " · "; }
.view-outcomes .score-head { margin-left: 0; }
.view-outcomes .lb-scale { display: none; }
.oc-sw { display: inline-block; width: 20px; height: 10px; border-radius: 3px; flex: none; }
.tip .oc-sw { width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ref-inline { display: none; }
.lb .ref-inline { color: var(--accent); }
.cov-tag { display: inline-block; margin-left: 7px; padding: 1px 5px 0; border: 1px solid currentColor; border-radius: 3px; font: 500 9.5px/1.35 var(--mono); letter-spacing: .04em; color: var(--accent); vertical-align: 2px; white-space: nowrap; cursor: help; }
@media (max-width: 720px) { .lb .cov-tag { margin: 2px 0 0; } }

/* task-set tabs above the leaderboard, and the caption under chart headings that names the set */
.set-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -4px 0 12px; }
.set-bar-label { font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.set-bar .tabs { gap: 16px; }
.set-caption { font: 12px/1.4 var(--mono); color: var(--muted); margin: -8px 0 12px; }
/* heatmap with many task columns: break out of the text column on wide screens */
.heat-wrap.wide { --wide-w: min(1200px, calc(100vw - 2 * var(--gutter))); width: var(--wide-w); margin-left: calc((100% - var(--wide-w)) / 2); }
.heat-wrap.wide .heat { --cell: 36px; }
.na-sw { display: inline-block; width: 12px; height: 12px; box-shadow: inset 0 0 0 1px var(--line); }

/* ------------------------------------------------------------ charts */
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; overflow: visible; }
.panel[hidden] { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 12px/1.5 var(--mono); color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .glyph { color: var(--ink); font-size: 11px; }
.chart-legend { margin: 10px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--raised); border-radius: 999px; padding: 4px 11px 4px 8px; font: 12px/1.3 var(--mono); color: var(--ink); }
.chip:hover { border-color: var(--muted); }
.chip .logo { width: 13px; height: 13px; vertical-align: 0; }
.chip[aria-pressed="false"] { background: none; color: var(--faint); border-style: dashed; }
.chip[aria-pressed="false"] span { text-decoration: line-through; text-decoration-color: var(--faint); }
.chip[aria-pressed="false"] .logo { opacity: .4; }
.lg-line { display: inline-block; width: 18px; height: 0; border-top: 1.5px dashed var(--muted); }
.lg-line.lg-ref { border-top: 1.5px solid var(--accent); }
.legend .glyph.lg-faint { opacity: .4; }
.ax { fill: var(--muted); font: 10.5px var(--mono); }
.ax-title { fill: var(--muted); font: 11px var(--mono); }
.gl { stroke: var(--line); stroke-width: 1; }
.gl-soft { stroke: var(--line-soft); stroke-width: 1; }
.lab { fill: var(--ink); font: 14px var(--serif); }
.lab-sub { fill: var(--muted); font: 9.5px var(--mono); letter-spacing: .06em; }
.pt-label { font: italic 13.5px var(--serif); paint-order: stroke; stroke: var(--ground); stroke-width: 9px; stroke-linejoin: round; }
.val { fill: var(--ink); font: 12px var(--mono); }
.val-muted { fill: var(--muted); font: 12px var(--mono); }
.frontier { fill: none; stroke: var(--faint); stroke-width: 1.4; stroke-dasharray: 4 4; }
.ref-line { stroke: var(--accent); stroke-width: 1; opacity: .75; }
.ref-label { fill: var(--accent); font: 10.5px var(--mono); paint-order: stroke; stroke: var(--ground); stroke-width: 3px; }
/* the benchmark baseline on the home chart: there for reference, not to be read first */
.ref-line.quiet { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 5; opacity: .28; }
.ref-label.quiet { fill: var(--muted); opacity: .8; }
.m-mean { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.m-link { stroke: var(--line); stroke-width: 2; stroke-linecap: round; }
.m-x { stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; fill: none; }
.hit { fill: transparent; }
.row { outline: none; }
.row .band { fill: transparent; }
.row:hover .band, .row:focus .band { fill: var(--row-hover); }
.row:focus-visible .band { stroke: var(--focus); stroke-width: 1.5; }
.pt { outline: none; transition: opacity .15s ease; }
.pt.partial { opacity: .5; }
.pt:hover circle.ring, .pt.hl circle.ring { stroke-width: 3; }
.pt.hl { opacity: 1; }
.dimmed .pt:not(.hl) { opacity: .22; }

/* heatmap: agents as rows, tasks as columns, square cells on a strict grid */
.heat-wrap { margin: 0 -2px; }
.heat { border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.heat col.c-agent { width: 196px; }
.heat col.c-cell { width: var(--cell); }
.heat thead th { font: 400 11px var(--mono); color: var(--muted); text-align: center; vertical-align: bottom; padding: 0 0 6px; white-space: nowrap; }
.heat thead th a { text-decoration: none; color: inherit; }
.heat thead th a:hover { color: var(--ink); text-decoration: underline; }
.heat tbody th { text-align: right; font-weight: 400; padding: 0 10px 0 0; position: sticky; left: 0; background: var(--ground); z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat tbody th .hn { font-size: 14px; color: var(--ink); }
.heat tbody th .ptag { margin-left: 6px; font-size: 9px; }
.heat tbody th .hh { display: block; font: 9.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.heat td { width: var(--cell); height: var(--cell); padding: 0; text-align: center; vertical-align: middle; cursor: pointer; position: relative; border-radius: 3px; line-height: 1; }
.heat td:hover { outline: 1px solid var(--ink); outline-offset: -1px; }
.heat td.nolink { cursor: default; }
.heat td:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.heat td.best { box-shadow: inset 0 0 0 1.5px var(--ink); }
.heat .hv { display: block; font: 11.5px var(--mono); }
.heat td.best .hv { font-weight: 600; }
.heat .hg { display: block; font-size: 6.5px; letter-spacing: 1.5px; margin-top: 3px; opacity: .85; }
.heat td.na { background: transparent; box-shadow: inset 0 0 0 1px var(--line-soft); cursor: default; }
.heat td.refused { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--line) 4px 5px) !important; color: var(--ink) !important; }
.heat tr.partial th, .heat tr.partial td { opacity: .55; }
.heat tr.sep th, .heat tr.sep td { padding-top: 14px; }
.heat tr.sep th { font: 400 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: right; }

/* ------------------------------------------------------------ coverage matrix: tasks grouped by area, a dot per skill
   Same header type and hairlines as the leaderboard; equal skill columns; empty cells are blank. */
.matrix-intro { margin-top: 6px; }
.matrix { width: 100%; border-collapse: collapse; table-layout: fixed; }
.matrix col.m-task-col { width: 37%; }
.matrix thead th, .matrix thead td { vertical-align: bottom; text-align: center; font-weight: 400; padding: 0 2px 10px; border-bottom: 1px solid var(--line); }
.matrix .m-lab { display: block; font: 400 10px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-wrap: balance; }
.matrix .m-count { display: block; margin-top: 4px; font: 11px var(--mono); color: var(--faint); }
.matrix thead th.hc .m-lab { color: var(--ink); }
.matrix thead th[tabindex] { cursor: help; }
.matrix thead th:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.matrix .m-area-head th { text-align: left; font-weight: 400; padding: 16px 0 6px; border-bottom: 1px solid var(--line); }
.matrix tbody:first-of-type .m-area-head th { padding-top: 12px; }
.m-area-name { font: 400 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.m-area-n { font: 11px var(--mono); color: var(--faint); margin-left: 8px; }
.matrix .m-row th { text-align: left; font-weight: 400; padding: 0 12px 0 0; border-bottom: 1px solid var(--line-soft); }
.m-task { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.matrix .m-row .m-task { padding: 5px 0; }
.m-id { font: 11px var(--mono); color: var(--faint); flex: none; width: 24px; }
.m-title { font-size: 15px; line-height: 1.35; }
a.m-task .m-title { text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 4px; }
a.m-task:hover .m-title { text-decoration-color: currentColor; }
.matrix .m-row td { text-align: center; vertical-align: middle; padding: 0; border-bottom: 1px solid var(--line-soft); }
.matrix .m-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: .85; vertical-align: middle; }
.matrix .m-row:hover > *, .matrix .m-row:focus-within > * { background: var(--row-hover); }
.matrix .m-row .hc { background: color-mix(in srgb, var(--row-hover) 70%, transparent); }
.matrix .m-row:hover .hc { background: var(--row-hover); }
.matrix-list { display: none; }
.ml-area + .ml-area { margin-top: 18px; }
.ml-head { display: flex; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 400; }
.matrix-list ul { list-style: none; }
.matrix-list li { padding: 8px 0 9px; border-bottom: 1px solid var(--line-soft); }
.ml-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 0 34px; }
.ml-chip { font: 10.5px/1.4 var(--mono); letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
@media (max-width: 720px) { .matrix-wrap { display: none; } .matrix-list { display: block; } }

/* ------------------------------------------------------------ task cards */
.cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); display: flex; flex-direction: column; }
.card a.card-link { color: inherit; text-decoration: none; }
.card a.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; z-index: 1; }
.card a.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--ink); }
.card:hover .card-link { text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 4px; }
.cards.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-body { padding: 14px 16px 12px; display: flex; flex-direction: column; flex: 1 1 auto; gap: 6px; }
.card .cid { font: 11px var(--mono); letter-spacing: .06em; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; text-transform: uppercase; }
.card .cid-id { color: var(--ink); font-weight: 500; }
.card .cid-area { color: var(--faint); }
.card h3 { font-size: 17px; line-height: 1.25; }
.card p { font-size: 14px; line-height: 1.45; color: var(--muted); }
.card p.base-line { font: 11px/1.45 var(--mono); color: var(--accent); }
.card .foot { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; font: 11.5px var(--mono); color: var(--muted); }
.card { transition: border-color .15s ease; }
.card:hover { border-color: var(--ink); }
.mini { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.mini i { display: block; width: 7px; border-radius: 3.5px; background: var(--pc); opacity: .9; transform-origin: 50% 100%; }
.best-line { text-align: right; line-height: 1.35; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.best-score { display: inline-flex; align-items: center; gap: 6px; }
.best-score .logo { width: 14px; height: 14px; vertical-align: 0; }
.best-line b { font-weight: 500; color: var(--ink); }

/* ------------------------------------------------------------ task and method pages */
.back { display: inline-flex; align-items: center; gap: 6px; font: 12px var(--mono); color: var(--muted); text-decoration: none; margin-top: 40px; }
.back svg { width: 14px; height: 14px; }
.back:hover { color: var(--ink); }
.task-hero h1 { font-size: 46px; line-height: 1.06; letter-spacing: -.02em; margin-top: 18px; max-width: 800px; }
/* facts: one label column, aligned first baselines, hairline rules */
.facts { margin-top: 14px; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 28px; align-items: baseline; padding: 13px 0 14px; border-bottom: 1px solid var(--line); }
.facts dt { font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { font-size: 16px; line-height: 1.6; max-width: 72ch; text-wrap: pretty; }
.facts .src-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.facts .src-link:hover { text-decoration-color: var(--accent); color: var(--accent); }
.facts .src-by { display: block; font: 12.5px/1.5 var(--mono); color: var(--muted); margin-top: 3px; }
.facts .src-lic { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.facts .src-lic:hover { color: var(--accent); }
.facts dd b { font-weight: 500; }
.prose { max-width: 650px; }
.prose p { font-size: 16px; line-height: 1.6; }
.prose p + p, .prose p + ol, .prose ol + p { margin-top: 12px; }
.prose ol { padding-left: 20px; }
.prose ol ul { padding-left: 20px; margin: 4px 0 2px; list-style: disc; }
.prose ol ul li { margin-top: 3px; }
.prose li { margin-top: 6px; font-size: 16px; line-height: 1.55; }
.prose li::marker { color: var(--muted); }
.small-t td, .small-t th { font-size: 14px; }
.small-t td.n { font-size: 12.5px; }
.status-tag { font: 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-left: 8px; }
.pn { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 20px; }
.pn a { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; text-decoration: none; }
.pn a:hover { text-decoration: underline; }
.doc h2 { margin-top: 40px; margin-bottom: 12px; }

/* ------------------------------------------------------------ run table: trace links */
.t tbody tr.linked { cursor: pointer; }
.trace-cell a, .trace-cell span { font: 12px var(--mono); }
.trace-cell span { color: var(--faint); }
.run-no { font-size: 15px; color: var(--muted); white-space: nowrap; }
tr.linked:hover .trace-cell a { text-decoration-color: currentColor; }
.pt.linked { cursor: pointer; }

/* ------------------------------------------------------------ trace page (traces/<trial>.html, assets/js/trace.js) */
.trace-hero { margin-top: 18px; }
.trace-name { font-size: 40px; line-height: 1.1; letter-spacing: -.015em; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.trace-logo { display: inline-flex; }
.trace-logo .logo { width: 28px; height: 28px; vertical-align: 0; }
.trace-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 12px; font: 400 12.5px/1.45 var(--mono); color: var(--muted); }
.trace-meta .trace-task { font: 17px/1.4 var(--serif); color: var(--ink); }
.trace-meta .sep { color: var(--faint); }
.trace-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 14px 20px; margin-top: 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trace-stats:empty { display: none; }
.trace-stats dt { font: 400 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.trace-stats dd { font: 500 17px/1.3 var(--mono); margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trace-stats dd .status-tag { margin-left: 7px; vertical-align: 2px; }
.trace-stats dd .status-tag.pass { color: var(--muted); }
.trace-stats .sub { display: block; font: 400 11px/1.4 var(--mono); color: var(--muted); margin-top: 1px; }
.trace-notes { margin-top: 14px; display: grid; gap: 2px; max-width: 760px; }
.trace-notes p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.trace-body { margin-top: 36px; }
.trace-tabs { border-bottom: 1px solid var(--line); display: flex; }
.trace-tab { font: 400 12.5px/1.2 var(--mono); color: var(--ink); padding: 0 2px 10px; border-bottom: 2px solid var(--ink); margin-bottom: -1px; }
.trace-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding: 14px 0 10px; }
.trace-bar:empty { display: none; }
.trace-count { font: 12.5px var(--mono); color: var(--muted); }
.trace-ctrls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; }
.trace-ctrls .tabs { gap: 14px; }
.trace-ctrls .tabs .k { color: var(--faint); margin-left: 5px; }
.trace-ctrls .tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.trace-ctrls .tabs button[disabled] { color: var(--faint); cursor: default; }
.trace-btn { border: 1px solid var(--line); background: var(--raised); border-radius: 4px; padding: 3px 10px; font: 11.5px/1.4 var(--mono); color: var(--muted); }
.trace-btn:hover { color: var(--ink); border-color: var(--muted); }
.trace-keys { font: 11px var(--mono); color: var(--faint); }
.trace-empty { padding: 28px 0; color: var(--muted); font-size: 16px; }
/* analysis verdict under the stats */
.trace-verdict { display: grid; gap: 4px; padding: 2px 0 6px; }
.trace-verdict .lbl { font: 400 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.trace-verdict p { font: 16px/1.5 var(--serif); color: var(--ink); }
.sep-trials .tag { font: 10.5px/1.3 var(--mono); letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; }
.trace-on { font: 400 15px/1.4 var(--serif); color: var(--muted); }
.trace-on a.trace-task { color: var(--ink); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
.trace-on a.trace-task:hover { text-decoration-color: currentColor; }
/* run trace timeline */
.trace-chart { padding: 18px 0 6px; min-height: 196px; }
.rt-svg { display: block; overflow: visible; font-family: var(--mono); }
.rt-lab { font-size: 9.5px; fill: var(--faint); letter-spacing: .04em; }
.rt-cap { text-transform: uppercase; letter-spacing: .1em; font-size: 9px; }
.rt-ph-lab { fill: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.rt-base0 { stroke: var(--line); stroke-width: 1; }
.rt-bl { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.rt-bl-lab { fill: var(--accent); }
.rt-val { font-size: 11px; fill: var(--ink); font-weight: 500; }
.rt-phase { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; opacity: .7; }
.rt-line { fill: none; stroke: var(--oc-beat); stroke-width: 1.4; opacity: .8; }
.rt-pt { fill: var(--oc-beat); stroke: var(--ground); stroke-width: 1.5; cursor: default; }
.rt-pt.bad { fill: var(--ground); stroke: var(--oc-fail); stroke-width: 1.6; }
.rt-sub { stroke: var(--ink); stroke-width: 1.6; }
.rt-chk { fill: var(--oc-beat); stroke: var(--ground); stroke-width: 1; }
.rt-chk.bad { fill: var(--oc-fail); }
.rt-bar { fill: var(--faint); opacity: .75; }
.rt-err { fill: var(--oc-fail); opacity: .85; }
.rt-tick { stroke: var(--line); }
.rt-hit { fill: transparent; cursor: pointer; }
.rt-hit:hover { fill: color-mix(in srgb, var(--ink) 7%, transparent); }
.rt-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font: 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rt-legend i { display: inline-block; flex: none; }
.lg-pt { width: 8px; height: 8px; border-radius: 50%; background: var(--oc-beat); }
.lg-bad { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--oc-fail); box-sizing: border-box; }
.lg-sub { width: 2px; height: 11px; background: var(--ink); }
.lg-bar { width: 10px; height: 8px; background: var(--faint); opacity: .75; }
.lg-err { width: 10px; height: 8px; background: var(--oc-fail); }
.lg-chk { width: 7px; height: 7px; background: var(--oc-beat); transform: rotate(45deg); }
.lg-ph { width: 0; height: 11px; border-left: 1px dashed var(--muted); }
.lg-bl { width: 14px; height: 0; border-top: 1px dashed var(--accent); }
/* toolbar */
.trace-body .trace-bar { position: sticky; top: 0; z-index: 5; background: var(--ground); border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
.trace-go { display: inline-flex; align-items: center; gap: 6px; font: 12px var(--mono); color: var(--faint); }
.trace-go-in { width: 64px; border: 1px solid var(--line); background: var(--raised); border-radius: 4px; padding: 3px 8px; font: 11.5px/1.4 var(--mono); color: var(--ink); }
.trace-go-in:focus { outline: none; border-color: var(--muted); }
.trace-chk { display: inline-flex; align-items: center; gap: 6px; font: 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.trace-chk input { accent-color: var(--ink); }
.trace-filters { flex-basis: 100%; justify-content: space-between; }
.trace-btn { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
/* turn cards */
.trace-list ol { list-style: none; }
.tcs { display: grid; gap: 12px; padding-top: 16px; }
.tc { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; scroll-margin-top: 128px; }
.tc-g { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 11px; font: 12px/1.3 var(--mono); color: var(--muted); }
.tc-g .tc-t { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tc-card { min-width: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--raised); padding: 10px 16px 12px; transition: border-color .3s ease, box-shadow .3s ease; }
.tc.flash .tc-card { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tc.instr .tc-card { background: color-mix(in srgb, var(--raised) 60%, var(--ground)); }
.tc-head { display: flex; align-items: center; gap: 10px; cursor: pointer; font: 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); user-select: none; }
.tc-role { border: 1px solid var(--muted); border-radius: 3px; padding: 0 5px; font-size: 9.5px; color: var(--ink); }
.tc.instr .tc-role, .tc-role:only-child { border-color: var(--line); }
.tc-flag { font-size: 9.5px; }
.tc-flag.err { color: var(--oc-fail); }
.tc-flag.sub { color: var(--ink); }
.tc-sp { flex: 1; }
.tc-tok { letter-spacing: .02em; text-transform: none; color: var(--faint); font-variant-numeric: tabular-nums; }
.tc-link { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; font-size: 9.5px; color: var(--faint); text-decoration: none; }
.tc-link svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.tc-link:hover { color: var(--ink); border-color: var(--muted); }
.tc-link.copied { color: var(--oc-beat); border-color: var(--oc-beat); }
.tc-tog { border: 0; background: none; padding: 0 2px; font: 13px/1 var(--mono); color: var(--muted); width: 20px; }
.tc-tog:hover { color: var(--ink); }
.tc-sum { margin-top: 6px; font: 14.5px/1.45 var(--serif); color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tc-sum code { font: 12px var(--mono); color: var(--muted); }
.tc-sum .faint { color: var(--faint); }
.tc.open .tc-sum { display: none; }
.tc-body { display: grid; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); min-width: 0; }
.tc-body .lbl { font: 400 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tc-body .meta { letter-spacing: .02em; text-transform: none; color: var(--faint); }
.tc-body .meta.bad { color: var(--oc-fail); }
.tc-thought { border-left: 2px solid var(--line); padding-left: 12px; display: grid; gap: 4px; }
.tc-body .reason { font: italic 14.5px/1.6 var(--serif); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-body .msg { font: 13px/1.65 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-body .msg.instr { font-size: 12.5px; color: var(--ink); }
.tc-tool { border: 1px solid var(--line-soft); border-radius: 3px; background: var(--ground); padding: 8px 12px; display: grid; gap: 6px; min-width: 0; }
.tc-tool.error { border-color: color-mix(in srgb, var(--oc-fail) 40%, var(--line)); }
.tc-tool-h { display: flex; justify-content: space-between; gap: 10px; font: 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tc-tool-h .meta { letter-spacing: .02em; text-transform: none; color: var(--faint); }
.tc-body pre { margin: 0; font: 12px/1.55 var(--mono); color: var(--ink); tab-size: 4; max-width: 100%; }
.tc-cmd { white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-cmd .ps { color: var(--faint); user-select: none; }
.tc-out { border-top: 1px dashed var(--line-soft); padding-top: 6px; }
.tc-out summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: baseline; font: 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.tc-out summary::-webkit-details-marker { display: none; }
.tc-out summary:hover { color: var(--ink); }
.tc-out .tc-arr { display: inline-block; transition: transform .15s ease; }
.tc-out[open] .tc-arr { transform: rotate(90deg); }
.tc-out pre.out { margin-top: 6px; padding: 8px 10px; background: var(--raised); border: 1px solid var(--line-soft); border-radius: 3px; white-space: pre; overflow-x: auto; color: var(--muted); }
.tc-out pre.out.error { border-color: color-mix(in srgb, var(--oc-fail) 45%, var(--line)); }
.tc-body .clip { max-height: 280px; overflow-y: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.tc-body .more { justify-self: start; border: 0; background: none; padding: 0; font: 11px var(--mono); color: var(--muted); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
.tc-body .more:hover { color: var(--ink); }
.tc-body .none { font: 12px var(--mono); color: var(--faint); }
.phase-head { display: flex; align-items: baseline; gap: 14px; font: 400 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); padding: 20px 0 6px 78px; border-bottom: 1px solid var(--line); }
.phase-head:first-child { padding-top: 4px; }
.phase-head .ph-score { color: var(--muted); letter-spacing: .04em; text-transform: none; }
.phase-head .ph-score.bad { color: var(--oc-fail); }
/* task page: what separated the runs */
.seps { margin-top: 14px; }
.sx-lead { font: 400 17px/1.55 var(--serif); color: var(--ink); max-width: 760px; margin-bottom: 22px; text-wrap: pretty; }
.sx-panel { border-top: 1px solid var(--line); padding-top: 12px; }
.sx-tabs { align-items: baseline; gap: 4px 20px; margin-bottom: 18px; }
.sx-tabs button { text-align: left; }
.sx-tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.sx-strip { margin: 0 0 8px; }
.sx-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sx-row { font: 500 12px var(--mono); fill: var(--ink); }
.sx-row.rest { fill: var(--muted); font-weight: 400; }
.sx-avg { font: 11px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--ground); stroke-width: 5px; stroke-linejoin: round; }
.sx-avg-line { stroke: var(--ink); stroke-width: 1.5; }
.sx-rule { stroke: var(--line); stroke-width: 1; }
.sx-dot { cursor: default; outline: none; }
a.sx-dot { cursor: pointer; }
.sx-dot > g { transition: transform .2s var(--ease); transform-box: fill-box; transform-origin: center; }
.sx-dot:hover > g, .sx-dot:focus-visible > g { transform: scale(1.3); }
.sx-dot:hover circle.ring, .sx-dot:focus-visible circle.ring { stroke: var(--ink); stroke-width: 2.4; }
.sx-key { font: 12px/1.5 var(--mono); color: var(--muted); margin: 0 0 18px; }
.sx-detail { padding-bottom: 8px; max-width: 760px; }
.sx-text { font: 15px/1.55 var(--serif); }
.sx-pick { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .sx-dot > g { transition: none; } }
.verdict-cell { font: 13px/1.4 var(--serif); color: var(--muted); max-width: 360px; white-space: normal; margin: 3px 0 0 27px; }
.trace-sentinel { height: 1px; }
.trace-more { padding: 16px 0; font: 12px var(--mono); color: var(--muted); }
@media (max-width: 720px) {
  .trace-name { font-size: 28px; gap: 10px; }
  .trace-logo .logo { width: 22px; height: 22px; }
  .trace-meta .trace-task { font-size: 16px; }
  .trace-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
  .trace-stats dd { font-size: 15px; white-space: normal; }
  .trace-keys, .trace-ctrls .tabs .k, .tc-tok { display: none; }
  .trace-ctrls .tabs { gap: 12px; }
  .tc { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .tc-g { flex-direction: row; gap: 8px; justify-content: flex-start; padding-top: 0; text-align: left; }
  .tc-card { padding: 9px 11px; }
}

/* ------------------------------------------------------------ citation */
.cite-box { max-width: 760px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); min-width: 0; }
.cite-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); }
.cite-copy { border: 1px solid var(--line); background: var(--ground); border-radius: 4px; padding: 3px 10px; font: 11.5px/1.4 var(--mono); color: var(--muted); min-width: 64px; }
.cite-copy:hover { color: var(--ink); border-color: var(--muted); }
.cite-code { margin: 0; padding: 12px 14px 14px; font: 12.5px/1.65 var(--mono); color: var(--ink); white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch; tab-size: 2; }
.cite-code:focus-visible { outline-offset: -2px; }

/* ------------------------------------------------------------ tooltip */
.tip { position: fixed; z-index: 100; pointer-events: none; opacity: 0; visibility: hidden; max-width: min(300px, calc(100vw - 24px)); background: var(--raised); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--tip-shadow); padding: 9px 11px; font: 12px/1.5 var(--mono); }
.tip.on { opacity: 1; visibility: visible; }
.tip .tv { font-size: 15px; font-weight: 500; }
.tip .tl { font: 13px/1.35 var(--serif); color: var(--muted); margin-top: 1px; }
.tip .tr { display: flex; justify-content: space-between; gap: 14px; }
.tip .trs { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tip .tn { font: 13px/1.45 var(--serif); color: var(--ink); }
.tip .tv + .tn, .tip .tl + .tn, .tip .trs + .tn { margin-top: 6px; color: var(--muted); }

/* ------------------------------------------------------------ load animations (only while <html> has .animate) */
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.55); } }
@media (prefers-reduced-motion: no-preference) {
  .animate .pill, .animate .oc-bar { animation: grow-x .42s var(--ease) calc(var(--i, 0) * 40ms) both; }
  .animate .whisker, .animate .score-val { animation: fade-in .24s ease calc(.2s + var(--i, 0) * 40ms) both; }
  .animate .mini i { animation: grow-y .42s var(--ease) calc(var(--i, 0) * 30ms + var(--j, 0) * 40ms) both; }
  .animate .card { animation: rise .4s var(--ease) calc(var(--j, 0) * 30ms) both; }
  .animate .heat td { animation: fade-in .3s ease calc(var(--i, 0) * 6ms) both; }
  .animate .pt-anim { transform-box: fill-box; transform-origin: center; animation: pop .38s var(--ease) calc(.15s + var(--i, 0) * 25ms) both; }
  .animate .fade-anim { animation: fade-in .5s ease calc(.35s + var(--i, 0) * 30ms) both; }
  .tip { transition: opacity .1s ease; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------ small screens */
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cards.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards.featured { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  :root { --header-h: 60px; --cell: 36px; }
  .site-nav { gap: 16px; }
  .intro { padding-top: 32px; }
  .intro h1, .task-hero h1 { font-size: 32px; }
  .tagline { font-size: 16px; }
  .block { margin-top: 56px; }
  .lb .c-n { display: none; }
  .lb .c-score { width: 33%; }
  .lb .c-spend { width: 50px; font-size: 11.5px; }
  .lb .c-rank { width: 20px; }
  .model-cell { white-space: normal; align-items: flex-start; }
  .model-cell .logo { margin-top: 3px; }
  .lb .tag { display: block; margin: 1px 0 0; }
  .lb .harness-inline { display: block; }
  .score-head, .lb-scale { margin-left: 46px; }
  .lb .ptag { display: inline-block; margin: 0 0 0 6px; }
  .oc-val { min-width: 0; line-height: 1.3; }
  .oc-count { display: block; font-size: 11px; }
  .oc-count::before { content: none; }
  .score-cell { gap: 6px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .facts > div { grid-template-columns: minmax(0, 1fr); row-gap: 5px; }
  .pn a { font-size: 15px; }
  .heat col.c-agent { width: 128px; }
  .heat tbody th .hn { font-size: 13px; }
}
@media (min-width: 721px) { .lb .ref-inline { display: none; } }
@media (forced-colors: active) { .pill, .mini i, .whisker, .whisker::before, .whisker::after, .seg, .matrix td.on .m-dot { background: CanvasText; forced-color-adjust: none; } .pill-base { background: none; border-color: CanvasText; } }

