/* Muster: a recruiting workbench. Plain and dense, built for a phone first (412 px) and roomy at 1440.
   One accent (a calm blue), system fonts, tabular numbers. Light and dark follow the device.
   No framework, no build step; no inline styles anywhere (the CSP forbids them), so score bars use
   classes s0..s10 (height) and w0..w10 (width). */

:root {
  color-scheme: light dark;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --surface-3: #e3e9f0;
  --text: #18212c;
  --text-soft: #4f5b6b;
  --text-faint: #6b7787;
  --border: #d8dfe7;
  --border-strong: #b5c0cd;
  --accent: #0b5fd6;
  --accent-hover: #094fb3;
  --accent-soft: #e5eefc;
  --on-accent: #ffffff;
  --focus: #0b5fd6;
  --ok: #156238;
  --ok-bg: #e0f2e7;
  --warn: #7f4600;
  --warn-bg: #fcefd6;
  --bad: #ab2219;
  --bad-bg: #fbe7e5;
  --bar: #0b5fd6;
  --bar-evidence: #1f7a49;
  --bar-off: #b5c0cd;
  --bar-track: #e3e9f0;
  --shadow: 0 1px 2px rgba(24, 33, 44, 0.06), 0 4px 14px rgba(24, 33, 44, 0.06);

  --radius: 12px;
  --radius-sm: 8px;
  --gutter: 16px;
  --tap: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1319;
    --surface: #151c24;
    --surface-2: #1b242e;
    --surface-3: #24303c;
    --text: #e6ebf1;
    --text-soft: #b0bccb;
    --text-faint: #8794a4;
    --border: #2b3745;
    --border-strong: #42505f;
    --accent: #6ea8ff;
    --accent-hover: #93bdff;
    --accent-soft: #19304f;
    --on-accent: #08121f;
    --focus: #93bdff;
    --ok: #82d8a4;
    --ok-bg: #12301f;
    --warn: #f3c46f;
    --warn-bg: #33270e;
    --bad: #ff9d93;
    --bad-bg: #3a1916;
    --bar: #6ea8ff;
    --bar-evidence: #82d8a4;
    --bar-off: #42505f;
    --bar-track: #24303c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.25);
  }
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; padding-bottom: 32px; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 0.12em; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; margin-top: 1rem; }
p { margin: 0 0 0.75rem; text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(52rem + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: calc(86rem + 2 * var(--gutter)); }
.wrap-narrow { max-width: calc(28rem + 2 * var(--gutter)); }

.skip { position: absolute; left: 8px; top: -100px; z-index: 50; padding: 0.5rem 0.9rem; background: var(--surface); color: var(--text); border-radius: var(--radius-sm); }
.skip:focus { top: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.hint { color: var(--text-faint); font-size: 0.875rem; }
.lead { color: var(--text-soft); font-size: 1.05rem; }
.pre { white-space: pre-wrap; font-size: 0.9rem; }
.mono, textarea.mono { font-family: var(--mono); font-size: 0.85rem; }
.strong { font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ top bar and tabs */

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-inner {
  max-width: calc(86rem + 2 * var(--gutter)); margin: 0 auto; padding: 8px var(--gutter);
  display: flex; align-items: center; gap: 12px; min-height: 52px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.mark { width: 28px; height: 28px; flex: none; }
.mark-bg { fill: var(--accent); }
.mark-tick, .mark-line { stroke: var(--on-accent); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.mark-line { opacity: 0.8; }
.role-name { color: var(--text-faint); font-size: 0.875rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.signout { margin-left: auto; }
.dev-badge { margin-left: auto; }

.tabs {
  max-width: calc(86rem + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 12px; color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.foot { color: var(--text-faint); font-size: 0.8rem; padding: 16px 0 24px; }
.foot .wrap { max-width: calc(86rem + 2 * var(--gutter)); }
.foot a { color: inherit; }

.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 20px 0 12px; }
.page-head h1 { margin: 0; }
.page-head .lead { flex-basis: 100%; margin: 4px 0 0; }
.count { color: var(--text-soft); margin: 0; font-variant-numeric: tabular-nums; }
.crumbs { margin: 16px 0 8px; font-size: 0.9rem; }

/* ------------------------------------------------------------------ notices, badges, chips */

.notice { border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0; border: 1px solid transparent; }
.notice-ok { background: var(--ok-bg); color: var(--ok); }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-bad { background: var(--bad-bg); color: var(--bad); }
.notice a, .notice .link-button { color: inherit; font-weight: 600; }
main > .notice { margin-top: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: var(--surface-2); color: var(--text-soft);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-quiet { background: transparent; color: var(--text-faint); border: 1px solid var(--border); }

.pill {
  display: inline-block; min-width: 1.5em; padding: 0 6px; border-radius: 999px; text-align: center;
  background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

.stage { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 0.78rem; font-weight: 650; line-height: 1.6; background: var(--surface-2); color: var(--text-soft); }
.stage-shortlist { background: var(--accent-soft); color: var(--accent); }
.stage-contacted { background: var(--warn-bg); color: var(--warn); }
.stage-replied, .stage-applied, .stage-interview { background: var(--ok-bg); color: var(--ok); }
.stage-pass, .stage-declined { background: var(--surface-3); color: var(--text-faint); }

.verdict { font-size: 0.78rem; font-weight: 650; padding: 1px 8px; border-radius: 999px; line-height: 1.6; }
.verdict-up { background: var(--ok-bg); color: var(--ok); }
.verdict-meh { background: var(--surface-2); color: var(--text-soft); }
.verdict-down { background: var(--bad-bg); color: var(--bad); }

.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-soft); background: var(--surface); }
.chip-small { font-size: 0.72rem; }

/* ------------------------------------------------------------------ buttons and forms */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--accent-soft); color: var(--accent); }
.btn-danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-small { min-height: 36px; padding: 4px 12px; font-size: 0.9rem; }
.btn-wide { width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.button-row form { margin: 0; }
form.inline { display: inline; }

label { font-weight: 600; font-size: 0.92rem; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 6rem; resize: vertical; line-height: 1.45; }
select { padding-right: 28px; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.field { margin: 0 0 14px; display: flex; flex-direction: column; gap: 4px; }
.field .hint { margin: 0; }
.field-row { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-start; }
.field-row > .field, .field-row > fieldset { flex: 1 1 10rem; }
.field-small { max-width: 11rem; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select { flex: 1 1 12rem; width: auto; }

fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; font-size: 0.92rem; padding: 0; margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks legend { flex-basis: 100%; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; min-height: 32px; }

/* segmented radio buttons (verdict, touch, format, kind) */
.seg-radio { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; align-content: flex-start; }
.seg-radio legend { flex-basis: 100%; }
.seg-opt { position: relative; display: inline-flex; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.seg-opt span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 0.92rem;
}
.seg-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg-up input:checked + span { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.seg-down input:checked + span { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.verdicts .seg-opt { flex: 1 1 0; }
.verdicts .seg-opt span { width: 100%; justify-content: center; }

/* checkbox chips (feedback tags) */
.tag-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picks legend { flex-basis: 100%; }
.tag { position: relative; display: inline-flex; }
.tag input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.tag span { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 0.85rem; font-weight: 550; background: var(--surface); }
.tag input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tag input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ panels and folds */

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > .section-head:first-child { margin-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.section-head h2 { margin: 0; }

.fold-panel { padding: 0; }
.fold > summary {
  list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; min-height: var(--tap);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint); transform: rotate(45deg); transition: transform 0.15s; }
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold-body { padding: 0 16px 16px; }

details > summary { cursor: pointer; }
details.older, .run details { margin-top: 8px; }
details.older > summary, .run details > summary, .sent details > summary { color: var(--accent); font-weight: 600; font-size: 0.9rem; min-height: 32px; }

/* ------------------------------------------------------------------ the board */

.board { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.board-main, .board-side { min-width: 0; }
.board-side { display: flex; flex-direction: column; gap: 12px; }
.board-side .panel { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg a { padding: 6px 14px; min-height: 36px; display: inline-flex; align-items: center; text-decoration: none; color: var(--text-soft); font-weight: 600; font-size: 0.9rem; }
.seg a + a { border-left: 1px solid var(--border-strong); }
.seg a[aria-current="true"] { background: var(--accent); color: var(--on-accent); }

.weight { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; margin-bottom: 10px; }
.weight label { font-weight: 550; }
.weight output { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); min-width: 2ch; text-align: right; }
.weight input { grid-column: 1 / -1; }

.results { display: grid; gap: 12px; }
.results-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.results-table { display: block; }

.cand {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px 10px; box-shadow: var(--shadow); min-width: 0;
}
.cand.is-hidden { opacity: 0.65; border-style: dashed; }
.cand-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.pick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; margin: -2px 0 0 -4px; cursor: pointer; }
.cand-name { font-size: 1.05rem; margin: 0; line-height: 1.3; }
.cand-name a { color: var(--text); text-decoration: none; }
.cand-name a:hover { color: var(--accent); text-decoration: underline; }
.cand-headline { margin: 2px 0 0; color: var(--text-soft); font-size: 0.88rem; line-height: 1.35; }
.cand-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.company { font-weight: 650; font-size: 0.9rem; margin-right: 2px; }
.why { margin: 8px 0 0; font-size: 0.92rem; line-height: 1.45; }
.cand-foot { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-faint); }
.cand-foot a { color: inherit; }

.overall { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.overall-num {
  font-size: 1.6rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums;
  background: var(--accent-soft); color: var(--accent); border-radius: var(--radius-sm); padding: 6px 8px; min-width: 3.2ch; text-align: center;
}
.overall.is-thin .overall-num { background: var(--surface-2); color: var(--text-soft); }

/* ten mini bars */
.bars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.bar-num { font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-soft); line-height: 1.2; }
.bar-track { position: relative; width: 100%; max-width: 26px; height: 30px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.bar-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bar); border-radius: 4px 4px 0 0; }
.bar-evidence .bar-fill { background: var(--bar-evidence); }
.bar-off .bar-fill { background: var(--bar-off); }
.bar-label { font-size: 0.62rem; color: var(--text-faint); line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; letter-spacing: -0.01em; }
.bar-evidence { border-left: 1px dashed var(--border-strong); padding-left: 2px; }

.s0 { height: 0; } .s1 { height: 10%; } .s2 { height: 20%; } .s3 { height: 30%; } .s4 { height: 40%; } .s5 { height: 50%; }
.s6 { height: 60%; } .s7 { height: 70%; } .s8 { height: 80%; } .s9 { height: 90%; } .s10 { height: 100%; }

/* table view */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.grid { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; vertical-align: middle; }
.grid thead th { position: sticky; top: 0; background: var(--surface-2); font-size: 0.78rem; font-weight: 700; color: var(--text-soft); }
.grid thead th a { color: inherit; }
.grid tbody th { font-weight: 650; }
.grid tbody tr:hover { background: var(--surface-2); }
.grid tr.is-hidden { opacity: 0.6; }
.grid td.num, .grid th.num { text-align: right; }
/* the name stays in view while a phone scrolls the table sideways */
.grid .pin { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.grid thead .pin { z-index: 2; background: var(--surface-2); }
.grid tbody tr:hover .pin { background: var(--surface-2); }
.grid .pin input { vertical-align: -0.2em; margin-right: 4px; }

.empty { grid-column: 1 / -1; padding: 32px 16px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }

.seed-bar {
  position: sticky; bottom: 12px; z-index: 10; margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.seed-bar #seed-count { flex: 1 1 12rem; font-size: 0.9rem; color: var(--text-soft); }
.js .seed-bar.is-empty { display: none; }

.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-soft); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ a candidate */

.cand-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; margin: 4px 0 16px; }
.cand-head h1 { margin: 0; }
.cand-head .lead { margin: 4px 0 0; }
.cand-head .overall-num { font-size: 2rem; }
.cand-page { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
.why-big { font-size: 1.05rem; line-height: 1.5; }
.concerns { margin: 0 0 12px; padding-left: 1.2rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 8px 16px; margin: 12px 0 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 0.78rem; color: var(--text-faint); font-weight: 600; }
.facts dd { margin: 0; font-size: 0.92rem; }

.hbars { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) 2ch; grid-template-rows: auto auto; gap: 0 10px; align-items: center; }
.hbar-label { font-size: 0.9rem; font-weight: 550; }
.hbar-track { height: 10px; background: var(--bar-track); border-radius: 999px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--bar); border-radius: 999px; }
.hbar-evidence .hbar-fill { background: var(--bar-evidence); }
.hbar-off .hbar-fill { background: var(--bar-off); }
.hbar-num { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.hbar-weight { grid-column: 1; font-size: 0.72rem; color: var(--text-faint); }
.w0 { width: 0; } .w1 { width: 10%; } .w2 { width: 20%; } .w3 { width: 30%; } .w4 { width: 40%; } .w5 { width: 50%; }
.w6 { width: 60%; } .w7 { width: 70%; } .w8 { width: 80%; } .w9 { width: 90%; } .w10 { width: 100%; }

.history { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.history li { border-top: 1px solid var(--border); padding-top: 8px; font-size: 0.9rem; }
.history p { margin: 4px 0; }
.feedback-form textarea { min-height: 4.5rem; }
.feedback-form .btn-wide { margin-top: 10px; }

.sources { margin: 0; padding-left: 1.3rem; display: grid; gap: 12px; }
.source-title { font-weight: 650; }
.domain { display: block; font-size: 0.8rem; color: var(--text-faint); }
.supports { margin: 4px 0; font-size: 0.9rem; color: var(--text-soft); }
.source-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; }
.check-note { color: var(--text-soft); }

.job { margin: 12px 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-weight: 550; }
.job.is-error { background: var(--warn-bg); color: var(--warn); }
.job::before { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; vertical-align: -0.1em; animation: spin 0.9s linear infinite; }
.job.is-done::before, .job.is-error::before { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .job::before { animation: none; } }

.sent-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.sent { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.sent-meta { margin: 0; font-size: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.draft-text { white-space: pre-wrap; margin: 8px 0 0; font-size: 0.92rem; }
.reply-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.9rem; }

.compose { margin-bottom: 8px; }
.compose .btn-primary { margin-top: 12px; }
.rules { margin: 0 0 12px; padding-left: 1.1rem; }
.js .rules li { display: none; }
.js .rules li.is-current { display: list-item; list-style: none; margin-left: -1.1rem; }

.batch { margin-top: 16px; }
.batch-meta { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 8px; }
.draft-list { display: grid; gap: 12px; }
.draft { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); }
.draft.is-chosen { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.draft-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.draft textarea { font-size: 0.95rem; min-height: 7rem; }
.draft .button-row { margin-top: 8px; }
.link-note { margin: -2px 0 6px; color: var(--ok); }
.count.is-over { color: var(--bad); font-weight: 700; }
.draft-head .count { font-size: 0.8rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.draft-head .count.is-over { color: var(--bad); }

.plain-list { margin: 0 0 8px; padding-left: 1.2rem; }
.plain-list li { margin-bottom: 4px; }

/* ------------------------------------------------------------------ pipeline */

.followups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.followup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.followup:first-child { border-top: 0; }
.followup-who { flex: 1 1 12rem; font-weight: 650; }
.followup-when { color: var(--text-soft); font-size: 0.9rem; }
.followup.is-due .followup-when { color: var(--warn); font-weight: 650; }
.followup form { margin: 0; }

.columns { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: start; }
.column { background: var(--surface-2); border-radius: var(--radius); padding: 12px; min-width: 0; }
.column h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.col-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mini { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.mini-top { display: flex; align-items: baseline; gap: 8px; }
.mini-name { font-weight: 650; color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.mini-name:hover { color: var(--accent); text-decoration: underline; }
.mini-overall { font-weight: 750; color: var(--accent); font-variant-numeric: tabular-nums; }
.mini-sub { margin: 2px 0 0; font-size: 0.82rem; color: var(--text-soft); }
.mini-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mini-stage { display: flex; gap: 6px; margin-top: 8px; }
.mini-stage select { min-height: 36px; padding: 4px 8px; font-size: 0.88rem; }

/* ------------------------------------------------------------------ lanes */

.lanes-layout { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
.angles { display: grid; gap: 8px; }
.angle {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-weight: 500;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
}
.angle:hover { border-color: var(--border-strong); }
.angle input { margin-top: 3px; }
.angle:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.angle-text { display: flex; flex-direction: column; gap: 2px; }
.angle-name { font-weight: 650; }
.angle-sum { font-size: 0.85rem; color: var(--text-soft); font-weight: 400; }
.seeds { display: grid; gap: 4px; }
#dispatch textarea { min-height: 5rem; }
#dispatch .btn-primary { margin-top: 4px; }

.runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.run { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; scroll-margin-top: 110px; }
.run.is-active { border-color: var(--accent); }
.run:target { box-shadow: 0 0 0 2px var(--accent); }
.run-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.run-head h3 { margin: 0; flex: 1 1 auto; }
.run-id { margin: 2px 0 8px; font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); }
.run-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 6px 12px; margin: 0; }
.run-stats dt { font-size: 0.75rem; color: var(--text-faint); font-weight: 600; }
.run-stats dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.status { font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-soft); }
.status-running, .status-queued { background: var(--accent-soft); color: var(--accent); }
.status-completed, .status-ingested { background: var(--ok-bg); color: var(--ok); }
.status-failed, .status-timeout, .status-orphaned { background: var(--warn-bg); color: var(--warn); }
.queries { margin: 8px 0 0; padding-left: 1.3rem; font-size: 0.88rem; display: grid; gap: 4px; }

/* ------------------------------------------------------------------ role */

.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.toc a { padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
section[id] { scroll-margin-top: 110px; }
.compile { margin-top: 16px; }
.proposal { margin-top: 16px; padding: 12px; border: 1px dashed var(--accent); border-radius: var(--radius-sm); }
.proposal h3 { margin-top: 0; }
.proposal form + form { margin-top: 8px; }
.supp-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.supp-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.supp-list form { margin-left: auto; }
.add-supp { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.add-supp .field { flex: 1 1 12rem; }
.add-supp .field-small { flex: 0 1 9rem; }
.add-supp .btn { margin-bottom: 14px; }
.weights-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: 0 12px; }
.weights-form .field-small { max-width: none; }
.weights-form .button-row { grid-column: 1 / -1; }

/* ------------------------------------------------------------------ the door */

.door { text-align: center; padding: 40px 0 24px; }
.door-mark { width: 56px; height: 56px; margin-bottom: 12px; }
.door h1 { font-size: 1.7rem; }
.door .panel { text-align: left; margin-top: 24px; }
.door-form { display: flex; flex-direction: column; gap: 8px; text-align: left; margin: 20px 0 12px; }
.door-form .btn { margin-top: 4px; }
.sent-email { overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ wider screens */

@media (min-width: 48em) {
  :root { --gutter: 24px; }
  h1 { font-size: 1.85rem; }
  .lanes-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
}

@media (min-width: 64em) {
  .board { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  .board-side { position: sticky; top: 112px; max-height: calc(100vh - 124px); overflow-y: auto; padding-bottom: 8px; }
  .cand-page { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); grid-template-areas: "main side" "rest side"; }
  .cand-main { grid-area: main; min-width: 0; }
  .cand-side { grid-area: side; position: sticky; top: 112px; align-self: start; max-height: calc(100vh - 124px); overflow-y: auto; }
  .cand-rest { grid-area: rest; min-width: 0; }
  .hbars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
  .columns { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); overflow-x: auto; padding-bottom: 8px; }
}
