* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
a { color: var(--accent); text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }
.mast { border-bottom: 1px solid var(--line); }
.mast-inner { display: flex; align-items: center; gap: clamp(.75rem, 2.3vw, 2rem); }
.mast-inner { min-height: 4.5rem; }
.mast a { color: var(--ink); text-decoration: none; }
.mast a:hover { color: var(--accent); text-decoration: underline; }
.brand { display: flex; align-items: center; gap: .55rem; font: 600 1.5rem var(--latin-display); }
.skip { position: absolute; top: -5rem; left: 1rem; z-index: 1; padding: .5rem; background: var(--surface); }
.skip:focus { top: .5rem; }
.hero { padding-block: clamp(2rem, 5vw, 4rem) 1.8rem; }
h1, h2, h3, p { margin: 0; }
h1 { font: 600 clamp(2.8rem, 7vw, 5.3rem)/1.08 var(--latin-display); letter-spacing: -.04em; }
h2 { font: 600 clamp(1.6rem, 3.5vw, 2.35rem)/1.22 var(--serif); }
h3 { margin-top: 1.65rem; font-size: 1.18rem; }
p { max-width: 83ch; margin-top: .6rem; }
.hero p, .note { color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: .5rem 1.7rem; margin-top: 1rem; }
main section { padding-block: clamp(1.6rem, 4vw, 3rem); }
.table-wrap { overflow-x: auto; margin-block: 1rem .8rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); text-align: start; }
thead th { background: var(--tint); color: var(--muted); font-size: .9rem; }
tbody th { font-weight: 550; }
.scores td, .scores thead th:not(:first-child) { text-align: end; }
.scores td { font: 600 clamp(1.15rem, 2.5vw, 1.55rem) var(--latin-display); }
.scores small { display: block; font: normal .88rem var(--sans); color: var(--muted); }
.comparison th { width: 19%; }
.comparison td { vertical-align: top; }
ol { padding-left: 1.5rem; max-width: 87ch; }
li { padding-inline-start: .3rem; margin: 1.2rem 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: .65rem 0; padding: .8rem 1rem; background: var(--tint); border-left: 3px solid var(--accent); }
code { font: .9em/1.55 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
@media (max-width: 42rem) {
 .mast-inner { flex-wrap: wrap; gap: .2rem .75rem; padding-block: .5rem; }
 .wrap { width: calc(100% - 2rem); }
 th, td { padding: .65rem .4rem; }
}
@media (max-width: 26rem) {
 .scores { font-size: .88rem; }
 .comparison th { width: 25%; }
}

.hero .snapshot { margin-top: 1rem; font-size: .9rem; }
.scores th:first-child { min-width: 10rem; }
.scores thead th, .case-results thead th { line-height: 1.35; }
.scores tbody th { font-weight: 650; }
.scores td:first-of-type { color: var(--accent); }
.table-wrap:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.protocol { margin: 1rem 0 0; }
.protocol summary { width: fit-content; color: var(--accent); cursor: pointer; }
.protocol ul { max-width: 87ch; margin: .5rem 0; padding-left: 1.3rem; }
.protocol li { margin: .45rem 0; }
.results-heading, .page-controls, .page-controls div { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; }
.filter-tools { margin-top: 1.4rem; }
.filter-tools label { display: block; font-size: .9rem; color: var(--muted); }
.filter-tools input, .page-controls button { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: .35rem; padding: .45rem .8rem; }
.filter-tools input { width: min(22rem,100%); margin-top: .35rem; }
.page-controls p { margin: 0; color: var(--muted); }
.page-controls button:enabled { cursor: pointer; }
.page-controls button:disabled { opacity: .5; }
.case-results { min-width: 60rem; }
.case-results tbody th { width: 28%; }
.case-results th a { color: var(--ink); text-decoration: none; }
.case-results th a:hover span { text-decoration: underline; }
.case-results th strong { display: block; color: var(--muted); font: .8rem/1.4 ui-monospace,Consolas,monospace; }
.case-results td, .case-results thead th:not(:first-child) { text-align: center; }
.case-results {
  --valid-ink: #18583e;
  --valid-fill: #e1f2e7;
  --valid-line: #83b69a;
  --invalid-ink: #8d3140;
  --invalid-fill: #fae6e7;
  --invalid-line: #d29a9f;
}
html[data-theme="ink"] .case-results {
  --valid-ink: #b1ebc9;
  --valid-fill: #233e32;
  --valid-line: #537b63;
  --invalid-ink: #ffc4c8;
  --invalid-fill: #482b30;
  --invalid-line: #97616a;
}
.case-results .verdict {
  display: inline-flex;
  align-items: center;
  gap: .36em;
  padding: .21em .66em;
  border: 1px solid var(--badge-line, var(--line));
  border-radius: 999px;
  background: var(--badge-fill, var(--tint));
  color: var(--badge-ink, var(--ink));
  font: 600 .84rem/1.35 var(--sans);
  white-space: nowrap;
  vertical-align: middle;
}
.verdict.pass {
  --badge-ink: var(--valid-ink);
  --badge-fill: var(--valid-fill);
  --badge-line: var(--valid-line);
}
.verdict.fail {
  --badge-ink: var(--invalid-ink);
  --badge-fill: var(--invalid-fill);
  --badge-line: var(--invalid-line);
}
.verdict:is(.pass, .fail)::before {
  content: "";
  flex: none;
  width: .82em;
  height: .82em;
  background: currentColor;
}
.verdict.pass::before {
  clip-path: polygon(0 51%, 15% 36%, 39% 60%, 85% 9%, 100% 23%, 40% 90%);
}
.verdict.fail::before {
  clip-path: polygon(13% 0, 50% 37%, 87% 0, 100% 13%, 63% 50%, 100% 87%, 87% 100%, 50% 63%, 13% 100%, 0 87%, 37% 50%, 0 13%);
}
@media (forced-colors: active) {
  .case-results .verdict { border-color: CanvasText; }
  .case-results .verdict::before { forced-color-adjust: none; color: CanvasText; }
}
[hidden] { display: none !important; }

.case-results thead tr:nth-child(2) th { text-align: center; }
.case-results thead th, .case-results td { padding-inline: .6rem; }
@media (max-width: 62rem) {
  .case-results tbody th, .case-results thead th[rowspan] {
    position: sticky;
    left: 0;
    background: var(--paper);
    border-right: 1px solid var(--line);
  }
  .case-results thead th[rowspan] { background: var(--tint); }
  .case-results tbody th { width: min(36vw, 16rem); }
}


/* Modeling results share a 0–100% scale across direct calls and agents. */
.model-scores { table-layout: fixed; }
.model-scores .model-col { width: 34%; }
.model-scores .rate-col { width: 40%; }
.model-scores .count-col { width: 13%; }
.model-scores .model-identity {
  display: flex;
  align-items: center;
  gap: .78rem;
}
.model-scores .model-logo {
  box-sizing: border-box;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  padding: .45rem;
  border: 1px solid #d6cfc4;
  border-radius: .6rem;
  background: #fffdf9;
  object-fit: contain;
}
.model-scores .model-label { min-width: 0; overflow-wrap: anywhere; }
.model-scores .model-label small { margin-top: .14rem; line-height: 1.3; }
.model-scores .model-mode { white-space: nowrap; }
.model-scores thead th.rate-heading { text-align: start; }
.model-scores .rate-cell {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.model-scores .rate-track {
  flex: 1;
  height: .55rem;
  background: var(--tint);
  border-radius: 1rem;
  overflow: hidden;
}
.model-scores .rate-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.model-scores .rate-value {
  min-width: 5.4ch;
  text-align: end;
  font: 650 1.05rem/1.25 var(--sans);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 42rem) {
  .model-scores .model-col { width: 43%; }
  .model-scores .rate-col { width: 25%; }
  .model-scores .count-col { width: 16%; }
  .model-scores th:first-child { min-width: 0; }
  .model-scores thead th { overflow-wrap: anywhere; }
  .model-scores .model-identity { gap: .4rem; }
  .model-scores .model-logo { width: 1.72rem; height: 1.72rem; padding: .25rem; border-radius: .4rem; }
  .model-scores .model-label { line-height: 1.35; }
  .model-scores .model-label small { font-size: .75rem; }
  .model-scores .rate-cell { flex-direction: column-reverse; align-items: stretch; gap: .35rem; }
  .model-scores .rate-value { min-width: 0; text-align: start; font-size: .93rem; }
  .model-scores .rate-track { flex: none; height: .38rem; }
}
@media (forced-colors: active) {
  .model-scores .rate-track { outline: 1px solid CanvasText; }
  .model-scores .rate-fill { forced-color-adjust: none; background: Highlight; }
}

/* Dataset solving rates use one common scale across the figure. */
.solve-chart {
  --bar-color: #7496b5;
  --plot-height: clamp(12rem, 22vw, 16rem);
  --axis-width: 2.9rem;
  --headroom: 2rem;
  margin: 1.4rem 0 0;
  padding: clamp(.9rem, 2.4vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}
html[data-theme="ink"] .solve-chart { --bar-color: #6485a4; }
.solve-chart figcaption { color: var(--ink); font-weight: 650; }
.solve-chart-frame {
  position: relative;
  margin-top: .65rem;
  padding: var(--headroom) 0 0 var(--axis-width);
}
.solve-chart-axis {
  position: absolute;
  inset: var(--headroom) 0 auto var(--axis-width);
  height: var(--plot-height);
  pointer-events: none;
}
.solve-chart-tick {
  position: absolute;
  inset-inline: 0;
  bottom: var(--tick);
  border-top: 1px dashed var(--line);
}
.solve-chart-tick:first-child { border-top-style: solid; }
.solve-chart-tick span {
  position: absolute;
  right: calc(100% + .55rem);
  transform: translateY(-50%);
  font: 500 .74rem/1 var(--sans);
  color: var(--muted);
}
.solve-chart-data {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.solve-chart-data > li {
  display: grid;
  grid-template-rows: var(--plot-height) auto;
  margin: 0;
  padding: 0;
  text-align: center;
}
.solve-chart-name {
  grid-row: 2;
  margin-top: .65rem;
  color: var(--ink);
  font-size: clamp(.75rem, 1.2vw, .94rem);
  font-weight: 580;
  line-height: 1.35;
}
.solve-chart-measure { position: relative; grid-row: 1; }
.solve-chart-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(58%, 4.2rem);
  height: var(--rate);
  transform: translateX(-50%);
  background: var(--bar-color);
  border-radius: .3rem .3rem 0 0;
}
.solve-chart-logo {
  display: block;
  margin: .48rem auto 0;
  width: 1.7rem;
  height: 1.7rem;
  padding: .23rem;
  border-radius: 50%;
  background: #fffdf9;
}
.solve-chart-value {
  position: absolute;
  left: 50%;
  bottom: var(--rate);
  margin-bottom: .28rem;
  padding-inline: .12rem;
  background: var(--surface);
  transform: translateX(-50%);
  color: var(--ink);
  font: 650 clamp(.9rem, 1.6vw, 1.18rem)/1.2 var(--sans);
  white-space: nowrap;
}
.solve-chart-home .solve-chart-bar { background: var(--accent); }
.solve-chart-home .solve-chart-name, .solve-chart-home .solve-chart-value {
  color: var(--accent);
  font-weight: 750;
}
@media (max-width: 46rem) {
  .solve-chart { padding: .9rem .8rem 1.05rem; }
  .solve-chart-frame { margin-top: 1rem; padding: 0; }
  .solve-chart-axis { display: none; }
  .solve-chart-data { grid-template-columns: 1fr; gap: .6rem; }
  .solve-chart-data > li {
    grid-template: 1.55rem / 5.25rem minmax(0, 1fr);
    gap: .5rem;
    align-items: center;
    text-align: start;
  }
  .solve-chart-name { grid-area: 1 / 1; margin: 0; font-size: .81rem; }
  .solve-chart-measure {
    grid-area: 1 / 2;
    height: 1.55rem;
    margin-right: 3.45rem;
    background: var(--tint);
    border-radius: 0 .25rem .25rem 0;
  }
  .solve-chart-bar {
    left: 0;
    width: var(--rate);
    height: 100%;
    transform: none;
    border-radius: 0 .25rem .25rem 0;
  }
  .solve-chart-logo { width: 1.2rem; height: 1.2rem; margin: .175rem .2rem 0 auto; padding: .14rem; }
  .solve-chart-value {
    top: 50%; right: -3.45rem; bottom: auto; left: auto;
    margin: 0;
    transform: translateY(-50%);
    font-size: .85rem;
  }
}
@media (forced-colors: active) {
  .solve-chart-bar { forced-color-adjust: none; background: Highlight; }
  .solve-chart-logo { forced-color-adjust: none; }
}

/* Domain summary and problem browser */
.category-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .7rem 1.25rem; }
.category-heading h3 { margin: 0; }
.category-overview { margin-top: 1.45rem; }
.category-model, .category-note { color: var(--muted); font-size: .9rem; }
.category-model select, #problem-domain {
  max-width: 100%; padding: .45rem .6rem; border-radius: .35rem; border: 1px solid var(--line);
  font: inherit; background: var(--surface); color: var(--ink);
}
.category-model select { margin-inline-start: .45rem; }
.category-note { margin: .5rem 0 .85rem; }
.category-summary { table-layout: fixed; }
.category-summary thead th:first-child { width: 42%; }
.category-summary thead th:nth-child(2) { width: 38%; }
.category-summary thead th:last-child { width: 20%; text-align: end; }
.category-summary thead th { text-wrap: balance; }
.category-summary th, .category-summary td { padding-block: .48rem; }
.category-jump { font-weight: 600; text-decoration-thickness: 1px; }
.category-rate { display: flex; align-items: center; gap: .8rem; }
.category-track { flex: 1; height: .38rem; background: var(--tint); border-radius: 1rem; overflow: hidden; }
.category-track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.category-value { min-width: 5.4ch; color: var(--ink); text-align: end; font-weight: 650; }
#case-list-title { margin-top: 2rem; scroll-margin-top: 1rem; }
#problems .filter-tools { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem 1.25rem; margin-top: .6rem; }
#problem-domain { margin-top: .35rem; }
.case-results .domain-heading th {
  position: static; width: auto; border-right: 0; padding: .48rem .7rem;
  background: var(--tint); color: var(--ink); font-weight: 650; text-align: start;
}
@media (max-width: 42rem) {
  .category-model { display: grid; gap: .25rem; }
  .category-model select { margin: 0; }
  .category-summary th, .category-summary td { padding: .48rem .35rem; }
  .category-summary { font-size: .87rem; }
  .category-summary thead th:first-child { width: 43%; }
  .category-summary thead th:nth-child(2) { width: 31%; }
  .category-summary thead th:last-child { width: 26%; }
  .category-rate { gap: .35rem; }
  #problems .filter-tools { align-items: stretch; }
  #problems .filter-tools > div { flex: 1 1 11rem; min-width: 0; }
  #problem-domain, #problem-search { width: 100%; }
}
