:root {
  --bg: #0a1a2e; --panel: #0f2440; --panel2: #132c4d; --line: #234a75; --ink: #e8f1fb; --muted: #8fb0d3;
  --accent: #6fd0ff; --amber: #ffc266; --ok: #5fd39a; --warn: #ffb84d; --err: #ff6b6b; --dec: #b99cff; --gap: #7f93a8;
  --canon: #5fd39a; --proposed: #6fd0ff; --assumption: #ffb84d;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; font: inherit; }
button:hover { border-color: var(--accent); }
button.on { background: #1d4f86; border-color: var(--accent); }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 18px; background: #071425; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.brand .mark { color: var(--amber); }
.brand .sub { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 6px; color: var(--muted); }
.tabs a.active { background: var(--panel2); color: var(--ink); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.actions { display: flex; gap: 10px; align-items: center; }
.pill { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--err); color: #111; font-size: 11px; font-weight: 700; text-align: center; }
.pill:empty { display: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
main { padding: 16px 18px 40px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 16px; margin: 18px 0 8px; color: var(--amber); text-transform: uppercase; letter-spacing: 1px; }
h3 { font-size: 14px; margin: 14px 0 6px; color: var(--accent); }
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.card .big { font-size: 28px; font-weight: 700; }
.card .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #1a3a5e; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #16365c; }
.bar { height: 8px; background: #1a3a5e; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; }
.b-canon { color: var(--canon); } .b-proposed { color: var(--proposed); } .b-assumption, .b-placeholder { color: var(--assumption); }
.b-not { color: var(--gap); border-style: dashed; } .b-started { color: var(--amber); }
.sev-error { color: var(--err); } .sev-warning { color: var(--warn); } .sev-decision { color: var(--dec); } .sev-gap { color: var(--gap); }
.explore { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .explore { grid-template-columns: 1fr; } }
.crumbs { margin-bottom: 10px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs .sep { color: var(--muted); }
.crumbs b { color: var(--amber); }
.mapwrap { background: #08182b; border: 1px solid var(--line); border-radius: 10px; position: relative; overflow: hidden; }
.mapwrap svg { display: block; width: 100%; height: min(72vh, 760px); cursor: grab; user-select: none; }
.mapwrap svg.dragging { cursor: grabbing; }
.maptools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.maptools button { padding: 3px 9px; font-size: 12px; background: rgba(15,36,64,.9); }
.maphint { position: absolute; left: 10px; bottom: 8px; font-size: 11px; color: var(--muted); background: rgba(8,24,43,.8); padding: 2px 6px; border-radius: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); padding: 8px 4px 0; }
.legend i { display: inline-block; width: 12px; height: 10px; margin-right: 5px; vertical-align: middle; border: 1px solid #cfe3f7; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: calc(72vh + 40px); overflow: auto; }
.panel h1 { font-size: 19px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; font-size: 13px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.notdesigned { color: var(--gap); font-style: italic; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 5px 6px; border-bottom: 1px solid #1a3a5e; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.list li:hover { background: #16365c; }
.issue { border-left: 3px solid var(--line); padding: 6px 10px; margin: 6px 0; background: #0c2038; border-radius: 0 6px 6px 0; font-size: 13px; }
.issue.error { border-color: var(--err); } .issue.warning { border-color: var(--warn); } .issue.decision { border-color: var(--dec); } .issue.gap { border-color: var(--gap); }
.issue.known { opacity: .55; }
.issue .t { font-weight: 600; }
.issue .meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filters input[type=text], .filters input:not([type]) { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; min-width: 240px; font: inherit; }
svg text { font-family: "Segoe UI", system-ui, sans-serif; pointer-events: none; }
.hit { cursor: pointer; }
.hit:hover { filter: brightness(1.35); }
.sel { stroke: var(--amber) !important; stroke-width: 3 !important; }
.note { background: #0c2038; border: 1px dashed var(--line); border-radius: 8px; padding: 10px; color: var(--muted); font-size: 13px; }
code { background: #0c2038; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.help p, .help li { max-width: 860px; line-height: 1.55; }
