/* Tokens: light defaults, dark under the OS preference unless the viewer chose light. */
:root {
  color-scheme: light;
  --page: #f5f6f8; --surface: #ffffff; --surface-2: #f8fafb; --surface-3: #eef2f5;
  --ink: #1d2735; --ink-2: #4a5768; --muted: #748093; --faint: #a8b1bd;
  --line: #e2e7ed; --line-2: #edf0f4;
  --accent: #0a8f78; --accent-soft: #e6f5f1; --focus: #0a9b83;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-7: #6250d6;
  --good: #0c8a0c; --good-soft: #e9f6e9; --bad: #c43a3a; --bad-soft: #fcefee; --warn: #a86b00; --warn-soft: #fdf5e2;
  --heat-1: #f0f6fe; --heat-2: #e1edfc; --heat-3: #cde2fb; --heat-4: #9ec5f4; --heat-ink: #0b2a52;
  --grid: #e9edf2; --axis: #8592a3;
  --code-bg: #f6f8fa; --add: #e7f6ea; --del: #fdecec;
  --tk-kw: #cf222e; --tk-str: #0a3069; --tk-com: #6e7781; --tk-num: #0550ae; --tk-fn: #8250df; --tk-pre: #953800; --tk-ty: #0550ae;
  --shadow: 0 1px 2px rgb(16 24 40 / 4%), 0 1px 3px rgb(16 24 40 / 4%);
  --shadow-lg: 0 12px 40px rgb(16 24 40 / 18%);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0e1217; --surface: #151a21; --surface-2: #1a2029; --surface-3: #212833;
    --ink: #e4e9ef; --ink-2: #b9c3cf; --muted: #8b97a6; --faint: #5d6977;
    --line: #27303b; --line-2: #212932;
    --accent: #3cc4a8; --accent-soft: #15302b; --focus: #3cc4a8;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-7: #9085e9;
    --good: #2fb62f; --good-soft: #15291a; --bad: #e66767; --bad-soft: #301a1c; --warn: #e0a531; --warn-soft: #2e2512;
    --heat-1: #15233a; --heat-2: #182c4b; --heat-3: #1b3a64; --heat-4: #1f4f8e; --heat-ink: #e8f1fc;
    --grid: #232b35; --axis: #7b8796;
    --code-bg: #10151b; --add: #12291a; --del: #2f1719;
    --tk-kw: #ff7b72; --tk-str: #a5d6ff; --tk-com: #8b949e; --tk-num: #79c0ff; --tk-fn: #d2a8ff; --tk-pre: #ffa657; --tk-ty: #ffa657;
    --shadow: none; --shadow-lg: 0 12px 40px rgb(0 0 0 / 50%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0e1217; --surface: #151a21; --surface-2: #1a2029; --surface-3: #212833;
  --ink: #e4e9ef; --ink-2: #b9c3cf; --muted: #8b97a6; --faint: #5d6977;
  --line: #27303b; --line-2: #212932;
  --accent: #3cc4a8; --accent-soft: #15302b; --focus: #3cc4a8;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-7: #9085e9;
  --good: #2fb62f; --good-soft: #15291a; --bad: #e66767; --bad-soft: #301a1c; --warn: #e0a531; --warn-soft: #2e2512;
  --heat-1: #15233a; --heat-2: #182c4b; --heat-3: #1b3a64; --heat-4: #1f4f8e; --heat-ink: #e8f1fc;
  --grid: #232b35; --axis: #7b8796;
  --code-bg: #10151b; --add: #12291a; --del: #2f1719;
  --tk-kw: #ff7b72; --tk-str: #a5d6ff; --tk-com: #8b949e; --tk-num: #79c0ff; --tk-fn: #d2a8ff; --tk-pre: #ffa657; --tk-ty: #ffa657;
  --shadow: none; --shadow-lg: 0 12px 40px rgb(0 0 0 / 50%);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.6px; margin: 0 0 6px; font-weight: 650; }
h2 { font-size: 15px; margin: 0 0 3px; letter-spacing: -.2px; }
h3 { font-size: 12px; margin: 14px 0 6px; color: var(--ink-2); }
.muted { color: var(--muted); font-size: 12px; margin: 0; }
.small { font-size: 11px; }
.mono, code, kbd { font-family: var(--mono); }
code { font-size: .92em; background: var(--surface-3); border-radius: 4px; padding: 1px 4px; }
kbd { font-size: 10px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--surface); }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* Controls */
button { border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; background: var(--surface); color: var(--ink-2); font: 600 12px system-ui, sans-serif; cursor: pointer; transition: background .12s, border-color .12s; }
button:hover { background: var(--surface-3); }
button:disabled { opacity: .5; cursor: wait; }
button.quiet { font-size: 11px; padding: 6px 10px; }
button.icon { min-width: 30px; padding: 6px 8px; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
select, input[type=search] { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; color: var(--ink); background: var(--surface); font: 12px system-ui, sans-serif; min-height: 33px; max-width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 650; color: var(--muted); }
.field.grow { flex: 1; min-width: 180px; }
.field.compact { flex-direction: row; align-items: center; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.check input { accent-color: var(--accent); margin: 0; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); padding: 2px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 5px 10px; border-radius: 5px; color: var(--muted); font-size: 11px; }
.segmented button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); outline: 1px solid var(--line); }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Frame */
.topbar { position: sticky; top: 0; z-index: 20; height: 46px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding: 0 max(16px, 3vw); }
.brand { font-weight: 800; letter-spacing: 2px; font-size: 13px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand span { color: var(--accent); padding: 0 5px; }
.quiet-link { font-size: 12px; text-decoration: none; }
.quiet-link:hover { text-decoration: underline; }
.problem-switch { flex: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
@media (max-width: 1280px) { #run-count { display: none; } }
main { max-width: 1800px; margin: 0 auto; padding: 14px max(16px, 3vw) 6px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 10px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); }
/* Results: title, filters and table in one panel */
.results-head { padding: 10px 14px 9px; border-bottom: 1px solid var(--line-2); }
.title-line { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; }
.title-line h1 { font-size: 19px; margin: 0; letter-spacing: -.3px; }
.filters-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; }
.filters-row .field { flex-direction: row; align-items: center; gap: 7px; }
.filters-row #search { flex: 1; min-width: 180px; min-height: 29px; padding: 5px 9px; }
.filters-row select { min-height: 29px; padding: 4px 8px; }
footer { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); padding: 12px max(16px, 3vw); max-width: 1800px; margin: 0 auto; }
#error { background: var(--bad-soft); border: 1px solid var(--bad); color: var(--bad); padding: 12px 16px; border-radius: 7px; margin: 16px max(16px, 3vw) 0; }
#warnings { font-size: 11px; color: var(--warn); max-width: 1800px; margin: 0 auto; padding: 0 max(16px, 3vw); }
#warnings details { margin-top: 12px; }
.method { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 2px 4px 10px; max-width: 1000px; }
.method summary { cursor: pointer; color: var(--ink-2); }
.empty-state { padding: 28px 24px; text-align: center; color: var(--muted); line-height: 1.8; }

/* Tables */
.table-scroll { overflow: auto; }
.table-scroll.tall { max-height: min(calc(100vh - 210px), 600px); min-height: 100px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: right; font-weight: 600; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line); }
thead tr.group th { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; height: 24px; padding-block: 0; }
thead tr:nth-child(2) th { top: 24px; }
td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line-2); }
th.left, td.left { text-align: left; }
th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; white-space: nowrap; }
th button:hover { color: var(--ink); background: none; }
th button[data-active] { color: var(--accent); }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr.active td { background: var(--accent-soft); }
tbody tr.hovered td { background: var(--surface-3); }
.sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--line-2); text-align: left; }
th.sticky-col { z-index: 3; background: var(--surface-2); }
.split-start { border-left: 1px solid var(--line); }
.run-name { font-weight: 650; color: var(--ink); }
.run-meta { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 11px; margin-top: 2px; }
.results-table { table-layout: fixed; }
.results-table .c-name { width: 21%; }
.results-table .c-score { width: 66px; }
.results-table thead tr:nth-child(2) th { white-space: normal; vertical-align: bottom; line-height: 1.25; padding: 5px 7px; }
.results-table th button { white-space: normal; overflow-wrap: anywhere; text-align: inherit; }
.results-table td { padding: 5px 7px; overflow: hidden; text-overflow: ellipsis; }
.results-table th.sticky-col, .results-table td.sticky-col { padding-left: 12px; }
.results-table .run-name { overflow: hidden; text-overflow: ellipsis; }
.results-table .run-meta { flex-wrap: nowrap; overflow: hidden; }
.results-table .cell-link small { display: block; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.score { font-weight: 700; }
td small, .sub { display: block; font-weight: 400; color: var(--muted); font-size: 10px; margin-top: 2px; }
td.best .score, td.best-score .score { color: var(--accent); }
td.heat-1, .swatch.heat-1 { background: var(--heat-1); }
td.heat-2, .swatch.heat-2 { background: var(--heat-2); }
td.heat-3, .swatch.heat-3 { background: var(--heat-3); }
td.heat-4, .swatch.heat-4 { background: var(--heat-4); }
td[class*=heat-] { color: var(--heat-ink); }
tbody tr:hover td[class*=heat-] { filter: brightness(.97); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.fail { color: var(--bad); font-size: 11px; }
.empty { color: var(--faint); }
.note-cell { white-space: normal; text-align: left; min-width: 240px; max-width: 420px; color: var(--ink-2); line-height: 1.4; }
.note-cell span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.table-foot { padding: 7px 14px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; flex-wrap: wrap; }
.cell-link { border: 0; background: none; padding: 0; font: inherit; color: inherit; }
.cell-link:hover { text-decoration: underline; background: none; }

/* Badges, pills, chips */
.badge { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .5px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--muted); text-transform: uppercase; }
.badge.gpu { color: var(--series-7); border-color: currentColor; }
.badge.cpu { color: var(--series-1); border-color: currentColor; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.selected { background: color-mix(in srgb, var(--series-7) 15%, transparent); color: var(--series-7); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.count { font-size: 10px; font-weight: 600; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 0 6px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; box-shadow: var(--shadow); min-width: 0; }
.tile .label { font-size: 11px; color: var(--muted); font-weight: 600; }
.tile .value { font-size: 17px; font-weight: 650; margin-top: 1px; letter-spacing: -.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .value.small-value { font-size: 15px; }
.tile .sub { font-size: 11px; }
.tile.link { cursor: pointer; }
.tile.link:hover { border-color: var(--accent); }
.drawer .tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.drawer .tile { padding: 9px 11px; box-shadow: none; }
.drawer .tile .value { font-size: 16px; }

/* Tabs */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tabs button { border: 0; border-radius: 0; padding: 7px 0; background: none; color: var(--muted); font-size: 13px; border-bottom: 2px solid transparent; }
.tabs button[aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
/* Task tabs live in the sticky top bar */
.task-tabs { display: flex; align-self: stretch; gap: 20px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.task-tabs button { border: 0; border-radius: 0; background: none; padding: 0 1px; height: 100%; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; border-top: 2px solid transparent; white-space: nowrap; }
.task-tabs button:hover { color: var(--ink); background: none; }
.task-tabs button[aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
.task-tabs .count { margin-left: 5px; }
.run-view { border-top: 1px solid var(--line); padding-top: 12px; scroll-margin-top: 46px; }
.run-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.run-head .eyebrow, .run-head .chips { margin: 0; }
.run-head h1 { font-size: 20px; margin: 0; letter-spacing: -.3px; }
tbody tr.chosen td { background: var(--accent-soft); }
tbody tr.chosen td.sticky-col { box-shadow: inset 3px 0 0 var(--accent); }

/* Charts */
.chart-wrap { position: relative; height: 250px; margin: 6px 12px 0; }
canvas { width: 100%; height: 100%; display: block; }
.tooltip { position: absolute; z-index: 5; background: var(--ink); color: var(--surface); padding: 8px 11px; font-size: 11px; line-height: 1.5; border-radius: 6px; pointer-events: none; max-width: 300px; box-shadow: var(--shadow-lg); white-space: pre-line; }
.legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); padding: 4px 16px 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.mark { display: inline-block; width: 10px; height: 10px; }
.mark.line { height: 2px; width: 16px; background: var(--series-1); }
.mark.dot { border-radius: 50%; background: var(--axis); width: 8px; height: 8px; }
.mark.cross::before { content: "✕"; color: var(--bad); font-style: normal; font-size: 11px; line-height: 10px; }
.mark.diamond { width: 9px; height: 9px; background: var(--series-7); transform: rotate(45deg); }
.timeline-panel { padding: 10px 12px 4px; }
.timeline-wrap { position: relative; height: 124px; }

/* Transcript */
.transcript-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.filters { position: sticky; top: 56px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px; box-shadow: var(--shadow); max-height: calc(100vh - 66px); overflow: auto; }
.filters select, .filters input[type=search] { width: 100%; }
.presets { display: flex; gap: 4px; flex-wrap: wrap; }
.presets button { padding: 4px 8px; font-size: 11px; }
.category-list { display: flex; flex-direction: column; gap: 2px; }
.category-list label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 3px 4px; border-radius: 5px; cursor: pointer; }
.category-list label:hover { background: var(--surface-2); }
.category-list input { accent-color: var(--accent); margin: 0; }
.category-list .count { margin-left: auto; }
.category-list label.zero { opacity: .45; }
.cat-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--cat, var(--faint)); }
.feed-status { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 2px 10px; flex-wrap: wrap; }
.feed { display: flex; flex-direction: column; gap: 5px; }
.more { width: 100%; margin: 12px 0 30px; padding: 10px; }

.cat-prompt { --cat: var(--series-7); }
.cat-message { --cat: var(--series-1); }
.cat-thinking { --cat: color-mix(in srgb, var(--series-1) 45%, var(--faint)); }
.cat-tool_call, .cat-tool_output { --cat: var(--series-2); }
.cat-evaluation { --cat: var(--series-3); }
.cat-diagnostic { --cat: var(--series-4); }
.cat-lifecycle { --cat: var(--muted); }
.cat-error { --cat: var(--bad); }
.cat-meta { --cat: var(--faint); }

.entry { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cat); border-radius: 8px; min-width: 0; scroll-margin-top: 60px; }
.entry.is-error { border-color: var(--bad); border-left-color: var(--bad); }
.entry.focused { box-shadow: 0 0 0 2px var(--focus); }
.entry.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--series-4); } to { box-shadow: 0 0 0 3px transparent; } }
.entry-head { display: flex; align-items: center; gap: 8px; padding: 4px 9px; min-width: 0; font-size: 12px; }
.entry-kind { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--cat); white-space: nowrap; }
.entry-label { font-weight: 650; color: var(--ink); white-space: nowrap; }
.entry-summary { color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.entry-summary.mono { font-size: 11px; }
.entry-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.entry-tools time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.entry-tools .idx { color: var(--faint); font-size: 10px; margin-right: 4px; }
.entry-tools button { border: 0; background: none; color: var(--muted); padding: 2px 5px; font-size: 11px; }
.entry-tools button:hover { color: var(--accent); background: var(--surface-3); }
.entry-body { padding: 0 10px 7px; min-width: 0; }
.entry.compact { background: transparent; border: 0; border-left: 3px solid var(--cat); border-radius: 0; }
.entry.compact .entry-head { padding: 3px 10px; }
.entry.compact .entry-label { font-weight: 600; color: var(--ink-2); }
.entry.divider { border-left: 0; }
.entry.divider .entry-head { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
.entry-raw { padding: 0 12px 10px; }
.entry-output { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 6px; }
.entry-output .out-head { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.md { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; color: var(--ink); }
.md pre { margin: 6px 0; }
.md .md-h { display: inline-block; margin-top: 4px; }
.thinking { color: var(--ink-2); font-style: italic; }
.clamp { position: relative; max-height: var(--clamp, 240px); overflow: hidden; }
.clamp.clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.clamp.open { max-height: none; }
.clamp-toggle { margin-top: 4px; }
mark { background: color-mix(in srgb, var(--series-4) 45%, transparent); color: inherit; border-radius: 2px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--code-bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 9px 11px; margin: 4px 0; font: 11.5px/1.55 var(--mono); color: var(--ink-2); }
pre.shell::before { content: "$ "; color: var(--accent); font-weight: 700; }
pre.log { max-height: 420px; overflow: auto; }
pre.error-text { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.diff .del { background: var(--del); display: block; }
.diff .add { background: var(--add); display: block; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; font-size: 12px; margin: 4px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.instance-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.eval-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; margin: 2px 0 4px; }

/* JSON tree */
.json-tree { font: 11.5px/1.6 var(--mono); color: var(--ink-2); background: var(--code-bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; overflow: auto; max-height: 600px; }
.json-tree details > summary { cursor: pointer; list-style: none; }
.json-tree details > summary::before { content: "▸"; display: inline-block; width: 12px; color: var(--muted); }
.json-tree details[open] > summary::before { content: "▾"; }
.json-tree details[open] > summary .jt-preview { display: none; }
.jt-children { padding-left: 16px; border-left: 1px solid var(--line); margin-left: 4px; }
.jt-leaf { padding-left: 12px; overflow-wrap: anywhere; }
.jt-key { color: var(--series-1); }
.jt-key::after { content: ": "; color: var(--muted); }
.jt-meta, .jt-preview { color: var(--muted); margin-left: 4px; }
.jt-str { color: var(--good); }
.jt-num { color: var(--series-2); }
.jt-bool, .jt-null { color: var(--series-7); }
.jt-more { border: 0; background: none; color: var(--accent); padding: 0 4px; font: inherit; }
.jt-leaf pre { margin: 2px 0 4px; max-height: 300px; overflow: auto; }

/* Configuration */
.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.config-grid .panel { margin: 0; min-width: 0; }
.config-grid .wide { grid-column: 1 / -1; }
.config-grid .panel-body { padding: 12px 18px 16px; }
.usage-bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; gap: 2px; margin: 8px 0; background: var(--surface-3); }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(860px, 100vw); z-index: 40; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.drawer-body { overflow: auto; padding: 16px 20px 40px; flex: 1; }
.drawer-body .panel { box-shadow: none; }
.drawer table td, .drawer table th { padding: 7px 9px; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgb(10 15 22 / 30%); }
.bar-cell { width: 120px; }
.bar-cell svg { display: block; width: 110px; height: 8px; }
.bar-track { fill: var(--surface-3); }
.bar-good { fill: var(--series-1); }
.bar-bad { fill: var(--bad); }
tr.detail-row { cursor: default; }
tr.detail-row:hover td { background: transparent; }
tr.detail-row td { text-align: left; white-space: normal; background: var(--surface-2); }
.log-tabs { display: flex; gap: 4px; margin: 4px 0; flex-wrap: wrap; }
.log-tabs button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* Code tab */
.code-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.code-revisions { gap: 4px; padding: 10px; }
.code-revisions .eyebrow { margin: 4px 4px 6px; }
.rev { display: flex; flex-direction: column; gap: 1px; text-align: left; width: 100%; border: 1px solid transparent; background: none; border-radius: 7px; padding: 4px 7px; color: var(--ink); }
.rev:hover { background: var(--surface-3); }
.rev.active { background: var(--accent-soft); border-color: var(--accent); }
.rev-head { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.rev-head time { margin-left: auto; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.rev-sub { font-size: 11px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-meta { font-size: 10px; color: var(--muted); }
.code-main { padding: 14px 16px; min-width: 0; }
.code-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.code-head h2 { display: flex; flex-wrap: wrap; gap: 6px; }
.code-commits { font-size: 12px; margin: 0 0 10px; }
.code-commits summary { cursor: pointer; color: var(--ink-2); }
.code-commits ol { margin: 6px 0; padding-left: 20px; display: grid; gap: 2px; }
.code-commits li span { margin-left: 8px; }
.code-commits li time { margin-left: 8px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.code-files { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; align-items: start; }
.file-list { display: flex; flex-direction: column; gap: 1px; max-height: 75vh; overflow: auto; position: sticky; top: 56px; }
.file-list button { display: flex; justify-content: space-between; gap: 6px; text-align: left; border: 0; background: none; border-radius: 5px; padding: 4px 7px; font: 11.5px/1.4 var(--mono); color: var(--ink-2); }
.file-list button span:first-child { overflow-wrap: anywhere; }
.file-list button:hover { background: var(--surface-3); }
.file-list button.active { background: var(--accent-soft); color: var(--ink); }
.file-view { min-width: 0; }
.file-title { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 4px; }
.source { display: grid; grid-template-columns: max-content minmax(0, 1fr); background: var(--code-bg); border: 1px solid var(--line-2); border-radius: 6px; overflow: auto; max-height: 78vh; }
.source pre { border: 0; border-radius: 0; margin: 0; white-space: pre; overflow-wrap: normal; background: none; }
.source .gutter { color: var(--faint); text-align: right; user-select: none; border-right: 1px solid var(--line-2); }
.source .lines { color: var(--ink); }
.chg { font: 700 10px var(--mono); border-radius: 4px; padding: 0 4px; flex: none; }
.chg-A { color: var(--good); background: var(--good-soft); }
.chg-D { color: var(--bad); background: var(--bad-soft); }
.chg-M, .chg-R { color: var(--warn); background: var(--warn-soft); }
.code-diff { display: flex; flex-direction: column; gap: 8px; }
.diff-file { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.diff-file summary { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-2); cursor: pointer; font-size: 12px; }
.diff-file summary button { margin-left: auto; }
.diff-file pre.diff > span { display: block; min-height: 1.55em; }
.diff-file pre.diff { margin: 0; border: 0; border-radius: 0; white-space: pre; overflow: auto; max-height: 70vh; }
.diff .hunk { color: var(--series-7); display: block; }
.plus { color: var(--good); } .minus { color: var(--bad); }
.tk-kw, .tk-h { color: var(--tk-kw); }
.tk-str, .tk-key { color: var(--tk-str); }
.tk-com { color: var(--tk-com); font-style: italic; }
.tk-num { color: var(--tk-num); }
.tk-fn, .tk-call { color: var(--tk-fn); }
.tk-pre, .tk-var { color: var(--tk-pre); }
.tk-ty { color: var(--tk-ty); }
.tk-h { font-weight: 700; }

@media (max-width: 980px) {
  .transcript-layout, .code-layout, .code-files { grid-template-columns: 1fr; }
  .file-list { position: static; max-height: 240px; }
  .filters { position: static; max-height: none; }
}
@media (max-width: 700px) {
  .topbar { gap: 12px; }
  .brand { letter-spacing: 1px; font-size: 11px; }
  #run-count { display: none; }
  .filters-row .field { flex-wrap: wrap; }
  .segmented { flex-wrap: wrap; }
  .chart-wrap { height: 240px; }
  .entry-summary { display: none; }
  .entry-head { flex-wrap: wrap; }
  .entry-label { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  .entry-tools .idx { display: none; }
  .config-grid { grid-template-columns: minmax(0, 1fr); }
}
