:root {
  --page: #f6f5f2; --surface: #ffffff; --surface-2: #f1f0ec; --line: #e1e0d9; --line-strong: #c3c2b7;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #7b7973;
  --brand: #1c5cab; --brand-ink: #ffffff; --brand-soft: #e6effb; --bar: #2a78d6;
  --good: #006300; --good-bg: #e3f4e3; --warn: #7a5200; --warn-bg: #fdf0cf;
  --bad: #a32020; --bad-bg: #fbe4e4; --info: #184f95; --info-bg: #e6effb; --neutral-bg: #ecebe6;
  --mark: #fff1b8; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --radius: 10px; --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0f0f0e; --surface: #1a1a19; --surface-2: #232321; --line: #2c2c2a; --line-strong: #44443f;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #8f8d86;
    --brand: #6da7ec; --brand-ink: #0b0b0b; --brand-soft: #1b2b40; --bar: #3987e5;
    --good: #5fd35f; --good-bg: #16301a; --warn: #f2c14e; --warn-bg: #3a2e10;
    --bad: #f08a8a; --bad-bg: #3b1818; --info: #9ec5f4; --info-bg: #1b2b40; --neutral-bg: #2a2a28;
    --mark: #5a4a10; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; line-height: 1.25; margin: 0; font-weight: 650; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 12px; margin: 0 0 6px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.boot { padding: 80px; text-align: center; color: var(--muted); }

/* ---- shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 18px 18px 14px; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 15px; }
.brand .logo { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.tenant { padding: 0 18px 12px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 12px 10px 4px; }
nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 7px; color: var(--ink-2); font-weight: 500; }
nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
nav a .count { font-size: 11.5px; background: var(--neutral-bg); color: var(--ink-2); border-radius: 20px; padding: 0 7px; font-weight: 600; }
.who { border-top: 1px solid var(--line); padding: 12px 18px; font-size: 12.5px; }
.who b { display: block; font-size: 13.5px; }
.who .row { display: flex; gap: 10px; margin-top: 6px; }
main { padding: 26px 32px 60px; min-width: 0; max-width: 1380px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head .sub { color: var(--ink-2); margin-top: 4px; max-width: 78ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

/* ---- controls */
button, .btn { font: inherit; font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button:hover, .btn:hover { background: var(--surface-2); text-decoration: none; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.primary:hover { filter: brightness(1.08); background: var(--brand); }
button.danger { color: var(--bad); border-color: var(--bad); }
button.ghost { border-color: transparent; background: transparent; color: var(--brand); padding: 4px 6px; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; min-width: 0; }
textarea { width: 100%; min-height: 96px; resize: vertical; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 12px; } .field input, .field select { width: 100%; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input[type=search] { width: 220px; }

/* ---- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.grid > .card, .grid > form.card { margin-top: 0; }
.kpi .value.na { font-size: 17px; font-weight: 600; color: var(--muted); letter-spacing: 0; padding: 9px 0 8px; }
.kpi .label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.kpi .value { font-size: 28px; font-weight: 680; letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi .note { font-size: 12.5px; color: var(--muted); }
.banner { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--info-bg); color: var(--info); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.banner.warn { background: var(--warn-bg); color: var(--warn); } .banner.bad { background: var(--bad-bg); color: var(--bad); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

/* ---- tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 9px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: var(--surface); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
tr.removed td { color: var(--muted); } tr.removed .strike { text-decoration: line-through; }
td .title { font-weight: 600; color: var(--ink); } td .subline { font-size: 12.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 20px; background: var(--neutral-bg); color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }

/* ---- bars (single series, direct labels) */
.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr max-content; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; position: relative; }
.bar-track, .bar-fill { display: block; }
.bar-fill { height: 10px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; width: 0; transition: width .35s ease; }
.bar-row:hover .bar-fill { filter: brightness(1.15); }
.bar-row .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.meter { height: 8px; background: var(--neutral-bg); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.meter > div { height: 100%; background: var(--bar); width: 0; border-radius: 4px; }

/* ---- pipeline */
.stages { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; counter-reset: stage; }
.stage { padding: 4px 12px 2px; border-left: 2px solid var(--line); counter-increment: stage; }
.stage:first-child { border-left: 0; padding-left: 0; }
.stage .n { font-size: 11px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.stage .n::before { content: counter(stage) ". "; }
.stage .v { font-size: 18px; font-weight: 680; font-variant-numeric: tabular-nums; }
.stage .d { font-size: 12px; color: var(--muted); }

/* ---- evidence */
.quote { background: var(--surface-2); border-left: 3px solid var(--brand); padding: 12px 14px; border-radius: 0 8px 8px 0; margin: 8px 0 10px; font-size: 14px; }
.clause { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.clause:last-child { border-bottom: 0; }
.clause .ref { font-weight: 700; font-size: 12.5px; color: var(--brand); margin-right: 8px; }
.clause pre { margin: 6px 0 0; white-space: pre-wrap; font: 13.5px/1.55 var(--font); color: var(--ink-2); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.checks li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start; font-size: 13.5px; }
.checks .d { color: var(--muted); font-size: 12.5px; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 7px 0 7px 14px; border-left: 2px solid var(--line); margin-left: 4px; }
.decision { position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow); }

/* ---- dialog, toast, login */
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 22px; width: min(520px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { font-size: 17px; }
dialog .actions { justify-content: flex-end; margin-top: 16px; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--ink); color: var(--page); padding: 10px 14px; border-radius: 9px; font-size: 13.5px; max-width: 420px; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(400px, 100%); padding: 28px; }
.login .brand { padding: 0 0 6px; font-size: 18px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.secret { font-family: var(--mono); background: var(--surface-2); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; display: block; margin: 6px 0 12px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 13px; color: var(--muted); }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } nav { display: flex; flex-wrap: wrap; } nav .group { display: none; }
  main { padding: 18px 16px 50px; } .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main, .g2 { grid-template-columns: 1fr; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .stage { border-left: 0; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .bar-fill { transition: none; } }
@media print { .side, .actions, .filters, .decision button { display: none !important; } .shell { display: block; } .card { box-shadow: none; } }

/* Finished workspace: quiet surfaces, clear priorities and persistent navigation. */
:root {
  color-scheme: light;
  --page: #f4f6f8; --surface: #fff; --surface-2: #f3f6f8; --line: #e3e8ed; --line-strong: #c8d1da;
  --ink: #192b3b; --ink-2: #526373; --muted: #677889;
  --brand: #087f79; --brand-ink: #fff; --brand-soft: #e6f4f0; --bar: #15968a;
  --good: #176745; --good-bg: #e7f4ec; --warn: #80591d; --warn-bg: #fcf2df;
  --bad: #a33538; --bad-bg: #fbecee; --info: #305e84; --info-bg: #eaf2f9; --neutral-bg: #eef1f4;
  --mark: #fef0bf; --shadow: 0 2px 6px #233a4c04; --radius: 12px;
}
body { font-size: 14px; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
h2 { font-size: 16px; letter-spacing: -.015em; }
h3 { color: var(--ink-2); font-size: 11px; }
.icon { width: 19px; height: 19px; flex-shrink: 0; vertical-align: middle; }
.shell { grid-template-columns: 234px minmax(0,1fr); }
.side { background: #122b39; color: #d2dfe6; border: 0; }
.brand { color: #fff; padding: 29px 24px 25px; align-items: center; font-size: 22px; font-weight: 650; letter-spacing: -.04em; line-height: 1.2; }
.brand:hover { color: #fff; text-decoration: none; }
.brand .logo { width: 36px; height: 39px; background: #1d444f; color: #9ce6d3; border: 1px solid #38606a; border-radius: 10px; }
.brand .logo .icon { width: 21px; height: 24px; }
.brand-sub { display: block; margin-top: 6px; font-size: 8px; font-weight: 600; letter-spacing: .17em; color: #9cb3bf; }
.tenant { margin: 0 16px 8px; padding: 14px 10px; border-top: 1px solid #2c4350; border-bottom: 1px solid #2c4350; color: #ccdae2; font-weight: 550; font-size: 12px; }
nav { padding: 4px 12px 20px; }
nav { scrollbar-width: thin; scrollbar-color: #3f5967 #122b39; }
nav .group { padding: 20px 12px 8px; color: #8fa8b6; font-size: 9px; letter-spacing: .15em; }
nav a { justify-content: flex-start; gap: 12px; color: #bdcdd7; font-size: 12.5px; padding: 10px 12px; margin-bottom: 2px; border-radius: 7px; }
nav a .icon { width: 17px; height: 17px; opacity: .85; }
nav a:hover { background: #203d4b; color: #fff; }
nav a.on { background: #224955; color: #b0f0dd; box-shadow: inset 3px 0 #84d6bc; }
.who { display: flex; gap: 10px; align-items: flex-start; padding: 18px; border-color: #2c4350; font-size: 10px; color: #9bb1be; }
.who b { color: #e5edf1; font-size: 12px; font-weight: 550; }
.who a { color: #b7cdd8; font-size: 11px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #294754; color: #d0ebe7; display: grid; place-items: center; font-weight: 600; }
.workspace { min-width: 0; }
.topbar { min-height: 64px; padding: 16px 34px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; font-size: 11px; color: var(--ink-2); }
.topbar b { font-weight: 550; color: var(--ink); margin-left: 8px; }
.topbar .muted { margin-left: 8px; }
.workspace-tag { font-size: 10px; padding: 4px 9px; border: 1px solid #dce6e8; border-radius: 5px; color: #5c7078; white-space: nowrap; }
main { padding: 32px 34px 28px; margin: 0 auto; max-width: 1560px; }
.workspace-footer { max-width: 1560px; margin: 0 auto; padding: 12px 34px 24px; font-size: 11px; color: #748493; }
.head { margin-bottom: 26px; align-items: center; gap: 18px; }
.head .sub { font-size: 12.5px; margin-top: 9px; line-height: 1.6; }
button, .btn { padding: 9px 14px; border-radius: 7px; font-size: 12px; min-height: 36px; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font-size: 13px; border-radius: 6px; min-height: 37px; }
input[type=checkbox] { min-height: auto; accent-color: var(--brand); }
.card { padding: 21px; }
.card.flush { padding: 0; }
.grid { gap: 18px; }
.card + .grid,.grid + .card,.grid + .grid,.card + .card { margin-top: 22px; }
.grid > .card { margin-top: 0; }
.kpi { position: relative; }
.g4 > .kpi:first-child { border-top: 3px solid #087f79; padding-top: 19px; }
.kpi .label { font-size: 11px; color: #596c7c; font-weight: 550; }
.kpi .value { font-size: clamp(24px,2.5vw,34px); letter-spacing: -.04em; margin: 9px 0 8px; line-height: 1.15; }
.kpi .note { font-size: 10.5px; line-height: 1.5; }
.kpi .value.na { font-size: 17px; padding: 4px 0; }
.priority-grid { grid-template-columns: minmax(0,1.85fr) minmax(240px,1fr); align-items: stretch; margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; }
.section-heading h2 { margin: 3px 0 0; }
.section-heading a { font-size: 11px; font-weight: 550; }
.card:not(.flush) > .section-heading { padding: 0 0 18px; }
.eyebrow { display: block; font-size: 9px; letter-spacing: .12em; font-weight: 650; color: #708391; margin-bottom: 5px; }
.count-pill { display: inline-flex; font-size: 10px; padding: 2px 7px; background: var(--surface-2); border-radius: 5px; margin-left: 6px; color: var(--muted); vertical-align: middle; }
.priority-item { display: grid; grid-template-columns: 24px minmax(0,1fr) auto 12px; align-items: center; gap: 14px; padding: 17px 22px; border-top: 1px solid var(--line); color: var(--ink); }
.priority-item:hover { background: #f7fbfa; text-decoration: none; }
.priority-index { font-size: 10px; color: #82939f; font-variant-numeric: tabular-nums; }
.priority-item b { display: block; font-size: 12px; font-weight: 600; }
.priority-item div > span { display: block; font-size: 10px; margin-top: 5px; color: var(--muted); }
.priority-item strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.priority-arrow { color: var(--brand); font-size: 16px; }
.coverage-card { background: #f9fcfb; border-color: #d6e7e1; }
.coverage-card h2 { font-size: 14px; margin-top: 8px; }
.coverage-number { font-size: 46px; font-weight: 650; line-height: 1; letter-spacing: -.05em; color: #126f66; margin: 22px 0 8px; }
.coverage-number span { font-size: 24px; margin-left: 2px; }
.coverage-card p { font-size: 11px; color: var(--ink-2); }
.coverage-card .meter { margin: 16px 0 22px; height: 5px; }
.coverage-stats { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin: 0 0 20px; font-size: 11px; }
.coverage-stats dt { color: var(--ink-2); }
.coverage-stats dd { margin: 0; font-weight: 650; }
.coverage-card > a { font-size: 11px; font-weight: 600; }
.coverage-card .coverage-note { margin: 12px 0 0; font-size: 10px; }
.stages { padding: 10px 0; }
.stage .n { font-size: 9px; letter-spacing: 0; color: #6e808f; }
.stage .v { font-size: 21px; margin-top: 8px; }
.stage .d { font-size: 10px; line-height: 1.6; margin-top: 3px; }
#runline { margin: 17px 0 0; border-top: 1px solid var(--line); padding-top: 15px; font-size: 10px; }
.pipeline-card { margin-bottom: 22px; }
th { padding: 13px 15px; background: #f9fafb; font-size: 9px; }
td { padding: 14px 15px; font-size: 12px; }
td .subline { font-size: 10px; margin-top: 4px; }
table .badge { font-size: 9.5px; }
.badge { font-size: 10px; padding: 3px 8px; font-weight: 550; }
tr.click:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.filters { gap: 7px; margin-bottom: 16px; }
.filters select { font-size: 11px; max-width: 220px; }
.filters input[type=search] { flex: 1; min-width: 180px; }
.pager { font-size: 11px; padding: 14px 16px; }
.empty { padding: 44px 24px; font-size: 12px; }
.empty > b { display: block; color: var(--ink); margin-bottom: 8px; }
.empty p { margin-bottom: 16px; }
.empty-icon { margin: 0 auto 15px; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.empty-icon .icon { width: 25px; height: 25px; }
.error-text { color: var(--bad); }
.connection-intro { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 2px 0 28px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.connection-intro > div { display: grid; grid-template-columns: 26px 1fr; gap: 3px 9px; }
.connection-intro .icon { grid-row: span 2; color: var(--brand); margin-top: 3px; }
.connection-intro b { font-size: 12px; font-weight: 600; }
.connection-intro span,.connection-intro a { font-size: 11px; color: var(--muted); }
.source-card h2 { font-size: 18px; }
.source-path { font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; padding: 10px 12px; background: var(--surface-2); border-radius: 5px; margin: 18px 0; }
.source-icon { background: var(--brand-soft); border-radius: 9px; padding: 11px; color: var(--brand); }
.source-card .actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.source-card .kv { font-size: 12px; }
.kv { grid-template-columns: minmax(85px,max-content) minmax(0,1fr); }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--brand); font-size: 12px; font-weight: 550; }
details p { margin: 8px 0; }
.mapping-help { font: 11px/1.7 var(--mono); background: var(--surface-2); border-radius: 6px; padding: 12px; overflow-wrap: anywhere; margin: 10px 0 18px; }
.wide-dialog { width: min(760px,94vw); max-height: 90vh; overflow: auto; }
.span-2 { grid-column: span 2; }
.check-label { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 12px; }
.system-note { margin-top: 24px; }
.system-boundary { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.review-notes { margin-top: 24px; }
.inline-field { margin: 0; }
.inline-field label { font-size: 11px; }
#review-note { margin-top: 22px; }
.full { width: 100%; justify-content: center; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(380px,1.1fr) minmax(400px,1fr); background: #fff; }
.login-story { background: #122b39; color: #e0e9ee; padding: 18px 8% 32px; display: flex; flex-direction: column; }
.login-story .brand { padding-left: 0; }
.login-message { margin: auto 0; padding: 55px 0; max-width: 530px; }
.login-message .eyebrow { color: #9cc7c5; letter-spacing: .15em; font-size: 10px; margin-bottom: 22px; }
.login-message h1 { font-size: clamp(34px,3.7vw,56px); font-weight: 550; color: #f4f8fa; line-height: 1.12; }
.login-message > p { color: #a5bbc8; font-size: 15px; margin: 25px 0 32px; max-width: 410px; line-height: 1.8; }
.login-proof { display: grid; grid-template-columns: 28px 1fr; gap: 24px 16px; padding-top: 30px; border-top: 1px solid #35505d; }
.login-proof > span { font-size: 11px; color: #81c5b4; border: 1px solid #385762; border-radius: 50%; height: 28px; display: grid; place-items: center; }
.login-proof b { font-size: 13px; font-weight: 550; }
.login-proof p { color: #99b0bf; font-size: 12px; margin: 4px 0 0; }
.login-footer { color: #829caa; font-size: 11px; }
.login-form-area { display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-card { width: 100%; max-width: 370px; }
.login-card h2 { font-size: 31px; font-weight: 600; margin: 10px 0; letter-spacing: -.04em; }
.login-card > p { font-size: 13px; margin-bottom: 32px; }
.login-card label { font-size: 12px; }
.login-card input { min-height: 44px; }
.login-card button { min-height: 44px; }
.login-card .field { margin-bottom: 18px; }
.divider { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; margin: 24px 0; }
.divider::before,.divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.login-card .login-help { font-size: 11px; text-align: center; margin: 24px 0 0; color: var(--muted); }
.loading { min-height: 280px; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.spinner { width: 17px; height: 17px; border-radius: 50%; border: 2px solid #c6e2dc; border-top-color: var(--brand); display: inline-block; animation: spin 1s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.mobile-menu { display: none; }
.skip-link { position: fixed; left: 15px; top: -100px; z-index: 99; background: #fff; padding: 12px 18px; border: 2px solid var(--brand); border-radius: 6px; }
.skip-link:focus { top: 12px; }
@media (min-width: 1051px) and (max-width: 1250px) { main { padding: 26px 24px; } .shell { grid-template-columns: 214px minmax(0,1fr); } .stages { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; } .stage:nth-child(5) { border: 0; padding-left: 0; } .priority-item { gap: 10px; padding: 15px; } }
@media (max-width: 1050px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; top: 64px; bottom: 0; left: 0; width: 250px; height: calc(100dvh - 64px); z-index: 30; box-shadow: 10px 0 40px #142b3940; }
  .nav-open .side { display: flex; }
  .side nav { display: block; } .side nav .group { display: block; }
  .mobile-menu { display: inline-flex; border: 0; padding: 4px; min-height: 30px; }
  .topbar { position: sticky; top: 0; z-index: 25; padding: 16px 24px; height: 64px; }
  .priority-grid { grid-template-columns: minmax(0,1.65fr) minmax(220px,1fr); }
  main { padding: 26px 24px; }
  .stages { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
  .g4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .g2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}
@media (max-width: 700px) {
  .topbar { padding: 14px 16px; }
  .topbar .workspace-tag { font-size: 8px; padding: 3px 5px; }
  main { padding: 24px 16px; }
  h1 { font-size: 26px; }
  .head { margin-bottom: 20px; }
  .head .actions { width: 100%; }
  .head .sub { font-size: 12px; }
  .grid { gap: 12px; }
  .g3,.priority-grid,.connection-intro { grid-template-columns: 1fr; }
  .g4 { gap: 10px; }
  .card { padding: 17px; }
  .kpi .label { font-size: 10px; }
  .kpi .value { font-size: 26px; }
  .kpi .note { font-size: 10px; }
  .g4 > .kpi:first-child { padding-top: 15px; }
  .priority-item { padding: 15px; grid-template-columns: minmax(0,1fr) auto 10px; gap: 9px; }
  .priority-index { display: none; }
  .priority-item b { font-size: 12px; }
  .priority-item strong { font-size: 13px; }
  .section-heading { padding: 18px 15px; }
  .stages { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
  .filters > input,.filters > select { flex: 1 1 42%; max-width: 100%; }
  .filters input[type=search] { flex-basis: 100%; }
  .decision { top: 64px; padding: 12px; }
  .connection-intro { gap: 20px; }
  .workspace-footer { padding: 12px 16px 24px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { padding: 6px 24px 26px; }
  .login-message { padding: 12px 0 0; }
  .login-message h1 { font-size: 31px; }
  .login-message > p,.login-proof,.login-footer { display: none; }
  .login-message .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .login-form-area { padding: 36px 24px; }
  .login-card h2 { font-size: 26px; }
  .kv { font-size: 12px; column-gap: 12px; }
  .review-notes .inline-field { width: 100%; }
  .banner { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
@media print { .topbar,.workspace-footer,.side,.mobile-menu { display: none !important; } .workspace { width: 100%; } main { padding: 0; } .shell { display: block; } }

/* Evidence Line: custom single-colour ledger marks and source illustrations. */
.brand .logo { width: 36px; height: 40px; background: transparent; border: 0; border-radius: 0; color: #9ce6d3; }
.brand .logo .icon { width: 36px; height: 36px; }
nav a .icon { width: 18px; height: 18px; opacity: 1; }
.spot-illustration { display: block; width: 100%; height: auto; color: var(--brand); flex-shrink: 0; }
.ledger-label { display: flex; align-items: center; gap: 9px; min-height: 26px; }
.ledger-label .icon { width: 23px; height: 23px; color: var(--brand); }
.ledger-heading { display: flex; align-items: center; gap: 10px; }
.ledger-heading .icon { width: 23px; height: 23px; color: var(--brand); }
.priority-symbol { display: flex; align-items: center; justify-content: center; color: #507f77; }
.priority-symbol .icon { width: 23px; height: 23px; }
.priority-arrow .icon { width: 14px; height: 14px; }
.coverage-visual { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coverage-visual > div { min-width: 0; }
.coverage-visual .spot-illustration { width: 110px; max-width: 44%; margin: 13px -6px 0 0; }
.coverage-visual p { margin-bottom: 0; }
.intake-art { width: 160px; }
.empty-art { max-width: 200px; margin: 0 auto 20px; }
.login-art { width: min(100%,300px); margin: -4px 0 28px; }
.login-art .spot-illustration { color: #9ce6d3; }
.login-message { padding: 24px 0 36px; }
.login-message > p { margin: 22px 0 20px; }
.login-proof { gap: 17px 16px; padding-top: 24px; }
.login-proof > span { border: 0; border-radius: 0; }
.login-proof .icon { width: 24px; height: 24px; }
@media (max-width: 1250px) and (min-width: 1051px) {
  .ledger-label { align-items: flex-start; min-height: 30px; }
  .ledger-label .icon { width: 21px; height: 21px; }
}
@media (max-width: 700px) {
  .ledger-label { gap: 8px; min-height: 30px; }
  .ledger-label .icon { width: 20px; height: 20px; }
  .priority-item { grid-template-columns: 22px minmax(0,1fr) auto 12px; }
  .priority-symbol .icon { width: 21px; height: 21px; }
  .intake-art { display: none; }
  .head .actions:has(> .intake-art) { display: none; }
  .coverage-visual .spot-illustration { width: 120px; }
  .login-art { display: none; }
  .login-message { padding: 12px 0 0; }
}
@media print { .intake-art, .empty-art, .coverage-visual .spot-illustration { display: none; } }

/* Keep native file selection and keyboard behaviour inside the workspace styling. */
.file-field { margin: 18px 0 16px; }
.file-picker { position: relative; display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 16px; margin: 0; border: 1px dashed #b7cfc8; border-radius: 9px; background: #f8fbfa; cursor: pointer; }
.file-picker input[type=file] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.file-picker-icon { display: flex; align-items: center; flex-shrink: 0; color: var(--brand); }
.file-picker-icon .icon { width: 29px; height: 29px; }
.file-picker-copy { flex: 1; min-width: 0; }
.file-picker-title { display: block; font-size: 12px; line-height: 1.5; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-picker-detail { display: block; font-size: 10px; line-height: 1.6; color: var(--muted); font-weight: 400; margin-top: 3px; }
.file-picker-action { flex-shrink: 0; padding: 6px 11px; background: var(--surface); border: 1px solid #c9dcd5; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--brand); }
.file-picker:hover:not(.is-disabled) { background: #f0f8f5; border-color: var(--brand); }
.file-picker:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; border-color: var(--brand); }
.file-picker.has-files { border-style: solid; border-color: #9ac4b8; background: #f1f8f5; }
.file-picker.has-files .file-picker-detail { color: #477268; }
.file-picker.is-disabled { opacity: .55; cursor: not-allowed; }
.file-picker.is-disabled input { cursor: not-allowed; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  .file-picker { padding: 14px 12px; gap: 10px; }
  .file-picker-icon .icon { width: 25px; height: 25px; }
  .file-picker-action { padding: 6px 9px; }
}
@media (forced-colors: active) {
  .file-picker, .file-picker.has-files { border-color: ButtonText; }
  .file-picker-action { border-color: ButtonText; color: ButtonText; }
  .file-picker:focus-within { outline-color: Highlight; }
}
