/* Benchmark site in the Valen Labs brand (home, method and trace pages) (skill: valen-brand; tokens from valenlabs.com and FrontierBioML).
   Warm paper and ink, Newsreader and IBM Plex Mono, one burnt-orange accent. Light by default, dark through the OS
   setting or the theme toggle (data-theme on <html>). The hero stage uses the deep Valen dark in both themes. */

@font-face { font-family: ValenMark; src: url('../brand/valen-wordmark.woff2') format('woff2'); font-display: swap; font-weight: 500; font-style: normal; }
/* metric-matched local fallbacks, so text does not reflow when the web fonts arrive (display=swap). Overrides computed from
   the Newsreader / IBM Plex Mono files (hhea ascent and descent) and size-adjust tuned in Chrome so headings on the home and
   method pages move least when the fonts swap in (Georgia, Times New Roman, Menlo). */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 96%; ascent-override: 76.6%; descent-override: 27.6%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader Fallback T"; src: local("Times New Roman"), local("TimesNewRomanPSMT"); size-adjust: 105.1%; ascent-override: 69.9%; descent-override: 25.2%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Fallback"; src: local("Menlo"), local("Menlo-Regular"), local("Courier New"), local("CourierNewPSMT"); size-adjust: 99.7%; ascent-override: 102.8%; descent-override: 27.6%; line-gap-override: 0%; }

:root {
  color-scheme: light;
  --ground: #f5f3ee; --raised: #fbfaf7; --subtle: #ebe7df; --ink: #1b1815; --muted: #6b635a; --faint: #8a8278;
  --line: #dcd6ca; --line-soft: #e8e3d9; --link-line: #c2b8aa; --accent: #b9490f; --focus: #b9490f;
  --oc-beat: #6cc07c; --oc-fail: #c2352b; --oc-hatch: #8a8278;
  --tip-shadow: 0 6px 24px rgba(27, 24, 21, .12); --logo-filter: brightness(0);
  --deep: #0d0c0b; --deep-raised: #151311; --deep-ink: #ece6dc; --deep-muted: #958c80; --deep-line: #2a2521; --deep-accent: #ff833f;
  --f-a: #b9490f; --f-b: #4f7f9c; --f-c: #9c4a14;
  --serif: "Newsreader", "Newsreader Fallback", "Newsreader Fallback T", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "Plex Mono Fallback", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 3vw, 40px);
  --gutter-l: max(var(--gutter), env(safe-area-inset-left, 0px)); --gutter-r: max(var(--gutter), env(safe-area-inset-right, 0px));
  --header-h: 64px;
  --ease: cubic-bezier(.33, 1, .68, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #201d1a; --raised: #2a2622; --subtle: #302b27; --ink: #f3eee6; --muted: #b6ad9f; --faint: #8f877b;
    --line: #433d36; --line-soft: #332e29; --link-line: #615950; --accent: #ff833f; --focus: #ff833f;
    --oc-beat: #7fd18e; --oc-fail: #e5483f; --oc-hatch: #9a9184;
    --tip-shadow: 0 6px 24px rgba(0, 0, 0, .5); --logo-filter: brightness(0) invert(.92);
    --f-a: #ff833f; --f-b: #8fb3c9; --f-c: #ffcfb3;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #201d1a; --raised: #2a2622; --subtle: #302b27; --ink: #f3eee6; --muted: #b6ad9f; --faint: #8f877b;
  --line: #433d36; --line-soft: #332e29; --link-line: #615950; --accent: #ff833f; --focus: #ff833f;
  --oc-beat: #7fd18e; --oc-fail: #e5483f; --oc-hatch: #9a9184;
  --tip-shadow: 0 6px 24px rgba(0, 0, 0, .5); --logo-filter: brightness(0) invert(.92);
  --f-a: #ff833f; --f-b: #8fb3c9; --f-c: #ffcfb3;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); scroll-padding-top: calc(var(--header-h) + 12px); }
@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; }
h1, h2, h3, h4 { font-weight: 400; color: var(--ink); text-wrap: balance; }
h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -.01em; }
h3 { font-size: 20px; line-height: 1.25; }
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(--subtle); padding: 1px 4px; border-radius: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { 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: 300; background: var(--ground); padding: 8px 12px; border: 2px solid var(--focus); font: 13px var(--mono); }
.skip:focus { left: 12px; }
table, svg text, .mono, .num { font-variant-numeric: tabular-nums; }
.mono, .num { font-family: var(--mono); }
.num { font-size: 13px; }
.label { font: 400 11px/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.r { text-align: right; }
.wrap { max-width: calc(980px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter-l); }

/* ------------------------------------------------------------ header and footer */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ground) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.valen-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.valen-logo__symbol { width: 19px; height: 22px; filter: var(--logo-filter); }
.valen-logo__wordmark { font: 500 15px/1 ValenMark, var(--mono); letter-spacing: .35em; color: var(--ink); font-synthesis: none; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { font: 400 13px/1 var(--mono); color: var(--muted); text-decoration: none; padding: 8px 0; position: relative; white-space: nowrap; }
.site-nav a:hover, .site-nav a.is-current, .site-nav a[aria-current="page"] { color: var(--ink); }
.theme-toggle { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; border-radius: 50%; color: var(--muted); }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
@media (max-width: 860px) {
  .site-nav { gap: 14px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 18px; }
  .site-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .valen-logo__wordmark { display: none; }
  .site-header .wrap { gap: 12px; }
  .site-nav { gap: 12px; padding-right: 10px; }
  .site-nav a { font-size: 12px; }
}
@media (max-width: 420px) { .site-header .wrap { gap: 8px; } .site-nav { gap: 10px; padding-right: 0; mask-image: none; } .site-nav a { font-size: 11.5px; } .theme-toggle { width: 30px; height: 30px; } }
@media (max-width: 360px) { .site-nav { gap: 8px; } .site-nav a { font-size: 11px; } }

/* footer (FrontierBioML pattern): copyright left, the Valen mark centred,
   links right with faint separators. Mono 12px, no rule above. */
.site-footer { margin-top: 80px; padding: 22px 0 calc(34px + env(safe-area-inset-bottom, 0px)); }
.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; gap: 2px 16px; }
  .site-footer nav span { display: none; } /* five links wrap at phone width: spaced, without a dot left hanging at a line end */
}

/* ------------------------------------------------------------ citation (FrontierBioML pattern: BibTeX box with a copy button) */
.cite .block-sub { margin: 8px 0 18px; }
.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; cursor: pointer; }
.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; }

/* ------------------------------------------------------------ hero: the work cell on the deep Valen dark */
.hero { position: relative; background: var(--deep); color: var(--deep-ink); }
.hero__stage { position: relative; height: clamp(520px, 78vh, 760px); overflow: hidden; background: radial-gradient(110% 90% at 68% 40%, #1f1c19 0%, #12100f 55%, #0b0a09 100%); }
.hero__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.hero__stage[data-state="ready"] canvas { cursor: grab; }
.hero__stage[data-state="ready"] canvas.is-hover { cursor: pointer; }
.hero__stage canvas.is-drag { cursor: grabbing !important; }
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; transition: opacity .6s var(--ease); }
.hero__stage[data-state="ready"] .hero__poster { opacity: 0; pointer-events: none; }
/* while the 3D cell loads, show only the dark stage (the poster's framing differs from the live render on wide screens);
   the canvas fades in when ready, and the poster is shown only when the 3D cannot run (fallback) or without JS */
.hero__stage[data-state="loading"] .hero__poster { opacity: 0; transition: none; }
.hero__stage canvas { opacity: 0; transition: opacity .6s var(--ease); }
.hero__stage[data-state="ready"] canvas { opacity: 1; }
.hero__scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(13, 12, 11, .94) 0%, rgba(13, 12, 11, .8) 32%, rgba(13, 12, 11, 0) 60%), linear-gradient(0deg, rgba(13, 12, 11, .5) 0%, rgba(13, 12, 11, 0) 24%); }
.hero__copy { position: absolute; inset: 0; display: flex; align-items: center; pointer-events: none; }
.hero__copy .wrap { width: 100%; }
.hero__copy .wrap > * { max-width: 470px; pointer-events: auto; }
.hero h1 { color: #f3eee6; font-size: clamp(46px, 6.2vw, 72px); line-height: 1.04; letter-spacing: -.025em; }
.hero__tag { font-size: calc(clamp(46px, 6.2vw, 72px) * .4072); line-height: 1.25; color: #f3eee6; margin-top: 10px; letter-spacing: -.01em; white-space: nowrap; } /* one line, as wide as the h1 (h1 size x measured width ratio) */
.hero__tag em { font-style: normal; color: inherit; }
.hero__lede { color: #b6ad9f; margin-top: 14px; font: 400 16.5px/1.6 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: .005em; }
.hero__cam { position: absolute; right: 22px; top: 18px; font: 400 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #d9d2c6; background: rgba(13, 12, 11, .72); border: 1px solid var(--deep-line); padding: 6px 9px; border-radius: 4px; display: flex; align-items: center; gap: 8px; }
.rec { width: 6px; height: 6px; border-radius: 50%; background: var(--deep-accent); }
/* hero terminal: the agent's client calls, typed in, a spinner while a call runs, then its result (as in the release video) */
/* the terminal and the motion button sit inside the header's content box (980 px centred, else the gutters): x0 = the Valen logo */
.hero__stage { --hx-l: max(var(--gutter-l), calc((100% - 980px) / 2)); --hx-r: max(var(--gutter-r), calc((100% - 980px) / 2)); }
.hero__term { position: absolute; right: 44px; bottom: 32px; /* bottom-right corner of the hero */ width: min(500px, 46vw); background: rgba(16, 15, 14, .94); border: 1px solid #3a342e; border-radius: 10px; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font: 13px/1 var(--mono); color: #d9d2c6; pointer-events: none; }
.hero__term:has(.hero__log:empty) { display: none; }
.hero__bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 1px solid #2a2521; color: #b6ad9f; font-size: 12px; }
.hero__bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a342e; }
.hero__bar .clk { margin-left: auto; letter-spacing: .03em; }
.hero__bar .clk b { color: var(--deep-accent); font-weight: 500; }
.hero__log { list-style: none; margin: 0; padding: 10px 14px 12px; text-align: left; }
.hero__log li { white-space: nowrap; overflow: hidden; animation: ht-in .22s ease-out; }
.hero__log li > div { height: 1.65em; line-height: 1.65em; overflow: hidden; text-overflow: ellipsis; }
.hero__log .p { color: var(--deep-accent); margin-right: .6ch; }
.hero__log .tx { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; max-width: calc(100% - 3ch); color: #ece6dc; }
.hero__log li:last-child .tx { width: 0; animation: ht-type var(--td, .6s) steps(var(--n, 20), end) forwards; }
.hero__log .cur { display: none; width: .6ch; height: 1.1em; background: #ece6dc; vertical-align: -.2em; margin-left: 1px; }
.hero__log li:last-child .cur { display: inline-block; animation: ht-blink 1s steps(1) infinite var(--td, .6s); }
.hero__log .r { padding-left: 2ch; color: #7fd18e; }
.hero__log .r.wait { color: #958c80; }
.hero__log .r.ev { color: #f0b48a; }
.hero__log .r.bad { color: #ff7a6b; }
.hero__log li.is-alarm .c { color: #ff7a6b; }
@keyframes ht-type { from { width: 0; } to { width: calc(var(--n, 20) * 1ch); } }
@keyframes ht-blink { 50% { opacity: 0; } }
@keyframes ht-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero__log li, .hero__log li:last-child .tx, .hero__log li:last-child .cur { animation: none; width: auto; } }
.hero__label { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; background: rgba(13, 12, 11, .92); color: #f3eee6; border: 1px solid #433d36; padding: 5px 9px; border-radius: 4px; font: 12px/1.3 var(--mono); white-space: nowrap; }
.hero__label b { color: var(--deep-accent); font-weight: 500; margin-right: 6px; }
.hero :focus-visible { outline-color: var(--deep-accent); }
@media (max-width: 820px) {
  .hero__stage { height: min(58vh, 460px); min-height: 330px; }
  .hero__scrim { background: linear-gradient(0deg, rgba(13, 12, 11, .6) 0%, rgba(13, 12, 11, 0) 35%); }
  .hero__copy { position: static; display: block; padding: 26px 0 34px; }
  .hero__copy .wrap > * { max-width: none; }
  .hero__term { left: var(--hx-l); right: var(--hx-r); width: auto; bottom: 16px; font-size: 10.5px; }
  .hero__log li:nth-last-child(n+3) { display: none; }
  .hero__cam { right: 12px; top: 12px; }
}

/* ------------------------------------------------------------ blocks */
.block { margin-top: 80px; scroll-margin-top: calc(var(--header-h) + 12px); }
.block-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 28px; margin-bottom: 16px; }
.block-head .label { margin-bottom: 6px; }
.block-sub { color: var(--muted); font-size: 15px; max-width: 560px; }
.controls .block-sub { margin-top: 6px; max-width: 680px; }
.fig-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; margin: 48px 0 12px; }
.fig-title { font-size: 20px; line-height: 1.25; }
.notes { margin-top: 12px; display: grid; gap: 3px; max-width: 780px; }
.notes p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.tabs { display: flex; align-items: center; gap: 18px; 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-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .n { color: var(--faint); margin-left: 4px; }

/* ------------------------------------------------------------ units explorer */
.controls__body { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 18px; align-items: start; }
.unit-list { display: grid; gap: 2px; }
.unit-btn { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 8px 10px; font-size: 16px; color: var(--muted); }
.unit-btn:hover { background: var(--subtle); color: var(--ink); }
.unit-btn[aria-pressed="true"] { color: var(--ink); background: var(--raised); box-shadow: inset 2px 0 0 var(--accent), 0 0 0 1px var(--line); }
.unit-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.lab-ico { display: inline-flex; flex-shrink: 0; }
.lab-ico svg { width: 20px; height: 20px; }
.unit-btn .lab-ico svg { width: 22px; height: 22px; stroke-width: 1.5; }
.kind-card h3 { display: flex; align-items: center; gap: 9px; }
.heat .grp__name { display: inline-flex; align-items: center; gap: 6px; }
.heat .grp__name .lab-ico svg { width: 15px; height: 15px; }
.unit-more, .unit-more:hover { background: transparent; color: var(--muted); cursor: default; }
.unit-card { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; display: grid; gap: 12px; min-height: 230px; align-content: start; }
.unit-card h3 { font-size: 22px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.unit-card p { color: var(--ink); max-width: 640px; }
.verbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.verbs code { font-size: 12.5px; background: var(--subtle); padding: 3px 7px; border-radius: 3px; }
@media (max-width: 760px) {
  .controls__body { grid-template-columns: 1fr; }
  .unit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-btn { grid-template-columns: 22px 1fr; font-size: 15px; padding: 7px 8px; }
}

/* ------------------------------------------------------------ tables */
.table-wrap { position: relative; 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: 10px 12px 10px 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 tbody tr:hover > td { background: var(--subtle); }
.small-t td { font-size: 14px; padding-top: 8px; padding-bottom: 8px; }
.model-cell { display: flex; align-items: center; gap: 9px; }
/* provider mark: monochrome, in the run's colour, sized to the text */
.logo { width: 15px; height: 15px; flex: none; display: inline-block; vertical-align: -2px; color: var(--pc, var(--faint)); fill: currentColor; }
.model-cell .logo { align-self: flex-start; margin-top: 3px; }
.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); }
.model-sub { display: block; }
.status { display: inline-block; margin-top: 3px; font: 400 10.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.status--pending { color: var(--faint); }
.status--running::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .status--running::before { animation: none; } }

/* leaderboard: FrontierBioML's table 1:1 (12 px pills in the provider colour, value on the left, 95% whisker, the reference
   solution as a dashed row and a dashed rule through every track, runs in progress below a group row) */
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.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); }
.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; }
#leaderboard .block-head { align-items: flex-end; margin-bottom: 14px; }
#leaderboard h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
.lb td { padding-top: 9px; padding-bottom: 9px; }
.t tbody tr[tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.lb .model-cell { white-space: nowrap; align-items: center; }
.lb .model-cell .logo { align-self: auto; margin-top: 0; }
.lb .tag { margin-left: 6px; }
.lb .harness-inline::before { content: '\00B7'; margin-right: 5px; opacity: .5; }
.lb .harness-inline.first::before { content: none; }
.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 .c-time, .lb .c-cost { width: 66px; }
.lb .c-tok { width: 60px; }
.lb thead .c-spend { font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.lb tbody .c-spend { color: var(--ink); }
/* time, cost and tokens in one line under the model name on narrower screens, where their columns are hidden */
.lb .spend-sm { display: none; font: 11px/1.4 var(--mono); color: var(--muted); white-space: nowrap; margin-top: 2px; }
.lb .spend-sm .sep { opacity: .6; }
@media (max-width: 960px) {
  .lb .c-time, .lb .c-cost, .lb .c-tok { display: none; }
  .lb .spend-sm { display: block; }
}
.t td.n { font: 13px/1.4 var(--mono); white-space: nowrap; }
.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; }
.base-rule { position: absolute; top: -10px; bottom: -10px; width: 0; border-left: 1px dashed var(--muted); }
/* the three attempts: one dot each at its mean over the tasks in view; a crossed dot includes a refusal or filter block */
.adot { position: absolute; top: 8px; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ground); box-shadow: 0 0 0 1.5px var(--pc, var(--ink)); z-index: 1; }
.adot--flag { width: 10px; height: 10px; margin: -5px 0 0 -5px; box-shadow: 0 0 0 1.5px var(--accent); z-index: 2; }
.adot--flag::before, .adot--flag::after { content: ""; position: absolute; left: 1.5px; top: 4.25px; width: 7px; height: 1.5px; border-radius: 1px; background: var(--accent); transform: rotate(45deg); }
.adot--flag::after { transform: rotate(-45deg); }
.lb-key { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-left: 2px; font: 11.5px/1.5 var(--mono) !important; }
.lb-key > span { display: inline-flex; align-items: center; gap: 7px; }
.adot-key { position: relative; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ground); box-shadow: 0 0 0 1.5px var(--ink); }
.adot-key.adot--flag { width: 10px; height: 10px; box-shadow: 0 0 0 1.5px var(--accent); }
.base-row td, .base-row .score-val, .base-row .model-name { color: var(--muted); }
.logo-gap { width: 15px; flex: none; }
.pill-base { background: none; border: 1px dashed var(--muted); opacity: 1; }
tr.partial td { color: var(--muted); }
tr.partial .model-name { font-style: italic; color: color-mix(in srgb, var(--ink) 62%, 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; }
.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: baseline; white-space: nowrap; cursor: help; }
/* By setting: four narrow columns (all tasks and each setting) on one scale; the ranked column is underlined in the header */
.lb .c-kinds { width: 58%; }
.kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.ksort { border: 0; background: none; padding: 0 0 3px; text-align: left; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--muted); border-bottom: 1px solid transparent; justify-self: start; }
.ksort:hover { color: var(--ink); }
.ksort[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.kcell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kcell .score-val { min-width: 32px; }
.kcell .track { min-width: 30px; }
.kcell.best .score-val { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.kcell .klab { display: none; }
@media (max-width: 720px) {
  .lb .c-n { display: none; }
  .lb .c-score { width: 33%; }
  .lb .c-spend { width: 50px; font-size: 11.5px; }
  .lb .c-rank { width: 20px; }
  .lb .model-cell { white-space: normal; align-items: flex-start; }
  .lb .model-cell .logo { margin-top: 3px; }
  .lb .model-name { display: block; }
  .lb tbody tr:not(.base-row):not(.partial) .model-name { white-space: nowrap; }
  .lb .tag { display: inline; margin: 0; white-space: nowrap; }
  .lb .harness-inline::before { margin: 0 4px 0 3px; }
  .lb .cov-tag { display: table; margin: 4px 0 0; }
  .score-head, .lb-scale { margin-left: 46px; }
  .lb-scale span:nth-child(even) { display: none; }
  .score-cell { gap: 6px; }
  .set-bar { gap: 10px; }
  .set-bar .tabs { gap: 12px; }
  .set-bar .tabs .n { display: none; }
  .lb .c-kinds { width: 56%; }
  .kgrid { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .khead { display: none; }
  .kcell { display: grid; grid-template-columns: 66px 30px minmax(0, 1fr); gap: 6px; }
  .kcell .klab { display: block; font: 10px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kcell.on .klab { color: var(--ink); }
  .kcell .score-val { min-width: 0; font-size: 11.5px; }
  #leaderboard h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .lb.animate .pill { animation: lb-grow .42s var(--ease) calc(var(--i, 0) * 40ms) both; }
  .lb.animate .whisker, .lb.animate .score-val, .lb.animate .adot { animation: lb-fade .24s ease calc(.2s + var(--i, 0) * 40ms) both; }
}
@keyframes lb-grow { from { transform: scaleX(0); } }
@keyframes lb-fade { from { opacity: 0; } }
@media (forced-colors: active) { .pill, .whisker, .whisker::before, .whisker::after { background: CanvasText; forced-color-adjust: none; } .pill-base { background: none; border-color: CanvasText; } .adot, .adot-key { background: Canvas; box-shadow: 0 0 0 1.5px CanvasText; forced-color-adjust: none; } .adot--flag::before, .adot--flag::after { background: CanvasText; } }

/* score against time, cost and tokens: FrontierBioML's chart, with a solid Pareto line of straight segments */
#leaderboard .fig-head { align-items: baseline; margin: 72px 0 16px; }
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; overflow: visible; }
.chart-empty { color: var(--muted); font-size: 14px; }
.chart .ax { fill: var(--muted); font: 10.5px var(--mono); }
.chart .ax-title { fill: var(--muted); font: 11px var(--mono); }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .gl-soft { stroke: var(--line-soft); stroke-width: 1; }
.chart .ref-line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 5; opacity: .28; }
.chart .ref-label { fill: var(--muted); opacity: .8; font: 10.5px var(--mono); paint-order: stroke; stroke: var(--ground); stroke-width: 3px; }
.chart .pareto { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.chart .pareto-area { fill: var(--ink); opacity: .035; }
.chart .pareto-label { fill: var(--ink); font: 10.5px var(--mono); paint-order: stroke; stroke: var(--ground); stroke-width: 3px; }
.chart .pt-label { font: italic 13.5px var(--serif); paint-order: stroke; stroke: var(--ground); stroke-width: 9px; stroke-linejoin: round; }
.chart .hit { fill: transparent; }
.chart .pt { outline: none; transition: opacity .15s ease; }
.chart .pt.off { opacity: .8; }
.chart .pt:hover .ring, .chart .pt:focus-visible .ring { stroke-width: 3; }
.chart .pt:focus-visible .hit { stroke: var(--focus); stroke-width: 1.5; }
/* model names: bold buttons over the chart; pressing one selects its model and fades the rest */
.chart .pt-names { position: absolute; inset: 0; pointer-events: none; }
.chart .pt-name { position: absolute; pointer-events: auto; margin: 0; padding: 0 2px; border: 0; border-radius: 2px; background: none; cursor: pointer; white-space: nowrap;
  font: 600 13.5px/16px var(--serif); text-shadow: 0 0 3px var(--ground), 0 0 3px var(--ground), 0 0 2px var(--ground), 0 0 1px var(--ground); transition: opacity .15s ease; }
.chart .pt-name:hover, .chart .pt-name.sel { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.chart .pt-name:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.chart.has-sel .pt:not(.sel), .chart.has-sel .pt-name:not(.sel) { opacity: .25; }
.chart.has-sel .pt.sel .ring { stroke-width: 3; }

/* ------------------------------------------------------------ results by task: one row per task, a setting-mean row per group */
.heat-wrap { overflow: visible; }
.heat { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
.heat col.c-task { width: 282px; }
.heat col.c-cell { width: 50px; }
.heat thead th { position: sticky; top: var(--header-h); z-index: 3; background: var(--ground); box-shadow: inset 0 -1px 0 var(--line); padding: 12px 1px 8px; font: 400 11px/1.3 var(--mono); color: var(--muted); text-align: center; vertical-align: bottom; }
.heat thead th.th-task, .heat thead th.th-wwg { text-align: left; letter-spacing: .08em; text-transform: uppercase; padding-left: 0; }
.heat thead th.th-wwg { padding-left: 14px; }
.hm { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hm .logo { vertical-align: 0; }
.hm__name { font: 12.5px/1.1 var(--serif); color: var(--ink); white-space: nowrap; }
.hm__name--long { font-size: 11px; letter-spacing: -.02em; }
.heat tbody th { text-align: left; font-weight: 400; padding: 0 10px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat .tid { display: inline-block; width: 2.7em; font: 11.5px var(--mono); color: var(--fc); }
.heat .tt { font: 14px/1.3 var(--serif); color: var(--ink); }
.heat td.cell { padding: 2px 1px; height: 30px; vertical-align: middle; }
.heat td.cell:focus-visible, .heat tbody th:focus-visible, .heat td.wwg:focus-visible { outline: none; }
.heat td.cell:focus-visible .sw { outline: 2px solid var(--focus); outline-offset: 1px; }
.heat tbody th:focus-visible .tt, .heat td.wwg:focus-visible { text-decoration: underline; text-decoration-color: var(--focus); text-underline-offset: 3px; }
.heat .sw { display: grid; place-items: center; height: 26px; border-radius: 3px; font: 11.5px var(--mono); position: relative; }
.heat .sw.na { box-shadow: inset 0 0 0 1px var(--line-soft); color: var(--faint); }
.heat .sw.best { box-shadow: inset 0 0 0 1px var(--ink); }
.heat .sw .flag { position: absolute; top: 0; right: 2px; font-size: 9px; }
.heat td.has-tag .sw::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; opacity: .8; }
.heat td.wwg { padding: 0 0 0 14px; font: 13.5px/1.3 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat td.wwg:not(.wwg--grp):not(.wwg--none) { white-space: normal; text-overflow: clip; }
.heat tr.taskrow:hover > th, .heat tr.taskrow:hover > td.wwg { background: var(--subtle); }
.heat tr.grprow > * { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 4px; }
.heat thead + tbody tr.grprow > * { border-top: 0; padding-top: 10px; }
.heat .grp__name { font: 12px var(--mono); color: var(--fc); }
.heat .grp__n { font: 11px var(--mono); color: var(--faint); margin-left: 8px; }
.heat .cell--mean .sw { font-weight: 500; } /* same box as the task cells: every cell in the heatmap is one size */
/* the All tasks row takes the same 1px hairline as the other setting groups (no ink rule under the heatmap) */
.heat tbody.grp--all .grp__name { color: var(--ink); }
.tag-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); margin-right: 7px; vertical-align: middle; }
.best-sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--ink); margin-right: 7px; vertical-align: -1px; }
.fam-a { --fc: var(--f-a); } .fam-b { --fc: var(--f-b); } .fam-c { --fc: var(--f-c); }
.heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.ramp { display: inline-grid; grid-template-columns: auto 150px auto; align-items: center; gap: 8px; font: 11.5px var(--mono); }
.ramp__bar { height: 10px; border-radius: 3px; position: relative; }
.ramp__bar::after { content: ""; position: absolute; left: var(--ref, 50%); top: -3px; bottom: -3px; border-left: 1px dashed var(--ink); }
.more-link { margin-top: 28px; font-size: 16px; }
.tip .tw { font: 13.5px/1.4 var(--serif); color: var(--ink); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tip .tw__k { display: block; font: 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
@media (max-width: 900px) and (min-width: 701px) {
  .heat col.c-task { width: 210px; }
  .heat col.c-cell { width: 44px; }
  .heat td.wwg { white-space: normal; font-size: 13.5px; padding-top: 4px; padding-bottom: 4px; }
}
/* phones: each task is its id and title, the seven cells under it, then what went wrong. The model row stays pinned. */
@media (max-width: 700px) {
  .heat, .heat thead, .heat tbody { display: block; }
  .heat colgroup { display: none; }
  .heat tr { display: grid; grid-template-columns: repeat(var(--nc, 7), minmax(0, 1fr)); column-gap: 3px; }
  .heat thead { position: sticky; top: var(--header-h); z-index: 3; background: var(--ground); box-shadow: inset 0 -1px 0 var(--line); }
  .heat thead th { position: static; box-shadow: none; padding: 8px 0 6px; background: none; }
  .heat thead th.th-task, .heat thead th.th-wwg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; }
  .hm { gap: 3px; }
  .hm__name { font-size: 10.5px; }
  .hm__name--long { font-size: 9px; }
  .heat tbody th { grid-column: 1 / -1; padding: 9px 0 4px; white-space: normal; }
  .heat td.cell { height: auto; padding: 0; }
  .heat .sw { height: 28px; font-size: 11.5px; }
  .heat td.wwg { grid-column: 1 / -1; padding: 4px 0 6px; white-space: normal; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
  .heat tr.taskrow:hover > th, .heat tr.taskrow:hover > td.wwg { background: none; }
  .heat tr.grprow > * { border-top: 0; padding: 0; }
  .heat tr.grprow > th { border-top: 1px solid var(--line); padding: 16px 0 5px; }
  .heat thead + tbody tr.grprow > th { border-top: 0; padding-top: 12px; }
  .heat tr.grprow > td.cell { padding-bottom: 2px; }
  .heat tr.grprow > td.wwg { display: none; }
  .heat td.wwg--none { display: none; }
  .heat tbody.grp--all tr.grprow > th { margin-top: 10px; }
}

/* ------------------------------------------------------------ the three kinds of task */
.kind-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kind-card { border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; }
.kind-card .kind-card__id { font: 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kind-card__id .ids, .fam-box .cid .ids, .kind-row__name .ids { text-transform: none; }
.kind-card h3 { font-size: 21px; }
.kind-card p { font-size: 15.5px; }
.kind-card .kind-card__more { color: var(--muted); font-size: 14.5px; }
.kind-card__tests { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-right: 8px; color: var(--faint); }
/* shift diagrams: accent = the agent is in control, grey = the cell runs without it */
.kv { display: block; width: 100%; max-width: 300px; height: auto; margin-bottom: 4px; overflow: visible; }
.kv-agent { fill: var(--accent); }
.kv-idle { fill: var(--link-line); }
.kv-t { font: 10.5px var(--mono); fill: var(--ink); }
.kv-on { fill: var(--ground); }
.kv-ax, .kv-lead { fill: var(--muted); }
.kv-axis { stroke: var(--line); stroke-width: 1.5; fill: none; }
.kv-mark { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 2.5; fill: none; }
.kv-ev { fill: var(--ink); }
.kv-zz { fill: var(--muted); font-weight: 500; }
.kv-file { stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; fill: var(--raised); }
.kv-file + .kv-file { fill: none; }
.kv-play { stroke: var(--ink); stroke-width: 1; fill: none; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .kv-play { animation: kv-play 9s linear infinite; }
  .kv-play--a { animation: kv-play-a 5s linear infinite; } /* sweeps only the agent part (x 122 to 254), same speed as the others */
  .kv-zz { animation: kv-zz 2.4s ease-in-out infinite; }
  .kv-zz:nth-child(2) { animation-delay: .3s; } .kv-zz:nth-child(3) { animation-delay: .6s; }
  @keyframes kv-zz { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
  @keyframes kv-play { 0% { transform: translateX(0); opacity: 0; } 6% { opacity: .55; } 94% { opacity: .55; } 100% { transform: translateX(248px); opacity: 0; } }
  @keyframes kv-play-a { 0% { transform: translateX(116px); opacity: 0; } 6% { opacity: .55; } 94% { opacity: .55; } 100% { transform: translateX(248px); opacity: 0; } }
}
.kind-key { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; font: 12px/1.4 var(--mono); color: var(--muted); }
.kind-key span { display: inline-flex; align-items: center; gap: 8px; }
.kv-sw { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }
.kv-sw--agent { background: var(--accent); } .kv-sw--idle { background: var(--link-line); }
.kind-tabs { margin-bottom: 14px; }
@media (max-width: 760px) { .kind-cards { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ prose, findings (method page) */
.prose { max-width: 760px; }
.prose h3 { margin: 32px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol, .prose ol + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 6px; }
.prose h4 { font-size: 16px; margin: 14px 0 6px; }
.code { background: var(--deep); color: #d9d2c6; border-radius: 8px; padding: 16px 18px; overflow-x: auto; font: 13px/1.6 var(--mono); margin: 14px 0; }
.code code { background: none; padding: 0; font-size: inherit; color: inherit; }
#forms-table { margin-top: 20px; }
.form-tag { font: 11px var(--mono); letter-spacing: .04em; color: var(--ink); border: 1px solid var(--muted); border-radius: 3px; padding: 1px 5px; }
.anchors { margin: 20px 0 16px; max-width: 760px; padding: 0 12px; }
.anchors__bar { position: relative; height: 30px; border-radius: 4px; background: linear-gradient(90deg, #ebe5da, #eea574 50%, #6f2a08); }
.anchors__bar span { position: absolute; top: 50%; transform: translate(-50%, -50%); font: 500 12.5px var(--mono); background: var(--ink); color: var(--ground); padding: 3px 7px; border-radius: 3px; }
.anchors__labels { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 8px; font: 11px var(--mono); letter-spacing: .04em; color: var(--muted); }
.anchors__labels span:nth-child(2) { text-align: center; }
.anchors__labels span:nth-child(3) { text-align: right; }
#runs-table, #pair-table { margin-top: 8px; }
.findings { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: f; max-width: 820px; }
.findings li { counter-increment: f; display: grid; grid-template-columns: 36px 1fr; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.findings li:last-child { border-bottom: 1px solid var(--line); }
.findings li::before { content: counter(f, decimal-leading-zero); font: 12px/1.9 var(--mono); color: var(--accent); }
.findings h3 { font-size: 18px; margin-bottom: 4px; }
.findings p { color: var(--muted); }
.foot-notes { list-style: none; padding: 0; display: grid; gap: 6px; max-width: 820px; margin-top: 12px; }
.foot-notes li { font-size: 13.5px; line-height: 1.5; color: var(--muted); padding-left: 16px; position: relative; }
.foot-notes li strong { font-weight: 500; color: var(--ink); }
.foot-notes li::before { content: ""; position: absolute; left: 0; top: .75em; width: 6px; height: 1px; background: var(--muted); }

/* ------------------------------------------------------------ tooltip */
.tip { position: fixed; z-index: 200; pointer-events: none; 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 .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(--muted); margin-top: 6px; }

/* ------------------------------------------------------------ help "?" tooltip (reusable) */
.h-row { display: flex; align-items: center; gap: 10px; }
.help { position: relative; display: inline-flex; vertical-align: middle; }
.help__btn { width: 20px; height: 20px; padding: 0; display: grid; place-items: center; border: 1px solid var(--link-line); border-radius: 50%; background: transparent; color: var(--muted); font: 500 11.5px/1 var(--mono); cursor: help; }
.help__btn:hover, .help__btn:focus-visible, .help.is-open .help__btn { color: var(--ink); border-color: var(--muted); }
.help__tip { position: absolute; z-index: 120; top: calc(100% + 8px); left: var(--tx, -8px); width: max-content; max-width: min(320px, calc(100vw - 32px)); background: var(--raised); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--tip-shadow); border-radius: 6px; padding: 9px 11px; font: 400 13.5px/1.45 var(--serif); letter-spacing: 0; text-transform: none; text-align: left; display: none; }
.help:hover .help__tip, .help:focus-within .help__tip, .help.is-open .help__tip { display: block; }
.help.is-flip .help__tip { top: auto; bottom: calc(100% + 8px); }

/* ------------------------------------------------------------ unit card animation */
.unit-card__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: center; }
.unit-card__text { display: grid; gap: 8px; }
.unit-card__text .agent { color: var(--muted); }
.u-anim { width: 200px; height: 110px; display: block; border-radius: 6px; background: var(--subtle); }
@media (max-width: 560px) { .unit-card__row { grid-template-columns: 1fr; } .u-anim { width: 100%; max-width: 240px; } }
.u-anim .ln { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.u-anim .ink { fill: var(--ink); }
.u-anim .box { fill: var(--raised); stroke: var(--muted); stroke-width: 1.5; }
.u-anim .plate { fill: var(--raised); stroke: var(--ink); stroke-width: 1.5; }
.u-anim .hot { fill: var(--accent); }
.u-anim .hotln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.u-anim .soft { fill: var(--line); }
.u-anim * { transform-box: fill-box; }
.u-anim .a-stem, .u-anim .r-door { transform-origin: top center; }
.u-anim .r-bar { transform-origin: bottom center; }
.u-anim .i-door { transform-origin: right center; }
.u-anim .s-film { transform-origin: left center; }
.u-anim .door { fill: var(--muted); }
.u-anim .hotst { stroke: var(--accent); }
/* static frame: what shows with reduced motion */
.u-anim .d-drop { opacity: 0; }
.u-anim .d-well { fill-opacity: .6; }
.u-anim .r-door { transform: scaleY(.08); }
.u-anim .r-beam { opacity: 0; }
.u-anim .a-stem { transform: scaleY(1); }
.u-anim .p-check { stroke-dasharray: 34; stroke-dashoffset: 0; }
.u-anim .c-rotor { transform-origin: center; }
.u-anim .m-flash { opacity: .3; }
@media (prefers-reduced-motion: no-preference) {
  .u-anim * { animation-duration: 6s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
  .u-anim .a-car { animation-name: a-car; }
  .u-anim .a-stem { animation-name: a-stem; }
  .u-anim .a-head { animation-name: a-head; }
  .u-anim .a-plate { animation-name: a-plate; }
  .u-anim .h-plate { animation-name: h-plate; animation-duration: 5s; }
  .u-anim .r-door { animation-name: r-door; animation-duration: 5s; }
  .u-anim .r-beam { animation-name: r-beam; animation-duration: 5s; }
  .u-anim .r-bar { animation-name: r-bar; animation-duration: 5s; }
  .u-anim .i-door { animation-name: i-door; animation-duration: 7s; }
  .u-anim .i-glow { animation-name: i-glow; animation-duration: 7s; }
  .u-anim .i-heat { animation-name: i-heat; animation-duration: 3.5s; animation-timing-function: linear; }
  .u-anim .d-drop { animation-name: d-drop; animation-duration: 3s; animation-timing-function: ease-in; }
  .u-anim .d-well { animation-name: d-well; animation-duration: 3s; }
  .u-anim .s-press { animation-name: s-press; animation-duration: 5s; }
  .u-anim .s-film { animation-name: s-film; animation-duration: 5s; }
  .u-anim .p-scan { animation-name: p-scan; animation-duration: 3s; }
  .u-anim .p-check { animation-name: p-check; animation-duration: 5s; }
  .u-anim .c-rotor { animation-name: c-spin; }
  .u-anim .m-flash { animation-name: m-flash; animation-duration: 4s; }
}
@keyframes a-car { 0%, 24% { transform: translateX(0); } 52%, 68% { transform: translateX(100px); } 92%, 100% { transform: translateX(0); } }
@keyframes a-stem { 0%, 8% { transform: scaleY(1); } 16% { transform: scaleY(1.78); } 24%, 52% { transform: scaleY(1); } 60% { transform: scaleY(1.78); } 68%, 100% { transform: scaleY(1); } }
@keyframes a-head { 0%, 8% { transform: translateY(0); } 16% { transform: translateY(14px); } 24%, 52% { transform: translateY(0); } 60% { transform: translateY(14px); } 68%, 100% { transform: translateY(0); } }
@keyframes a-plate { 0%, 16% { transform: translate(0, 0); opacity: 1; } 24% { transform: translate(0, -14px); } 52% { transform: translate(100px, -14px); } 60%, 92% { transform: translate(100px, 0); opacity: 1; } 94% { transform: translate(100px, 0); opacity: 0; } 94.1% { transform: translate(0, 0); opacity: 0; } 97%, 100% { transform: translate(0, 0); opacity: 1; } }
@keyframes h-plate { 0%, 15% { transform: translateX(0); opacity: 1; } 35%, 60% { transform: translateX(26px); } 80%, 100% { transform: translateX(0); } }
@keyframes r-door { 0%, 10% { transform: scaleY(0.08); } 25%, 75% { transform: scaleY(1); } 90%, 100% { transform: scaleY(0.08); } }
@keyframes r-beam { 0%, 28% { transform: translateX(0); opacity: 0; } 32% { opacity: 1; } 68% { transform: translateX(46px); opacity: 1; } 72%, 100% { transform: translateX(46px); opacity: 0; } }
@keyframes r-bar { 0%, 30% { transform: scaleY(0.1); } 70%, 100% { transform: scaleY(1); } }
@keyframes i-door { 0%, 55% { transform: scaleX(1); } 62%, 78% { transform: scaleX(0.15); } 86%, 100% { transform: scaleX(1); } }
@keyframes i-glow { 0%, 52% { opacity: .5; } 62%, 80% { opacity: .15; } 92%, 100% { opacity: .5; } }
@keyframes i-heat { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-10px); opacity: 0; } }
@keyframes d-drop { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 55% { transform: translateY(36px); opacity: 1; } 60%, 100% { transform: translateY(36px); opacity: 0; } }
@keyframes d-well { 0%, 50% { fill-opacity: 0; } 70%, 90% { fill-opacity: 1; } 100% { fill-opacity: 0; } }
@keyframes s-press { 0%, 10% { transform: translateY(0); } 25%, 35% { transform: translateY(32px); } 50%, 100% { transform: translateY(0); } }
@keyframes s-film { 0%, 25% { opacity: 0; transform: none; } 35%, 65% { opacity: 1; transform: none; } 90% { opacity: 0; transform: rotate(-18deg); } 100% { opacity: 0; transform: none; } }
@keyframes p-scan { 0% { transform: translateY(0); } 50% { transform: translateY(30px); } 100% { transform: translateY(0); } }
@keyframes p-check { 0%, 55% { stroke-dashoffset: 34; } 75%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 34; } }
@keyframes c-spin { 0%, 10% { transform: rotate(0); } 80%, 100% { transform: rotate(1080deg); } }
@keyframes m-flash { 0%, 40% { opacity: 0; } 50% { opacity: .55; } 62%, 100% { opacity: 0; } }

.help.is-dismissed .help__tip { display: none !important; }

/* ------------------------------------------------------------ method page */
.fig-title--gap { margin: 40px 0 0; }
.doc { max-width: calc(980px + 2 * var(--gutter)); }
.doc .findings h3 { margin: 0 0 4px; }
#runs-table .model-name, #runs-table .status, #runs-table td { white-space: nowrap; }
.intro { padding-top: 48px; }
.intro h1 { font-size: clamp(34px, 4.6vw, 48px); line-height: 1.06; letter-spacing: -.02em; margin: 8px 0 12px; }
.intro__lede { color: var(--muted); font-size: 18px; max-width: 640px; }
.toc { margin-top: 22px; }
.toc ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; counter-reset: toc; }
.toc li { counter-increment: toc; font: 12.5px/1.6 var(--mono); }
.toc li::before { content: counter(toc, decimal-leading-zero) " "; color: var(--faint); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.doc-sec { margin-top: 72px; scroll-margin-top: calc(var(--header-h) + 12px); }
.doc-sec > .label { color: var(--accent); }
.doc-sec > h2 { margin: 4px 0 14px; }
.doc-sec h3 { margin: 36px 0 10px; }
.doc-sub { color: var(--muted); font-size: 15px; max-width: 680px; margin-bottom: 4px; }
.doc .table-wrap { margin-top: 12px; }
.doc .t td { vertical-align: top; }
.concept-t td:first-child { font: 13px var(--mono); white-space: nowrap; color: var(--ink); }
.concept-t td:last-child { color: var(--muted); }
.api-t td:first-child { white-space: nowrap; }
.api-t code { background: none; padding: 0; font-size: 12.5px; }

/* diagrams */
.dg { margin: 22px 0 8px; }
.dg figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.arch { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1.15fr) 96px minmax(0, .9fr); align-items: center; }
.arch__box { border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 12px 14px; align-self: stretch; }
.arch__box--cell { border-color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.arch__kicker { font: 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.arch__box--cell .arch__kicker { color: var(--accent); }
.arch__title { font-size: 17px; margin: 2px 0 6px; }
.arch__box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: 13.5px; color: var(--muted); }
.arch__box ul li::before { content: "· "; color: var(--faint); }
.arch__chip { margin-top: 8px; }
.arch__link { display: grid; justify-items: center; gap: 4px; padding: 0 6px; text-align: center; font: 10.5px/1.3 var(--mono); color: var(--muted); }
.arch__link svg { width: 60px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  .arch { grid-template-columns: 1fr; }
  .arch__link { grid-auto-flow: column; justify-content: start; padding: 8px 0 8px 18px; text-align: left; }
  .arch__link br { display: none; }
  .arch__link svg { width: 16px; height: 28px; transform: rotate(90deg); order: -1; }
}
.dg-clock { display: block; width: 100%; height: auto; }
.dg-clock .dg-axis line { stroke: var(--line); }
.dg-clock .dg-axis text { fill: var(--muted); font: 10.5px var(--mono); letter-spacing: .06em; }
.dg-clock .dg-step { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.dg-clock .dg-jump circle { fill: var(--accent); }
.dg-clock .dg-note text { fill: var(--muted); font: 11.5px var(--mono); }
.dg-clock .dg-hot text { fill: var(--accent); font: 11.5px var(--mono); }
.dg-clock .dg-silent line { stroke: var(--faint); stroke-dasharray: 3 4; }
.dg-clock .dg-silent text { fill: var(--faint); font: 11px var(--mono); }
.dg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dg-scroll .dg-clock { min-width: 600px; max-width: 760px; }
.lanes { display: grid; gap: 14px; }
.lane { border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 12px 14px; }
.lane__name { font-size: 17px; margin-bottom: 10px; }
.lane__name span { font: 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.flow li { position: relative; font-size: 13.5px; line-height: 1.35; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--ground); }
.flow li + li::before { content: "→"; position: absolute; left: -17px; top: 50%; transform: translateY(-50%); color: var(--muted); font: 13px var(--mono); }
.flow .flow__end { border-color: var(--accent); color: var(--accent); font: 500 13px/1.35 var(--mono); display: grid; place-items: center; }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; gap: 18px; }
  .flow li + li::before { content: "↓"; left: 14px; top: -16px; transform: none; }
}
.phases { list-style: none; padding: 0; margin: 14px 0 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.phases li { position: relative; border-top: 2px solid var(--line); padding-top: 8px; display: grid; gap: 4px; font-size: 14.5px; color: var(--muted); }
.phases li:first-child { border-top-color: var(--accent); }
.phases li + li::before { content: "→"; position: absolute; left: -17px; top: -12px; color: var(--muted); font: 13px var(--mono); }
.phases__name { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 560px) { .phases { grid-template-columns: 1fr; gap: 14px; } .phases li + li::before { display: none; } }
.value-eq { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 12px 0; }
.value-eq__term { flex: 1 1 180px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); padding: 10px 12px; font-size: 15.5px; display: grid; gap: 3px; }
.value-eq__term--plus { border-top: 2px solid var(--oc-beat); }
.value-eq__term:not(.value-eq__term--plus) { border-top: 2px solid var(--oc-fail); }
.value-eq__term small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.value-eq__op { align-self: center; font: 500 18px var(--mono); color: var(--muted); }
.facts-row { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 8px 0 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts-row dt { font: 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts-row dd { margin: 2px 0 0; font: 500 16px var(--mono); }
.kind-list { display: grid; gap: 0; margin-top: 4px; }
.kind-row { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 6px 20px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.kind-row:last-child { border-bottom: 1px solid var(--line-soft); }
.kind-row__name { font-size: 17px; border-left: 3px solid var(--fc); padding-left: 10px; display: grid; }
.kind-row__name span { font: 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kind-row p:last-child { color: var(--muted); font-size: 15px; }
@media (max-width: 640px) { .kind-row { grid-template-columns: 1fr; } }
#forms-table { margin-top: 18px; }
.pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pair__vs { color: var(--faint); font: 11px var(--mono); margin: 0 2px; }
.pair .logo { width: 13px; height: 13px; }

.model-cell .status { display: block; }
.pair { white-space: nowrap; flex-wrap: nowrap; }
#forms-table td:last-child { min-width: 112px; }
@media (max-width: 560px) {
  .value-eq { flex-direction: column; gap: 4px; }
  .value-eq__term { flex: none; }
  .value-eq__op { align-self: flex-start; padding-left: 14px; }
  .api-t td:first-child { white-space: normal; overflow-wrap: anywhere; width: 40%; }
}

/* ============================================================ small screens and touch (mobile pass, 2026-11-24)
   Desktop is unchanged: everything below is inside a max-width query or a (pointer: coarse) query. */

/* touch: every control gets a hit area of at least 44 px. Where the visible control is smaller (text tabs, the theme toggle,
   the "?" button) the area is an invisible ::after, so the type and spacing stay as designed. */
@media (pointer: coarse) {
  .valen-logo { padding: 11px 8px 11px 0; }
  .site-nav a { padding: 15px 0; }
  .site-nav a.is-current::after, .site-nav a[aria-current="page"]::after { bottom: 5px; }
  .theme-toggle, .help__btn, .tabs button, .ksort, .tr-zoom button { position: relative; }
  .theme-toggle::after, .help__btn::after, .tabs button::after, .ksort::after, .tr-zoom button::after { content: ""; position: absolute; }
  .theme-toggle::after { inset: -6px; }
  .help__btn::after { inset: -12px; }
  .tabs button::after { inset: -9px -6px; }
  .ksort::after { inset: -12px -4px -10px; }
  .tr-zoom button::after { inset: -10px -6px; }
  .unit-btn { min-height: 44px; }
  .site-footer nav a { display: inline-block; padding: 12px 4px; }
  .toc a { display: inline-block; padding: 7px 0; }
  .tabs { row-gap: 14px; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  /* rhythm: tighter section spacing that still reads as sections against 16 px gutters (FrontierBioML: 56 px) */
  .block { margin-top: 60px; }
  .block-head { margin-bottom: 14px; }
  #leaderboard .fig-head { margin: 52px 0 12px; }
  .site-footer { margin-top: 64px; }
  .doc-sec { margin-top: 60px; }
  .intro { padding-top: 32px; }
  .hide-sm { display: none; }
  /* leaderboard: tighter cell padding and a narrow value column so the name, bar and cost fit 328 px */
  .lb th, .lb td { padding-right: 8px; }
  .lb .c-spend { width: 46px; }
  .lb .score-val { min-width: 34px; font-size: 12px; }
  .score-head, .lb-scale { margin-left: 40px; }
  .lb .track { min-width: 56px; }
  /* tables that keep their columns scroll sideways inside their box: a soft edge shows there is more */
  .table-wrap, .dg-scroll {
    background:
      linear-gradient(90deg, var(--ground) 30%, transparent) left / 24px 100% no-repeat local,
      linear-gradient(270deg, var(--ground) 30%, transparent) right / 24px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 18%, transparent), transparent) left / 10px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 18%, transparent), transparent) right / 10px 100% no-repeat scroll;
  }
  #runs-table th:first-child, #runs-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--ground); box-shadow: 1px 0 0 var(--line-soft); }
  #runs-table tbody tr:hover > td:first-child { background: var(--subtle); }
  /* hero overlays clear the notch in landscape */
  .hero__term { left: var(--hx-l); right: var(--hx-r); } /* --gutter-l/-r already clear the safe areas */
}

/* method page tables, phones: rows become small cards instead of squeezed columns */
@media (max-width: 560px) {
  .api-t thead, .concept-t thead, #forms-table thead, #pair-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .api-t tbody tr, .concept-t tbody tr, #forms-table tbody tr, #pair-table tbody tr { display: grid; border-bottom: 1px solid var(--line); padding: 10px 0 11px; gap: 4px 12px; }
  .api-t td, .concept-t td, #forms-table td, #pair-table td { border: 0; padding: 0; }
  .api-t tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  .api-t td:first-child { white-space: normal; overflow-wrap: normal; width: auto; }
  .api-t td:first-child code { font-size: 13px; }
  .api-t td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); }
  .api-t td.r { font: 10.5px/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .api-t td.r::before { content: "moves time: "; color: var(--faint); }
  .api-t td.r strong { color: var(--accent); font-weight: 500; }
  .concept-t tbody tr { grid-template-columns: minmax(0, 1fr); }
  .concept-t td:first-child { font-size: 13.5px; }
  .concept-t td:last-child::before { content: "The agent sees: "; font: 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
  #forms-table tbody tr { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
  #forms-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  #forms-table td:last-child { min-width: 0; line-height: 1.6; }
  #pair-table tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #pair-table td:first-child { grid-column: 1 / -1; }
  #pair-table td.r { text-align: left; }
  #pair-table td[data-l]::before { content: attr(data-l); display: block; font: 10px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
  #pair-table .pair { white-space: normal; flex-wrap: wrap; }
  .t tbody tr:hover > td { background: none; }
  .dg-scroll .dg-clock { min-width: 560px; }
  .toc ol { display: grid; gap: 0; }
}

/* ------------------------------------------------------------ method page, v4-style explainer: task picker, workcell flow,
   where the task runs, submission, scoring (information architecture after the Workcell v4 page; Valen look kept) */
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 40px; align-items: end; margin-bottom: 22px; }
.sec-head h2 { margin: 4px 0 0; }
.sec-head .doc-sub { margin: 0; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } }
.chip { display: inline-block; font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: none; color: var(--fc, var(--ink)); border: 1px solid currentColor; border-radius: 3px; padding: 3px 5px; margin-right: 8px; vertical-align: 1px; }

/* the task picker: the setting list on the left (above the card on phones), the card on the right. A selection never changes
   a size: app.js gives the card's head, body and cell list the height of the tallest setting and task at the current width,
   and the open instruction scrolls inside a box of fixed height. One accent only: the family colour of the setting icon. */
.picker { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; align-items: start; }
.picker__list { display: grid; gap: 4px; position: sticky; top: calc(var(--header-h) + 16px); }
.pick-btn { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 3px 12px; align-items: start; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 12px 14px 12px 12px; color: var(--muted); }
.pick-btn:hover { background: var(--subtle); color: var(--ink); }
.pick-btn[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pick-btn__ic { grid-row: 1 / 3; display: block; width: 20px; height: 20px; margin-top: 1px; color: var(--fc); }
.pick-btn__ic svg { display: block; width: 20px; height: 20px; }
.pick-btn__name { font-size: 17px; line-height: 1.3; }
.pick-btn__n { font: 11.5px/1.5 var(--mono); color: var(--faint); }
.pick-btn[aria-pressed="true"] .pick-btn__n { color: var(--muted); }
.picker__card { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-width: 0; }
/* head: the setting and its task ids (the ids sit at the foot of the reserved height, so they keep one place) */
.pk-head { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 18px; border-bottom: 1px solid var(--line-soft); }
.pk-head__fam { display: flex; align-items: center; gap: 8px; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pk-head__ic { display: inline-flex; flex: none; width: 18px; height: 18px; color: var(--fc); }
.pk-head__ic svg { display: block; width: 18px; height: 18px; }
.pk-head__brief { font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.pk-tabs { margin-top: auto; padding-top: 4px; }
.pk-tabs__group { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-tab { font: 12.5px/1 var(--mono); min-width: 42px; height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--ground); color: var(--muted); }
.pk-tab:hover { color: var(--ink); border-color: var(--muted); }
.pk-tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
/* body: the task, with its facts held at the foot of the reserved height */
.pk-body { display: flex; flex-direction: column; gap: 22px; padding: 22px 24px; }
.pk-task__meta { display: flex; align-items: baseline; gap: 10px; font: 12px/1.5 var(--mono); color: var(--muted); }
.pk-task__id { font-weight: 500; color: var(--ink); }
.pk-task__link { margin-left: auto; color: var(--ink); white-space: nowrap; text-underline-offset: 3px; }
.picker .pk-task__title { font-size: 24px; line-height: 1.22; margin: 6px 0 10px; }
.pk-task__about { font-size: 17px; line-height: 1.6; max-width: 660px; }
.pk-body__facts { margin-top: auto; }
.pk-facts { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.pk-facts__row { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
.pk-fact { min-width: 0; cursor: help; }
.pk-fact dt, .pk-units__head { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.pk-fact dd { margin: 0; min-width: 0; }
.pk-fact__v { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1.35; color: var(--ink); }
.pk-fact__sub { display: block; margin-top: 3px; font: 12px/1.45 var(--mono); color: var(--muted); }
.pk-ic { display: inline-flex; flex: none; width: 20px; height: 20px; color: var(--ink); }
.pk-ic svg { display: block; width: 20px; height: 20px; }
.pk-meter { display: inline-flex; flex: none; align-items: flex-end; gap: 2px; height: 16px; }
.pk-meter i { display: block; width: 5px; border-radius: 1px; background: var(--line); }
.pk-meter i:nth-child(1) { height: 7px; } .pk-meter i:nth-child(2) { height: 11px; } .pk-meter i:nth-child(3) { height: 16px; }
.pk-meter i.on { background: var(--ink); }
.pk-units__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: var(--pk-units-h, 0); }
.pk-units__list li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--ground); font-size: 14px; line-height: 1.3; color: var(--ink); }
.pk-units__n { font: 500 12px/1 var(--mono); color: var(--muted); }
/* the full instruction: a greyed preview of one fixed height that a click opens to a taller fixed box that scrolls, so
   switching tasks moves nothing either way; the toggle sits above the box and stays put when it opens */
.pk-more { border-top: 1px solid var(--line-soft); }
.pk-more__btn { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border: 0; background: transparent; text-align: left; font: 500 13px/1.4 var(--mono); color: var(--ink); cursor: pointer; }
.pk-more__btn::after { content: "+"; font: 400 18px/1 var(--mono); color: var(--accent); }
.pk-more__btn[aria-expanded="true"]::after { content: "\2212"; }
.pk-more__btn:hover { color: var(--accent); }
.pk-more__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pk-instr { height: min(34rem, 62vh); overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 22px; transition: height .22s ease, opacity .22s ease; }
.pk-instr:focus-visible { outline-offset: -2px; }
.pk-more:not(.is-open) .pk-instr { height: 8.5rem; overflow: hidden; opacity: .55; cursor: pointer;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent); mask-image: linear-gradient(to bottom, #000 35%, transparent); }
.pk-more:not(.is-open):hover .pk-instr { opacity: .75; }
@media (prefers-reduced-motion: reduce) { .pk-instr { transition: none; } }
.pk-legend { margin-top: 14px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 760px) {
  .picker { grid-template-columns: 1fr; gap: 12px; }
  .picker__list { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pick-btn { grid-template-columns: 1fr; align-content: start; gap: 6px; padding: 10px; box-shadow: inset 0 0 0 1px var(--line-soft); }
  .pick-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--ink); }
  .pick-btn__ic { grid-row: auto; margin: 0; }
  .pick-btn__name { font-size: 14.5px; line-height: 1.25; }
  .pick-btn__n { font-size: 11px; }
  .pk-head, .pk-body { padding-left: 16px; padding-right: 16px; }
  /* on phones the spare height gathers at the foot of each part: the task ids sit right under the setting name, and the
     facts follow the summary (the parts keep their reserved heights, so the card still never changes size) */
  .pk-tabs { order: 1; margin-top: 2px; padding-top: 0; }
  .pk-head__brief { order: 2; }
  .pk-body__facts { margin-top: 0; }
  .pk-units__list { min-height: 0; }
  .picker .pk-task__title { font-size: 21px; }
  .pk-task__about { font-size: 16.5px; }
}
@media (max-width: 560px) {
  .pk-facts__row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pk-fact { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 12px; align-items: baseline; }
  .pk-fact dt { margin: 0; }
}

/* collapsible panels (details/summary) */
.fold { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; font: 500 13px/1.4 var(--mono); color: var(--ink); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "+"; font: 400 18px/1 var(--mono); color: var(--accent); }
.fold[open] > summary::after { content: "−"; }
.fold > summary:hover { color: var(--accent); }
.fold__body { padding: 0 18px 18px; min-width: 0; }
.fold__note { margin-top: 12px; font-size: 14.5px; color: var(--muted); max-width: 760px; }
.fold--inset { margin: 18px 0 0; background: transparent; border-width: 1px 0 0; border-radius: 0; }
.fold--inset > summary { padding: 14px 0 4px; }
.fold--inset .fold__body { padding: 8px 0 0; }
@media (max-width: 760px) { .pk-more__btn { padding: 14px 16px; } .pk-instr { padding: 0 16px 18px; } }
.instr__src { font: 11px/1.4 var(--mono); color: var(--faint); margin-bottom: 10px; overflow-wrap: anywhere; }
.instr__text { font-size: 15px; max-width: 720px; overflow-wrap: break-word; }
.instr__text p + p, .instr__text ul + p, .instr__text p + ul { margin-top: 10px; }
.instr__text h4 { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 20px 0 6px; }
.instr__text ul { padding-left: 20px; display: grid; gap: 4px; margin: 6px 0; }
.instr__text code { overflow-wrap: anywhere; }
.instr__text .code { font-size: 12.5px; }
.instr__more { margin-top: 16px; font: 12.5px var(--mono); }

/* inside the workcell: the plate flow and three cards */
.flowstrip { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.flowstrip li { position: relative; padding: 14px 16px 14px 20px; display: grid; gap: 2px; font-size: 14px; color: var(--muted); line-height: 1.35; }
.flowstrip li + li { border-left: 1px solid var(--line-soft); }
.flowstrip li + li::before { content: "›"; position: absolute; left: -5px; top: 50%; transform: translateY(-50%); font: 15px var(--mono); color: var(--accent); background: var(--raised); line-height: 1; }
.flowstrip__name { font-size: 16.5px; color: var(--ink); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 22px 0 18px; }
.trio h3 { margin: 0 0 6px; font-size: 19px; }
.trio p { font-size: 15px; color: var(--ink); }
@media (max-width: 760px) {
  .flowstrip { grid-template-columns: 1fr; }
  .flowstrip li { grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 14px; }
  .flowstrip li + li { border-left: 0; border-top: 1px solid var(--line-soft); }
  .flowstrip li + li::before { content: none; }
  .trio { grid-template-columns: 1fr; gap: 18px; }
}

/* where the task runs */
.runs-box { margin-top: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 20px 24px 18px; scroll-margin-top: calc(var(--header-h) + 12px); }
.doc-sec .runs-box h3 { margin: 0 0 14px; font-size: 21px; }
.runs-box__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.runs-box__cols > div { padding: 0 20px; min-width: 0; }
.runs-box__cols > div:first-child { padding-left: 0; }
.runs-box__cols > div:last-child { padding-right: 0; }
.runs-box__cols > div + div { border-left: 1px solid var(--line-soft); }
.runs-box h4 { font-size: 16.5px; margin-bottom: 4px; }
.runs-box p { font-size: 14.5px; color: var(--muted); overflow-wrap: break-word; }
.runs-box p code { color: var(--ink); }
@media (max-width: 760px) {
  .runs-box { padding: 16px; }
  .runs-box__cols { grid-template-columns: 1fr; gap: 14px; }
  .runs-box__cols > div { padding: 0; }
  .runs-box__cols > div + div { border-left: 0; border-top: 1px solid var(--line-soft); padding-top: 14px; }
}
.tree { margin: 0; overflow-x: auto; font: 12.5px/1.65 var(--mono); color: var(--ink); background: var(--ground); border: 1px solid var(--line-soft); border-radius: 6px; padding: 12px 14px; }
.tree code { background: none; padding: 0; font: inherit; }
.tree span { color: var(--muted); }

/* what the agent submits */
.submit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; margin-top: 22px; }
.doc-sec .submit h3 { margin: 0 0 8px; }
.disp { display: grid; }
.disp > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.disp > div:last-child { border-bottom: 1px solid var(--line); }
.disp dt { font: 500 12px/1.6 var(--mono); letter-spacing: .04em; color: var(--accent); }
.disp dd { margin: 0; font-size: 14.5px; }
.submit__note { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.submit__code { margin: 0; min-width: 0; }
.code-head { background: var(--deep); color: var(--deep-muted); font: 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 11px 18px; border-radius: 8px 8px 0 0; border-bottom: 1px solid var(--deep-line); }
.code--flush { margin: 0; border-radius: 0 0 8px 8px; font-size: 12.5px; }
.code .c { color: var(--deep-muted); }
.submit__code figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) { .submit { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 560px) { .disp > div { grid-template-columns: 1fr; } }

/* how a shift is scored */
.score-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 26px; }
.score-col { padding: 18px 22px 20px; min-width: 0; }
.score-col:first-child { padding-left: 0; }
.score-col:last-child { padding-right: 0; }
.score-col + .score-col { border-left: 1px solid var(--line); }
.doc-sec .score-col h3 { margin: 0 0 8px; font-size: 19px; }
.score-col--plus h3 { color: var(--ink); }
.score-col h3::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 2px; background: var(--oc-fail); }
.score-col--plus h3::before { background: var(--oc-beat); }
.score-col:last-child h3::before { background: var(--ink); }
.score-col ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; }
@media (max-width: 760px) {
  .score-cols { grid-template-columns: 1fr; }
  .score-col, .score-col:first-child, .score-col:last-child { padding: 16px 0; }
  .score-col + .score-col { border-left: 0; border-top: 1px solid var(--line); }
}
.points { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: center; margin-top: 28px; }
.doc-sec .points h3 { margin: 0 0 6px; }
.points__text p { font-size: 15px; }
.points__scale { padding: 0 16px; }
.points__track { position: relative; height: 2px; background: linear-gradient(90deg, var(--line), var(--accent)); margin: 14px 0; }
.points__track span { position: absolute; top: 50%; transform: translate(-50%, -50%); font: 500 12px/1 var(--mono); background: var(--ink); color: var(--ground); padding: 5px 7px; border-radius: 3px; }
.points__labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px -16px 0; font: 11px/1.35 var(--mono); color: var(--muted); }
.points__labels span:nth-child(2) { text-align: center; position: relative; left: calc((var(--ref, 50) - 50) * 3%); } /* sits under the reference marker (--ref, 0-100) */
/* a reference far from the middle (build.py adds --stack): its label moves to a second row, starting under its marker */
/* and on phones, where three labels do not fit on one row */
.points__labels--stack { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 6px; }
.points__labels--stack span:nth-child(2) { grid-row: 2; grid-column: 1 / -1; text-align: left; left: 0; padding-left: calc(6px + (100% - 32px) * var(--ref) / 100); }
.points__labels--stack span:nth-child(3) { grid-row: 1; grid-column: 2; }
@media (max-width: 600px) {
  .points__labels { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 6px; }
  .points__labels span:nth-child(2) { grid-row: 2; grid-column: 1 / -1; text-align: left; left: 0; padding-left: calc(6px + (100% - 32px) * var(--ref) / 100 - 3.5em); }
  .points__labels span:nth-child(3) { grid-row: 1; grid-column: 2; }
}
.points__labels span:nth-child(3) { text-align: right; }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; } }

/* home: the kind cards link into the picker */
.kind-card__link { margin-top: auto; padding-top: 6px; font: 12.5px/1.4 var(--mono); color: var(--muted); text-decoration: none; }
.kind-card__link:hover { color: var(--accent); }
@media (max-width: 560px) { .tree { font-size: 11px; } }

/* problem statement under the hero (home) */
.intro { margin-top: 56px; }
.intro p { max-width: 64ch; font-size: 19px; line-height: 1.55; color: var(--ink); }
.intro p + p { margin-top: 14px; }
@media (max-width: 600px) { .intro p { font-size: 17px; } }
.intro__title { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 18px; max-width: 22ch; }
.kv .kv-n { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }

/* ------------------------------------------------------------ method page layout, after the FrontierBioML blog post
   (valenlabs.com/blog/frontierbioml): a sticky table of contents in a left column (serif 14 px, one hairline on its left,
   the section being read in ink, sub-sections indented and lighter), an article column with the post's 41rem prose measure
   and figures that break out to 56rem. Below 1100 px: one column, the contents collapse into a "Contents" panel at the top. */
.doc-shell { --measure: 41rem; --wide: 56rem; --toc-w: 10rem; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "toc" "body"; max-width: calc(980px + 2 * var(--gutter)); } /* same frame as the header and the home page */
.doc-shell .doc { grid-area: body; max-width: none; min-width: 0; }
.doc-head { grid-area: head; padding-top: 56px; }
.doc-toc-col { grid-area: toc; min-width: 0; margin-top: 40px; }
/* one content column (--wide) with one left edge: text blocks stop at the prose measure, figures, cards, folds and tables
   may run to the column's right edge, nothing starts left of the text */
.doc-shell .doc { max-width: var(--wide); }
.doc-head { max-width: var(--wide); scroll-margin-top: calc(var(--header-h) + 12px); }
.doc-head > *, .doc-shell .doc-sec > * { max-width: var(--measure); min-width: 0; }
.doc-shell .doc-sec > :is(.picker, .dg, .fold, .runs-box, .table-wrap, noscript) { max-width: none; }
.doc-head h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -.025em; margin: 0; }
.doc-meta { margin-top: 24px; font: 14px/1.5 var(--mono); color: var(--muted); }
.doc-intro { margin-top: 48px; }
.doc-intro, .doc-shell .prose { max-width: var(--measure); font-size: 18px; line-height: 1.65; color: color-mix(in srgb, var(--ink) 88%, transparent); }
.doc-intro p, .doc-shell .prose p, .doc-shell .prose li { color: inherit; }
.doc-intro p + p, .doc-shell .prose p + p { margin-top: 1.1em; }
.doc-shell .prose ul li::marker { color: var(--accent); }
.doc-shell .prose ol li::marker { color: var(--muted); font: .8em var(--mono); }
.doc-shell .prose a { text-underline-offset: 3px; }
.doc-shell .doc-sec { margin-top: 64px; }
.doc-shell .doc-sec > h2 { font-size: 28px; line-height: 1.25; letter-spacing: 0; margin: 0 0 20px; }
.doc-shell .doc-sec > h3 { font-size: 22px; line-height: 1.3; margin: 44px 0 12px; }
.doc-shell .doc-sub { max-width: var(--measure); font-size: 15px; margin-bottom: 0; }
.doc-shell .doc-sec > .dg { margin: 40px 0; }
.doc-shell .dg > figcaption, .doc-shell .submit__code figcaption { font: 12.8px/1.6 var(--mono); color: var(--muted); }
.doc-shell .dg > figcaption { max-width: var(--measure); margin: 14px 0 0; }
/* the workcell graphic: two inline SVGs (light, dark); the one matching the theme shows */
.wh svg { display: block; width: 100%; max-width: 520px !important; height: auto !important; margin: 0; } /* !important beats the SVG's own inline style */
.wh-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wh-light { display: none; }
  :root:not([data-theme="light"]) .wh-dark { display: block; }
}
:root[data-theme="dark"] .wh-light { display: none; }
:root[data-theme="dark"] .wh-dark { display: block; }
.doc-shell .doc-sec > .submit__code--solo { margin: 22px 0 0; }

.doc-toc > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc-toc > summary::-webkit-details-marker { display: none; }
.doc-toc > summary::after { content: "+"; font: 400 16px/1 var(--mono); color: var(--accent); }
.doc-toc[open] > summary::after { content: "−"; }
.doc-toc > summary:hover { color: var(--ink); }
.doc-toc nav { padding: 14px 0 6px; }
.doc-toc ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.doc-toc ul ul { border-left: 0; margin-top: 2px; gap: 2px; }
.doc-toc a { display: block; padding: 2px 0; font: 14px/1.625 var(--serif); color: var(--muted); text-decoration: none; transition: color .15s; }
.doc-toc ul ul a { color: color-mix(in srgb, var(--muted) 70%, transparent); font-size: 13px; line-height: 1.5; }
.doc-toc nav > ul ul { padding-left: calc(1.9rem + 12px); } /* sub-headings indented past their section title */
.doc-toc a:hover, .doc-toc a.is-on, .doc-toc ul ul a.is-on { color: var(--ink); }
@media (max-width: 1099px) { .doc-toc a { padding: 6px 0; } .doc-toc ul, .doc-toc ul ul { gap: 0; } }
@media (min-width: 1100px) {
  .doc-shell { grid-template-columns: var(--toc-w) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "toc head" "toc body"; column-gap: 3rem; }
  .doc-toc-col { margin: 0; padding-top: 64px; }
  .doc-toc { position: sticky; top: calc(var(--header-h) + 48px); max-height: calc(100vh - var(--header-h) - 72px); overflow-y: auto; }
  .doc-toc > summary { display: none; }
  .doc-toc nav { padding: 0; }
}
@media (max-width: 720px) {
  .doc-head { padding-top: 32px; }
  .doc-intro { margin-top: 36px; }
  .doc-shell .doc-sec { margin-top: 56px; }
  .doc-toc-col { margin-top: 32px; }
}
.doc-shell .doc-sec > h2 + .dg { margin-top: 8px; }
.doc-head h1 { text-wrap: balance; }
.points--solo { grid-template-columns: minmax(0, var(--measure)); justify-content: start; }
.points + .prose { margin-top: 28px; }
/* a visible marker for copy still to write (each one has a TODO comment in src/method.html); remove before publishing */
.todo-placeholder { margin: 28px 0 0; padding: 14px 18px; border: 1.5px dashed var(--faint); border-radius: 6px; font: 13px/1.5 var(--mono); color: var(--muted); }
.points + .todo-placeholder { margin-top: 28px; }
.todo-placeholder + .prose { margin-top: 28px; }
.tt--link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.tt--link:hover { text-decoration-color: currentColor; }

/* method page, 2026-12 pass: workcell graphic with its caption beside it on wide screens; numbered contents */
@media (min-width: 900px) {
  .doc-shell .fig-workcell { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 17rem); column-gap: 40px; align-items: end; }
  .doc-shell .fig-workcell > .wh { grid-column: 1; grid-row: 1; }
  .doc-shell .fig-workcell > figcaption { grid-column: 2; grid-row: 1; margin: 0 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
}
/* the graphic draws its boxes 20 units in from its own edge (viewBox 640): pull it left so the boxes line up with the text */
.doc-shell .fig-workcell .wh svg { margin-left: calc(-20 / 640 * 100%); }
.doc-toc nav > ul { counter-reset: toc; }
.doc-toc nav > ul > li { counter-increment: toc; }
.doc-toc nav > ul > li > a { display: grid; grid-template-columns: 1.9rem minmax(0, 1fr); align-items: baseline; }
.doc-toc nav > ul > li > a::before { content: counter(toc, decimal-leading-zero); font: 11px/1 var(--mono); letter-spacing: .04em; color: var(--faint); }
.doc-toc nav > ul > li > a.is-on::before { color: var(--accent); }
.doc-toc ul ul { padding-left: 1.9rem; }
.doc-shell .doc-sec > .findings { margin-top: 4px; }

/* ------------------------------------------------------------ method page v3: tighter title block; "Setup of a task" kit
   list; control-loop code; task-card pictograms (icons from assets/js/lab_icons.js); the embedded b2 replay */
.doc-intro { margin-top: 20px; }
@media (max-width: 720px) { .doc-intro { margin-top: 16px; } }
.kit { margin: 24px 0 0; display: grid; }
.kit > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.kit > div:last-child { border-bottom: 1px solid var(--line-soft); }
.kit dt { font: 500 12px/1.7 var(--mono); letter-spacing: .04em; color: var(--ink); }
.kit dd { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); overflow-wrap: break-word; }
.kit dd code { color: var(--ink); }
@media (max-width: 560px) { .kit > div { grid-template-columns: 1fr; } }
.doc-shell .doc-sec > .act__code { margin: 22px 0 8px; }
.act__code .code { overflow-x: auto; }
.doc-shell .doc-sec > :is(.replay) { max-width: none; }
.doc-shell .doc-sec > :is(.submit__code, .replay) + :is(.prose, h3, .table-wrap) { margin-top: 28px; }
.doc-shell .doc-sec > .prose + .table-wrap { margin-top: 16px; }
/* score scale on phones: the end pills sit inside the track ends, so the 100 pill stays inside the frame */
@media (max-width: 560px) { .points__track span:first-child { transform: translate(0, -50%); } .points__track span:last-child { transform: translate(-100%, -50%); } }
/* the embedded replay (traces/<attempt>.html?embed; the iframe's height follows its page, see method.html) */
.replay { margin: 22px 0 0; min-width: 0; }
.replay__frame { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--raised); }
.replay iframe { display: block; width: 100%; height: 760px; border: 0; background: var(--raised); opacity: 0; transition: opacity .2s; }
.replay iframe.is-ready { opacity: 1; }
.doc-shell .replay > figcaption { max-width: var(--measure); margin: 10px 0 0; font: 12.8px/1.6 var(--mono); color: var(--muted); }

/* ---------------------------------------------------------------- home: inline run previews (#runs, assets/js/peek.js) */
.peek { --pk-proc: #e0621a; --pk-meas: #4f7f9c; --pk-move: #8a8278; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .peek { --pk-proc: #ff833f; --pk-meas: #8fb3c9; --pk-move: #9a9184; } }
:root[data-theme="dark"] .peek { --pk-proc: #ff833f; --pk-meas: #8fb3c9; --pk-move: #9a9184; }
.peek-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 14px; min-height: 380px; }
.peek-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.peek-card:hover, .peek-card:focus-visible { border-color: var(--accent); }
.peek-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.peek-card__model { display: inline-flex; align-items: center; gap: 8px; font: 500 17px/1.2 var(--serif); min-width: 0; }
.peek-card__logo { width: 16px; height: 16px; flex: none; fill: var(--pc, currentColor); align-self: center; }
.peek-card__score { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.peek-card__score-l { font: 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.peek-card__score b { font: 500 22px/1 var(--mono); font-variant-numeric: tabular-nums; }
.peek-card__task { margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-card__task .tid { font: 500 11.5px var(--mono); color: var(--ink); margin-right: 4px; }
.peek-view { border: 1px solid var(--line-soft); border-radius: 6px; background: var(--ground); aspect-ratio: 320 / 150; overflow: hidden; }
.peek-map { display: block; width: 100%; height: 100%; }
.pk-u__box { fill: var(--raised); stroke: var(--line); stroke-width: 1; transition: fill .2s, stroke .2s; }
.pk-u__name { font: 8px var(--mono); fill: var(--muted); }
.pk-u__prog { fill: var(--pk-proc); }
.pk-u.is-busy .pk-u__name { fill: var(--ink); }
.pk-u.is-busy .pk-u__box { stroke: var(--pk-proc); stroke-width: 1.5; fill: color-mix(in srgb, var(--pk-proc) 10%, var(--raised)); }
.pk-u.k-m .pk-u__box { stroke: var(--pk-meas); fill: color-mix(in srgb, var(--pk-meas) 12%, var(--raised)); } .pk-u.k-m .pk-u__prog { fill: var(--pk-meas); }
.pk-u.k-s .pk-u__box { stroke: var(--pk-move); stroke-dasharray: 3 2; fill: var(--raised); } .pk-u.k-v .pk-u__box { stroke: var(--pk-move); fill: var(--raised); }
.pk-u.k-s .pk-u__prog, .pk-u.k-v .pk-u__prog { fill: var(--pk-move); }
.pk-u.is-alarm .pk-u__box { stroke: var(--oc-fail); stroke-width: 2; stroke-dasharray: none; }
.pk-rail { stroke: var(--line); stroke-width: 2; stroke-linecap: round; }
.pk-tick { stroke: var(--faint); stroke-width: 1; }
.pk-arm { fill: var(--ink); }
.pk-s__name { font: 8px var(--mono); letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }
.pk-s__n { font: 500 15px var(--mono); fill: var(--ink); font-variant-numeric: tabular-nums; }
.peek-term { height: 100%; padding: 10px 12px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end; }
.peek-term__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; min-width: 0; }
.peek-term__lines li { font: 11px/1.35 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-term__lines li.is-msg { font: italic 13px/1.3 var(--serif); color: var(--ink); }
.peek-term__lines li.is-end { font-style: normal; color: var(--accent); }
.peek-cap { display: flex; align-items: baseline; gap: 10px; min-height: 20px; min-width: 0; }
.peek-cap__t { font: 11px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.peek-cap__x { font-size: 14.5px; line-height: 1.35; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-cap__x.k-a { color: var(--oc-fail); }
.peek-cap__x.k-r::before { content: "◆ "; color: var(--accent); }
.peek-bar { position: relative; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--faint) 30%, transparent); margin: 4px 0 2px; }
.peek-bar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); font-style: normal; }
.peek-bar__mk { position: absolute; font-style: normal; }
.peek-bar__mk.mk-alarm { top: -3px; width: 2px; height: 10px; margin-left: -1px; background: var(--oc-fail); border-radius: 1px; }
.peek-bar__mk.mk-report { top: -2.5px; width: 7px; height: 7px; margin-left: -3.5px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 0 1.5px var(--raised); }
.peek-card__note { margin: 0; font-size: 15px; line-height: 1.5; }
.peek-card__open { margin-top: auto; font: 12px var(--mono); color: var(--accent); }
.peek-card:hover .peek-card__arr { margin-left: 3px; }
@media (max-width: 640px) { .peek-card { padding: 14px 14px 12px; } .peek-grid { min-height: 0; } }

/* ------------------------------------------------------------ signup forms (assets/js/signup.js): the method page's updates
   card (in the page flow after "What we found") and the access request on unpublished tasks in the task picker */
.signup-block { margin-top: 64px; max-width: 820px; padding: 24px 26px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.signup-block__h { font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.signup-block__b { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0 0 16px; max-width: 560px; }
.su-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 480px; }
.su-input { flex: 1 1 150px; min-width: 0; height: 40px; padding: 0 12px; font: 400 14px/1 var(--mono); color: var(--ink); background: var(--ground); border: 1px solid var(--line); border-radius: 4px; }
.su-input::placeholder { color: var(--faint); }
.su-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.su-input[aria-invalid="true"] { border-color: var(--oc-fail); }
.su-submit { flex: 0 0 auto; height: 40px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--ground); font: 500 13px/1 var(--mono); letter-spacing: .02em; white-space: nowrap; }
.su-submit:hover { background: var(--accent); border-color: var(--accent); }
.su-submit[disabled] { opacity: .6; cursor: progress; }
.su-msg { flex: 1 0 100%; margin: 2px 0 0; min-height: 1.45em; font: 400 12.5px/1.45 var(--mono); color: var(--muted); }
.su-msg.is-error { color: var(--oc-fail); }
.su-form.is-done .su-input, .su-form.is-done .su-submit { display: none; }
.su-form.is-done .su-msg { color: var(--ink); margin-top: 0; }
.su-form--compact .su-input, .su-form--compact .su-submit { height: 36px; }
@media (max-width: 560px) {
  .signup-block { margin-top: 48px; padding: 20px 16px 16px; }
  .su-input { font-size: 16px; height: 44px; }   /* 16px keeps iOS from zooming into the field */
  .su-submit, .su-form--compact .su-input, .su-form--compact .su-submit { height: 44px; }
}
/* unpublished tasks in the picker: greyed id buttons, the access request in place of the facts, no instruction text */
.pk-tab.is-locked { color: var(--faint); border-style: dashed; background: transparent; }
.pk-tab.is-locked:hover { color: var(--muted); border-color: var(--muted); }
.pk-tab.is-locked[aria-pressed="true"] { background: var(--subtle); border-color: var(--muted); border-style: solid; color: var(--ink); }
.pk-body.is-locked .pk-task__title { color: var(--muted); }
.pk-body.is-locked .pk-task__about { font-size: 16px; color: var(--ink); }
.pk-body.is-locked .pk-body__facts { margin-top: 0; }
.pk-lock { padding-top: 18px; border-top: 1px solid var(--line-soft); display: grid; gap: 4px; }
.pk-lock__contact { font: 400 12.5px/1.45 var(--mono); color: var(--muted); margin: 0; }
.pk-more.is-locked .pk-more__btn { color: var(--faint); cursor: default; }
.pk-more.is-locked .pk-more__btn::after { content: none; }
.pk-more.is-locked .pk-instr { cursor: default; }
.pk-skel { display: grid; gap: 12px; padding-top: 4px; }
.pk-skel i { display: block; height: 10px; border-radius: 3px; background: var(--subtle); }
.pk-skel i:nth-child(2) { width: 92%; } .pk-skel i:nth-child(3) { width: 78%; } .pk-skel i:nth-child(4) { width: 86%; } .pk-skel i:nth-child(5) { width: 54%; }

/* leaderboard: sortable column heads (score view) */
.lb thead .lb-sort { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; gap: 4px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; border-radius: 3px; }
.lb thead .lb-sort:hover { color: var(--ink); }
.lb thead .lb-sort.on { color: var(--ink); font-weight: 600; }
.lb thead .lb-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb thead .lb-sort__ar { display: inline-block; min-width: .7em; color: var(--accent); }
.lb thead th.r .lb-sort { flex-direction: row; }

/* heatmap cells as on FrontierBioML: score over one glyph per attempt; hatched when every attempt was refused or blocked */
.heat .sw { height: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.heat .sw .hv { display: block; font: 11.5px var(--mono); line-height: 1.1; }
.heat .sw .hg { display: block; font-size: 6.5px; letter-spacing: 1.5px; margin-top: 3px; opacity: .85; line-height: 1; }
.heat .sw.refused { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--line) 4px 5px) !important; color: var(--ink) !important; }
.heat-legend .glyph { display: inline-block; margin-right: 6px; font-size: 11px; color: var(--ink); }
@media (max-width: 640px) { .heat .sw { height: 34px; } }

/* heatmap without full-width rules: groups are separated by space only */
.heat thead th { box-shadow: none; }
.heat tr.grprow > * { border-top: 0; }
@media (max-width: 640px) { .heat thead { box-shadow: none; } .heat tr.grprow > th { border-top: 0; } }

/* heatmap: clickable rows (published sample tasks) in bold */
.heat .tt--link { font-weight: 600; }
.heat td.cell--link .hv { font-weight: 600; }
.heat td.cell--link .cell-a { display: block; color: inherit; text-decoration: none; border-radius: 3px; }
.heat td.cell--link .cell-a:hover .sw, .heat td.cell--link .cell-a:focus-visible .sw { box-shadow: inset 0 0 0 1.5px var(--ink); }
.heat td.cell--link .cell-a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* model chips above the score chart (FrontierBioML style) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chips .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); cursor: pointer; margin: 0; letter-spacing: 0; text-transform: none; vertical-align: baseline; }
.chips .chip:hover { border-color: var(--muted); }
.chips .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips .chip .logo { width: 13px; height: 13px; vertical-align: 0; }
.chips .chip[aria-pressed="false"] { background: none; color: var(--faint); border-style: dashed; }
.chips .chip[aria-pressed="false"] span { text-decoration: line-through; text-decoration-color: var(--faint); }
.chips .chip[aria-pressed="false"] .logo { opacity: .4; }

/* leaderboard note spans the full table width */
#lb-notes, #lb-notes p { max-width: none; }

/* phones: keep the theme toggle fully visible (drop the Scoring link, Method covers it) and keep heatmap model names apart */
@media (max-width: 420px) {
  .site-nav a[data-sec="scoring"] { display: none; }
  .hm__name { font-size: 9.5px; letter-spacing: -.02em; }
  .hm__name--long { font-size: 8px; letter-spacing: -.03em; }
}
