:root {
  --paper: #f7f7f4;
  --surface: #ffffff;
  --ink: #202321;
  --muted: #5f6662;
  --faint: #e2e4e0;
  --fainter: #eceeeb;
  --accent: #176b66;
  --accent-dark: #0f504c;
  --accent-soft: #dfecea;
  --attempted: #46515d;
  --perceived: #ffffff;
  --warning: #8a4b17;
  --max-width: 1180px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid #70aaa6;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: white;
}

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

.site-shell {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--faint);
  background: rgba(247, 247, 244, 0.96);
}

.header-inner {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 780;
  letter-spacing: 0.11em;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

nav a {
  color: #424744;
  font-size: 0.86rem;
  font-weight: 620;
  text-decoration: none;
}

.hero {
  padding-block: clamp(2.5rem, 4.5vw, 4rem) clamp(2rem, 3.5vw, 3rem);
}

.hero h1 {
  max-width: 1040px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 4.4vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.paper-masthead {
  max-width: 1080px;
  margin-inline: auto;
  text-align: center;
}

.paper-masthead .eyebrow {
  margin-bottom: 0.9rem;
}

.paper-subtitle {
  max-width: 820px;
  margin: 1rem auto 0;
  color: var(--accent-dark);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.5;
}

.paper-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.7rem;
  margin: 1.15rem 0 0;
  font-size: 1rem;
  font-weight: 690;
}

.paper-authors span + span::before {
  content: "·";
  margin-right: 1.7rem;
  color: #9aa19d;
}

.paper-affiliation {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 560;
}

.eyebrow,
.section-index {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.115em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.button {
  display: inline-flex;
  gap: 0.48rem;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #adb3af;
  border-radius: 2px;
  padding: 0.55rem 0.85rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 690;
  text-decoration: none;
}

.button-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.button-primary {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: white;
}

.button-primary:hover {
  background: var(--accent);
  color: white;
}

.text-link {
  padding: 0.45rem 0.2rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.small {
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

#leaderboard {
  padding-top: clamp(2.4rem, 4vw, 3.5rem);
}

.benchmark-intro {
  max-width: none;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.interpretation-note {
  max-width: 980px;
}

.interpretation-note h2 {
  margin-bottom: 1rem;
}

.interpretation-note p:last-child {
  max-width: 900px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.68;
}

.section-rule {
  border-top: 1px solid #cfd3cf;
}

.section-heading {
  margin-bottom: 1.7rem;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 3rem;
  align-items: end;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.13;
}

h3 {
  margin: 0 0 0.65rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.section-summary {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.reference-panel {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  border-block: 1px solid var(--faint);
}

.reference-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.reference-selector legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.reference-selector label {
  position: relative;
  display: flex;
  min-height: 82px;
  align-items: center;
  border-right: 1px solid var(--faint);
  padding: 1rem 1.05rem 1rem 2.25rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.4;
}

.reference-selector label:has(input:checked) {
  background: var(--surface);
  color: var(--ink);
}

.reference-selector input {
  position: absolute;
  left: 0.9rem;
  width: 0.86rem;
  height: 0.86rem;
  accent-color: var(--accent);
}

.reference-selector strong {
  color: inherit;
  font-size: 0.9rem;
}

.reference-readout {
  padding: 1rem 1.2rem;
  background: var(--accent-soft);
}

.reference-readout > span {
  display: block;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-readout output {
  display: block;
  margin: 0.05rem 0 0.3rem;
  font-size: 1.28rem;
  font-variant-numeric: tabular-nums;
  font-weight: 740;
}

.reference-readout p {
  margin: 0;
  color: #3f5652;
  font-size: 0.75rem;
  line-height: 1.45;
}

.explanation {
  max-width: 820px;
  margin: 1.6rem 0 0.8rem;
}

.example-callout {
  max-width: 920px;
  margin: 0 0 2rem;
  border-left: 3px solid var(--accent);
  padding: 0.55rem 0 0.55rem 1rem;
  color: #3f4542;
}

.benchmark-overview {
  margin: 2.25rem 0;
  border-block: 1px solid var(--faint);
  padding-block: 1.35rem 1.1rem;
}

.benchmark-overview-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.benchmark-overview-heading .section-index {
  margin-bottom: 0.4rem;
}

.benchmark-overview-heading h3 {
  margin: 0;
  font-size: 1.05rem;
}

.benchmark-overview-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.scatter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.scatter-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.legend-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.invasive-swatch {
  background: var(--attempted);
}

.noninvasive-swatch {
  background: var(--accent);
}

.benchmark-scatter {
  overflow-x: auto;
  margin-top: 0.7rem;
}

.benchmark-scatter svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  font-family: var(--font-sans);
}

.scatter-grid {
  stroke: var(--faint);
  stroke-width: 1;
}

.scatter-axis {
  stroke: #9da49f;
  stroke-width: 1;
}

.scatter-panel-title {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.scatter-tick,
.scatter-axis-label {
  fill: var(--muted);
  font-size: 10px;
}

.scatter-axis-label {
  font-size: 10.5px;
  font-weight: 620;
}

.scatter-point text {
  fill: #3d4541;
  font-size: 10px;
  font-weight: 620;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.leaderboard-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: 2rem;
  border-top: 1px solid #bfc4c0;
  padding-top: 1.5rem;
}

.leaderboard-notes aside {
  border-top: 3px solid var(--accent);
  padding-top: 0.85rem;
}

.leaderboard-notes h3 {
  margin-bottom: 0.35rem;
}

.leaderboard-notes p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.leaderboard-notes .text-link {
  display: inline-block;
  margin-top: 0.55rem;
  padding-left: 0;
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.group-toggle {
  display: flex;
  min-height: 36px;
  align-items: stretch;
  margin: 0;
  border: 1px solid #b9bfbb;
  border-radius: 2px;
  padding: 0;
}

.group-toggle legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.group-toggle label {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.3rem 0.62rem;
  border-right: 1px solid #b9bfbb;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 650;
}

.group-toggle label:last-child {
  border-right: 0;
}

.group-toggle label:has(input:checked) {
  background: var(--accent-dark);
  color: white;
}

.group-toggle input {
  position: absolute;
  opacity: 0;
}

.table-controls label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

select {
  min-height: 36px;
  margin-left: 0.45rem;
  border: 1px solid #b9bfbb;
  border-radius: 2px;
  padding: 0.3rem 2rem 0.3rem 0.55rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 520;
}

.table-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.table-scroll {
  border-block: 2px solid var(--ink);
}

.leaderboard-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.leaderboard-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.leaderboard-table th,
.leaderboard-table td {
  border-bottom: 1px solid var(--faint);
  padding: 0.72rem 0.55rem;
  text-align: right;
  vertical-align: top;
}

.leaderboard-table th {
  background: var(--paper);
  color: #4b514d;
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-transform: uppercase;
}

.leaderboard-table th:nth-child(1),
.leaderboard-table th:nth-child(3),
.leaderboard-table th:nth-child(5),
.leaderboard-table th:nth-child(6),
.leaderboard-table th:nth-child(8),
.leaderboard-table th:nth-child(9),
.leaderboard-table th:nth-child(10),
.leaderboard-table td:nth-child(1),
.leaderboard-table td:nth-child(3),
.leaderboard-table td:nth-child(5),
.leaderboard-table td:nth-child(6),
.leaderboard-table td:nth-child(8),
.leaderboard-table td:nth-child(9),
.leaderboard-table td:nth-child(10) {
  text-align: left;
}

.leaderboard-table .group-row th {
  border-bottom: 1px solid #bfc5c1;
  padding-top: 1.15rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.73rem;
  letter-spacing: 0.075em;
}

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

.system-name {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.3;
}

.system-task,
.cell-note {
  display: block;
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.38;
}

.metric-lower-bound {
  color: var(--warning);
  font-weight: 700;
}

.decoder-method {
  color: var(--accent-dark);
  font-weight: 650;
}

.comparison-bar {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) auto;
  min-width: 180px;
  align-items: center;
  gap: 0.5rem;
}

.comparison-track {
  position: relative;
  display: block;
  height: 0.55rem;
  overflow: hidden;
  background: #e2e5e2;
}

.comparison-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
}

.score-interval {
  position: absolute;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--ink);
}

.comparison-value {
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-cell {
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 760;
}

.unit {
  text-transform: none;
}

.loading-cell,
.error-note {
  padding: 2rem !important;
  text-align: left !important;
  color: var(--muted);
}

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: clamp(3rem, 8vw, 7rem);
}

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

.use-grid > div:first-child {
  max-width: 850px;
}

.why-grid p {
  max-width: 720px;
}

.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem;
  margin: 2.3rem 0;
  border-block: 1px solid var(--faint);
  padding: 1.4rem 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.formula-equals,
.formula-times {
  color: var(--accent);
}

.definitions {
  margin: 0;
}

.definitions div {
  display: grid;
  grid-template-columns: 70px 1fr;
  border-top: 1px solid var(--faint);
  padding: 0.65rem 0;
}

.definitions .definition-long {
  grid-template-columns: minmax(170px, 0.8fr) 1.2fr;
}

.definitions dt {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
}

.definitions dd {
  margin: 0;
  color: var(--muted);
}

.symbol-example {
  align-self: start;
  border-top: 3px solid var(--accent);
  padding-top: 1rem;
}

.symbol-example p {
  color: var(--muted);
  font-size: 0.9rem;
}

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

code {
  font-size: 0.88em;
}

pre {
  overflow-x: auto;
  margin: 1rem 0 1.4rem;
  border-left: 3px solid var(--accent);
  padding: 1rem 1.1rem;
  background: #eceeea;
  color: #252a27;
  font-size: 0.79rem;
  line-height: 1.6;
}

.reference-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--ink);
}

.reference-list article {
  min-width: 0;
  border-right: 1px solid var(--faint);
  padding: 1.2rem 1.2rem 0 0;
}

.reference-list article + article {
  padding-left: 1.2rem;
}

.reference-list article:last-child {
  border-right: 0;
}

.reference-list p {
  color: var(--muted);
  font-size: 0.86rem;
}

.reference-list .reference-stat {
  color: var(--accent-dark);
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.citation-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: 1rem;
  border-top: 1px solid #bfc4c0;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.citation-panel h3 {
  font-size: 1.35rem;
}

.citation-panel p:not(.section-index) {
  color: var(--muted);
  font-size: 0.86rem;
}

.citation-panel pre {
  margin: 0;
}

.project-links {
  padding-bottom: 4rem;
}

.link-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.link-status-grid p {
  margin: 0;
  border-top: 1px solid var(--faint);
  padding-top: 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer {
  border-top: 1px solid #bfc4c0;
  padding-block: 2.2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 900px) {
  .split-heading,
  .why-grid,
  .use-grid,
  .citation-panel,
  .leaderboard-notes {
    grid-template-columns: 1fr;
  }

  .reference-panel {
    grid-template-columns: 1fr;
  }

  .reference-selector label:last-child {
    border-right: 0;
  }

  .reference-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .reference-list article:nth-child(2) {
    border-right: 0;
  }

  .reference-list article:nth-child(n + 3) {
    border-top: 1px solid var(--faint);
    padding-top: 1.2rem;
  }
}

@media (max-width: 680px) {
  .site-shell {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  .header-inner {
    display: grid;
    gap: 0.45rem;
    align-items: flex-start;
    padding-block: 0.7rem;
  }

  nav {
    max-width: none;
    justify-content: flex-start;
    gap: 0.35rem 0.85rem;
  }

  nav a {
    font-size: 0.73rem;
  }

  .hero {
    padding-top: 2.75rem;
  }

  .split-heading > *,
  .reference-panel > * {
    min-width: 0;
  }

  .hero h1 {
    overflow-wrap: anywhere;
  }

  .paper-authors {
    display: grid;
    gap: 0.15rem;
  }

  .paper-authors span + span::before {
    content: none;
  }

  .reference-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .reference-selector label:nth-child(3) {
    border-right: 0;
  }

  .reference-selector label:nth-child(n + 4) {
    border-top: 1px solid var(--faint);
  }

  .table-controls {
    display: grid;
  }

  .table-controls label {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  select {
    width: 100%;
    margin-left: 0;
  }

  .reference-list,
  .link-status-grid {
    grid-template-columns: 1fr;
  }

  .reference-list article,
  .reference-list article + article {
    border-top: 1px solid var(--faint);
    border-right: 0;
    padding: 1rem 0;
  }

  .footer-inner {
    display: grid;
  }
}

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

@media print {
  .site-header,
  .hero-actions,
  .table-controls {
    display: none;
  }

  body {
    background: white;
  }

  .site-shell {
    width: 100%;
  }
}
