/* Typography and base palette match aryamangupta.me. */
:root {
  color-scheme: dark;
  --bg: #1a1a1a;
  --surface: #202020;
  --soft: #292725;
  --text: #e7e5e4;
  --heading: #fff;
  --muted: #a8a29e;
  --faint: #9b9591;
  --border: #393633;
  --border-strong: #57534e;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --bar: #f97316;
  --bar-best: #f97316;
  --status-bg: #252321;
  --status-text: #d6d3d1;
  --weight-normal: 500;
  --weight-strong: 600;
  --radius: 8px;
  --radius-lg: 12px;
  --font: "Lucida Console", monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 75px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--weight-normal) 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button,
a,
input,
summary {
  touch-action: manipulation;
  border-radius: var(--radius);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
  font-weight: var(--weight-normal);
  color: var(--heading);
}
code {
  font-family: var(--font);
  font-size: 0.9em;
}
.wrap,
.header-inner,
.site-footer {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding-left: 26px;
  padding-right: 26px;
}
.wrap {
  min-height: 65vh;
}
.site-header {
  height: 58px;
  background: var(--bg);
  border-bottom: 1px solid var(--soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--weight-strong);
  font-size: 15px;
  letter-spacing: -0.4px;
}
.brand svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.brand > span {
  color: var(--muted);
  margin-left: -3px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font: var(--weight-normal) 12px var(--font);
  color: var(--muted);
}
.site-header nav a[aria-current="page"] {
  color: var(--text);
}
.site-header nav svg {
  display: block;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 50;
  background: var(--accent);
  color: var(--bg);
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
.benchmark-section {
  margin: 34px 0 44px;
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.section-heading h1,
.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.segmented {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-lg);
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: var(--radius);
  color: var(--muted);
  padding: 9px 17px;
  font-size: 12px;
  font-weight: var(--weight-strong);
  white-space: nowrap;
}
.segmented button:hover {
  color: var(--text);
}
.segmented button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
}
input[type="search"] {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  font: var(--weight-normal) 11px var(--font);
  width: 180px;
  min-width: 0;
}
input::placeholder {
  color: var(--faint);
}
.board-scroll {
  overflow: auto;
  max-width: 100%;
  border-radius: var(--radius-lg);
}
.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  table-layout: fixed;
}
.results-table th {
  font-weight: var(--weight-normal);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 2px 6px 7px;
}
.results-table th:first-child {
  text-align: left;
  width: 238px;
}
.results-table th:last-child.correct-heading {
  width: 58px;
  text-align: right;
  padding-right: 0;
}
.results-table td {
  padding: 0 4px;
  vertical-align: middle;
}
.results-table td:first-child {
  padding-left: 0;
  padding-right: 16px;
}
.results-table td:last-child {
  padding-right: 0;
}
.model-button {
  display: flex;
  gap: 9px;
  align-items: center;
  text-align: left;
  background: none;
  border: 0;
  padding: 7px 0;
  width: 100%;
  color: var(--text);
  font-size: 13px;
}
.model-button:hover {
  color: var(--accent);
}
.model-icon {
  font: var(--weight-strong) 9px var(--font);
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--status-text);
}
.model-icon img {
  width: 68%;
  height: 68%;
  display: block;
}
.model-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-bar {
  font-variant-numeric: tabular-nums;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: var(--soft);
  border-radius: var(--radius);
  min-height: 34px;
  width: 100%;
  padding: 4px 9px;
  color: var(--text);
  font: var(--weight-strong) 12px var(--font);
  overflow: hidden;
  transition: border-color 0.15s;
}
.result-bar:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  background: var(--bar);
  z-index: -1;
}
.result-bar.best:before {
  background: var(--bar-best);
}
.result-bar.best {
  box-shadow: inset 0 0 0 1px var(--border-strong);
  color: var(--bg);
}
.result-bar:hover {
  border-color: var(--muted);
}
.result-bar .star {
  position: absolute;
  right: 5px;
  top: 0;
  font-size: 10px;
  color: var(--heading);
}
.result-bar.best .star {
  color: var(--bg);
}
.result-bar.fail {
  border-color: var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
}
.result-bar.infra {
  border-style: dashed;
  border-color: var(--border-strong);
  background: var(--status-bg);
  color: var(--status-text);
  font-size: 10px;
}
.result-bar.none {
  background: var(--surface);
  color: var(--border-strong);
  cursor: default;
}
.result-bar.correct:before {
  background: var(--bar);
}
.result-bar.correct.best:before {
  background: var(--bar-best);
}
.correct-count {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-end;
  align-items: center;
  min-height: 34px;
}
.correct-count i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}
.correct-count i.passed {
  background: var(--accent);
}
.correct-count span {
  font: var(--weight-normal) 10px var(--font);
  color: var(--muted);
}
.board-caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: var(--weight-normal) 10px/1.7 var(--font);
  color: var(--faint);
  margin-top: 12px;
}
.matrix-table {
  min-width: 750px;
}
.matrix-table td {
  vertical-align: top;
}
.matrix-table .result-bar + .result-bar {
  margin-top: 4px;
}
.matrix-table th a:hover {
  text-decoration: underline;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
  margin-bottom: 25px;
  font: var(--weight-normal) 10px/1.8 var(--font);
  color: var(--faint);
}
.site-footer > div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.site-footer p {
  color: var(--faint);
}
.site-footer a:hover {
  text-decoration: underline;
}
.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 25px;
}
.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-width: 0;
  scroll-margin-top: 80px;
}
.problem-card:target {
  border-color: var(--accent);
}
.badge {
  font: var(--weight-normal) 10px var(--font);
  color: var(--muted);
  background: var(--soft);
  padding: 4px 7px;
  border-radius: var(--radius);
}
.problem-card h3 {
  font-size: 19px;
  font-weight: var(--weight-strong);
  margin-bottom: 10px;
}
.pc-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 14px 0;
}
.chip {
  font: var(--weight-normal) 10px var(--font);
  color: var(--muted);
  background: var(--soft);
  padding: 4px 6px;
  border-radius: var(--radius);
}
.pc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
  padding: 16px 0;
  border-block: 1px solid var(--border);
}
.pc-metrics strong {
  font-variant-numeric: tabular-nums;
  display: block;
  font: var(--weight-normal) 15px var(--font);
  color: var(--text);
}
.pc-metrics span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.eyebrow {
  font: var(--weight-normal) 10px var(--font);
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: 60px 1fr 90px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  font-size: 10px;
  color: var(--muted);
}
.bar-track {
  height: 7px;
  background: var(--soft);
}
.bar-fill {
  display: block;
  height: 100%;
  background: var(--bar);
}
.bar-num {
  text-align: right;
  font: var(--weight-normal) 10px var(--font);
}
.problem-card details {
  border-top: 1px solid var(--border);
  margin-top: 22px;
  padding-top: 15px;
}
.problem-card summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.contract-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 15px;
}
.contract-table th,
.contract-table td {
  text-align: left;
  padding: 8px 5px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
  vertical-align: top;
}
.contract-table th {
  font-weight: var(--weight-normal);
  color: var(--muted);
}
.contract-table td {
  color: var(--status-text);
}
.pc-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--accent);
}
dialog {
  width: min(880px, calc(100vw - 28px));
  max-height: 85vh;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 24px 100px #0008;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 25px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.dialog-head h2 {
  font-size: 21px;
  overflow-wrap: anywhere;
}
.dialog-close {
  border: 1px solid var(--border-strong);
  background: var(--soft);
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  font-size: 20px;
  flex-shrink: 0;
}
.dialog-body {
  padding: 25px;
}
.dialog-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}
.run-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.run-card {
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-width: 0;
}
.rc-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.rc-head strong {
  font-size: 13px;
}
.rc-status {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: var(--radius);
}
.rc-status.beat {
  background: var(--bar);
  color: var(--bg);
}
.rc-status.correct {
  background: var(--status-bg);
  color: var(--status-text);
}
.rc-status.fail {
  background: var(--surface);
  color: var(--muted);
}
.rc-status.infra {
  background: var(--status-bg);
  color: var(--status-text);
}
.rc-meta {
  font: var(--weight-normal) 10px/1.9 var(--font);
  color: var(--muted);
  overflow-wrap: anywhere;
  margin: 13px 0;
}
.rc-ratio {
  font: var(--weight-normal) 25px var(--font);
  color: var(--accent);
  margin-top: 16px;
}
.metric-caption {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0 15px;
}
.rc-detail {
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.run-evidence {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}
.evidence-title {
  font-size: 11px;
  color: var(--text);
}
.evidence-title span {
  font-weight: var(--weight-normal);
  color: var(--muted);
}
.run-evidence .rc-meta { margin: 8px 0 12px; }
.evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 11px;
}
.evidence-links a { color: var(--accent); }
.evidence-retention {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}
.run-card details {
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted);
}
.run-card summary {
  cursor: pointer;
}
.run-card details p {
  margin-top: 9px;
}
.hash-value {
  font: var(--weight-normal) 9px/1.8 var(--font);
  word-break: break-all;
  color: var(--muted);
}
.pilot-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px 0 0;
}
.pilot-note a {
  color: var(--accent);
}
.error-state {
  padding: 25px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  margin: 20px 0;
}
.error-state p {
  margin-top: 10px;
}
.loading {
  color: var(--muted);
}
@media (max-width: 900px) {
  .results-table th:first-child {
    width: 200px;
  }
  .problem-grid {
    gap: 16px;
  }
  .section-heading {
    gap: 15px;
  }
  .segmented button {
    padding: 8px 12px;
  }
  .problem-card {
    padding: 19px;
  }
}
@media (max-width: 620px) {
  .wrap,
  .header-inner,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-header {
    height: 54px;
  }
  .brand {
    font-size: 14px;
  }
  .site-header nav {
    gap: 18px;
    font-size: 11px;
  }
  .benchmark-section {
    margin: 24px 0 34px;
  }
  .section-heading {
    flex-wrap: wrap;
    gap: 13px;
  }
  .section-heading h1,
  .section-heading h2 {
    font-size: 20px;
  }
  .segmented {
    border-radius: var(--radius-lg);
    padding: 3px;
  }
  .segmented button {
    font-size: 11px;
    padding: 8px 11px;
  }
  .results-table th:first-child {
    width: 170px;
  }
  .results-table th:last-child.correct-heading {
    width: 46px;
  }
  .model-icon {
    width: 16px;
    height: 16px;
    font-size: 8px;
  }
  .model-button {
    min-height: 34px;
  }
  .results-table td:first-child {
    padding-right: 8px;
  }
  .result-bar {
    font-size: 11px;
  }
  .board-caption {
    font-size: 9px;
    flex-wrap: wrap;
    gap: 7px;
  }
  .matrix-table {
    min-width: 700px;
  }
  .matrix-table th:first-child {
    position: sticky;
    left: 0;
    background: var(--bg);
    z-index: 2;
  }
  .matrix-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--bg);
    z-index: 2;
  }
  .matrix-table .model-button {
    font-size: 11px;
  }
  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
  .problem-grid {
    grid-template-columns: 1fr;
  }
  .run-grid {
    grid-template-columns: 1fr;
  }
  .dialog-head,
  .dialog-body {
    padding: 18px;
  }
  .dialog-head h2 {
    font-size: 18px;
  }
  .pc-metrics strong {
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .brand > span {
    display: none;
  }
  .site-header nav {
    gap: 14px;
  }
  .workspace .site-header nav a:last-child {
    display: none;
  }
  .results-table th:first-child {
    width: 145px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* Compact research leaderboard. The chart and operator matrix share one page. */
.scroll-hint { display: none; color: var(--muted); font-size: 10px; margin-top: 10px; }
.scroll-hint.fits { display: none !important; }
.workspace .wrap, .workspace .header-inner, .workspace .site-footer {
  width: min(1440px, 100%);
  margin-inline: auto;
  padding-inline: 36px;
}
.workspace .site-header { height: 68px; border-bottom: 1px solid var(--border); }
.workspace .brand { font-size: 19px; gap: 10px; letter-spacing: -.6px; }
.workspace .brand svg { width: 25px; height: 25px; }
.workspace .site-header nav { font-size: 12px; gap: 28px; }
.workspace .site-header nav a { padding: 10px 0; }
.workspace .site-header nav a[aria-current="page"] { color: var(--accent); }
.workspace .site-header nav a span { display: none; }
/* Request for frontier-model access, above the sticky header so it scrolls away. */
.access-banner { background: var(--accent-soft); border-bottom: 1px solid rgba(249, 115, 22, 0.35); font-size: 11px; line-height: 1.6; }
.access-inner { width: min(1440px, 100%); margin-inline: auto; padding: 10px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.access-banner strong { color: var(--accent); font-weight: var(--weight-strong); }
.access-banner a { flex: none; border: 1px solid var(--accent); padding: 6px 12px; color: var(--heading); white-space: nowrap; }
.access-banner a:hover { background: var(--accent); color: var(--bg); }
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 34px 0 23px; }
.page-intro .eyebrow { font-size: 9px; letter-spacing: 1.5px; margin-bottom: 10px; }
.page-intro h1 { font-size: 30px; line-height: 1.25; letter-spacing: -1px; font-weight: var(--weight-strong); }
.download-link { display: flex; align-items: center; gap: 18px; border: 1px solid var(--border-strong); padding: 9px 13px; border-radius: var(--radius); font-size: 11px; white-space: nowrap; }
.download-link span { color: var(--accent); font-size: 17px; }
.workspace input[type="search"] { width: 220px; padding: 9px 12px; font-size: 11px; }
.workspace .benchmark-section { margin: 26px 0 34px; scroll-margin-top: 86px; }
.workspace .section-heading { border: 0; padding: 0; margin-bottom: 15px; }
.workspace .section-heading h2 { font-size: 18px; font-weight: var(--weight-strong); }
.section-heading > div > p { color: var(--muted); font-size: 10px; margin-top: 4px; }
.workspace .segmented { border-radius: var(--radius-lg); padding: 3px; }
.workspace .segmented button { font-size: 11px; padding: 8px 13px; border-radius: var(--radius); }
.workspace .segmented button[aria-pressed="true"] { background: var(--soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ranking-scroll { border: 1px solid var(--border); padding: 0 18px; }
.ranking-table { width: 100%; min-width: 880px; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.ranking-table .model-col { width: 235px; }
.ranking-table .score-col { width: 120px; }
.ranking-table .stat-col { width: 85px; }
.ranking-table .attempt-col { width: 75px; }
.ranking-table .reasoning-col { width: 150px; }
.reasoning-stat strong { display: block; color: var(--text); font-weight: var(--weight-normal); }
.reasoning-stat span { display: block; margin-top: 2px; font-size: 10px; color: var(--faint); }
.ranking-table thead th { text-transform: uppercase; font-size: 10px; letter-spacing: .6px; color: var(--muted); font-weight: var(--weight-strong); text-align: right; padding: 17px 8px; border-bottom: 1px solid var(--border-strong); }
.ranking-table thead th:first-child, .ranking-table thead .chart-heading { text-align: left; }
.ranking-table .chart-heading span { text-transform: none; letter-spacing: 0; color: var(--faint); font-size: 9px; }
.ranking-table tbody th, .ranking-table tbody td { height: 67px; padding: 9px 8px; border-bottom: 1px solid var(--border); font-weight: var(--weight-normal); }
.ranking-table tbody tr:hover { background: var(--surface); }
.ranking-table .model-button { font-size: 13px; gap: 10px; min-height: 42px; }
.ranking-table .model-icon { border-radius: var(--radius); width: 23px; height: 23px; color: var(--accent); border-color: var(--border); background: var(--surface); }
.comparison-bar { display: block; padding: 12px 0; min-height: 44px; width: 100%; border: 0; background: transparent; }
.comparison-track { display: block; position: relative; width: 100%; height: 17px; background: var(--surface); }
.comparison-fill { display: block; height: 100%; background: var(--accent); opacity: .75; }
.comparison-track, .comparison-fill, .bar-track, .bar-fill, .result-bar:before { border-radius: 999px; }
.comparison-bar.best .comparison-fill, .comparison-bar:hover .comparison-fill { opacity: 1; }
.primary-stat { text-align: right; }
.primary-stat strong { display: block; font-size: 16px; font-weight: var(--weight-strong); }
.numeric-stat { color: var(--muted); font-size: 12px; text-align: right; }
.chart-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 9px; padding: 13px 0 15px; }
.workspace .board-caption { font-size: 10px; }
.workspace #operators { border-top: 1px solid var(--border-strong); padding-top: 26px; }
.workspace .matrix-table { border-spacing: 0 5px; min-width: 800px; }
.workspace .matrix-table th { font-size: 11px; padding: 9px 8px; }
.workspace .matrix-table th:first-child { width: 245px; }
.workspace .matrix-table td { padding: 5px 5px; vertical-align: middle; }
.workspace .result-bar { min-height: 36px; border-radius: var(--radius); background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.workspace .result-bar:before { inset: auto auto 0 0; height: 3px; }
.workspace .result-bar.best { box-shadow: none; color: var(--accent); }
.workspace .result-bar.best .star { color: var(--accent); }
.workspace .result-bar.fail, .workspace .result-bar.infra { color: var(--muted); }
.workspace .result-bar.infra { border-style: dashed; }
.workspace .site-footer { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 30px; }
.library-toolbar { display: flex; justify-content: flex-end; padding-top: 24px; }
@media (max-width: 1000px) {
  .scroll-hint { display: block; }
  .workspace .wrap, .workspace .header-inner, .workspace .site-footer { padding-inline: 24px; }
  .access-inner { padding-inline: 24px; }
  .ranking-table .model-col { width: 210px; }
  .ranking-table .score-col { width: 105px; }
  .ranking-table .stat-col { width: 75px; }
  .ranking-table .attempt-col { width: 65px; }
}
@media (max-width: 620px) {
  .workspace .wrap, .workspace .header-inner, .workspace .site-footer { padding-inline: 16px; }
  .access-inner { padding-inline: 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .workspace .site-header { height: 58px; }
  .workspace .brand { font-size: 16px; gap: 7px; }
  .workspace .brand svg { width: 22px; height: 22px; }
  .workspace .site-header nav { gap: 16px; font-size: 12px; }
  .workspace .site-header nav a { padding-block: 12px; }
  .page-intro { flex-direction: column; align-items: flex-start; gap: 15px; padding: 26px 0 20px; }
  .page-intro h1 { font-size: 26px; letter-spacing: -.7px; }
  .page-intro .eyebrow { font-size: 8px; }
  .workspace input[type="search"] { width: 100%; }
  .workspace .section-heading { gap: 13px; align-items: flex-start; }
  .workspace .segmented { width: 100%; }
  .workspace .segmented button { flex: 1; padding: 9px 8px; }
  .download-link { min-height: 40px; }
  .scroll-hint, .workspace .board-caption { font-size: 11px; }
  .workspace .board-caption { flex-direction: column; gap: 6px; }
  /* Each model row becomes a card: name and score, the bar, then labeled stats. */
  .ranking-scroll { padding-inline: 14px; }
  .ranking-table, .ranking-table tbody, .ranking-table tr, .ranking-table tbody th, .ranking-table tbody td { display: block; }
  .ranking-table { min-width: 0; }
  .ranking-table colgroup, .ranking-table thead, .ranking-table tfoot, .ranking-table tbody td:nth-child(7) { display: none; }
  .ranking-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "model model score" "bar bar bar" "correct gain reasoning"; column-gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .ranking-table tbody tr:last-child { border-bottom: 0; }
  .ranking-table tbody th, .ranking-table tbody td { height: auto; padding: 0; border: 0; }
  .ranking-table tbody th { grid-area: model; }
  .ranking-table tbody td:nth-child(2) { grid-area: bar; }
  .ranking-table tbody td:nth-child(3) { grid-area: score; align-self: center; }
  .ranking-table tbody td:nth-child(4) { grid-area: correct; }
  .ranking-table tbody td:nth-child(5) { grid-area: gain; }
  .ranking-table tbody td:nth-child(6) { grid-area: reasoning; }
  .ranking-table tbody td:nth-child(n+4) { text-align: left; font-size: 13px; color: var(--text); }
  .ranking-table tbody td:nth-child(n+4)::before { display: block; margin-bottom: 2px; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); }
  .ranking-table tbody td:nth-child(4)::before { content: "Correct"; }
  .ranking-table tbody td:nth-child(5)::before { content: "ADP gain"; }
  .ranking-table tbody td:nth-child(6)::before { content: "Reasoning"; }
  .ranking-table .reasoning-stat span { white-space: normal; }
  .ranking-table .comparison-bar { padding: 8px 0 12px; min-height: 0; }
  .ranking-table .model-button { font-size: 14px; }
  /* Operators fit the screen when there are few; more columns scroll with the model pinned. */
  .workspace .matrix-table { min-width: calc(var(--problems, 4) * 84px + 150px); }
  .workspace .matrix-table th:first-child { width: 120px; }
  .workspace .matrix-table th.correct-heading { width: 56px; }
  .workspace .matrix-table th { font-size: 10px; padding-inline: 4px; }
  .matrix-table .model-label { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Compact problem library; native disclosure controls support keyboard access. */
.workspace .problem-grid { gap: 8px; }
.workspace .problem-accordion { padding: 0; }
.problem-accordion > .problem-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  min-height: 58px;
  list-style: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-lg);
}
.problem-toggle::-webkit-details-marker { display: none; }
.problem-toggle:hover { background: var(--soft); }
.problem-number { font-size: 11px; color: var(--accent); font-variant-numeric: tabular-nums; }
.problem-title { flex: 1; font-weight: var(--weight-strong); }
.problem-chevron { color: var(--muted); font-size: 20px; line-height: 1; width: 16px; text-align: center; }
.problem-accordion[open] > .problem-toggle { border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.problem-accordion[open] > .problem-toggle .problem-chevron { transform: rotate(45deg); }
.problem-content { padding: 22px 24px; }
@media (max-width: 620px) {
  .problem-accordion > .problem-toggle { gap: 10px; padding: 14px 12px; font-size: 12px; }
  .problem-toggle .badge { font-size: 8px; padding: 4px; }
  .problem-content { padding: 18px 14px; }
}

.evaluation-notes { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 18px; }
.evaluation-notes summary { cursor: pointer; }
.evaluation-notes p { max-width: 920px; margin-top: 12px; }
