/* DV Bench Lab - visual system
   Ground: cool wafer grey. Ink: deep slate. One accent: probe cobalt.
   Signal colours follow waveform-viewer convention: green pass, red X, amber Z. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/static/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/static/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/static/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("/static/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("/static/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url("/static/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --ground: #edf1f5;
  --surface: #ffffff;
  --sunken: #f5f7fa;
  --ink: #13212e;
  --ink-2: #4e5f70;
  --ink-3: #7d8b98;
  --rule: #d3dbe3;
  --rule-strong: #b7c3ce;
  --probe: #2747c9;
  --probe-dark: #1c369e;
  --probe-wash: #e8ecfb;
  --pass: #16825a;
  --pass-wash: #e3f3ec;
  --fail: #c0392f;
  --fail-wash: #fbe9e7;
  --z: #b5781a;
  --z-wash: #fbf1df;
  --lvl-0: #8a97a4;
  --lvl-1: #b64a3c;
  --lvl-2: #b5781a;
  --lvl-3: #2747c9;
  --lvl-4: #16825a;
  --ui: "Barlow", "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 var(--ui);
  font-feature-settings: "tnum" 1;
}
a { color: var(--probe); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--probe-dark); }
:focus-visible { outline: 2px solid var(--probe); outline-offset: 2px; border-radius: 3px; }
code, pre, kbd, samp { font-family: var(--mono); font-size: 0.875em; }
p { margin: 0 0 0.9em; }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type scale (1.2 minor third on 16px) ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: 0.005em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: 2.074rem; font-weight: 700; }
h2 { font-size: 1.44rem; }
h3 { font-size: 1.2rem; }
.lede { color: var(--ink-2); font-size: 1.07rem; max-width: 68ch; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 0.875rem; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--ink);
  color: #dfe7ef;
  border-bottom: 3px solid var(--probe);
}
.topbar .subnav { margin-bottom: 0; }
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; min-height: 58px;
}
.wordmark { display: flex; align-items: baseline; gap: 10px; color: #fff; text-decoration: none; white-space: nowrap; }
.wordmark b { font: 700 1.3rem/1 var(--display); letter-spacing: 0.01em; }
.wordmark span { font-size: 0.8rem; color: #9fb0c1; }
.wordmark:hover { color: #fff; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a {
  color: #c3d0dc; text-decoration: none; padding: 17px 12px 15px; font-weight: 500; font-size: 0.95rem;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
.nav .sep { width: 1px; background: #33475a; margin: 14px 8px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; white-space: nowrap; }
.who a { color: #c3d0dc; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: #c3d0dc; text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: #fff; }

/* ---------- page frame ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .lede { margin: 6px 0 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.cols-wide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.stack > * + * { margin-top: 24px; }
@media (max-width: 900px) {
  .cols, .cols-wide { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; gap: 8px 20px; padding: 10px 16px; }
  .nav a { padding: 8px 10px; }
  main { padding: 20px 16px 48px; }
}

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 22px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .panel-head { padding: 16px 22px 0; }
.empty { color: var(--ink-2); padding: 8px 0; }
.callout { border-left: 3px solid var(--probe); background: var(--probe-wash); padding: 12px 16px; border-radius: 0 var(--r) var(--r) 0; margin: 0 0 20px; }
.callout.warn { border-color: var(--z); background: var(--z-wash); }
.callout.bad { border-color: var(--fail); background: var(--fail-wash); }
.callout.good { border-color: var(--pass); background: var(--pass-wash); }
.callout ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- lists of things to do ---------- */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.todo li:first-child { border-top: 0; padding-top: 4px; }
.todo .what { min-width: 0; }
.todo .what b { display: block; font-weight: 600; }
.todo .what span { color: var(--ink-2); font-size: 0.9rem; }

/* ---------- tables ---------- */
table.grid { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.grid th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.85rem; padding: 10px 12px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid td.num, .grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid tbody tr:hover { background: var(--sunken); }
.table-wrap { overflow-x: auto; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.95rem/1 var(--ui); padding: 11px 18px; border-radius: var(--r);
  border: 1px solid var(--probe); background: var(--probe); color: #fff; text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--probe-dark); border-color: var(--probe-dark); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-quiet:hover { background: var(--sunken); color: var(--ink); border-color: var(--ink-3); }
.btn-danger { background: var(--surface); color: var(--fail); border-color: var(--fail); }
.btn-danger:hover { background: var(--fail); color: #fff; border-color: var(--fail); }
.btn-small { padding: 7px 12px; font-size: 0.875rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

label { font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--ink-2); font-size: 0.85rem; display: block; margin-top: 4px; }
input[type=text], input[type=email], input[type=number], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--ui); color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: var(--r); background: #fff;
}
textarea { font-family: var(--mono); font-size: 0.875rem; line-height: 1.5; min-height: 120px; resize: vertical; }
textarea.prose { font-family: var(--ui); font-size: 1rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--probe); outline-offset: 0; border-color: var(--probe); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--probe); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
fieldset { border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 18px 6px; margin: 0 0 20px; }
legend { font-weight: 600; padding: 0 6px; }
.inline-form { display: inline; margin: 0; }

/* ---------- status marks ---------- */
.mark { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.mark.pass::before, .mark.open::before { background: var(--pass); }
.mark.fail::before { background: var(--fail); }
.mark.z::before, .mark.pending::before { background: var(--z); }
.mark.info::before { background: var(--probe); }
.tag { display: inline-block; font-size: 0.8rem; padding: 2px 8px; border-radius: 3px; background: var(--sunken); border: 1px solid var(--rule); color: var(--ink-2); margin: 0 4px 4px 0; }

/* ---------- skill waveform (signature element) ---------- */
.wave { width: 100%; height: auto; display: block; font-family: var(--ui); }
.wave-name { fill: var(--ink); font-size: 13px; font-weight: 500; }
.wave-tick { fill: var(--ink-3); font-size: 10px; }
.wave-clk { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.wave-grid { stroke: var(--rule); stroke-width: 1; }
.wave-z { stroke: var(--z); stroke-width: 1.6; stroke-dasharray: 5 4; }
.wave-sig { fill: none; stroke-width: 2; stroke-linejoin: miter; }
.wave-fill { stroke: none; opacity: 0.12; }
.wave-val { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.wave-sig.lvl-1, .wave-val.lvl-1 { stroke: var(--lvl-1); fill: var(--lvl-1); }
.wave-sig.lvl-2, .wave-val.lvl-2 { stroke: var(--lvl-2); fill: var(--lvl-2); }
.wave-sig.lvl-3, .wave-val.lvl-3 { stroke: var(--lvl-3); fill: var(--lvl-3); }
.wave-sig.lvl-4, .wave-val.lvl-4 { stroke: var(--lvl-4); fill: var(--lvl-4); }
.wave-sig { fill: none !important; }
.wave-val.lvl-0 { fill: var(--z); }
.wave-fill.lvl-1 { fill: var(--lvl-1); } .wave-fill.lvl-2 { fill: var(--lvl-2); }
.wave-fill.lvl-3 { fill: var(--lvl-3); } .wave-fill.lvl-4 { fill: var(--lvl-4); }
.wave-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-2); margin-top: 12px; }
.wave-legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.wave-legend .l1 { border-color: var(--lvl-1); } .wave-legend .l2 { border-color: var(--lvl-2); }
.wave-legend .l3 { border-color: var(--lvl-3); } .wave-legend .l4 { border-color: var(--lvl-4); }
.wave-legend .lz { border-top: 2px dashed var(--z); }

.lvl { font-weight: 600; }
.lvl.lvl-0 { color: var(--lvl-0); } .lvl.lvl-1 { color: var(--lvl-1); } .lvl.lvl-2 { color: var(--lvl-2); }
.lvl.lvl-3 { color: var(--lvl-3); } .lvl.lvl-4 { color: var(--lvl-4); }
.bar { display: inline-block; width: 90px; height: 6px; vertical-align: middle; }
.bar svg { width: 100%; height: 6px; display: block; }
.bar-track { fill: var(--rule); }
.bar-fill.lvl-1 { fill: var(--lvl-1); } .bar-fill.lvl-2 { fill: var(--lvl-2); }
.bar-fill.lvl-3 { fill: var(--lvl-3); } .bar-fill.lvl-4 { fill: var(--lvl-4); }
.bar-empty { border-top: 2px dashed var(--z); height: 0; }

/* skill matrix heat cells */
.heat td.cell { text-align: center; font-family: var(--mono); font-size: 0.82rem; font-weight: 600; padding: 8px 6px; }
.heat .cell.lvl-1 { background: #f6dfdb; color: #7e2a20; }
.heat .cell.lvl-2 { background: #f8ebd2; color: #7a4f0d; }
.heat .cell.lvl-3 { background: #dfe5fa; color: #1c369e; }
.heat .cell.lvl-4 { background: #d8efe4; color: #0e5a3e; }
.heat .cell.lvl-0 { color: var(--z); }
.heat th.rot { font-size: 0.78rem; white-space: normal; text-align: center; min-width: 70px; line-height: 1.2; vertical-align: bottom; }

/* ---------- numbers ---------- */
.figure { display: flex; gap: 32px; flex-wrap: wrap; margin: 4px 0 8px; }
.figure div { min-width: 120px; }
.figure b { display: block; font: 600 1.73rem/1.1 var(--display); }
.figure span { color: var(--ink-2); font-size: 0.875rem; }

/* ---------- markdown content ---------- */
.prose { max-width: 76ch; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.4em; }
.prose h1 { font-size: 1.44rem; } .prose h2 { font-size: 1.2rem; } .prose h3 { font-size: 1.05rem; }
.prose pre { background: #f3f6f9; border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; overflow-x: auto; line-height: 1.45; }
.prose code { background: #f0f3f7; padding: 1px 4px; border-radius: 3px; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; margin: 0 0 1em; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 6px 10px; text-align: left; }
.prose ul, .prose ol { padding-left: 22px; }

/* ---------- sign-in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.signin-art { background: var(--ink); color: #dfe7ef; padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: space-between; }
.signin-art .wordmark b { font-size: 1.6rem; }
.signin-art h1 { color: #fff; font-size: 2.488rem; max-width: 14ch; margin: 48px 0 16px; }
.signin-art p { color: #a9b9c8; max-width: 44ch; }
.signin-art svg { margin-top: 32px; max-width: 520px; }
.signin-art .trace { fill: none; stroke-width: 2; }
.signin-art .t1 { stroke: #8fb0ff; } .signin-art .t2 { stroke: #6fd3a8; } .signin-art .t3 { stroke: #f0b85a; stroke-dasharray: 5 4; }
.signin-art text { fill: #7f93a7; font: 500 12px var(--mono); }
.signin-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.signin-form .box { width: 100%; max-width: 400px; }
.signin-form h2 { font-size: 1.73rem; }
.code-input { font: 600 1.6rem/1 var(--mono) !important; letter-spacing: 0.45em; text-align: center; padding: 14px !important; }
@media (max-width: 860px) { .signin { grid-template-columns: 1fr; } .signin-art { padding: 32px 24px; } .signin-art h1 { margin-top: 24px; } .signin-art svg { display: none; } }

/* ---------- test taking ---------- */
.exam-bar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--rule); }
.exam-bar-inner { max-width: 1400px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 24px; justify-content: space-between; }
.exam-title { font: 600 1.1rem/1.2 var(--display); }
.timer { font: 600 1.44rem/1 var(--mono); padding: 6px 12px; border-radius: var(--r); background: var(--sunken); border: 1px solid var(--rule); min-width: 120px; text-align: center; }
.timer.low { background: var(--fail-wash); border-color: var(--fail); color: var(--fail); }
.save-state { font-size: 0.85rem; color: var(--ink-2); min-width: 110px; }
.exam { max-width: 1400px; margin: 0 auto; padding: 20px 24px 64px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.qnav { position: sticky; top: 76px; align-self: start; }
.qnav ol { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.qnav button {
  width: 100%; aspect-ratio: 1; border: 1px solid var(--rule-strong); background: var(--surface); border-radius: 4px;
  font: 600 0.9rem var(--mono); color: var(--ink); cursor: pointer; position: relative;
}
.qnav button[aria-current="true"] { border: 2px solid var(--probe); color: var(--probe); }
.qnav button.answered { background: var(--probe-wash); }
.qnav button.code::after { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; background: var(--ink-3); border-radius: 1px; }
.qnav .legend { font-size: 0.8rem; color: var(--ink-2); line-height: 1.7; }
.question { display: none; }
.question.current { display: block; }
.q-meta { color: var(--ink-2); font-size: 0.875rem; margin-bottom: 6px; }
.options { list-style: none; padding: 0; margin: 16px 0; max-width: 76ch; }
.options li { margin-bottom: 10px; }
.options label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; padding: 12px 14px; border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; margin: 0; }
.options label:hover { border-color: var(--probe); }
.options input { margin-top: 4px; accent-color: var(--probe); width: 18px; height: 18px; flex: none; }
.options input:checked + span { font-weight: 500; }
.options label:has(input:checked) { border-color: var(--probe); background: var(--probe-wash); }
.code-q { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .code-q { grid-template-columns: 1fr; } .exam { grid-template-columns: 1fr; } .qnav { position: static; } .qnav ol { grid-template-columns: repeat(10, 1fr); } }
.q-nav-buttons { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* ---------- editor ---------- */
.editor { border: 1px solid var(--rule-strong); border-radius: var(--r); overflow: hidden; background: #fff; }
.tabs { display: flex; gap: 0; background: var(--sunken); border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tabs button { border: 0; border-right: 1px solid var(--rule); background: transparent; padding: 9px 14px; font: 500 0.85rem var(--mono); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: inset 0 -2px 0 var(--probe); }
.tabs .ro { color: var(--ink-3); font-style: italic; }
.CodeMirror { font-family: var(--mono); font-size: 13.5px; line-height: 1.5; height: 440px; }
.editor.short .CodeMirror { height: 300px; }
.CodeMirror-gutters { background: #f7f9fb; border-right: 1px solid var(--rule); }
.CodeMirror-linenumber { color: var(--ink-3); }
.editor-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-top: 1px solid var(--rule); background: var(--sunken); }
.editor textarea.plain { border: 0; border-radius: 0; min-height: 440px; }

/* ---------- run output ---------- */
.output { margin-top: 14px; }
.output:empty { display: none; }
.cases { list-style: none; padding: 0; margin: 0 0 12px; }
.cases li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--rule); font-size: 0.92rem; }
.cases li code { font-weight: 600; }
.cases .ok { color: var(--pass); font-weight: 600; min-width: 40px; }
.cases .bad { color: var(--fail); font-weight: 600; min-width: 40px; }
pre.log { background: #0f1a24; color: #d4dee8; border-radius: var(--r); padding: 12px 14px; max-height: 360px; overflow: auto; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; margin: 8px 0 0; }
pre.log.compile { background: #2a1414; color: #f4d6d2; }
details.logbox summary { cursor: pointer; color: var(--ink-2); font-size: 0.9rem; margin-top: 8px; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--rule-strong); border-top-color: var(--probe); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------- result page ---------- */
.score-big { font: 700 3.583rem/1 var(--display); }
.score-big small { font-size: 1.2rem; color: var(--ink-2); font-weight: 600; }
.answer-row { border-top: 1px solid var(--rule); padding: 16px 0; }
.answer-row:first-child { border-top: 0; }
.answer-row h3 { display: flex; justify-content: space-between; gap: 12px; }
.opt-list { list-style: none; padding: 0; margin: 8px 0; }
.opt-list li { padding: 4px 0 4px 26px; position: relative; }
.opt-list li::before { content: ""; position: absolute; left: 6px; top: 12px; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink-3); }
.opt-list li.chosen::before { background: var(--ink-2); }
.opt-list li.correct { color: var(--pass); font-weight: 600; }
.opt-list li.correct::before { border-color: var(--pass); }
.opt-list li.chosen.wrong { color: var(--fail); }

/* ---------- misc ---------- */
.pager { display: flex; gap: 12px; margin-top: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; }
.errorpage { max-width: 560px; margin: 80px auto; }
.errorpage .code { font: 700 4.3rem/1 var(--display); color: var(--rule-strong); }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 160px; }
.qpick { max-height: 520px; overflow: auto; border: 1px solid var(--rule); border-radius: var(--r); }
.qpick table { margin: 0; }
.qpick input[type=number] { width: 72px; padding: 6px 8px; }
.hidden { display: none !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 20px; }
dialog { border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 24px 26px; max-width: 460px; color: var(--ink); }
dialog::backdrop { background: rgba(19, 33, 46, 0.45); }
tr.me td { background: var(--probe-wash); }

/* mentor sub-navigation */
.subnav { background: #1c2d3c; border-top: 1px solid #2a3e50; }
.subnav-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 40px; }
.subnav-label { color: #8ea2b5; font-size: 0.82rem; margin-right: 12px; }
.subnav a { color: #c3d0dc; text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 10px 10px; border-bottom: 2px solid transparent; }
.subnav a:hover { color: #fff; }
.subnav a[aria-current="page"] { color: #fff; border-bottom-color: #8fb0ff; }
/* code never uses ligatures: != and !== must read literally */
code, pre, kbd, samp, .CodeMirror, .wave-val, .code-input, .tabs button { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.nowrap, .grid td.nowrap { white-space: nowrap; }
