/* Argus site: one stylesheet, system fonts, no framework. Phone first; wider screens add.
   Nothing blurs or animates over the live canvas: the theme keeps every frame. */
:root {
  --bg: #020203; --surface: #09090b; --surface-2: #0f1013; --surface-3: #16171b;
  --line: rgba(255, 255, 255, 0.075); --line-2: rgba(255, 255, 255, 0.13); --line-3: rgba(255, 255, 255, 0.22);
  --fg: #f3f4f6; --fg-2: #b9bec7; --mute: #8b919b; --dim: #60656e;
  --vi: 201, 210, 255; --link: rgb(var(--vi));
  --pass: #5ed68b; --pass-bg: rgba(94, 214, 139, 0.1); --fail: #ff6d61; --fail-bg: rgba(255, 109, 97, 0.1); --warn: #f0c562;
  --display: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: max(16px, env(safe-area-inset-left)); --gutter-r: max(16px, env(safe-area-inset-right));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: max(28px, env(safe-area-inset-left)); --gutter-r: max(28px, env(safe-area-inset-right)); } }
@media (min-width: 1200px) { :root { --gutter: 40px; --gutter-r: 40px; } }

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; color: var(--fg); font: 400 16px/1.6 var(--sans); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
@media (min-width: 1200px) { body { font-size: 17px; } }
::selection { background: rgba(195, 205, 255, 0.3); color: #fff; }
a { color: var(--link); text-decoration: underline 1px rgba(var(--vi), 0.35); text-underline-offset: 0.2em; transition: color 0.15s, text-decoration-color 0.15s; }
a:hover { color: #fff; text-decoration-color: currentColor; }
b { color: var(--fg); font-weight: 600; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--surface-3); border: 1px solid var(--line); border-radius: 5px; padding: 0.06em 0.36em; color: #e3e6ec; overflow-wrap: anywhere; }
.home main :not(pre) > code { border: 0; background: rgba(255, 255, 255, 0.06); }
pre { margin: 0; overflow-x: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; }
h2 { font: 700 clamp(1.9rem, 1.25rem + 2.6vw, 3.25rem)/1.04 var(--display); letter-spacing: -0.032em; margin: 0 0 0.7em; max-width: 22ch; text-wrap: balance; }
h3 { font: 650 1.08rem/1.3 var(--sans); letter-spacing: -0.01em; margin: 0 0 0.55em; }
p { margin: 0 0 1em; }
.mute { color: var(--mute); }
.small { font-size: 0.875rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
/* Focus: a white ring with a black halo, legible over any theme. */
:focus { outline: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.85); border-radius: 6px; }

/* ---- buttons: hairline rectangles in the links' violet -------------------------------- */
button, .btn {
  font: 600 0.92rem/1 var(--sans); letter-spacing: -0.005em; color: var(--link); background: rgba(var(--vi), 0.05);
  border: 1px solid rgba(var(--vi), 0.42); border-radius: 4px; padding: 0.82em 1.25em; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; text-decoration: none; white-space: nowrap;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s var(--ease);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button:hover, .btn:hover { color: #fff; background: rgba(var(--vi), 0.12); border-color: rgba(var(--vi), 0.6); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: default; }
.btn.primary, button.primary { background: rgba(var(--vi), 0.14); border-color: rgba(var(--vi), 0.9); }
.btn.primary:hover, button.primary:hover { color: #fff; background: rgba(var(--vi), 0.2); border-color: rgb(var(--vi)); }
.btn svg.gh { width: 1.05em; height: 1.05em; }

/* ---- top bar ------------------------------------------------------------------------ */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter-r) 12px var(--gutter);
  background: linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0)); pointer-events: none; transition: background-color 0.25s;
}
.top > * { pointer-events: auto; }
.brand { font: 800 1rem/1 var(--mono); -webkit-text-stroke: 0.35px currentColor; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg); text-decoration: none; }
.brand:hover { color: #fff; }
.top nav { margin-left: auto; display: flex; gap: 0.25rem; font-size: 0.9rem; }
.top nav a { color: rgba(255, 255, 255, 0.86); text-decoration: none; padding: 0.45em 0.6em; border-radius: 8px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
.top nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.top nav a.opt { display: none; }
@media (min-width: 900px) { .top nav a.opt { display: inline; } .top nav { gap: 0.4rem; } }
.solid .top { background: rgba(2, 2, 3, 0.86); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }

/* ---- hero: the theme, framed -------------------------------------------------------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #000; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto;
}
.hero .stage { position: absolute; inset: 0; z-index: -2; }
.hero canvas, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .poster { object-fit: cover; opacity: 0.5; transition: opacity 0.8s var(--ease); }
/* The scrim is local: dark only where the words are; the theme itself is never dimmed. */
.hero .scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 42% at 0% 0%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%), linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 20%);
}
/* Small words in the top-left corner: the wallpaper is the subject. */
.hero-copy { grid-row: 1; padding: calc(104px + env(safe-area-inset-top)) var(--gutter-r) 0 var(--gutter); }
.wordmark { font: 700 1.4rem/1.1 var(--display); letter-spacing: -0.03em; margin: 0 0 0.3em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7); }
.lede, .lede-2 { margin: 0; line-height: 1.45; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 18px rgba(0, 0, 0, 0.8); text-wrap: balance; }
.lede { font: 500 0.95rem/1.45 var(--sans); letter-spacing: -0.005em; color: #fff; }
.lede-2 { font-size: 0.82rem; color: rgba(255, 255, 255, 0.72); margin-top: 0.15em; }
.ctas { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.hero .ctas .btn { padding: 0.68em 1.05em; font-size: 0.86rem; font-weight: 550; background: rgba(4, 4, 10, 0.5); border-color: rgba(var(--vi), 0.45); }
.hero .ctas .btn:hover { color: #fff; background: rgba(var(--vi), 0.12); border-color: rgba(var(--vi), 0.65); }
.hero .ctas .btn.primary { background: rgba(var(--vi), 0.16); border-color: rgba(var(--vi), 0.9); }
.hero .ctas .btn.primary:hover { background: rgba(var(--vi), 0.22); border-color: rgb(var(--vi)); }
@media (min-width: 720px) {
  .hero-copy { padding-top: calc(84px + env(safe-area-inset-top)); padding-right: calc(16.5rem + var(--gutter-r) + 32px); }
  .wordmark { font-size: 1.6rem; }
  .lede { font-size: 1rem; }
  .lede-2 { font-size: 0.88rem; }
}

/* Entrance: once, on the compositor (opacity and transform only); backwards fill, so .bare wins after. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
.hero-copy > * { animation: rise 0.9s var(--ease) backwards; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.14s; }
.hero-copy > :nth-child(4) { animation-delay: 0.2s; }
.dock, .tele { animation: fade 1s 0.3s var(--ease) backwards; }
.hero .hero-copy, .hero .scrim, .hero .tele, .hero .dock { transition: opacity 0.4s var(--ease); }

/* Hide UI: everything over the theme fades but one quiet "show UI" (the same button; home.js
   toggles .bare and keeps its label, so CSS swaps the words). */
.hero.bare .hero-copy, .hero.bare .scrim, .hero.bare .dock { opacity: 0; pointer-events: none; }
.hero.bare .tele { background: none; border-color: transparent; padding: 0; width: auto; }
.hero.bare .tele > :not(.tools), .hero.bare .tele .tools > :not(#bareBtn) { display: none; }
.hero.bare .tele .tools { margin: 0; }
.hero.bare .tele .tools #bareBtn { display: inline-flex; font-size: 0; padding: 7px 11px; background: rgba(0, 0, 0, 0.6); border-color: rgba(255, 255, 255, 0.16); opacity: 0.6; }
.hero.bare .tele .tools #bareBtn::after { content: "show UI"; font: 500 11px/1 var(--mono); }
.hero.bare .tele .tools #bareBtn:hover, .hero.bare .tele .tools #bareBtn:focus-visible { opacity: 1; }

/* The dock: what is playing, and the picker. */
.dock { grid-row: 3; min-width: 0; padding: 0 0 max(14px, env(safe-area-inset-bottom)); }
/* One line: name, source, description fading out; hover or focus shows it all. */
.caption {
  display: flex; align-items: baseline; gap: 0.6em; white-space: nowrap; overflow: hidden;
  margin: 0 var(--gutter-r) 10px var(--gutter); font-size: 0.86rem; line-height: 1.5; color: rgba(255, 255, 255, 0.74); max-width: 52rem;
  min-height: 1.5em; text-shadow: 0 1px 2px #000, 0 0 14px rgba(0, 0, 0, 0.9);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}
@media (min-width: 720px) { .caption { font-size: 0.9rem; margin-bottom: 12px; } }
.caption:hover, .caption:focus-within { display: block; white-space: normal; -webkit-mask-image: none; mask-image: none; }
.caption b { order: -2; flex: none; color: #fff; font-weight: 650; }
.caption a { order: -1; flex: none; text-decoration: none; }
.caption code { font-size: 0.78rem; background: none; border: 0; padding: 0; color: rgba(var(--vi), 0.8); white-space: nowrap; }
.caption a:hover code { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.picker {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px var(--gutter-r) 6px var(--gutter); scrollbar-width: none; scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.picker::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; font: 550 0.86rem/1 var(--sans); padding: 0.7em 1em; scroll-snap-align: start;
  background: none; border-color: transparent; color: rgba(255, 255, 255, 0.78); text-shadow: 0 1px 2px #000, 0 0 10px rgba(0, 0, 0, 0.9);
}
.chip:hover { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: transparent; }
.chip small { font: 500 10px/1 var(--mono); color: var(--mute); letter-spacing: 0.03em; margin-left: 0.2em; }
.chip[aria-pressed="true"] { color: var(--link); background: rgba(var(--vi), 0.16); border-color: rgba(var(--vi), 0.9); }
.chip[aria-pressed="true"] small { color: rgba(var(--vi), 0.7); }
.chip.yours { border-color: rgba(var(--vi), 0.35); border-style: dashed; color: var(--link); }
.chip.yours small { display: none; }
.chip:disabled { opacity: 0.38; }

/* Telemetry: a quiet instrument readout, top right. No blur over the canvas. */
.tele {
  position: absolute; z-index: 5; right: var(--gutter-r); top: calc(54px + env(safe-area-inset-top));
  font: 11.5px/1.55 var(--mono); color: #c9ced6; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px; padding: 10px 12px; width: 16.5rem; font-variant-numeric: tabular-nums;
}
.tele:not(.min) { width: min(16.5rem, calc(100vw - 32px)); }
@media (min-width: 720px) { .tele { top: calc(58px + env(safe-area-inset-top)); } .tele:not(.min) { width: 16.5rem; } }
.tele-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--mute); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.tele-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pass); box-shadow: 0 0 0 3px rgba(94, 214, 139, 0.16); flex: none; }
.tele .sum { display: none; color: #eef0f3; font-size: 11.5px; letter-spacing: 0; text-transform: none; }
.tele .row { display: flex; justify-content: space-between; gap: 1rem; padding: 1px 0; }
.tele .row + .row { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.tele .k { color: var(--mute); }
.tele .v { color: #f0f2f5; text-align: right; }
.tele .note { color: var(--warn); margin-top: 6px; white-space: normal; line-height: 1.45; }
.tele .note button { margin-top: 6px; font: 600 11px/1 var(--sans); padding: 6px 9px; }
.tele .err { color: var(--fail); margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tele .tools { display: flex; gap: 5px; margin-top: 8px; }
.tele .tools button { font: 500 10.5px/1 var(--mono); padding: 6px 8px; background: transparent; border-color: rgba(255, 255, 255, 0.13); color: #d6dae0; }
.tele .tools button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.32); }
.tele #teleBtn { margin-left: auto; min-width: 26px; }
.tele.min { width: auto; display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 11px; }
.tele.min .tele-head, .tele.min .tools { margin: 0; }
.tele.min .tele-title, .tele.min .body, .tele.min .tools button:not(#teleBtn) { display: none; }
.tele.min .sum { display: inline; }
.tele.min #teleBtn { width: 24px; height: 24px; padding: 0; }
.hero .tele.min .tools #bareBtn { display: inline-flex; height: 24px; }

/* ---- sections: no cards or bands; hairlines only where data needs them ------------------ */
main section.band { padding: clamp(56px, 7vw, 112px) var(--gutter-r) clamp(56px, 7vw, 112px) var(--gutter); }
.wrap { max-width: 72rem; margin: 0 auto; }
.prose { max-width: 40rem; }
.prose p { color: var(--fg-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.7em; font: 600 0.72rem/1 var(--mono); letter-spacing: 0.16em; color: var(--mute); text-transform: uppercase; margin-bottom: 1.2rem; }
.aside { font-size: 0.9rem; color: var(--mute); border-left: 2px solid var(--line-2); padding-left: 14px; margin-top: 1.4em; }
.grid { display: grid; gap: 40px 48px; }
.grid + .grid { margin-top: 56px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { min-width: 0; }
.card p { color: var(--fg-2); font-size: 0.95rem; }
.card p:last-child { margin-bottom: 0; }
.card .aside { font-size: 0.85rem; }
.card-k { font: 600 0.68rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin-bottom: 1.1rem; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 64px; } }
.video { display: block; position: relative; border-radius: 4px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; text-decoration: none; }
.video img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.video:hover img { transform: scale(1.02); }
.video .play { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 0.7em; font: 600 0.88rem/1.2 var(--sans); color: #fff; padding: 0.55em 1em 0.55em 0; text-shadow: 0 1px 8px #000; }
.video .play .on { color: rgba(255, 255, 255, 0.6); font-weight: 500; }
.video .tri { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.video .tri::after { content: ""; border-left: 9px solid #000; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 2px; }

/* ---- install --------------------------------------------------------------------------- */
.installs { display: grid; gap: 56px; margin-top: 8px; }
@media (min-width: 980px) { .installs { grid-template-columns: 0.88fr 1.12fr; } }
.install { display: flex; flex-direction: column; gap: 14px; }
.install p { margin: 0; }
.card-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.card-head h3 { font: 700 1.25rem/1 var(--display); letter-spacing: -0.03em; margin: 0; }
.tag { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.06em; color: var(--mute); text-transform: uppercase; }
.then { color: var(--fg) !important; font-weight: 500; }
.code { position: relative; border-left: 1px solid var(--line-3); padding: 2px 0 2px 16px; font: 13.5px/1.65 var(--mono); color: #e4e7ec; }
.code pre { scrollbar-width: thin; }
.code .c { color: var(--dim); }
.code .copy { display: inline; margin-top: 10px; padding: 0; background: none; border: 0; border-radius: 0; font: 500 12px/1 var(--mono); color: var(--mute); text-decoration: underline; text-underline-offset: 0.25em; }
.code .copy:hover { color: #fff; }
.install.mac .code pre { white-space: pre-wrap; font-size: 14px; color: #fff; text-indent: -1.2em; padding-left: 1.2em; }
.install.mac .code pre::before { content: "$\00a0"; color: var(--dim); }
.install.linux .code pre { font-size: 12.5px; }
.repo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 22px 0 0; color: var(--mute); font-size: 0.9rem; }

/* ---- bench section on the home page --------------------------------------------------- */
.bench-intro { display: grid; gap: 4px; max-width: 40rem; }
.bench-intro .prose p { font-size: 1.05rem; }
.gatelist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
@media (min-width: 560px) { .gatelist { grid-template-columns: 1fr 1fr; } }
.gatelist li { display: flex; align-items: center; gap: 14px; padding: 7px 0; font-size: 0.92rem; color: var(--fg-2); line-height: 1.35; }
.gatelist .n { flex: none; display: grid; place-items: center; font: 700 0.72rem/1 var(--mono); color: var(--mute); }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 56px 0 0; }
.figures > div { padding: 22px 14px 22px 0; display: flex; flex-direction: column; }
.figures > div + div { padding-left: 18px; }
.figures dt { order: 2; font: 600 0.7rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg); margin-top: 0.5rem; }
.figures dd { margin: 0; order: 1; font: 700 clamp(2.6rem, 1.6rem + 4vw, 4.6rem)/0.9 var(--display); letter-spacing: -0.05em; color: #fff; font-variant-numeric: tabular-nums; }
.figures dd.sub { order: 3; font: 400 0.82rem/1.4 var(--sans); letter-spacing: 0; color: var(--mute); margin-top: 0.4rem; display: none; }
@media (min-width: 720px) { .figures dd.sub { display: block; } .figures > div + div { padding-left: 28px; } }
.lb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 64px 0 14px; }
.lb-head h3 { font: 700 1.35rem/1.1 var(--display); letter-spacing: -0.025em; margin: 0; }
.lb-head h3 span { font: 500 0.8rem/1 var(--mono); color: var(--mute); letter-spacing: 0; margin-left: 0.5em; }
.lb-head .hint { font-size: 0.82rem; color: var(--mute); }

/* The leaderboard: hairline rows, sortable headers, a sticky first column on phones. */
.tablewrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.875rem; }
th, td { padding: 0.78em 0.95em; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
td { font-variant-numeric: tabular-nums; color: var(--fg-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 0.12s; }
table.lb tbody tr:hover td { background: #0a0a0c; }
th { position: sticky; top: 0; background: var(--bg); border-bottom-color: var(--line-2); font: 600 0.68rem/1.25 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); vertical-align: bottom; }
th button { all: unset; cursor: pointer; display: inline-flex; gap: 0.45em; align-items: center; color: inherit; border-radius: 4px; }
th button:hover { color: var(--fg); }
th button::after { content: ""; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4px solid currentColor; opacity: 0.35; }
th[aria-sort] { color: var(--fg); }
th[aria-sort="ascending"] button::after { border-top: 0; border-bottom: 4px solid #c3cdff; opacity: 1; }
th[aria-sort="descending"] button::after { border-top-color: #c3cdff; opacity: 1; }
th button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: none; }
table.lb { min-width: 640px; }
table.lb :is(th, td):nth-child(n + 7) { display: none; }
.home:has(#lbAll:checked) table.lb { min-width: 920px; }
.home:has(#lbAll:checked) table.lb :is(th, td):nth-child(n + 7) { display: table-cell; }
.lb-all { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.45em; font-size: 0.82rem; color: var(--mute); cursor: pointer; }
.lb-all input { width: auto; margin: 0; accent-color: rgb(var(--vi)); }
table.lb td:nth-child(1) { white-space: nowrap; color: var(--fg); font-weight: 600; }
table.lb td:nth-child(2) { white-space: nowrap; font: 0.8rem/1.6 var(--mono); color: var(--mute); }
table.lb :is(td, th):is(:nth-child(3), :nth-child(4), :nth-child(8)) { text-align: center; }
table.lb td:nth-child(3), table.lb td:nth-child(4) { color: var(--fg); font-weight: 600; }
table.lb td:nth-child(5) { white-space: nowrap; }
table.lb td:nth-child(7) { min-width: 15rem; font-size: 0.8rem; }
table.lb td:nth-child(7) code { font-size: 0.74rem; }
table.lb th:first-child, table.lb td:first-child { position: sticky; left: 0; z-index: 1; padding-left: 0; background: var(--bg); box-shadow: 1px 0 0 var(--line); }
table.lb th:first-child { z-index: 2; }
@media (min-width: 720px) { table.lb th:first-child, table.lb td:first-child { box-shadow: none; } }
@media (max-width: 719px) { table.lb { font-size: 0.82rem; } table.lb th, table.lb td { padding: 0.7em 0.75em; } }
.fold { margin: 18px 0 0; }
.fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: 0.55em; font-size: 0.86rem; color: var(--mute); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 0.42em; height: 0.42em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-0.12em) rotate(-45deg); transition: transform 0.15s; flex: none; }
.fold[open] > summary::before { transform: translateY(-0.2em) rotate(45deg); }
.fold > summary:hover { color: var(--fg); }
.fold[open] > summary { margin-bottom: 14px; }
.bench-intro .fold { margin: 0; }
.footnotes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; font-size: 0.84rem; color: var(--mute); max-width: 62rem; line-height: 1.55; }
.footnotes b { color: var(--fg-2); }
@media (min-width: 980px) { .footnotes { grid-template-columns: 1fr 1fr; gap: 0.7rem 2.2rem; } }
.cta-band { margin: 56px 0 0; }

/* ---- footer ---------------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding: 40px var(--gutter-r) max(48px, env(safe-area-inset-bottom)) var(--gutter); color: var(--mute); font-size: 0.86rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; }
.foot-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; max-width: 46rem; }
.foot .brand { font-size: 1.05rem; }
.foot nav { display: flex; gap: 1.4rem; }
.foot nav a { color: var(--fg-2); text-decoration: none; }
.foot nav a:hover { color: #fff; }

/* ---- bench page ------------------------------------------------------------------------ */
.page { padding: calc(112px + env(safe-area-inset-top)) var(--gutter-r) clamp(72px, 10vw, 128px) var(--gutter); }
.page > .wrap { max-width: 64rem; }
.page-title { font: 700 clamp(2.4rem, 1.4rem + 4.2vw, 4.4rem)/0.95 var(--display); letter-spacing: -0.045em; margin: 0 0 0.35em; }
.page-lede { font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem); line-height: 1.5; color: var(--fg-2); max-width: 40rem; margin-bottom: 2.2rem; text-wrap: pretty; }
/* Submission kind: two words on a hairline; the selected one violet and underlined. */
.tabs { display: flex; gap: 28px; margin: 2.8rem 0 2.4rem; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--mute); padding: 0 0 12px; margin-bottom: -1px; font: 600 0.95rem/1.2 var(--sans); }
.tabs button:hover { background: none; color: var(--fg); border-color: transparent; border-bottom-color: var(--line-3); }
.tabs button[aria-selected="true"] { color: var(--link); border-bottom-color: var(--link); }
@media (max-width: 559px) { .tabs { gap: 20px; } .tabs button { font-size: 0.86rem; } }
.step-h { display: flex; align-items: baseline; gap: 14px; font: 700 clamp(1.4rem, 1.2rem + 0.9vw, 1.8rem)/1.1 var(--display); letter-spacing: -0.03em; margin: 3.4rem 0 0.7rem; max-width: none; }
[role="tabpanel"] > .step-h:first-child { margin-top: 0; }
.step-h .n { flex: none; font: 600 0.8rem/1 var(--mono); letter-spacing: 0.06em; color: var(--mute); }
.step-h .n::before { content: "0"; }
.sub-h { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin: 2.4rem 0 0.9rem; }
[role="tabpanel"] > p:is(.small, .mute) { max-width: 46rem; }
/* The prompt, the report, notes and diagnostics: text behind one left hairline. */
.prompt, .report { border-left: 1px solid var(--line-3); padding: 2px 0 2px 16px; font: 13px/1.7 var(--mono); color: #e3e6eb; scrollbar-width: thin; }
.prompt { white-space: pre-wrap; max-height: 22rem; overflow: auto; }
.report { font-size: 12px; line-height: 1.6; color: #d3d8df; white-space: pre; overflow-x: auto; }
.row-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; align-items: center; }
.row-btns[hidden], .diag[hidden], button[hidden] { display: none; }
.row-btns .small { margin-left: 0.4rem; }
.row-btns > span.small { flex: 1 1 18rem; color: var(--mute); line-height: 1.45; }
.toolbar { margin: 0; }
.toolbar select { flex: 1 1 18rem; min-width: 0; }
@media (max-width: 559px) { .toolbar select, .toolbar button { flex: 1 1 100%; } .toolbar a { margin: 0.2rem auto; } }
.namerow { margin: 0 0 0.7rem; }
.namerow label { color: var(--mute); }
.field { width: 15rem !important; max-width: 100%; padding: 0.62em 0.8em !important; }
textarea, input:not([type="file"]) {
  width: 100%; background: rgba(255, 255, 255, 0.015); color: #e6e9ee; border: 1px solid var(--line-2); border-radius: 4px;
  padding: 1rem 1.1rem; font: 13px/1.6 var(--mono); tab-size: 4; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 18rem; resize: vertical; display: block; }
textarea::placeholder { color: var(--dim); }
textarea:focus, input:focus { outline: none; border-color: rgba(var(--vi), 0.7); box-shadow: 0 0 0 3px rgba(var(--vi), 0.1); }
select {
  font: 500 0.9rem/1.2 var(--sans); color: var(--fg); border: 1px solid var(--line-2); border-radius: 4px;
  padding: 0.72em 2.4em 0.72em 0.95em; max-width: 100%; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-color: rgba(255, 255, 255, 0.02);
  background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: right 1.1em top 52%, right calc(1.1em - 5px) top 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
select:hover { border-color: var(--line-3); }
select:focus-visible { border-color: rgba(var(--vi), 0.7); }
button.link, label.link { display: inline; background: none; border: 0; border-radius: 0; padding: 0; font: 500 0.86rem/1.4 var(--sans); color: var(--mute); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 0.22em; cursor: pointer; }
button.link:hover, label.link:hover { background: none; color: #fff; text-decoration-color: currentColor; }
.quiet-links { display: inline-flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
@media (min-width: 560px) { .quiet-links { margin-left: 0.6rem; } }
.dropall { position: fixed; inset: 12px; z-index: 50; display: none; place-items: center; background: rgba(2, 2, 3, 0.86); border: 1px dashed var(--link); border-radius: 4px; color: var(--fg); font: 600 1.15rem/1.5 var(--sans); text-align: center; padding: 2rem; pointer-events: none; }
.dropall.on { display: grid; }
.note { border-left: 2px solid var(--warn); padding: 0.1rem 0 0.1rem 1rem; font-size: 0.9rem; line-height: 1.6; color: var(--fg-2); margin: 1.2rem 0; max-width: 46rem; }
.note.info { border-left-color: rgba(var(--vi), 0.7); }
.note b { color: var(--fg); }
.diag { font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; border-left: 2px solid var(--fail); padding: 0.1rem 0 0.1rem 1rem; color: #ffc9c2; margin: 0 0 1.2rem; }

/* ---- the result: verdict, the gates as hairline rows, the frames, the report ------------ */
.result { margin-top: 2.4rem; display: none; scroll-margin-top: 84px; }
.result.on { display: block; padding-top: 22px; border-top: 1px solid var(--line-2); }
.verdict { display: flex; align-items: center; gap: 0.6rem 1rem; flex-wrap: wrap; margin-bottom: 16px; }
.verdict > span:nth-child(2) { font: 700 1.3rem/1.2 var(--display); letter-spacing: -0.02em; color: var(--fg); overflow-wrap: anywhere; }
.verdict .progress { flex: 0 1 auto; }
#zigPhase, #wgslPhase { flex-basis: 100%; }
.badge { display: inline-flex; align-items: center; gap: 0.55em; font: 800 0.95rem/1 var(--mono); padding: 0.55em 0.75em; border-radius: 4px; letter-spacing: 0.12em; }
.badge.pass { background: var(--pass-bg); color: var(--pass); border: 1px solid rgba(94, 214, 139, 0.6); }
.badge.fail { background: var(--fail-bg); color: var(--fail); border: 1px solid rgba(255, 109, 97, 0.65); }
.badge.run { color: var(--fg-2); border: 1px solid var(--line-3); }
.badge.run::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
/* Gates: a table like the leaderboard; number, name, verdict, then the harness's own detail. */
.gatewrap { border-top: 1px solid var(--line-2); }
table.gates { border-collapse: collapse; }
table.gates td { padding: 0.72em 0.9em 0.72em 0; border: 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
table.gates td:first-child { width: 4.6rem; font: 600 0.68rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
table.gates td:first-child::before { content: "Gate "; }
#wgslGates td:first-child { width: 5.2rem; }
#wgslGates td:first-child::before { content: "Check "; }
table.gates td:nth-child(2) { width: 14rem; font: 600 0.92rem/1.4 var(--sans); color: var(--fg); }
table.gates td.st { width: 6.5rem; font: 800 0.68rem/1.6 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
table.gates td.d { font: 12px/1.55 var(--mono); color: var(--mute); white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 0; }
.st.pass { color: var(--pass); } .st.fail { color: var(--fail); } .st.skip { color: var(--dim); } .st.info { color: var(--link); }
table.gates tr:has(.st.fail) td { background: rgba(255, 109, 97, 0.05); }
table.gates tr:has(.st.fail) td.d { color: #ffc4bd; }
table.gates tr:has(.st.fail) td:first-child { box-shadow: inset 2px 0 0 var(--fail); padding-left: 0.7em; }
table.gates tr:has(.st.skip) td:nth-child(2) { color: var(--fg-2); }
table.gates tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
@media (max-width: 719px) {
  table.gates, table.gates tbody { display: block; }
  table.gates tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "n name st" "d d d"; gap: 2px 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
  table.gates td { display: block; padding: 0; border: 0; width: auto !important; background: none !important; }
  table.gates td:first-child { grid-area: n; box-shadow: none !important; padding-left: 0 !important; }
  table.gates td:first-child::before { content: ""; }
  table.gates td:nth-child(2) { grid-area: name; }
  table.gates td.st { grid-area: st; }
  table.gates td.d { grid-area: d; margin-top: 4px; }
  table.gates tr:has(.st.fail) { box-shadow: inset 2px 0 0 var(--fail); padding-left: 10px; background: rgba(255, 109, 97, 0.05); }
}
.live-fig, .final-fig { margin: 0 0 22px; }
.live-fig .live, .final-fig canvas { width: 100%; aspect-ratio: 16 / 10; background: #000; border: 1px solid var(--line); border-radius: 4px; display: block; }
.live-fig .live { position: relative; overflow: hidden; }
.live-fig .live canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.final-fig { margin: 18px 0 0; max-width: 32rem; }
.live-fig figcaption, .final-fig figcaption { font: 11.5px/1.5 var(--mono); color: var(--mute); margin-top: 0.6rem; }
.live-fig figcaption button.link { margin-left: 0.6rem; font: 500 11.5px/1.5 var(--mono); }
.gd { display: flex; width: fit-content; margin: 8px 0 4px auto; align-items: center; gap: 0.4em; font-size: 0.8rem; color: var(--mute); cursor: pointer; white-space: nowrap; }
.gd input { width: auto; margin: 0; accent-color: rgb(var(--vi)); }
.gatewrap:not(:has(.gd input:checked)) td.d { display: none; }
.gatewrap:not(:has(.gd input:checked)) { width: fit-content; min-width: min(100%, 30rem); max-width: 100%; }
.stage:fullscreen { border: 0; border-radius: 0; aspect-ratio: auto; }
.stage:fullscreen canvas { width: 100%; height: 100%; }
.result > p.small { margin: 1rem 0 0; color: var(--mute); max-width: 52rem; }
.progress { font: 12px/1.5 var(--mono); color: var(--mute); }
/* The live board (live.js). */
.live-t td { font-size: 0.82rem; }
.live-t td code { font-size: 0.78rem; white-space: nowrap; }
.live-t td:nth-child(3) { min-width: 14rem; }
.live-t td:last-child { min-width: 12rem; }
#live .toolbar select { flex: 0 1 14rem; }
.pill { display: inline-block; padding: 0.15em 0.55em; border: 1px solid var(--line-2); border-radius: 4px; font: 600 0.7rem/1.4 var(--mono); color: var(--fg-2); white-space: nowrap; }
.pill.graded, .pill.merged { border-color: rgba(94, 214, 139, 0.45); color: var(--pass); }
.pill.waiting, .pill.stale { border-color: rgba(240, 197, 98, 0.45); color: var(--warn); }
.live-t .v { font: 700 0.8rem/1 var(--mono); }
.live-t .v.pass { color: var(--pass); } .live-t .v.fail { color: var(--fail); }
.cmp { margin-top: 0.45rem; font: 12px/1.45 var(--mono); padding-left: 0.6rem; border-left: 2px solid var(--line-3); color: var(--fg-2); max-width: 30rem; }
.cmp.ok { border-left-color: var(--pass); color: var(--pass); }
.cmp.bad { border-left-color: var(--fail); color: var(--fail); background: var(--fail-bg); }
.cmp[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
