/* RUIBench project page, in the Show Lab style of the paper and Show-Harness: Arial like the figures,
   the paper palette (slBlue, slLogoBlue, slGreen, slRed, slOrange), per-action purple / program green. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --ink: #16191d;
  --ink-2: #3a424c;
  --muted: #5f6873;
  --faint: #8a939c;
  --rule: #d9e1ea;
  --rule-2: #e8edf3;
  --tint: #f4f8fc;
  --accent: #0071bc;        /* slBlue */
  --accent-ink: #005c99;
  --logo-blue: #669ed3;     /* slLogoBlue */
  --green: #67a651;         /* slGreen */
  --red: #d85e5d;           /* slRed */
  --orange: #f3aa68;        /* slOrange */
  --pa: #6648a8;            /* per-action, as in the teaser */
  --pa-tint: #efebf8;
  --pg: #487e30;            /* program */
  --pg-tint: #eaf3e5;
  --free: #16191d;
  --cc: #c4623f;            /* Claude Code */
  --codex: #0071bc;         /* Codex */
  --qwen: #615ced;          /* Qwen (its mark's colour) */
  --ok: #2b8a4b;
  --bad: #c0443e;
  --video-bg: #0c0f14;
  --radius: 14px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-2: 0 12px 32px -14px rgba(16, 24, 40, .28), 0 4px 10px -6px rgba(16, 24, 40, .1);
  --sans: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
  --display: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;   /* titles: Arial too */
  --num: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;       /* big numbers: Arial too */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
body { text-wrap: pretty; }   /* no paragraph ends on a lone word (inherited by all text) */
h1, h2, h3 { text-wrap: balance; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 860px; }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ top bar (appears after the hero) */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 56px;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule-2);
  transform: translateY(-100%); transition: transform .25s ease;
}
.topbar.on { transform: none; }
.topbar .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.topbar .mark { font-size: 21px; line-height: 1; }
.topbar .mark:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topbar nav a { color: var(--ink-2); font-size: 14px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.topbar nav a:hover, .topbar nav a.is-active { color: var(--accent-ink); background: var(--tint); text-decoration: none; }

/* wordmark: RUI drawn from a robot arm, building blocks and a Hanoi tower (assets/logo/rui.svg, Morandi
   colours), sized to Bench's cap height and sitting on its baseline; Bench in Manrope 800, one colour */
.wordmark { font-family: Manrope, Arial, sans-serif; font-weight: 800; letter-spacing: -.03em; color: #464d56; white-space: nowrap; }
.wordmark .rui-mark { display: inline-block; vertical-align: baseline; height: .72em; width: auto; margin-right: .015em; }

/* ------------------------------------------------------------------ hero: a dark task board under a left-to-right veil
   Five rows, one per suite as in the paper's task figure (six simulated tasks, then the suite's real-robot task),
   each scrolling endlessly at the same speed, neighbouring rows in opposite directions. The text sits on the left, centred in height.
   The veil, as on Embodied First Exam's first screen: the page's dark washes the whole board, most on the left and
   least on the right but never fully clear, so it has no edge, and lightly, so the board stays bright away from the
   text; a soft clearing behind the text darkens and blurs it (.hero-text::before). The numbers band lies over the
   board's bottom edge as frosted dark glass with a sharp top edge, so the hero runs under it to the window's bottom. --text-end is where the text's longest line ends, at every width. */
.hero {
  --text-end: calc(max(0px, (100% - var(--container)) / 2) + var(--gutter) + 660px);
  position: relative; overflow: hidden; isolation: isolate; text-align: left;
  /* fills the visible window (--vh and --band-h are measured by site.js); the band overlaps its bottom, so the text
     is centred in what is left above the band; the CSS values are the fallback without script */
  min-height: max(calc(480px + var(--band-h, 104px)), var(--vh, 100svh)); display: flex; align-items: center;
  padding: clamp(32px, 6vh, 64px) 0 calc(clamp(32px, 6vh, 64px) + var(--band-h, 104px));
  background: #0a0d12; color: #e9edf2;
}
.board { position: absolute; inset: 0; z-index: -2; perspective: 1500px; overflow: hidden; }
.board-plane { position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; gap: var(--board-gap, 12px);
  transform: translate(-44%, -56%) rotateX(24deg) rotateY(-18deg) rotateZ(9deg) scale(1.12); transform-origin: 50% 50%; }
.board-row { display: flex; gap: var(--board-gap, 12px); width: max-content; animation: marquee var(--dur, 60s) linear infinite; animation-delay: var(--delay, 0s); will-change: transform; }
@keyframes marquee { from { transform: translateX(var(--a, 0px)); } to { transform: translateX(var(--b, 0px)); } }
.board-tile { position: relative; flex: none; height: var(--tile-h, 150px); aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #1a2029; }
.board-tile video { width: 100%; height: 100%; object-fit: cover; }
.board-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font: 700 11px/1.2 var(--sans); color: #fff; text-align: left;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-tile span i { font-style: normal; font-family: var(--mono); font-weight: 600; opacity: .85; margin-right: 4px; }
.board-tile.real span i { color: #9fd0ff; }
.board-veil { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 13, 18, .42) 0, rgba(10, 13, 18, .36) calc(var(--text-end) - 80px),
    rgba(10, 13, 18, .08) calc(var(--text-end) + 260px), rgba(10, 13, 18, .04) 100%); }
.hero-text { position: relative; max-width: 720px; text-shadow: 0 1px 14px rgba(5, 7, 10, .5); }
/* the clearing: an ellipse round the text, deepest at its middle, gone at its rim */
.hero-text::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -140px -220px -140px -240px;
  background: rgba(10, 13, 18, .72);
  backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2);
  -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent); mask-image: radial-gradient(closest-side, #000 52%, transparent); }
.hero-text .pill { text-shadow: none; }
.hero .container { position: relative; }
.hero .wordmark { color: #eef2f6; }
.kicker { margin: 0 0 18px; font: 600 clamp(16px, 1.5vw, 19px)/1.45 var(--display); color: #c9d1da; letter-spacing: -.005em; }
.kicker em { display: block; font-style: normal; color: #e7b48e; }
.hero .authors { margin-left: 0; }
.hero .affil { justify-content: flex-start; }
.hero .pills { justify-content: flex-start; }
.hero .subtitle { color: #c9d1da; }
.hero .authors { color: #c9d1da; }
.hero .authors a { color: #f3f6f9; text-decoration-color: rgba(255, 255, 255, .32); }
.hero .authors a:hover { color: #9fd0ff; }
.hero .authors sup, .hero .affil sup { color: #aab3be; }
.hero .affil, .hero .eq-note { color: #b6bfc9; }
.hero .pill { background: #f3f6f9; color: #12161c; border-color: #f3f6f9; }
.hero .pill:hover { background: #fff; }
.hero .pill[aria-disabled="true"] { background: rgba(255, 255, 255, .1); color: #d3dae2; border-color: rgba(255, 255, 255, .16); opacity: 1; }
.hero .pill[aria-disabled="true"]:hover { background: rgba(255, 255, 255, .1); }
.hero .pill .soon { border-color: rgba(255, 255, 255, .35); }
.hero .stats { border-top-color: rgba(255, 255, 255, .1); }
.hero .stat { color: #a5afba; }
.hero .stat b { color: #8fc6f2; }
@media (prefers-reduced-motion: reduce) { .board-row { animation: none; } }
.hero .wordmark { margin: 0; font-size: clamp(52px, 8vw, 104px); line-height: 1; }
.subtitle { margin: 16px 0 24px; font: 700 clamp(20px, 2.4vw, 28px)/1.25 var(--display); letter-spacing: -.015em; color: #4f5863; }
.authors { margin: 0 auto; max-width: 860px; font-size: 16.5px; line-height: 1.8; color: var(--ink-2); }
.authors .au { white-space: nowrap; }
.authors .au-pair { white-space: nowrap; }   /* the last two authors share a line */
/* the demo reel */
.demo-video { max-width: 1080px; margin: 8px auto 0; aspect-ratio: 16 / 9; background: #0a0d12; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(10, 13, 18, .45), 0 0 0 1px var(--rule-2); }
.demo-video video { width: 100%; height: 100%; object-fit: contain; }
.authors a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: rgba(108, 117, 125, .45); }
.authors a:hover { color: var(--accent); text-decoration-color: currentColor; }
.authors sup, .affil sup { color: var(--muted); font-size: .7em; }
.affil { margin: 8px 0 0; color: var(--muted); font-size: 15.5px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; }
.affil span { white-space: nowrap; }
.eq-note { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px;
  background: #212529; color: #fff; font-size: 15px; font-weight: 600; border: 1px solid #212529; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.pill:hover { background: #343a40; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-1); }
.pill svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
.pill[aria-disabled="true"] { opacity: .55; cursor: default; }
.pill[aria-disabled="true"]:hover { transform: none; box-shadow: none; background: #212529; }
.pill .soon { font-size: 11px; font-weight: 600; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 0 6px; line-height: 16px; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 26px auto 0; padding-top: 20px; border-top: 1px solid var(--rule-2); max-width: 900px; }
.stat { display: flex; align-items: baseline; gap: 7px; font-size: 14.5px; color: var(--muted); }
.stat b { font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ------------------------------------------------------------------ numbers band: frosted dark glass over the hero's foot */
.band { position: relative; z-index: 1; margin-top: calc(-1 * var(--band-h, 104px)); color: #fff;
  background: rgba(10, 13, 18, .66); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, .16); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .band { background: #0a0d12; } }
.band-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.band-item { padding: 18px 16px 20px; border-left: 1px solid rgba(255, 255, 255, .09); }
.band-item:first-child { border-left: 0; padding-left: 0; }
.band-num { font: 800 clamp(28px, 3vw, 42px)/1 var(--display); letter-spacing: -.035em; }
.band-label { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .72); line-height: 1.4; }
@media (max-width: 860px) {
  .band-grid { grid-template-columns: repeat(3, 1fr); }
  .band-item:nth-child(4) { border-left: 0; padding-left: 0; }
  .band-item:nth-child(n+4) { border-top: 1px solid rgba(255, 255, 255, .09); }
}
@media (max-width: 480px) {
  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .band-item { border-left: 0 !important; padding: 18px 8px 18px 0 !important; border-top: 1px solid rgba(255, 255, 255, .09); }
  .band-item:nth-child(even) { padding-left: 14px !important; border-left: 1px solid rgba(255, 255, 255, .09) !important; }
  .band-item:nth-child(-n+2) { border-top: 0; }
}

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.alt { background: var(--bg-alt); }
.section-title { margin: 0 0 .4rem; font: 800 clamp(28px, 3.6vw, 40px)/1.1 var(--display); letter-spacing: -.025em; }
.title-note { white-space: nowrap; margin-left: .55rem; font-size: .5em; font-weight: 700; color: var(--accent); vertical-align: .28em; letter-spacing: 0; }
.rule { width: 3rem; height: 3px; border-radius: 2px; background: var(--logo-blue); margin-bottom: 1.4rem; }
.lead { margin: 0 0 26px; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.lead b { color: var(--ink); }
.note { font-size: 13.5px; color: var(--muted); }
.card { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22, .68, .32, 1), transform .7s cubic-bezier(.22, .68, .32, 1); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------ tabs, segmented controls */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: #fff; color: var(--ink-2); font-size: var(--fs-body-sm); font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
}
.tab:hover { border-color: #bcc8d4; color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--logo-blue); border-color: var(--logo-blue); color: #fff; }
.tab .count { font-weight: 400; font-size: 12.5px; opacity: .8; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--tint); border: 1px solid var(--rule); }
.seg button {
  border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex: none; }

/* ------------------------------------------------------------------ media */
.media { position: relative; overflow: hidden; background: var(--video-bg); aspect-ratio: 4 / 3; }
.media video { position: absolute; max-width: none; height: auto; }
.media.full video { position: static; width: 100%; height: 100%; object-fit: contain; }
button.media { border: 0; padding: 0; cursor: pointer; width: 100%; display: block; }
.badge {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 8px;
  border-radius: 999px; font: 700 var(--fs-tiny)/1 var(--sans); background: rgba(12, 15, 20, .7); color: #fff;
}
.badge.tl { top: 8px; left: 8px; }
.badge.tr { top: 8px; right: 8px; }
.badge.ok { background: rgba(229, 244, 234, .95); color: #1d6b38; }
.badge.bad { background: rgba(251, 234, 233, .95); color: #a3302b; }
.badge.gt { background: rgba(255, 244, 224, .96); color: #8a5a00; }
.badge svg { width: 11px; height: 11px; }
.play-hint { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(0, 0, 0, .18); z-index: 1; }
.play-hint span { width: 46px; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, .94); display: grid; place-items: center; box-shadow: var(--shadow-2); }
.play-hint svg { width: 18px; height: 18px; margin-left: 3px; color: var(--ink); }
button.media:hover .play-hint, button.media:focus-visible .play-hint { opacity: 1; }

/* ------------------------------------------------------------------ real robot */
.real-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.real-stage { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 900px) { .real-stage { grid-template-columns: 1fr; } }
.real-player { overflow: hidden; border-radius: var(--radius); background: var(--video-bg); box-shadow: var(--shadow-2); align-self: start; }
.real-player video { width: 100%; aspect-ratio: 16 / 9; background: var(--video-bg); object-fit: contain; }
.real-info { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.real-info h3 { margin: 0; font: 800 23px/1.2 var(--display); letter-spacing: -.015em; }
.real-info h3 .id { font: 600 13px/1 var(--mono); color: var(--muted); margin-right: 8px; }
.real-info .suite { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: 6px 10px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; }
.kv dd.ok { color: var(--ok); }
.kv dd.bad { color: var(--bad); }
.criterion { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--tint); font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.criterion b { color: var(--ink); }
.tally { display: flex; gap: 22px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--rule-2); }
.tally div { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; }
.tally b { font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.matrix { margin-top: 22px; }
.mx-group + .mx-group { margin-top: 16px; }
.mx-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 15px/1.3 var(--sans); }
.mx-title small { font-weight: 400; color: var(--muted); font-size: 13px; }
.mx-grid { display: grid; grid-template-columns: 78px repeat(6, minmax(0, 1fr)) minmax(0, 1.08fr); gap: 7px; align-items: stretch; }
.mx-colhead.fr { margin-left: 10px; }
.mx-free { grid-column: 8; grid-row: 2 / span 2; margin-left: 10px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 8px; border-radius: 12px; background: #f1f3f6; border: 1px dashed #c3cbd4; }
.mx-free-note { font-size: 11.5px; line-height: 1.35; color: var(--muted); text-align: center; }
.mx-colhead { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; align-self: end; }
.mx-rowhead { display: flex; align-items: center; font-size: 13px; font-weight: 700; }
.mx-rowhead.pa { color: var(--pa); }
.mx-rowhead.pg { color: var(--pg); }
.mx-cap .rui { display: none; }
@media (max-width: 760px) {
  .mx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mx-colhead, .mx-rowhead, .mx-empty { display: none; }
  .mx-cap .rui { display: block; }
  .mx-free { order: 99; grid-column: 1 / -1; grid-row: auto; margin-left: 0; }
}
.mx-tile { border: 1px solid var(--rule); border-radius: 9px; overflow: hidden; background: #fff; cursor: pointer; padding: 0; text-align: left; display: block; width: 100%; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mx-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mx-tile[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.mx-tile[disabled] { cursor: default; opacity: .6; }
.mx-tile .media { aspect-ratio: 16 / 9; }
.mx-tile .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mx-tile .missing { position: absolute; inset: 0; display: grid; place-items: center; color: #aab2bb; font-size: 10.5px; text-align: center; padding: 4px; }
.mx-cap { display: flex; flex-direction: column; gap: 1px; padding: 4px 7px 5px; font-size: 12px; line-height: 1.25; border-top: 3px solid transparent; }
.mx-tile.pa .mx-cap { border-top-color: var(--pa-tint); }
.mx-tile.pg .mx-cap { border-top-color: var(--pg-tint); }
.mx-tile.fr .mx-cap { border-top-color: var(--rule-2); }
.mx-cap .rui { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-cap .res { font-weight: 700; white-space: nowrap; }
.mx-cap .res.ok { color: var(--ok); }
.mx-cap .res.bad { color: var(--bad); }
.form-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.form-key span { display: inline-flex; align-items: center; gap: 6px; }
.form-key i { width: 16px; height: 4px; border-radius: 2px; display: inline-block; }

/* ------------------------------------------------------------------ overview */
.figure { margin: 0; }
.figure-frame { background: #fff; border-radius: 12px; overflow: hidden; }
.figure-frame img { width: 100%; height: auto; }
.figure figcaption { max-width: none; margin: 14px 0 0; text-align: left; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.figure figcaption b { color: var(--ink); }
.abstract p { margin: 0; font-size: 16.5px; line-height: 1.8; color: var(--ink-2); text-align: justify; hyphens: auto; }
.abstract strong { color: var(--ink); }
.findings { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.finding { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--logo-blue); }
.finding:nth-child(2) { border-top-color: var(--green); }
.finding:nth-child(3) { border-top-color: var(--orange); }
.finding:nth-child(4) { border-top-color: var(--red); }
.finding:nth-child(5) { border-top-color: var(--pa); }
.finding .tag { font: 700 12px/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.finding .big { font: 800 34px/1 var(--display); letter-spacing: -.03em; }
.finding .big small { font-size: .5em; color: var(--muted); margin-left: 1px; }
.finding .big .arrow { color: var(--faint); font-weight: 400; margin: 0 .1em; }
.finding h3 { margin: 2px 0 0; font: 800 16px/1.3 var(--display); letter-spacing: -.01em; }
.finding p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.finding a { margin-top: auto; font-size: 13.5px; font-weight: 700; }
@media (max-width: 1080px) { .findings { grid-template-columns: repeat(2, minmax(0, 1fr)); } .finding:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .findings { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ task gallery */
.gal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.suite-gist { font-size: 14.5px; color: var(--muted); min-height: 1.6em; margin: 4px 0 18px; }
.suite-gist b { color: var(--ink); }
.task-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1080px) { .task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.task-card .badge { height: 20px; padding: 0 7px; font-size: 10.5px; }
.task-card .badge.tl { top: auto; bottom: 8px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 20px; }
.task-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.task-card[hidden] { display: none; }
.tc-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.tc-top { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.tc-top .id { font: 600 11.5px/1 var(--mono); color: var(--muted); }
.tc-title { margin: 0; font: 800 14.5px/1.25 var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-top .real { margin-left: auto; font: 700 9.5px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--tint); padding: 4px 6px; border-radius: 999px; white-space: nowrap; }
.tc-instr { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.tc-meta { margin-top: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-meta b { color: var(--ink-2); }

/* ------------------------------------------------------------------ interfaces */
.kit { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 960px) { .kit { grid-template-columns: 1fr; } }
.kit-player { overflow: hidden; }
.kit-player .media { aspect-ratio: 644 / 418; }
.kit-controls { padding: 16px 16px 18px; display: grid; gap: 12px; }
.abs-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.abs-btn { border: 1px solid var(--rule); background: #fff; border-radius: 10px; padding: 9px 2px 8px; cursor: pointer; display: grid; gap: 3px; justify-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.abs-btn small { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.abs-btn:hover { border-color: #bcc8d4; }
.abs-btn[aria-pressed="true"] { border-color: var(--pa); background: var(--pa-tint); color: var(--pa); }
.abs-btn.prog[aria-pressed="true"] { border-color: var(--pg); background: var(--pg-tint); color: var(--pg); }
@media (max-width: 560px) { .abs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.code { margin: 0; padding: 12px 14px; border-radius: 10px; background: #0f141b; color: #e6edf3; overflow-x: auto; font: 500 13px/1.65 var(--mono); white-space: pre; min-height: 54px; }
.code .c { color: #7d8b99; }
.code .f { color: #79c0ff; }
.code .s { color: #a5d6a7; }
.code .k { color: #ff9e7a; }
.kit-explain { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.forms { display: grid; gap: 12px; }
.form-card { padding: 16px 16px 14px; border-left: 4px solid var(--pa); }
.form-card.prog { border-left-color: var(--pg); }
.form-card h3 { margin: 0 0 6px; font: 800 17px/1.3 var(--display); display: flex; gap: 8px; align-items: center; }
.form-card p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.timeline { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tl-step { height: 25px; padding: 0 8px; border-radius: 7px; font: 600 11.5px/25px var(--mono); white-space: nowrap; }
.tl-think { background: #fff4e0; color: #8a5a00; border: 1px dashed #e8b24f; }
.tl-act { background: var(--pa-tint); color: var(--pa); }
.prog .tl-act { background: var(--pg-tint); color: var(--pg); }
.tl-arrow { color: var(--faint); font-size: 12px; }
.kit-figure { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: center; }
.kit-points { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.kit-points li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-size: 14.5px; color: var(--ink-2); }
.kit-points li b { color: var(--ink); }
.kit-points .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--tint); display: grid; place-items: center; color: var(--accent); }
.kit-points .ico svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .kit-figure { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ charts */
.chart-card { padding: clamp(16px, 2.4vw, 24px); }
.chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.chart-title { margin: 0; font: 800 17px/1.3 var(--display); letter-spacing: -.01em; }
.chart-sub { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 14px; height: 10px; border-radius: 3px; }
.legend .ln { width: 18px; height: 0; border-top: 2px dashed var(--free); }
.legend .hollow { width: 10px; height: 10px; border-radius: 999px; border: 2px solid var(--faint); background: #fff; }
svg.chart { width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
svg.chart text { fill: var(--ink-2); font-size: 12px; }
svg.chart .axis text { fill: var(--muted); font-size: 11.5px; }
svg.chart .grid line { stroke: var(--rule-2); stroke-width: 1; }
svg.chart .label { font-weight: 700; fill: var(--ink); font-size: 13px; }
svg.chart .val { font-size: 12px; font-weight: 700; fill: var(--ink-2); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
svg.chart .hit { fill: transparent; }
svg.chart .row:hover .hl { fill: var(--tint); }
.tooltip { position: fixed; z-index: 80; pointer-events: none; min-width: 180px; max-width: 280px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-2); padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tooltip.on { opacity: 1; transform: none; }
.tooltip h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink); }
.tooltip table { border-collapse: collapse; width: 100%; }
.tooltip td { padding: 1px 0; }
.tooltip td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.results-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.results-grid .chart-card, .qwen-grid .chart-card { display: flex; flex-direction: column; }
.results-grid .chart-card .insight { margin-top: auto; padding-top: 11px; }
.results-grid .chart-card #rui-chart { margin-bottom: 14px; }
@media (max-width: 960px) { .results-grid { grid-template-columns: 1fr; } }
.side-stack { display: grid; gap: 16px; align-content: stretch; }
.hbar { display: grid; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar-row .lab { color: var(--ink-2); font-weight: 700; line-height: 1.25; }
.hbar-row .lab small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.hbar-track { height: 12px; background: var(--rule-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 0 4px 4px 0; width: 0; transition: width 1s cubic-bezier(.22, .68, .32, 1); }
.hbar-row .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.insight { margin: 14px 0 0; padding: 11px 14px; border-left: 3px solid var(--logo-blue); background: var(--tint); border-radius: 0 10px 10px 0; font-size: 14px; color: var(--ink-2); }
.insight b { color: var(--ink); }
.table-scroll { overflow-x: auto; margin-top: 12px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
table.main { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 920px; font-size: 13px; font-variant-numeric: tabular-nums; }
table.main th, table.main td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
table.main thead th { font-weight: 700; color: var(--ink); background: #fafbfc; }
table.main thead tr:last-child th { font-size: 12px; color: var(--muted); }
table.main th:first-child, table.main td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 700; }
table.main thead th:first-child { background: #fafbfc; }
table.main tr.sec td { background: #fafbfc; font-weight: 700; text-align: left; font-size: 12.5px; }
table.main tr.sec.pa td { color: var(--pa); }
table.main tr.sec.pg td { color: var(--pg); }
table.main tr.total td { font-weight: 700; }
table.main td.gap, table.main th.gap { border-left: 1px solid var(--rule); }
table.main td.best { font-weight: 800; color: var(--ink); }

/* ------------------------------------------------------------------ small models, sim to real, verification */
.qwen-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.qwen-side { display: flex; flex-direction: column; gap: 12px; }
.qwen-side .note { margin: auto 0 0 !important; }
@media (max-width: 960px) { .qwen-grid { grid-template-columns: 1fr; } }
.clip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.clip { border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); background: #fff; }
.clip-cap { padding: 6px 9px 7px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.clip-cap b { color: var(--ink); display: block; font-size: 12.5px; }
.dumb-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .dumb-wrap { grid-template-columns: 1fr; } }
.dumb-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 700 15px/1.3 var(--sans); }
.gap-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .gap-grid { grid-template-columns: 1fr; } }
.gap-stat { padding: 20px; }
.gap-stat .big { font: 800 clamp(48px, 6vw, 72px)/1 var(--display); letter-spacing: -.04em; color: var(--red); }
.gap-stat p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.gap-bars { margin-top: 18px; }
.claims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
@media (max-width: 860px) { .claims { grid-template-columns: 1fr; } }
.claim { overflow: hidden; display: flex; flex-direction: column; }
.claim-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.claim-body .verdict { margin-top: auto; }
.quote { position: relative; margin: 0; padding: 11px 13px; border-radius: 10px; background: var(--tint); font-size: 14px; line-height: 1.5; color: var(--ink); }
.quote::before { content: ""; position: absolute; top: -7px; left: 22px; width: 14px; height: 14px; background: var(--tint); transform: rotate(45deg); }
.quote cite { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--muted); }
.verdict { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 700; color: var(--bad); }
.verdict svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.check-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.check-table th, .check-table td { padding: 7px 6px; border-bottom: 1px solid var(--rule-2); text-align: right; }
.check-table th:first-child, .check-table td:first-child { text-align: left; }
.check-table th { font-weight: 700; color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------------------------ citation, footer */
.bib { position: relative; }
.bib pre { margin: 0; padding: 18px 20px; border-radius: 12px; background: #f1f4f8; color: var(--ink); border: 1px solid var(--rule); overflow-x: auto; font: 500 13.5px/1.7 var(--mono); }
.bib .pill { position: absolute; top: 10px; right: 10px; height: 32px; font-size: 13px; padding: 0 14px; }

/* ------------------------------------------------------------------ lightbox */
dialog.lightbox { width: min(980px, calc(100% - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); overflow: auto; }
dialog.lightbox::backdrop { background: rgba(10, 13, 18, .72); }
.lb-media { background: var(--video-bg); display: grid; place-items: center; }
.lb-media video { width: 100%; max-width: 820px; max-height: 66svh; object-fit: contain; background: var(--video-bg); }
.lb-body { padding: 14px 20px 18px; display: grid; gap: 9px; }
.lb-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0; font: 800 21px/1.25 var(--display); padding-right: 40px; }
.lb-title .id { font: 600 13px/1 var(--mono); color: var(--muted); }
.lb-meta { font-size: 13.5px; color: var(--muted); }
.lb-meta b { color: var(--ink-2); }
.lb-text { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.lb-text .k { font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.lb-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(12, 15, 20, .6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-close svg { width: 18px; height: 18px; }
.lb-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ------------------------------------------------------------------ overview: the paper's figure, animated in place
   assets/img/teaser/top.svg is the figure itself (the PDF as SVG); tools/teaser/prep.html tagged the elements the
   script animates with data-g. Glyphs of a code line appear one after another, chips enter along the time axis,
   each 8 s reply fills like a progress bar, and the abstractions in A light up with the line being typed. */
.ovfig { margin: 0; }
.ovfig-art img, .ovfig-art svg { display: block; width: 100%; height: auto; }
.ovfig figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 12px 4px 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.ovfig figcaption b { color: var(--ink); }
.teaser-top [data-g] { transition: opacity .3s ease; }
.teaser-top [data-g].off { opacity: 0; }
.teaser-top [data-g].type { transition: opacity 0s; }
.teaser-top g.slide { transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.teaser-top g.slide.away { transform: translateX(-10px); }
.teaser-top .fill { fill: rgba(243, 170, 104, .5); transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); mix-blend-mode: multiply; }
.teaser-top .hl { fill: rgba(0, 113, 188, .07); stroke: #0071bc; stroke-width: 1.6; opacity: 0; transition: opacity .25s; }
.teaser-top .hl.on { opacity: 1; }
.teaser-top .caret { fill: #0071bc; }
@media (max-width: 760px) { .ovfig figcaption { flex-direction: column; } }

/* ------------------------------------------------------------------ key findings */
.kf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }

@media (max-width: 1080px) { .kf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kf { grid-template-columns: 1fr; } }
.kf-card { display: flex; flex-direction: column; overflow: hidden; border-top: 4px solid var(--logo-blue); }
.kf-img { padding: 10px; background: #fff; border-bottom: 1px solid var(--rule-2); }
.kf-img img { display: block; width: 100%; height: auto; }
.kf-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.kf .tag, .kf-wide .tag { font: 700 12px/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kf .big, .kf-wide .big { font: 800 32px/1 var(--display); letter-spacing: -.03em; }
.kf .big small, .kf-wide .big small { font-size: var(--fs-lead); color: var(--muted); margin-left: 1px; }
.kf .big .arrow { color: var(--faint); font-weight: 400; margin: 0 .1em; }
.kf h3, .kf-wide h3 { margin: 2px 0 0; font: 800 16px/1.3 var(--display); letter-spacing: -.01em; }
.kf p, .kf-wide p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.kf a, .kf-wide a { margin-top: auto; font-size: 13.5px; font-weight: 700; }
.kf-wide { margin-top: 14px; display: grid; grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 20px 24px; border-top: 4px solid var(--logo-blue); }
.kf-wide .big { font-size: 40px; margin-top: 8px; white-space: nowrap; }
.kf-wide .big .arrow { color: var(--faint); font-weight: 400; margin: 0 .1em; }
.kf-wide a { margin: 0; white-space: nowrap; }
@media (max-width: 860px) { .kf-wide { grid-template-columns: 1fr; gap: 14px; } }

/* ------------------------------------------------------------------ interfaces: figure and principles */
/* no frame: multiply turns the figure's white into the section's grey (white x #f6f8fb = #f6f8fb), colours move <4% */
.kit-fig { margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; mix-blend-mode: multiply; }
/* the image's own white margin at the bottom (23 of its 1370 px) is cropped, so its last line is level with the last principle */
.kit-fig img { display: block; width: 100%; height: auto; aspect-ratio: 1402 / 1347; object-fit: cover; object-position: top; }
/* the figure played: one episode at a time (assets/img/ruikit.svg, built by tools/build_ruikit_svg.py) */
.kit-fig svg { display: block; width: 100%; height: auto; }
.ruikit-anim [data-g] { transition: opacity .3s; }
.ruikit-anim [data-g].off { opacity: 0; }
.ruikit-anim [data-g].type { transition: opacity 0s; }
.ruikit-anim .hl { fill: rgba(0, 113, 188, .07); stroke: #0071bc; stroke-width: 1.4; opacity: 0; transition: opacity .25s; }
.ruikit-anim .hl.inv { fill: rgba(255, 255, 255, .18); stroke: #fff; stroke-width: 1.8; }   /* on the blue interface panel */
.ruikit-anim .hl.red { fill: rgba(216, 94, 93, .08); stroke: #c0443e; }
.ruikit-anim .hl.on { opacity: 1; }
.ruikit-anim .dot { opacity: 0; transition: opacity .15s; }
.ruikit-anim .dot.on { opacity: 1; }
.ruikit-anim .dot circle { stroke: #fff; stroke-width: 1.2; }
.ruikit-anim .dot .halo { stroke: none; opacity: .22; }
.ruikit-anim .dot.ink circle { fill: #1f2937; }
.ruikit-anim .dot.blue circle { fill: #2d63a6; }
.ruikit-anim .dot.red circle { fill: #c0443e; }
.ruikit-anim .caret { fill: #0071bc; }
.ruikit-anim .badge { transform-box: fill-box; transform-origin: center; }
.ruikit-anim .badge.pulse { animation: rk-pulse .55s ease-out; }
@keyframes rk-pulse { 45% { transform: scale(1.3); } }
.principles { margin-top: 16px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.principle { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.principle .ico { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(150deg, #e2edf8, #f4f8fd); box-shadow: inset 0 0 0 1px rgba(0, 113, 188, .13); display: grid; place-items: center; color: var(--accent); margin-bottom: 2px; }
.principle .ico svg { width: 22px; height: 22px; }
.principle .ico .f { fill: currentColor; fill-opacity: .15; }   /* one colour: a light fill under the line, a solid part where the meaning sits */
.principle .ico .s { fill: currentColor; stroke: none; }
.principle .ico .h { fill: #f4f8fd; }
.principle b { font: 800 15px/1.3 var(--display); letter-spacing: -.01em; }
.principle p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; text-wrap: balance; }   /* a wrapped line splits evenly, no lone last word */
@media (max-width: 1080px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .principle:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ verification rows */
.gap-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
@media (max-width: 960px) { .gap-row { grid-template-columns: 1fr; } }
.gap-stat { display: flex; flex-direction: column; }
.gap-stat .insight { margin-top: auto; }
.check-card { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; padding: 22px 24px; align-items: center; }
@media (max-width: 860px) { .check-card { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ charts after the paper's panels */
.results-grid.pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 960px) { .results-grid.pair { grid-template-columns: 1fr; } }
.results-grid .chart-card #suite-chart { flex: 1; display: flex; flex-direction: column; }

svg.chart .sub { fill: var(--muted); font-size: 11.5px; }
svg.chart .hiv { fill: var(--accent); font-weight: 800; }
svg.chart .strong, svg.chart tspan.b { font-weight: 800; fill: var(--ink); }
svg.chart .gain { fill: var(--pg); font-weight: 800; font-size: 13px; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
svg.chart .flip { fill: var(--red); font-style: italic; font-weight: 800; font-size: 12.5px; }
svg.chart .axis-title { fill: var(--muted); font-size: 11px; }
svg.chart tspan.vs { fill: var(--muted); font-weight: 400; }
svg.chart tspan.second { fill: #8a939c; }
.panel-legend { margin: 6px 0 2px; }
.panel-legend i { display: inline-block; flex: none; }
.pdot { width: 9px; height: 9px; border-radius: 999px; }
.pdia { width: 9px; height: 9px; border: 1.6px solid var(--ink); background: #fff; transform: rotate(45deg); }
.psq { width: 9px; height: 9px; background: var(--ink); }
.pline { width: 18px; height: 0; border-top: 2.4px solid var(--ink); }
.pline.dash { border-top-style: dashed; }
.pflip { width: 12px; height: 12px; border: 2px solid var(--red); border-radius: 999px; }
.sr-panels { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 6px; margin-top: 8px; }   /* the second panel shares the first's axis */
/* Finding 3: chart left, the same agent / task / RUIs in simulation and on the robot right; the tiles fill the chart's height */
.sr-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.sr-tiles { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(160px, 1fr)); gap: 8px; }
.sr-clip { display: flex; flex-direction: column; }
.sr-tile { flex: 1; aspect-ratio: auto; min-height: 110px; }
.sr-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sr-tile.real video { transform: scale(1.3); transform-origin: 54% 80%; }   /* closer on the table, where the dominoes are */
@media (max-width: 960px) { .sr-row { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .sr-panels { grid-template-columns: 1fr; } }
.qwen-grid .chart-card #qwen-chart { flex: 1; }

.qwen-side .clip-grid { gap: 8px; }
.qwen-side .clip-cap { padding: 5px 8px 6px; font-size: 11.5px; }
.qwen-side .clip-cap b { font-size: 12px; }
.qwen-side .badge { height: 20px; font-size: 10.5px; padding: 0 7px; }
svg.chart .tick { fill: var(--muted); font-size: 10.5px; }

/* ------------------------------------------------------------------ RUIKit: the figure beside the five principles */
.kit-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: stretch; }   /* the figure sets the row's height, the principles stretch to it */
@media (max-width: 860px) { .kit-row { grid-template-columns: 1fr; } }
.principles.stack { margin-top: 0; grid-template-columns: 1fr !important; grid-auto-rows: 1fr; gap: 10px; }
.principles.stack .principle { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-content: center; padding: 12px 16px; }
.principles.stack .principle .ico { grid-row: span 2; margin: 0; }
.principles.stack .principle:last-child { grid-column: auto; }

/* ------------------------------------------------------------------ audit fixes */
.kf-card h3 { min-height: 3.75em; }   /* the paper's finding titles run to three lines */
.qwen-side .clip-cap b, .qwen-side .clip-cap .cap-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qwen-side .clip-cap .cap-sub { color: var(--muted); }
.claim-body .quote { flex: 1; }
#suite-chart .legend { margin: 8px 0 2px; }
svg.chart .val.small { font-size: 11px; }
svg.chart .label.sm { font-size: 11px; }
@media (max-width: 600px) { .qwen-side .clip:nth-child(9) { display: none; } }

/* ------------------------------------------------------------------ typed code */
.ch { opacity: 0; }
.ch.on { opacity: 1; }
.tcaret { display: inline-block; width: .55em; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: #79c0ff; animation: tblink 1s steps(1) infinite; }
@keyframes tblink { 50% { opacity: 0; } }
/* RUI-Free: one reply per row, the interface the agent picked, the call it made */
.free-log { display: grid; gap: 5px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #0f141b; }
.fl-row { display: grid; grid-template-columns: 14px 96px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 22px; }
.fl-n { font: 600 11px/1 var(--sans); color: #7d8b99; white-space: nowrap; }
.fl-rui { justify-self: start; font: 700 11px/1 var(--sans); padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
.fl-rui.pa { background: rgba(102, 72, 168, .28); color: #c9b8f2; }
.fl-rui.pg { background: rgba(72, 126, 48, .3); color: #b9dfa5; }
.fl-code { font: 500 11.5px/1.5 var(--mono); color: #e6edf3; white-space: pre; overflow: hidden; text-overflow: clip; }
.fl-code .f { color: #79c0ff; }
.fl-code .s { color: #a5d6a7; }
.fl-code .k { color: #ff9e7a; }
.fl-code .tcaret { width: .5em; }
.free-stat { margin: 8px 0 0 !important; font-size: 12.5px !important; color: var(--ink-2); }
@media (max-width: 560px) { .fl-row { grid-template-columns: 14px minmax(0, 1fr); row-gap: 3px; } .fl-n { grid-row: span 2; align-self: start; padding-top: 4px; } .fl-code { grid-column: 2; } }
/* the code box takes whatever height the card has left, so the player card never shows a gap under its text,
   whichever abstraction and form are picked; it always has room for a four-line program */
.kit-player { display: flex; flex-direction: column; }
/* the code box is as tall as its code (per-action's three replies fill it); spare height stays on the card, under it */
.kit-controls { flex: 1; grid-template-rows: auto 1fr; }
.kit-controls .note { align-self: end; }
/* the 13 RUIs as a sum, under the Interfaces lead */
.rui-eq { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 18px; margin: 4px 0 26px; }
.eq-t { display: grid; justify-items: start; }
.eq-t b { font: 800 clamp(36px, 4.4vw, 54px)/1 var(--display); letter-spacing: -.04em; color: var(--ink); }
.eq-t small { margin-top: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.eq-t.res b { color: var(--accent); }
.eq-t.res small { color: var(--accent-ink); font-weight: 700; }
.eq-op { align-self: flex-start; padding-top: clamp(4px, .6vw, 8px); font: 300 clamp(26px, 3vw, 38px)/1 var(--sans); color: #aab3bd; }
.title-13 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .28em; }
.title-13 .big-num { font-size: 2.3em; line-height: .82; letter-spacing: -.05em; color: var(--accent); }
@media (max-width: 560px) {
  .rui-eq { flex-wrap: nowrap; gap: 0 8px; }
  .eq-t b { font-size: 32px; }
  .eq-t small { white-space: normal; font-size: 11px; line-height: 1.25; max-width: 6.2em; }
  .eq-op { font-size: 22px; padding-top: 4px; }
}
.eq-note .sep { margin: 0 .6em; opacity: .7; }
.authors sup { margin-left: 1px; }

/* captions read from the left everywhere */
figcaption { text-align: left; }
/* the finding a Results section gives evidence for, above its title */
.eyebrow { margin: 0 0 6px; font: 700 12.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* ------------------------------------------------------------------ top bar after Show-Harness: dark buttons, scroll progress */
.tb-btns { display: flex; gap: 8px; margin-left: 10px; }
.tb-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 18px; border-radius: 999px; background: #12161c; color: #fff;
  font: 700 14.5px/1 var(--sans); cursor: pointer; }
.tb-btn:hover { color: #fff; text-decoration: none; }
.tb-btn[aria-disabled="true"] { cursor: default; }   /* not live yet: no hand */
.tb-progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #5b8fc9, #7fb26a, #e3a35d, #d8726a); }
@media (max-width: 760px) { .tb-btns { margin-left: auto; } .tb-btn { height: 32px; padding: 0 14px; font-size: 13.5px; } }
.hero .pills { gap: 9px; }
.hero .pill { padding: 0 15px; }
.hero .pill:not([href]) { cursor: default; }

/* subsections inside a section (Tasks and Rollouts: in simulation, on a real Franka) */
.sub-title { margin: 8px 0 8px; font: 800 clamp(22px, 2.2vw, 28px)/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); }
.sub-lead { margin: 0 0 18px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.real-sub { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--rule); }
.eq-sep { align-self: stretch; width: 1px; margin: 4px 13.5px; background: var(--rule); }
@media (max-width: 560px) { .rui-eq.wrap { flex-wrap: wrap; row-gap: 14px; } .rui-eq.wrap .eq-sep { display: none; } }
/* every number sits in a cell of the same width, every operator in one of the same width: equal spacing */
.rui-eq { gap: 6px 12px; }
.eq-t { width: 156px; justify-items: center; text-align: center; }
.eq-op { width: 28px; text-align: center; }
@media (max-width: 560px) {
  .rui-eq { gap: 0 6px; }
  .eq-t { width: auto; flex: 1 1 0; min-width: 0; }
  .eq-op { width: 16px; }
}

/* findings: the result number in its chart's colour, a small chart under it */
.kf .big .to.cc, .kf-wide .big .to.cc { color: var(--cc); }
.kf .big .to.pg { color: var(--pg); }
.kf-wide .big .to.blue { color: var(--accent); }
.kf-card h3 { min-height: 5.2em; }   /* four lines in every card, so the takeaways line up */

/* ------------------------------------------------------------------ top bar, matched to Show-Harness (same sizes, same column) */
.topbar { height: 56px; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(17, 24, 32, .09); }
.topbar .container { max-width: 1120px; padding: 0 24px; gap: 20px; }
.topbar .mark { font-size: 21px; }
.topbar nav { gap: 3px; }
.topbar nav a { font-size: 14.1px; padding: 6px 11.2px; border-radius: 999px; color: #636b75; }
.topbar nav a:hover { color: #111820; background: rgba(17, 24, 32, .05); }
.topbar nav a.is-active { color: #0071bc; background: rgba(0, 113, 188, .09); }
.tb-btns { gap: 6.4px; margin-left: 0; }
.tb-btn { height: auto; padding: 6.4px 14.4px; font: 600 13.4px/1.5 var(--sans); background: #111820; }
.tb-progress { height: 2px; }
@media (max-width: 640px) {
  .topbar { height: 50px; }
  .topbar .container { padding: 0 16px; gap: 9.6px; }
  .topbar .mark { font-size: 18.5px; }
  .topbar nav { padding: 0 18px 0 8px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); }
  .topbar nav a { font-size: 13.1px; padding: 5.4px 9.3px; }
  .tb-btns { margin-left: 0; }
  .tb-btn { padding: 5.4px 11px; font-size: 12.8px; }
}

/* ================================================================== type scale
   Arial for all text, titles and numbers (only the logo's "Bench" keeps Manrope, code keeps mono) and one size
   per level; every text rule above snaps to it here. */
:root { --fs-h2: clamp(30px, 3.6vw, 40px); --fs-h3: clamp(20px, 2vw, 24px); --fs-h4: 20px; --fs-title: 17px; --fs-title-sm: 15px; --fs-lead: 17px; --fs-body: 15px; --fs-body-sm: 14px; --fs-caption: 13px; --fs-micro: 12px; --fs-tiny: 11px; }
.section-title { font-size: var(--fs-h2); }
.sub-title { font-size: var(--fs-h3); }
.real-info h3,
.lb-title { font-size: var(--fs-h4); }
.chart-title,
.kf h3,
.kf-wide h3,
.finding h3,
.form-card h3 { font-size: var(--fs-title); }
.tc-title,
.principle b,
.ds-table td:first-child,
.ds-form > b,
.mx-title,
.dumb-title { font-size: var(--fs-title-sm); }
.lead,
.abstract p { font-size: var(--fs-lead); }
.sub-lead,
.kit-explain,
.form-card p,
.suite-gist,
.gap-stat p,
.lb-text,
.kit-points li,
.affil { font-size: var(--fs-body); }
.insight,
.kf p,
.kf-wide p,
.finding p,
.principle p,
.quote,
.kv,
.real-info .suite,
.figure figcaption,
.ovfig figcaption,
.ds-table,
.seg button,
.gap-stat .insight,
.kf a,
.kf-wide a,
.finding a,
.lb-meta { font-size: var(--fs-body-sm); }
.chart-sub,
.legend,
.note,
.eq-note,
.band-label,
.criterion,
.tally div,
.verdict,
.abs-btn,
.code,
.tooltip,
.tooltip h4,
svg.chart .label,
.hbar-row,
.check-table,
.form-key,
.ds-form p,
.mx-title small,
.bib pre,
.bib .pill,
.free-stat,
.eq-t small,
table.main { font-size: var(--fs-caption); }
.kf .tag,
.kf-wide .tag,
.finding .tag,
.eyebrow,
.mx-colhead,
.mx-rowhead,
svg.chart text,
svg.chart .gain,
svg.chart .val,
.tab .count,
.clip-cap,
.clip-cap b,
.mx-cap,
.quote cite,
table.main thead tr:last-child th,
table.main tr.sec td,
.check-table th,
.ds-table th,
.tc-instr,
.tc-top .id,
.fl-code,
.hbar-row .lab small,
svg.chart .flip,
.qwen-side .clip-cap b { font-size: var(--fs-micro); }
svg.chart .axis text,
svg.chart .sub,
svg.chart .axis-title,
svg.chart .tick,
svg.chart .val.small,
svg.chart .label.sm,
.task-card .badge,
.qwen-side .badge,
.tc-meta,
.abs-btn small,
.fl-n,
.fl-rui,
.mx-free-note,
.mx-cap .rui,
.mx-tile .missing,
.tl-step,
.ds-form .tl-step,
.board-tile span,
.lb-text .k,
.qwen-side .clip-cap,
.tl-arrow { font-size: var(--fs-tiny); }
/* hero: the subtitle and wordmark keep their own sizes; the authors one step above body */
.authors { font-size: var(--fs-lead); }
/* big numbers: one size per kind (a section's stat = the equation numbers; a card's stat; the tally) */
.gap-stat .big { font-size: clamp(36px, 4.4vw, 54px); }   /* = .eq-t b */
.kf .big, .kf-wide .big { font-size: 32px; }
.tally b { font-size: 24px; }
.tc-top .real { font-size: var(--fs-tiny); }
/* display titles share one tracking */
.section-title, .sub-title, .chart-title, .kf h3, .kf-wide h3, .real-info h3, .lb-title, .tc-title, .principle b, .ds-form > b { letter-spacing: -.015em; }
.section-title { letter-spacing: -.025em; }
.kf-wide { grid-template-columns: auto minmax(0, 1fr) auto; }

/* a results row with one full-width card; the ablation table */
.results-grid.one { grid-template-columns: minmax(0, 1fr); }
.abl-table td:first-child { white-space: nowrap; }
.abl-table .sw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
#decisions .chart-card .check-table { margin: 12px 0 0; }
#decisions .abl-table td, #decisions .abl-table th { padding-top: 14px; padding-bottom: 14px; }

/* Table 3 as heat tables */
.heat-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 14px; }
@media (max-width: 860px) { .heat-pair { grid-template-columns: minmax(0, 1fr); } }
.heat-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 800 var(--fs-title-sm) var(--display); color: var(--ink); }
.heat-table { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: var(--fs-micro); font-variant-numeric: tabular-nums; }
.heat-table th { font-weight: 700; color: var(--muted); text-align: center; padding: 2px 4px; }
.heat-table tbody th { text-align: left; color: var(--ink-2); white-space: nowrap; padding-right: 8px; }
.heat-table tr.pa th { color: var(--pa); }
.heat-table tr.pg th { color: var(--pg); }
.heat-table td { text-align: center; padding: 5px 2px; border-radius: 4px; font-weight: 600; }
.heat-table td:not(.gap) { transition: background-color .8s ease, color .8s ease; transition-delay: var(--gd, 0s); }
.heat-table.pre td:not(.gap) { background: rgb(241, 245, 249) !important; color: transparent !important; }
.heat-table td.avg { font-weight: 800; }
.heat-table tr.all th, .heat-table tr.all td { font-weight: 800; }
.heat-table tr.all th, .heat-table tr.all td { border-top: 0; }
.heat-table tr.fr td, .heat-table tr.all td { box-shadow: inset 0 0 0 1px rgba(17, 24, 32, .06); }
.heat-table tr.all { outline: 0; }
.heat-table tr.all th { color: var(--ink); }

/* Table 3: one wide heat table, the two agents side by side */
.heat-wrap { margin: 14px 0 16px; overflow-x: auto; }   /* room above the insight, whose top margin is auto (0 here) */
.heat-table th.grp { text-align: left; padding: 0 4px 4px; color: var(--ink); font: 800 var(--fs-title-sm) var(--display); }
.heat-table th.grp .dot { display: inline-block; margin-right: 7px; vertical-align: 1px; }
.heat-table .gap { width: 14px; background: none !important; }
/* the RUI column only as wide as its names; the numbers share the rest */
.heat-table thead tr:last-child th:first-child { text-align: left; }
.heat-table tbody th[scope="row"] { width: 1%; white-space: nowrap; padding-right: 14px; }
.heat-table td:not(.gap) { width: 7%; }
/* big numbers: bold Arial */
.band-num, .title-13 .big-num, .eq-t b, .kf .big, .kf-wide .big, .gap-stat .big, .tally b, .real-info .tally b {
  font-family: var(--num); font-weight: 800; letter-spacing: -.02em; }
.kf .big small, .kf-wide .big small, .gap-stat .big small { font-family: var(--num); }
.heat-table { table-layout: fixed; }
.heat-table td:not(.gap) { width: auto; }
.heat-table .gap, .heat-table tr.fr td.gap, .heat-table tr.all td.gap { background: none !important; box-shadow: none !important; padding: 0; }

/* ------------------------------------------------------------------ phones */
@media (max-width: 640px) {
  .abstract p { text-align: left; hyphens: none; }                       /* justified text opens wide gaps on a phone */
  .topbar nav { margin-left: 6px; padding-left: 12px; }
  /* the overview figure keeps a readable size and scrolls sideways */
  .ovfig-art { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ovfig-art > svg, .ovfig-art > img { min-width: 760px; }
  /* Table 3 keeps readable cells and scrolls sideways; the RUI names stay in view */
  .heat-wrap { margin-left: -4px; margin-right: -4px; }
  .heat-table { min-width: 760px; }
  .heat-table tbody th[scope="row"], .heat-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
}
@media (max-width: 560px) { .kf-card h3 { min-height: 0; } }   /* one card per row: nothing to line up */


/* chart entrances (enter() and anim() in site.js), timed like the verification bars (.hbar-fill): 1 s, same easing,
   staggered by --gd; .pre is the state before the chart first comes on screen */
svg.chart .gx, svg.chart .gy, svg.chart .gc, svg.chart .gp, svg.chart .gl, svg.chart .gf {
  transition: transform 1s cubic-bezier(.22, .68, .32, 1), opacity .6s ease; transition-delay: var(--gd, 0s); }
svg.chart .gx, svg.chart .gy, svg.chart .gc, svg.chart .gp, svg.chart .gl { transform-box: fill-box; }
svg.chart .gx { transform-origin: 0 50%; }
svg.chart .gy { transform-origin: 50% 100%; }
svg.chart .gc, svg.chart .gp { transform-origin: 50% 50%; }
svg.chart.pre .gx, svg.chart.pre .gc { transform: scaleX(0); }
svg.chart.pre .gy { transform: scaleY(0); }
svg.chart.pre .gp { transform: scale(0); opacity: 0; }
svg.chart.pre .gl { transform: scale(0); }
svg.chart.pre .gf { opacity: 0; }

/* agent marks: Claude for Claude Code, OpenAI for Codex, in the agent's colour, sized to the text beside them */
.ag-ico { display: inline-block; width: 1.08em; height: 1.08em; vertical-align: -.17em; margin-right: .38em; flex: none; }
.ag-ico.cc { color: var(--cc); }
.ag-ico.codex { color: var(--codex); }
.ag-ico.qwen { color: var(--qwen); }
svg.chart use.ag-ico { margin: 0; }
/* inside flex rows that already space their items */
.legend .ag-ico, .mx-title .ag-ico, .seg button .ag-ico { margin-right: 0; }
td, th, cite, .tc-body, .quote, .mx-free-note { text-wrap: balance; }

/* ------------------------------------------------------------------ interfaces: an RUI built layer by layer */
/* a stepper: node 1 (abstraction) and node 2 (form) on a rail down to = (the RUI), then +1 (RUI-Free) */
.layers { padding: 20px 20px 18px; display: flex; flex-direction: column; }
.layer { position: relative; padding: 0 0 20px 42px; }
.layer::before { content: ""; position: absolute; left: 13px; top: 33px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--rule); }
.layer.res { padding-bottom: 6px; }
.layer.res::before, .layer.free::before { display: none; }
.layer-node { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 800 var(--fs-body-sm)/1 var(--display); color: var(--accent); background: var(--tint); border: 1.5px solid var(--accent); }
.layer.res .layer-node { color: #fff; background: var(--accent); }
.layer-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin: 3px 0 12px; min-height: 22px; }
.layer-h b { font: 800 var(--fs-title) var(--display); color: var(--ink); letter-spacing: -.01em; }
.layer-q { font-size: var(--fs-caption); color: var(--muted); }
/* layer 1: the six abstractions as one segmented control, the picked one's definition under it */
.abs-seg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 11px; background: var(--tint); border: 1px solid var(--rule); }
.abs-seg .abs-btn { border: 0; background: transparent; border-radius: 8px; height: 38px; padding: 0; display: block; font: 700 var(--fs-body-sm) var(--sans); color: var(--ink-2); cursor: pointer; }
.abs-seg .abs-btn:hover { color: var(--ink); }
.abs-seg .abs-btn[aria-pressed="true"] { background: #fff; box-shadow: var(--shadow-1); color: var(--pa); border: 0; }
.abs-seg .abs-btn.prog[aria-pressed="true"] { color: var(--pg); background: #fff; }
.layer-def { margin: 10px 2px 0; font-size: var(--fs-body-sm); line-height: 1.5; color: var(--ink-2); min-height: 3em; }
/* layer 2: the two forms, each with its timeline */
.form-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.form-pick button { border: 1.5px solid var(--rule); background: #fff; border-radius: 11px; padding: 12px 14px 13px; cursor: pointer; text-align: left;
  display: grid; gap: 9px; align-content: start; font: inherit; color: var(--ink-2); transition: border-color .15s, background .15s; }
.form-pick button:hover { border-color: #bcc8d4; }
.form-pick button b { font: 800 var(--fs-title-sm) var(--display); }
.form-pick button.pa b { color: var(--pa); }
.form-pick button.pg b { color: var(--pg); }
.form-pick button small { font-size: var(--fs-micro); line-height: 1.45; color: var(--muted); }
.form-pick button.pa[aria-pressed="true"] { border-color: var(--pa); background: var(--pa-tint); }
.form-pick button.pg[aria-pressed="true"] { border-color: var(--pg); background: var(--pg-tint); }
.form-pick .timeline { margin: 0; gap: 4px; flex-wrap: nowrap; }
.form-pick .tl-step { height: 24px; line-height: 24px; font-size: var(--fs-tiny); padding: 0 7px; }
.form-pick .tl-act { background: #fff; }
.form-pick .pg .tl-act { color: var(--pg); }
/* = the RUI the two layers make */
.rui-name { font: 800 var(--fs-title) var(--display); padding: 4px 16px; border-radius: 999px; border: 1.5px solid currentColor; }
.rui-name.pa { color: var(--pa); background: var(--pa-tint); }
.rui-name.pg { color: var(--pg); background: var(--pg-tint); }
.layer.res .layer-h { align-items: center; margin-top: 0; }
/* +1: RUI-Free */
/* +1 RUI-Free: a card like the two forms, purple to green because it spans both; its replies on the card itself */
.layer.free { padding: 14px 16px 15px; border-radius: 11px; border: 1.5px solid transparent;
  background: linear-gradient(100deg, var(--pa-tint), var(--pg-tint)) padding-box,
              linear-gradient(100deg, rgba(102, 72, 168, .45), rgba(72, 126, 48, .45)) border-box; }
.layer.free .layer-h { margin: 0 0 10px; }
.layer.free .free-log { margin: 0; padding: 0; background: none; gap: 7px; }
.layer.free .fl-row { grid-template-columns: 14px 112px minmax(0, 1fr); min-height: 26px; }
.layer.free .fl-n { color: var(--muted); }
.layer.free .fl-rui { background: #fff; border: 1px solid currentColor; padding: 4px 9px; font-size: var(--fs-micro); }
.layer.free .fl-rui.pa { color: var(--pa); }
.layer.free .fl-rui.pg { color: var(--pg); }
.layer.free .fl-code { color: var(--ink-2); }
.layer.free .fl-code .f { color: #0b5cad; }
.layer.free .fl-code .s { color: #1f7a3a; }
.layer.free .fl-code .k { color: #b4441f; }
.layer.free .tcaret { background: var(--ink-2); }
/* spare height (the player is taller) goes to layers 1 and 2, so the rail just runs longer */
.layer:not(.res):not(.free) { flex: 1 0 auto; }
.layer.res { margin-bottom: 14px; }
.free-k { font: 800 var(--fs-title)/1 var(--num); color: var(--ink); letter-spacing: -.02em; }
/* the player's code, numbered by reply */
/* the player's code as model replies: a label and a bar per reply (purple per-action, green program) */
.code .c.hd { display: block; margin-bottom: 6px; }
.code .rp { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); align-items: start; }
.code .rp + .rp { margin-top: 5px; }
.code .rp::before { content: attr(data-r); color: #6b7682; font-size: var(--fs-tiny); line-height: calc(13px * 1.65); white-space: nowrap; }   /* level with the code's first line */
.code .rc { display: block; padding-left: .85em; border-left: 2px solid; }
.code .rp.pa .rc { border-color: #9d86dc; }
.code .rp.pg .rc { border-color: #86bd6f; }

/* Arial for titles and numbers: the tighter tracking set for Manrope would crowd Arial, so it is eased */
.section-title, .sub-title { letter-spacing: -.015em; }
.subtitle, .kicker, .chart-title, .kf h3, .kf-wide h3, .finding h3, .real-info h3, .lb-title, .tc-title, .principle b, .layer-h b, .heat-title, .heat-table th.grp { letter-spacing: 0; }
.band-num, .eq-t b, .kf .big, .kf-wide .big, .finding .big, .gap-stat .big, .tally b, .free-k { letter-spacing: -.02em; }
.title-13 .big-num { letter-spacing: -.03em; }

/* one style per role: group headings 800 like every other title; every control (tabs, segmented switches) 600;
   every uppercase label one tracking */
.mx-title, .dumb-title { font-weight: 800; }
.abs-seg .abs-btn { font-weight: 600; }
.eyebrow, .kf .tag, .kf-wide .tag, .finding .tag, .tc-top .real, .lb-text .k { letter-spacing: .06em; }
