/* ==========================================================================
   Prism Arena Bench — landing page
   Design system: one shared 0–20 measurement track, model lanes as filmstrips,
   achromatic chrome so the eleven roster accents are the only chroma on the page.
   ========================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* Surface */
  --void: #08090b;
  --void-raised: #0b0d11;
  --panel: #0e1116;
  --panel-hi: #141821;
  --track: #191e26;

  /* Rules */
  --rule: #262c35;
  --rule-strong: #39424f;

  /* Ink — all >= 4.5:1 on --void */
  --ink: #e9edf3;
  --ink-dim: #9aa4b2;
  --ink-faint: #7d8796;

  /* Semantics that are not model accents */
  --absent: #5c6575;
  --signal: #f2f5f9;

  /* Type */
  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Space (4px grid) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --s10: 128px;

  --radius: 4px;
  --radius-sm: 2px;
  --shell: 1240px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quick: cubic-bezier(0.2, 0, 0, 1);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Measured, not guessed: the masthead is sticky and its height changes with
     how many nav rows the links wrap onto. app.js publishes the real height as
     --masthead-h; the fallback is the one-row desktop case. */
  scroll-padding-top: calc(var(--masthead-h, 84px) + var(--s2));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* A faint calibration field: the arena's own stage grid, dialled almost out. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 78%);
}

main,
.masthead,
.colophon {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 620;
  letter-spacing: -0.022em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-hi);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.08em 0.36em;
  color: var(--ink);
  white-space: nowrap;
}

/* Emphasis by weight and brightness against the dimmed lede, rather than by
   inventing an underline device used exactly once on the page. */
em {
  font-style: normal;
  font-weight: 560;
  color: var(--ink);
}

svg {
  display: block;
  overflow: visible;
}

.tabular,
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── Focus + skip ───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: var(--s4);
  z-index: 100;
  transform: translateY(-200%);
  background: var(--signal);
  color: var(--void);
  padding: var(--s2) var(--s4);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms var(--ease-quick);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Shell ──────────────────────────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--s5);
}

/* ── Masthead ───────────────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--void) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 60px;
  padding-block: var(--s2);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.wordmark__glyph {
  width: 20px;
  height: 20px;
  color: var(--ink-dim);
  transition: color 200ms var(--ease-quick);
}

.wordmark:hover .wordmark__glyph {
  color: var(--ink);
}

.wordmark__text {
  font-size: 0.9375rem;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.wordmark__suffix {
  color: var(--ink-faint);
  font-weight: 500;
  margin-left: 0.4em;
}

/* Wraps at every width. Seven labels fitted one row; the publication sections
   take it to thirteen, which overflows a desktop masthead too. The old
   overflow-x scroll hid that behind a scrollbar this rule also hides, so the
   last links were unreachable rather than merely off-screen. */
.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  row-gap: 0;
  margin-right: auto;
}

/* Narrow screens keep the same wrap and only tighten the hit targets. */
@media (max-width: 860px) {
  .masthead__nav a {
    min-height: 34px;
    padding-inline: var(--s2);
  }
}

.masthead__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-inline: var(--s3);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-faint);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 160ms var(--ease-quick),
    background-color 160ms var(--ease-quick);
}

.masthead__nav a:hover {
  color: var(--ink);
  background: var(--panel-hi);
}

.masthead__status {
  flex: none;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}

.masthead__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.masthead__status[data-state="complete"] {
  color: var(--ink-dim);
}

/* ── Shared type devices ────────────────────────────────────────────────── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s4);
}

.eyebrow__rule {
  flex: 1;
  max-width: 72px;
  height: 1px;
  background: var(--rule-strong);
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 52ch;
}

.section {
  padding-block: var(--s9);
  border-top: 1px solid var(--rule);
}

.section__head {
  max-width: 68ch;
  margin-bottom: var(--s7);
}

.section__head h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  margin-bottom: var(--s4);
}

.section__intro {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-dim);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(var(--s6), 4vw, var(--s8)) var(--s9);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--s6), 5vw, var(--s8));
  align-items: start;
}

.hero__lede {
  align-self: center;
}

#hero-title {
  font-size: clamp(2.125rem, 1.2rem + 3.6vw, 3.75rem);
  letter-spacing: -0.032em;
  line-height: 1.02;
  margin-bottom: var(--s5);
  max-width: 17ch;
}

/* The aggregation chain — a full-width band whose structure encodes the order
   of operations. Three steps read left to right because that is the order they
   happen in; the arrow inside each step is the reduction it performs. */
.chain {
  grid-column: 1 / -1;
  margin-top: clamp(var(--s5), 3vw, var(--s6));
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 2fr);
  gap: clamp(var(--s5), 4vw, var(--s7));
  align-items: start;
  border-top: 1px solid var(--rule-strong);
  padding-top: var(--s5);
}

.chain__title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s3);
}

.chain__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.chain__step {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: var(--s2);
  padding: var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 0.8125rem;
}

.chain__index {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

.chain__from {
  color: var(--ink-dim);
}

.chain__to {
  position: relative;
  padding-top: var(--s4);
  color: var(--ink);
  font-weight: 560;
}

/* A downward reduction arrow: two marks become one. */
.chain__to::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 1px;
  height: 10px;
  background: var(--rule-strong);
}

.chain__to::after {
  content: "";
  position: absolute;
  left: -2.5px;
  top: 11px;
  border: 3px solid transparent;
  border-top-color: var(--rule-strong);
}

.chain__note {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 44ch;
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s5);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s5);
}

.panel__title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel__note {
  font-size: 0.75rem;
  color: var(--ink-faint);
  max-width: 46ch;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--s5);
  align-items: start;
}

/* ── Sweep map (hero signature) ─────────────────────────────────────────── */
.sweepmap {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel) 0%, var(--void-raised) 100%);
  padding: var(--s5);
}

.sweepmap__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
}

.sweepmap__title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sweepmap__equation {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.sweepmap__equation b {
  color: var(--ink);
  font-weight: 600;
}

.sweepmap__counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
  margin: 0;
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
}

.sweepmap__counts div {
  min-width: 0;
}

.sweepmap__counts dt {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s1);
}

.sweepmap__counts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.sweepmap__sub {
  margin: 2px 0 0;
  /* Two lines reserved so the four figures keep a common baseline. */
  min-height: 2.7em;
  font-family: var(--mono);
  font-size: 0.625rem;
  line-height: 1.35;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 1px;
  flex: none;
  display: inline-block;
}

/* ── Data table primitives ──────────────────────────────────────────────── */
/* `contain: paint` matters beyond the scrollbar: without it a wide table leaks
   its intrinsic width into the document's scroll width, and mobile browsers
   respond by widening the layout viewport and shrinking the whole page. */
.tablewrap {
  overflow-x: auto;
  contain: paint;
  scrollbar-color: var(--rule-strong) transparent;
}

/* A fade at the right edge is the only hint that there is more table. */
.tablewrap[data-scrolls="true"] {
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent 100%);
}

.tablewrap[data-scrolls="true"]:focus-visible {
  mask-image: none;
  -webkit-mask-image: none;
}

table.data--dense th,
table.data--dense td {
  padding: var(--s2) var(--s2);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

table.data caption {
  text-align: left;
  font-size: 0.75rem;
  color: var(--ink-faint);
  padding-bottom: var(--s3);
}

table.data th,
table.data td {
  text-align: left;
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
  white-space: nowrap;
}

table.data thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom-color: var(--rule-strong);
  background: var(--panel);
}

table.data td.num,
table.data th.num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

table.data tbody tr:hover td {
  background: color-mix(in srgb, var(--panel-hi) 70%, transparent);
}

.absent {
  color: var(--ink-faint);
  font-family: var(--mono);
}

/* Sortable headers */
.sortbtn {
  appearance: none;
  background: none;
  border: 0;
  padding: var(--s2) 0;
  margin: calc(var(--s2) * -1) 0;
  min-height: 40px;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  transition: color 140ms var(--ease-quick);
}

.sortbtn:hover {
  color: var(--ink);
}

.sortbtn__caret {
  opacity: 0;
  font-size: 0.75em;
  transition: opacity 140ms var(--ease-quick);
}

[aria-sort="ascending"] .sortbtn__caret,
[aria-sort="descending"] .sortbtn__caret {
  opacity: 1;
}

[aria-sort] .sortbtn {
  color: var(--ink);
}

/* ── Standings ──────────────────────────────────────────────────────────── */
.standings {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.standings__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--rule);
}

.standings__hint {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s4);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  list-style: none;
  margin: 0;
  padding: 0;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}

.standings table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.standings th,
.standings td {
  padding: var(--s3) var(--s3);
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
}

.standings thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom-color: var(--rule-strong);
  white-space: nowrap;
  background: var(--panel);
}

.standings tbody tr:last-child td {
  border-bottom: 0;
}

.standings tbody tr {
  transition: background-color 140ms var(--ease-quick);
}

.standings tbody tr:hover {
  background: var(--panel-hi);
}

.rank {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  width: 1%;
  padding-right: 0;
}

.rank[data-top="1"] {
  color: var(--ink);
}

.modelcell {
  width: 1%;
}

.modelcell__inner {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.lane-rail {
  width: 3px;
  align-self: stretch;
  min-height: 30px;
  border-radius: 2px;
  flex: none;
}

.modelcell__name {
  font-size: 0.875rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ink);
}

.modelcell__meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.scorecell {
  width: 220px;
  min-width: 180px;
}

.scoreline {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.scoreline__value {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  min-width: 4.4ch;
  text-align: right;
}

.scoreline__value[data-absent="true"] {
  color: var(--ink-faint);
  font-weight: 500;
}

.scoreline__max {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
}

.stripcell {
  width: 1%;
}

.validitycell {
  width: 1%;
  white-space: nowrap;
}

.provisional {
  display: inline-block;
  margin-left: var(--s2);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 1px 4px;
  vertical-align: middle;
}

/* ── Small multiples (rubric radar) ─────────────────────────────────────── */
/* 240px minimum lands on four columns at full width, so eleven models fill
   two complete rows and leave a three-card tail. */
.smallmultiples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s4);
}

.radarcard {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.radarcard__head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 32px;
}

.radarcard__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.radarcard__name {
  font-size: 0.8125rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.radarcard__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
  padding-top: var(--s2);
  font-variant-numeric: tabular-nums;
}

.radarcard__foot b {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ── Task strips ────────────────────────────────────────────────────────── */
.taskrows {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.taskrow {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(0, 2.4fr) minmax(150px, 0.9fr);
  gap: var(--s5);
  align-items: center;
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--rule);
}

.taskrow:last-child {
  border-bottom: 0;
}

.taskrow--axis {
  padding-block: var(--s3);
  background: var(--void-raised);
  border-bottom-color: var(--rule-strong);
  align-items: end;
}

.taskrow__id {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.taskrow__title {
  font-size: 0.875rem;
  font-weight: 560;
  letter-spacing: -0.01em;
}

.taskrow__tagline {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 2px;
  text-wrap: pretty;
}

.taskrow__stats {
  display: flex;
  gap: var(--s5);
  justify-content: flex-end;
}

.stat {
  text-align: right;
  min-width: 0;
}

.stat__label {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.stat__value {
  display: block;
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat__value[data-absent="true"] {
  color: var(--ink-faint);
  font-weight: 500;
}

.verdict {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  color: var(--ink-dim);
  margin-top: var(--s2);
  white-space: nowrap;
}

.verdict[data-kind="saturated"] {
  color: var(--void);
  background: var(--ink-dim);
  border-color: var(--ink-dim);
}

.verdict[data-kind="discriminating"] {
  color: var(--ink);
  border-color: var(--ink-dim);
}

.verdict[data-kind="narrow"] {
  color: var(--ink-faint);
}

/* ── Matrix ─────────────────────────────────────────────────────────────── */
.matrix {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.matrix .tablewrap {
  padding: 0;
}

table.matrixtable {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.75rem;
}

table.matrixtable th,
table.matrixtable td {
  padding: 0;
  border: 0;
}

table.matrixtable thead th {
  vertical-align: bottom;
  padding: var(--s3) var(--s1);
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-align: center;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

table.matrixtable thead th.matrix__corner {
  text-align: left;
  padding-left: var(--s4);
  min-width: 168px;
}

table.matrixtable thead th abbr {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-decoration: none;
  border-bottom: 0;
  display: inline-block;
  max-height: 128px;
  overflow: hidden;
  cursor: help;
}

table.matrixtable tbody th {
  text-align: left;
  padding: 0 var(--s3) 0 var(--s4);
  font-weight: 550;
  font-size: 0.75rem;
  color: var(--ink);
  white-space: nowrap;
  border-bottom: 1px solid var(--void);
  background: var(--panel);
}

.matrix__rowlabel {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.matrix__cell {
  height: 34px;
  min-width: 44px;
  text-align: center;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  border: 1px solid var(--void);
  border-radius: 2px;
  transition: outline-color 120ms var(--ease-quick);
  outline: 1px solid transparent;
  outline-offset: -2px;
}

.matrix__cell[data-absent="true"] {
  color: var(--ink-faint);
  background-color: var(--void-raised);
  background-image: repeating-linear-gradient(-45deg, transparent 0 3px, var(--absent) 3px 4px);
}

.matrix__cell[data-zero="true"] {
  box-shadow: inset 0 -2px 0 0 var(--ink-dim);
}

table.matrixtable tbody tr:hover .matrix__cell {
  outline-color: var(--rule-strong);
}

.matrix__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--rule);
}

.rampscale {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--ink-faint);
}

.rampscale__bar {
  width: 132px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid var(--rule);
}

/* ── Judges ─────────────────────────────────────────────────────────────── */
.judgegrid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: var(--s5);
  align-items: start;
}

.judgetables {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: var(--s5);
  align-items: start;
  margin-top: var(--s5);
}

.judgecards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.judgecard {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: var(--s4);
}

.judgecard__name {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.875rem;
  font-weight: 560;
  margin-bottom: var(--s1);
}

.judgecard__meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  margin-bottom: var(--s3);
}

.judgecard__stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  padding-top: var(--s2);
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.judgecard__stat b {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--ink-dim);
  border-radius: var(--radius-sm);
  padding: 1px 4px;
}

td.shared-family {
  position: relative;
  color: var(--ink);
}

td.shared-family::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

/* ── Disclosure (text equivalents) ──────────────────────────────────────── */
.equiv {
  margin-top: var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--void-raised);
}

.equiv > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 40px;
  padding: var(--s2) var(--s4);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-radius: var(--radius);
  transition: color 140ms var(--ease-quick);
}

.equiv > summary::-webkit-details-marker {
  display: none;
}

.equiv > summary:hover {
  color: var(--ink);
}

.equiv > summary::before {
  content: "+";
  font-size: 0.875rem;
  line-height: 1;
  width: 12px;
  text-align: center;
}

.equiv[open] > summary::before {
  content: "\2212";
}

.equiv__body {
  padding: 0 var(--s4) var(--s4);
}

/* ── Empty states ───────────────────────────────────────────────────────── */
.empty {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--void-raised);
  padding: var(--s6) var(--s5);
  text-align: center;
}

.empty__title {
  font-size: 0.9375rem;
  font-weight: 560;
  margin-bottom: var(--s2);
}

.empty__body {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  max-width: 56ch;
  margin-inline: auto;
  line-height: 1.6;
}

.callout {
  margin-top: var(--s4);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--ink-dim);
  border-radius: var(--radius);
  background: var(--panel);
  padding: var(--s4) var(--s5);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--ink-dim);
}

.callout b {
  color: var(--ink);
  font-weight: 600;
}

/* ── Method ─────────────────────────────────────────────────────────────── */
.section--method {
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--panel) 55%, transparent)
  );
}

.method {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s5);
}

.method__item {
  border-top: 1px solid var(--rule-strong);
  padding-top: var(--s4);
}

.method__item h3 {
  font-size: 0.9375rem;
  margin-bottom: var(--s3);
  letter-spacing: -0.012em;
}

.method__item p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-dim);
}

.method__item--caveat h3 {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
}

.method__item--caveat h3::before {
  content: "Caveat";
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--ink-dim);
  border-radius: var(--radius-sm);
  padding: 2px 5px;
  flex: none;
}

/* ── Colophon ───────────────────────────────────────────────────────────── */
.colophon {
  border-top: 1px solid var(--rule);
  padding-block: var(--s7) var(--s8);
}

.colophon__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s5);
}

.colophon dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s1);
}

.colophon dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
  word-break: break-word;
}

.noscript {
  padding-block: var(--s6);
  font-size: 0.875rem;
  color: var(--ink-dim);
}

/* ── Chart internals (SVG) ──────────────────────────────────────────────── */
.axis-line {
  stroke: var(--rule-strong);
  stroke-width: 1;
}

.grid-line {
  stroke: var(--rule-strong);
  stroke-width: 1;
  stroke-opacity: 0.75;
}

.grid-line--major {
  stroke: var(--rule-strong);
  stroke-opacity: 1;
}

.axis-label {
  fill: var(--ink-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.point-label {
  fill: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11px;
}

.point-label--strong {
  fill: var(--ink);
}

.track-bg {
  fill: var(--track);
}

.annotation-line {
  stroke: var(--rule-strong);
  stroke-dasharray: 2 3;
  stroke-width: 1;
}

.annotation-text {
  fill: var(--ink-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* ── Load / reveal choreography ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 620ms var(--ease),
    transform 620ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.grow {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 760ms var(--ease);
  transition-delay: var(--grow-delay, 0ms);
}

.is-grown .grow {
  transform: scaleX(1);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero__grid,
  .split,
  .judgegrid,
  .judgetables {
    grid-template-columns: minmax(0, 1fr);
  }

  .taskrow {
    grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr);
    row-gap: var(--s3);
  }

  .taskrow--axis > :last-child {
    display: none;
  }

  .taskrow__stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: var(--s6);
  }

  .stat {
    text-align: left;
  }
}

@media (max-width: 860px) {
  /* scroll-padding-top is measured from the live masthead, so the narrow
     breakpoint no longer needs its own guess. */

  .masthead__inner {
    flex-wrap: wrap;
    gap: var(--s2) var(--s4);
    padding-block: var(--s2) var(--s1);
  }

  .masthead__nav {
    order: 3;
    width: 100%;
    margin-inline: calc(var(--s5) * -1);
    padding-inline: var(--s5);
    border-top: 1px solid var(--rule);
    padding-top: 2px;
  }

  .masthead__status {
    margin-left: auto;
  }

  .masthead__status .masthead__detail {
    display: none;
  }

  .masthead__status {
    padding-right: 2px;
  }

  /* Two wrapped columns of micro-caps at phone width read as damage. */
  .eyebrow {
    flex-wrap: wrap;
    gap: var(--s1) var(--s2);
  }

  .eyebrow .eyebrow__rule {
    display: none;
  }
}

@media (max-width: 720px) {
  .shell {
    padding-inline: var(--s4);
  }

  .section {
    padding-block: var(--s8);
  }

  .section__head {
    margin-bottom: var(--s5);
  }

  .sweepmap__counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s4) var(--s3);
  }

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

  .chain__steps {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }

  /* Standings become stacked lane cards: a table on a phone is a scroll trap. */
  .standings table,
  .standings thead,
  .standings tbody,
  .standings tr,
  .standings td {
    display: block;
    width: 100%;
  }

  .standings thead {
    display: none;
  }

  .standings tbody tr {
    border-bottom: 1px solid var(--rule);
    padding: var(--s4);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--s3) var(--s4);
    align-items: center;
  }

  .standings tbody tr:last-child {
    border-bottom: 0;
  }

  .standings td {
    border-bottom: 0;
    padding: 0;
  }

  .standings td.rank {
    width: auto;
    grid-column: 1;
    grid-row: 1;
    padding-right: 0;
  }

  .standings td.modelcell {
    width: auto;
    grid-column: 2;
    grid-row: 1;
  }

  .standings td.scorecell {
    width: auto;
    min-width: 0;
    grid-column: 1 / -1;
  }

  .standings td.stripcell,
  .standings td.validitycell {
    width: auto;
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .standings td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.5625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: var(--s2);
  }

  .smallmultiples {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--s3);
  }

  .radarcard {
    padding: var(--s3);
  }

  .taskrow {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
    padding: var(--s4);
  }

  .taskrow__stats {
    gap: var(--s5);
  }

  .method {
    gap: var(--s4);
  }

  table.matrixtable thead th.matrix__corner {
    min-width: 132px;
  }
}

@media (max-width: 420px) {
  .smallmultiples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
    transition-delay: 0ms;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .grow {
    transform: scaleX(1);
  }
}

/* ── Print / forced colors ──────────────────────────────────────────────── */
@media (forced-colors: active) {
  .matrix__cell,
  .lane-rail,
  .swatch {
    forced-color-adjust: none;
  }
}
