/* π-Bench GitHub Pages styles */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-muted: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #eef5ff;
  --text: #171b23;
  --text-muted: #4f5d70;
  --text-subtle: #6f7c8f;
  --border: #dbe2ec;
  --border-strong: #aebbc9;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e8f1ff;
  --accent-warm: #8a5a20;
  --accent-warm-soft: #f5ead9;
  --accent-blue: #3b82f6;
  --accent-blue-soft: #e7f0ff;
  --completed: #287a5f;
  --inferred: #2563eb;
  --provided: #8a5a20;
  --best-bg: #e5f1ff;
  --second-bg: #f6ead7;
  --code-bg: #202724;
  --code-text: #f3f1e8;
  --shadow-sm: 0 1px 2px rgba(20, 28, 42, 0.06);
  --shadow-md: 0 12px 28px rgba(20, 28, 42, 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --max-width: 1280px;
  --content-width: 1280px;
  --nav-height: 64px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Charter, Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --focus: 0 0 0 3px rgba(23, 111, 106, 0.22);
}

:root[data-theme="dark"],
.theme-dark {
  color-scheme: dark;
  --bg: #0f1218;
  --bg-muted: #151a22;
  --surface: #171d26;
  --surface-soft: #131820;
  --surface-tint: #15263c;
  --text: #f3f6fb;
  --text-muted: #c1cad7;
  --text-subtle: #8e9aac;
  --border: #2d3645;
  --border-strong: #4d5d72;
  --accent: #77a7ff;
  --accent-strong: #a9c6ff;
  --accent-soft: rgba(119, 167, 255, 0.16);
  --accent-warm: #e0b276;
  --accent-warm-soft: rgba(224, 178, 118, 0.16);
  --accent-blue: #8bb6ff;
  --accent-blue-soft: rgba(139, 182, 255, 0.16);
  --completed: #85d3a9;
  --inferred: #77a7ff;
  --provided: #e0b276;
  --best-bg: rgba(114, 201, 191, 0.16);
  --second-bg: rgba(224, 178, 118, 0.14);
  --code-bg: #101311;
  --code-text: #f0eee7;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.32);
}

:root[data-theme="light"],
.theme-light {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 1.7;
  letter-spacing: 0;
  font-weight: 500;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.button-icon,
.resource-icon {
  width: 1.08em;
  height: 1.08em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  display: block;
}

.section,
.section-compact,
.container,
.section-inner,
.page-section,
main > section {
  width: min(100% - 32px, var(--max-width));
  margin-inline: auto;
}

section {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.progress,
.scroll-progress,
#scroll-progress {
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: var(--nav-height);
  padding: 0 max(20px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px);
}

.brand,
.nav-brand,
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 780;
  line-height: 1.1;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-mark,
.logo-mark {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1;
}

.site-nav,
.navbar,
nav[aria-label="Primary"] {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.site-header .site-nav {
  position: static;
  min-height: auto;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.site-nav a,
.nav-links a,
.navbar-links a,
nav li a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.nav-links a:hover,
.navbar-links a:hover,
nav li a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
}

.header-actions,
.nav-actions,
.site-actions,
.controls,
.toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip-button,
.theme-toggle,
.theme-switch,
[data-theme-toggle] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 740;
  line-height: 1.15;
  box-shadow: var(--shadow-sm);
}

.chip-button:hover,
.theme-toggle:hover,
.theme-switch:hover,
[data-theme-toggle]:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

[aria-pressed="true"].theme-toggle,
[data-active="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.hero,
#hero {
  display: block;
  max-width: var(--max-width);
  padding: clamp(22px, 2.8vw, 34px) 0 clamp(16px, 2.4vw, 28px);
  text-align: center;
}

.paper-hero {
  padding-bottom: clamp(16px, 1.8vw, 22px);
}

.hero-eyebrow {
  margin-inline: auto;
}

.page-title {
  max-width: 1080px;
  margin-inline: auto;
}

.resource-actions {
  margin-top: 10px;
}

.content-section {
  max-width: var(--content-width);
  margin: clamp(22px, 3.4vw, 36px) auto 0;
  color: var(--text-muted);
  text-align: left;
}

.content-section p,
.narrative-section > p {
  max-width: var(--content-width);
  margin: 12px auto 0;
  color: var(--text-muted);
  font-size: 1.16rem;
  line-height: 1.65;
}

.content-section p:first-child,
.narrative-section > p:first-of-type {
  margin-top: 0;
}

.content-section strong,
.narrative-section strong {
  color: var(--text);
  font-weight: 760;
}

.content-section em,
.narrative-section em {
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 760;
}

.narrative-section > h2 {
  max-width: var(--content-width);
  margin-inline: auto;
}

.narrative-section > h3 {
  max-width: var(--content-width);
  margin: clamp(20px, 3vw, 32px) auto 6px;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 760;
}

.hero-intro {
  margin-top: clamp(24px, 3.4vw, 38px);
}

.item-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1.15;
  text-transform: uppercase;
}

.setup-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, var(--content-width));
  margin: 20px auto 0;
}

.setup-strip article {
  display: grid;
  gap: 9px;
  align-content: start;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.setup-strip p {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.42;
}

.html-figure {
  width: min(100%, var(--content-width));
  margin: 22px auto 18px;
}

.benchmark-flow {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) 42px minmax(150px, 0.52fr) 42px minmax(250px, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-tint) 76%, transparent), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.flow-cluster {
  display: grid;
  gap: 10px;
  align-content: start;
}

.flow-label {
  color: var(--text-subtle);
  font-size: 0.78rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 760;
  box-shadow: var(--shadow-sm);
}

.map-arrow {
  position: relative;
  height: 2px;
  background: color-mix(in srgb, var(--accent) 58%, var(--border));
}

.map-arrow::after {
  position: absolute;
  top: 50%;
  right: -1px;
  width: 9px;
  height: 9px;
  border-top: 2px solid color-mix(in srgb, var(--accent) 72%, var(--border));
  border-right: 2px solid color-mix(in srgb, var(--accent) 72%, var(--border));
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.agent-node {
  display: grid;
  place-items: center;
  min-height: 108px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--border));
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.agent-node span {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 760;
  line-height: 1.1;
}

.agent-node strong {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 780;
  letter-spacing: 0.03em;
}

.metric-capsules {
  display: grid;
  gap: 10px;
}

.metric-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-pill span {
  display: inline-grid;
  width: 52px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 860;
}

.metric-pill.comp span {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.metric-pill strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.2;
}

.meter {
  display: block;
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-muted);
}

.meter::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  content: "";
}

.hero-stats {
  margin-top: 34px;
  text-align: left;
}

.hero-copy,
.hero-content,
.hero .section-inner {
  display: block;
}

.eyebrow,
.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1,
#hero h1 {
  display: grid;
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 5.35rem;
  font-weight: 760;
  line-height: 0.98;
}

.hero h1 small {
  max-width: 960px;
  margin-inline: auto;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 1.32rem;
  font-weight: 650;
  line-height: 1.35;
}

.hero-summary,
.hero p,
.lead {
  max-width: 820px;
  margin: 14px auto 0;
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.62;
}

.hero .content-section p {
  max-width: var(--content-width);
  margin: 12px auto 0;
  color: var(--text-muted);
  font-size: 1.16rem;
  line-height: 1.65;
  text-align: left;
}

.hero .content-section p:first-child {
  margin-top: 0;
}

.hero .content-section .setup-strip p {
  max-width: none;
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.42;
}

.hero-actions,
.cta-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.button,
.btn,
a.button,
a.btn,
button.button,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.btn:hover,
a.button:hover,
a.btn:hover,
button.button:hover,
button.btn:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.button.primary,
.btn.primary,
.primary-button,
[data-variant="primary"] {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--border));
  background: var(--accent);
  color: #ffffff;
}

.button.primary:hover,
.btn.primary:hover,
.primary-button:hover,
[data-variant="primary"]:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.button.secondary,
.btn.secondary,
.secondary-button,
[data-variant="secondary"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.hero-media {
  max-width: 980px;
  margin: 34px auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.hero-media img {
  display: block;
  width: 100%;
}

.authors,
.section-compact {
  padding: 8px 0 clamp(18px, 3vw, 32px);
  color: var(--text-muted);
  text-align: center;
}

.authors p,
.section-compact p {
  max-width: 980px;
  margin: 0 auto;
}

.authors p:first-child {
  color: var(--text);
  font-weight: 640;
}

.hero .hero-authors {
  padding: 14px 0 10px;
}

.muted {
  color: var(--text-subtle);
}

.section,
main > section:not(.hero):not(.section-compact) {
  padding-block: clamp(16px, 2vw, 26px);
}

.section-heading,
.section-header {
  max-width: 820px;
  margin-bottom: 18px;
}

.section-heading.center,
.section-header.center,
.centered {
  margin-inline: auto;
  text-align: center;
}

.section-heading p,
.section-header p,
.section-description,
section > p {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 1.04rem;
  line-height: 1.62;
}

.section-title,
section h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 2.7rem;
  font-weight: 740;
  line-height: 1.1;
}

section h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.13rem;
  line-height: 1.3;
}

.metric-grid,
.benchmark-stats,
.stats-grid,
#metrics .metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.metric-card,
.stat-card,
.benchmark-stat,
.card {
  min-width: 0;
  padding: 18px 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card strong,
.stat-card strong,
.benchmark-stat strong,
.metric-value,
.stat-value {
  display: block;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 760;
  line-height: 1.05;
}

.metric-card span,
.stat-card span,
.benchmark-stat span,
.metric-label,
.stat-label {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.42;
}

.split-section,
#metrics.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.definition-grid,
.insight-grid,
.resource-grid,
.overall-results,
.domain-results,
.domain-result-grid,
.task-type-gap-cards,
.task-type-gap-grid,
.ablation-cards {
  display: grid;
  gap: 16px;
}

.definition-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.definition-card,
.overview-card,
.process-step,
.insight-grid article,
.resource-grid a,
.resource-card,
.result-card,
.overall-result-card,
.domain-card,
.domain-result-card,
.gap-card,
.task-type-gap-card,
.ablation-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.definition-card h3,
.overview-card h3,
.process-step h3,
.result-card h3,
.overall-result-card h3,
.domain-card h3,
.domain-result-card h3,
.gap-card h3,
.task-type-gap-card h3,
.ablation-card h3 {
  margin: 0 0 8px;
  color: var(--accent-strong);
}

.definition-card p,
.overview-card p,
.process-step p,
.result-card p,
.overall-result-card p,
.domain-card p,
.domain-result-card p,
.gap-card p,
.task-type-gap-card p,
.ablation-card p {
  margin: 0;
  color: var(--text-muted);
}

.overall-results {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid,
.overview-grid,
.process-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
}

.process-step {
  position: relative;
  padding-left: 54px;
  counter-increment: process-step;
}

.process-list {
  counter-reset: process-step;
}

.process-step::before {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  content: counter(process-step);
  font-size: 0.82rem;
  font-weight: 800;
}

.domain-results,
.domain-result-grid,
.task-type-gap-cards,
.task-type-gap-grid,
.ablation-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.paper-figure,
.figure-card,
.pipeline-figure,
.figure-bleed,
.figure-crop {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.figure-showcase {
  width: min(100%, var(--content-width));
  margin: clamp(16px, 2.4vw, 26px) auto 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.interaction-figure.figure-showcase {
  margin: 0 auto 22px;
}

.figure-showcase .figure-crop,
.figure-showcase .figure-bleed,
.figure-showcase .pipeline-figure {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.figure-showcase figcaption {
  padding: 13px 0 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.paper-figure.wide,
.figure-card.wide,
.figure-bleed,
.pipeline-figure {
  grid-column: 1 / -1;
}

.paper-figure img,
.figure-card img {
  display: block;
  width: 100%;
  background: #ffffff;
}

.pipeline-figure,
.figure-bleed,
.figure-crop {
  aspect-ratio: auto;
  max-height: none;
}

.figure-crop-overview {
  aspect-ratio: auto;
  max-height: none;
}

.figure-crop-interaction {
  aspect-ratio: auto;
  max-height: none;
}

.pipeline-figure img,
.figure-bleed img,
.figure-crop img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.figure-crop-overview img,
.figure-crop-interaction img {
  object-position: center;
}

.figure-crop-overview img {
  transform: none;
  transform-origin: center;
}

.figure-crop-interaction img {
  transform: none;
  transform-origin: center;
}

.results-visual {
  width: min(100%, var(--content-width));
  margin: clamp(18px, 2.7vw, 32px) auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 70%, transparent), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.results-visual-header {
  padding: 16px 20px 0;
}

.results-visual-header h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.7rem;
  line-height: 1.25;
}

.scatter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.33fr);
  gap: 18px;
  align-items: stretch;
  padding: 14px 18px 18px;
}

.scatter-plot {
  position: relative;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 94%, var(--accent-soft));
}

.scatter-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 360px;
}

.scatter-plot-area {
  fill: color-mix(in srgb, var(--surface) 88%, var(--surface-tint));
  stroke: var(--border);
}

.scatter-grid-line {
  stroke: color-mix(in srgb, var(--border) 78%, transparent);
  stroke-width: 1;
}

.scatter-axis {
  stroke: var(--border-strong);
  stroke-width: 1.35;
}

.scatter-reference-line {
  stroke: color-mix(in srgb, var(--text-subtle) 74%, transparent);
  stroke-width: 2.2;
  stroke-dasharray: 9 9;
  stroke-linecap: round;
}

.scatter-tick,
.scatter-axis-label,
.scatter-point-label {
  fill: var(--text-muted);
  font-family: var(--font-sans);
}

.scatter-tick {
  font-size: 13px;
  font-weight: 680;
}

.scatter-axis-label {
  fill: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.scatter-point {
  cursor: pointer;
  outline: none;
}

.scatter-point-halo {
  fill: transparent;
  stroke: transparent;
}

.scatter-point-dot {
  stroke: var(--surface);
  stroke-width: 3;
  filter: drop-shadow(0 5px 7px rgba(15, 23, 42, 0.18));
  transition: r 150ms ease, stroke-width 150ms ease, filter 150ms ease;
}

.scatter-point-label {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  stroke-linejoin: round;
  font-size: 12px;
  font-weight: 820;
  pointer-events: none;
}

.scatter-point.is-active .scatter-point-dot,
.scatter-point:focus-visible .scatter-point-dot {
  stroke: var(--text);
  stroke-width: 3.5;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.28));
}

.scatter-point.is-active .scatter-point-label,
.scatter-point:focus-visible .scatter-point-label {
  fill: var(--text);
}

.scatter-point:focus-visible .scatter-point-halo {
  stroke: color-mix(in srgb, var(--accent) 58%, transparent);
  stroke-width: 4;
}

.scatter-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: min(272px, calc(100% - 16px));
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.scatter-tooltip strong,
.scatter-tooltip span {
  display: block;
}

.scatter-tooltip strong {
  color: var(--text);
  font-weight: 820;
}

.scatter-tooltip span + span {
  margin-top: 2px;
}

.scatter-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.scatter-detail-model {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.25;
}

.scatter-detail-model strong {
  min-width: 0;
}

.detail-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--point-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--point-color) 18%, transparent);
}

.overall-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overall-score-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.overall-score-grid span,
.domain-score-row span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.2;
}

.overall-score-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.05;
}

.overall-score-grid small {
  color: var(--text-subtle);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 760;
}

.domain-score-list {
  display: grid;
  gap: 8px;
}

.domain-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.domain-score-row:last-child {
  border-bottom: 0;
}

.domain-score-values {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--text);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.domain-score-values span {
  color: var(--text);
  font-size: inherit;
  font-weight: 760;
  white-space: nowrap;
}

.domain-score-values b {
  color: var(--text-subtle);
  font-size: 0.78rem;
}

.domain-score-row strong {
  color: var(--text);
  font-size: 0.91rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.paper-figure figcaption,
.figure-card figcaption,
.figure-caption {
  padding: 12px 15px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.paper-table-section {
  width: min(100%, var(--content-width));
  margin: 18px auto 26px;
}

.paper-table-card {
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.paper-table-header {
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface-soft);
}

.paper-table-kicker {
  margin-bottom: 5px;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.paper-table-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.36rem;
  line-height: 1.35;
}

.paper-table-note {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.paper-table-scroll,
.table-wrap,
.table-container,
.leaderboard-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.paper-table-card .paper-table-scroll {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.paper-table,
.leaderboard-table,
table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
}

.paper-table.compact {
  min-width: 620px;
  font-size: 0.88rem;
}

.paper-table th,
.paper-table td,
.leaderboard-table th,
.leaderboard-table td,
table th,
table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.paper-table th,
.leaderboard-table th,
table th {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.paper-table thead th,
.leaderboard-table thead th,
table thead th {
  background: color-mix(in srgb, var(--surface-soft) 88%, var(--accent-soft));
}

.score-pair {
  display: inline-grid;
  gap: 2px;
  justify-items: start;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.22;
}

.score-pair span {
  white-space: nowrap;
}

.score-pair b {
  color: var(--text-subtle);
  font-size: 0.78rem;
  font-weight: 820;
}

.paper-table .model-col,
.paper-table tbody th[scope="row"],
.paper-table tbody th:first-child,
.leaderboard-table tbody th:first-child,
.leaderboard-table thead th:first-child,
table tbody th:first-child,
table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 168px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-weight: 780;
}

.paper-table thead .model-col,
.paper-table thead th:first-child,
.leaderboard-table thead th:first-child,
table thead th:first-child {
  z-index: 3;
  background: color-mix(in srgb, var(--surface-soft) 88%, var(--accent-soft));
}

.paper-table tbody tr:hover td,
.paper-table tbody tr:hover th,
.leaderboard-table tbody tr:hover td,
.leaderboard-table tbody tr:hover th,
table tbody tr:hover td,
table tbody tr:hover th {
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}

.paper-table tbody tr:last-child td,
.paper-table tbody tr:last-child th,
.leaderboard-table tbody tr:last-child td,
.leaderboard-table tbody tr:last-child th,
table tbody tr:last-child td,
table tbody tr:last-child th {
  border-bottom: 0;
}

.best,
.paper-table .best,
.leaderboard-table .best {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--best-bg);
  color: var(--accent-strong);
  font-weight: 840;
}

td.best,
th.best {
  padding: 12px 13px;
  box-shadow: inset 0 0 0 999px var(--best-bg);
}

.second,
.paper-table .second,
.leaderboard-table .second {
  color: var(--text);
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: var(--accent-warm);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

td.second,
th.second {
  box-shadow: inset 0 0 0 999px var(--second-bg);
}

.split-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.score-separator {
  color: var(--text-subtle);
}

.paper-table-footnote,
.footnote,
.table-footnote {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 0.92rem;
  line-height: 1.62;
}

.competition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

.competition-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.competition-panel-title {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.competition-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.hidden-intent-bars,
.hidden-intent-stacked-bars,
.stacked-bars {
  display: grid;
  gap: 14px;
}

.hidden-intent-panel {
  display: grid;
  gap: 14px;
}

.stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.stacked-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.legend-swatch.completed,
.bar-segment.completed,
.stacked-bar-segment.completed,
.stacked-segment.completed {
  background: var(--completed);
}

.legend-swatch.inferred,
.bar-segment.inferred,
.stacked-bar-segment.inferred,
.stacked-segment.inferred {
  background: var(--inferred);
}

.legend-swatch.provided,
.bar-segment.provided,
.stacked-bar-segment.provided,
.stacked-segment.provided {
  background: var(--provided);
}

.stacked-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.36fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
}

.stacked-bar-label {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 700;
}

.stacked-bar,
.hidden-intent-stacked-bar,
.hidden-intent-bar {
  display: flex;
  min-width: 0;
  height: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.bar-segment,
.stacked-bar-segment,
.stacked-segment {
  display: block;
  min-width: 2px;
  height: 100%;
}

.bar-segment.proc,
.stacked-bar-segment.proc,
.stacked-segment.proc {
  background: var(--accent);
}

.bar-segment.comp,
.stacked-bar-segment.comp,
.stacked-segment.comp {
  background: var(--accent-blue);
}

.bar-segment.miss,
.stacked-bar-segment.miss,
.stacked-segment.miss {
  background: var(--border-strong);
}

.gap-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.gap-card-title span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 820;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.score-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-muted);
}

.score-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
}

.score-fill.proc {
  background: var(--accent);
}

.score-fill.comp {
  background: var(--accent-blue);
}

.ablation-cards {
  margin-top: 18px;
}

.ablation-card strong {
  display: block;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.44rem;
  line-height: 1.1;
}

.ablation-card span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
}

.taxonomy-grid,
#taxonomy .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.taxonomy-grid article,
.taxonomy-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.taxonomy-grid article span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 820;
}

.taxonomy-grid article strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.taxonomy-grid article em {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 800;
}

.command-grid,
.commands-grid,
.command-list,
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.command-card,
.code-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.command-card h3,
.code-card h3 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
}

pre,
code,
kbd,
samp {
  font-family: var(--font-mono);
}

code {
  padding: 0.12em 0.35em;
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--bg-muted) 72%, transparent);
  color: var(--accent-strong);
  font-size: 0.92em;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 0.91rem;
  line-height: 1.65;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.copy-button,
.copy-btn {
  min-height: 36px;
  margin: 12px 16px 16px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.copy-button:hover,
.copy-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.citation-box,
.deployment-box,
.callout,
blockquote {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-warm);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.insight-grid strong {
  display: block;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.1;
}

.insight-grid span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
}

.link-section {
  display: grid;
  gap: 18px;
}

.resources-section {
  padding-top: clamp(22px, 3vw, 36px);
}

.resources-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: end;
}

.resources-header h2 {
  margin: 0;
}

.resources-header p {
  max-width: 760px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-grid a,
.resource-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 13px;
  align-content: center;
  align-items: center;
  min-height: 116px;
  color: var(--text);
  text-decoration: none;
}

.resource-grid a::after {
  position: absolute;
  right: 16px;
  top: 16px;
  color: var(--text-subtle);
  content: "↗";
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.resource-grid a:hover {
  border-color: var(--border-strong);
  text-decoration: none;
}

.resource-grid a:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.resource-primary {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 72%, transparent), transparent 58%),
    var(--surface);
}

.resource-grid a strong,
.resource-grid a span,
.resource-card strong,
.resource-card span {
  display: block;
  grid-column: 2;
}

.resource-grid a strong,
.resource-card strong {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.2;
}

.resource-icon {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.resource-grid a span,
.resource-card span {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.35;
}

.site-footer,
.footer,
footer {
  width: min(100% - 32px, var(--max-width));
  margin: 42px auto 0;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 0.96rem;
  text-align: center;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  transition: opacity 160ms ease, transform 160ms ease;
}

.to-top:hover {
  transform: translateY(-1px);
}

.to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

@supports not (color: color-mix(in srgb, white, black)) {
  .site-header {
    background: var(--surface);
  }

  .paper-table thead th,
  .leaderboard-table thead th,
  table thead th {
    background: var(--surface-soft);
  }
}

@media (max-width: 1020px) {
  .metric-grid,
  .benchmark-stats,
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .taxonomy-grid,
  #taxonomy .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .competition-grid,
  .overall-results,
  .domain-results,
  .domain-result-grid,
  .task-type-gap-cards,
  .task-type-gap-grid,
  .ablation-cards,
  .grid,
  .overview-grid,
  .process-grid,
  .cards-grid,
  .process-list,
  .benchmark-flow {
    grid-template-columns: 1fr;
  }

  .map-arrow {
    width: 2px;
    height: 32px;
    justify-self: center;
  }

  .map-arrow::after {
    top: auto;
    right: 50%;
    bottom: -1px;
    transform: translateX(50%) rotate(135deg);
  }

  .scatter-layout {
    grid-template-columns: 1fr;
  }

  .scatter-details {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    align-items: start;
  }

  .scatter-detail-model,
  .overall-score-grid {
    grid-column: 1;
  }

  .domain-score-list {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    align-items: start;
    padding-block: 10px;
  }

  .site-header .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .site-nav a,
  .nav-links a,
  .navbar-links a,
  nav li a {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0.9rem;
  }

  .split-section,
  #metrics.split-section,
  .link-section,
  .resources-header {
    grid-template-columns: 1fr;
  }

  .figure-grid,
  .command-grid,
  .commands-grid,
  .command-list,
  .code-grid,
  .resource-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-height: 58px;
  }

  body {
    background: var(--bg);
    font-size: 19px;
  }

  .section,
  .section-compact,
  .container,
  .section-inner,
  .page-section,
  main > section,
  .hero,
  #hero,
  .site-footer,
  .footer,
  footer {
    width: min(100% - 24px, var(--max-width));
  }

  .site-header {
    gap: 10px;
    padding-inline: 12px;
  }

  section {
    scroll-margin-top: 178px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .chip-button {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0.86rem;
  }

  .hero,
  #hero {
    padding-top: 22px;
  }

  .hero h1,
  #hero h1 {
    font-size: 2.9rem;
  }

  .hero h1 small {
    font-size: 1.08rem;
  }

  .content-section p,
  .narrative-section > p,
  .hero .content-section p {
    font-size: 1.04rem;
    line-height: 1.62;
  }

  .setup-strip {
    grid-template-columns: 1fr;
  }

  .item-tag {
    width: fit-content;
  }

  section h2 {
    font-size: 2rem;
  }

  .narrative-section > h3 {
    font-size: 1.28rem;
  }

  .results-visual-header h3 {
    font-size: 1.45rem;
  }

  .hero-actions,
  .cta-row,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .btn,
  a.button,
  a.btn,
  button.button,
  button.btn {
    width: 100%;
  }

  .metric-grid,
  .benchmark-stats,
  .stats-grid,
  .taxonomy-grid,
  #taxonomy .grid,
  .definition-grid {
    grid-template-columns: 1fr;
  }

  .paper-table-scroll,
  .table-wrap,
  .table-container,
  .leaderboard-table-wrap {
    margin-inline: -12px;
    width: calc(100% + 24px);
    border-inline: 0;
    border-radius: 0;
  }

  .paper-table,
  .leaderboard-table,
  table {
    min-width: 760px;
  }

  .paper-table th,
  .paper-table td,
  .leaderboard-table th,
  .leaderboard-table td,
  table th,
  table td {
    padding: 10px 11px;
  }

  .results-visual-header {
    padding: 16px 14px 0;
  }

  .scatter-layout {
    gap: 12px;
    padding: 12px;
  }

  .scatter-plot {
    min-height: 0;
    overflow: hidden;
  }

  .scatter-svg {
    min-width: 0;
    min-height: 0;
  }

  .scatter-tooltip {
    display: none;
  }

  .scatter-details {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scatter-detail-model,
  .overall-score-grid,
  .domain-score-list {
    grid-column: auto;
    grid-row: auto;
  }

  .pipeline-figure,
  .figure-bleed,
  .figure-crop {
    aspect-ratio: auto;
    max-height: none;
  }

  .pipeline-figure img,
  .figure-bleed img,
  .figure-crop img {
    height: auto;
    object-fit: contain;
  }

  .stacked-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 460px) {
  .eyebrow,
  .hero-kicker,
  .section-kicker {
    border-radius: var(--radius-sm);
    white-space: normal;
  }

  pre {
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
