:root {
  --bg: #f6f5f2; --card: #f9f8f5; --field: #fdfcfa; --line: #e0ddd6; --ink: #14181d; --muted: #5b626b;
  --navy: #161e28; --blue: #2c5a86; --bar: #5b87b8; --blue-soft: #d5e3f3; --blue-ink: #1d466e;
  --peach: #f5ded3; --rust: #a5431f; --amber: #8a5a0a; --amber-soft: #f6e8cb; --shade: #f0eee9; --radius: 6px;
  --serif: "Source Serif 4", "Source Serif Pro", Cambria, "Noto Serif", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--serif); font-variant-numeric: lining-nums tabular-nums; display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 2px solid var(--bar); outline-offset: 2px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 2.35rem; line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; line-height: 1.3; }
h3 { font-size: 1rem; }
.sub { color: var(--muted); font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.dot, .square { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .4rem; flex: none; }
.square { border-radius: 2px; }
select, input[type=search], input[type=date] { background: var(--field); border: 1px solid #cdc9c0; border-radius: 5px; padding: .3rem .6rem; }
input[type=checkbox] { accent-color: var(--blue); margin: 0; }

.side { background: linear-gradient(180deg, #1a232f, #121922); color: #e7ebf0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1rem .6rem; }
.brand { display: flex; gap: .7rem; align-items: center; font-size: 1.75rem; font-weight: 700; line-height: 1.15; padding: 0 .5rem 1.8rem; }
.brand svg { width: 1.7rem; height: 1.7rem; fill: #a9bdd4; flex: none; }
.brand small { display: block; font-size: .85rem; font-weight: 400; color: #cfd7e0; }
.side nav { display: flex; flex-direction: column; gap: .35rem; }
.side nav a { display: flex; gap: .85rem; align-items: center; color: #dde3ea; font-size: 1.05rem; padding: .65rem .85rem; border-radius: 6px; }
.side nav svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side nav a:hover { background: #ffffff0f; text-decoration: none; }
.side nav a.active { background: #3a4a5e; color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; padding: .8rem .85rem 0; border-top: 1px solid #ffffff22; font-size: .85rem; color: #aab5c2; }

main { padding: .4rem 1.1rem 2rem 1.3rem; min-width: 0; }
.head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; padding: .2rem 0 .6rem; border-bottom: 1px solid var(--line); }
.head p { color: var(--muted); font-size: 1.1rem; }
.badge { font-style: italic; border: 1px solid #cdc9c0; border-radius: 5px; padding: .2rem .8rem; margin-top: .4rem; }
.empty { padding: 3rem; text-align: center; color: var(--muted); margin-top: 1rem; }

.meta { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; padding: .65rem 0; }
.picker-control { display: flex; align-items: center; gap: 1.2rem; font-weight: 700; }
#picker { position: relative; font-weight: 400; }
#picker summary { display: flex; align-items: center; gap: 1rem; min-width: 26rem; min-height: 2.4rem; padding: .35rem 2.4rem .35rem .85rem; background: var(--field); border: 1px solid #bcb8af; border-radius: 5px; cursor: pointer; list-style: none; position: relative; font-size: 1rem; }
#picker summary::-webkit-details-marker { display: none; }
#picker summary::after { content: ''; position: absolute; right: 1rem; top: 38%; width: .45rem; height: .45rem; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.picked { display: inline-flex; align-items: center; }
#pickerList { position: absolute; left: 0; top: calc(100% + 4px); z-index: 5; width: 30rem; max-width: 90vw; max-height: 22rem; overflow: auto; padding: .6rem; box-shadow: 0 8px 24px #0002; }
#pickerList label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .4rem .2rem; cursor: pointer; }
#pickerList small { color: var(--muted); }
#metaFields { display: flex; flex: 1; flex-wrap: wrap; margin: 0; }
#metaFields > div { flex: 1; min-width: 9rem; border-left: 1px solid var(--line); padding: 0 1.6rem; }
#metaFields dt { font-size: .82rem; color: var(--muted); }
#metaFields dd { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }

.pill { display: inline-block; font-weight: 700; font-size: .85rem; line-height: 1.5; padding: 0 .65rem; border-radius: 4px; white-space: nowrap; }
.pill.good, .pill.pass { background: var(--blue-soft); color: var(--blue-ink); }
.pill.bad, .pill.fail { background: var(--peach); color: var(--rust); }
.pill.critical { background: var(--amber-soft); color: var(--amber); }
.pill.flat { background: var(--shade); color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); padding: .55rem 0; margin-bottom: .75rem; row-gap: .6rem; }
.scorecard { padding: .7rem 1rem; margin-bottom: .75rem; }
.scorecard table { width: 100%; table-layout: fixed; min-width: 40rem; margin-top: .5rem; }
.scorecard th, .scorecard td { text-align: left; padding: .4rem .9rem; border: 1px solid var(--line); }
.scorecard .overall { background: rgba(98, 160, 220, .1); }
.scorecard td b { font-size: 1.5rem; margin-right: .6rem; }
.scorecard td span { color: var(--muted); }
.scorecard td .bar { margin: .3rem 0 .15rem; height: .45rem; }
tr.score td b { margin-right: .5rem; }
tr.score td span { color: var(--muted); margin-right: .5rem; }
tr.score.overall { background: rgba(98, 160, 220, .1); }
.suite-control { display: flex; align-items: center; gap: .7rem; padding-top: .7rem; font-weight: 700; }
.suite-control select { min-width: 16rem; font-weight: 400; }
.chunk { border: 1px solid var(--line); border-radius: 5px; padding: .3rem .55rem; margin-bottom: .35rem; }
.chunk.hit { border-left: 3px solid var(--blue); }
.chunk summary { display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; cursor: pointer; overflow-wrap: anywhere; }
.chunk summary small { margin-left: auto; color: var(--muted); }
.chunk summary span { font-size: .82rem; }
.kpi { padding: .1rem 1.4rem; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; }
.kpi label { font-size: .88rem; }
.kpi div { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.kpi strong { font-size: 1.75rem; line-height: 1.25; }
.kpi small { display: block; color: var(--amber); font-size: .78rem; }
.kpi .p95 { font-size: .9rem; color: var(--muted); gap: .5rem; margin-top: .15rem; }
.kpi .p95 b { color: var(--ink); }
.kpi .p95 .pill { font-size: .75rem; }

.charts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; margin-bottom: .75rem; }
.charts article, .compare article, .diagnostics article { padding: .7rem 1rem; min-width: 0; }
.trend { display: flex; flex-direction: column; }
.trend-head { display: flex; justify-content: space-between; align-items: center; gap: .4rem 1.2rem; flex-wrap: wrap; }
.trend-tools { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; flex-wrap: wrap; margin-top: .35rem; }
.range { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.segments { display: flex; flex-wrap: wrap; border: 1px solid #cdc9c0; border-radius: 5px; overflow: hidden; font-size: .82rem; }
.segments button { padding: .15rem .6rem; border-right: 1px solid #cdc9c0; }
.segments button:last-child { border-right: 0; }
.segments button[aria-pressed=true] { background: var(--blue); color: #fff; }
.custom { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .85rem; }
.custom input { margin-left: .3rem; }
.trend .plot { margin-top: .4rem; flex: 1; }
.plot svg { display: block; width: 100%; height: auto; }
.no-data { color: var(--muted); text-align: center; padding: 3rem 1rem; }
svg text { font-size: 12px; fill: #2e343b; }
svg .axis-title { font-size: 12.5px; }
svg .grid { stroke: #e4e1da; stroke-width: 1; }
svg .axis { stroke: #8b9097; stroke-width: 1; }
svg .marker { stroke: #8b9097; stroke-width: 1; stroke-dasharray: 3 3; }
svg .point { stroke: var(--card); stroke-width: 1.5; }
svg .end-label { fill: #fff; font-weight: 700; }
svg .end-label.ink { fill: var(--ink); }
svg .hover { fill: transparent; cursor: pointer; }
svg .donut-total { font-size: 21px; font-weight: 700; fill: var(--ink); }
.legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .2rem 1rem; font-size: .88rem; }
.legend button, .legend span { display: inline-flex; align-items: center; }
.legend button.off { opacity: .35; }
.seams p { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.seams b { color: var(--amber); }

.rail { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.dims h2 { margin-bottom: .45rem; }
.dim { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 3.6rem; gap: 0 .6rem; align-items: center; width: 100%; font-size: .9rem; }
.dim > span:first-child { text-align: right; }
.dim:hover > span:first-child { text-decoration: underline; }
.dim b { text-align: right; font-weight: 400; font-size: .85rem; }
.dim .bar { border-left: 1px solid #8b9097; background: none; height: 1.55rem; padding: .3rem 0; }
.bar { height: .7rem; background: var(--shade); }
.bar i { display: block; height: 100%; background: var(--bar); }
.pair { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: .75rem; flex: 1; }
/* Both cards of the pair fill the height left beside the trend chart. */
.pair > article { display: flex; flex-direction: column; }
#donut { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: space-evenly; gap: .8rem; margin-top: .4rem; }
#donut svg { width: min(100%, 13rem); flex: none; }
#donut ul { list-style: none; margin: 0; padding: 0; width: 100%; font-size: .92rem; }
#donut li { display: flex; align-items: center; flex-wrap: wrap; padding: .2rem 0; }
#donut li b { font-weight: 400; margin-left: auto; padding-left: .5rem; white-space: nowrap; }
#summary { display: flex; flex: 1; flex-direction: column; list-style: none; margin: .2rem 0 0; padding: 0; font-size: .95rem; }
#summary li { display: flex; flex: 1; justify-content: space-between; align-items: center; gap: .6rem; padding: .42rem 0; border-bottom: 1px solid var(--line); }
#summary li:last-child { border-bottom: 0; }
#summary b { white-space: nowrap; font-size: 1.15rem; }

.columns { --pane: 42rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: .75rem; }
/* The three panes share one height; longer content scrolls inside its own pane. */
.columns > * { height: var(--pane); }
.experiments, .cases { display: flex; flex-direction: column; }
.experiments > *, .cases > * { flex: none; }
.columns thead th { position: sticky; top: 0; z-index: 1; background: var(--card); box-shadow: inset 0 -1px var(--line); }
.experiments th:first-child, .experiments td:first-child { width: 2.2rem; }
.columns.with-drawer { grid-template-columns: minmax(0, 1fr) minmax(0, 1.38fr) minmax(0, 1.25fr); }
.experiments, .cases { padding: .65rem .6rem; min-width: 0; }
.experiments h2, .cases h2 { padding: 0 .25rem; }
.experiments input[type=search] { width: 100%; margin: .45rem 0 .3rem; }
.experiments > .scroll { flex: 1; min-height: 0; overflow: auto; }
.experiments p { padding: .45rem .25rem 0; }
.experiments td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.experiments td button { text-align: left; }
.experiments tr.active td { background: var(--blue-soft); font-weight: 700; }
.cases { scroll-margin-top: .6rem; }
.cases > .table-wrap { flex: 1; min-height: 0; overflow: auto; }
.cases-head { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.cases-head h2 { min-width: 0; }
.cases-head input { flex: 0 1 15rem; min-width: 7rem; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .45rem; font-size: .85rem; }
.filters select { padding: .2rem .3rem; }
.table-wrap { overflow-x: auto; margin-top: .45rem; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: .87rem; }
th, td { padding: .34rem .45rem; text-align: left; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: .83rem; color: #333a42; }
th button { font-weight: 600; }
.num { text-align: right; }
tbody tr { cursor: pointer; }
tbody tr.static { cursor: default; }
.flips li > span.static { display: flex; gap: .5rem; align-items: baseline; padding: .3rem .2rem; border-bottom: 1px solid var(--line); }
.flips li > span.static > span:last-child { color: var(--muted); margin-left: auto; text-align: right; }
tbody tr:hover { background: #eeece6; }
tbody tr.active { background: var(--blue-soft); }
.score { text-align: center; }
.score.no { color: var(--rust); font-weight: 700; }
.score.na { color: #9aa0a6; }
td.id small { display: block; color: var(--muted); font-size: .75rem; }
td.none { text-align: center; color: var(--muted); padding: 1.5rem; }
#caseRows td > small { display: block; color: var(--muted); font-size: .75rem; }
#caseRows td > small.failed { color: var(--rust); }
.changed { background: var(--amber-soft); color: var(--amber); font-weight: 700; font-size: .78rem; padding: .1rem .5rem; border-radius: 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; color: var(--muted); font-size: .85rem; }
#pages { display: flex; gap: .25rem; align-items: center; }
#pages button { min-width: 1.75rem; height: 1.75rem; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); }
#pages button.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.drawer { padding: .65rem .85rem .85rem; overflow: auto; min-width: 0; scroll-margin-top: .6rem; }
.drawer-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.drawer-head .actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.outline { border: 1px solid var(--blue); border-radius: 5px; padding: .15rem .7rem; font-weight: 700; font-size: .85rem; color: var(--blue-ink); }
.close { font-size: 1rem; padding: .1rem .35rem; }
.tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid var(--line); margin: .35rem 0 .55rem; }
.tabs button { padding: .25rem 0; border-bottom: 3px solid transparent; color: var(--muted); }
.tabs button[aria-selected=true] { color: var(--ink); font-weight: 700; border-bottom-color: var(--blue); }
.drawer dl { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .1rem .7rem; margin: 0 0 .7rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.drawer dt { color: #333a42; }
.drawer dd { margin: 0; overflow-wrap: anywhere; }
.block { margin-bottom: .7rem; }
.block summary { font-weight: 700; cursor: pointer; margin-bottom: .3rem; }
.copy { float: right; color: var(--blue); font-weight: 400; }
.text { margin: 0; background: var(--shade); border-radius: 5px; padding: .6rem .7rem; max-height: 12rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.text p { margin-bottom: .4rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { padding: .15rem .55rem; border-radius: 4px; font-weight: 700; font-size: .8rem; }
.chip.ok { background: var(--blue-soft); color: var(--blue-ink); }
.chip.no { background: var(--peach); color: var(--rust); }
.chip.rerun { margin-left: .4rem; background: var(--blue-soft); color: var(--blue-ink); }
.reasons { background: #f8e9e1; border-radius: 5px; padding: .55rem .7rem; margin-bottom: .7rem; overflow-wrap: anywhere; }
.reasons h4 { color: var(--rust); margin-bottom: .25rem; }
.reasons p + p { margin-top: .4rem; }
.drawer { container-type: inline-size; }
.columns > .drawer.expanded { position: fixed; inset: 1.2rem; z-index: 8; height: auto; box-shadow: 0 0 0 100vmax #10151c99; }
.drawer.expanded .text { max-height: 26rem; }
.runs { display: inline-flex; margin-bottom: .6rem; }
.runs button { display: inline-flex; align-items: center; }
.runs .dot { border: 1px solid #fff; }
.expected > div { margin-bottom: .6rem; overflow-wrap: anywhere; }
.expected h5 { margin: 0 0 .15rem; font-size: .88rem; }
.expected ul { margin: 0; padding-left: 1.1rem; }
.expected li, .expected p { white-space: pre-wrap; margin-bottom: .15rem; }
.expected summary { cursor: pointer; color: var(--muted); }
.thread { display: flex; flex-direction: column; }
.message { border: 1px solid var(--line); border-left: 3px solid #9aa3ad; border-radius: 5px; padding: .35rem .55rem; margin-bottom: .45rem; }
.message.user { border-left-color: var(--bar); }
.message.assistant { border-left-color: var(--blue); }
.message.tool, .message.tool_call, .message.tool_result { border-left-color: #c4891c; }
.message summary { display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; cursor: pointer; }
.message summary span { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.message summary small { margin-left: auto; color: var(--muted); font-size: .75rem; }
.message > .text, .message > .block, .call { margin-top: .35rem; }
.call h5, h5.part { margin: 0 0 .25rem; font-size: .85rem; }
h5.part { margin: .7rem 0 .35rem; }
.call h5 small { font-weight: 400; color: var(--muted); margin-left: .5rem; }
.text.code { font: .8rem/1.45 Consolas, "Cascadia Mono", monospace; }
.trace { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.tree { list-style: none; margin: 0; padding: 0; max-height: 15rem; overflow: auto; border: 1px solid var(--line); border-radius: 5px; }
.tree button { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr) auto; gap: .15rem .5rem; width: 100%; text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.tree button:hover { background: #eeece6; }
.tree button[aria-current] { background: var(--blue-soft); }
.tree .type { font-size: .68rem; font-weight: 700; color: var(--muted); align-self: center; }
.tree .step-name { overflow-wrap: anywhere; }
.tree .timeline { grid-column: 1 / -1; height: .25rem; background: var(--shade); overflow: hidden; }
.tree .timeline i { display: block; height: 100%; background: var(--bar); }
.tree small { grid-column: 1 / -1; color: var(--muted); }
.tree small.flag { color: var(--rust); font-weight: 700; }
.node { min-width: 0; }
.node > h4 { margin-bottom: .35rem; overflow-wrap: anywhere; }
.scores { list-style: none; margin: 0; padding: 0; }
.scores li { display: flex; gap: .5rem; align-items: baseline; margin-bottom: .35rem; overflow-wrap: anywhere; }
.scores .chip { white-space: nowrap; }
@container (min-width: 760px) {
  .trace { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); align-items: start; }
  .tree { max-height: calc(100vh - 11rem); position: sticky; top: 0; }
}
.drawer .table-wrap { margin: 0 0 .8rem; }
.drawer .matrix th, .drawer .matrix td { padding: .3rem; font-size: .8rem; }
.drawer .matrix tbody th { white-space: normal; }
.run { border-left: 3px solid var(--line); padding-left: .6rem; margin-bottom: .9rem; }
.run > h4 { display: flex; align-items: center; gap: .3rem; margin-bottom: .4rem; }

.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; margin-bottom: .75rem; }
.compare .summary { grid-column: 1 / -1; }
.matrix th, .matrix td { padding: .35rem .6rem; }
.matrix tbody tr { cursor: default; }
.matrix tbody th { font-weight: 600; }
.matrix th small { display: block; font-weight: 400; color: var(--muted); }
.summary td b { font-size: 1.15rem; margin-right: .5rem; }
.change { color: var(--muted); }
.change.good { color: var(--blue); }
.change.bad { color: var(--rust); }
.group { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.series { display: grid; grid-template-columns: minmax(0, 1fr) 3.6rem; gap: .5rem; align-items: center; margin: 2px 0; }
.series .bar { height: .55rem; }
.series b { text-align: right; font-weight: 400; font-size: .82rem; }
.compare .legend { margin-top: .6rem; justify-content: center; }

.diagnostics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; margin-top: .75rem; }
.diagnostics .wide { grid-column: 1 / -1; }
.notice { background: var(--amber-soft); color: var(--amber); border-radius: 5px; padding: .5rem .7rem; margin-top: .6rem; overflow-wrap: anywhere; }
.flip-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; margin-top: .6rem; }
.flips h3 { margin-bottom: .3rem; }
.flips.bad h3 { color: var(--rust); }
.flips.good h3 { color: var(--blue); }
.flips ul { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow: auto; }
.flips li button { display: flex; gap: .5rem; align-items: baseline; width: 100%; text-align: left; padding: .3rem .2rem; border-bottom: 1px solid var(--line); }
.flips li button:hover { background: #eeece6; }
.flips li button > span:last-child { color: var(--muted); margin-left: auto; text-align: right; }
.tag { font-size: .72rem; font-weight: 700; background: var(--amber-soft); color: var(--amber); padding: 0 .35rem; border-radius: 4px; white-space: nowrap; }
.gaps .table-wrap { max-height: 40rem; overflow: auto; }
.gap-table th, .gap-table td { padding-top: .2rem; padding-bottom: .2rem; }
.gap-table .gap-text { white-space: normal; min-width: 14rem; color: var(--muted); }
.gap-table th.picked-column { background: var(--blue-soft); }
.gap-table .total th, .gap-table .total td { background: var(--shade); }

#tooltip { position: fixed; z-index: 10; pointer-events: none; background: var(--navy); color: #eef2f6; border-radius: 5px; padding: .5rem .7rem; font-size: .85rem; box-shadow: 0 6px 20px #0003; }
.tip-title { font-weight: 700; margin-bottom: .15rem; }

@media (max-width: 1500px) {
  .columns.with-drawer { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
  .columns > .drawer { grid-column: 1 / -1; height: auto; }
  .charts { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .pair h2 { font-size: 1.02rem; }
  #metaFields { flex-basis: 100%; }
  #metaFields > div:first-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 1250px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: .6rem; }
  .kpi:nth-child(4) { border-left: 0; }
  .charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: .7rem 1rem; }
  .brand { padding-bottom: .5rem; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { display: none; }
  main { padding: .6rem 16px 2rem; }
  h1 { font-size: 1.7rem; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi:nth-child(4) { border-left: 1px solid var(--line); }
  .columns, .columns.with-drawer, .pair, .compare, .diagnostics, .flip-columns { grid-template-columns: minmax(0, 1fr); }
  .compare .summary, .diagnostics .wide { grid-column: auto; }
  .columns > * { height: auto; }
  .experiments > .scroll, .cases > .table-wrap { flex: none; max-height: var(--pane); }
  .range { align-items: flex-start; }
  .cases-head { flex-wrap: wrap; }
  .legend { justify-content: flex-start; }
  .picker-control { flex-wrap: wrap; gap: .4rem; }
  #picker summary { min-width: 0; flex-wrap: wrap; }
  #metaFields > div { padding: 0 1rem 0 0; border-left: 0; }
}

/* The website's dark look for the published dashboard. Appended to styles.css by build.cjs. */
:root {
  color-scheme: dark;
  --bg: #07070a; --card: #0e0e12; --field: #15151b; --line: rgba(255, 255, 255, .1); --ink: #fafafa; --muted: #9a9aa3;
  --navy: #1c1c24; --blue: #f5b544; --bar: #f5b544; --blue-soft: rgba(245, 181, 68, .16); --blue-ink: #ffd584;
  --peach: rgba(255, 107, 87, .18); --rust: #ff8a75; --amber: #ffd584; --amber-soft: rgba(245, 181, 68, .14); --shade: #1c1c24; --radius: 12px;
  --serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.side { background: #0b0b0f; border-right: 1px solid var(--line); }
.side nav a.active { background: var(--blue-soft); color: var(--blue-ink); }
select, input[type=search], input[type=date], #picker summary, .segments, .segments button, .badge { border-color: rgba(255, 255, 255, .16); }
th, .drawer dt { color: #c7c7cd; }
.score.na { color: #6d6d76; }
tbody tr:hover, .flips li button:hover { background: rgba(255, 255, 255, .05); }
tbody tr.active { background: var(--blue-soft); }
.segments button[aria-pressed=true], #pages button.active { background: var(--blue); border-color: var(--blue); color: #1a1a1a; }
#pickerList { box-shadow: 0 8px 24px #000a; }
.scorecard .overall, tr.score.overall { background: rgba(245, 181, 68, .08); }
svg text { fill: #c7c7cd; }
svg .grid { stroke: rgba(255, 255, 255, .08); }
svg .axis, svg .marker { stroke: #6d6d76; }
svg .end-label, svg .end-label.ink { fill: #07070a; }
svg .donut-total { fill: var(--ink); }
#tooltip { border: 1px solid rgba(255, 255, 255, .16); }
/* Inside the website's overlay the page needs neither its sidebar nor a way back. */
.embedded body { grid-template-columns: minmax(0, 1fr); }
.embedded .side { display: none; }
.embedded main { padding: .8rem 1.4rem 2rem; }
.embedded .head h1 { font-size: 1.7rem; }
