/* NSPM web interface.
   Layout: fixed left navigation, content column up to 1240px.
   Severity colors are status colors: always paired with a text label, never color alone. */

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #141a22;
  --ink-2: #4b5563;
  --ink-3: #6b7480;
  --line: #dde2e8;
  --line-2: #c6cdd6;
  --accent: #2f4a8a;
  --accent-ink: #ffffff;
  --accent-soft: #e6ebf5;
  --focus: #2f6fd6;
  --sev-critical: #c42f2f;
  --sev-high: #e5711f;
  --sev-medium: #f2b01e;
  --sev-low: #2a78d6;
  --sev-info: #9aa1aa;
  --good: #1d7a3e;
  --good-soft: #e5f3ea;
  --bad: #b42a2a;
  --bad-soft: #fbe9e9;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
  /* Chart palette: categorical slots in a fixed, colour-blind-checked order (validated against
     this surface); sequential blue ramp for heatmaps, step 0 = no data. */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --c-other: #a3a9b1;
  --seq-0: #f1f3f6; --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --viz-allow: var(--c1); --viz-drop: var(--c2);
  --nav-w: 220px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1318; --surface: #151a21; --surface-2: #1a2029; --ink: #e6ebf1; --ink-2: #a9b3bf; --ink-3: #8a94a1;
    --line: #263040; --line-2: #34415a; --accent: #8fa8e6; --accent-ink: #0f1318; --accent-soft: #1d2740;
    --focus: #8fb4ff; --sev-low: #3987e5; --sev-info: #6c737c; --good: #5cc884; --good-soft: #12291b;
    --bad: #f07a7a; --bad-soft: #2e1617; color-scheme: dark;
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
    --c-other: #5d6672;
    --seq-0: #1c232d; --seq-1: #17305a; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
    --viz-allow: var(--c1); --viz-drop: var(--c2);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1318; --surface: #151a21; --surface-2: #1a2029; --ink: #e6ebf1; --ink-2: #a9b3bf; --ink-3: #8a94a1;
  --line: #263040; --line-2: #34415a; --accent: #8fa8e6; --accent-ink: #0f1318; --accent-soft: #1d2740;
  --focus: #8fb4ff; --sev-low: #3987e5; --sev-info: #6c737c; --good: #5cc884; --good-soft: #12291b;
  --bad: #f07a7a; --bad-soft: #2e1617; color-scheme: dark;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
  --c-other: #5d6672;
  --seq-0: #1c232d; --seq-1: #17305a; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
  --viz-allow: var(--c1); --viz-drop: var(--c2);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: 0.95rem; font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: 0.88em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 0.86rem; }
.noscript { padding: 2rem; }
[hidden] { display: none !important; }

/* --- Shell ------------------------------------------------------------------------------ */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink); font-weight: 700; letter-spacing: 0.02em; }
.brand img { width: 26px; height: 26px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav .spacer { flex: 1; }
.nav { overflow-y: auto; }
.nav-groups { display: grid; gap: 2px; }
.nav-section { display: grid; }
.nav-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px 4px; border: 0;
  background: none; color: var(--ink-3); font: inherit; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.04em;
  text-transform: uppercase; cursor: pointer; border-radius: var(--radius); text-align: left; }
.nav-group > span:first-child { flex: 1; min-width: 0; text-align: left; }
.nav-group .chev { flex: none; }
.nav-group:hover { color: var(--ink); }
.nav-group .chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin: 0 4px 3px 0; transition: transform 120ms; }
.nav-group[aria-expanded="false"] .chev { transform: rotate(-45deg); margin-bottom: 0; }
.nav-section.holds > .nav-group { color: var(--ink-2); }
.nav-items { display: grid; gap: 1px; padding-bottom: 6px; }
.nav-items a { padding: 6px 10px 6px 14px; }
.jump-open { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; padding: 6px 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); color: var(--ink-3); font: inherit;
  font-size: 0.88rem; cursor: pointer; text-align: left; }
.jump-open:hover { color: var(--ink); border-color: var(--ink-3); }
.jump-open kbd, .jump-help kbd { font: 0.74rem var(--mono); padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); }
.jump-overlay { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 28%, transparent);
  display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.jump { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28); overflow: hidden; }
.jump-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 16px; font-size: 1rem; background: var(--surface); }
.jump-input:focus { outline: none; box-shadow: none; }
.jump-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.jump-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; }
.jump-list li.active, .jump-list li:hover { background: var(--accent-soft); color: var(--accent); }
.jump-help { padding: 8px 16px; border-top: 1px solid var(--line); }
.nav .who { padding: 10px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.nav .who .email { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .who-actions { display: flex; gap: 6px; padding: 0 10px; flex-wrap: wrap; }
.main { min-width: 0; padding: 28px 36px 64px; }
.main:focus { outline: none; }
.page { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.page > *, .split > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .lede { margin-top: 6px; color: var(--ink-2); max-width: 70ch; }
.crumbs { font-size: 0.86rem; color: var(--ink-3); margin-bottom: 6px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .brand { padding: 4px 8px; }
  .nav .spacer { display: none; }
  .nav .who { border-top: 0; padding: 4px 8px; }
  .nav-groups { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); width: 100%; gap: 0 12px; align-items: start; }
  .nav-group { text-align: left; }
  .jump-open { margin: 0; }
  .main { padding: 20px 16px 48px; }
}

/* --- Controls --------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 500 0.92rem/1 var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.danger.solid { background: var(--bad); color: var(--surface); }
.btn.link { border: 0; background: none; color: var(--accent); padding: 0 4px; height: auto; }
.btn.small { height: 28px; padding: 0 10px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
label.field { display: grid; gap: 5px; font-size: 0.88rem; font-weight: 500; color: var(--ink-2); min-width: 0; }
label.field .hint { font-weight: 400; color: var(--ink-3); font-size: 0.82rem; }
input, select, textarea { font: inherit; font-size: 0.93rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius); height: 36px; padding: 0 10px; min-width: 0; width: 100%; }
select { padding-right: 6px; }
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.toolbar > label.field { width: auto; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.notice { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); font-size: 0.92rem; }
.notice.error { border-color: var(--bad); background: var(--bad-soft); color: var(--ink); }
.notice.ok { border-color: var(--good); background: var(--good-soft); color: var(--ink); }
.notice strong { font-weight: 650; }

/* --- Panels and tables ------------------------------------------------------------------ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel > .panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px 10px; }
.panel > .panel-body, .w-body .panel-body { padding: 0 18px 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.82rem; padding: 8px 12px; border-bottom: 1px solid var(--line); 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; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .cell-list { display: grid; gap: 1px; }
.empty { padding: 36px 18px; text-align: center; color: var(--ink-2); display: grid; gap: 12px; justify-items: center; }
.empty h2 { color: var(--ink); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--ink-2); }

/* --- Severity ---------------------------------------------------------------------------- */
.sev { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 0.86rem; color: var(--ink); }
.sev::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--c); flex: none; }
.sev.critical, .seg.critical { --c: var(--sev-critical); }
.sev.high, .seg.high { --c: var(--sev-high); }
.sev.medium, .seg.medium { --c: var(--sev-medium); }
.sev.low, .seg.low { --c: var(--sev-low); }
.sev.info, .seg.info { --c: var(--sev-info); }
.sev-label { font-weight: 600; }
.counts { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.strip { display: flex; gap: 2px; height: 10px; min-width: 0; }
.strip .seg { background: var(--c); min-width: 3px; }
.strip .seg:first-child { border-radius: 4px 0 0 4px; }
.strip .seg:last-child { border-radius: 0 4px 4px 0; }
.strip .seg:only-child { border-radius: 4px; }
.strip-track { width: 100%; }
.clean { color: var(--good); font-weight: 600; font-size: 0.88rem; }

/* --- Dashboard --------------------------------------------------------------------------- */
.headline { font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.2; font-weight: 650; letter-spacing: -0.015em; max-width: 30ch; }
.headline .n { font-variant-numeric: tabular-nums; }
.headline.calm { color: var(--good); }
.summary { display: grid; gap: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; color: var(--ink-2); font-size: 0.92rem; }
.facts b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.total-strip { display: grid; gap: 8px; max-width: 760px; }
.total-strip .strip { height: 14px; }
.devices td { vertical-align: middle; }
.devices .dev-name { font-family: var(--mono); font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.devices .bar-cell { width: 34%; min-width: 220px; }
.devices .bar-cell .counts { margin-top: 6px; }
.risk { display: grid; justify-items: end; gap: 1px; }
.risk .score { font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.risk .score small { font-size: 0.72rem; color: var(--ink-3); font-weight: 500; }
.delta { font-size: 0.8rem; white-space: nowrap; }
.delta.up { color: var(--bad); }
.delta.down { color: var(--good); }
.spark { display: block; }
.spark .line { fill: none; stroke: var(--ink-2); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark .base { stroke: var(--line); stroke-width: 1; }
.spark .last { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.spark .hit { fill: transparent; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.fix-list { list-style: none; margin: 0; padding: 0; }
.fix-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.fix-list li > .badge { justify-self: start; max-width: 100%; white-space: normal; text-align: center; }
.fix-list li:first-child { border-top: 0; }
.fix-list .where { grid-column: 2; font-size: 0.84rem; color: var(--ink-3); }

/* --- Upload ------------------------------------------------------------------------------ */
.drop { display: grid; place-items: center; gap: 8px; text-align: center; padding: 36px 20px; border: 1.5px dashed var(--line-2);
  border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .file { font-family: var(--mono); font-size: 0.92rem; color: var(--ink); }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.formats div { font-size: 0.86rem; color: var(--ink-2); }
.formats b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

/* --- Snapshot detail ---------------------------------------------------------------------- */
.meta { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 0.88rem; color: var(--ink-2); }
.meta b { color: var(--ink); font-weight: 600; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { color: var(--ink-3); font-variant-numeric: tabular-nums; margin-left: 4px; font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); font: 500 0.86rem/1 var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.chip[aria-pressed="false"] { border-style: dashed; color: var(--ink-3); }
.chip[aria-pressed="false"] .sev { color: var(--ink-3); text-decoration: line-through; }
.chip[aria-pressed="false"] .sev::before { opacity: 0.3; }
h1.mono { font-size: 1.45rem; font-weight: 650; letter-spacing: 0; }
.snap-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.risk-inline { font-size: 0.95rem; color: var(--ink-2); }
.risk-inline b { font-size: 1.25rem; color: var(--ink); font-weight: 650; }
.chip .sev { font-size: inherit; }
.findings { display: grid; }
.finding { border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; }
.finding summary { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 18px; cursor: pointer; list-style: none; }
.finding summary::-webkit-details-marker { display: none; }
.finding summary:hover { background: var(--surface-2); }
.finding summary .title { font-weight: 550; }
.finding summary .where { font-size: 0.84rem; color: var(--ink-3); }
.finding .body { padding: 2px 18px 16px 122px; display: grid; gap: 10px; max-width: 980px; }
.finding .body h3 { font-size: 0.82rem; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-chip { font-family: var(--mono); font-size: 0.82rem; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 700px) {
  .finding summary { grid-template-columns: 1fr; gap: 4px; }
  .finding .body { padding-left: 18px; }
}
.rules td { font-size: 0.85rem; }
.rules .act { font-weight: 600; }
.rules .act.allow { color: var(--good); }
.rules .act.deny { color: var(--bad); }
.flag { display: inline-block; font-size: 0.75rem; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-2); margin: 0 4px 3px 0; white-space: nowrap; }
.flag.warn { border-color: var(--sev-medium); }
tr.disabled td { color: var(--ink-3); }
.confirm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--bad); border-radius: var(--radius); background: var(--bad-soft); }

/* --- Sign-in ------------------------------------------------------------------------------ */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(380px, 100%); display: grid; gap: 16px; padding: 30px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.login .brand { padding: 0 0 4px; font-size: 1.05rem; }
.login p.tag { color: var(--ink-2); font-size: 0.9rem; margin-top: -8px; }

/* --- Audit -------------------------------------------------------------------------------- */
.detail-kv { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.82rem; color: var(--ink-2); }
.detail-kv span b { color: var(--ink-3); font-weight: 500; }
.detail-kv span { overflow-wrap: anywhere; }
.badge { white-space: nowrap; display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.badge.bad { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.badge.good { color: var(--good); border-color: var(--good); background: var(--good-soft); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .nav a, .drop { transition: background-color 120ms, border-color 120ms, color 120ms; }
}

/* --- Devices ------------------------------------------------------------------------------- */
textarea { height: auto; min-height: 110px; padding: 8px 10px; font-family: var(--mono); font-size: 0.8rem; line-height: 1.4; resize: vertical; }
label.check { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; color: var(--ink); font-weight: 500; min-height: 36px; }
label.check input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
.tls { display: grid; gap: 12px; }
.form-sub { font-size: 0.88rem; color: var(--ink-2); margin-bottom: 8px; font-weight: 600; }
.help { max-width: 80ch; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; }
.run-error { margin-top: 4px; font-size: 0.82rem; color: var(--bad); max-width: 46ch; overflow-wrap: anywhere; }
.badge.source { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 0.9rem; }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }

/* --- Changes, alerts, search (0.6.0) -------------------------------------------------------- */
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--sev-critical); color: #fff;
  font-size: 0.75rem; font-weight: 650; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.chg-line { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 0.84rem; }
.chg { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 550; }
.chg.added { color: var(--good); }
.chg.removed { color: var(--bad); }
.chg.modified, .chg.moved { color: var(--ink-2); }
.chg-cell { display: grid; gap: 3px; }
.chg-new { display: flex; align-items: center; gap: 2px; }
.fix-list .chg-line { grid-column: 2; }
.panel.attention { border-color: var(--sev-critical); box-shadow: inset 4px 0 0 var(--sev-critical); }
.change-summary .headline { max-width: none; font-size: clamp(1.25rem, 2.1vw, 1.7rem); }
.notice:not(.error):not(.ok) { border-left: 3px solid var(--accent); }

.rule-changes { list-style: none; margin: 0; padding: 0; }
.rule-change { padding: 11px 18px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.rule-change:first-child { border-top: 0; }
.rc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rc-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.kind { display: inline-block; min-width: 72px; text-align: center; font-size: 0.75rem; font-weight: 650; padding: 1px 7px; border-radius: 4px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface-2); text-transform: uppercase; letter-spacing: 0.03em; }
.kind.added { color: var(--good); border-color: var(--good); background: var(--good-soft); }
.kind.removed { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.kind.modified { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.rule-change.removed .rc-name { text-decoration: line-through; color: var(--ink-2); }
.gist { color: var(--ink-2); overflow-wrap: anywhere; padding-left: 82px; }
.act { font-weight: 600; }
.act.allow { color: var(--good); }
.act.deny { color: var(--bad); }
dl.field-changes { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0 0 0 82px; font-size: 0.86rem; }
dl.field-changes dt { color: var(--ink-3); }
dl.field-changes dd { margin: 0; overflow-wrap: anywhere; }
dl.field-changes del { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
dl.field-changes ins { color: var(--good); text-decoration: none; font-weight: 600; }
@media (max-width: 700px) {
  .gist { padding-left: 0; }
  dl.field-changes { margin-left: 0; grid-template-columns: 1fr; gap: 0 0; }
  dl.field-changes dd { margin-bottom: 6px; }
}

.alert-list { display: grid; gap: 14px; }
.alert-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 4px; padding-bottom: 12px; }
.alert-card.open { box-shadow: inset 4px 0 0 var(--sev-critical); }
.alert-card .alert-head { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 18px 6px; }
.alert-card h2 { font-size: 1rem; }
.alert-card .fix-list li { padding: 7px 18px; }
.alert-card > p, .alert-card > div:last-child { padding: 0 18px; }
.ack-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 8px; }
.ack-form input { flex: 1 1 260px; width: auto; }
.ack-line q { color: var(--ink); }
@media (max-width: 700px) {
  .alert-card .alert-head { grid-template-columns: 1fr; gap: 6px; }
}
.dev-cell a { white-space: nowrap; font-weight: 600; }
.gist .flag { margin: 0 0 0 6px; }

/* --- Compliance and zones (0.7.0) ------------------------------------------------------------ */
.badge.warn { color: var(--ink); border-color: var(--sev-medium); background: color-mix(in srgb, var(--sev-medium) 18%, var(--surface)); }
.cstatus { min-width: 96px; text-align: center; }
.cstrip { height: 12px; }
.seg.c-fail { --c: var(--bad); }
.seg.c-review { --c: var(--sev-medium); }
.seg.c-pass { --c: var(--good); }
.seg.c-not_assessed { --c: var(--line-2); }
.headline-sub { font-size: 0.55em; font-weight: 500; }
.fw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.fw-card { display: grid; gap: 12px; padding: 18px; color: var(--ink); }
.fw-card:hover { text-decoration: none; border-color: var(--accent); }
.fw-card h2 { margin-bottom: 4px; }
.fw-score b { font-size: 1.8rem; font-weight: 650; }
.fw-card .counts span { display: inline-flex; align-items: center; gap: 4px; }
.csection > div:last-child { border-top: 1px solid var(--line); }
.control { border-top: 1px solid var(--line); }
.control:first-child { border-top: 0; }
.control > summary { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 18px; cursor: pointer; list-style: none; }
.control > summary::-webkit-details-marker { display: none; }
.control > summary:hover { background: var(--surface-2); }
.control .ctitle { font-weight: 550; }
.control .cid { color: var(--ink-2); margin-right: 8px; font-weight: 650; }
.control .where { font-size: 0.85rem; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.kind-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; }
.control .body { padding: 0 18px 16px 140px; display: grid; gap: 12px; }
.control .cmeta { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.control .cmeta h3 { font-size: 0.82rem; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.control .cmeta p { font-size: 0.9rem; max-width: 70ch; }
table.evidence { border: 1px solid var(--line); border-radius: var(--radius); }
table.evidence td:last-child { min-width: 280px; }
.disclaimer { max-width: 90ch; }
.scope-fs { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 2px; margin: 0; }
.scope-fs legend { font-size: 0.88rem; font-weight: 500; color: var(--ink-2); padding: 0 4px; }
.scope-devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; padding: 4px 0 0 26px; }
.scope-devices label.check { min-height: 30px; }
@media (max-width: 700px) {
  .control > summary { grid-template-columns: 1fr; gap: 4px; }
  .control .body { padding-left: 18px; }
}

table.zone-matrix { width: auto; border-collapse: separate; border-spacing: 4px; margin: 0 14px 8px; }
table.zone-matrix th { border: 0; background: none; text-align: center; font-size: 0.82rem; padding: 4px 8px; }
table.zone-matrix th[scope=row] { text-align: right; }
table.zone-matrix td { border: 0; padding: 0; }
.zcell { min-width: 92px; }
.zbtn { width: 100%; min-width: 92px; height: 40px; border-radius: var(--radius); border: 1px solid var(--line-2); font: 600 0.85rem/1 var(--sans);
  cursor: pointer; background: var(--surface-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.zbtn.restricted { background: var(--good-soft); border-color: var(--good); color: var(--ink); }
.zbtn.broad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.zbtn.none { color: var(--ink-3); }
.zbtn[aria-pressed="true"] { outline: 2px solid var(--focus); outline-offset: 1px; }
.empty-cell { text-align: center; }
.zone-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-2); }
.zone-legend span { display: inline-flex; align-items: center; gap: 6px; }
.zkey { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--surface-2); }
.zkey.restricted { background: var(--good-soft); border-color: var(--good); }
.zkey.broad { background: var(--bad-soft); border-color: var(--bad); }
.zone-detail { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.zone-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.zone-rules li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 0.9rem; }

@media print {
  .nav, .no-print, .toolbar, .who-actions { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .panel { break-inside: avoid-page; border-color: #bbb; }
  details.control { break-inside: avoid; }
  .control > summary { cursor: default; }
  a { color: inherit; }
}
.tabs { overflow-x: auto; scrollbar-width: thin; }
.tabs a { white-space: nowrap; flex: none; }
.panel > .panel-head { flex-wrap: wrap; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stack.wide-gap { gap: 18px; }
table.evidence td:nth-child(2), table.evidence td:nth-child(3) { white-space: nowrap; }
.scope-form .form-grid { align-items: start; }

/* --- Alerting (0.8.0) ------------------------------------------------------------------------- */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; }
.subnav a { padding: 6px 14px; border-radius: 16px; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 500; font-size: 0.9rem; background: var(--surface); }
.subnav a:hover { text-decoration: none; border-color: var(--ink-3); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tag-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.alert-card > .alert-meta { padding: 0 18px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.by { color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.check-grid label.check { min-height: 30px; font-weight: 400; }
.field.wide { grid-column: 1 / -1; display: grid; gap: 5px; font-size: 0.88rem; font-weight: 500; color: var(--ink-2); }
.rule-name { font-weight: 600; }
.rules-table td { vertical-align: middle; }
.rules-table .actions { flex-wrap: nowrap; }
select.small-select { height: 28px; font-size: 0.85rem; width: auto; padding: 0 6px; }
.channel-card { display: grid; gap: 10px; padding: 14px 18px; }
.channel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.channel-head h2 { font-size: 1rem; }
@media (max-width: 860px) { .rules-table .actions { flex-wrap: wrap; } }
.nowrap { white-space: nowrap; }

/* --- Network map and packet trace (0.9.0) ------------------------------------------------------ */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .map-layout { grid-template-columns: minmax(0, 1fr); } }
.map-panel { overflow: hidden; }
.map-frame { position: relative; }
.netmap { display: block; width: 100%; height: auto; min-height: 280px; max-height: 640px; background: var(--surface-2); cursor: grab; touch-action: none; user-select: none; }
.netmap.dragging { cursor: grabbing; }
.map-controls { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.map-controls .btn { min-width: 32px; }
.map-side { padding: 14px 16px; }
.map-detail h3 { font-size: 1rem; }
.map-detail .small-h { font-size: 0.82rem; color: var(--ink-3); margin: 4px 0 2px; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.edge { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.edge.nexthop, .edge.default { stroke-dasharray: 5 4; }
.edge.exposure { stroke: var(--sev-high); stroke-dasharray: 3 3; }
.edge.on-path { stroke: var(--accent); stroke-width: 4; stroke-dasharray: none; }
.edge-label { font: 500 10px var(--mono); fill: var(--ink-3); paint-order: stroke; stroke: var(--surface-2); stroke-width: 4px; }
.node { cursor: pointer; }
.node .shape { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; }
.node.device .shape { stroke: var(--ink-2); stroke-width: 2; }
.node.device.bare .shape { stroke-dasharray: 4 3; }
.node.cloud .shape { stroke: var(--sev-low); stroke-width: 2; }
.node.subnet .shape { fill: var(--surface-2); }
.node.subnet.shared .shape { fill: var(--accent-soft); stroke: var(--accent); }
.node.gateway .shape { stroke-dasharray: 4 3; }
.node.internet .shape { fill: var(--ink); stroke: var(--ink); }
.node.internet .n-title { fill: var(--surface); }
.node .n-title { font: 650 13px var(--sans); fill: var(--ink); }
.node .n-title.mono { font: 600 12px var(--mono); }
.node .n-sub { font: 11px var(--sans); fill: var(--ink-3); }
.node .n-sub.mono { font: 11px var(--mono); fill: var(--ink-2); }
.node .n-risk { font: 600 11px var(--sans); fill: var(--ink-2); }
.node .n-crit { font: 600 11px var(--sans); fill: var(--sev-critical); }
.node:hover .shape, .node:focus-visible .shape { stroke: var(--focus); }
.node:focus { outline: none; }
.node.selected .shape { stroke: var(--focus); stroke-width: 3; }
.node.on-path .shape { stroke: var(--accent); stroke-width: 3; }
.node.drop-here .shape { stroke: var(--bad); stroke-width: 3.5; fill: var(--bad-soft); }
.trace-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.trace-result { padding: 14px 18px; display: grid; gap: 12px; }
.trace-result.delivered { box-shadow: inset 4px 0 0 var(--good); }
.trace-result.dropped, .trace-result.loop { box-shadow: inset 4px 0 0 var(--bad); }
.trace-result.left { box-shadow: inset 4px 0 0 var(--sev-medium); }
.trace-head { display: flex; gap: 12px; align-items: flex-start; }
.trace-summary { font-weight: 600; font-size: 1.02rem; }
.hops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hop { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; background: var(--surface); }
.hop.deny { border-color: var(--bad); }
.hop-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.hop-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 0.8rem; }
.zones .zone { font-family: var(--mono); font-size: 0.82rem; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 4px; }
.hop-kv { grid-template-columns: max-content minmax(0, 1fr); }
.hop-notes { margin: 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 2px; }
.netmap .labels { pointer-events: none; }

/* --- Dashboards (0.10.0) ----------------------------------------------------------------------- */
.dash-switch { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.dash-switch select { min-width: 220px; width: auto; }
.widget-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.widget { grid-column: span 6; min-width: 0; }
.widget.w-s { grid-column: span 4; }
.widget.w-l { grid-column: 1 / -1; }
@media (max-width: 1100px) { .widget.w-s { grid-column: span 6; } }
@media (max-width: 760px) { .widget, .widget.w-s { grid-column: 1 / -1; } }
.w-body .fix-list li { padding: 9px 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; background: var(--surface); border-top: 1px solid var(--line); overflow: hidden; }
.kpi { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); color: var(--ink-2); font-size: 0.86rem;
  box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
a.kpi:hover { background: var(--surface-2); text-decoration: none; }
.kpi b { font-size: 1.7rem; font-weight: 650; color: var(--ink); line-height: 1.1; }
.kpi.crit b { color: var(--sev-critical); }
.kpi.high b { color: var(--sev-high); }
.kpi.warn b { color: var(--bad); }
.kpi.zero b { color: var(--ink-3); }
.w-risk { font-size: 1.15rem; font-weight: 650; }
.w-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.w-big b { font-size: 2rem; font-weight: 650; }
.w-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.w-flowsum { padding: 8px 16px 0; font-weight: 600; }
svg.trend { display: block; width: 100%; height: auto; }
svg.trend .grid { stroke: var(--line); stroke-width: 1; }
svg.trend .axis { font: 10px var(--sans); fill: var(--ink-3); }
svg.trend .tline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.w-edit-list { display: grid; gap: 12px; }
.w-edit { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 16px; display: grid; gap: 10px; }
.w-edit-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.w-edit-head .actions { margin-left: auto; }
table.flows input, table.flows select { min-width: 90px; }
table.flows td { padding: 4px 6px; border: 0; }
.add-widget .actions { align-items: flex-end; }
.add-widget select { width: auto; min-width: 200px; }

/* --- Traffic (0.11.0) --------------------------------------------------------------------------- */
.filter-row { display: flex; gap: 12px 18px; align-items: flex-end; flex-wrap: wrap; }
.field.inline { display: flex; gap: 8px; align-items: center; }
.field.inline select { width: auto; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--ink-3); margin-right: 6px; vertical-align: 1px; }
.dot.live { background: var(--good); }
.split.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .split.three { grid-template-columns: 1fr; } }
.rank-list { list-style: none; margin: 0; padding: 6px 16px 14px; display: grid; gap: 9px; }
.rank-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; min-width: 0; }
.rank-row a, .rank-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 3px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 2px; background: var(--ink-3); }
td.bar-td { width: 18%; min-width: 80px; }
.chart-wrap { position: relative; }
svg.traffic-chart .tline { stroke-width: 2; }
svg.traffic-chart .tarea { opacity: 0.14; }
svg.traffic-chart .axis.strong { fill: var(--ink-2); font-weight: 600; font-size: 11px; }
svg.traffic-chart .grid.faint { stroke-dasharray: 2 4; }
svg.traffic-chart .hair { stroke: var(--ink-3); stroke-width: 1; }
.chart-tip { position: absolute; top: 8px; min-width: 150px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: 0 4px 14px rgb(0 0 0 / 0.12); font-size: 0.86rem; pointer-events: none; display: grid; gap: 2px; }
.chart-tip .key { display: inline-block; width: 12px; height: 2px; margin: 0 6px 3px 0; vertical-align: middle; background: var(--ink-3); }
.chart-table { margin-top: 8px; }
.chart-table table { margin-top: 6px; }
.obs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .obs-grid { grid-template-columns: 1fr; } }
.broad-card { border: 1px solid var(--line); border-left: 3px solid var(--sev-high); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 6px; }
.steps { text-align: left; max-width: 70ch; margin: 0 auto; display: grid; gap: 6px; }
.filters-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.overlay-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.overlay-bar select { width: auto; }
.edge.traffic { stroke: var(--viz-allow); stroke-opacity: 0.55; fill: none; }
.edge.traffic.has-drops { stroke: var(--viz-drop); stroke-dasharray: 6 3; stroke-opacity: 0.7; }
.node.discovered .shape { stroke-dasharray: 5 3; fill: var(--surface); }
.wt-top_drops .fix-list li { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; }
.wt-traffic_volume .w-row { padding-bottom: 0; }
table.conv td { vertical-align: middle; }
.rule-cell .badge { margin-left: 8px; }
.map-legend { display: inline-flex; gap: 12px; align-items: center; }
.map-legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--viz-allow); vertical-align: middle; margin-right: 4px; }
.map-legend i.drops { border-top: 2px dashed var(--viz-drop); }
.map-legend i.disc { width: 14px; height: 9px; border: 1.5px dashed var(--ink-3); border-radius: 5px; }

/* --- Packet capture ------------------------------------------------------------------------- */
.notice.warn { border-color: var(--sev-medium); background: color-mix(in srgb, var(--sev-medium) 14%, var(--surface)); color: var(--ink); }
.notice.info { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.verdict { border-left: 4px solid var(--line-2); }
.verdict.v-good { border-left-color: var(--good); }
.verdict.v-warn { border-left-color: var(--sev-medium); }
.verdict.v-bad { border-left-color: var(--bad); }
.verdict .panel-body { padding-top: 14px; }
.verdict-text { margin: 0; font-size: 1.05rem; font-weight: 600; }
.v-bad { color: var(--bad); }
.findings-list { list-style: none; margin: 0; padding-top: 0; display: grid; gap: 6px; }
.findings-list li { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 4px 14px; font-size: 0.9rem; padding: 8px 10px; border-radius: var(--radius); background: var(--surface-2); }
.findings-list li.f-bad { background: var(--bad-soft); }
@media (max-width: 700px) { .findings-list li { grid-template-columns: minmax(0, 1fr); } }
.capture-running .panel-body { padding-top: 14px; }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-right: 8px; vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: pulse 1.2s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: 0.25; } }
.plain-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.plain-fieldset legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 6px; }
.stage-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; }
.settings-panel > summary { cursor: pointer; list-style: none; }
.settings-panel > summary::-webkit-details-marker { display: none; }
.settings-panel > summary h2::before { content: "▸ "; color: var(--ink-3); }
.settings-panel[open] > summary h2::before { content: "▾ "; }
.cmd-preview pre { margin: 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; }
.row-actions { white-space: nowrap; }
.row-actions .btn + .btn { margin-left: 6px; }
.hop-capture { margin-left: auto; }
.reason-cell { max-width: 280px; overflow-wrap: anywhere; }
details.packets > summary { cursor: pointer; color: var(--accent); font-size: 0.86rem; }
.kpis.stages .kpi span { color: var(--ink-2); }
.cmd-preview { padding: 0 18px 16px; }
details.packets > summary { padding: 4px 18px 12px; }

/* --- Charts ------------------------------------------------------------------------------------- */
.chart { position: relative; display: grid; gap: 6px; min-width: 0; }
.chart-tools { display: flex; gap: 2px; justify-content: flex-end; margin-top: -6px; }
.chart-tools .btn.link { padding: 2px 6px; color: var(--ink-3); }
.chart-tools .btn.link:hover, .chart-tools .btn[aria-pressed="true"] { color: var(--accent); }
.chart-plot { min-width: 0; overflow: hidden; }
.chart-svg { display: block; max-width: 100%; overflow: visible; font-family: var(--sans); }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .baseline { stroke: var(--line-2); stroke-width: 1; }
.chart-svg .axis { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .area-fill { fill-opacity: 0.12; stroke: none; }
.chart-svg .end-dot { stroke: var(--surface); stroke-width: 2; }
.chart-svg .end-label { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.chart-svg .crosshair { stroke: var(--ink-3); stroke-width: 1; pointer-events: none; }
.chart-svg .hit { fill: transparent; }
.chart-svg .hit:focus { outline: none; }
.chart-svg .hit:focus-visible { stroke: var(--focus); stroke-width: 2; }
.chart-svg .col.on .bar { filter: brightness(1.12); }
.chart-svg .cat { fill: var(--ink-2); font-size: 12px; }
.chart-svg .val { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-svg .hrow:hover .bar, .chart-svg .hrow:focus-within .bar { filter: brightness(1.12); }
.chart-svg .clickable, .chart-svg .clickable * { cursor: pointer; }
.chart-svg .slice { stroke: var(--surface); stroke-width: 2; }
.chart-svg .slice:hover, .chart-svg .slice:focus { filter: brightness(1.12); outline: none; }
.chart-svg .donut-total { fill: var(--ink); font-size: 22px; font-weight: 650; }
.chart-svg .cell:hover { stroke: var(--ink); stroke-width: 1.5; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); }
.chart-legend.stacked { display: grid; gap: 4px; align-content: start; }
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.chart-legend a.lg-item:hover { color: var(--ink); }
.lg-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.lg-key.line { width: 14px; height: 2px; border-radius: 1px; }
.chart-donut { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 16px; align-items: center; }
.chart-donut .chart-tools { grid-column: 1 / -1; }
.chart-donut .chart-legend { grid-column: 2; grid-row: 2; }
.chart-donut .chart-plot { grid-column: 1; grid-row: 2; }
@media (max-width: 520px) { .chart-donut { grid-template-columns: minmax(0, 1fr); } .chart-donut .chart-legend, .chart-donut .chart-plot { grid-column: 1; grid-row: auto; } }
.scale-legend { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.seq-key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 120px; max-width: 280px; padding: 8px 10px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 4px 16px rgb(0 0 0 / 0.12); font-size: 0.82rem; }
.chart-tip .tip-head { color: var(--ink-3); margin-bottom: 4px; }
.chart-tip .tip-row { display: grid; grid-template-columns: 14px max-content minmax(0, 1fr); gap: 6px; align-items: center; }
.chart-tip .tip-row span { color: var(--ink-2); overflow-wrap: anywhere; }
.tip-key { display: inline-block; width: 12px; height: 2px; border-radius: 1px; }
.chart-table { font-size: 0.85rem; }
.chart-empty { padding: 18px 0; }
.tile { display: grid; gap: 2px; }
.tile-value { font-size: 2.4rem; font-weight: 650; line-height: 1.1; color: var(--ink); }
.tile-unit { font-size: 1rem; font-weight: 500; color: var(--ink-3); }
.tile-delta { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.tile-delta.worse { color: var(--bad); }
.tile-delta.better { color: var(--good); }
.tile-delta .faint { font-weight: 400; }
.spark { display: block; margin-top: 8px; }
.spark-line { fill: none; stroke: var(--c-other); stroke-width: 1.5; stroke-linejoin: round; }
.spark-dot { fill: var(--c1); stroke: var(--surface); stroke-width: 1.5; }
@media (forced-colors: active) { .chart-svg .bar, .chart-svg .slice, .chart-svg .cell { forced-color-adjust: none; } }

/* --- Assets ------------------------------------------------------------------------------------- */
.score-cell { display: grid; grid-template-columns: 2.2em 70px max-content; gap: 8px; align-items: center; }
.score-cell b { font-size: 1.05rem; text-align: right; }
.score-bar { height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 3px; }
.lv-critical { background: var(--sev-critical); } .lv-high { background: var(--sev-high); }
.lv-medium { background: var(--sev-medium); } .lv-low { background: var(--sev-low); } .lv-unscored { background: var(--sev-info); }
.assets-table td { vertical-align: top; }
.assets-table .badge { margin: 2px 4px 0 0; }
.asset-score { display: flex; align-items: center; gap: 10px; }
.big-score { min-width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 1.9rem; font-weight: 700; color: #fff; }
.big-score.lv-medium { color: #1b1b1b; }
.factor-list { list-style: none; margin: 0; padding: 4px 18px 14px; display: grid; gap: 10px; }
.factor-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: start; }
.factor-list .pts { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--bad); text-align: right; }
.factor-list .pts.zero { color: var(--ink-3); font-weight: 600; }
.exposure-table td { vertical-align: top; }
@media (max-width: 640px) { .score-cell { grid-template-columns: 2.2em 1fr; } .score-cell .sev { grid-column: 1 / -1; } }

/* --- Organizations, provider work and collectors (0.15) --- */
.acting-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 16px; border: 1px solid var(--sev-medium); border-left-width: 4px;
  border-radius: var(--radius); background: color-mix(in srgb, var(--sev-medium) 12%, var(--surface)); font-size: 0.92rem; }
.tenant-switch select { width: 100%; font-size: 0.86rem; padding: 4px 6px; }
.tenant-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink-2); }
.copy-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-box code { flex: 1 1 320px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-size: 0.82rem; overflow-wrap: anywhere; user-select: all; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notice.enroll .small-h { margin: 10px 0 4px; }
.sealed-note { padding: 8px 10px; border-left: 3px solid var(--good); background: var(--good-soft); border-radius: var(--radius); color: var(--ink); }
.sealed-note[hidden] { display: none; }
table.tenants td, table.collectors td { vertical-align: top; }
h3.small-h { font-size: 0.84rem; color: var(--ink-2); margin: 10px 0 4px; font-weight: 600; }
table.collectors td a.mono { white-space: nowrap; }

/* --- NSPM staff: all clients (0.16) --- */
.client-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ckpi { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ckpi .kpi-n { font-size: 1.6rem; font-weight: 650; line-height: 1.15; color: var(--ink); }
.ckpi .kpi-l { font-size: 0.84rem; color: var(--ink-2); }
.ckpi.bad { border-color: var(--bad); }
.ckpi.bad .kpi-n { color: var(--bad); }
.ckpi.warn { border-color: var(--sev-medium); }
.badge-row { display: flex; gap: 4px; flex-wrap: wrap; }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.onboard-steps li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.onboard-steps .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700; flex: none; }
.onboard-steps li.done { color: var(--ink); }
.onboard-steps li.done .tick { background: var(--good); border-color: var(--good); color: var(--surface); }
table.clients td { vertical-align: top; }

/* --- Sign-in security (0.17) --- */
.login .or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 0.84rem; }
.login .or::before, .login .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.qr { margin: 10px 0; width: max-content; padding: 6px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.qr svg { display: block; }
.setup-steps { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; margin: 8px 0; }
.recovery-codes span { padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.field.narrow { max-width: 260px; }
.ua { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login p.tag { white-space: normal; background: none; border: 0; padding: 0; border-radius: 0; font-size: 0.9rem; }

/* --- Collector page (0.18) --- */
details.vendor-howto { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; background: var(--surface); }
details.vendor-howto summary { cursor: pointer; font-weight: 600; }
details.vendor-howto ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.notice.enroll details { margin-top: 8px; }
.notice.enroll summary { cursor: pointer; }
ul.reqs { margin: 0; padding-left: 32px; display: grid; gap: 6px; }
.copy-box code { white-space: pre-wrap; }

/* --- Reports and recertification (0.19) --- */
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.report-card { display: grid; gap: 10px; padding: 16px 18px; align-content: start; }
.report-card h2 { margin: 0; font-size: 1.02rem; }
.report-card p { margin: 0; }
.report-params { display: grid; gap: 8px; }
.report-params .field { gap: 4px; }
.report-card .actions { margin-top: auto; }
.row-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.actions-cell { white-space: nowrap; }
.actions-cell .btn + .btn { margin-left: 4px; }
tr.highlight td { background: var(--accent-soft); }
.nav-count.review { background: var(--accent); }
.progress { display: inline-block; width: 100%; max-width: 220px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.summary .progress { max-width: 420px; height: 8px; }
.progress-fill { display: block; height: 100%; background: var(--good); border-radius: 3px; }
.recert-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.recert-filters select, .recert-filters input[type="search"] { height: 32px; }
.recert-items td.flow { max-width: 34ch; overflow-wrap: anywhere; }
.recert-items tr.decided td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.recert-items .badge + .badge { margin-left: 4px; }
.decide-cell { min-width: 220px; }
.decide-cell input { width: 100%; margin-bottom: 6px; }
.decide-buttons { display: flex; gap: 4px; flex-wrap: wrap; }
.bulk-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--accent); border-radius: 10px; background: var(--surface); box-shadow: 0 4px 14px rgb(0 0 0 / 8%); }
.bulk-bar input { flex: 1 1 260px; }
.signoff summary { padding: 12px 16px; cursor: pointer; }
@media (max-width: 720px) {
  .decide-cell { min-width: 0; }
  .recert-items td.flow { max-width: none; }
}

/* --- Device identity and assets (0.20) --- */
.type-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.type-icon { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); font-size: 0.85em; }
.type-icon.big { width: 1.6em; height: 1.6em; margin-right: 8px; vertical-align: -0.1em; font-size: 0.8em; }
.type-cell .lock { color: var(--accent); }
.type-chips .chip { text-decoration: none; color: var(--ink-2); }
.type-chips .chip[aria-pressed="false"] { border-style: solid; }
.badge.auto-tag { font-size: 0.72rem; }
.assets-table .tag-chips { margin-top: 3px; }
.reasons li { margin: 4px 0; }
.pair-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pair-row input { flex: 1 1 160px; }
.bulk-bar input, .bulk-bar select { flex: 1 1 130px; min-width: 0; }
td.flow { max-width: 40ch; overflow-wrap: anywhere; }

/* Change requests */
.grow { flex: 1 1 280px; }
.toolbar > label.field.grow input { width: 100%; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.cr-lines input, .cr-lines select { width: 100%; min-width: 90px; }
.cr-lines input.narrow { min-width: 80px; }
.cr-lines td { padding: 4px; vertical-align: top; }
.cr-paste summary { cursor: pointer; font-size: 0.9rem; color: var(--accent); }
.cr-paste textarea { width: 100%; font-family: var(--mono, ui-monospace, monospace); }
.cr-result { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--surface); display: grid; gap: 6px; }
.cr-result-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cr-result-head b { overflow-wrap: anywhere; }
.cr-changes, .cr-risks, .cr-traces, .cr-history { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.cr-risks { list-style: none; padding-left: 0; }
.cr-traces li { overflow-wrap: anywhere; }
.cr-history { list-style: none; padding-left: 0; gap: 10px; }
.cr-history li { border-left: 2px solid var(--line-2); padding-left: 10px; }
.cr-table td { vertical-align: top; }

/* License */
.license-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 0.92rem; }
.license-banner.info { border-color: var(--accent); background: var(--accent-soft); }
.license-banner.warn { border-color: var(--sev-medium); background: color-mix(in srgb, var(--sev-medium) 16%, var(--surface)); }
.license-banner.bad { border-color: var(--bad); background: var(--bad-soft); }
.lic-usage { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.lic-metric-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; margin-bottom: 4px; }
.lic-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.lic-bar span { display: block; height: 100%; background: var(--accent); }
.lic-bar.near span { background: var(--sev-medium); }
.lic-bar.over span { background: var(--bad); }
.lic-modules { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px; font-size: 0.9rem; }
.lic-modules .off { color: var(--ink-3); }
.lic-mod-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px; margin-top: 4px; }
.lic-issue summary { cursor: pointer; color: var(--accent); font-weight: 600; }

/* --- Logs ------------------------------------------------------------------------------- */
.log-bar { padding: 12px 14px; display: grid; gap: 8px; }
.log-bar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.log-bar-row .spacer { flex: 1; }
.log-q { flex: 1 1 420px; min-width: 0; width: auto; }
.log-bar-row select { width: auto; max-width: 100%; }
.log-bar-row #log-saved { max-width: 260px; }
.log-help summary { cursor: pointer; color: var(--ink-2); }
.log-help > div { margin-top: 6px; max-width: 90ch; }
.log-help code { font-family: var(--mono); font-size: 0.85em; background: var(--surface-2); padding: 0 4px; border-radius: 3px; }
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); text-decoration: none; font-family: var(--mono); font-size: 0.84rem; }
.log-hist .hit { fill: transparent; cursor: zoom-in; }
.log-hist .hit:hover, .log-hist .hit:focus { fill: color-mix(in srgb, var(--ink) 8%, transparent); outline: none; }
.log-split { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; }
.log-split > * { min-width: 0; }
@media (max-width: 1100px) { .log-split { grid-template-columns: 1fr; } }
.log-facets { display: grid; gap: 16px; }
.facet h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin: 0 0 4px; }
.facet .rank-list { padding: 0; gap: 7px; }
.facet .rank-list li { min-width: 0; }
.facet .rank-row > a { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet .rank-row .facet-actions { flex: none; overflow: visible; }
.facet .rank-row .facet-actions b { font-weight: 600; }
.facet-actions { display: inline-flex; align-items: center; gap: 6px; }
.facet-out { color: var(--ink-3); padding: 0 4px; border-radius: 3px; text-decoration: none; }
.facet-out:hover { background: var(--bad-soft); color: var(--bad); text-decoration: none; }
.log-table td { vertical-align: top; }
.log-row { cursor: pointer; }
.log-row:hover td, .log-row[aria-expanded="true"] td { background: var(--surface-2); }
.log-row:focus { outline: 2px solid var(--focus); outline-offset: -2px; }
.log-kind { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 0.86rem; }
.log-summary { word-break: break-word; }
.log-detail-row > td { background: var(--surface-2); padding: 12px 16px 16px; }
.log-detail { display: grid; gap: 10px; }
.log-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; margin: 0; }
.log-fields > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; font-size: 0.86rem; }
.log-fields dt { color: var(--ink-3); }
.log-fields dd { margin: 0; word-break: break-all; }
.log-raw { margin: 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font: 0.8rem/1.45 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto; }
.row-gap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.log-status > summary { list-style: none; cursor: pointer; }
.log-status > summary::-webkit-details-marker { display: none; }
.num-input { width: 90px; }
.bad-text { color: var(--bad); }
.live-toggle { gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.live-toggle.on .live-dot { background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-toggle.on .live-dot { animation: none; } }
.log-row.fresh td { animation: log-fresh 2.5s ease-out; }
@keyframes log-fresh { from { background: var(--accent-soft); } to { background: transparent; } }
.log-empty td { padding: 18px; text-align: center; }
.log-setup ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.log-setup pre { margin: 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  font: 0.8rem/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
.log-state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; white-space: nowrap; }
.log-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.log-state.receiving { --c: var(--good); }
.log-state.quiet { --c: var(--sev-medium); }
.log-state.none { --c: var(--line-2); }
.who-box { padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.log-servers > summary { list-style: none; cursor: pointer; }
.log-servers > summary::-webkit-details-marker { display: none; }
.log-servers .chip { cursor: pointer; background: var(--surface); font: inherit; font-size: 0.86rem; }

/* Incidents and detections (0.27.0) */
.tactic-chain { gap: 4px; align-items: center; margin: 4px 0; }
.chip.tactic { font-size: 0.78rem; padding: 2px 8px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; }
ol.recs { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
ul.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.notes li { border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
ul.notes li.system { border-left-color: var(--line-2); color: var(--ink-2); font-size: 0.9rem; }
tr.muted-row td { opacity: 0.6; }
.small-input { width: 200px; max-width: 100%; }
.file-btn { cursor: pointer; }
.row-gap { flex-wrap: wrap; }
.inc-actions { align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.inc-actions .spacer { flex: 1; }
.inc-actions .inline-form { margin-top: 0; align-items: center; }
.inc-actions input { min-width: 240px; }
@media (max-width: 600px) { .inc-actions input, .inc-actions select { min-width: 0; width: 100%; } .inc-actions .inline-form { width: 100%; } }

/* Vulnerabilities (0.28.0) */
.prio { display: inline-flex; align-items: baseline; gap: 6px; font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }
.prio b { font-size: 1.05rem; min-width: 2ch; text-align: right; }
.prio.critical b { color: var(--sev-critical); }
.prio.high b { color: var(--sev-high); }
.prio.medium b { color: var(--sev-medium); }
.prio.low b { color: var(--ink-3); }
.factor-list .pts.neg { color: var(--good); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 46ch; }
a.kpi { text-decoration: none; }
a.kpi:hover { background: var(--surface-2); text-decoration: none; }
.vuln-notice { margin-top: 4px; }
.field.inline { display: inline-flex; gap: 6px; align-items: center; }
.stack > .file-btn, .stack > label.btn { justify-self: start; }

/* AI (0.29.0) */
.ai-panel { border-left: 3px solid var(--accent); }
.ai-summary { font-size: 1.02rem; line-height: 1.5; }
.ask-form input { min-width: min(520px, 100%); flex: 1; }
