/* Police Media Desk console. Dark first. Four surface levels, the navigation frame darkest.
   Colour carries state only: score tier, action, request state, risk. Nothing is decorative. */
:root {
  --frame: #0b1120;
  --ground: #141c2b;
  --panel: #1b2638;
  --raised: #243247;
  --hover: #2b3b54;
  --line: #334155;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --accent: #7dd3fc;
  --good: #34d399;
  --good-bg: #0f3d2e;
  --warn: #fbbf24;
  --warn-bg: #45320a;
  --bad: #f87171;
  --bad-bg: #4a1d1d;
  --info: #7dd3fc;
  --info-bg: #12384d;
  --violet: #c4b5fd;
  --violet-bg: #2e2552;
  --mono: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--ground); color: var(--text); font: 15px/1.45 system-ui, "Inter", "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: .01em; }
h3 { font-size: 13px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* frame */
.shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.nav { background: var(--frame); border-right: 1px solid #1e293b; padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 700; font-size: 16px; padding: 4px 8px 2px; }
.brand-sub { color: var(--muted); font-size: 12px; padding: 0 8px 12px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 6px; color: var(--text-2); font-size: 14.5px; }
.nav a:hover { background: #162033; text-decoration: none; color: var(--text); }
.nav a.on { background: var(--raised); color: #fff; }
.nav .group { color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 4px; }
.nav .count { background: var(--raised); color: var(--text-2); border-radius: 10px; padding: 0 7px; font-size: 12px; }
.nav .who { margin-top: 18px; padding: 10px; border-top: 1px solid #1e293b; font-size: 13px; color: var(--muted); }
.nav button.link { background: none; border: 0; color: var(--accent); padding: 0; cursor: pointer; font: inherit; }
.main { padding: 18px 22px 60px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; }
.panel > header { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); gap: 12px; }
.panel > .body { padding: 12px 14px; }
.panel > .body.flush { padding: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.g-side { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
@media (max-width: 1250px) { .g2, .g3, .g-side { grid-template-columns: 1fr; } }
.empty { color: var(--muted); padding: 14px; font-size: 14px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid #263348; vertical-align: top; font-size: 14.5px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #20304a; }
td.title a { color: var(--text); font-weight: 550; }
td .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* state chips */
.chip { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 650; letter-spacing: .03em; white-space: nowrap; border: 1px solid transparent; background: var(--raised); color: var(--text-2); }
.chip.request-now, .chip.fulfilled, .chip.ok, .chip.succeeded, .chip.done, .chip.auto { background: var(--good-bg); color: var(--good); border-color: #1c6b4f; }
.chip.research, .chip.submitted, .chip.acknowledged, .chip.processing, .chip.running, .chip.in-progress, .chip.approve, .chip.ready-to-submit, .chip.paid { background: var(--info-bg); color: var(--info); border-color: #1e5f80; }
.chip.waiting-on-records, .chip.ready-for-review, .chip.fee-estimate-received, .chip.awaiting-fee-approval, .chip.fee-approved, .chip.needs-clarification, .chip.partially-fulfilled, .chip.retrying, .chip.queued, .chip.elevated, .chip.possible-duplicate, .chip.open { background: var(--warn-bg); color: var(--warn); border-color: #7a5a12; }
.chip.manual-review, .chip.manual, .chip.senior { background: var(--violet-bg); color: var(--violet); border-color: #4f4391; }
.chip.too-expensive, .chip.denied, .chip.failed, .chip.blocked, .chip.error { background: var(--bad-bg); color: var(--bad); border-color: #7f2b2b; }
.chip.skip, .chip.watch, .chip.draft, .chip.closed, .chip.withdrawn, .chip.cancelled, .chip.standard, .chip.irrelevant, .chip.neither, .chip.separate { background: var(--raised); color: var(--muted); border-color: var(--line); }
.chip.synthetic { background: transparent; color: var(--muted); border: 1px dashed #64748b; font-weight: 600; }
.chip.channel { background: var(--raised); color: var(--text); border-color: #475569; }
.chip.flag { background: var(--bad-bg); color: #fca5a5; border-color: #7f2b2b; font-weight: 550; }

.score { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; border-radius: 5px; font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
.score.t4 { background: var(--good); color: #052e22; }
.score.t3 { background: #2c7a5e; color: #eafff6; }
.score.t2 { background: #1e5f80; color: #e6f6ff; }
.score.t1 { background: var(--raised); color: var(--text-2); }
.score.t0 { background: #1a2436; color: var(--muted); border: 1px solid var(--line); }
.score.big { min-width: 72px; height: 56px; font-size: 32px; border-radius: 8px; }
.pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.pct.p-high { color: var(--good); }
.pct.p-mid { color: var(--warn); }
.pct.p-low { color: var(--muted); }
.pct.p-unknown { color: var(--muted); }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1250px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.stat .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .v.bad { color: var(--bad); }
.stat .v.warn { color: var(--warn); }
.stat .n { color: var(--muted); font-size: 12.5px; }

/* messages */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: var(--good-bg); border-color: #1c6b4f; color: #d1fae5; }
.flash.error { background: var(--bad-bg); border-color: #7f2b2b; color: #fee2e2; }
.banner { background: var(--warn-bg); border: 1px solid #7a5a12; color: #fde68a; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.banner a { color: #fff; text-decoration: underline; }
.note { background: var(--raised); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 4px; margin: 8px 0; font-size: 14px; color: var(--text-2); }
.note.warn { border-left-color: var(--warn); }
.note.bad { border-left-color: var(--bad); }

/* forms */
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], input[type=email], select, textarea {
  background: var(--raised); color: var(--text); border: 1px solid #475569; border-radius: 5px; padding: 6px 9px; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { font-family: var(--mono); font-size: 13.5px; line-height: 1.5; min-height: 90px; resize: vertical; }
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.field { margin-bottom: 10px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.fields.wide { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.check { display: flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--text-2); margin: 3px 0; }
.check input { width: auto; }
button, .btn { background: var(--raised); color: var(--text); border: 1px solid #475569; border-radius: 5px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; display: inline-block; }
button:hover, .btn:hover { background: var(--hover); text-decoration: none; }
button.primary, .btn.primary { background: #0e7490; border-color: #22a3c4; color: #fff; }
button.primary:hover { background: #1089a8; }
button.go { background: #15803d; border-color: #22a04f; color: #fff; }
button.go:hover { background: #189447; }
button.danger { background: #7f1d1d; border-color: #b23a3a; color: #fff; }
button.small, .btn.small { padding: 3px 9px; font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
form.inline { display: inline; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; align-items: end; }
.filters .wide { grid-column: span 2; }

/* dossier */
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 5px 12px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bar { height: 7px; background: #111a2a; border-radius: 4px; overflow: hidden; min-width: 90px; }
.bar > i { display: block; height: 100%; background: var(--good); }
.bar.neg > i { background: var(--bad); }
.factor { display: grid; grid-template-columns: 220px 70px 110px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #263348; font-size: 14px; }
.factor:last-child { border-bottom: 0; }
.factor .pts { font-variant-numeric: tabular-nums; font-weight: 650; }
.factor .pts.pos { color: var(--good); }
.factor .pts.neg { color: var(--bad); }
.factor .ev { color: var(--text-2); }
pre.doc { background: #111a2a; border: 1px solid var(--line); border-radius: 6px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13.5px; line-height: 1.55; margin: 0; color: var(--text); }
.kind { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 0 5px; border-radius: 3px; border: 1px solid; white-space: nowrap; }
.kind.fact { color: var(--good); border-color: #1c6b4f; }
.kind.inf { color: var(--warn); border-color: #7a5a12; }
.kind.unk { color: var(--muted); border-color: var(--line); }
details { border-top: 1px solid #263348; padding: 8px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; color: var(--text-2); font-weight: 550; }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.login { max-width: 360px; margin: 12vh auto; }
.steps { display: flex; flex-wrap: wrap; gap: 4px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 2px 0; }
.panel .body, ul.plain li, td { overflow-wrap: anywhere; }
th, td.nowrap, .nowrap { overflow-wrap: normal; }

/* second run: three opinions, calibration, intake */
.scores4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.sbox { background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.sbox.final { border-color: #5b7aa8; background: #26374f; }
.sbox .k { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.sbox .v { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; min-height: 30px; }
.sbox .n { color: var(--muted); font-size: 12.5px; }
.chip.pursue { background: var(--good-bg); color: var(--good); border-color: #1c6b4f; }
.chip.maybe { background: var(--warn-bg); color: var(--warn); border-color: #7a5a12; }
.chip.pass { background: var(--raised); color: var(--muted); border-color: var(--line); }
.chip.lowinfo { background: #23314a; color: #b9c7dc; border: 1px dashed #7388a8; }
.chip.synthetic { background: #3a2a4d; color: #e9d5ff; border: 1px dashed #a78bfa; font-weight: 700; letter-spacing: .04em; }
tr.synthetic td { background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(167, 139, 250, .06) 14px 28px); }
.testbar { background: #3a2a4d; border: 1px dashed #a78bfa; color: #e9d5ff; padding: 7px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 14px; }
.testbar a { color: #fff; text-decoration: underline; }
.quote { border-left: 3px solid #5b7aa8; padding: 2px 10px; margin: 4px 0; color: var(--text-2); font-size: 14px; }
.aidim { padding: 7px 0; border-bottom: 1px solid #263348; }
.aidim:last-of-type { border-bottom: 0; }
.aidim .h { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.pts.pos, strong.pos { color: var(--good); } .pts.neg, strong.neg { color: var(--bad); }
.mini { font-size: 14px; padding: 2px 0; }
.mini .pts { display: inline-block; min-width: 34px; font-weight: 650; font-variant-numeric: tabular-nums; }
.verdicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.verdicts .v { font-size: 20px; padding: 16px 10px; font-weight: 750; letter-spacing: .04em; border-width: 2px; }
.verdicts .pursue { background: #15803d; border-color: #2bbf63; color: #fff; }
.verdicts .maybe { background: #8a6a12; border-color: #d9a520; color: #fff; }
.verdicts .pass { background: #3a4558; border-color: #7388a8; color: #fff; }
.verdicts .v:hover, .verdicts .v.pressed { filter: brightness(1.2); }
.key { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid rgba(255,255,255,.45); border-radius: 4px; font-size: 12px; font-weight: 700; text-align: center; margin-right: 4px; font-family: var(--mono); }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { margin: 0; cursor: pointer; }
.tag input { position: absolute; opacity: 0; width: 0; }
.tag span { display: inline-block; padding: 4px 9px; border: 1px solid #475569; border-radius: 5px; background: var(--raised); color: var(--text-2); font-size: 13.5px; }
.tag input:checked + span { background: #0e7490; border-color: #22a3c4; color: #fff; }
.tag input:focus-visible + span { outline: 2px solid var(--accent); }
.excerpt { background: #111a2a; border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.5; }
button.big, .btn.big { font-size: 16px; padding: 10px 18px; }
.progress { height: 10px; background: #111a2a; border-radius: 5px; overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.progress.done > i { background: var(--good); } .progress.bad > i { background: var(--bad); }
.drop { border: 2px dashed #5b7aa8; border-radius: 10px; padding: 34px 16px; text-align: center; color: var(--text-2); background: #18243a; }
.drop.over { background: #1f3350; border-color: var(--accent); }
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 14px; font-size: 14px; }
.ck { display: flex; gap: 7px; align-items: baseline; }
.ck b { font-family: var(--mono); min-width: 44px; }
.ck.yes b { color: var(--good); } .ck.no b { color: var(--bad); } .ck.unk b { color: var(--warn); }
.seg { display: grid; grid-template-columns: 170px 110px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid #263348; font-size: 14.5px; }
.seg .t { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.seg .sp { font-weight: 650; color: var(--accent); font-size: 13px; }

/* phones: the frame becomes a strip, tables scroll sideways, grids stack */
.navtoggle { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 8px; align-items: center; }
  .nav .brand-sub, .nav .group { display: none; }
  .nav .brand { width: 100%; padding: 2px 6px 6px; }
  .nav a { padding: 6px 9px; font-size: 14px; }
  .nav .who { margin: 0 0 0 auto; border: 0; padding: 4px 6px; }
  .main { padding: 12px 10px 50px; }
  .head { flex-direction: column; }
  .panel > .body.flush, .panel > .body { overflow-x: auto; }
  table { min-width: 620px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .scores4 { grid-template-columns: repeat(2, 1fr); }
  .verdicts .v { font-size: 17px; padding: 18px 6px; }
  .kv { grid-template-columns: 110px 1fr; }
  .factor { grid-template-columns: 1fr 60px; } .factor .bar, .factor .ev { grid-column: 1 / -1; }
  .side-by-side { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr; gap: 2px; }
}

/* nothing inside a grid or a panel may push the page wider than the screen */
.grid > *, .shell > *, .panel, .panel > .body { min-width: 0; }
pre.doc { max-width: 100%; }
@media (max-width: 860px) {
  .head .row, .head .row.end { justify-content: flex-start; }
  .btn.big, button.big { font-size: 15px; padding: 9px 12px; }
  .panel > header { flex-wrap: wrap; }
  .score.big { min-width: 56px; height: 46px; font-size: 26px; }
  .head > div.row { flex-wrap: wrap !important; }
  h1 { font-size: 19px; overflow-wrap: anywhere; }
  .checklist { grid-template-columns: 1fr; }
  .fields, .fields.wide, .filters { grid-template-columns: 1fr 1fr; }
  .tag span { padding: 7px 10px; }
}

/* ---- production ---- */
.flash.warn { background: var(--warn-bg); border-color: #7a5a12; color: #fde68a; }
.lanes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.lane { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.lane > h3 { margin: 0; padding: 8px 10px; font-size: 12px; letter-spacing: .06em; color: var(--text-2); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.lane .cards { padding: 8px; display: grid; gap: 8px; min-height: 54px; }
.pcard { display: block; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; color: var(--text); }
.pcard:hover { background: var(--hover); text-decoration: none; }
.pcard.failed { border-color: var(--bad); }
.pcard .code { font: 12px var(--mono); color: var(--muted); }
.pcard .t { font-weight: 600; margin: 2px 0 4px; overflow-wrap: anywhere; }
.pcard .next { font-size: 13px; color: var(--text-2); }
.pcard.failed .next { color: var(--bad); }
.nextbar { background: var(--info-bg); border: 1px solid #1f5f80; border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; }
.nextbar.failed { background: var(--bad-bg); border-color: #7f2b2b; }
.nextbar .lbl { font-size: 12px; letter-spacing: .06em; color: var(--text-2); }
.nextbar .what { font-size: 17px; font-weight: 600; }
.stagebar { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.stagebar span { font-size: 11px; padding: 3px 7px; border-radius: 4px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.stagebar span.on { background: var(--info-bg); color: var(--text); border-color: #1f5f80; font-weight: 600; }
.player { background: #000; border-radius: 6px; width: 100%; max-height: 62vh; display: block; }
.playerwrap { position: relative; }
.playerwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; display: none; }
.playerwrap.drawing canvas { display: block; }
.synclane { position: relative; height: 30px; background: var(--ground); border: 1px solid var(--line); border-radius: 4px; margin: 4px 0 10px; }
.synclane i { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; background: #2f6f8f; min-width: 3px; }
.synclane i.ref { background: #2f8f6a; }
.synclane i.check { background: #8f7a2f; }
.synclane i.audio { background: #6a55a8; }
.cover { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.cover a { padding: 4px 10px; border-radius: 5px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font-weight: 600; }
.cover a.on { background: var(--info-bg); border-color: var(--accent); }
.tline { display: grid; grid-template-columns: 92px 130px minmax(0, 1fr); gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tline:hover { background: var(--raised); }
.tline.now { background: var(--info-bg); }
.tline.sel { box-shadow: inset 3px 0 0 var(--warn); }
.tline .t { font: 12px var(--mono); color: var(--muted); }
.tline .sp { font-weight: 600; font-size: 13px; }
.tscroll { max-height: 62vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.mk { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: var(--violet-bg); color: var(--violet); margin-right: 4px; }
.mk.proposed { border: 1px dashed var(--violet); background: transparent; }
.mk.privacy, .mk.graphic, .mk.remove { background: var(--bad-bg); color: #fecaca; }
.vcard { max-width: 760px; margin: 0 auto; }
.vcard .code { font: 600 15px var(--mono); color: var(--accent); }
.vcard .script { font-size: 26px; line-height: 1.4; padding: 18px 20px; background: var(--raised); border-radius: 8px; border: 1px solid var(--line); margin: 8px 0 14px; }
.vcard dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px 12px; margin: 0 0 14px; }
.vcard dt { font-size: 12px; letter-spacing: .06em; color: var(--muted); padding-top: 3px; }
.vcard dd { margin: 0; font-size: 16px; }
.vbtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vbtns button, .vbtns .btn { font-size: 17px; padding: 16px 8px; font-weight: 700; width: 100%; text-align: center; }
button.rec { background: #b91c1c; border-color: #ef4444; color: #fff; }
button.rec.live { animation: pulse 1s infinite; }
button.go { background: #166534; border-color: #22c55e; color: #fff; }
@keyframes pulse { 50% { opacity: .55; } }
.meter { height: 10px; background: var(--ground); border-radius: 5px; overflow: hidden; margin: 10px 0; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; width: 0; background: var(--good); }
.vwarn { padding: 10px 14px; border-radius: 6px; margin: 8px 0; font-size: 16px; }
.vwarn.redo { background: var(--bad-bg); color: #fee2e2; border: 1px solid #7f2b2b; }
.vwarn.note { background: var(--warn-bg); color: #fde68a; border: 1px solid #7a5a12; }
.vwarn.fine { background: var(--good-bg); color: #d1fae5; border: 1px solid #1c6b4f; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.thumbs figure { margin: 0; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.thumbs figure.on { border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.thumbs img { width: 100%; border-radius: 4px; display: block; }
.qa-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qa-row .hint { font-size: 13px; color: var(--muted); }
.qa-row .pick { display: flex; gap: 10px; align-items: flex-start; }
.qa-row .pick label { display: flex; gap: 4px; align-items: center; font-size: 13px; }
table.tl td { vertical-align: top; }
table.tl tr.narration td { background: rgba(125, 211, 252, .06); }
@media (max-width: 1250px) { .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .lanes, .thumbs { grid-template-columns: minmax(0, 1fr); }
  .tline { grid-template-columns: 70px minmax(0, 1fr); }
  .tline .sp { grid-column: 2; }
  .tline > div:last-child { grid-column: 1 / -1; }
  .vcard .script { font-size: 22px; padding: 14px; }
  .vbtns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qa-row { grid-template-columns: minmax(0, 1fr); }
}
.chip.ok { background: var(--good-bg); color: var(--good); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
button:disabled { opacity: .4; cursor: not-allowed; }

/* The nine-part brief on First requests, the five-part task sheet, reply suggestions, readiness. */
.brief { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 18px; margin-top: 10px; }
.brief > div { background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; min-width: 0; }
.brief h3, .sheet h3 { margin: 0 0 5px; font-size: 12.5px; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.brief p { margin: 0 0 4px; font-size: 14.5px; overflow-wrap: anywhere; }
.brief .gap p { color: #fde68a; }
.sheet > div { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 14px; margin-bottom: 10px; background: var(--raised); }
.sheet > div.never { border-left-color: var(--bad); }
.sheet > div.copy { border-left-color: var(--good); }
.sheet pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 15px; line-height: 1.5; }
.sheet > div.copy pre { font-family: var(--mono); font-size: 13.5px; }
.suggest { background: var(--raised); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.suggest.applied { border-left-color: var(--good); } .suggest.dismissed, .suggest.filed { border-left-color: var(--line); }
.suggest .what { font-size: 15.5px; font-weight: 650; }
.ready-grid { display: grid; grid-template-columns: minmax(190px, 260px) minmax(110px, 170px) 1fr; gap: 6px 14px; font-size: 14.5px; align-items: baseline; }
.ready-grid .k { letter-spacing: .04em; font-size: 13px; color: var(--text-2); font-weight: 650; }
.ready-grid .v { font-family: var(--mono); font-weight: 650; }
.ready-grid .v.ok { color: var(--good); } .ready-grid .v.bad { color: var(--bad); } .ready-grid .v.warn { color: var(--warn); }
@media (max-width: 720px) { .ready-grid { grid-template-columns: 1fr 1fr; } .ready-grid .d { grid-column: 1 / -1; margin-bottom: 6px; } }

/* story-first discovery */
nav.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 12px; border-bottom: 1px solid var(--line); }
nav.tabs a { padding: 7px 12px; border-radius: 6px 6px 0 0; color: var(--text-2); }
nav.tabs a.on { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-bottom-color: var(--panel); margin-bottom: -1px; }
.filters { margin-bottom: 10px; gap: 8px; }
.scard header { align-items: flex-start; gap: 14px; }
.scard h2 { font-size: 17px; margin-top: 3px; }
.scard.judged { opacity: .72; }
.scard .summary { margin: 0 0 8px; color: var(--text); }
.scard .why { margin: 0 0 10px; color: var(--text-2); font-size: 14px; }
.verdictbox { min-width: 300px; }
.vform { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.vform .v { font-weight: 750; letter-spacing: .04em; padding: 8px 14px; border-width: 2px; color: #fff; }
.vform .pursue { background: #15803d; border-color: #2bbf63; }
.vform .maybe { background: #8a6a12; border-color: #d9a520; }
.vform .pass { background: #3a4558; border-color: #7388a8; }
.vform .v:hover { filter: brightness(1.2); }
.vform .vnote { flex-basis: 100%; }
.vstate { text-align: right; margin-top: 4px; min-height: 1.2em; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.four .box { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.four .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.four .v { font-size: 24px; font-weight: 700; }
.four .v.small-v { font-size: 15px; padding: 4px 0; }
.four .of { font-size: 13px; color: var(--muted); font-weight: 500; }
.four .n { font-size: 13px; color: var(--text-2); }
.fitem { margin: 6px 0; }
.chip.fs-public { background: var(--good-bg); color: var(--good); border-color: #1c6b4f; }
.chip.fs-confirmed { background: var(--info-bg); color: var(--info); border-color: #1e5f80; }
.chip.fs-likely { background: var(--warn-bg); color: var(--warn); border: 1px dashed #7a5a12; }
.chip.fs-unknown { background: var(--raised); color: var(--muted); border: 1px dashed var(--line); }
.chip.fs-none { background: var(--raised); color: var(--muted); border-color: var(--line); text-decoration: line-through; }
.chip.lvl-easy, .chip.lvl-low { background: var(--good-bg); color: var(--good); }
.chip.lvl-moderate, .chip.lvl-medium { background: var(--warn-bg); color: var(--warn); }
.chip.lvl-hard, .chip.lvl-high { background: var(--bad-bg); color: var(--bad); }
.chip.lvl-unknown { background: var(--raised); color: var(--muted); border: 1px dashed var(--line); }
.chip.outcome.court { background: var(--info-bg); color: var(--info); }
.chip.outcome.alleged { background: var(--raised); color: var(--text-2); border: 1px dashed var(--line); }
.chip.arch-type { background: var(--violet-bg); color: var(--violet); border-color: #4f4391; }
.chip.arch-element { background: var(--raised); color: var(--text); border-color: #475569; }
.chip.research-import { background: #3a2a4d; color: #e9d5ff; border-color: #a78bfa; }
.chip.lane { background: var(--raised); color: var(--text-2); border-color: var(--line); }
details.arch { display: inline-block; margin: 0 6px 4px 0; vertical-align: top; }
details.arch[open] { display: block; }
@media (max-width: 1000px) { .four { grid-template-columns: 1fr 1fr; } .verdictbox { min-width: 0; width: 100%; } .vform { justify-content: flex-start; } }
table.cmp td:nth-child(2) { min-width: 200px; }
table.cmp .chip { white-space: normal; }
.qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px; margin: 6px 0 12px; }
.qa h3 { margin: 4px 0 4px; }
.chip.rd-ready { background: var(--good-bg); color: var(--good); border-color: #1c6b4f; }
.chip.rd-research { background: var(--warn-bg); color: var(--warn); border-color: #7a5a12; }
.chip.rd-hold { background: var(--raised); color: var(--muted); border-color: var(--line); }
.ok-txt { color: var(--good); }
.bad-txt { color: var(--bad); }
@media (max-width: 1000px) { .qa { grid-template-columns: 1fr; } }
.chip.tier { background: var(--info-bg); color: var(--info); border-color: #1e5f80; }

/* owner operations: Today, the quote card, pairing (phone first) */
.flash.warn { background: var(--warn-bg); border-color: #7a5a12; color: #fef3c7; }
.act { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; background: var(--ground); }
.act.urgent { border-left-color: var(--bad); }
.act.action { border-left-color: var(--warn); }
.act.info { border-left-color: var(--info); }
.act-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.act-title { font-size: 17px; font-weight: 650; margin: 2px 0 4px; }
.act-buttons, .decide-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.act-buttons form { margin: 0; }
.decide-buttons button { min-height: 52px; font-size: 17px; flex: 1 1 200px; }
.decide-buttons button[disabled] { opacity: .45; cursor: not-allowed; }
.money-big { font-size: 26px; font-weight: 700; }
.handoff { border: 1px dashed #475569; border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.handoff .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pair-code { font-size: 44px; letter-spacing: .2em; font-weight: 700; margin: 12px 0; }
@media (max-width: 860px) {
  .decide-buttons button { flex: 1 1 100%; }
  .act-buttons .btn, .act-buttons button { flex: 1 1 45%; text-align: center; }
  .money-big { font-size: 30px; }
}

/* ===== Light theme (owner, 2026-11-18: "why is everything so dark"). Kennest Beacon scheme, Light.
   Redefines the surface variables and overrides every hard-coded dark value above. Colour still carries state only. */
:root {
  --frame: #e8ecef; --ground: #f7fbfe; --panel: #fefefe; --raised: #f1f4f6; --hover: #e8ecef; --line: #d8dde1;
  --text: #172128; --text-2: #39444c; --muted: #59656e; --accent: #036bb9;
  --good: #17703f; --good-bg: #e2f4ea; --warn: #7a4f00; --warn-bg: #fff1d2; --bad: #b42318; --bad-bg: #fde6e3;
  --info: #036bb9; --info-bg: #e3f0fb; --violet: #5b3fb0; --violet-bg: #eee9fb;
}
html { color-scheme: light; }
.nav { border-right-color: var(--line); }
.nav a:hover { background: var(--hover); }
.nav a.on { color: var(--text); background: #dde7f0; }
.nav .group { color: var(--muted); }
.nav .who { border-top-color: var(--line); }
td, .factor, details, .aidim, .seg { border-bottom-color: var(--line); }
details { border-top-color: var(--line); }
tbody tr:hover td { background: #eef4f9; }
.chip.request-now, .chip.fulfilled, .chip.ok, .chip.succeeded, .chip.done, .chip.auto, .chip.pursue, .chip.fs-public, .chip.rd-ready, .kind.fact { border-color: #9fd3b6; }
.chip.research, .chip.submitted, .chip.acknowledged, .chip.processing, .chip.running, .chip.in-progress, .chip.approve, .chip.ready-to-submit, .chip.paid, .chip.fs-confirmed, .chip.tier { border-color: #9cc6ea; }
.chip.waiting-on-records, .chip.ready-for-review, .chip.fee-estimate-received, .chip.awaiting-fee-approval, .chip.fee-approved, .chip.needs-clarification, .chip.partially-fulfilled, .chip.retrying, .chip.queued, .chip.elevated, .chip.possible-duplicate, .chip.open, .chip.maybe, .chip.fs-likely, .chip.rd-research, .kind.inf { border-color: #e6c77a; }
.chip.manual-review, .chip.manual, .chip.senior, .chip.arch-type { border-color: #c3b5ee; }
.chip.too-expensive, .chip.denied, .chip.failed, .chip.blocked, .chip.error, .chip.flag { border-color: #f0b4ac; }
.chip.flag { color: var(--bad); }
.chip.channel, .chip.arch-element { border-color: var(--line2, #b5bbc0); }
.chip.synthetic, .chip.research-import, .testbar { background: #f3ecfd; color: #5b3fb0; border-color: #a78bfa; }
.chip.lowinfo { background: var(--raised); color: var(--muted); border-color: #b5bbc0; }
.testbar a, .banner a { color: inherit; }
.score.t3 { background: #2c7a5e; color: #fff; }
.score.t2 { background: #1e5f80; color: #fff; }
.score.t0 { background: var(--raised); }
.flash.ok, .vwarn.fine { color: var(--good); border-color: #9fd3b6; }
.flash.error, .vwarn.redo { color: var(--bad); border-color: #f0b4ac; }
.flash.warn, .banner, .vwarn.note { color: var(--warn); border-color: #e6c77a; }
.brief .gap p { color: var(--warn); }
.mk.privacy, .mk.graphic, .mk.remove { color: var(--bad); }
input, select, textarea, button, .btn, .tag span { border-color: #b5bbc0; }
.key { border-color: rgba(0,0,0,.35); }
.bar, .progress, pre.doc, .excerpt { background: var(--raised); }
.sbox.final { background: #e3f0fb; border-color: #7aa7d6; }
.drop { background: #f1f6fb; border-color: #7aa7d6; }
.drop.over { background: #e3f0fb; }
.handoff { border-color: #b5bbc0; }
.nextbar, .stagebar span.on { border-color: #9cc6ea; }
.nextbar.failed { border-color: #f0b4ac; }
table.tl tr.narration td { background: rgba(3, 107, 185, .06); }
