/* TB2.1 annotated, over tokens.css (atif-scan's copy of fast-agent's forward palette).
   Quiet by default: numbers where they're the point, colour only where something is wrong. */
:root { --voice-f: "Fraunces", Georgia, serif; --read-f: "Figtree", system-ui, sans-serif; --code-f: "DM Mono", ui-monospace, monospace;
  --sq: 7px; --gap: 1px; --hl-c: #b3261e; --hl-h: #e0612a; --hl-m: #6f8f96; --radius: 12px; }
[data-theme="dark"] { --hl-c: #ff7d70; --hl-h: #ffa45c; --hl-m: #9cc0c4; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--read-f); }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
button, input { font: inherit; }
button { border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); padding: 4px 10px; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
h1, h2 { font-family: var(--voice-f); letter-spacing: -.03em; }
h3 { font: 800 11.5px/1.4 var(--read-f); letter-spacing: var(--track-label); text-transform: uppercase; margin: 18px 0 6px; color: var(--muted); }

/* Masthead. */
.masthead { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 28px; background: var(--bg); border-bottom: 2px solid var(--line); }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.wordmark { font: 900 24px/1 var(--voice-f); letter-spacing: -.03em; }
.product { font-family: var(--code-f); color: var(--muted); }
.topnav { display: flex; gap: 20px; align-items: center; font-weight: 650; font-size: 14px; }
.topnav a { text-decoration: none; }
.topnav a[aria-current="page"], .topnav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
main { max-width: 1680px; margin: auto; padding: 0 28px 40px; }
.foot { max-width: 1680px; margin: auto; padding: 16px 28px 36px; font-size: 12.5px; color: var(--muted); }

/* Hero. */
.hero { padding: 26px 0 8px; max-width: 980px; }
.hero h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.02; font-weight: 900; margin: 0 0 12px; }
.hero h1 em { color: var(--accent-ink); }
.lede { font-size: 17px; margin: 0; color: var(--muted); }
.lede-sm { margin: 0 0 12px; color: var(--muted); max-width: 760px; }

/* Attempt squares. */
.strip { display: flex; gap: var(--gap); }
.strip--lg { --sq: 9px; --gap: 2px; }
.col { display: flex; flex-direction: column; gap: var(--gap); }
.sq { display: block; width: var(--sq); height: var(--sq); border-radius: 1.5px; background: var(--inset); flex: none; }
.sq--1 { background: var(--accent); }
.sq--0 { background: var(--line-soft); }
.sq--t { background: #a7a092; }
.sq--e { background: transparent; box-shadow: inset 0 0 0 1.2px var(--hl-h); }
.sq--c { background: linear-gradient(135deg, var(--hl-c) 50%, var(--accent) 50%); }
.sq--h { background: linear-gradient(135deg, var(--hl-h) 50%, var(--accent) 50%); }
.sq--m { background: linear-gradient(135deg, var(--hl-m) 40%, var(--accent) 40%); }
.sq--0.sq--c, .sq--0.sq--h, .sq--0.sq--m, .sq--t.sq--c, .sq--t.sq--h, .sq--t.sq--m, .sq--e.sq--c, .sq--e.sq--h, .sq--e.sq--m { --accent: var(--line-soft); }
a.sq:hover { outline: 2px solid var(--ink); }

/* Row page. */
.row-head { padding: 28px 0 12px; }
.kicker { margin: 0; font: 750 11px/1.4 var(--read-f); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--accent-ink); }
.row-head h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; font-weight: 900; margin: 6px 0 8px; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; color: var(--muted); font-size: 14px; }
.row-meta .harness { margin-right: 0; }
.ext { font-weight: 650; font-size: 13.5px; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.stat { padding: 14px 18px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: 0; }
.stat-label { display: block; font: 800 10.5px/1.3 var(--read-f); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font: 800 26px/1.15 var(--read-f); letter-spacing: -.02em; margin-top: 4px; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat--hot b { color: var(--hl-c); }
.stats--sm { border-width: 1px; margin: 10px 0; }
.stats--sm .stat { padding: 10px 14px; }
.stats--sm .stat b { font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; text-decoration: none; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn:hover { background: var(--inset); color: var(--ink); }
.strip-wrap { padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--card); overflow-x: auto; }
.strip-wrap p { margin: 0 0 8px; }
.panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.pcol { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.panel { padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--card); scroll-margin-top: 70px; }
.panel h2 { font-size: 24px; margin: 0 0 4px; }
.checks, .models, .trial-list { list-style: none; padding: 0; margin: 0; }
.checks li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.count { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.models li { display: grid; grid-template-columns: minmax(150px, auto) 1fr auto; gap: 10px; align-items: center; padding: 4px 0; }
.models code { font: 12.5px var(--code-f); }
.models li.off code { color: var(--danger); font-weight: 700; }
.models .bar { width: 100%; }
.models li.off .bar i { background: var(--hl-c); }
.rz-line { margin: 4px 0 6px; }
.source-note { font-size: 13.5px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--inset); border-radius: 0 8px 8px 0; }
.holes { margin: 8px 0; }
details.trials { border-bottom: 1px solid var(--line-soft); }
details.trials summary { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 14px; }
details.trials summary .label { font-weight: 650; }
.trial-list { max-height: 320px; overflow: auto; margin: 0 0 8px; }
.trial-list li { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; }
.trial-list .sq { width: 10px; height: 10px; }
.trial-list small { color: var(--muted); }
.trial-list .full { font-size: 12px; font-weight: 700; }

.tip { position: fixed; z-index: 20; pointer-events: none; display: flex; flex-direction: column; gap: 1px; max-width: 320px;
  padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); font-size: 12.5px; box-shadow: 0 6px 20px rgba(8, 44, 52, .18); }
.tip strong { font-family: var(--code-f); font-size: 12px; }

@media (max-width: 1000px) {
  .board-head { display: none; }
  .board-head, .board, .legend { min-width: 0; }
  .brow { grid-template-columns: 26px 1fr; }
  .brow .strip, .brow .score, .brow .review, .brow .trace { grid-column: 2; }
  .panels { grid-template-columns: 1fr; }
  .masthead, main { padding-left: 14px; padding-right: 14px; }
}

/* Section nav and blocks. */
.subnav { position: sticky; top: 46px; z-index: 4; display: flex; gap: 18px; padding: 8px 0; background: var(--bg); border-bottom: 1px solid var(--line-soft); font-weight: 700; font-size: 13.5px; }
.subnav a { text-decoration: none; color: var(--muted); }
.subnav a:hover { color: var(--ink); }
.block { margin-top: 30px; scroll-margin-top: 96px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.block-head h2 { font-size: 26px; margin: 0; }
.tools { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.scroll { overflow-x: auto; border-top: 2px solid var(--line); }
.key { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.9; }
.key .sq { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin: 0 3px 0 8px; }

/* Dense tables. */
.grid { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: 5px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.grid .l { text-align: left; }
.grid .c { text-align: center; }
.grid thead th { position: sticky; top: 0; background: var(--bg); font: 750 10.5px/1.25 var(--read-f); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; white-space: normal; border-bottom: 1.5px solid var(--line); }
.grid thead th.sortable { cursor: pointer; } .grid thead th.sortable:hover, .grid thead th.sorted { color: var(--ink); }
.grid thead th.sorted::after { content: " ↕"; }
.grid tbody tr:hover > * { background-color: color-mix(in srgb, var(--inset) 70%, transparent); }
.grid .rowh { position: sticky; left: 0; z-index: 1; background: var(--bg); text-align: left; min-width: 250px; }
.grid thead .rowh { z-index: 2; }
.rk { display: inline-block; width: 22px; font: 600 12px var(--code-f); color: var(--muted); }
.rname { font-weight: 750; text-decoration: none; }
.rname:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.harn { color: var(--muted); font-size: 12px; margin-left: 6px; }
.grid a { text-decoration: none; font-weight: 650; }
.grid a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.n { font-variant-numeric: tabular-nums; }
.big { font-weight: 800; font-size: 14.5px; }
.pm { color: var(--muted); font-size: 11px; margin-left: 4px; }
.z { color: var(--line-soft); }
.hot, a.hot { color: var(--danger); }
.bad, a.bad { color: var(--danger); font-weight: 700; }
.vis { white-space: nowrap; }
.vis .bar { display: inline-block; width: 54px; height: 5px; border-radius: 3px; background: var(--line-soft); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.vis .bar i { display: block; height: 100%; background: var(--ink); }
.notes { white-space: normal; min-width: 220px; font-size: 12px; }
.fl { display: inline-block; margin-right: 10px; font-weight: 650; }
.fl::before { content: "▸ "; }
.fl--bad { color: var(--danger); } .fl--warn { color: var(--accent-ink); } .fl--note { color: var(--muted); }
.flags { margin: 6px 0 0; font-size: 13px; }
/* Reasoning form: a word, coloured by how much of the reasoning the trace lacks. */
.rz { font-size: 12px; font-weight: 650; text-align: left !important; }
.rz--complete { color: var(--ok); } .rz--unknown, .rz--noReasoning { color: var(--muted); }
.rz--summary { color: var(--accent-ink); }
.rz--withheld, .rz--notKept, .rz--lost { color: var(--danger); }
/* Heat: one translucent hue per meaning; numbers stay ink. */
.heat { background: color-mix(in srgb, var(--hue) calc(var(--a, 0) * 42%), transparent); }
.heat--warm { --hue: var(--hl-h); } .heat--cool { --hue: var(--hl-m); } .heat--amber { --hue: var(--accent); }
.grid td small { display: block; color: var(--muted); font-size: 10.5px; line-height: 1.1; }
.models-cell .mdl { display: inline-block; margin-right: 8px; font: 11.5px var(--code-f); }
.models-cell .mdl.off { color: var(--danger); font-weight: 700; }
.models-cell.bad .mdl { color: var(--danger); font-weight: 700; }
.mlink { font-size: 11.5px; }
/* Checks matrix. */
.grid--checks .vh { height: 175px; width: 30px; padding: 4px 2px; text-align: center; }
.grid--checks .vh span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); text-transform: none; letter-spacing: 0; font: 650 11.5px var(--read-f); color: var(--ink); white-space: nowrap; }
.grid--checks .vh a { text-decoration: none; font-weight: 650; }
.grid--checks td { padding: 4px 3px; min-width: 30px; font-size: 12px; }
.grid--checks td small { display: inline; margin-left: 1px; }
.grid--checks .chk { min-width: 330px; white-space: normal; font-weight: 600; }
.grid tr.cat th { position: sticky; left: 0; text-align: left; padding-top: 12px; background: var(--bg); font: 800 10.5px/1.3 var(--read-f); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.sev { display: inline-block; width: 15px; height: 15px; margin-right: 7px; border-radius: 3px; font: 800 9.5px/15px var(--read-f); text-align: center; color: var(--paper); vertical-align: 1px; }
.sev--critical { background: var(--danger); } .sev--high { background: var(--hl-h); } .sev--medium { background: var(--line-soft); color: var(--ink); }
.grid--fam td { min-width: 84px; }
/* Method. */
.about .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.about p, .about dd { color: var(--muted); font-size: 13.5px; }
.defs { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.defs dt { font-weight: 750; } .defs dd { margin: 0; }
.bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; flex: none; }
.bar i { display: block; height: 100%; background: var(--ink); }
.harn { font-weight: 600; }
.row-meta .harn { margin-left: 0; color: var(--ink); }
.grid .notes { white-space: normal; min-width: 180px; max-width: 260px; line-height: 1.35; }
.grid .notes .fl { display: block; margin: 0; }
.grid--checks, .grid--fam { width: auto; }
.grid--checks .chk { min-width: 300px; }
.grid--fam td { min-width: 96px; }
.grid th, .grid td { padding: 5px 6px; }
.grid .notes { max-width: 220px; }

/* Grouped headers. */
.grid thead tr.groups th { position: static; border-bottom: 0; padding-bottom: 0; font-size: 10px; color: var(--ink); text-align: left; }
.grid .gstart { border-left: 1.5px solid var(--line-soft); }
.grid thead tr.groups th.gstart { border-left: 1.5px solid var(--line); }
.explain-line { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); max-width: 1100px; }
.explain-line b { color: var(--ink); }
.vis .pc { display: inline-block; min-width: 36px; margin-right: 6px; }
.grid td .rz { display: block; font-size: 10.5px; }
.vis .rz { display: inline; font-size: 12px; }
.grid td.vis .rz { display: inline; font-size: 12px; }
.bar--miss { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.bar--miss i { background: var(--hl-h); }
.unb { font-size: 12px; }
.vis .bar { width: 40px; }

/* Waffle states beyond the outcome. */
.sq--disc { background: repeating-linear-gradient(135deg, var(--accent) 0 2px, transparent 2px 3.5px); box-shadow: inset 0 0 0 1px var(--hl-c); }
.sq--disc.sq--c, .sq--disc.sq--h { background: linear-gradient(135deg, var(--hl-c) 45%, transparent 45%), repeating-linear-gradient(135deg, var(--accent) 0 2px, transparent 2px 3.5px); }
.sq--fb { box-shadow: inset 0 -2px 0 var(--info); }
.sq--disc.sq--fb { box-shadow: inset 0 0 0 1px var(--hl-c), inset 0 -2px 0 var(--info); }
.sq--nt { background: transparent; box-shadow: inset 0 0 0 1px var(--line-soft); outline: 1px dashed var(--muted); outline-offset: -1px; }
/* Output mix bar: shares of output tokens. */
.mix { display: inline-flex; align-items: center; gap: 8px; }
.mix-bar { display: inline-flex; width: 120px; height: 8px; border-radius: 2px; overflow: hidden; background: var(--line-soft); }
.mix--lg .mix-bar { width: 100%; min-width: 260px; height: 12px; }
.mix--lg { display: flex; }
.mx { display: block; height: 100%; }
.mx--tool { background: var(--ink); }
.mx--message { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.mx--reasoning { background: color-mix(in srgb, var(--hl-h) 40%, transparent); }
.mx--hidden { background: var(--hl-h); }
.mix-lab { min-width: 70px; font-size: 12px; white-space: nowrap; } .mix-lab b { font-weight: 750; }
.mix-key { font-size: 12px; color: var(--muted); }
.mix-key .mx { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: 0; }
.mix-key .mx:first-child { margin-left: 0; }
.mix-row { margin: 14px 0 4px; display: grid; gap: 6px; }
/* Dots. */
.dotc { min-width: 70px; height: 42px; }
.dotc small { display: block; font-size: 10px; color: var(--muted); }
.dot { display: inline-block; border-radius: 50%; border: 1.5px solid var(--ink); vertical-align: middle; }
.dot--won { background: var(--accent); }
.grid td.small, .small { font-size: 12px; }
.notes .why { display: block; color: var(--muted); font-weight: 500; }
.why-line { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.key .mx { display: inline-block; width: 14px; height: 8px; border-radius: 2px; vertical-align: 0; margin-right: 3px; }
