:root { --ink:#1C2430; --muted:#5A6472; --line:#D5D9E0; --bg:#F6F7F9; --card:#fff; --accent:#1F4E79; --warn:#FFF4D6; --warn-ink:#4D3B00; --bad:#8A1C1C; --ok:#1E6B3A; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, "Segoe UI", sans-serif; color:var(--ink); background:var(--bg); font-size:15px; line-height:1.45; }
a { color:var(--accent); }
.top { display:flex; gap:16px; align-items:baseline; padding:12px 24px; background:var(--ink); color:#fff; }
.top .brand { color:#fff; font-weight:700; text-decoration:none; } .top .muted { color:#C9CFD8; }
.page { max-width:1280px; margin:0 auto; padding:16px 24px 48px; }
h1 { font-size:26px; margin:4px 0; } h2 { font-size:19px; margin:0 0 12px; } h3 { font-size:16px; margin:12px 0 6px; }
.muted { color:var(--muted); } .small { font-size:13px; font-weight:400; } .mono { font-family: ui-monospace, Consolas, monospace; font-size:12px; word-break:break-all; }
.eyebrow { font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.header { display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:12px; margin-bottom:12px; }
.tabs a { margin-left:16px; }
.banner { background:var(--warn); color:var(--warn-ink); padding:8px 12px; border-radius:6px; margin-bottom:12px; font-size:14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:16px; }
.outputs { display:grid; grid-template-columns: 3fr 2fr; gap:16px; align-items:start; }
.two { display:grid; grid-template-columns: 1fr 2fr; gap:16px; align-items:start; } .two.wide-left { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .outputs, .two, .two.wide-left { grid-template-columns: 1fr; } }
.output-a { border-top:4px solid var(--accent); } .output-b { border-top:4px solid #6B4E9B; }
.need-block { border-top:1px solid var(--line); padding-top:12px; margin-top:12px; }
.result { margin-top:8px; } .result-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.figures { display:flex; flex-wrap:wrap; gap:24px; margin:8px 0; } .figures > div { min-width:160px; max-width:320px; }
.label { font-size:12px; color:var(--muted); } .big { font-size:22px; font-weight:600; }
.tag { font-size:12px; padding:2px 8px; border-radius:999px; background:#E7EAEE; font-weight:500; }
.tag.warn { background:var(--warn); color:var(--warn-ink); } .tag.ok { background:#DDF1E3; color:var(--ok); } .tag.bad { background:#F8DEDE; color:var(--bad); }
.no-total { margin-top:16px; background:var(--ink); color:#fff; padding:12px; border-radius:6px; font-size:14px; }
table.grid { width:100%; border-collapse:collapse; font-size:14px; }
table.grid th, table.grid td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
table.grid th { font-weight:500; color:var(--muted); } .num { text-align:right !important; font-variant-numeric: tabular-nums; }
tr.priority td:first-child { border-left:4px solid var(--accent); } tr.selected { background:#EEF3F8; } tr.total td { font-weight:600; }
tr.unq td { color:var(--muted); font-style:italic; }
ul.weak { padding-left:18px; margin:6px 0; } ul.weak li { margin-bottom:4px; } .code { color:var(--bad); font-weight:600; }
ul.plain { list-style:none; padding:0; } ul.plain li { padding:4px 0; } li.selected { font-weight:600; }
dl { display:grid; grid-template-columns: max-content 1fr; gap:4px 12px; margin:8px 0; } dt { color:var(--muted); } dd { margin:0; }
.actions { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
form { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; }
label.name { display:flex; flex-direction:column; font-size:12px; color:var(--muted); }
input { font:inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; }
button { font:inherit; padding:7px 14px; border-radius:6px; border:1px solid var(--accent); background:var(--accent); color:#fff; cursor:pointer; }
button.secondary { background:#fff; color:var(--accent); }
.error { color:var(--bad); font-weight:600; } .ok { color:var(--ok); font-weight:600; }
ol.chain li { margin-bottom:8px; }
h1:focus { outline: none; }
.top .who { margin-left:auto; display:flex; gap:12px; align-items:baseline; color:#C9CFD8; font-size:14px; } .top .who a { color:#fff; }
form.inline { display:inline; } button.link { background:none; border:none; color:#fff; padding:0; text-decoration:underline; }
.narrow { max-width:460px; margin:32px auto; } form.stack { flex-direction:column; align-items:stretch; }
select { font:inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; }
ul.codes { columns:2; list-style:none; padding:0; }
/* Data gathering, screens 7 and 8 */
ol.steps { display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0; margin:0 0 12px; font-size:14px; }
ol.steps li { padding:4px 12px; border-radius:999px; background:#E7EAEE; } ol.steps li.on { background:var(--accent); color:#fff; } ol.steps li a { color:inherit; text-decoration:none; }
.tiles { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-bottom:16px; } @media (max-width: 900px) { .tiles { grid-template-columns:1fr 1fr; } }
.tile { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:12px; text-decoration:none; color:inherit; } .tile .big { display:block; } .tile.on { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
fieldset.q { border:0; padding:8px 0; margin:0; border-top:1px solid var(--line); width:100%; } fieldset.q legend { padding:0; font-weight:500; }
fieldset.q label { margin-right:16px; } .effect { display:block; font-size:13px; color:var(--muted); }
.tag.got { background:#DDF1E3; color:var(--ok); } .tag.client { background:#FDEBD9; color:#8A4500; } .tag.us { background:#E3EEF8; color:#1D4E89; } .tag.wait { background:#E8ECF1; color:#2E3A48; }
.filters a { margin-right:12px; font-size:14px; } .filters a.on { font-weight:600; text-decoration:none; color:var(--ink); }
.step { border-top:1px solid var(--line); padding-top:10px; margin-top:12px; } .step h3 { margin-top:0; } .step .by { font-weight:400; font-size:13px; color:var(--muted); }
table.grid.tight td, table.grid.tight th { padding:4px 6px; font-size:13px; } td.flag { color:var(--bad); } tr.flagged td:first-child { border-left:4px solid var(--bad); } tr.stated td { color:var(--muted); font-style:italic; }
.problems { background:#F8DEDE; color:var(--bad); padding:8px 12px; border-radius:6px; margin-bottom:12px; } .problems ul { margin:4px 0 0; padding-left:18px; }
.scroll { overflow-x:auto; } td select, td input { font-size:13px; padding:3px 4px; } .three { display:grid; grid-template-columns: 1fr 2fr 1fr; gap:16px; align-items:start; }
@media (max-width: 1100px) { .three { grid-template-columns:1fr; } }
/* Audience views (screen 4) */
.audience { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:baseline; margin-bottom:12px; font-size:14px; }
.audience a { padding:3px 12px; border-radius:999px; background:#E7EAEE; color:var(--ink); text-decoration:none; } .audience a.on { background:var(--accent); color:#fff; }
.plain-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:16px; }
.plain-card { border:1px solid var(--line); border-radius:8px; padding:12px; } .plain-card h3 { margin-top:4px; }
.sure { background:#F3F5F8; border-radius:6px; padding:8px 10px; font-size:14px; margin-top:8px; }
.toc { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:14px; margin-bottom:12px; }
.badge-draft { display:inline-block; background:var(--warn); color:var(--warn-ink); padding:2px 10px; border-radius:999px; font-size:12px; font-weight:600; }

/* Portfolio view (screen 6) */
.steps-bar { display:flex; height:10px; width:180px; border-radius:3px; overflow:hidden; background:#E7EAEE; margin-bottom:2px; }
.steps-bar span, .legend .key { display:inline-block; height:10px; }
.steps-bar .local, .legend .key.local { background:var(--accent); } .steps-bar .generic, .legend .key.generic { background:#9DB4D3; }
.steps-bar .unq, .legend .key.unq { background:repeating-linear-gradient(45deg, #fff, #fff 2px, var(--bad) 2px, var(--bad) 4px); }
.legend .key { width:14px; margin:0 4px 0 12px; vertical-align:middle; border-radius:2px; }
table.matrix td.cell-measured { background:var(--accent); color:#fff; font-weight:600; text-align:center !important; }
table.matrix td.cell-prioritygap { color:var(--bad); outline:1px dashed var(--bad); outline-offset:-3px; text-align:center !important; }
table.matrix td.cell-notpriority { background:#F3F4F6; } table.matrix td.cell-notranked { color:var(--muted); font-size:12px; }

/* Ward map (spec 6.1 part 2, 6.3, VIEW-10) */
.ward-map { margin:0; display:flex; flex-direction:column; gap:8px; min-width:0; }
.ward-map svg { width:100%; height:auto; display:block; background:#FAFAFB; border:1px solid #E7EAEE; border-radius:6px; font-family: system-ui, "Segoe UI", sans-serif; }
.map-head { display:flex; flex-wrap:wrap; gap:8px; align-items:baseline; justify-content:space-between; } .map-title { font-weight:600; }
.map-needs { display:flex; flex-wrap:wrap; gap:6px; }
.map-needs a { font-size:13px; min-height:36px; display:inline-flex; align-items:center; padding:0 12px; border-radius:6px; border:1px solid #AEB6C2; background:#fff; color:var(--ink); text-decoration:none; }
.map-needs a.on { background:#17202A; border-color:#17202A; color:#fff; }
.map-warn { display:block; border-radius:6px; padding:6px 10px; }
.map-legend { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; color:#3B4552; } .map-legend > span { display:inline-flex; gap:6px; align-items:center; }
.map-legend .swatch { width:14px; height:14px; border-radius:2px; display:inline-block; }
.map-legend .ring { width:14px; height:14px; border-radius:999px; border:2.5px solid #C2410C; box-sizing:border-box; display:inline-block; }
.map-legend .pin { width:20px; height:14px; border-radius:3px; border:2px solid #17202A; background:#fff; box-sizing:border-box; display:inline-block; } .map-legend .pin.on { background:#17202A; }
ol.map-wards { margin:0; padding-left:22px; columns:2; column-gap:24px; color:#3B4552; }
.needs-map { display:grid; grid-template-columns: 1fr 1fr; gap:16px; align-items:start; } @media (max-width: 900px) { .needs-map { grid-template-columns:1fr; } }

/* Pin hover cards: each card is inside its pin and hidden until the pin is hovered or has keyboard focus. */
.ward-map .map-card { display:none; }
.ward-map .map-pin { cursor:pointer; outline:none; }
.ward-map .map-pin:hover > rect, .ward-map .map-pin:focus-visible > rect { stroke:#C2410C; stroke-width:3; }
.ward-map .ward-mark { cursor:default; } .ward-map .ward-mark:hover > circle, .ward-map .ward-mark:focus-visible > circle { stroke:#17202A; stroke-width:3.5; }
.ward-map .map-pin:hover .map-card, .ward-map .map-pin:focus-visible .map-card { display:inline; }
/* Conformity statement (CON-1, CON-2) */
form.review { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0; }
form.review input[name=note] { min-width:260px; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }

/* Needs data sources page */
table.grid.sources { table-layout:fixed; } .nowrap { white-space:nowrap; }
/* AI steps (D17, AI-2) */
blockquote { margin:8px 0; padding:8px 12px; border-left:3px solid var(--muted); background:#F5F7FA; }
details.ai-io pre { white-space:pre-wrap; word-break:break-word; font-size:12px; max-height:320px; overflow:auto; background:#F5F7FA; padding:8px; }
