/* KoBALT-700 benchmark record — document style.
   White paper, near-black ink, one accent. Serif title, system sans body. */

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --muted: #545454;
  --line: #d8d8d8;
  --accent: #0f5b8f;
  --accent-dark: #0a4066;
  --track: #ececec;
  --note-bg: #f6f6f6;
  --max-measure: 46rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.measure {
  max-width: var(--max-measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Masthead */
.masthead {
  border-bottom: 2px solid var(--ink);
  padding: 1.5rem 0 1rem;
}
.masthead .site-title {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 0.15rem;
}
.masthead .site-title a {
  color: var(--ink);
  text-decoration: none;
}
.masthead .site-title a:hover { text-decoration: underline; }
.masthead .standfirst {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-nav {
  border-bottom: 1px solid var(--line);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.55rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
  font-size: 0.95rem;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Article */
h1 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}
h2 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}
h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
main { padding: 1.75rem 0 1rem; }
main section { margin-bottom: 2rem; }
section > p, li > p { max-width: 100%; }
p { margin: 0 0 0.85rem; }
.small { font-size: 0.88rem; color: var(--muted); }
.meta-line { font-size: 0.92rem; color: var(--muted); }
.status { font-size: 0.92rem; color: var(--muted); }
.status.error { color: #8c1d18; }

.caveat {
  background: var(--note-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
}
.caveat p { margin: 0; }

ul.tight, ol.tight { padding-left: 1.3rem; }
ul.tight li, ol.tight li { margin-bottom: 0.35rem; }

/* Findings */
.findings {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.findings li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.findings li:last-child { border-bottom: 2px solid var(--ink); }

/* Figures and charts */
figure { margin: 1rem 0; }
.chart-block figcaption,
figcaption.caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.chart-error {
  font-size: 0.92rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 0.75rem 1rem;
}

/* Ruled tables */
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 0.4rem;
}
thead th {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
}
th, td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
td.num, th.num { text-align: right; white-space: nowrap; }
/* Comparison tables carry seven columns; slightly tighter padding keeps
   them inside the measure on desktop. Smaller screens use the scroll region. */
table.compare th, table.compare td { padding: 0.4rem 0.45rem; }
/* Accuracy and count cells may wrap after their spaces so 7-column
   comparison tables fit the measure; the CI token itself never breaks. */
td.num.soft { white-space: normal; }
tr.tier-head th {
  background: var(--note-bg);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--ink);
}
.run-id { font-size: 0.82rem; color: var(--muted); overflow-wrap: break-word; }

/* Run archive entries */
.run-entry {
  border-top: 2px solid var(--ink);
  padding-top: 0.75rem;
  margin-bottom: 1.75rem;
}
.run-entry h2 { font-size: 1.2rem; overflow-wrap: break-word; }
.run-entry dl.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0.5rem 0;
  font-size: 0.92rem;
}
.run-entry dl.facts dt { color: var(--muted); }
.run-entry dl.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}

/* Disclosures */
details.disclosure {
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--line);
}
details.disclosure summary {
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  font-size: 0.92rem;
}
details.disclosure .table-scroll { padding: 0 0.9rem 0.9rem; }
details.subdued { color: var(--muted); font-size: 0.9rem; }

/* Ablation panels */
.ablation {
  border-top: 2px solid var(--ink);
  padding-top: 0.6rem;
  margin: 1rem 0 1.5rem;
}
.ablation h3 { overflow-wrap: break-word; }
.ablation .delta { font-weight: 700; }
.ablation-note { font-size: 0.9rem; color: var(--muted); }

/* Technical blocks */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}
pre {
  background: var(--note-bg);
  border: 1px solid var(--line);
  padding: 0.8rem 1rem;
  overflow-x: auto;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.prompt-caption { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }

/* Footer */
.site-footer {
  border-top: 2px solid var(--ink);
  margin-top: 1rem;
  padding: 1rem 0 2.5rem;
}

/* Deferred reveal (CLS guard): while .js is set and body lacks .is-ready,
   dynamic regions stay out of layout entirely, so async insertion of tables
   and charts cannot shift painted content. charts.js adds .is-ready once
   content — or an error message — is rendered. Without JS the .js class is
   never set, so everything stays visible exactly as before. */
.js .defer { display: none; }
body.is-ready .defer { display: block; }

/* Wider screens */
@media (min-width: 46rem) {
  h1 { font-size: 2.2rem; }
  .masthead .site-title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
