/* LLM Forensics site — plain CSS, light/dark via tokens. */
:root {
  color-scheme: light;
  --bg: #fcfcfb; --surface: #ffffff; --surface-2: #f3f3f1; --border: #e3e2de;
  --text: #16161a; --text-2: #52514e; --muted: #7a7974;
  --accent: #2a78d6; --accent-ink: #1d5fae; --hl: #eb6834;
  --good: #1f7a3d; --good-bg: #e3f3e8; --bad: #b42b2b; --bad-bg: #fbe5e4; --part: #8a5a00; --part-bg: #fbf0d8;
  --grid: #ebeae6; --mark-bg: #fff2b3;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131312; --surface: #1a1a19; --surface-2: #232321; --border: #33332f;
    --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e86;
    --accent: #3987e5; --accent-ink: #79adf0; --hl: #d95926;
    --good: #6fd08f; --good-bg: #173322; --bad: #f08a87; --bad-bg: #3a1a1a; --part: #f0c060; --part-bg: #3a2e12;
    --grid: #2a2a27; --mark-bg: #5a4a00;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131312; --surface: #1a1a19; --surface-2: #232321; --border: #33332f;
  --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e86;
  --accent: #3987e5; --accent-ink: #79adf0; --hl: #d95926;
  --good: #6fd08f; --good-bg: #173322; --bad: #f08a87; --bad-bg: #3a1a1a; --part: #f0c060; --part-bg: #3a2e12;
  --grid: #2a2a27; --mark-bg: #5a4a00;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
pre { background: var(--surface-2); padding: 10px 12px; border-radius: 6px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
mark { background: var(--mark-bg); color: inherit; padding: 0 2px; border-radius: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 12px; }
.brand { font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
nav { display: flex; gap: 16px; align-items: center; font-size: 14px; }
nav a { color: var(--text-2); }
#theme { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 6px; width: 32px; height: 28px; cursor: pointer; font-size: 15px; }
main { padding: 24px 16px 48px; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin: 8px 0 16px; }
h2 { font-size: 19px; margin: 36px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 16px; margin: 0 0 4px; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); margin: 16px 0 6px; }
h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.hero { padding: 24px 0 4px; }
.hero h1 { font-size: 34px; max-width: 20ch; }
.lede { font-size: 17px; color: var(--text-2); max-width: 68ch; }
.hint { color: var(--muted); font-size: 13px; }
.crumbs { margin: 0; font-size: 14px; }
.callout { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.callout.warn { border-color: color-mix(in srgb, var(--part) 40%, transparent); background: var(--part-bg); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.badge.ex { background: var(--part-bg); color: var(--part); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub { font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cond { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.cond-weights-only::before { content: "◇ "; } .cond-with-base::before { content: "◆ "; }
.pips { display: inline-flex; gap: 3px; }
.pip { display: inline-block; min-width: 20px; text-align: center; font: 600 11px/18px var(--mono); border-radius: 4px; padding: 0 4px; }
.pip-yes { background: var(--good-bg); color: var(--good); }
.pip-no { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.pip-na { background: var(--surface-2); color: var(--muted); }
.c-na { color: var(--muted); font-size: 12px; }
.st { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.st-yes { background: var(--good-bg); color: var(--good); }
.st-no { background: var(--bad-bg); color: var(--bad); }
.st-part { background: var(--part-bg); color: var(--part); }
.st-na { color: var(--muted); }
.st-run { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink); }
.st-dim { background: var(--surface-2); color: var(--text-2); }
.card h2 .st { vertical-align: middle; margin-left: 6px; }
.files { font-size: 13.5px; }
td.eff { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
code.tok { background: var(--surface-2); padding: 0 4px; border-radius: 3px; }
.guess { white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px 18px 14px; }
.card h2 { margin-top: 14px; }
.card + .card, .scroll + .card { margin-top: 16px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tv { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tl { font-size: 12.5px; color: var(--text-2); }
.kvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
table.kv th { font-weight: 500; font-family: var(--mono); font-size: 12.5px; }
td.gen { font-family: var(--mono); font-size: 12.5px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
figcaption { font-size: 13px; color: var(--text-2); margin-top: 6px; }
svg.chart { width: 100%; height: auto; display: block; font-family: var(--sans); }
svg .grid { stroke: var(--grid); stroke-width: 1; }
svg .baseline { stroke: var(--muted); stroke-width: 1; }
svg .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
svg .annot { fill: var(--text-2); font-size: 11.5px; font-weight: 600; }
svg .annot.gt { fill: var(--hl); }
svg .bar { fill: var(--accent); opacity: 0.55; }
svg .bar.hl { opacity: 1; }
svg .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
svg .dot.hl { fill: var(--hl); }
svg .gtline { stroke: var(--hl); stroke-width: 1.5; }
svg .thresh { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
svg .hit { fill: transparent; }
svg .hov:hover .bar, svg .hov:hover .dot { opacity: 1; filter: brightness(1.15); }
.detector { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; }
.notes { color: var(--text-2); font-size: 14px; }
.edit { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.edit-h { font-size: 14px; margin-bottom: 8px; word-break: break-word; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
ol.cands { margin: 0; padding-left: 22px; font-size: 14px; }
ol.cands li.good { color: var(--good); font-weight: 600; }
.score { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.transcript > summary { padding: 6px 0; }
.msgs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--border); }
.msg { font-size: 13.5px; margin: 0; }
.msg .who { display: inline-block; min-width: 70px; font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; }
.msg .txt { display: inline; white-space: pre-wrap; }
.msg.tool code { word-break: break-all; }
.msg.result summary, .msg.think summary, .msg.sys summary { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.msg pre { margin: 4px 0 0; max-height: 320px; overflow: auto; }
.defs dt { font-weight: 600; margin-top: 10px; }
.defs dd { margin: 2px 0 0; color: var(--text-2); max-width: 75ch; }
.meta { margin-top: 28px; }
.foot { color: var(--muted); font-size: 12.5px; padding-bottom: 32px; }
@media (max-width: 640px) {
  .hero h1 { font-size: 26px; } h1 { font-size: 22px; }
  nav { gap: 10px; } nav a:nth-child(2) { display: none; }
  .cgrid { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
}
/* gpu-monitor.html */
svg.spark { display: block; overflow: visible; }
svg.spark .line { stroke-width: 1.5; }
.tv-s { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.gm-chart { position: relative; }
svg .xhair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; top: 0; min-width: 120px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 12.5px; color: var(--text-2); pointer-events: none; white-space: nowrap; }
.tip strong { color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.filters select { font: inherit; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; margin-left: 4px; }
tr.gm-fail > * { background: var(--bad-bg); }
tr.gm-retry > * { background: var(--part-bg); }
.gm-err { font-family: var(--mono); font-size: 12.5px; color: var(--bad); }
td.gm-bad { color: var(--bad); font-weight: 600; }
#gm-boxes tbody th code { white-space: nowrap; }

/* held-out.html: a row where the analyst found an edit the scanner missed */
tr.hl > th, tr.hl > td { background: color-mix(in srgb, var(--hl) 14%, transparent); }
/* held-out.html: rendered markdown reports and turn-by-turn expandable traces */
.md { margin-top: 8px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; line-height: 1.55; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1 { font-size: 17px; margin: 16px 0 8px; }
.md h2 { font-size: 15.5px; margin: 16px 0 6px; border-bottom: 1px solid var(--border); padding-bottom: 3px; }
.md h3 { font-size: 14px; margin: 14px 0 4px; color: var(--text-2); }
.md h4, .md h5, .md h6 { font-size: 13px; margin: 10px 0 4px; color: var(--text-2); text-transform: none; letter-spacing: 0; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 6px 0; padding-left: 22px; }
.md li + li { margin-top: 3px; }
.md code { background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.md pre { margin: 6px 0; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 8px 0; padding: 2px 12px; border-left: 3px solid var(--border); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.md .scroll { margin: 8px 0; }
.md details.md-fold { margin: 6px 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); padding: 4px 10px; }
.md details.md-fold > summary { font-weight: 500; font-size: 13px; color: var(--accent-ink); }
.md .md-fold-body { margin-top: 6px; }
.md-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 8px; font-size: 12.5px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.trace-meta { margin: 4px 0 8px; font-size: 13px; color: var(--text-2); }
.turns { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.turn { position: relative; background: var(--bg); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; overflow: hidden; }
.turn-claude { border-left-color: var(--accent); }
.turn-tool { border-left-color: var(--muted); }
.turn-result { border-left-color: var(--good); }
.turn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12px; }
.turn-num { font-family: var(--mono); font-weight: 600; color: var(--muted); margin-right: 6px; }
.turn-who { font-family: var(--mono); font-weight: 600; color: var(--text); }
.turn-badge { display: inline-block; font-family: var(--mono); font-size: 11.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.turn-actions { font-size: 12px; color: var(--muted); white-space: nowrap; }
.turn-body.md { margin: 0; border: 0; border-radius: 0; padding: 8px 12px; background: transparent; }
.turn.is-clamped .turn-body { max-height: 175px; overflow: hidden; }
.turn-more { display: none; }
.turn.is-clamped .turn-more { display: flex; justify-content: center; align-items: flex-end; position: absolute; left: 0; right: 0; bottom: 0; height: 52px; padding-bottom: 6px; font-size: 12.5px; background: linear-gradient(to bottom, transparent, var(--bg) 72%); }
/* gpu-monitor.html: data older than 5 minutes is greyed out (see gpu-monitor.js) */
.gm-stale #gm-tiles, .gm-stale section { opacity: 0.45; }
.links { padding-left: 22px; } .links li { margin: 8px 0; }
pre.raw { white-space: pre; overflow-x: auto; font: 12px/1.45 var(--mono); background: var(--surface-2); padding: 12px; border-radius: 6px; }
/* front-page results table */
.results td.res { min-width: 110px; vertical-align: top; }
.res-full { background: rgba(30, 150, 60, .26); }
.res-part { background: color-mix(in srgb, var(--good-bg) 45%, transparent); }
.res-miss { background: rgba(215, 45, 45, .22); }
.res-na { background: var(--surface-2); color: var(--muted); }
.res-v { font: 700 15px/1.3 var(--mono); letter-spacing: 2px; }
.res-full .res-v, .res-part .res-v { color: var(--good); }
.res-miss .res-v { color: var(--bad); }
.res-v .off { text-decoration: line-through; opacity: .45; }
.res-l { font-size: 12px; margin-top: 4px; }
.res-l a + a::before { content: "· "; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font: 600 11px/20px var(--mono); padding: 0 6px; border-radius: 4px; text-decoration: none; }
.chip.res-full, .chip.res-part { color: var(--good); }
.chip.res-miss { color: var(--bad); }
.hist { display: flex; gap: 2px; align-items: center; height: 100%; }
.hs { display: inline-block; width: 8px; height: 18px; border-radius: 2px; }
.hs-y { background: var(--good); }
.hs-n { background: var(--bad); opacity: .55; }
.hs-na { background: var(--surface-2); }
tr.beat > th, tr.beat > td:first-of-type { box-shadow: inset 4px 0 0 #d99a00; }
tr.beat > th { background: color-mix(in srgb, #ffcf4d 22%, transparent); }
.beat-tag { font-size: 11px; font-weight: 600; color: #a46f00; margin-top: 4px; }
@media (min-width: 1100px) { .wide { width: min(1560px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); } }
.results th[scope="row"] { white-space: nowrap; }
.results td:nth-child(2) { min-width: 210px; }
.res-part { background: rgba(150, 165, 40, .22); }
