/* ntoid.css — Watchfloor tokens + components (from watchfloor-design-system.md) + N.T.O.I.D. additions.
   Load Barlow Semi Condensed 400-700 and JetBrains Mono 400/500 from Google Fonts before this file. */

:root {
  /* colour */
  --ground: #00080f;  /* App frame: the header band, the footer band and the 8px gutters between panels */
  --surface: #020c17;  /* Panel bodies, the side nav and the map canvas */
  --surface-raised: #0a1622;  /* Cards that sit inside a panel (severity cards, the map-layers box), hovered rows and buttons */
  --terrain: #13202d;  /* Map land masses and the dot grid of the placeholder basemap */
  --track: #0e1a26;  /* The unfilled part of sector bars and the off state of toggles */
  --line: #27323e;  /* 1px panel borders and the header and footer rules */
  --line-soft: #131d28;  /* Row dividers inside a panel and chart gridlines */
  --line-strong: #5b6674;  /* Borders of controls (buttons, selects, toggle tracks, code chips) and the radar range rings */
  --ink: #eef2f6;  /* Headings, labels, nav items, values */
  --ink-soft: #c5ccd5;  /* Intelligence body text and the brand descriptor */
  --ink-muted: #8c97a5;  /* Timestamps, axis labels, captions, status states, the classification line */
  --link: #8fbbe3;  /* Text links such as VIEW ALL ACTORS */
  --focus: #a8d1f5;  /* Keyboard focus: a solid 2px ring 2px outside the control */
  --critical: #f2463c;  /* Severity CRITICAL: its word, count and glyph; the live dot; attack arcs on the map */
  --high: #f39436;  /* Severity HIGH: word, count, glyph, and a degraded system */
  --elevated: #f2c14e;  /* Severity ELEVATED: word, count and glyph */
  --low: #5ea9ea;  /* Severity LOW and the cyber-attack glyph on the map; the on state of toggles */
  --nominal: #5fbf66;  /* System health only: OPERATIONAL dots */
  --on-signal: #04080d;  /* Text on a solid severity fill (solid tags) */
  --active-wash: #1f0b10;  /* Fill of the selected side-nav item */
  --active-edge: #b8383e;  /* 1px border of the selected side-nav item */
  --series-1: #d9342c;  /* First data series (incidents, cyber) */
  --series-2: #3a7fc8;  /* Second data series (detections, hybrid) */
  --series-3: #c0862a;  /* Third data series */
  --series-other: #5d6a7b;  /* The remainder slice (OTHER, INFO OPS) after three named series */
  /* glow */
  --glow-critical: 0 0 0 1px rgba(242, 70, 60, 0.35), 0 0 12px rgba(242, 70, 60, 0.55);
  --glow-nominal: 0 0 8px rgba(95, 191, 102, 0.6);
  --glow-low: 0 0 12px rgba(94, 169, 234, 0.5);
  /* space, radius, size */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-pill: 999px;
  --size-header: 112px;
  --size-nav: 208px;
  --size-rail: 256px;
  --size-row: 44px;
  --size-control: 40px;
  --font-sans: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* Watchfloor components. Every value comes from tokens.css; class prefix wf-. */

body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-sans); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; }

/* ---------- shared ---------- */
.wf-stage { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.wf-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.wf-list { list-style: none; margin: 0; padding: 0; }
.wf-stack { display: flex; flex-direction: column; gap: var(--space-2); }
.wf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wf-mono { font-family: var(--font-mono); font-size: 13px; line-height: 18px; letter-spacing: 0; text-transform: none; }

.wf-tone-critical { --wf-tone: var(--critical); color: var(--critical); }
.wf-tone-high { --wf-tone: var(--high); color: var(--high); }
.wf-tone-elevated { --wf-tone: var(--elevated); color: var(--elevated); }
.wf-tone-low { --wf-tone: var(--low); color: var(--low); }
.wf-tone-nominal { --wf-tone: var(--nominal); color: var(--nominal); }
.wf-tone-muted { --wf-tone: var(--ink-muted); color: var(--ink-muted); }

.wf-icon, .wf-glyph { display: inline-block; flex: none; vertical-align: middle; }

.wf-btn:focus-visible, .wf-select select:focus-visible, .wf-link:focus-visible, .wf-nav-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Panel ---------- */
.wf-panel { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.wf-panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); min-height: var(--size-row); padding: var(--space-2) var(--space-4); box-sizing: border-box; border-bottom: 1px solid var(--line-soft); }
.wf-panel-title { margin: 0; font-size: 16px; line-height: 20px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.wf-panel.is-lg .wf-panel-head { min-height: 64px; }
.wf-panel.is-lg .wf-panel-title { font-size: 22px; line-height: 28px; }
.wf-panel-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.wf-panel-body { flex: 1; min-height: 0; padding: var(--space-3) var(--space-4); }
.wf-panel-body.is-flush { padding: 0; }
.wf-panel-foot { display: flex; justify-content: center; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--line-soft); }

/* ---------- Button ---------- */
.wf-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); box-sizing: border-box; height: var(--size-control); padding: 0 var(--space-4); font: inherit; font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; }
.wf-btn:hover { background: var(--surface-raised); }
.wf-btn-ghost { background: none; border-color: transparent; }
.wf-btn-ghost:hover { background: var(--surface-raised); }
.wf-btn.is-icon { width: var(--size-control); padding: 0; }
.wf-btn:disabled { color: var(--ink-muted); cursor: not-allowed; background: var(--surface); }

/* ---------- Select ---------- */
.wf-select { position: relative; display: inline-flex; align-items: center; box-sizing: border-box; height: var(--size-control); font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.wf-select:hover { background: var(--surface-raised); }
.wf-select-prefix { padding-left: var(--space-4); white-space: nowrap; cursor: pointer; }
.wf-select select { -webkit-appearance: none; appearance: none; height: 100%; margin: 0; padding: 0 var(--space-6) 0 var(--space-1); font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; border-radius: var(--radius-md); cursor: pointer; }
.wf-select select option { background: var(--surface); color: var(--ink); text-transform: none; }
.wf-select > .wf-icon { position: absolute; right: var(--space-3); pointer-events: none; }

/* ---------- TextLink ---------- */
.wf-link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--link); text-decoration: none; border-radius: var(--radius-sm); }
.wf-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Toggle ---------- */
.wf-toggle { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
.wf-toggle input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.wf-toggle-track { position: relative; flex: none; box-sizing: border-box; width: 36px; height: 20px; background: var(--track); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); transition: background-color .15s, border-color .15s; }
.wf-toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--ink-muted); border-radius: var(--radius-pill); transition: transform .15s, background-color .15s; }
.wf-toggle input:checked + .wf-toggle-track { background: color-mix(in srgb, var(--low) 30%, var(--ground)); border-color: var(--low); }
.wf-toggle input:checked + .wf-toggle-track::after { transform: translateX(16px); background: var(--ink); }
.wf-toggle input:focus-visible + .wf-toggle-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.wf-toggle input:disabled + .wf-toggle-track { opacity: .5; }

/* ---------- LiveIndicator ---------- */
.wf-live { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.wf-live-dot { flex: none; width: 8px; height: 8px; background: var(--critical); border-radius: var(--radius-pill); box-shadow: var(--glow-critical); animation: wf-pulse 1.6s ease-in-out infinite; }
@keyframes wf-pulse { 50% { opacity: .35; } }

/* ---------- SeverityTag ---------- */
.wf-sev { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.wf-sev.is-solid { padding: 0 6px; font-size: 12px; line-height: 18px; color: var(--on-signal); background: var(--wf-tone); border-radius: var(--radius-sm); }
.wf-sev.is-solid .wf-glyph { color: var(--on-signal); }

/* ---------- ThreatLevel ---------- */
.wf-threat { display: inline-flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-5) var(--space-2) var(--space-3); background: var(--ground); background: color-mix(in srgb, var(--wf-tone) 9%, var(--ground)); border: 1px solid var(--line-strong); border-color: color-mix(in srgb, var(--wf-tone) 60%, var(--ground)); border-radius: var(--radius-md); }
.wf-threat-text { display: flex; flex-direction: column; font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }

/* ---------- SeverityCard ---------- */
.wf-sevcard { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: var(--space-3); min-height: 52px; box-sizing: border-box; padding: var(--space-2) var(--space-3); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.wf-sevcard-level { display: block; font-size: 16px; line-height: 20px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.wf-sevcard-count { display: block; font-size: 18px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wf-sevcard-status { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- list rows: ActorRow, FeedItem, StatusItem, LegendItem ---------- */
.wf-actor { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: var(--space-3); min-height: var(--size-row); padding: 0 var(--space-4); border-bottom: 1px solid var(--line-soft); }
.wf-actor:last-child, .wf-feed:last-child, .wf-status:last-child { border-bottom: 0; }
.wf-actor-emblem { display: inline-flex; width: 28px; height: 20px; overflow: hidden; border-radius: var(--radius-sm); }
.wf-actor-code { display: inline-grid; place-items: center; box-sizing: border-box; width: 28px; height: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-muted); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.wf-actor-name { min-width: 0; font-size: 14px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.wf-actor .wf-sev { font-size: 13px; }

.wf-feed { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-4); font-size: 14px; line-height: 19px; border-bottom: 1px solid var(--line-soft); }
.wf-feed-time { color: var(--ink-muted); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; white-space: nowrap; }
.wf-feed-text { margin: 0; min-width: 0; color: var(--ink-soft); }

.wf-status { display: grid; grid-template-columns: 10px 1fr; column-gap: var(--space-3); align-items: center; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--line-soft); }
.wf-status-dot { grid-row: 1 / 3; width: 10px; height: 10px; background: var(--wf-tone); border-radius: var(--radius-pill); }
.wf-status.wf-tone-nominal .wf-status-dot { box-shadow: var(--glow-nominal); }
.wf-status-name { font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.wf-status-state { grid-column: 2; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }

.wf-legend { display: flex; align-items: center; gap: var(--space-3); min-height: 28px; font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }

/* ---------- MapMarker ---------- */
.wf-marker { position: absolute; display: inline-flex; transform: translate(-50%, -50%); filter: drop-shadow(0 0 6px var(--wf-tone)); }

/* ---------- SectorBar ---------- */
.wf-sector { display: grid; grid-template-columns: 1fr auto; column-gap: var(--space-3); row-gap: 6px; align-items: center; padding: var(--space-2) 0; }
.wf-sector.has-icon { grid-template-columns: 20px 1fr auto; }
.wf-sector-icon { grid-row: 1 / 3; display: inline-flex; color: var(--ink-muted); }
.wf-sector-label { font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.wf-sector-value { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink); }
.wf-sector-bar { grid-column: 1 / -1; display: block; height: 6px; overflow: hidden; background: var(--track); border-radius: var(--radius-sm); }
.wf-sector.has-icon .wf-sector-bar { grid-column: 2 / -1; }
.wf-sector-fill { display: block; height: 100%; background: var(--series-2); border-radius: var(--radius-sm); }
.wf-sector.is-emphasis .wf-sector-fill { background: var(--series-1); }

/* ---------- chart pieces: Donut, TrendChart ---------- */
.wf-swatch { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-sm); }
.wf-swatch.is-line { width: 16px; height: 2px; border-radius: 1px; }

.wf-donut { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.wf-donut-chart { position: relative; width: 148px; height: 148px; }
.wf-donut-chart svg { display: block; }
.wf-donut-seg { transition: opacity .15s; cursor: default; }
.wf-donut[data-active] .wf-donut-seg:not(.is-active) { opacity: .3; }
.wf-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.wf-donut-total { font-size: 40px; line-height: 40px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.wf-donut-label { margin-top: var(--space-1); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.wf-donut-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: var(--space-1); }
.wf-donut-legend li { display: grid; grid-template-columns: 10px 40px 1fr; align-items: center; gap: var(--space-3); padding: 2px var(--space-1); font-size: 14px; border-radius: var(--radius-sm); }
.wf-donut-legend li.is-active { background: var(--surface-raised); }
.wf-donut-pct { font-variant-numeric: tabular-nums; color: var(--ink); }
.wf-donut-name { font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }

.wf-trend { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.wf-trend-plot { position: relative; }
.wf-trend-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.wf-trend-grid { stroke: var(--line-soft); stroke-width: 1; }
.wf-trend-axis { fill: var(--ink-muted); font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.wf-trend-cross { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.wf-trend-tip { position: absolute; top: 0; transform: translateX(-50%); min-width: 112px; padding: 6px var(--space-2); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-md); font-size: 12px; line-height: 18px; pointer-events: none; z-index: 2; }
.wf-trend-tip-time { color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.wf-trend-tip-row { display: flex; align-items: center; gap: 6px; color: var(--ink); letter-spacing: 0.04em; text-transform: uppercase; }
.wf-trend-tip-row b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.wf-trend-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.wf-trend-legend li { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }

/* ---------- AppHeader ---------- */
.wf-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); box-sizing: border-box; min-height: var(--size-header); padding: var(--space-4) var(--space-5); background: var(--ground); border-bottom: 1px solid var(--line); }
.wf-brand { display: flex; align-items: center; gap: var(--space-3); }
.wf-brand-mark { display: inline-flex; }
.wf-brand-name { font-size: 48px; line-height: 48px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.wf-brand-desc { max-width: 240px; margin-top: var(--space-1); font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.wf-header-div { align-self: stretch; width: 1px; background: var(--line); }
.wf-header-title { max-width: 250px; margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
.wf-header-focus { margin-top: var(--space-2); font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.wf-header-end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.wf-clock { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.wf-clock span + span { color: var(--ink-soft); }

/* ---------- SideNav ---------- */
.wf-nav { display: flex; flex-direction: column; box-sizing: border-box; width: var(--size-nav); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.wf-nav-section { padding: var(--space-4) 0 var(--space-2); border-bottom: 1px solid var(--line); }
.wf-nav-section:last-of-type { border-bottom: 0; }
.wf-nav-heading { margin: 0 0 var(--space-2); padding: 0 var(--space-4); font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.wf-nav ul { list-style: none; margin: 0; padding: 0 var(--space-1); }
.wf-nav-item { display: flex; align-items: center; gap: var(--space-3); box-sizing: border-box; min-height: var(--size-row); padding: 0 var(--space-3); font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); text-decoration: none; border: 1px solid transparent; border-radius: var(--radius-sm); }
.wf-nav-item:hover { background: var(--surface-raised); }
.wf-nav-item[aria-current="page"] { background: var(--active-wash); border-color: var(--active-edge); }
.wf-nav-item[aria-current="page"] .wf-icon { color: var(--critical); }
.wf-nav-foot { margin-top: auto; padding: var(--space-3); }

/* ---------- ClassificationBar ---------- */
.wf-classbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); padding: var(--space-4) var(--space-5); background: var(--ground); border-top: 1px solid var(--line); }
.wf-classbar-motto { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.wf-classbar-dot { color: var(--ink-muted); }
.wf-classbar-class { margin-top: var(--space-1); font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.wf-classbar-end { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); font-size: 14px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .wf-live-dot { animation: none; }
  .wf-toggle-track, .wf-toggle-track::after, .wf-donut-seg { transition: none; }
}

/* ---------- Watchfloor dashboard layout (reference, from the spec) ---------- */
/* Layout: header band, then nav | map | rail with the analytics strip under map and rail, then the footer band. */
  .dash { display: grid; grid-template-columns: var(--size-nav) minmax(0, 1fr) var(--size-rail); grid-template-rows: auto auto; gap: var(--space-2); padding: var(--space-2); }
  .dash > .wf-nav { grid-row: 1 / 3; width: auto; }
  .rail { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
  .strip { grid-column: 2 / 4; display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.1fr; gap: var(--space-2); align-items: stretch; }
  .dash > .wf-panel > .wf-panel-body { display: flex; }
  .mapbox { position: relative; flex: 1; min-width: 0; min-height: 880px; overflow: hidden; border-radius: 0 0 var(--radius-md) var(--radius-md);
    background-color: var(--surface);
    background-image: radial-gradient(circle, var(--terrain) 1.3px, transparent 1.8px);
    background-size: 12px 12px; }
  .mapbox svg.layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .ring { fill: none; stroke: var(--line-strong); stroke-width: 1; opacity: .7; }
  .cross { stroke: var(--ink-soft); stroke-width: 1.2; }
  .arc { fill: none; stroke: var(--critical); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
  .legend { position: absolute; top: var(--space-4); left: var(--space-4); }
  .layers { position: absolute; left: var(--space-4); bottom: var(--space-4); display: flex; flex-direction: column; gap: 10px; padding: var(--space-3) var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
  .layers h3 { margin: 0 0 2px; font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .scale { position: absolute; right: var(--space-4); bottom: var(--space-4); display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-3); color: var(--ink); }
  .scale svg text { fill: var(--ink); font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
  .scale svg .tick { stroke: var(--ink); stroke-width: 1; }
  .scale .star { fill: var(--ink); }
  .scale .star-dim { fill: var(--ink-muted); }
  .basemap-note { position: absolute; top: var(--space-4); right: var(--space-4); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
  .wf-panel.fill { flex: 1; }


/* ======================================================================
   N.T.O.I.D. additions to Watchfloor. Class prefix nt-.
   Maps the five-step indicator scale and the five watch levels onto the
   Watchfloor severity ladder, adds evidence chips, category tiles, the
   composite track, the inline level editor and responsive rules.
   ====================================================================== */

/* ---------- level tones ---------- */
/* indicator level 0-4 */
.nt-lv-0 { --wf-tone: var(--ink-muted); color: var(--ink-muted); }   /* quiet */
.nt-lv-1 { --wf-tone: var(--low);       color: var(--low); }         /* low */
.nt-lv-2 { --wf-tone: var(--elevated);  color: var(--elevated); }    /* elevated */
.nt-lv-3 { --wf-tone: var(--high);      color: var(--high); }        /* high */
.nt-lv-4 { --wf-tone: var(--critical);  color: var(--critical); }    /* severe */
/* watch level I-V (+ unrated) */
.nt-wl-I   { --wf-tone: var(--critical);  color: var(--critical); }
.nt-wl-II  { --wf-tone: var(--high);      color: var(--high); }
.nt-wl-III { --wf-tone: var(--elevated);  color: var(--elevated); }
.nt-wl-IV  { --wf-tone: var(--low);       color: var(--low); }
.nt-wl-V   { --wf-tone: var(--ink-muted); color: var(--ink-muted); }
.nt-wl-unrated { --wf-tone: var(--line-strong); color: var(--ink-muted); }
.nt-wl-unrated.wf-threat, .nt-locked.wf-threat { border-style: dashed; background: var(--ground); }

/* ---------- evidence chips ---------- */
.nt-kind { display: inline-grid; place-items: center; height: 18px; padding: 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); white-space: nowrap; }
.nt-attr { font-size: 11px; line-height: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.nt-attr.is-confirmed { color: var(--ink); }
.nt-bullet { display: grid; grid-template-columns: auto auto 1fr; gap: var(--space-3); align-items: start; padding: var(--space-2) 0; border-top: 1px solid var(--line-soft); font-size: 14px; line-height: 19px; color: var(--ink-soft); }
.nt-bullet a { color: var(--link); text-decoration: none; }
.nt-bullet a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nt-bullet time { color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* ---------- category tiles ---------- */
.nt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); padding: var(--space-4); background-image: radial-gradient(circle, var(--terrain) 1.3px, transparent 1.8px); background-size: 12px 12px; }
.nt-tile { display: flex; flex-direction: column; gap: var(--space-2); min-height: 120px; padding: var(--space-3); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); color: inherit; text-decoration: none; }
.nt-tile:hover { border-color: var(--line-strong); }
.nt-tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.nt-tile-mean { margin-top: auto; display: flex; align-items: baseline; gap: var(--space-2); }
.nt-tile-mean b { font-size: 18px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--wf-tone); }
.nt-tile-mean span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.nt-tile-word { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wf-tone); }
.nt-moved { width: 14px; height: 14px; flex: none; fill: var(--wf-tone); }   /* triangle glyph, shown only when moved_this_update */

/* ---------- indicator rows ---------- */
.nt-ind { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; align-items: center; gap: var(--space-3); min-height: var(--size-row); padding: 0 var(--space-4); border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.nt-ind:hover { background: var(--surface-raised); }
.nt-ind-name { min-width: 0; display: flex; flex-direction: column; }
.nt-ind-name b { font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.nt-ind-name .wf-mono { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.nt-ind-meta { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.nt-ind-level { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wf-tone); }
.nt-ind-detail { padding: var(--space-3) var(--space-4) var(--space-4); background: var(--surface-raised); border-bottom: 1px solid var(--line-soft); }
.nt-ind-detail p { margin: 0 0 var(--space-2); font-size: 14px; line-height: 19px; color: var(--ink-soft); }

/* ---------- composite ---------- */
.nt-composite { display: flex; align-items: baseline; gap: var(--space-2); }
.nt-composite b { font-size: 40px; line-height: 40px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--wf-tone); }
.nt-composite span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.nt-track { position: relative; height: 6px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.nt-track i { background: var(--track); border-radius: var(--radius-sm); }
.nt-track-marker { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--wf-tone); }   /* style="left: calc(<score>% - 1px)" */
.nt-track-labels { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.nt-formula { margin: 0; font-size: 12px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------- editor: inline level control ---------- */
.nt-levelseg { display: grid; grid-template-columns: repeat(5, 1fr); height: 32px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nt-levelseg label { display: grid; place-items: center; color: var(--ink-muted); border-right: 1px solid var(--line); cursor: pointer; }
.nt-levelseg label:last-child { border-right: 0; }
.nt-levelseg input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.nt-levelseg input:checked + span { display: grid; place-items: center; width: 100%; height: 100%; color: var(--on-signal); background: var(--wf-tone); }
.nt-levelseg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.nt-row-moved { background: var(--surface-raised); }
.nt-row-moved .nt-ind-meta.is-last { color: var(--high); }

/* ---------- editor: validator, diff, hold ---------- */
.nt-log { list-style: none; margin: 0; padding: var(--space-2) 0; font-family: var(--font-mono); font-size: 12px; line-height: 18px; }
.nt-log li { display: grid; grid-template-columns: 52px 1fr; gap: var(--space-2); padding: 2px var(--space-4); color: var(--ink-soft); }
.nt-log .is-ok { color: var(--nominal); text-transform: uppercase; }
.nt-log .is-warn { color: var(--high); text-transform: uppercase; }
.nt-log .is-error { color: var(--critical); text-transform: uppercase; }
.nt-diff { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4); border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.nt-hold { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--high); border-radius: var(--radius-md); background: color-mix(in srgb, var(--high) 9%, var(--ground)); font-size: 12px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--high); }

/* ---------- checklist ---------- */
.nt-check { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line-soft); font-size: 14px; line-height: 19px; color: var(--ink-soft); }
.nt-check input { appearance: none; width: 18px; height: 18px; margin: 1px 0 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; cursor: pointer; }
.nt-check input:checked { background: var(--line-strong); box-shadow: inset 0 0 0 3px var(--surface); }
.nt-check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nt-code { margin: var(--space-3) var(--space-4); padding: var(--space-3) var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 13px; line-height: 18px; color: var(--ink-soft); white-space: pre-wrap; }

/* ---------- page shells ---------- */
.nt-page { min-height: 100vh; display: flex; flex-direction: column; }
.nt-board { display: grid; grid-template-columns: var(--size-nav) minmax(0, 1fr) var(--size-rail); grid-template-rows: auto auto; gap: var(--space-2); padding: var(--space-2); }
.nt-board > .wf-nav { grid-row: 1 / 3; width: auto; }
.nt-rail { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.nt-strip { grid-column: 2 / 4; display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.1fr; gap: var(--space-2); }
.nt-landing { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-2); padding: var(--space-2); }
.nt-doc { display: grid; grid-template-columns: var(--size-nav) minmax(0, 1fr); gap: var(--space-2); padding: var(--space-2); }
.nt-wall { position: relative; min-height: 720px; }
.nt-wall-ghost { opacity: .35; pointer-events: none; }
.nt-wall-dialog { position: absolute; inset: 0; display: grid; place-items: center; }
.nt-wall-dialog .wf-panel { width: min(520px, calc(100% - 32px)); border-color: var(--line-strong); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .nt-strip { grid-template-columns: 1fr 1fr; }
  .nt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nt-board, .nt-doc, .nt-landing { grid-template-columns: minmax(0, 1fr); }
  .nt-board > .wf-nav, .nt-doc > .wf-nav { grid-row: auto; flex-direction: row; overflow-x: auto; border-radius: 0; border-width: 0 0 1px; }
  .nt-board > .wf-nav .wf-nav-section { display: flex; padding: var(--space-2) var(--space-3); border: 0; }
  .nt-board > .wf-nav .wf-nav-heading, .nt-board > .wf-nav .wf-nav-foot { display: none; }
  .nt-board > .wf-nav ul { display: flex; gap: var(--space-2); padding: 0; }
  .nt-board > .wf-nav .wf-nav-item { min-height: 36px; white-space: nowrap; }
  .nt-strip { grid-column: auto; grid-template-columns: 1fr; }
  .nt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nt-tile { min-height: 88px; }
  .nt-ind { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .nt-ind .nt-ind-meta { display: none; }
  .nt-ind-name .wf-mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 640px) {
  .wf-header { min-height: auto; padding: var(--space-4); gap: var(--space-3); }
  .wf-brand-name { font-size: 28px; line-height: 28px; }
  .wf-brand-desc, .wf-header-div { display: none; }
  .wf-header-end { margin-left: 0; width: 100%; }
  .wf-threat { width: 100%; box-sizing: border-box; }
  .wf-threat-text { white-space: normal; }
}
