/* Nodus Locations. Approved demo styles, unchanged, plus the real-data additions at the end. Quiet by default: neutral surfaces, colour only where something needs attention. */
:root {
  --bg: #f6f5f2; --surface: #ffffff; --sunk: #f1efeb; --rail: #fbfaf8;
  --text: #16171a; --text-2: #4a4c52; --muted: #7c7e84; --faint: #a9abb0;
  --rule: #e7e4de; --rule-2: #d9d5cd;
  --ink: #16171a;
  --ok: #2f6b4f; --ok-soft: #e4eee8;
  --fix: #a86812; --fix-soft: #f6ead6;
  --dup: #b23e2b; --dup-soft: #f6e1dc;
  --miss: #2d5d8c; --miss-soft: #e1e9f2;
  --pend: #6c6787; --pend-soft: #e9e7f0;
  --land: #efece6; --land-line: #ddd8cf; --land-hi: #e6e1d8;
  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 13.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 500; }

.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--rail) 235px, var(--rule) 235px 236px, transparent 236px); }

/* ---------- rail ---------- */
.rail { background: var(--rail); border-right: 1px solid var(--rule); padding: 16px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.org { display: flex; gap: 10px; align-items: center; padding: 4px 6px 18px; }
.org-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.org b { display: block; font-weight: 600; font-size: 13.5px; letter-spacing: -.005em; }
.org span { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 7px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--sunk); color: var(--text); }
.nav a.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgba(22,23,26,.04); }
.nav a span { font: 500 11.5px/1 var(--mono); color: var(--muted); }
.nav a span.hot { color: var(--dup); }
.rail-foot { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); display: grid; gap: 6px; }
.rail-foot b { color: var(--text-2); font-weight: 500; }
.sync { display: flex; align-items: center; gap: 7px; }
.sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

/* ---------- top bar ---------- */
.main { min-width: 0; }
.bar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(246,245,242,.86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.crumbs { font-weight: 600; font-size: 14px; min-width: 120px; }
.search { flex: 0 1 380px; display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 8px 0 12px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--surface); color: var(--muted); }
kbd { font: 500 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--rule-2); border-radius: 5px; padding: 3px 5px; background: var(--sunk); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sample { font: 500 11px/1 var(--mono); color: var(--fix); background: var(--fix-soft); border-radius: 6px; padding: 6px 8px; letter-spacing: .02em; }
.seg { display: inline-flex; padding: 2px; background: var(--sunk); border: 1px solid var(--rule); border-radius: 8px; }
.seg button { border: 0; background: transparent; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(22,23,26,.08), 0 0 0 1px var(--rule); }
.who { width: 30px; height: 30px; border-radius: 50%; background: #e3dfd7; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--text-2); }

.content { padding: 24px 28px 48px; max-width: 1480px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.eyebrow { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.meta { font-size: 12.5px; color: var(--muted); }

/* ---------- hero: progress to 100% ---------- */
.hero { display: grid; grid-template-columns: 1fr 340px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.hero-main { padding: 22px 26px; }
.hero-side { padding: 22px 24px; border-left: 1px solid var(--rule); }
.headline { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 16px; }
.headline b { font-size: 46px; line-height: 1; font-weight: 500; letter-spacing: -.035em; }
.headline span { font-size: 16px; color: var(--muted); }
.headline em { font-style: normal; color: var(--text-2); }
.segbar { display: flex; gap: 2px; height: 10px; }
.segbar i { display: block; height: 100%; border-radius: 2px; }
.breakdown { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: 0 36px; margin: 16px 0 0; }
.breakdown div { display: grid; gap: 3px; }
.breakdown dt { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.breakdown dd { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.k { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.trend { width: 100%; height: 120px; display: block; margin-top: 8px; overflow: visible; }
.trend text { font: 400 10.5px var(--mono); fill: var(--muted); }
.trend-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.trend-note b { color: var(--ok); font-weight: 600; }

/* ---------- panels ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.grid-b { align-items: start; }
.map-panel { display: flex; flex-direction: column; }
.map-panel .map-wrap { flex: 1; }
.grid-b { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 20px 14px; border-bottom: 1px solid var(--rule); }
.panel-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }

/* ---------- map ---------- */
.legend { position: absolute; left: 16px; bottom: 14px; z-index: 2; background: rgba(255,255,255,.85); backdrop-filter: blur(6px); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-wrap { position: relative; display: grid; grid-template-columns: 1fr 214px; }
.map { width: 100%; height: 100%; min-height: 600px; display: block; background: radial-gradient(120% 90% at 30% 40%, #f8f7f4 0%, #f2efea 70%); border-bottom-left-radius: var(--r); }
.map .dept { fill: var(--land); stroke: var(--land-line); stroke-width: .9; vector-effect: non-scaling-stroke; transition: fill .15s; }
.map .dept.has { fill: #ebe6dd; cursor: pointer; }
.map .dept.has:hover, .map .dept.sel { fill: #e2dccf; }
.map .st-ok { fill: #8f969b; fill-opacity: .4; }
.map .st-bad { stroke: #fff; stroke-width: 1.2; cursor: pointer; vector-effect: non-scaling-stroke; }
.map .lbl { font: 500 9px var(--font); fill: var(--text-2); paint-order: stroke; stroke: rgba(247,245,241,.92); stroke-width: 3px; pointer-events: none; }
.map-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: #fff; border-radius: 8px; padding: 9px 11px; font-size: 12px; line-height: 1.4; max-width: 240px; box-shadow: 0 8px 24px rgba(22,23,26,.2); }
.map-tip b { display: block; font-weight: 600; }
.map-tip span { color: #b9bbc0; }
.regions { list-style: none; margin: 0; padding: 8px 0; border-left: 1px solid var(--rule); }
.regions li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px 16px; cursor: pointer; border-left: 2px solid transparent; }
.regions li:hover { background: var(--bg); }
.regions li.sel { background: var(--bg); border-left-color: var(--ink); }
.regions .rn { font-weight: 500; }
.regions .rc { font: 500 12px var(--mono); color: var(--dup); text-align: right; }
.regions .rc.zero { color: var(--faint); }
.regions .rs { grid-column: 1 / -1; display: flex; height: 3px; gap: 1px; margin-top: 3px; }
.regions .rs i { display: block; height: 100%; border-radius: 1px; }
.regions .rt { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }

/* ---------- needs-attention queue ---------- */
.qgroup { border-bottom: 1px solid var(--rule); }
.qgroup:last-child { border-bottom: 0; }
.qhead { display: flex; align-items: center; gap: 10px; padding: 14px 20px 8px; }
.qhead h3 { font-size: 13.5px; font-weight: 600; }
.qhead .n { font: 500 12px var(--mono); color: var(--muted); }
.qhead .act { white-space: nowrap; margin-left: auto; border: 1px solid var(--rule-2); background: var(--surface); border-radius: 7px; height: 28px; padding: 0 10px; font-size: 12.5px; font-weight: 500; }
.qhead .act:hover { border-color: var(--text-2); }
.qhead .act.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.qrow { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; padding: 7px 20px 7px 38px; position: relative; }
.qrow::before { content: ""; position: absolute; left: 23px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--c, var(--faint)); }
.qrow:hover { background: var(--bg); }
.qrow .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .cd { font: 400 11.5px var(--mono); color: var(--muted); text-align: right; }
.qrow .why { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.qrow .why s { color: var(--dup); text-decoration-color: rgba(178,62,43,.45); }
.qrow .why ins { text-decoration: none; color: var(--ok); }
.qmore { padding: 4px 20px 14px 38px; font-size: 12.5px; color: var(--muted); }
.qmore a { color: var(--text-2); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rule-2); }

/* ---------- change log ---------- */
table { border-collapse: collapse; width: 100%; }
.log td { padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.log tr:last-child td { border-bottom: 0; }
.log td:first-child { padding-left: 20px; width: 64px; font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.log td:last-child { padding-right: 20px; text-align: right; white-space: nowrap; }
.log .what { font-weight: 500; }
.log .ba { display: flex; align-items: center; gap: 8px; margin-top: 4px; font: 400 12px var(--mono); color: var(--muted); flex-wrap: wrap; }
.log .ba s { color: var(--text-2); text-decoration-color: rgba(178,62,43,.55); }
.log .ba b { color: var(--text); font-weight: 500; }
.log .by { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 3px 7px; border-radius: 5px; }
.tag-ok { color: var(--ok); background: var(--ok-soft); }
.tag-wait { color: var(--pend); background: var(--pend-soft); }
.undo { display: block; margin-top: 6px; margin-left: auto; border: 0; background: none; padding: 0; color: var(--muted); font-size: 12px; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.undo:hover { color: var(--text); }

/* ---------- performance ---------- */
.perf { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.perf div { padding: 16px 20px; border-right: 1px solid var(--rule); }
.perf div:last-child { border-right: 0; }
.perf span { font-size: 12.5px; color: var(--muted); }
.perf b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.025em; margin-top: 4px; }
.cities th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.cities td { padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.cities tr:last-child td { border-bottom: 0; }
.cities th:first-child, .cities td:first-child { padding-left: 20px; }
.cities th:last-child, .cities td:last-child { padding-right: 20px; }
.cities .r { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.cities .bar-in { position: relative; width: 38%; }
.cities .bar-in i { display: block; height: 6px; background: #cfd3d6; border-radius: 3px; }

@media (max-width: 1180px) {
  .grid, .grid-b { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .rail { position: static; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .org { padding-bottom: 10px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav a { white-space: nowrap; gap: 8px; }
  .rail-foot { display: none; }
  .bar { padding: 0 16px; gap: 8px; }
  .search, .crumbs, .who { display: none; }
  .bar-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .content { padding: 16px; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; border-top: 1px solid var(--rule); }
  .breakdown { grid-template-columns: repeat(3, auto); gap: 12px 24px; }
  .map-wrap { grid-template-columns: 1fr; }
  .map { min-height: 460px; border-radius: 0; }
  .legend { position: static; order: 2; margin: 10px 12px 0; gap: 6px 12px; }
  .map-wrap { display: flex; flex-direction: column; }
  .map { order: 1; } .regions { order: 3; }
  .map-panel .panel-head .meta { display: none; }
  .regions li:nth-child(n+6) { display: none; }
  .regions { border-left: 0; border-top: 1px solid var(--rule); max-height: none; }
  .cities .bar-in, .cities th:nth-child(4), .cities th:nth-child(2), .cities td:nth-child(2) { display: none; }
  .perf div { padding: 14px 12px; } .perf b { font-size: 18px; } .perf span { font-size: 11.5px; }
}

.map .sea { font: italic 400 9px var(--font); fill: #b9b4aa; letter-spacing: .14em; }
.map .bn { font: 500 7px var(--mono); fill: var(--text-2); pointer-events: none; }
.map .bub { cursor: pointer; transition: opacity .2s; }
.empty { padding: 28px 20px; color: var(--muted); }
body.client .act, body.client .undo { display: none; }
.map .lbl-n { font: 500 8px var(--mono); fill: var(--dup); stroke-width: 2.5px; }

/* ================= multi-screen additions ================= */
a.link { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
a.link:hover { color: var(--text); }
.qhead a.act { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.qhead a.act.primary { color: #fff; }
.qrow { cursor: pointer; }
.ok-t { color: var(--ok); }
.cd { font: 400 11.5px var(--mono); color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pad { padding: 16px 20px; margin: 0; color: var(--text-2); }
.spacer { flex: 1; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.page-actions { display: flex; gap: 8px; }
.ro { font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--brand, var(--ink)); border-radius: 8px; padding: 10px 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; border: 1px solid var(--rule-2); background: var(--surface); border-radius: 8px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: var(--text-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #2a2c31; }
.btn.light { background: #fff; border-color: #fff; color: var(--ink); }
.btn.ghost-dk { background: transparent; border-color: rgba(255,255,255,.2); color: #fff; }

/* toolbar + chips */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.search-in, .select { height: 32px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--surface); padding: 0 10px; font: inherit; font-size: 13px; color: var(--text); }
.search-in { width: 260px; }
.search-in:focus, .select:focus { outline: 2px solid rgba(22,23,26,.15); outline-offset: 1px; border-color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; border: 1px solid var(--rule-2); background: var(--surface); border-radius: 99px; padding: 0 11px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.chip b { font: 500 11.5px var(--mono); color: var(--muted); margin-left: 6px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on b { color: #c9cbd0; }

/* tables */
.table-wrap { } /* no overflow here: a scroll container would trap the sticky header inside it */
table.t th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--surface); position: sticky; top: 56px; z-index: 2; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 16px; }
table.t th:last-child, table.t td:last-child { padding-right: 16px; }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover { background: #faf9f6; }
table.t tbody tr.sel { background: #f3f1ec; }
table.t .nm { font-weight: 500; }
table.t .diff { color: var(--muted); font-size: 12.5px; max-width: 360px; }
table.t .diff s, .why s { color: var(--dup); text-decoration-color: rgba(178,62,43,.45); }
table.t .diff ins, .why ins { text-decoration: none; color: var(--ok); }
table.t .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t .cb { width: 36px; }
table.t.compact td { padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
table.t.compact th { position: static; }
.mono-c { font: 400 12px var(--mono); white-space: nowrap; }
.empty-row td { padding: 36px 16px !important; color: var(--muted); text-align: center; cursor: default; }
.table-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; color: var(--muted); font-size: 12.5px; }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--ink); cursor: pointer; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 8px 3px 7px; border-radius: 6px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-verified { color: var(--ok); background: var(--ok-soft); }
.p-fix { color: var(--fix); background: var(--fix-soft); }
.p-duplicate { color: var(--dup); background: var(--dup-soft); }
.p-missing { color: var(--miss); background: var(--miss-soft); }
.p-pending { color: var(--pend); background: var(--pend-soft); }
.tag-demo { color: var(--fix); background: var(--fix-soft); margin-left: 6px; }

/* bulk bar */
.bulkbar { position: fixed; left: calc(236px + 28px); right: 28px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 10px 10px 18px; box-shadow: 0 16px 40px rgba(22,23,26,.28); transform: translateY(calc(100% + 40px)); visibility: hidden; transition: transform .25s cubic-bezier(.2,.7,.2,1), visibility 0s .25s; }
.bulkbar.show { transform: none; visibility: visible; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.bulkbar b { font-weight: 600; }
.muted-dk { color: #a9abb0; font-size: 12.5px; }

/* drawer + modal */
.scrim { position: fixed; inset: 0; background: rgba(22,23,26,.28); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: var(--surface); z-index: 60; transform: translateX(104%); transition: transform .28s cubic-bezier(.2,.7,.2,1); overflow-y: auto; box-shadow: -24px 0 60px rgba(22,23,26,.16); }
.drawer.show { transform: none; }
.drawer-head { position: sticky; top: 0; background: var(--surface); padding: 18px 24px 16px; border-bottom: 1px solid var(--rule); z-index: 1; }
.drawer-head h3 { font-size: 19px; font-weight: 600; letter-spacing: -.015em; margin: 10px 0 2px; }
.drawer-head p { margin: 0; font-size: 13px; }
.dh-meta { display: flex; align-items: center; gap: 10px; }
.x { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: 0; background: transparent; border-radius: 7px; font-size: 20px; line-height: 1; color: var(--muted); }
.x:hover { background: var(--sunk); color: var(--text); }
.drawer-body { padding: 18px 24px 32px; }
.drawer-body h4 { font-size: 13px; font-weight: 600; margin: 22px 0 8px; }
.note { font-size: 13px; color: var(--text-2); background: var(--bg); border-radius: 8px; padding: 11px 13px; }
.note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cmp { width: 100%; font-size: 13px; }
.cmp th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--rule); }
.cmp td { padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cmp td:first-child { color: var(--muted); width: 28%; }
.cmp tr.bad td { background: #fbf6ec; }
.cmp tr.bad td:nth-child(2) { color: var(--ok); font-weight: 500; }
.cmp tr.bad td:nth-child(3) { color: var(--dup); text-decoration: line-through; text-decoration-color: rgba(178,62,43,.45); }
.dr-actions { display: flex; gap: 8px; margin-top: 14px; }
.mini-perf { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 8px; }
.mini-perf div { padding: 10px 12px; border-right: 1px solid var(--rule); }
.mini-perf div:last-child { border-right: 0; }
.mini-perf span { font-size: 11.5px; color: var(--muted); display: block; }
.mini-perf b { font-size: 17px; font-weight: 500; }
.mini-perf small { display: block; font-size: 11px; color: var(--muted); }
.hist { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule-2); }
.hist li { padding: 4px 0 8px 14px; font-size: 13px; color: var(--text-2); position: relative; }
.hist li::before { content: ""; position: absolute; left: -4px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface); border: 1px solid var(--faint); }
.hist b { display: block; font: 500 11.5px var(--mono); color: var(--muted); }

.modal { position: fixed; z-index: 70; left: 50%; top: 50%; width: min(620px, calc(100vw - 32px)); max-height: 84vh; display: flex; flex-direction: column; transform: translate(-50%, -47%); opacity: 0; pointer-events: none; transition: all .2s; background: var(--surface); border-radius: 12px; box-shadow: 0 30px 80px rgba(22,23,26,.3); }
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--rule); }
.modal-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.modal-head p { margin: 6px 0 0; font-size: 13px; }
.modal-body { padding: 4px 22px; overflow-y: auto; }
.chg { padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.chg:last-child { border-bottom: 0; }
.chg .why { color: var(--muted); margin-top: 3px; }
.modal-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--rule); }
.demo-note { margin-right: auto; font: 500 11px var(--mono); color: var(--fix); }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 22px; transform: translate(-50%, calc(100% + 40px)); background: var(--ink); color: #e4e5e8; padding: 12px 16px; border-radius: 10px; font-size: 13px; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 12px 30px rgba(22,23,26,.3); transition: transform .25s, visibility 0s .25s; visibility: hidden; }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .25s; }
.toast b { color: #fff; }

/* verification */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 52px 1fr 190px; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--rule); }
.step:last-child { border-bottom: 0; }
.step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 500 13px var(--mono); border: 1px solid var(--rule-2); color: var(--muted); }
.step.done .n { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.step.now .n { background: var(--ink); border-color: var(--ink); color: #fff; }
.step h3 { font-size: 15px; font-weight: 600; }
.step p { margin: 4px 0 0; color: var(--muted); max-width: 72ch; }
.step-side { display: grid; justify-items: end; align-content: start; gap: 6px; font-size: 12.5px; text-align: right; }
.st { font-size: 11.5px; font-weight: 500; padding: 3px 8px; border-radius: 5px; }
.st.done { color: var(--ok); background: var(--ok-soft); }
.st.now { color: var(--fix); background: var(--fix-soft); }
.st.next { color: var(--muted); background: var(--sunk); }
.minibar { height: 5px; border-radius: 3px; background: var(--sunk); margin-top: 12px; max-width: 380px; overflow: hidden; }
.minibar i { display: block; height: 100%; background: var(--ok); }
.step-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; font-size: 12.5px; }
.grid-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }

/* protection */
.kstrip { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.kstrip div { padding: 16px 20px; border-right: 1px solid var(--rule); }
.kstrip div:last-child { border-right: 0; }
.kstrip span { font-size: 12.5px; color: var(--muted); }
.kstrip b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.025em; margin-top: 4px; }
.kstrip small { font-size: 12px; color: var(--muted); }
.watch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 14px 20px; }
/* cases */
.cases { padding: 0 20px 16px; display: grid; gap: 10px; }
.case { border: 1px solid var(--rule); border-radius: 8px; background: var(--bg-2, transparent); }
.case-head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.case-head h4 { margin: 0; font-size: 14px; } .case-head .where { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.case.open .case-head { border-bottom: 1px solid var(--rule); }
.case-body { padding: 10px 14px 14px; } .case-body h5 { margin: 8px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.case-reasons { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; } .case-reasons li { margin: 2px 0; }
.case-report { white-space: pre-wrap; font: 12.5px/1.45 var(--mono, ui-monospace, monospace); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; margin: 4px 0 10px; max-height: 220px; overflow: auto; }
.verdict { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; border: 1px solid var(--rule); white-space: nowrap; }
.conf-high .verdict { border-color: #b23e2b; color: #b23e2b; } .conf-medium .verdict { border-color: #a86812; color: #a86812; } .conf-low .verdict { color: var(--muted); }
.v-legitimate, .conf-high .v-legitimate { border-color: #2f6b4f; color: #2f6b4f; } .v-duplicate, .conf-high .v-duplicate { border-color: #2d5d8c; color: #2d5d8c; }
.conf { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cstat { font-size: 12px; color: var(--muted); white-space: nowrap; } .cstat.due, .due, .prec span.due b { color: #b23e2b; }
.case-head { grid-template-columns: auto 1fr auto auto auto; }
@media (max-width: 700px) { .case-head { grid-template-columns: 1fr; gap: 6px; } }
.watch-l { font-size: 12.5px; color: var(--muted); margin-right: 6px; }
.watch span:not(.watch-l) { font-size: 12px; border: 1px solid var(--rule); border-radius: 6px; padding: 3px 8px; color: var(--text-2); }
/* staff only: precision per alert kind, same strip as "what we watch" */
.prec { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 20px 14px; }
.prec-l { font-size: 12.5px; color: var(--muted); margin-right: 6px; }
.prec span:not(.prec-l) { font-size: 12px; border: 1px solid var(--rule); border-radius: 6px; padding: 3px 8px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.alert { display: grid; grid-template-columns: 76px 1fr 260px; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.alert:last-child { border-bottom: 0; }
.alert:hover { background: #faf9f6; }
.alert h4 { font-size: 14px; font-weight: 600; margin: 0; }
.alert .where { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.alert .d { margin: 6px 0 0; color: var(--text-2); font-size: 13px; }
.alert .o { font-size: 13px; }
.alert .o b { display: block; font-weight: 500; color: var(--ok); }
.alert .o span { font-size: 12px; color: var(--muted); }
.sev { justify-self: start; align-self: start; font-size: 11.5px; font-weight: 500; padding: 3px 8px; border-radius: 5px; }
.sev-high { color: var(--dup); background: var(--dup-soft); }
.sev-medium { color: var(--fix); background: var(--fix-soft); }
.sev-low { color: var(--muted); background: var(--sunk); }
.alert .o > span { display: block; margin-top: 2px; }
.alert .o b.st-live { color: var(--text); }
.alert-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.alert-btns .btn.mini { margin-top: 0; }
.alert-act { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); cursor: default; }
.alert-act .search-in, .alert-act .select { width: 100%; min-width: 0; }
.alert-err { margin: 0; font-size: 12.5px; color: var(--dup); }
.prot-act { padding: 0 20px 16px; }

/* reports */
.doc { display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--rule); }
.doc:last-child { border-bottom: 0; }
.doc h3 { font-size: 15px; font-weight: 600; }
.doc p { margin: 4px 0 0; color: var(--text-2); }
.doc .btns { display: flex; align-items: center; gap: 10px; }
.cover { aspect-ratio: 1 / 1.414; background: #fff; border: 1px solid var(--rule-2); border-radius: 3px; padding: 9px 8px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 4px 14px rgba(22,23,26,.07); }
.cover i { display: block; height: 3px; background: var(--sunk); border-radius: 2px; }
.cover .k { height: 7px; width: 55%; background: var(--ink); margin-bottom: 4px; }
.cover .g { height: 12px; margin: 5px 0; background: linear-gradient(90deg, var(--ok) var(--p), var(--sunk) var(--p)); }
.covers { list-style: none; margin: 0; padding: 6px 0; columns: 2; column-gap: 0; }
.covers li { break-inside: avoid; display: flex; gap: 12px; padding: 10px 20px; color: var(--text-2); }
.covers.lowrev { columns: 1; }
.covers:not(.lowrev) li b, .covers:not(.lowrev) li small { display: block; }
.covers:not(.lowrev) li small { margin-top: 2px; }
.lowrev span { color: var(--fix); letter-spacing: .08em; }

/* client view: Pasteur's own colours */
body.client { --brand: var(--ink); --brand-2: var(--ink); } /* the client's own colours are set from clients.brand_primary/secondary at runtime */
body.client .org-mark { background: var(--brand); }
body.client .nav a.on { box-shadow: inset 2px 0 0 var(--brand-2), 0 0 0 1px var(--rule); }
body.client .who { background: var(--brand-2); color: #fff; }
body.client .team-only, body.client .undo, body.client .qhead .act, body.client [data-act="import"] { display: none !important; }

@media (max-width: 1180px) { .grid-even { grid-template-columns: 1fr; } .alert { grid-template-columns: 70px 1fr; } .alert .o { grid-column: 2; } }
@media (max-width: 860px) {
  .bulkbar { left: 12px; right: 12px; flex-wrap: wrap; }
  .search-in { width: 100%; }
  table.t th:nth-child(5), table.t td:nth-child(5), table.t th:nth-child(6), table.t td:nth-child(6), table.t th:nth-child(7), table.t td:nth-child(7), table.t th:nth-child(3), table.t td:nth-child(3) { display: none; }
  table.t.compact th, table.t.compact td { display: table-cell !important; }
  table.t th { top: 0; position: static; }
  .step { grid-template-columns: 38px 1fr; padding: 16px; }
  .step-side { grid-column: 2; justify-items: start; text-align: left; }
  .kstrip { grid-template-columns: 1fr 1fr; }
  .kstrip div:nth-child(2) { border-right: 0; } .kstrip div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .alert { grid-template-columns: 1fr; gap: 8px; } .alert .o { grid-column: 1; }
  .doc { grid-template-columns: 64px 1fr; } .doc .btns { grid-column: 1 / -1; }
  .covers { columns: 1; }
  .mini-perf { grid-template-columns: 1fr 1fr; } .mini-perf div:nth-child(2) { border-right: 0; } .mini-perf div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  #seg-lang button, #seg-view button { padding: 0 8px; }
  .step > div { min-width: 0; }
  .log tr { display: grid; grid-template-columns: 58px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
  .log td { border-bottom: 0 !important; }
  .log tr { grid-template-columns: 74px minmax(0, 1fr); }
  .log td:first-child { width: auto; padding-left: 14px; font-size: 11px; }
  .log td:last-child { grid-column: 2; text-align: left; padding: 0 14px 12px 12px; display: flex; align-items: center; gap: 12px; }
  .log td:last-child .undo { margin: 0; }
  .mono-c { white-space: normal; }
}

/* ================= real-data additions (same visual language) ================= */
:root { --match: #8a4f7d; --match-soft: #f2e4ee; --unk: #6f7277; --unk-soft: #ecebe7; }
.p-match { color: var(--match); background: var(--match-soft); }
.p-unk { color: var(--unk); background: var(--unk-soft); }
.p-unk::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; } /* hollow dot: not checked never reads as fine */

/* org block is the client switcher */
.org { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; border-radius: 8px; cursor: default; }
.org.multi { cursor: pointer; }
.org.multi:hover { background: var(--sunk); }
.org.multi > div::after { content: "⌄"; margin-left: 4px; color: var(--muted); }
.org > div { min-width: 0; }
.org b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-mark { flex: none; }
.org-menu, .who-menu { position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 30px rgba(22,23,26,.14); padding: 6px; min-width: 220px; }
.org-menu { left: 12px; right: 12px; top: 58px; }
.org-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; }
.org-menu button:hover, .org-menu button.on { background: var(--sunk); }
.org-menu b { display: block; font-weight: 600; }
.org-menu span { font-size: 12px; color: var(--muted); }
.bar-right { position: relative; }
.who { border: 0; }
.who-menu { right: 0; top: 40px; display: grid; gap: 2px; }
.who-menu[hidden], .org-menu[hidden] { display: none; }
.who-id { padding: 8px 10px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.who-id b { display: block; font-weight: 600; }
.who-id span { font-size: 12px; color: var(--muted); }
.who-menu a, .who-menu button { display: block; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 13px; }
.who-menu a:hover, .who-menu button:hover { background: var(--sunk); }
.nav a span.soon { font: 500 10.5px/1 var(--font); color: var(--faint); letter-spacing: .01em; }
.sync.idle i { background: var(--faint); box-shadow: 0 0 0 3px var(--sunk); }
.sync.warn i { background: var(--fix); box-shadow: 0 0 0 3px var(--fix-soft); }
.sync.run i { background: var(--pend); box-shadow: 0 0 0 3px var(--pend-soft); }

/* async view bodies keep the page grid and its 20px gaps */
#ov, #ver, #loc-banner, #prot { display: contents; }

/* loading, errors, empty */
.loading { padding: 28px 20px; color: var(--muted); font-size: 13px; }
.err { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--dup); background: var(--dup-soft); border-radius: 8px; padding: 11px 13px; margin: 12px 16px; }
.err b { font-weight: 600; }
.err .btn { margin-left: auto; height: 28px; }
.ro.run { border-left-color: var(--pend); background: var(--pend-soft); }
.ro.warn { border-left-color: var(--fix); background: var(--fix-soft); color: #6b430c; }
.note.warn { background: var(--fix-soft); color: #6b430c; margin-bottom: 10px; }
.empty-state { padding: 32px 28px; }
.empty-state h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.empty-state p { margin: 6px 0 0; max-width: 64ch; }
.toast.bad { background: #3a1912; }
.grid-b.one { grid-template-columns: minmax(0, 1fr); }

/* overview: 7 statuses, last check, usage */
.breakdown { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.check-when { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; font-size: 14px; }
.check-when b { font-weight: 500; }
.hero-side .step-actions { margin-top: 14px; }
.usage { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); display: grid; gap: 2px; }
.usage span { font-size: 12.5px; color: var(--muted); }
.usage b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.usage small { font-size: 12px; color: var(--surface); } /* projected spend hidden on screen (Lloyd, 2026-10-22): same colour as the panel so it does not read during client demos; still selectable */
.map-wrap.nomap { grid-template-columns: 1fr; }
.map-wrap.nomap .regions { border-left: 0; }
.map-wrap.nomap .regions li:nth-child(n+6) { display: grid; }

/* drawer additions */
/* Ruling X (Phase A): nothing is pushed to Google yet, so a differing row must not say "ours is right, Google is wrong".
   Keep the row tint; your value stays plain ink; Google's value gets a neutral highlight: no strike, no red, no green.
   PHASE B: the push styling (your value green, Google's struck through in red) returns with Business Profile push. */
.cmp tr.bad td:nth-child(2) { color: var(--ink); font-weight: 400; }
.cmp tr.bad td:nth-child(3) { color: var(--ink); text-decoration: none; }
.cmp tr.bad td:nth-child(3) .gv { background: rgba(28,25,23,.07); border-radius: 4px; padding: 1px 5px; font-weight: 500; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tag-miss { color: var(--muted); background: rgba(28,25,23,.06); }
table.t td .tag-miss { margin-top: 4px; }
.dh-meta .tag-miss { margin-left: 6px; }
.flags { margin: 10px 0 0; padding: 0 0 0 18px; color: var(--text-2); font-size: 13px; }
.flags li { margin: 2px 0; }
.btn.mini { display: flex; height: 26px; padding: 0 9px; font-size: 12px; margin-top: 6px; text-decoration: none; }
.cmp td, table.t .nm, table.t .diff { overflow-wrap: anywhere; } /* store names come from client spreadsheets: long tokens must wrap */
.cands { border: 1px solid var(--rule); border-radius: 8px; }
.cand { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.cand:last-child { border-bottom: 0; }
.cand > div { min-width: 0; overflow-wrap: anywhere; }
.drawer .select { max-width: 100%; }
.task { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; margin-bottom: 8px; }
.task-act { display: flex; gap: 8px; flex-wrap: wrap; }
.task-act .search-in { flex: 1 1 200px; width: auto; min-width: 0; }

/* import */
.imp-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.imp-pick label.btn { cursor: pointer; }
.imp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; padding: 16px 20px; }
.imp-grid label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.imp-grid .select { width: 100%; min-width: 0; }
.kstrip-5 { grid-template-columns: repeat(5, 1fr); }
.kstrip b.bad-n { color: var(--dup); }
.pad-h { font-size: 13px; font-weight: 600; margin: 0; padding: 16px 20px 8px; }
.probs td { vertical-align: top; }
.probs tbody tr { cursor: default; }
.modal-foot .spacer { flex: 1; }
#imp-preview .modal-foot, #imp-mapping .modal-foot { flex-wrap: wrap; }
.step-actions .err { margin: 0; flex: 1 1 100%; }

/* login */
body.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(400px, 100%); display: grid; gap: 16px; }
.login-org { padding: 0 2px; }
.login-org b { white-space: normal; }
.login-body { display: grid; gap: 14px; padding: 18px 20px 20px; }
.login-body label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.login-body .search-in { width: 100%; height: 36px; }
.login-body .err { margin: 0; }
.login-body .btn { height: 36px; }
.login-body p { margin: 0; font-size: 13px; }
.login-lang { justify-self: center; }
.login-lang button { padding: 0 12px; }

@media (max-width: 860px) {
  .who { display: grid; }
  .rail { position: relative; }
  .who-menu { top: 40px; }
  .org-menu { top: 52px; }
  .breakdown { gap: 10px 20px; }
  .imp-grid { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .imp-grid label { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .kstrip-5 { grid-template-columns: 1fr 1fr; }
  .kstrip-5 div { border-bottom: 1px solid var(--rule); }
  .kstrip-5 div:nth-child(2n) { border-right: 0; }
  .page-actions { flex-wrap: wrap; }
  .toolbar .select { max-width: 100%; }
  .cand { flex-direction: column; align-items: flex-start; }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
  .cmp td:first-child { width: 30%; }
  .err { margin: 12px; }
  .log td:first-child { white-space: normal; } /* real dates are longer than the demo's "09:12" */
}
.drawer:not(.show) { box-shadow: none; } /* the closed drawer's shadow showed as a grey strip on the right edge */
.err[hidden], .note[hidden] { display: none; } /* an empty error box must never show */

/* Photo alerts show the photo itself: thumbnail beside the detail, click for full size in a new tab. */
.alert .d:has(.photo-open) { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; }
.photo-open { display: block; width: 112px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); background: var(--sunk); }
.photo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
