/*! NNEAT Design System 1.0 | built 2026-11-24 from 01-06 partials. Do not edit this file: edit the partials and run build.sh */
/* ==========================================================================
   NNEAT Design System 1.0 · 01 Tokens
   One set of tokens, two themes:
     - Product (light, default): warm greys and white, brand orange for the one primary action.
     - Ops (dark): cockpits, live views and maps. Same components, same names, warm dark
       derived from the sidebar and NNEAT Dark Red. Activate with [data-nn-theme="ops"].
   Components only use the semantic tokens (--nn-bg, --nn-ink, --nn-accent…). The primitive
   ramps (--nn-sand-*, --nn-orange-*, --nn-maroon-*…) exist to build themes, not to style screens.
   Names already used by the app (--nn-bg, --nn-surface, --nn-line, --nn-ink*, --nn-brand*, --nn-crit…)
   keep their meaning, so applying the system does not break existing CSS.
   ========================================================================== */

:root {
  /* ---------- Primitive ramps ---------- */

  /* Sand: warm neutral ramp, NNEAT Grey #d9d9d9 and NNEAT White #f2f2f2 tinted with the hue of NNEAT Dark Red */
  --nn-sand-0: #ffffff;
  --nn-sand-25: #fcfbfa;
  --nn-sand-50: #faf9f8;
  --nn-sand-100: #f5f4f3;
  --nn-sand-150: #f1eeec;
  --nn-sand-200: #e7e3e0;
  --nn-sand-300: #d5cfcb;
  --nn-sand-400: #b4aba5;
  --nn-sand-500: #8f847d;
  --nn-sand-600: #786d66;
  --nn-sand-700: #62574f;
  --nn-sand-800: #3f332c;
  --nn-sand-900: #261a15;

  /* Ember: warm darks for the Ops theme and the sidebar (NNEAT Dark Red #380d00 taken to near black) */
  --nn-ember-950: #120705;
  --nn-ember-900: #1a0c08;
  --nn-ember-850: #21110c;
  --nn-ember-800: #2a1610;
  --nn-ember-750: #331d16;
  --nn-ember-700: #42281f;
  --nn-ember-600: #5a3b30;
  --nn-ember-500: #7d6156;
  --nn-ember-400: #a58e85;
  --nn-ember-300: #c9b8b0;
  --nn-ember-200: #e6dad4;
  --nn-ember-100: #f6efeb;

  /* Orange: NNEAT Bright Red #cc4205 (Pantone 021C) */
  --nn-orange-50: #fdf5f0;
  --nn-orange-100: #fbefe9;
  --nn-orange-200: #f3d6c6;
  --nn-orange-300: #eeb08f;
  --nn-orange-400: #e7804f;
  --nn-orange-500: #cc4205;
  --nn-orange-600: #b53a04;
  --nn-orange-700: #933003;
  --nn-orange-800: #6e2503;

  /* Maroon: NNEAT Red #650d00 (Pantone 484C) and NNEAT Dark Red #380d00 (Pantone 483C) */
  --nn-maroon-500: #650d00;
  --nn-maroon-700: #4d0f02;
  --nn-maroon-900: #380d00;

  /* Secondary palette of the brand guide (dark and bright of blue, brown and green) */
  --nn-blue-dark: #0e0e3d;
  --nn-blue-bright: #53b5db;
  --nn-brown-dark: #403112;
  --nn-brown-bright: #c08a00;
  --nn-green-dark: #073018;
  --nn-green-bright: #4ac84a;

  /* ---------- Typography ---------- */
  --nn-font-display: 'Montagu Slab', Besley, Georgia, 'Times New Roman', serif;
  --nn-font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --nn-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  /* legacy aliases used by the app */
  --nn-serif: var(--nn-font-display);
  --nn-sans: var(--nn-font-sans);

  /* Type scale: size / line height. Display and titles in Montagu Slab, the rest in Inter. */
  --nn-fs-display: 32px;  --nn-lh-display: 38px;
  --nn-fs-h1: 24px;       --nn-lh-h1: 30px;   /* page title */
  --nn-fs-h2: 18px;       --nn-lh-h2: 24px;   /* section title */
  --nn-fs-h3: 15px;       --nn-lh-h3: 20px;   /* card and drawer section title */
  --nn-fs-body: 14px;     --nn-lh-body: 21px;
  --nn-fs-sm: 13px;       --nn-lh-sm: 19px;   /* tables, dense UI */
  --nn-fs-xs: 12px;       --nn-lh-xs: 17px;   /* hints, meta */
  --nn-fs-label: 11px;    --nn-lh-label: 14px; /* uppercase labels and eyebrows */
  --nn-fs-kpi: 30px;      --nn-lh-kpi: 34px;
  --nn-fs-kpi-sm: 22px;
  --nn-fw-regular: 400;
  --nn-fw-medium: 500;
  --nn-fw-semibold: 600;
  --nn-fw-bold: 700;
  --nn-fw-heavy: 800;
  --nn-tracking-label: .06em;
  --nn-tracking-title: -.01em;

  /* ---------- Space (4px base) ---------- */
  --nn-space-0: 0;
  --nn-space-1: 2px;
  --nn-space-2: 4px;
  --nn-space-3: 6px;
  --nn-space-4: 8px;
  --nn-space-5: 12px;
  --nn-space-6: 16px;
  --nn-space-7: 20px;
  --nn-space-8: 24px;
  --nn-space-9: 32px;
  --nn-space-10: 40px;
  --nn-space-11: 48px;
  --nn-space-12: 64px;
  --nn-page-gutter: 24px;
  --nn-card-pad: 20px;
  --nn-section-gap: 32px;

  /* ---------- Shape ---------- */
  --nn-radius-2xs: 4px;   /* kbd, tiny marks */
  --nn-radius-xs: 6px;    /* badges, chips, small controls */
  --nn-radius-sm: 8px;    /* buttons, inputs, menus */
  --nn-radius: 12px;      /* cards, panels */
  --nn-radius-lg: 16px;   /* modals, large surfaces */
  --nn-radius-pill: 999px;

  /* ---------- Size ---------- */
  --nn-control-h-sm: 30px;
  --nn-control-h: 36px;
  --nn-control-h-lg: 42px;
  --nn-row-h: 44px;
  --nn-row-h-compact: 34px;
  --nn-drawer-w: 640px;
  --nn-drawer-w-lg: 880px;
  --nn-modal-w-sm: 420px;
  --nn-modal-w: 560px;
  --nn-modal-w-lg: 800px;
  --nn-sidebar-w: 18rem;
  --nn-sidebar-rail: 4.25rem;
  --nn-content-max: 1600px;

  /* ---------- Motion ---------- */
  --nn-dur-1: 90ms;    /* hover, press */
  --nn-dur-2: 160ms;   /* menus, tooltips */
  --nn-dur-3: 240ms;   /* drawers, modals */
  --nn-dur-4: 400ms;   /* charts, counters */
  --nn-ease: cubic-bezier(.2, 0, 0, 1);
  --nn-ease-out: cubic-bezier(0, 0, .2, 1);
  --nn-ease-in: cubic-bezier(.4, 0, 1, 1);

  /* ---------- Layers ---------- */
  --nn-z-sticky: 20;
  --nn-z-dropdown: 1060;
  --nn-z-drawer: 1045;
  --nn-z-modal: 1055;
  --nn-z-popover: 1070;
  --nn-z-toast: 1090;
  --nn-z-tooltip: 1100;
}

/* ==========================================================================
   Product theme (light, default)
   ========================================================================== */
:root,
[data-nn-theme="product"] {
  color-scheme: light;

  /* Surfaces */
  --nn-bg: var(--nn-sand-100);            /* page */
  --nn-surface: var(--nn-sand-0);         /* cards, drawers, menus */
  --nn-surface-2: var(--nn-sand-50);      /* table headers, sunken areas, footers */
  --nn-surface-3: var(--nn-sand-150);     /* hover of rows, neutral fills */
  --nn-surface-inverse: var(--nn-maroon-900); /* toasts, tooltips, dark callouts */
  --nn-overlay: rgba(26, 12, 8, .48);     /* backdrop of modals and drawers */

  /* Lines */
  --nn-line: var(--nn-sand-200);
  --nn-line-2: var(--nn-sand-150);        /* inner dividers */
  --nn-line-strong: var(--nn-sand-300);   /* hover of inputs, separators that must read */

  /* Text */
  --nn-ink: var(--nn-sand-900);
  --nn-ink-2: var(--nn-sand-700);
  --nn-ink-3: var(--nn-sand-600);         /* labels, hints (4.9:1 on white) */
  --nn-ink-4: var(--nn-sand-400);         /* disabled, placeholders on light controls */
  --nn-ink-inverse: #ffffff;
  --nn-title: var(--nn-maroon-900);       /* Montagu Slab titles */
  --nn-link: var(--nn-maroon-500);
  --nn-link-hover: var(--nn-orange-500);

  /* Brand accent: primary action, active element, real highlight. Nothing else. */
  --nn-brand: var(--nn-orange-500);
  --nn-brand-hover: var(--nn-orange-600);
  --nn-brand-press: var(--nn-orange-700);
  --nn-brand-soft: var(--nn-orange-100);
  --nn-brand-line: var(--nn-orange-200);
  --nn-brand-ink: var(--nn-orange-700);   /* orange text on soft orange (5.6:1) */
  --nn-on-brand: #ffffff;
  --nn-brand-fill: var(--nn-orange-500);
  --nn-brand-fill-hover: var(--nn-orange-600);
  --nn-accent: var(--nn-brand);
  --nn-red: var(--nn-maroon-500);
  --nn-dark: var(--nn-maroon-900);

  /* Focus */
  --nn-focus: 0 0 0 3px rgba(204, 66, 5, .28);
  --nn-focus-danger: 0 0 0 3px rgba(201, 42, 42, .25);

  /* Severity and status. Five severities, one colour per state across the whole product.
     Medium, low and ok derive from the brand secondary palette (bright brown, bright blue, bright green),
     darkened for text contrast. Critical is the functional red, never used on buttons or decoration. */
  --nn-crit: #c92a2a;      --nn-crit-soft: #fdecec;  --nn-crit-line: #f6c9c9;  --nn-crit-ink: #a51d1d;
  --nn-high: #d9480f;      --nn-high-soft: #fff0e6;  --nn-high-line: #fbd3ba;  --nn-high-ink: #ad3608;
  --nn-med: #a87900;       --nn-med-soft: #fbf3dc;   --nn-med-line: #efdca4;   --nn-med-ink: #7f5c00;
  --nn-low: #2c7fa3;       --nn-low-soft: #e5f4fa;   --nn-low-line: #bfe0ee;   --nn-low-ink: #1f6584;
  --nn-ok: #2b8a3e;        --nn-ok-soft: #e6f6e6;    --nn-ok-line: #bfe3c5;    --nn-ok-ink: #22702f;
  --nn-info: var(--nn-sand-700); --nn-info-soft: var(--nn-sand-150); --nn-info-line: var(--nn-sand-200); --nn-info-ink: var(--nn-sand-800);
  /* aliases for feedback */
  --nn-danger: var(--nn-crit);
  --nn-warning: var(--nn-med);
  --nn-success: var(--nn-ok);

  /* Module identity (brand secondary palette). Only for module marks, legends and series, never for status. */
  --nn-mod-surface: var(--nn-orange-500);
  --nn-mod-endpoint: #2f9e44;
  --nn-mod-connect: #2b2b8c;
  --nn-mod-embedded: var(--nn-brown-bright);
  --nn-mod-ai-audit: var(--nn-maroon-500);
  --nn-mod-spores: #2c7fa3;
  --nn-mod-cti: var(--nn-brown-dark);
  --nn-mod-balance: #0f5132;

  /* Data visualisation: categorical series in a fixed order (brand first, then secondary palette) */
  --nn-viz-1: var(--nn-orange-500);
  --nn-viz-2: var(--nn-maroon-500);
  --nn-viz-3: #2c7fa3;
  --nn-viz-4: var(--nn-brown-bright);
  --nn-viz-5: #2f9e44;
  --nn-viz-6: #2b2b8c;
  --nn-viz-7: var(--nn-sand-500);
  --nn-viz-8: var(--nn-brown-dark);
  --nn-viz-grid: var(--nn-sand-150);
  --nn-viz-axis: var(--nn-sand-600);
  --nn-viz-seq-0: var(--nn-orange-100);
  --nn-viz-seq-1: var(--nn-orange-200);
  --nn-viz-seq-2: var(--nn-orange-300);
  --nn-viz-seq-3: var(--nn-orange-400);
  --nn-viz-seq-4: var(--nn-orange-500);
  --nn-viz-seq-5: var(--nn-orange-700);

  /* Rating TADR® letters A to F */
  /* darkened so the white letter keeps 5:1 at 12px */
  --nn-grade-a: #22702f;
  --nn-grade-b: #4a7a0a;
  --nn-grade-c: #1f6584;
  --nn-grade-d: #8a6400;
  --nn-grade-e: #b83c0b;
  --nn-grade-f: #c92a2a;

  /* Elevation: a border first, a shadow only for what floats */
  --nn-shadow-0: none;
  --nn-shadow-1: 0 1px 2px rgba(38, 26, 21, .04);
  --nn-shadow-2: 0 4px 12px rgba(38, 26, 21, .08), 0 1px 2px rgba(38, 26, 21, .04);
  --nn-shadow-3: 0 12px 32px rgba(38, 26, 21, .14), 0 2px 6px rgba(38, 26, 21, .06);
  --nn-shadow-4: 0 24px 64px rgba(26, 12, 8, .24);
  --nn-shadow: var(--nn-shadow-1);
  --nn-shadow-pop: var(--nn-shadow-3);

  /* Skeleton */
  --nn-skeleton: linear-gradient(90deg, var(--nn-sand-150) 0%, var(--nn-sand-100) 50%, var(--nn-sand-150) 100%);

  /* Brand pattern: the binary dots of the brand illustration */
  --nn-dots-color: rgba(204, 66, 5, .22);

  /* Killer views: stage, graph and map marks (product values, so the widgets also render on light) */
  --nn-stage: var(--nn-sand-100);
  --nn-stage-vignette: transparent;
  --nn-edge: var(--nn-sand-400);
  --nn-edge-strong: var(--nn-sand-600);
  --nn-edge-hot: var(--nn-crit);
  --nn-edge-live: var(--nn-brand);
  --nn-zone-line: var(--nn-sand-300);
  --nn-zone-fill: rgba(38, 26, 21, .02);
  --nn-terrain-1: var(--nn-sand-300);
  --nn-terrain-2: var(--nn-sand-400);
  --nn-terrain-3: var(--nn-sand-500);
  --nn-terrain-4: var(--nn-sand-600);
  --nn-terrain-5: var(--nn-sand-700);
  --nn-terrain-threat: var(--nn-brand);
  --nn-map-land: var(--nn-sand-200);
  --nn-map-sea: var(--nn-sand-100);
  --nn-map-grid: rgba(38, 26, 21, .06);
  --nn-map-tint: transparent;
  --nn-map-dot: var(--nn-sand-400);
  --nn-glass: color-mix(in srgb, var(--nn-surface) 94%, transparent);
}

/* ==========================================================================
   Ops theme (dark): Security Posture Explorer, Live, Mission Paths, maps and any cockpit.
   Same tokens, warm dark built from the sidebar (#1a0400) and NNEAT Dark Red.
   Colours are lifted for contrast on dark, not new hues.
   ========================================================================== */
[data-nn-theme="ops"] {
  color-scheme: dark;

  --nn-bg: var(--nn-ember-950);
  --nn-surface: var(--nn-ember-900);
  --nn-surface-2: var(--nn-ember-850);
  --nn-surface-3: var(--nn-ember-800);
  --nn-surface-inverse: var(--nn-ember-100);
  --nn-overlay: rgba(0, 0, 0, .6);

  --nn-line: var(--nn-ember-750);
  --nn-line-2: var(--nn-ember-800);
  --nn-line-strong: var(--nn-ember-700);

  --nn-ink: #f4ece8;
  --nn-ink-2: var(--nn-ember-300);
  --nn-ink-3: var(--nn-ember-400);
  --nn-ink-4: var(--nn-ember-500);
  --nn-ink-inverse: var(--nn-ember-950);
  --nn-title: #fbf3ef;
  --nn-link: #ff9a66;
  --nn-link-hover: #ffb38c;

  --nn-brand: #e3561a;           /* orange lifted for dark (same hue as #cc4205): marks, lines, focus */
  --nn-brand-hover: #f06a2f;
  --nn-brand-press: #c94a12;
  --nn-brand-fill: #c4480f;      /* fill of primary buttons: white text keeps 4.9:1 */
  --nn-brand-fill-hover: #d4500f;
  --nn-brand-soft: rgba(227, 86, 26, .16);
  --nn-brand-line: rgba(227, 86, 26, .42);
  --nn-brand-ink: #ff9a66;
  --nn-on-brand: #ffffff;

  --nn-focus: 0 0 0 3px rgba(255, 138, 76, .40);

  --nn-crit: #f0625c;  --nn-crit-soft: rgba(240, 98, 92, .14);  --nn-crit-line: rgba(240, 98, 92, .38);  --nn-crit-ink: #ff8b85;
  --nn-high: #f5874a;  --nn-high-soft: rgba(245, 135, 74, .14); --nn-high-line: rgba(245, 135, 74, .38); --nn-high-ink: #ffa676;
  --nn-med: #e3b23c;   --nn-med-soft: rgba(227, 178, 60, .14);  --nn-med-line: rgba(227, 178, 60, .36);  --nn-med-ink: #f0c865;
  --nn-low: #6cc3e6;   --nn-low-soft: rgba(108, 195, 230, .14); --nn-low-line: rgba(108, 195, 230, .36); --nn-low-ink: #93d5ef;
  --nn-ok: #5ccf68;    --nn-ok-soft: rgba(92, 207, 104, .14);   --nn-ok-line: rgba(92, 207, 104, .36);   --nn-ok-ink: #84de8e;
  --nn-info: var(--nn-ember-300); --nn-info-soft: rgba(201, 184, 176, .10); --nn-info-line: rgba(201, 184, 176, .24); --nn-info-ink: var(--nn-ember-200);

  --nn-mod-surface: #e3561a;
  --nn-mod-endpoint: #5ccf68;
  --nn-mod-connect: #8f8fe8;
  --nn-mod-embedded: #e3b23c;
  --nn-mod-ai-audit: #e8826b;
  --nn-mod-spores: #6cc3e6;
  --nn-mod-cti: #c8a77a;
  --nn-mod-balance: #4fbf8f;

  --nn-viz-1: #e3561a;
  --nn-viz-2: #e8826b;
  --nn-viz-3: #6cc3e6;
  --nn-viz-4: #e3b23c;
  --nn-viz-5: #5ccf68;
  --nn-viz-6: #8f8fe8;
  --nn-viz-7: var(--nn-ember-400);
  --nn-viz-8: #c8a77a;
  --nn-viz-grid: var(--nn-ember-800);
  --nn-viz-axis: var(--nn-ember-400);
  --nn-viz-seq-0: rgba(227, 86, 26, .12);
  --nn-viz-seq-1: rgba(227, 86, 26, .28);
  --nn-viz-seq-2: rgba(227, 86, 26, .46);
  --nn-viz-seq-3: rgba(227, 86, 26, .66);
  --nn-viz-seq-4: #e3561a;
  --nn-viz-seq-5: #ff9a66;

  --nn-grade-a: #22702f;
  --nn-grade-b: #4a7a0a;
  --nn-grade-c: #1f6584;
  --nn-grade-d: #8a6400;
  --nn-grade-e: #b83c0b;
  --nn-grade-f: #c92a2a;

  --nn-shadow-1: 0 0 0 1px rgba(255, 255, 255, .02);
  --nn-shadow-2: 0 6px 16px rgba(0, 0, 0, .40);
  --nn-shadow-3: 0 16px 40px rgba(0, 0, 0, .55);
  --nn-shadow-4: 0 28px 72px rgba(0, 0, 0, .65);
  --nn-shadow: var(--nn-shadow-1);
  --nn-shadow-pop: var(--nn-shadow-3);

  --nn-skeleton: linear-gradient(90deg, var(--nn-ember-850) 0%, var(--nn-ember-800) 50%, var(--nn-ember-850) 100%);
  --nn-dots-color: rgba(227, 86, 26, .30);

  /* Ops only: the glow of live elements and the map */
  --nn-live: #ff6a2b;
  --nn-glow: 0 0 0 4px rgba(227, 86, 26, .16), 0 0 24px rgba(227, 86, 26, .35);
  --nn-map-land: var(--nn-ember-800);
  --nn-map-sea: var(--nn-ember-950);
  --nn-map-grid: rgba(255, 255, 255, .04);

  /* Killer views. The stage is one step darker than the panels so the panels float over it.
     Edges and zones are warm neutrals: colour on the stage only means state (crit, ok...) or the live accent.
     Terrain (Security Posture Explorer): contour lines go from dark to light as defence rises, the threat is brand orange. */
  --nn-stage: #0d0503;
  --nn-stage-vignette: radial-gradient(1200px 760px at 50% 42%, rgba(66, 40, 31, .55), transparent 70%);
  --nn-edge: var(--nn-ember-600);
  --nn-edge-strong: var(--nn-ember-400);
  --nn-edge-hot: var(--nn-crit);
  --nn-edge-live: var(--nn-live);
  --nn-zone-line: var(--nn-ember-700);
  --nn-zone-fill: rgba(255, 255, 255, .015);
  --nn-terrain-1: #4a2f25;
  --nn-terrain-2: #6b4c40;
  --nn-terrain-3: #8f7468;
  --nn-terrain-4: #b9a297;
  --nn-terrain-5: #e6dad4;
  --nn-terrain-threat: #ff7a3d;
  --nn-map-tint: rgba(26, 12, 8, .45);
  --nn-map-dot: #a58e85;
  --nn-glass: color-mix(in srgb, var(--nn-surface) 92%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  :root { --nn-dur-1: 0ms; --nn-dur-2: 0ms; --nn-dur-3: 0ms; --nn-dur-4: 0ms; }
}
/* ==========================================================================
   NNEAT Design System 1.0 · 02 Base: fonts, type, page structure, utilities
   ========================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/inter-latin-800.woff2') format('woff2'); }
@font-face { font-family: 'Montagu Slab'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/montagu-slab-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Montagu Slab'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/montagu-slab-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Montagu Slab'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/montagu-slab-latin-700.woff2') format('woff2'); }

.nn-root, .nn-root * { box-sizing: border-box; }
.nn-root {
  font-family: var(--nn-font-sans);
  font-size: var(--nn-fs-body);
  line-height: var(--nn-lh-body);
  color: var(--nn-ink);
  background: var(--nn-bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  text-rendering: optimizeLegibility;
}

/* ---------- Type ---------- */
.nn-display, .nn-h1, .nn-h2, .nn-h3 {
  font-family: var(--nn-font-display);
  color: var(--nn-title);
  letter-spacing: var(--nn-tracking-title);
  margin: 0;
  text-wrap: balance;
}
.nn-display { font-size: var(--nn-fs-display); line-height: var(--nn-lh-display); font-weight: 600; }
.nn-h1 { font-size: var(--nn-fs-h1); line-height: var(--nn-lh-h1); font-weight: 600; }
.nn-h2 { font-size: var(--nn-fs-h2); line-height: var(--nn-lh-h2); font-weight: 600; }
.nn-h3 { font-size: var(--nn-fs-h3); line-height: var(--nn-lh-h3); font-weight: 600; }
.nn-text { font-size: var(--nn-fs-body); line-height: var(--nn-lh-body); }
.nn-text-sm { font-size: var(--nn-fs-sm); line-height: var(--nn-lh-sm); }
.nn-text-xs { font-size: var(--nn-fs-xs); line-height: var(--nn-lh-xs); }
.nn-lead { font-size: 15px; line-height: 23px; color: var(--nn-ink-2); max-width: 72ch; }
.nn-muted { color: var(--nn-ink-2); }
.nn-subtle { color: var(--nn-ink-3); }
.nn-strong { font-weight: var(--nn-fw-semibold); color: var(--nn-ink); }
.nn-label, .nn-eyebrow {
  font-size: var(--nn-fs-label);
  line-height: var(--nn-lh-label);
  font-weight: var(--nn-fw-semibold);
  letter-spacing: var(--nn-tracking-label);
  text-transform: uppercase;
  color: var(--nn-ink-3);
}
.nn-mono { font-family: var(--nn-font-mono); font-size: .92em; letter-spacing: 0; font-variant-ligatures: none; }
.nn-num { font-variant-numeric: tabular-nums; }
.nn-kpi-value {
  font-family: var(--nn-font-sans);
  font-size: var(--nn-fs-kpi);
  line-height: var(--nn-lh-kpi);
  font-weight: var(--nn-fw-heavy);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--nn-ink);
}
.nn-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nn-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nn-link { color: var(--nn-link); text-decoration: none; font-weight: var(--nn-fw-medium); }
.nn-link:hover { color: var(--nn-link-hover); text-decoration: underline; text-underline-offset: 2px; }
.nn-kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  font: 600 10.5px/1 var(--nn-font-sans);
  color: var(--nn-ink-2);
  background: var(--nn-surface);
  border: 1px solid var(--nn-line);
  border-bottom-width: 2px;
  border-radius: var(--nn-radius-2xs);
}
/* A fact separator: thin rule, never a middle dot, hidden at the start of a wrapped line */
.nn-sep { display: inline-block; width: 1px; height: .9em; background: var(--nn-line-strong); margin: 0 8px; vertical-align: -1px; }
.nn-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; color: var(--nn-ink-2); font-size: var(--nn-fs-sm); overflow: hidden; }
.nn-facts > * + *::before { content: ''; display: inline-block; width: 1px; height: .9em; background: var(--nn-line-strong); margin: 0 10px 0 10px; vertical-align: -1px; }

/* ---------- Icons (Tabler Icons as masks, see nneat-icons.css) ---------- */
.nn-i { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.125em; background-color: currentColor; -webkit-mask: var(--nn-i) center / contain no-repeat; mask: var(--nn-i) center / contain no-repeat; }
.nn-icon-16 { font-size: 16px; }
.nn-icon-20 { font-size: 20px; }
.nn-icon-24 { font-size: 24px; }

/* ---------- Page structure ---------- */
.nn-page { padding: var(--nn-page-gutter); max-width: var(--nn-content-max); margin: 0 auto; }
.nn-stack { display: flex; flex-direction: column; gap: var(--nn-space-6); }
.nn-stack-lg { display: flex; flex-direction: column; gap: var(--nn-section-gap); }
.nn-row { display: flex; align-items: center; gap: var(--nn-space-4); }
.nn-row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nn-space-4); }
.nn-spacer { flex: 1 1 auto; }
.nn-grid { display: grid; gap: var(--nn-space-6); }
.nn-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nn-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nn-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nn-grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.nn-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--nn-space-8); align-items: start; }
@media (max-width: 1199px) { .nn-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) { .nn-grid-3, .nn-grid-2, .nn-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575px) { .nn-grid-4 { grid-template-columns: minmax(0, 1fr); } :root { --nn-page-gutter: 16px; --nn-card-pad: 16px; } }

/* Page header: eyebrow, title with help, freshness, actions on the right (primary first) */
.nn-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--nn-space-5) var(--nn-space-6); margin-bottom: var(--nn-space-8); }
.nn-page-head__text { flex: 1 1 320px; min-width: 0; }
.nn-page-head__eyebrow { display: block; margin-bottom: 4px; }
.nn-page-head__title { display: flex; align-items: center; gap: 8px; }
.nn-page-head__meta { margin-top: 4px; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nn-space-4); }
.nn-back { display: inline-flex; align-items: center; gap: 4px; font-size: var(--nn-fs-label); font-weight: 600; letter-spacing: var(--nn-tracking-label); text-transform: uppercase; color: var(--nn-ink-3); text-decoration: none; }
.nn-back:hover { color: var(--nn-brand); }

/* Section header: Montagu title, one muted line, optional actions */
.nn-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 var(--nn-space-5); }
.nn-sec__title { font: 600 var(--nn-fs-h2)/var(--nn-lh-h2) var(--nn-font-display); color: var(--nn-title); letter-spacing: var(--nn-tracking-title); margin: 0; }
.nn-sec__desc { font-size: var(--nn-fs-sm); color: var(--nn-ink-3); }
.nn-sec__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Help bubble next to a title (methodology goes behind it) */
.nn-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--nn-low); color: #fff;
  font: 700 11px/1 var(--nn-font-sans);
  border: 0; cursor: help; text-decoration: none;
}
.nn-help:hover { background: var(--nn-low-ink); }
/* In the app the bubble is Tabler's .form-help and opens a Bootstrap popover on click, placed below:
   <span class="form-help ms-2 bg-blue text-white" data-bs-toggle="popover" data-bs-placement="bottom" data-bs-html="true" data-bs-content="...">?</span>
   Card level: .nn-help--sm (16 px) next to the card title, with the same popover for a legend or a short method. */
.nn-help { cursor: pointer; }
.nn-help--sm { width: 16px; height: 16px; font-size: 10px; }

/* Brand pattern: binary dots of the brand illustration system */
.nn-dots {
  background-image: radial-gradient(var(--nn-dots-color) 1.1px, transparent 1.3px);
  background-size: 7px 7px;
}

/* Focus visible everywhere */
.nn-root :focus-visible { outline: none; box-shadow: var(--nn-focus); border-radius: var(--nn-radius-xs); }

/* hidden always wins over component display rules */
[hidden] { display: none !important; }

/* Screen reader only */
.nn-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Selection */
.nn-root ::selection { background: var(--nn-orange-200); color: var(--nn-ink); }
[data-nn-theme="ops"] ::selection { background: rgba(227, 86, 26, .45); color: #fff; }
/* ==========================================================================
   NNEAT Design System 1.0 · 03 Components
   Every component reads the semantic tokens, so it works in Product and Ops themes.
   Naming: .nn-<component>, .nn-<component>__<part>, .is-<state>, .nn-<component>--<variant>.
   ========================================================================== */

/* ==========================================================================
   Buttons
   One primary per view (or per drawer/modal). Sentence case, never uppercase, never an emoji.
   ========================================================================== */
.nn-btn {
  --b-bg: var(--nn-surface);
  --b-ink: var(--nn-ink);
  --b-line: var(--nn-line);
  --b-bg-hover: var(--nn-surface-2);
  --b-line-hover: var(--nn-line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--nn-control-h); padding: 0 14px;
  font: var(--nn-fw-semibold) var(--nn-fs-sm)/1 var(--nn-font-sans);
  color: var(--b-ink); background: var(--b-bg);
  border: 1px solid var(--b-line); border-radius: var(--nn-radius-sm);
  white-space: nowrap; text-decoration: none; text-transform: none; cursor: pointer;
  transition: background var(--nn-dur-1) var(--nn-ease), border-color var(--nn-dur-1) var(--nn-ease), color var(--nn-dur-1) var(--nn-ease), box-shadow var(--nn-dur-1) var(--nn-ease);
  -webkit-user-select: none; user-select: none;
}
.nn-btn:hover { background: var(--b-bg-hover); border-color: var(--b-line-hover); color: var(--b-ink); }
.nn-btn:active { transform: translateY(.5px); }
.nn-btn:focus-visible { outline: none; box-shadow: var(--nn-focus); }
.nn-btn .nn-i { font-size: 16px; }
.nn-btn--primary { --b-bg: var(--nn-brand-fill); --b-ink: var(--nn-on-brand); --b-line: var(--nn-brand-fill); --b-bg-hover: var(--nn-brand-fill-hover); --b-line-hover: var(--nn-brand-fill-hover); box-shadow: 0 1px 0 rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .12); }
.nn-btn--soft { --b-bg: var(--nn-brand-soft); --b-ink: var(--nn-brand-ink); --b-line: transparent; --b-bg-hover: var(--nn-orange-200); --b-line-hover: transparent; }
[data-nn-theme="ops"] .nn-btn--soft { --b-bg-hover: rgba(227, 86, 26, .26); }
.nn-btn--ghost { --b-bg: transparent; --b-line: transparent; --b-ink: var(--nn-ink-2); --b-bg-hover: var(--nn-surface-3); --b-line-hover: transparent; }
.nn-btn--danger { --b-bg: var(--nn-crit); --b-ink: #fff; --b-line: var(--nn-crit); --b-bg-hover: var(--nn-crit-ink); --b-line-hover: var(--nn-crit-ink); }
.nn-btn--danger:focus-visible { box-shadow: var(--nn-focus-danger); }
.nn-btn--link { --b-bg: transparent; --b-line: transparent; --b-ink: var(--nn-link); --b-bg-hover: transparent; --b-line-hover: transparent; padding: 0; height: auto; }
.nn-btn--link:hover { color: var(--nn-link-hover); text-decoration: underline; text-underline-offset: 2px; }
.nn-btn--sm { height: var(--nn-control-h-sm); padding: 0 10px; font-size: var(--nn-fs-xs); gap: 6px; border-radius: var(--nn-radius-xs); }
.nn-btn--sm .nn-i { font-size: 14px; }
.nn-btn--lg { height: var(--nn-control-h-lg); padding: 0 18px; font-size: var(--nn-fs-body); }
.nn-btn--icon { width: var(--nn-control-h); padding: 0; }
.nn-btn--icon.nn-btn--sm { width: var(--nn-control-h-sm); }
.nn-btn--block { width: 100%; }
/* Row action: ghost icon, delete turns red only on hover */
.nn-btn--row { --b-bg: transparent; --b-line: transparent; --b-ink: var(--nn-ink-3); --b-bg-hover: var(--nn-surface-3); --b-line-hover: transparent; width: 30px; height: 30px; padding: 0; border-radius: var(--nn-radius-xs); }
.nn-btn--row:hover { --b-ink: var(--nn-ink); }
.nn-btn--row.is-danger:hover { --b-ink: var(--nn-crit); --b-bg-hover: var(--nn-crit-soft); }
.nn-btn[disabled], .nn-btn.is-disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.nn-btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.nn-btn.is-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--b-ink); border-right-color: transparent; animation: nn-spin .7s linear infinite; }
.nn-btn--primary.is-loading::after { border-color: #fff; border-right-color: transparent; }
.nn-btn__caret { width: 14px; height: 14px; margin-right: -4px; opacity: .7; }
.nn-btn-group { display: inline-flex; }
.nn-btn-group > .nn-btn { border-radius: 0; }
.nn-btn-group > .nn-btn + .nn-btn { margin-left: -1px; }
.nn-btn-group > .nn-btn:first-child { border-radius: var(--nn-radius-sm) 0 0 var(--nn-radius-sm); }
.nn-btn-group > .nn-btn:last-child { border-radius: 0 var(--nn-radius-sm) var(--nn-radius-sm) 0; }
.nn-btn-group > .nn-btn--primary + .nn-btn--primary { border-left-color: rgba(255, 255, 255, .28); }
@keyframes nn-spin { to { transform: rotate(360deg); } }

/* Segmented control: switch between views of the same data (Map / List, 3M / 6M / 12M) */
.nn-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--nn-surface-3); border-radius: var(--nn-radius-sm); }
.nn-seg__item { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; background: transparent; border-radius: 6px; font: 600 var(--nn-fs-xs)/1 var(--nn-font-sans); color: var(--nn-ink-2); cursor: pointer; white-space: nowrap; }
.nn-seg__item:hover { color: var(--nn-ink); }
.nn-seg__item.is-active, .nn-seg__item[aria-pressed="true"], .nn-seg__item[aria-selected="true"] { background: var(--nn-surface); color: var(--nn-ink); box-shadow: var(--nn-shadow-1), 0 0 0 1px var(--nn-line); }
[data-nn-theme="ops"] .nn-seg__item.is-active { background: var(--nn-surface-3); box-shadow: 0 0 0 1px var(--nn-line-strong); }
.nn-seg--dark .nn-seg__item.is-active { background: var(--nn-maroon-900); color: #fff; box-shadow: none; }

/* ==========================================================================
   Forms
   Label above, hint below, error replaces the hint. Required marked with an orange asterisk.
   ========================================================================== */
.nn-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nn-field__label { font: 600 var(--nn-fs-sm)/18px var(--nn-font-sans); color: var(--nn-ink); display: flex; align-items: center; gap: 6px; }
.nn-field__req { color: var(--nn-brand); font-weight: 700; }
.nn-field__hint { font-size: var(--nn-fs-xs); line-height: var(--nn-lh-xs); color: var(--nn-ink-3); }
.nn-field__error { display: flex; gap: 6px; align-items: flex-start; font-size: var(--nn-fs-xs); line-height: var(--nn-lh-xs); color: var(--nn-crit-ink); font-weight: 500; }
.nn-field__counter { margin-left: auto; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); font-variant-numeric: tabular-nums; }
.nn-field.is-invalid .nn-input, .nn-field.is-invalid .nn-select, .nn-field.is-invalid .nn-textarea { border-color: var(--nn-crit); }
.nn-field.is-invalid .nn-input:focus { box-shadow: var(--nn-focus-danger); }
.nn-field.is-changed .nn-field__label::after { content: 'Modificado'; font: 600 10.5px/1 var(--nn-font-sans); color: var(--nn-brand-ink); background: var(--nn-brand-soft); padding: 3px 6px; border-radius: var(--nn-radius-2xs); }

.nn-input, .nn-select, .nn-textarea {
  width: 100%; min-width: 0;
  height: var(--nn-control-h); padding: 0 12px;
  font: var(--nn-fw-regular) var(--nn-fs-sm)/1.4 var(--nn-font-sans);
  color: var(--nn-ink); background: var(--nn-surface);
  border: 1px solid var(--nn-line); border-radius: var(--nn-radius-sm);
  transition: border-color var(--nn-dur-1) var(--nn-ease), box-shadow var(--nn-dur-1) var(--nn-ease);
  -webkit-appearance: none; appearance: none;
}
.nn-input::placeholder, .nn-textarea::placeholder { color: var(--nn-ink-4); }
.nn-input:hover, .nn-select:hover, .nn-textarea:hover { border-color: var(--nn-line-strong); }
.nn-input:focus, .nn-select:focus, .nn-textarea:focus { outline: none; border-color: var(--nn-brand); box-shadow: var(--nn-focus); }
.nn-input[disabled], .nn-select[disabled], .nn-textarea[disabled] { background: var(--nn-surface-2); color: var(--nn-ink-3); cursor: not-allowed; }
.nn-input[readonly] { background: var(--nn-surface-2); }
.nn-input--sm, .nn-select--sm { height: var(--nn-control-h-sm); font-size: var(--nn-fs-xs); padding: 0 10px; border-radius: var(--nn-radius-xs); }
.nn-input--mono { font-family: var(--nn-font-mono); font-size: 12.5px; }
.nn-textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.nn-select {
  padding-right: 34px; cursor: pointer;
  background-image: var(--nn-icon-chevron-down, none);
  background: var(--nn-surface) no-repeat right 10px center / 14px 14px;
}
.nn-select-wrap { position: relative; display: block; }
.nn-select-wrap::after { content: ''; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: var(--nn-ink-3); -webkit-mask: var(--nn-icon-chevron-down) center / contain no-repeat; mask: var(--nn-icon-chevron-down) center / contain no-repeat; pointer-events: none; }

/* Input with icon or affix */
.nn-input-group { position: relative; display: flex; align-items: center; }
.nn-input-group > .nn-i { position: absolute; left: 12px; color: var(--nn-ink-3); font-size: 16px; pointer-events: none; }
.nn-input-group > .nn-i ~ .nn-input { padding-left: 36px; }
.nn-input-group > .nn-input-group__end { position: absolute; right: 8px; display: flex; gap: 4px; align-items: center; }
.nn-input-group > .nn-input-group__end ~ .nn-input, .nn-input-group .nn-input:has(~ .nn-input-group__end) { padding-right: 40px; }
.nn-affix { display: flex; }
.nn-affix > .nn-input { border-radius: 0 var(--nn-radius-sm) var(--nn-radius-sm) 0; }
.nn-affix__text { display: inline-flex; align-items: center; padding: 0 10px; font-size: var(--nn-fs-sm); color: var(--nn-ink-2); background: var(--nn-surface-2); border: 1px solid var(--nn-line); border-right: 0; border-radius: var(--nn-radius-sm) 0 0 var(--nn-radius-sm); }

/* Search: icon, '/' shortcut, clear button with room from the border */
.nn-search { position: relative; display: flex; align-items: center; min-width: 220px; }
.nn-search > .nn-i { position: absolute; left: 11px; font-size: 16px; color: var(--nn-ink-3); pointer-events: none; }
.nn-search > .nn-input { padding-left: 34px; padding-right: 40px; }
.nn-search > .nn-kbd, .nn-search > .nn-search__clear { position: absolute; right: 9px; }
.nn-search__clear { display: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--nn-surface-3); color: var(--nn-ink-2); cursor: pointer; align-items: center; justify-content: center; }
.nn-search.has-value > .nn-kbd { display: none; }
.nn-search.has-value > .nn-search__clear { display: inline-flex; }

/* Checkbox and radio */
.nn-check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--nn-fs-sm); line-height: 20px; color: var(--nn-ink); }
.nn-check input { -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 1px 0 0; border: 1.5px solid var(--nn-line-strong); border-radius: 5px; background: var(--nn-surface); display: grid; place-content: center; cursor: pointer; transition: background var(--nn-dur-1), border-color var(--nn-dur-1); }
.nn-check input[type="radio"] { border-radius: 50%; }
.nn-check input:hover { border-color: var(--nn-ink-3); }
.nn-check input:focus-visible { outline: none; box-shadow: var(--nn-focus); }
.nn-check input:checked, .nn-check input:indeterminate { background: var(--nn-brand); border-color: var(--nn-brand); }
.nn-check input[type="checkbox"]:checked::after { content: ''; width: 12px; height: 12px; background: #fff; -webkit-mask: var(--nn-icon-check) center / contain no-repeat; mask: var(--nn-icon-check) center / contain no-repeat; }
.nn-check input:indeterminate::after { content: ''; width: 9px; height: 2px; border-radius: 1px; background: #fff; }
.nn-check input[type="radio"]:checked::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.nn-check input:disabled { opacity: .5; cursor: not-allowed; }
.nn-check__hint { display: block; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); line-height: var(--nn-lh-xs); }

/* Switch: for two-state settings that apply on save */
.nn-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--nn-fs-sm); color: var(--nn-ink); }
.nn-switch input { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 34px; height: 20px; margin: 0; border-radius: 999px; background: var(--nn-line-strong); cursor: pointer; transition: background var(--nn-dur-2) var(--nn-ease); }
.nn-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform var(--nn-dur-2) var(--nn-ease); }
.nn-switch input:checked { background: var(--nn-brand); }
.nn-switch input:checked::after { transform: translateX(14px); }
.nn-switch input:focus-visible { outline: none; box-shadow: var(--nn-focus); }

/* Option cards: radio choice with a description (select 'O') */
.nn-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.nn-option { position: relative; display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--nn-line); border-radius: var(--nn-radius-sm); background: var(--nn-surface); cursor: pointer; transition: border-color var(--nn-dur-1), background var(--nn-dur-1); }
.nn-option:hover { border-color: var(--nn-line-strong); }
.nn-option:has(input:checked) { border-color: var(--nn-brand); background: var(--nn-brand-soft); box-shadow: inset 0 0 0 1px var(--nn-brand); }
.nn-option__title { font-weight: 600; font-size: var(--nn-fs-sm); color: var(--nn-ink); }
.nn-option__desc { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); margin-top: 2px; }

/* File drop */
.nn-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; border: 1.5px dashed var(--nn-line-strong); border-radius: var(--nn-radius); background: var(--nn-surface-2); color: var(--nn-ink-2); font-size: var(--nn-fs-sm); cursor: pointer; transition: border-color var(--nn-dur-1), background var(--nn-dur-1); }
.nn-drop:hover, .nn-drop.is-over { border-color: var(--nn-brand); background: var(--nn-brand-soft); }
.nn-drop .nn-i { font-size: 24px; color: var(--nn-brand); }

/* Range */
.nn-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(var(--nn-brand), var(--nn-brand)) 0 / var(--v, 50%) 100% no-repeat, var(--nn-line); }
.nn-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--nn-surface); border: 2px solid var(--nn-brand); box-shadow: var(--nn-shadow-2); cursor: grab; }
.nn-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--nn-surface); border: 2px solid var(--nn-brand); cursor: grab; }

/* Form layout: cards per section, 2 columns, sticky action bar */
.nn-form { display: flex; flex-direction: column; gap: var(--nn-space-6); }
.nn-form-card { background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); padding: var(--nn-card-pad); }
.nn-form-card__head { margin-bottom: 16px; }
.nn-form-card__title { font: 600 var(--nn-fs-h3)/var(--nn-lh-h3) var(--nn-font-display); color: var(--nn-title); margin: 0; }
.nn-form-card__desc { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); margin-top: 4px; }
.nn-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.nn-form-grid > .is-wide { grid-column: 1 / -1; }
@media (max-width: 767px) { .nn-form-grid { grid-template-columns: minmax(0, 1fr); } }
.nn-actionbar { position: sticky; bottom: 0; z-index: var(--nn-z-sticky); display: flex; align-items: center; gap: 10px; padding: 12px var(--nn-card-pad); background: color-mix(in srgb, var(--nn-surface) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); box-shadow: var(--nn-shadow-2); }
.nn-actionbar__status { font-size: var(--nn-fs-sm); color: var(--nn-ink-3); display: flex; align-items: center; gap: 8px; }
.nn-actionbar__status.is-dirty { color: var(--nn-brand-ink); font-weight: 600; }
.nn-actionbar__status.is-dirty::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--nn-brand); }
.nn-error-summary { padding: 12px 14px; border-radius: var(--nn-radius-sm); border: 1px solid var(--nn-crit-line); background: var(--nn-crit-soft); color: var(--nn-crit-ink); font-size: var(--nn-fs-sm); }
.nn-error-summary a { color: inherit; font-weight: 600; }

/* ==========================================================================
   Badges, chips and status marks
   ========================================================================== */
/* Badge: soft fill, one meaning per tone */
.nn-badge {
  --t: var(--nn-info); --t-soft: var(--nn-info-soft); --t-ink: var(--nn-info-ink);
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  font: var(--nn-fw-semibold) 11.5px/1 var(--nn-font-sans);
  color: var(--t-ink); background: var(--t-soft);
  border-radius: var(--nn-radius-xs);
  white-space: nowrap; vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.nn-badge .nn-i { font-size: 13px; }
.nn-badge.is-crit { --t: var(--nn-crit); --t-soft: var(--nn-crit-soft); --t-ink: var(--nn-crit-ink); }
.nn-badge.is-high { --t: var(--nn-high); --t-soft: var(--nn-high-soft); --t-ink: var(--nn-high-ink); }
.nn-badge.is-med { --t: var(--nn-med); --t-soft: var(--nn-med-soft); --t-ink: var(--nn-med-ink); }
.nn-badge.is-low { --t: var(--nn-low); --t-soft: var(--nn-low-soft); --t-ink: var(--nn-low-ink); }
.nn-badge.is-ok { --t: var(--nn-ok); --t-soft: var(--nn-ok-soft); --t-ink: var(--nn-ok-ink); }
.nn-badge.is-info { --t: var(--nn-info); --t-soft: var(--nn-info-soft); --t-ink: var(--nn-info-ink); }
.nn-badge.is-brand { --t: var(--nn-brand); --t-soft: var(--nn-brand-soft); --t-ink: var(--nn-brand-ink); }
.nn-badge.is-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--t); }
.nn-badge--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--nn-line); color: var(--nn-ink-2); }
.nn-badge--sm { height: 18px; padding: 0 6px; font-size: 10.5px; }
.nn-badge--solid { color: #fff; background: var(--t); }

/* Status: dot and text (states of objects: active, connected, pending) */
.nn-status { --t: var(--nn-info); display: inline-flex; align-items: center; gap: 7px; font-size: var(--nn-fs-sm); font-weight: 500; color: var(--nn-ink); white-space: nowrap; }
.nn-status::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 18%, transparent); }
.nn-status.is-ok { --t: var(--nn-ok); }
.nn-status.is-crit { --t: var(--nn-crit); }
.nn-status.is-high { --t: var(--nn-high); }
.nn-status.is-med { --t: var(--nn-med); }
.nn-status.is-low { --t: var(--nn-low); }
.nn-status.is-off { --t: var(--nn-ink-4); }
.nn-status.is-live::before { animation: nn-pulse 1.8s var(--nn-ease) infinite; }
@keyframes nn-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--t) 45%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } }

/* Severity: level bars + word. Never colour alone. data-level 4=critical 3=high 2=medium 1=low 0=informative */
.nn-sev { --t: var(--nn-info); display: inline-flex; align-items: center; gap: 7px; font: 600 var(--nn-fs-xs)/1 var(--nn-font-sans); color: var(--nn-ink); white-space: nowrap; }
.nn-sev__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.nn-sev__bars i { width: 3px; border-radius: 1px; background: var(--nn-line-strong); }
.nn-sev__bars i:nth-child(1) { height: 5px; }
.nn-sev__bars i:nth-child(2) { height: 8px; }
.nn-sev__bars i:nth-child(3) { height: 10px; }
.nn-sev__bars i:nth-child(4) { height: 12px; }
.nn-sev[data-level="4"] { --t: var(--nn-crit); }
.nn-sev[data-level="3"] { --t: var(--nn-high); }
.nn-sev[data-level="2"] { --t: var(--nn-med); }
.nn-sev[data-level="1"] { --t: var(--nn-low); }
.nn-sev[data-level="4"] .nn-sev__bars i,
.nn-sev[data-level="3"] .nn-sev__bars i:nth-child(-n+3),
.nn-sev[data-level="2"] .nn-sev__bars i:nth-child(-n+2),
.nn-sev[data-level="1"] .nn-sev__bars i:nth-child(1) { background: var(--t); }

/* Rating letter TADR® */
.nn-grade { --t: var(--nn-grade-c); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--nn-radius-xs); background: var(--t); color: #fff; font: 800 12px/1 var(--nn-font-sans); }
.nn-grade--lg { width: 40px; height: 40px; border-radius: var(--nn-radius-sm); font-size: 22px; }
.nn-grade[data-grade="A"] { --t: var(--nn-grade-a); }
.nn-grade[data-grade="B"] { --t: var(--nn-grade-b); }
.nn-grade[data-grade="C"] { --t: var(--nn-grade-c); }
.nn-grade[data-grade="D"] { --t: var(--nn-grade-d); }
.nn-grade[data-grade="E"] { --t: var(--nn-grade-e); }
.nn-grade[data-grade="F"] { --t: var(--nn-grade-f); }

/* Delta: change against a previous value. is-good / is-bad set the meaning, not the direction */
.nn-delta { display: inline-flex; align-items: center; gap: 3px; font: 600 var(--nn-fs-xs)/1 var(--nn-font-sans); color: var(--nn-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nn-delta .nn-i { font-size: 13px; }
.nn-delta.is-good { color: var(--nn-ok-ink); }
.nn-delta.is-bad { color: var(--nn-crit-ink); }
.nn-delta--pill { height: 20px; padding: 0 7px; border-radius: var(--nn-radius-pill); background: var(--nn-surface-3); }
.nn-delta--pill.is-good { background: var(--nn-ok-soft); }
.nn-delta--pill.is-bad { background: var(--nn-crit-soft); }

/* Priority meter (Command Center: Priority ▬ 88) */
.nn-prio { --t: var(--nn-crit); display: inline-flex; align-items: center; gap: 8px; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-prio__bar { width: 44px; height: 4px; border-radius: 4px; background: var(--nn-line-2); overflow: hidden; }
.nn-prio__bar > i { display: block; height: 100%; width: var(--v, 50%); background: var(--t); border-radius: inherit; }
.nn-prio__value { font-weight: 800; color: var(--nn-ink); font-variant-numeric: tabular-nums; }

/* Chip: removable filter or selectable token */
.nn-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; font: 500 var(--nn-fs-xs)/1 var(--nn-font-sans); color: var(--nn-ink); background: var(--nn-surface-3); border: 1px solid transparent; border-radius: var(--nn-radius-pill); white-space: nowrap; }
.nn-chip b { font-weight: 600; }
.nn-chip__remove { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: var(--nn-ink-3); cursor: pointer; }
.nn-chip__remove:hover { background: var(--nn-line); color: var(--nn-ink); }
.nn-chip--toggle { padding: 0 12px; cursor: pointer; background: var(--nn-surface); border-color: var(--nn-line); }
.nn-chip--toggle:hover { border-color: var(--nn-line-strong); }
.nn-chip--toggle.is-active, .nn-chip--toggle[aria-pressed="true"] { background: var(--nn-brand-soft); border-color: var(--nn-brand-line); color: var(--nn-brand-ink); }
.nn-chip__count { font-weight: 700; color: var(--nn-ink-3); font-variant-numeric: tabular-nums; }

/* Tag: neutral metadata (technology, CVE id, asset) */
.nn-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; font: 500 11px/1 var(--nn-font-sans); color: var(--nn-ink-2); background: var(--nn-surface-2); border: 1px solid var(--nn-line); border-radius: var(--nn-radius-2xs); white-space: nowrap; }
.nn-tag--mono { font-family: var(--nn-font-mono); font-size: 11px; }
.nn-tag.is-crit { color: var(--nn-crit-ink); background: var(--nn-crit-soft); border-color: var(--nn-crit-line); }
.nn-tag.is-brand { color: var(--nn-brand-ink); background: var(--nn-brand-soft); border-color: var(--nn-brand-line); }

/* Module mark: identity of a NNEAT module, colour from the brand secondary palette */
.nn-mod { --m: var(--nn-mod-surface); display: inline-flex; align-items: center; gap: 6px; font: 600 var(--nn-fs-xs)/1 var(--nn-font-sans); color: var(--nn-ink-2); white-space: nowrap; }
.nn-mod::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--m); }
.nn-mod[data-mod="surface"] { --m: var(--nn-mod-surface); }
.nn-mod[data-mod="endpoint"] { --m: var(--nn-mod-endpoint); }
.nn-mod[data-mod="connect"] { --m: var(--nn-mod-connect); }
.nn-mod[data-mod="embedded"] { --m: var(--nn-mod-embedded); }
.nn-mod[data-mod="ai-audit"] { --m: var(--nn-mod-ai-audit); }
.nn-mod[data-mod="spores"] { --m: var(--nn-mod-spores); }
.nn-mod[data-mod="cti"] { --m: var(--nn-mod-cti); }
.nn-mod[data-mod="balance"] { --m: var(--nn-mod-balance); }

/* Count bubble (menus, tabs) */
.nn-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--nn-radius-pill); background: var(--nn-surface-3); color: var(--nn-ink-2); font: 700 10.5px/1 var(--nn-font-sans); font-variant-numeric: tabular-nums; }
.nn-count.is-brand { background: var(--nn-brand); color: #fff; }
.nn-count.is-crit { background: var(--nn-crit); color: #fff; }

/* Summary strip: coloured dots with counts that filter the list (card header of lists) */
.nn-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nn-summary__item { --t: var(--nn-info); display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 0; border-radius: var(--nn-radius-sm); background: transparent; font: 500 var(--nn-fs-sm)/1 var(--nn-font-sans); color: var(--nn-ink-2); cursor: pointer; white-space: nowrap; }
.nn-summary__item::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--t); }
.nn-summary__item b { color: var(--nn-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.nn-summary__item:hover { background: var(--nn-surface-3); }
.nn-summary__item.is-active { background: var(--nn-surface-3); color: var(--nn-ink); box-shadow: inset 0 0 0 1px var(--nn-line-strong); }
.nn-summary__item.is-zero { opacity: .55; }
.nn-summary__item.is-crit { --t: var(--nn-crit); }
.nn-summary__item.is-high { --t: var(--nn-high); }
.nn-summary__item.is-med { --t: var(--nn-med); }
.nn-summary__item.is-low { --t: var(--nn-low); }
.nn-summary__item.is-ok { --t: var(--nn-ok); }
.nn-summary__item.is-brand { --t: var(--nn-brand); }

/* ==========================================================================
   Feedback: alerts, banners, toasts, empty states, loading, progress, tooltips
   ========================================================================== */
.nn-alert { --t: var(--nn-info); --t-soft: var(--nn-info-soft); --t-line: var(--nn-info-line); --t-ink: var(--nn-info-ink);
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--t-line); border-radius: var(--nn-radius-sm); background: var(--t-soft);
  font-size: var(--nn-fs-sm); line-height: 20px; color: var(--nn-ink); }
.nn-alert > .nn-i { font-size: 18px; color: var(--t-ink); margin-top: 1px; }
.nn-alert__body { flex: 1; min-width: 0; }
.nn-alert__title { font-weight: 600; color: var(--nn-ink); }
.nn-alert__actions { display: flex; gap: 8px; margin-left: auto; align-self: center; }
.nn-alert.is-crit { --t-soft: var(--nn-crit-soft); --t-line: var(--nn-crit-line); --t-ink: var(--nn-crit-ink); }
.nn-alert.is-med { --t-soft: var(--nn-med-soft); --t-line: var(--nn-med-line); --t-ink: var(--nn-med-ink); }
.nn-alert.is-ok { --t-soft: var(--nn-ok-soft); --t-line: var(--nn-ok-line); --t-ink: var(--nn-ok-ink); }
.nn-alert.is-low { --t-soft: var(--nn-low-soft); --t-line: var(--nn-low-line); --t-ink: var(--nn-low-ink); }
.nn-alert.is-brand { --t-soft: var(--nn-brand-soft); --t-line: var(--nn-brand-line); --t-ink: var(--nn-brand-ink); }

/* Banner: what needs attention right now, at the top of a page (trending CVE) */
.nn-banner { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border: 1px solid var(--nn-crit-line); border-radius: var(--nn-radius); background: linear-gradient(90deg, var(--nn-crit-soft), var(--nn-surface) 70%); }
.nn-banner__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--nn-radius-sm); background: var(--nn-crit); color: #fff; font-size: 18px; }
.nn-banner__title { font-weight: 700; font-size: var(--nn-fs-sm); color: var(--nn-ink); }
.nn-banner__meta { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); margin-top: 2px; }
.nn-banner__actions { margin-left: auto; display: flex; gap: 8px; }
.nn-banner.is-brand { border-color: var(--nn-brand-line); background: linear-gradient(90deg, var(--nn-brand-soft), var(--nn-surface) 70%); }
.nn-banner.is-brand .nn-banner__icon { background: var(--nn-brand); }

/* Toast: bottom right, dark, one line and an optional action (undo) */
.nn-toasts { position: fixed; right: 20px; bottom: 20px; z-index: var(--nn-z-toast); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.nn-toast { --t: var(--nn-ok); pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: 440px; padding: 12px 12px 12px 14px; border-radius: var(--nn-radius-sm); background: var(--nn-surface-inverse); color: var(--nn-ink-inverse); font-size: var(--nn-fs-sm); line-height: 19px; box-shadow: var(--nn-shadow-3); animation: nn-toast-in var(--nn-dur-3) var(--nn-ease); }
.nn-toast > .nn-i { flex: none; font-size: 18px; color: color-mix(in srgb, var(--t) 70%, #fff); }
.nn-toast__body { flex: 1; min-width: 0; }
.nn-toast__action { flex: none; border: 0; background: transparent; color: #ffb38c; font: 600 var(--nn-fs-sm)/1 var(--nn-font-sans); cursor: pointer; padding: 6px; border-radius: 6px; }
.nn-toast__action:hover { background: rgba(255, 255, 255, .08); }
.nn-toast__close { flex: none; border: 0; background: transparent; color: rgba(255, 255, 255, .6); cursor: pointer; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; }
.nn-toast.is-crit { --t: var(--nn-crit); }
.nn-toast.is-info { --t: var(--nn-low); }
[data-nn-theme="ops"] .nn-toast { background: var(--nn-ember-750); color: var(--nn-ink); border: 1px solid var(--nn-line-strong); }
@keyframes nn-toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Empty state: icon in a soft orange square (or the binary dots), Montagu title, one line, one action */
.nn-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; max-width: 460px; margin: 0 auto; }
.nn-empty__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--nn-brand-soft); color: var(--nn-brand); font-size: 24px; margin-bottom: 4px; }
.nn-empty__icon.nn-dots { background-color: var(--nn-brand-soft); }
.nn-empty__title { font: 600 var(--nn-fs-h3)/var(--nn-lh-h3) var(--nn-font-display); color: var(--nn-title); margin: 0; font-size: 17px; }
.nn-empty__text { font-size: var(--nn-fs-sm); color: var(--nn-ink-2); margin: 0; }
.nn-empty__actions { display: flex; gap: 8px; margin-top: 6px; }
.nn-empty--sm { padding: 24px 16px; gap: 6px; }
.nn-empty--sm .nn-empty__icon { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
/* Same component with the markup the app already uses (css/nneat-ui.css): .nn-empty-ico, h4, p, a row of buttons */
.nn-empty .nn-empty-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--nn-brand-soft); color: var(--nn-brand); font-size: 22px; }
.nn-empty > h4 { font: 600 16px/22px var(--nn-font-display); color: var(--nn-title); margin: 0; }
.nn-empty > p { font-size: var(--nn-fs-sm); color: var(--nn-ink-2); margin: 0; max-width: 380px; }

/* Loading */
.nn-skel { display: block; border-radius: var(--nn-radius-2xs); background: var(--nn-skeleton); background-size: 200% 100%; animation: nn-skel 1.3s ease-in-out infinite; height: 12px; }
.nn-skel--title { height: 18px; width: 45%; }
.nn-skel--text { height: 11px; }
.nn-skel--block { height: 72px; border-radius: var(--nn-radius-sm); }
@keyframes nn-skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.nn-spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--nn-line); border-top-color: var(--nn-brand); animation: nn-spin .7s linear infinite; }
.nn-spinner--lg { width: 28px; height: 28px; border-width: 3px; }
.nn-busy { position: relative; }
.nn-busy::after { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--nn-surface) 55%, transparent); pointer-events: none; }
.nn-loadbar { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; }
.nn-loadbar::after { content: ''; position: absolute; top: 0; height: 100%; width: 30%; background: var(--nn-brand); animation: nn-loadbar 1.1s var(--nn-ease) infinite; }
@keyframes nn-loadbar { from { left: -30%; } to { left: 100%; } }

/* Progress and meters */
.nn-progress { --t: var(--nn-brand); height: 6px; border-radius: 6px; background: var(--nn-line-2); overflow: hidden; }
.nn-progress > i { display: block; height: 100%; width: var(--v, 0%); background: var(--t); border-radius: inherit; transition: width var(--nn-dur-4) var(--nn-ease); }
.nn-progress--sm { height: 4px; }
.nn-progress.is-ok { --t: var(--nn-ok); }
.nn-progress.is-crit { --t: var(--nn-crit); }
.nn-progress.is-med { --t: var(--nn-med); }
.nn-progress--striped > i { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .28) 0 4px, transparent 4px 8px); }
/* Stacked bar: distribution by severity or state (always with a legend or a tooltip) */
.nn-stack-bar { display: flex; height: 6px; gap: 2px; border-radius: 6px; overflow: hidden; background: var(--nn-line-2); }
.nn-stack-bar > i { display: block; height: 100%; flex: var(--v, 1) 1 0; }
.nn-stack-bar > .is-crit { background: var(--nn-crit); }
.nn-stack-bar > .is-high { background: var(--nn-high); }
.nn-stack-bar > .is-med { background: var(--nn-med); }
.nn-stack-bar > .is-low { background: var(--nn-low); }
.nn-stack-bar > .is-ok { background: var(--nn-ok); }
.nn-stack-bar > .is-info { background: var(--nn-line-strong); }

/* Tooltip (CSS-only for simple cases: data-nn-tip) */
.nn-tooltip { position: absolute; z-index: var(--nn-z-tooltip); max-width: 280px; padding: 7px 10px; border-radius: var(--nn-radius-xs); background: var(--nn-surface-inverse); color: var(--nn-ink-inverse); font: 500 var(--nn-fs-xs)/17px var(--nn-font-sans); box-shadow: var(--nn-shadow-2); pointer-events: none; }
[data-nn-tip] { position: relative; }
[data-nn-tip]:hover::after, [data-nn-tip]:focus-visible::after { content: attr(data-nn-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: var(--nn-z-tooltip); width: max-content; max-width: 260px; padding: 6px 9px; border-radius: var(--nn-radius-xs); background: var(--nn-surface-inverse); color: var(--nn-ink-inverse); font: 500 var(--nn-fs-xs)/16px var(--nn-font-sans); text-transform: none; letter-spacing: 0; white-space: normal; pointer-events: none; box-shadow: var(--nn-shadow-2); animation: nn-fade var(--nn-dur-2) var(--nn-ease); }
@keyframes nn-fade { from { opacity: 0; } }

/* ==========================================================================
   Navigation
   ========================================================================== */
/* Tabs: underline, for sibling views of the same object or list */
.nn-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--nn-line); overflow-x: auto; scrollbar-width: none; }
.nn-tabs__item { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 0 11px; border: 0; background: none; font: 500 var(--nn-fs-sm)/1 var(--nn-font-sans); color: var(--nn-ink-2); text-decoration: none; white-space: nowrap; cursor: pointer; }
.nn-tabs__item:hover { color: var(--nn-ink); }
.nn-tabs__item.is-active, .nn-tabs__item[aria-selected="true"] { color: var(--nn-brand-ink); font-weight: 600; }
.nn-tabs__item.is-active::after, .nn-tabs__item[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--nn-brand); }
[data-nn-theme="ops"] .nn-tabs__item.is-active { color: var(--nn-brand-ink); }

/* Pagination */
.nn-pager { display: flex; align-items: center; gap: 4px; font-size: var(--nn-fs-sm); color: var(--nn-ink-2); }
.nn-pager__btn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: var(--nn-radius-xs); background: transparent; color: var(--nn-ink-2); font: 500 var(--nn-fs-sm)/1 var(--nn-font-sans); cursor: pointer; font-variant-numeric: tabular-nums; }
.nn-pager__btn:hover { background: var(--nn-surface-3); color: var(--nn-ink); }
.nn-pager__btn.is-active { border-color: var(--nn-line-strong); background: var(--nn-surface); color: var(--nn-ink); font-weight: 700; }
.nn-pager__btn[disabled] { opacity: .4; pointer-events: none; }

/* Stepper: wizards and onboarding */
.nn-steps { display: flex; gap: 0; counter-reset: s; }
.nn-steps__item { flex: 1; display: flex; align-items: center; gap: 10px; font-size: var(--nn-fs-sm); color: var(--nn-ink-3); }
.nn-steps__item::before { counter-increment: s; content: counter(s); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--nn-line-strong); font: 700 12px/1 var(--nn-font-sans); color: var(--nn-ink-3); background: var(--nn-surface); }
.nn-steps__item::after { content: ''; flex: 1; height: 1.5px; background: var(--nn-line); margin-right: 10px; }
.nn-steps__item:last-child::after { display: none; }
.nn-steps__item.is-active { color: var(--nn-ink); font-weight: 600; }
.nn-steps__item.is-active::before { border-color: var(--nn-brand); color: var(--nn-brand); box-shadow: var(--nn-focus); }
.nn-steps__item.is-done::before { content: ''; border-color: var(--nn-brand); background: var(--nn-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center / 14px no-repeat; }
.nn-steps__item.is-done { color: var(--nn-ink-2); }
.nn-steps__item.is-done::after { background: var(--nn-brand); }

/* Sidebar (product shell). Warm dark: the same ember ramp as the Ops theme */
.nn-sidebar { --s-bg: #1a0400; --s-card: #24100a; --s-ink: rgba(255, 255, 255, .82); --s-ink-2: rgba(255, 255, 255, .58); --s-ink-3: rgba(255, 255, 255, .40); --s-hover: rgba(255, 255, 255, .06); --s-active: rgba(101, 13, 0, .55); --s-line: rgba(255, 255, 255, .08);
  width: var(--nn-sidebar-w); height: 100%; padding: 14px 12px; background: var(--s-bg); color: var(--s-ink); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; font-family: var(--nn-font-sans); }
.nn-sidebar__logo { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; }
.nn-sidebar__logo img { height: 26px; }
.nn-sidebar__ctx { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--s-card); border: 1px solid var(--s-line); }
.nn-sidebar__ctx-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #0f3b66, #2a6cb0); color: #fff; font: 700 11px/1 var(--nn-font-sans); }
.nn-sidebar__ctx-eyebrow { font-size: 10.5px; color: var(--s-ink-3); }
.nn-sidebar__ctx-name { font-size: 13px; font-weight: 600; color: #fff; }
.nn-sidebar__group { display: flex; flex-direction: column; gap: 2px; }
.nn-sidebar__group-title { padding: 6px 10px; font: 600 10.5px/1 var(--nn-font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--s-ink-3); }
.nn-sidebar__item { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--s-ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.nn-sidebar__item .nn-i { font-size: 18px; color: var(--s-ink-2); }
.nn-sidebar__item:hover { background: var(--s-hover); color: #fff; }
.nn-sidebar__item.is-active { background: var(--s-active); color: #fff; box-shadow: inset 3px 0 0 #cc4205; }
.nn-sidebar__item.is-active .nn-i { color: #ff8a4c; }
.nn-sidebar__item-meta { margin-left: auto; font-size: 10.5px; color: var(--s-ink-3); }
.nn-sidebar__panel { padding: 8px 6px; border-radius: 12px; background: var(--s-card); border: 1px solid var(--s-line); }

/* Command palette: global search (Ctrl K) */
.nn-cmdk { width: min(640px, calc(100vw - 32px)); background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius-lg); box-shadow: var(--nn-shadow-4); overflow: hidden; }
.nn-cmdk__input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--nn-line); }
.nn-cmdk__input input { flex: 1; border: 0; outline: 0; background: transparent; font: 400 15px/1 var(--nn-font-sans); color: var(--nn-ink); }
.nn-cmdk__list { max-height: 380px; overflow-y: auto; padding: 6px; }
.nn-cmdk__group { padding: 10px 10px 6px; }
.nn-cmdk__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--nn-radius-sm); font-size: var(--nn-fs-sm); color: var(--nn-ink); cursor: pointer; }
.nn-cmdk__item .nn-i { font-size: 17px; color: var(--nn-ink-3); }
.nn-cmdk__item.is-active { background: var(--nn-brand-soft); }
.nn-cmdk__item.is-active .nn-i { color: var(--nn-brand); }
.nn-cmdk__item-meta { margin-left: auto; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-cmdk__foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--nn-line); background: var(--nn-surface-2); font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }

/* ==========================================================================
   Overlays: dropdown menu, popover, modal, drawer
   ========================================================================== */
.nn-menu { min-width: 200px; padding: 6px; background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius-sm); box-shadow: var(--nn-shadow-3); z-index: var(--nn-z-dropdown); animation: nn-pop var(--nn-dur-2) var(--nn-ease); }
.nn-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; font: 500 var(--nn-fs-sm)/18px var(--nn-font-sans); color: var(--nn-ink); text-align: left; text-decoration: none; cursor: pointer; white-space: nowrap; }
.nn-menu__item .nn-i { font-size: 16px; color: var(--nn-ink-3); }
.nn-menu__item:hover, .nn-menu__item:focus-visible { background: var(--nn-surface-3); outline: none; box-shadow: none; }
.nn-menu__item.is-danger { color: var(--nn-crit-ink); }
.nn-menu__item.is-danger .nn-i { color: var(--nn-crit); }
.nn-menu__item.is-danger:hover { background: var(--nn-crit-soft); }
.nn-menu__item-meta { margin-left: auto; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-menu__item-text { display: flex; flex-direction: column; min-width: 0; white-space: normal; }
.nn-menu__item-desc { display: block; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); font-weight: 400; white-space: normal; }
.nn-menu__sep { height: 1px; margin: 6px -6px; background: var(--nn-line-2); }
.nn-menu__title { padding: 8px 10px 4px; }
@keyframes nn-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.nn-popover { width: 320px; background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); box-shadow: var(--nn-shadow-3); z-index: var(--nn-z-popover); animation: nn-pop var(--nn-dur-2) var(--nn-ease); }
.nn-popover__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--nn-line-2); font-weight: 600; font-size: var(--nn-fs-sm); }
.nn-popover__body { padding: 12px 14px; max-height: min(60vh, 420px); overflow-y: auto; }
.nn-popover__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--nn-line-2); background: var(--nn-surface-2); border-radius: 0 0 var(--nn-radius) var(--nn-radius); }

/* Modal: short decisions and short forms. Long content goes to a drawer or a page */
.nn-backdrop { position: fixed; inset: 0; background: var(--nn-overlay); z-index: calc(var(--nn-z-drawer) - 1); animation: nn-fade var(--nn-dur-3) var(--nn-ease); }
/* Centred by its layer, never by an inline transform. The animation only touches opacity and scale.
   In the app a modal is Bootstrap's .modal.modal-blur.fade + .modal-dialog-centered (its own slide and fade). */
.nn-modal-layer { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: var(--nn-z-modal); pointer-events: none; }
.nn-modal-layer > .nn-modal { pointer-events: auto; }
.nn-modal-layer[hidden] { display: none; }
.nn-modal { width: min(var(--nn-modal-w), calc(100vw - 32px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column; background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius-lg); box-shadow: var(--nn-shadow-4); overflow: hidden; z-index: var(--nn-z-modal); animation: nn-modal-in var(--nn-dur-3) var(--nn-ease); }
.nn-modal--sm { width: min(var(--nn-modal-w-sm), calc(100vw - 32px)); }
.nn-modal--lg { width: min(var(--nn-modal-w-lg), calc(100vw - 32px)); }
.nn-modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 0; }
.nn-modal__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--nn-brand-soft); color: var(--nn-brand); font-size: 20px; }
.nn-modal__icon.is-crit { background: var(--nn-crit-soft); color: var(--nn-crit); }
.nn-modal__title { font: 600 18px/24px var(--nn-font-display); color: var(--nn-title); margin: 0; }
.nn-modal__desc { font-size: var(--nn-fs-sm); color: var(--nn-ink-2); margin-top: 4px; }
.nn-modal__close { margin-left: auto; }
.nn-modal__body { padding: 16px 20px 20px; overflow-y: auto; font-size: var(--nn-fs-sm); }
.nn-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--nn-line-2); background: var(--nn-surface-2); }
@keyframes nn-modal-in { from { opacity: 0; scale: .97; } }

/* Close button shared by modal, drawer, popover */
.nn-close { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--nn-radius-xs); background: transparent; color: var(--nn-ink-3); cursor: pointer; flex: none; }
.nn-close:hover { background: var(--nn-surface-3); color: var(--nn-ink); }

/* Drawer: detail of a row, quick edit. Fixed head and foot, body scrolls on its own */
.nn-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--nn-drawer-w), 100vw); height: 100dvh; display: flex; flex-direction: column; background: var(--nn-surface); border-left: 1px solid var(--nn-line); box-shadow: var(--nn-shadow-4); z-index: var(--nn-z-drawer); animation: nn-drawer-in var(--nn-dur-3) var(--nn-ease); }
.nn-drawer--lg { width: min(var(--nn-drawer-w-lg), 100vw); }
.nn-drawer__head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--nn-line); }
.nn-drawer__heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nn-drawer__title { font: 600 20px/26px var(--nn-font-display); color: var(--nn-title); margin: 0; letter-spacing: var(--nn-tracking-title); }
.nn-drawer__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.nn-drawer__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 24px; }
.nn-drawer__foot { flex: none; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--nn-line); background: var(--nn-surface); }
.nn-drawer__section { padding-top: 22px; }
.nn-drawer__section + .nn-drawer__section { margin-top: 2px; }
.nn-drawer__section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nn-drawer__section-title { font: 600 var(--nn-fs-h3)/var(--nn-lh-h3) var(--nn-font-display); color: var(--nn-title); margin: 0; }
.nn-drawer__section p { margin: 0 0 8px; font-size: var(--nn-fs-sm); line-height: 21px; color: var(--nn-ink-2); }
.nn-drawer__section p:last-child { margin-bottom: 0; }
@keyframes nn-drawer-in { from { transform: translateX(24px); opacity: 0; } }

/* ==========================================================================
   Containers: card, KPI, stat tile, key/value, evidence, list, accordion, timeline
   ========================================================================== */
.nn-card { background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); box-shadow: var(--nn-shadow-1); min-width: 0; }
.nn-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px var(--nn-card-pad); border-bottom: 1px solid var(--nn-line-2); }
.nn-card__title { font: 600 var(--nn-fs-h3)/var(--nn-lh-h3) var(--nn-font-display); color: var(--nn-title); margin: 0; display: flex; align-items: baseline; gap: 10px; }
.nn-card__count { font: 500 var(--nn-fs-sm)/1 var(--nn-font-sans); color: var(--nn-ink-3); }
.nn-card__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nn-card__body { padding: var(--nn-card-pad); }
/* Hint under a card title, inside the padded body: title, then the hint with its own space, then the content */
.nn-card__desc { font-size: var(--nn-fs-xs); line-height: 17px; color: var(--nn-ink-3); margin: 2px 0 12px; }
.nn-card__head + .nn-card__body > .nn-card__desc:first-child { margin-top: 0; }
.nn-card__foot { display: flex; align-items: center; gap: 10px; padding: 12px var(--nn-card-pad); border-top: 1px solid var(--nn-line-2); background: var(--nn-surface-2); border-radius: 0 0 var(--nn-radius) var(--nn-radius); font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-card--flush > .nn-card__body { padding: 0; }
.nn-card--link { display: block; text-decoration: none; color: inherit; transition: border-color var(--nn-dur-1), box-shadow var(--nn-dur-1), transform var(--nn-dur-1); }
.nn-card--link:hover { border-color: var(--nn-line-strong); box-shadow: var(--nn-shadow-2); }
.nn-card--accent { border-top: 3px solid var(--nn-brand); }

/* KPI strip: cards that are also filters (list screens). Tone only when the value needs attention */
.nn-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); overflow: hidden; }
.nn-kpi { --t: var(--nn-ink); position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border: 0; background: transparent; text-align: left; color: inherit; text-decoration: none; font: inherit; }
.nn-kpi + .nn-kpi { box-shadow: inset 1px 0 0 var(--nn-line-2); }
button.nn-kpi, a.nn-kpi { cursor: pointer; transition: background var(--nn-dur-1); }
button.nn-kpi:hover, a.nn-kpi:hover { background: var(--nn-surface-2); }
.nn-kpi.is-active { background: var(--nn-surface-2); }
.nn-kpi.is-active::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; background: var(--nn-brand); border-radius: 2px 2px 0 0; }
.nn-kpi__value { font: 800 var(--nn-fs-kpi)/var(--nn-lh-kpi) var(--nn-font-sans); letter-spacing: -.02em; color: var(--t); font-variant-numeric: tabular-nums; }
.nn-kpi__label { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-kpi__meta { display: flex; align-items: center; gap: 8px; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-kpi.is-crit { --t: var(--nn-crit); }
.nn-kpi.is-high { --t: var(--nn-high); }
.nn-kpi.is-med { --t: var(--nn-med); }
.nn-kpi.is-ok { --t: var(--nn-ok); }
.nn-kpi.is-brand { --t: var(--nn-brand); }

/* Stat tile: dashboard figure with label, value, context and a mini visual */
.nn-stat { display: flex; flex-direction: column; gap: 8px; padding: 18px var(--nn-card-pad); background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); min-width: 0; }
.nn-stat__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nn-stat__value { display: flex; align-items: baseline; gap: 10px; }
.nn-stat__value .nn-kpi-value { font-size: 34px; line-height: 38px; }
.nn-stat__text { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); line-height: var(--nn-lh-xs); }
.nn-stat__foot { margin-top: auto; padding-top: 8px; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }

/* Key / value (record view, evidence). Label and value share one baseline: never a vertical offset */
.nn-kv { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); column-gap: 0; margin: 0; font-size: var(--nn-fs-sm); }
.nn-kv > dt { padding-right: 20px !important; }
.nn-kv--nested { font-size: inherit; }
.nn-kv--nested > dt, .nn-kv--nested > dd { padding: 4px 0; border: 0; }
.nn-kv > dt, .nn-kv > dd { margin: 0; padding: 9px 0; line-height: 20px; border-bottom: 1px solid var(--nn-line-2); align-self: stretch; }
.nn-kv > dt { color: var(--nn-ink-3); font-weight: 500; }
.nn-kv > dd { color: var(--nn-ink); overflow-wrap: anywhere; display: flex; align-items: flex-start; gap: 8px; }
.nn-kv > dt:last-of-type, .nn-kv > dd:last-of-type { border-bottom: 0; }
.nn-kv .nn-mono { font-size: 12.5px; line-height: 20px; }
.nn-kv--2col { grid-template-columns: minmax(110px, auto) minmax(0, 1fr) minmax(110px, auto) minmax(0, 1fr); }
@media (max-width: 767px) { .nn-kv, .nn-kv--2col { grid-template-columns: minmax(0, 1fr); } .nn-kv > dt { padding-bottom: 0; border: 0; } }

/* Evidence box: original data shown as label / value, with copy and download.
   Several samples are separated by a labelled divider, never by an empty row. */
.nn-evidence { border: 1px solid var(--nn-line); border-radius: var(--nn-radius-sm); background: var(--nn-surface); overflow: hidden; }
.nn-evidence__group { padding: 4px 14px; }
.nn-evidence__group + .nn-evidence__group { border-top: 1px solid var(--nn-line); }
.nn-evidence__group-title { display: flex; align-items: center; gap: 8px; padding: 10px 0 2px; font: 600 var(--nn-fs-label)/var(--nn-lh-label) var(--nn-font-sans); letter-spacing: var(--nn-tracking-label); text-transform: uppercase; color: var(--nn-ink-3); }
/* Identifiers (URL, IP, hash, plugin) in mono with .nn-mono on the value. Prose stays in Inter. */
.nn-evidence .nn-kv > dd.nn-mono { font-size: 12.5px; }
.nn-evidence__more { display: block; width: 100%; padding: 9px; border: 0; border-top: 1px solid var(--nn-line-2); background: var(--nn-surface-2); font: 600 var(--nn-fs-xs)/1 var(--nn-font-sans); color: var(--nn-link); cursor: pointer; }
.nn-code { margin: 0; padding: 12px 14px; max-height: 360px; overflow: auto; border-radius: var(--nn-radius-sm); background: var(--nn-surface-2); border: 1px solid var(--nn-line); font: 12px/19px var(--nn-font-mono); color: var(--nn-ink); white-space: pre; tab-size: 2; }

/* List: bordered list with its own filter (affected assets, techniques) */
.nn-list { border: 1px solid var(--nn-line); border-radius: var(--nn-radius-sm); background: var(--nn-surface); overflow: hidden; }
.nn-list__filter { padding: 8px; border-bottom: 1px solid var(--nn-line-2); background: var(--nn-surface-2); }
.nn-list__item { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 9px 14px; font-size: var(--nn-fs-sm); color: var(--nn-ink); text-decoration: none; }
.nn-list__item + .nn-list__item { border-top: 1px solid var(--nn-line-2); }
a.nn-list__item:hover, button.nn-list__item:hover { background: var(--nn-surface-2); }
.nn-list__key { flex: none; width: 70px; font-family: var(--nn-font-mono); font-size: 12px; color: var(--nn-ink-2); }
.nn-list__meta { margin-left: auto; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
/* Inside a card body: no border or radius of its own (never a rounded box inside a card), rows split by a line */
.nn-list--flush { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.nn-list--flush > .nn-list__item { padding-left: 0; padding-right: 0; align-items: flex-start; }
.nn-list--flush > .nn-list__item:first-child { padding-top: 2px; }
.nn-list--flush > .nn-list__item:last-child { padding-bottom: 0; }

/* Collapsible row (detail pages: one compact line per concept that opens in place) */
.nn-disclosure { border: 1px solid var(--nn-line); border-radius: var(--nn-radius-sm); background: var(--nn-surface); }
.nn-disclosure + .nn-disclosure { margin-top: 8px; }
.nn-disclosure > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: var(--nn-fs-sm); font-weight: 600; color: var(--nn-ink); }
.nn-disclosure > summary::-webkit-details-marker { display: none; }
.nn-disclosure > summary::before { content: ''; flex: none; width: 14px; height: 14px; background: var(--nn-ink-3); -webkit-mask: var(--nn-icon-chevron-right) center / contain no-repeat; mask: var(--nn-icon-chevron-right) center / contain no-repeat; transition: transform var(--nn-dur-2) var(--nn-ease); }
.nn-disclosure[open] > summary::before { transform: rotate(90deg); }
.nn-disclosure[open] > summary { border-bottom: 1px solid var(--nn-line-2); }
.nn-disclosure__body { padding: 14px; }

/* Timeline / activity */
.nn-timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 22px; }
.nn-timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1.5px; background: var(--nn-line); }
.nn-timeline__item { position: relative; font-size: var(--nn-fs-sm); }
.nn-timeline__item::before { content: ''; position: absolute; left: -21px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--nn-surface); border: 2px solid var(--t, var(--nn-line-strong)); }
.nn-timeline__item.is-brand { --t: var(--nn-brand); }
.nn-timeline__item.is-ok { --t: var(--nn-ok); }
.nn-timeline__item.is-crit { --t: var(--nn-crit); }
.nn-timeline__time { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-timeline__text { color: var(--nn-ink); }

/* Next move: prioritised action card (Command Center, action plan) */
.nn-move { --t: var(--nn-crit); display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); position: relative; transition: border-color var(--nn-dur-1), box-shadow var(--nn-dur-1); }
.nn-move:hover { border-color: var(--nn-line-strong); box-shadow: var(--nn-shadow-2); }
.nn-move__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nn-move__sev { display: inline-flex; align-items: center; gap: 6px; font: 700 10.5px/1 var(--nn-font-sans); letter-spacing: var(--nn-tracking-label); text-transform: uppercase; color: var(--t); }
.nn-move__sev::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--t); }
.nn-move__title { font: 700 var(--nn-fs-body)/20px var(--nn-font-sans); color: var(--nn-ink); margin: 0; }
.nn-move__text { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); line-height: var(--nn-lh-xs); }
.nn-move__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.nn-move.is-high { --t: var(--nn-high); }
.nn-move.is-med { --t: var(--nn-med); }

/* NNEAT AI card: a question or a suggestion from the product AI */
.nn-ai { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--nn-brand-line); border-radius: var(--nn-radius); background: linear-gradient(180deg, var(--nn-brand-soft), var(--nn-surface) 85%); }
.nn-ai__mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--nn-surface); border: 1px solid var(--nn-brand-line); color: var(--nn-brand); font-size: 18px; }
.nn-ai__eyebrow { font: 700 10.5px/1 var(--nn-font-sans); letter-spacing: var(--nn-tracking-label); text-transform: uppercase; color: var(--nn-brand-ink); }
.nn-ai__title { font-weight: 700; font-size: var(--nn-fs-body); color: var(--nn-ink); margin: 6px 0 2px; }
.nn-ai__text { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-ai__actions { display: flex; gap: 6px; margin-top: 10px; }

/* Module tile: entry point to a module with its headline figure */
.nn-modtile { --m: var(--nn-mod-surface); display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); text-decoration: none; color: inherit; transition: border-color var(--nn-dur-1), box-shadow var(--nn-dur-1); }
.nn-modtile:hover { border-color: var(--nn-line-strong); box-shadow: var(--nn-shadow-2); }
.nn-modtile__head { display: flex; align-items: center; gap: 10px; }
.nn-modtile__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--m) 12%, var(--nn-surface)); color: var(--m); font-size: 17px; }
.nn-modtile__name { font-weight: 700; font-size: var(--nn-fs-sm); color: var(--nn-ink); }
.nn-modtile__sub { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-modtile__value { display: flex; align-items: baseline; gap: 8px; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-modtile__value b { font: 800 24px/1 var(--nn-font-sans); color: var(--nn-ink); font-variant-numeric: tabular-nums; }

/* Avatar */
.nn-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--nn-surface-3); color: var(--nn-ink-2); font: 700 11px/1 var(--nn-font-sans); flex: none; overflow: hidden; }
.nn-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nn-avatar--sq { border-radius: 8px; }
.nn-avatar--lg { width: 40px; height: 40px; font-size: 14px; }
/* ==========================================================================
   NNEAT Design System 1.0 · 04 Data: tables and grids, toolbars, cells, charts, matrices
   DataGrid 7 and ArrayGrid 2 render this anatomy (lib/nn_grid): toolbar, table, footer.
   ========================================================================== */

/* ---------- List card: header (title, count, summary) + toolbar + table + footer ---------- */
.nn-listcard { background: var(--nn-surface); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); box-shadow: var(--nn-shadow-1); min-width: 0; }
.nn-listcard__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; padding: 16px var(--nn-card-pad) 14px; border-bottom: 1px solid var(--nn-line-2); }
.nn-listcard__head .nn-summary { margin-left: auto; align-self: center; }
.nn-listcard__strip { display: flex; align-items: center; gap: 10px; padding: 10px var(--nn-card-pad); background: var(--nn-brand-soft); border-bottom: 1px solid var(--nn-brand-line); font-size: var(--nn-fs-sm); color: var(--nn-ink); }
.nn-listcard__strip .nn-i { color: var(--nn-brand); font-size: 16px; }

/* ---------- Toolbar ---------- */
.nn-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px var(--nn-card-pad); border-bottom: 1px solid var(--nn-line-2); }
.nn-toolbar__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.nn-toolbar__end { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nn-toolbar__clear { border: 0; background: none; color: var(--nn-link); font: 500 var(--nn-fs-xs)/1 var(--nn-font-sans); cursor: pointer; padding: 6px; }
.nn-filter-btn.is-on { --b-bg: var(--nn-brand-soft); --b-line: var(--nn-brand-line); --b-ink: var(--nn-brand-ink); }

/* Bulk bar replaces the toolbar while rows are selected */
.nn-bulkbar { display: flex; align-items: center; gap: 10px; padding: 9px var(--nn-card-pad); background: var(--nn-maroon-900); color: #fff; font-size: var(--nn-fs-sm); }
.nn-bulkbar b { font-variant-numeric: tabular-nums; }
.nn-bulkbar .nn-btn { --b-bg: rgba(255, 255, 255, .08); --b-line: rgba(255, 255, 255, .16); --b-ink: #fff; --b-bg-hover: rgba(255, 255, 255, .16); --b-line-hover: rgba(255, 255, 255, .24); }
.nn-bulkbar .nn-btn.is-danger:hover { --b-bg-hover: var(--nn-crit); --b-line-hover: var(--nn-crit); }

/* ---------- Table ---------- */
.nn-table-wrap { overflow-x: auto; }
.nn-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--nn-fs-sm); color: var(--nn-ink); font-variant-numeric: tabular-nums; }
.nn-table th { position: sticky; top: 0; z-index: 1; height: 38px; padding: 0 12px; background: var(--nn-surface-2); border-bottom: 1px solid var(--nn-line); text-align: left; font: 600 var(--nn-fs-label)/1.2 var(--nn-font-sans); letter-spacing: var(--nn-tracking-label); text-transform: uppercase; color: var(--nn-ink-3); white-space: nowrap; }
.nn-table th:first-child, .nn-table td:first-child { padding-left: var(--nn-card-pad); }
.nn-table th:last-child, .nn-table td:last-child { padding-right: var(--nn-card-pad); }
.nn-table th.is-sortable { cursor: pointer; }
.nn-table th.is-sortable:hover { color: var(--nn-ink); }
.nn-table th .nn-sort { display: inline-block; width: 10px; height: 10px; margin-left: 4px; vertical-align: -1px; background: var(--nn-ink-4); -webkit-mask: var(--nn-icon-selector) center / contain no-repeat; mask: var(--nn-icon-selector) center / contain no-repeat; }
.nn-table th[aria-sort="ascending"], .nn-table th[aria-sort="descending"] { color: var(--nn-ink); }
.nn-table th[aria-sort="ascending"] .nn-sort { background: var(--nn-brand); -webkit-mask-image: var(--nn-icon-chevron-up); mask-image: var(--nn-icon-chevron-up); }
.nn-table th[aria-sort="descending"] .nn-sort { background: var(--nn-brand); -webkit-mask-image: var(--nn-icon-chevron-down); mask-image: var(--nn-icon-chevron-down); }
.nn-table td { height: var(--nn-row-h); padding: 10px 12px; border-bottom: 1px solid var(--nn-line-2); vertical-align: middle; }
.nn-table tbody tr { transition: background var(--nn-dur-1); }
.nn-table tbody tr:hover { background: var(--nn-surface-2); }
.nn-table tbody tr.is-selected { background: var(--nn-brand-soft); }
.nn-table tbody tr:last-child td { border-bottom: 0; }
.nn-table .is-num { text-align: right; }
.nn-table .is-check { width: 44px; }
.nn-table .is-actions { width: 1%; white-space: nowrap; text-align: right; }
.nn-table .is-actions > .nn-row-actions { justify-content: flex-end; }
.nn-table--compact td { height: var(--nn-row-h-compact); padding-top: 6px; padding-bottom: 6px; }
.nn-table--plain th { background: transparent; }
.nn-row-actions { display: inline-flex; align-items: center; gap: 2px; }
/* Cells */
.nn-cell-title { font-weight: 600; color: var(--nn-ink); text-decoration: none; display: block; }
a.nn-cell-title:hover { color: var(--nn-brand); }
.nn-cell-sub { display: block; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); margin-top: 2px; }
.nn-cell-desc { display: block; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); margin-top: 4px; max-width: 64ch; }
.nn-cell-mono { font-family: var(--nn-font-mono); font-size: 12.5px; color: var(--nn-ink); }
.nn-cell-muted { color: var(--nn-ink-3); }
.nn-cell-empty { color: var(--nn-ink-4); }
.nn-cell-user { display: flex; align-items: center; gap: 10px; }
.nn-cell-date { white-space: nowrap; color: var(--nn-ink-2); }

/* Footer: count, page size, pager */
.nn-tablefoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px var(--nn-card-pad); border-top: 1px solid var(--nn-line); font-size: var(--nn-fs-sm); color: var(--nn-ink-2); }
.nn-tablefoot__size { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Status chip with menu (status changes in place) */
.nn-statusmenu { --t: var(--nn-info); --t-soft: var(--nn-info-soft); --t-ink: var(--nn-info-ink); display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px 0 8px; border: 0; border-radius: var(--nn-radius-xs); background: var(--t-soft); color: var(--t-ink); font: 600 11.5px/1 var(--nn-font-sans); cursor: pointer; }
.nn-statusmenu::after { content: ''; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--nn-icon-chevron-down) center / contain no-repeat; mask: var(--nn-icon-chevron-down) center / contain no-repeat; opacity: .7; }
.nn-statusmenu.is-crit { --t-soft: var(--nn-crit-soft); --t-ink: var(--nn-crit-ink); }
.nn-statusmenu.is-ok { --t-soft: var(--nn-ok-soft); --t-ink: var(--nn-ok-ink); }
.nn-statusmenu.is-low { --t-soft: var(--nn-low-soft); --t-ink: var(--nn-low-ink); }

/* ---------- Charts: chrome shared by ApexCharts, D3 and ECharts ---------- */
.nn-chart { position: relative; min-height: 220px; }
.nn-chart__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.nn-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-legend__item { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.nn-legend__item::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--nn-viz-1)); }
.nn-legend__item.is-line::before { height: 2px; border-radius: 1px; }
.nn-legend__item.is-off { opacity: .45; }
.nn-chart-tip { min-width: 160px; padding: 10px 12px; border-radius: var(--nn-radius-sm); background: var(--nn-surface); border: 1px solid var(--nn-line); box-shadow: var(--nn-shadow-3); font-size: var(--nn-fs-xs); color: var(--nn-ink); }
.nn-chart-tip__title { font-weight: 700; margin-bottom: 6px; }
.nn-chart-tip__row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.nn-chart-tip__row::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.nn-chart-tip__row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.nn-chart-empty { position: absolute; inset: 0; display: grid; place-items: center; }

/* Sparkline container (svg inside uses currentColor) */
.nn-spark { display: block; width: 100%; height: 36px; color: var(--nn-brand); }

/* Ring / gauge for a percentage */
.nn-ring { --v: 66; --t: var(--nn-brand); position: relative; width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--t) calc(var(--v) * 1%), var(--nn-line-2) 0); display: grid; place-items: center; flex: none; }
.nn-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--nn-surface); }
.nn-ring > span { position: relative; font: 800 16px/1 var(--nn-font-sans); color: var(--nn-ink); font-variant-numeric: tabular-nums; }

/* Coverage hatch: partial or declared coverage (Command Center optimum coverage) */
.nn-hatch { background-image: repeating-linear-gradient(-45deg, var(--nn-ok) 0 3px, transparent 3px 6px); }

/* ---------- Matrix (MITRE ATT&CK, compliance controls) ---------- */
.nn-matrix { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(130px, 1fr); gap: 4px; overflow-x: auto; }
.nn-matrix__col { display: flex; flex-direction: column; gap: 3px; }
.nn-matrix__head { padding: 8px; border-radius: var(--nn-radius-xs); background: var(--nn-maroon-900); color: #fff; font: 600 11px/1.3 var(--nn-font-sans); }
.nn-matrix__head small { display: block; font-weight: 400; color: rgba(255, 255, 255, .6); }
.nn-matrix__cell { --t: var(--nn-surface-2); padding: 6px 8px; border-radius: 5px; background: var(--t); border: 1px solid var(--nn-line-2); font-size: 11px; line-height: 14px; color: var(--nn-ink); cursor: pointer; }
.nn-matrix__cell:hover { border-color: var(--nn-ink-3); }
.nn-matrix__cell.is-protected { --t: var(--nn-ok-soft); border-color: var(--nn-ok-line); }
.nn-matrix__cell.is-detected { --t: var(--nn-low-soft); border-color: var(--nn-low-line); }
.nn-matrix__cell.is-partial { --t: var(--nn-med-soft); border-color: var(--nn-med-line); }
.nn-matrix__cell.is-exposed { --t: var(--nn-crit-soft); border-color: var(--nn-crit-line); }
.nn-matrix__cell.is-na { opacity: .45; }
/* Heat scale (sequential orange) */
.nn-heat[data-q="0"] { background: var(--nn-viz-seq-0); }
.nn-heat[data-q="1"] { background: var(--nn-viz-seq-1); }
.nn-heat[data-q="2"] { background: var(--nn-viz-seq-2); }
.nn-heat[data-q="3"] { background: var(--nn-viz-seq-3); color: #fff; }
.nn-heat[data-q="4"] { background: var(--nn-viz-seq-4); color: #fff; }
.nn-heat[data-q="5"] { background: var(--nn-viz-seq-5); color: #fff; }
/* ==========================================================================
   NNEAT Design System 1.0 · 05 Ops: cockpits, live views, maps
   Every component of 03 and 04 works here with [data-nn-theme="ops"].
   This file only adds what is specific to full-screen cockpits:
   the frame, floating panels, the status bar, map controls, the live feed and the timeline scrubber.
   Rules: Inter for the interface, Montagu Slab for titles, mono only for telemetry values
   (IP, hash, time, counters that tick). Orange is the live accent. No slate blues.
   ========================================================================== */

.nn-ops { position: relative; min-height: 100vh; display: grid; grid-template-columns: var(--ops-left, 340px) minmax(0, 1fr) var(--ops-right, 400px); grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px; background: var(--nn-stage-vignette), var(--nn-stage); color: var(--nn-ink); font-family: var(--nn-font-sans); }
.nn-ops__brand { grid-column: 1; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: var(--nn-radius); background: var(--nn-surface); border: 1px solid var(--nn-line); }
.nn-ops__brand img { height: 18px; }
.nn-ops__brand-name { padding-left: 12px; border-left: 1px solid var(--nn-line-strong); font: 600 14px/1 var(--nn-font-display); color: var(--nn-title); }
.nn-ops__top { grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.nn-ops__left { grid-column: 1; grid-row: 2; min-height: 0; }
.nn-ops__stage { grid-column: 2; grid-row: 2; position: relative; min-height: 0; border-radius: var(--nn-radius); overflow: hidden; }
.nn-ops__right { grid-column: 3; grid-row: 2; min-height: 0; }
.nn-ops__bar { grid-column: 1 / -1; grid-row: 3; }
@media (max-width: 1279px) { .nn-ops { --ops-left: 300px; --ops-right: 340px; } }
@media (max-width: 1023px) { .nn-ops { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; } .nn-ops > * { grid-column: 1 !important; grid-row: auto !important; } .nn-ops__stage { min-height: 60vh; } }

/* Floating panel */
.nn-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; background: color-mix(in srgb, var(--nn-surface) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--nn-line); border-radius: var(--nn-radius); box-shadow: var(--nn-shadow-2); overflow: hidden; }
.nn-panel__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--nn-line); }
.nn-panel__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--nn-brand-soft); color: var(--nn-brand-ink); font-size: 17px; flex: none; }
.nn-panel__title { font: 600 15px/20px var(--nn-font-display); color: var(--nn-title); margin: 0; }
.nn-panel__sub { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-panel__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.nn-panel__section { padding: 14px 16px; }
.nn-panel__section + .nn-panel__section { border-top: 1px solid var(--nn-line-2); }
.nn-panel__section > .nn-label { display: block; margin-bottom: 10px; }
.nn-panel__foot { flex: none; padding: 12px 16px; border-top: 1px solid var(--nn-line); }

/* Status bar: live state, last update, connection */
.nn-statusbar { display: flex; align-items: center; gap: 18px; height: 30px; padding: 0 14px; border-radius: var(--nn-radius-sm); background: var(--nn-surface); border: 1px solid var(--nn-line); font-size: 11.5px; color: var(--nn-ink-3); }
.nn-statusbar__live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--nn-brand-ink); }
.nn-statusbar__live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--nn-live, var(--nn-brand)); box-shadow: 0 0 0 0 rgba(227, 86, 26, .6); animation: nn-live 1.8s ease-out infinite; }
.nn-statusbar__item { display: inline-flex; align-items: center; gap: 6px; }
.nn-statusbar__item b { color: var(--nn-ink); font-weight: 600; font-family: var(--nn-font-mono); font-size: 11px; }
@keyframes nn-live { 0% { box-shadow: 0 0 0 0 rgba(227, 86, 26, .55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(227, 86, 26, 0); } }

/* Map controls: vertical stack of icon buttons over the stage */
.nn-mapctl { position: absolute; right: 14px; bottom: 70px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.nn-mapctl__btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--nn-radius-sm); border: 1px solid var(--nn-line); background: color-mix(in srgb, var(--nn-surface) 92%, transparent); color: var(--nn-ink-2); font-size: 18px; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: color var(--nn-dur-1), border-color var(--nn-dur-1); }
.nn-mapctl__btn:hover { color: var(--nn-brand-ink); border-color: var(--nn-brand-line); }
.nn-mapctl__btn.is-active { color: #fff; background: var(--nn-brand); border-color: var(--nn-brand); }
.nn-mapctl__group { display: flex; flex-direction: column; border-radius: var(--nn-radius-sm); overflow: hidden; border: 1px solid var(--nn-line); }
.nn-mapctl__group .nn-mapctl__btn { border: 0; border-radius: 0; }
.nn-mapctl__group .nn-mapctl__btn + .nn-mapctl__btn { border-top: 1px solid var(--nn-line); }

/* Map legend */
.nn-maplegend { position: absolute; left: 14px; bottom: 70px; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--nn-radius-sm); background: color-mix(in srgb, var(--nn-surface) 90%, transparent); border: 1px solid var(--nn-line); font-size: 11.5px; color: var(--nn-ink-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Live feed: newest first, mono time, severity dot */
.nn-feed { display: flex; flex-direction: column; }
.nn-feed__item { --t: var(--nn-info); display: grid; grid-template-columns: 58px 10px minmax(0, 1fr); align-items: start; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--nn-line-2); font-size: var(--nn-fs-xs); line-height: 17px; color: var(--nn-ink-2); }
.nn-feed__item.is-new { animation: nn-feed-in 600ms var(--nn-ease); }
.nn-feed__time { font-family: var(--nn-font-mono); font-size: 11px; color: var(--nn-ink-3); }
.nn-feed__dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--t); }
.nn-feed__title { color: var(--nn-ink); font-weight: 600; }
.nn-feed__item.is-crit { --t: var(--nn-crit); }
.nn-feed__item.is-high { --t: var(--nn-high); }
.nn-feed__item.is-med { --t: var(--nn-med); }
.nn-feed__item.is-low { --t: var(--nn-low); }
.nn-feed__item.is-ok { --t: var(--nn-ok); }
@keyframes nn-feed-in { from { background: var(--nn-brand-soft); } to { background: transparent; } }

/* Timeline scrubber at the bottom of the stage */
.nn-scrub { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; border-radius: var(--nn-radius-sm); background: color-mix(in srgb, var(--nn-surface) 92%, transparent); border: 1px solid var(--nn-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 11.5px; color: var(--nn-ink-3); }
.nn-scrub__play { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--nn-line-strong); background: transparent; color: var(--nn-ink); cursor: pointer; }
.nn-scrub .nn-range { flex: 1; }
.nn-scrub__now { font-weight: 600; color: var(--nn-brand-ink); white-space: nowrap; }

/* Telemetry counter: big mono number that ticks */
.nn-telemetry { display: flex; flex-direction: column; gap: 2px; }
.nn-telemetry__value { font: 600 22px/1.1 var(--nn-font-mono); color: var(--nn-ink); font-variant-numeric: tabular-nums; }
.nn-telemetry__label { font-size: 11px; color: var(--nn-ink-3); }

/* Node marks on maps and graphs: shape per kind, colour per state */
.nn-node { --t: var(--nn-brand); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--t) 18%, var(--nn-surface)); border: 1.5px solid var(--t); color: var(--t); font-size: 13px; }
.nn-node.is-threat { border-radius: 6px; transform: rotate(45deg); }
.nn-node.is-threat > * { transform: rotate(-45deg); }
.nn-node.is-asset { border-radius: 8px; }
.nn-node.is-live { box-shadow: var(--nn-glow); }
.nn-node.is-crit { --t: var(--nn-crit); }
.nn-node.is-ok { --t: var(--nn-ok); }
.nn-node.is-low { --t: var(--nn-low); }

/* Stage background for maps and graphs: faint grid of the brand dots */
.nn-stage-bg { background-color: var(--nn-bg); background-image: radial-gradient(var(--nn-map-grid, rgba(255, 255, 255, .04)) 1px, transparent 1.2px); background-size: 14px 14px; }

/* ==========================================================================
   Killer views: the widgets of the five dark cockpits
   (Security Posture Explorer, Live, Endpoint Live, Embedded Live, Mission Paths).
   One widget per job, the same in every cockpit. Screens only place them.
   ========================================================================== */

/* --- Frame ------------------------------------------------------------- */
.nn-ops__brand-ctx { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--nn-radius-pill); background: var(--nn-surface-3); color: var(--nn-ink-2); font: 600 11.5px/1 var(--nn-font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nn-ops--no-right { grid-template-columns: var(--ops-left, 340px) minmax(0, 1fr); }
.nn-ops--no-right .nn-ops__top { grid-column: 2 / 3; }
.nn-ops__handle { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 20px; height: 44px; margin-top: -22px; border: 1px solid var(--nn-line); background: var(--nn-glass); color: var(--nn-ink-3); cursor: pointer; transition: color var(--nn-dur-1); }
.nn-ops__handle:hover { color: var(--nn-ink); }
.nn-ops__handle.is-left { left: 0; border-left: 0; border-radius: 0 var(--nn-radius-sm) var(--nn-radius-sm) 0; }
.nn-ops__handle.is-right { right: 0; border-right: 0; border-radius: var(--nn-radius-sm) 0 0 var(--nn-radius-sm); }
.nn-ops__handle:focus-visible { outline: none; box-shadow: var(--nn-focus); }

/* Top bar of the stage: search, "Agrupar por", "Color por", then icon actions. Every group has a visible label. */
.nn-opsbar { display: flex; align-items: center; gap: 10px; min-width: 0; height: 46px; padding: 0 8px 0 10px; border-radius: var(--nn-radius); background: var(--nn-surface); border: 1px solid var(--nn-line); }
.nn-opsbar { container-type: inline-size; }
.nn-opsbar .nn-search { width: 260px; flex: 0 1 260px; min-width: 150px; }
.nn-opsbar__group { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.nn-opsbar__label { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); white-space: nowrap; }
.nn-opsbar__sep { width: 1px; height: 22px; background: var(--nn-line); flex: none; }
.nn-opsbar__actions { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
/* Narrow bars keep the controls and drop the group labels (the controls keep their aria-label) */
@container (max-width: 1000px) { .nn-opsbar__label { display: none; } .nn-opsbar .nn-search { flex-basis: 180px; } }
@container (max-width: 820px) { .nn-opsbar .nn-seg__item { padding-left: 8px; padding-right: 8px; } }
.nn-iconbtn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--nn-radius-sm); background: transparent; color: var(--nn-ink-2); font-size: 18px; cursor: pointer; transition: background var(--nn-dur-1), color var(--nn-dur-1); }
.nn-iconbtn:hover { background: var(--nn-surface-3); color: var(--nn-ink); }
.nn-iconbtn.is-active, .nn-iconbtn[aria-pressed="true"] { background: var(--nn-brand-soft); color: var(--nn-brand-ink); }
.nn-iconbtn:focus-visible { outline: none; box-shadow: var(--nn-focus); }

/* --- Panel additions ---------------------------------------------------- */
.nn-panel__tabs { flex: none; padding: 0 16px; }
.nn-panel__tabs .nn-tabs { gap: 14px; }
.nn-panel__tabs .nn-tabs__item { font-size: 13px; }
.nn-panel__section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.nn-panel__section-head .nn-label { margin: 0; }
.nn-panel__section-head > :last-child:not(.nn-label) { margin-left: auto; }
.nn-panel__hint { margin: 0 0 10px; font-size: var(--nn-fs-xs); line-height: 17px; color: var(--nn-ink-3); }
.nn-panel__foot.is-links { display: flex; flex-wrap: wrap; gap: 6px; }

/* Selected object at the top of the detail panel: endpoint, asset, location, step */
.nn-hero { --t: var(--nn-line-strong); position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding: 14px 16px 14px 19px; border-bottom: 1px solid var(--nn-line); }
.nn-hero::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--t); }
.nn-hero__icon { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--nn-surface-3); color: var(--nn-ink-2); font-size: 20px; }
.nn-hero__eyebrow { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-hero__title { margin: 0; font: 600 17px/22px var(--nn-font-display); color: var(--nn-title); overflow-wrap: anywhere; }
.nn-hero__meta { grid-column: 2; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); line-height: 18px; }
.nn-hero__badges { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nn-hero.is-crit { --t: var(--nn-crit); } .nn-hero.is-high { --t: var(--nn-high); } .nn-hero.is-med { --t: var(--nn-med); } .nn-hero.is-ok { --t: var(--nn-ok); } .nn-hero.is-brand { --t: var(--nn-brand); }

/* --- Numbers ------------------------------------------------------------ */
/* Tiles: compact counters of the fleet or the analysis. Colour only when the number means a state and is not zero. */
.nn-tiles { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 1px; background: var(--nn-line-2); border: 1px solid var(--nn-line-2); border-radius: var(--nn-radius-sm); overflow: hidden; }
.nn-tile { --t: var(--nn-ink); display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px; border: 0; background: var(--nn-surface); text-align: left; font: inherit; color: inherit; }
button.nn-tile { cursor: pointer; transition: background var(--nn-dur-1); }
button.nn-tile:hover { background: var(--nn-surface-2); }
button.nn-tile:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--nn-brand); }
.nn-tile.is-active { background: var(--nn-surface-2); box-shadow: inset 0 -2px 0 var(--nn-brand); }
.nn-tile__value { font: 800 22px/1 var(--nn-font-sans); color: var(--t); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.nn-tile__unit { font-size: 13px; font-weight: 600; color: var(--nn-ink-3); }
.nn-tile__label { font-size: 11.5px; line-height: 14px; color: var(--nn-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-tile.is-crit { --t: var(--nn-crit-ink); } .nn-tile.is-high { --t: var(--nn-high-ink); } .nn-tile.is-med { --t: var(--nn-med-ink); } .nn-tile.is-ok { --t: var(--nn-ok-ink); }
.nn-tile.is-zero { --t: var(--nn-ink-4); }

/* Metric: one figure with its unit, a note and an optional meter or split. In pairs inside the detail panel. */
.nn-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nn-metric { --t: var(--nn-ink); display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border-radius: var(--nn-radius-sm); background: var(--nn-surface-2); border: 1px solid var(--nn-line-2); }
.nn-metric__label { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-metric__value { font: 800 28px/1 var(--nn-font-sans); color: var(--t); font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.nn-metric__unit { margin-left: 2px; font-size: 14px; font-weight: 600; color: var(--nn-ink-3); }
.nn-metric__note { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-metric.is-crit { --t: var(--nn-crit-ink); } .nn-metric.is-high { --t: var(--nn-high-ink); } .nn-metric.is-med { --t: var(--nn-med-ink); } .nn-metric.is-ok { --t: var(--nn-ok-ink); }
.nn-metric--wide { grid-column: 1 / -1; }

/* Meter: a value against its scale, with an optional threshold mark (--mark, for example the 60 % cut) */
.nn-meter { --t: var(--nn-brand); position: relative; height: 6px; border-radius: 6px; background: var(--nn-line-2); }
.nn-meter > i { position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); border-radius: inherit; background: var(--t); transition: width var(--nn-dur-4) var(--nn-ease); }
.nn-meter[style*="--mark"]::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: var(--mark); width: 2px; border-radius: 1px; background: var(--nn-ink-2); }
.nn-meter.is-crit { --t: var(--nn-crit); } .nn-meter.is-high { --t: var(--nn-high); } .nn-meter.is-med { --t: var(--nn-med); } .nn-meter.is-ok { --t: var(--nn-ok); } .nn-meter.is-low { --t: var(--nn-low); }
.nn-meter--sm { height: 4px; }

/* Detection and protection pair (Mission Paths, techniques): two meters with their figure, never "D 0/5 P 0%" */
.nn-dp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nn-dp__item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nn-dp__head { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: var(--nn-ink-3); }
.nn-dp__head b { margin-left: auto; color: var(--nn-ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Severity split: stacked bar and the legend in words ("9 críticas 33 altas"), never "Crit Alta Medi" */
.nn-sevsplit { display: flex; flex-direction: column; gap: 8px; }
.nn-sevsplit__legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-sevsplit__legend .nn-status { font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-sevsplit__legend b { color: var(--nn-ink); font-variant-numeric: tabular-nums; }

/* Distribution rows: label with its severity mark, bar and count (techniques by level, assets by type) */
.nn-dist { display: flex; flex-direction: column; gap: 9px; }
.nn-dist__row { --t: var(--nn-brand); display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); }
.nn-dist__bar { height: 6px; border-radius: 6px; background: var(--nn-line-2); overflow: hidden; }
.nn-dist__bar > i { display: block; height: 100%; width: var(--v, 0%); background: var(--t); border-radius: inherit; }
.nn-dist__count { text-align: right; font-weight: 700; color: var(--nn-ink); font-variant-numeric: tabular-nums; }
.nn-dist__row.is-crit { --t: var(--nn-crit); } .nn-dist__row.is-high { --t: var(--nn-high); } .nn-dist__row.is-med { --t: var(--nn-med); } .nn-dist__row.is-low { --t: var(--nn-low); } .nn-dist__row.is-ok { --t: var(--nn-ok); } .nn-dist__row.is-info { --t: var(--nn-ink-4); }

/* Ring sizes: xs inside list rows and node cards, sm in tiles, lg as the headline score */
.nn-ring--xs { width: 22px; height: 22px; }
.nn-ring--xs::before { inset: 3px; }
.nn-ring--xs > span { display: none; }
.nn-ring--sm { width: 34px; height: 34px; }
.nn-ring--sm::before { inset: 4px; }
.nn-ring--sm > span { font-size: 11px; }
.nn-ring--lg { width: 112px; height: 112px; }
.nn-ring--lg::before { inset: 10px; }
.nn-ring--lg > span { font-size: 28px; }
.nn-ring.is-crit { --t: var(--nn-crit); } .nn-ring.is-high { --t: var(--nn-high); } .nn-ring.is-med { --t: var(--nn-med); } .nn-ring.is-ok { --t: var(--nn-ok); } .nn-ring.is-low { --t: var(--nn-low); }

/* TADR® headline: score, grade and name. Indicator rows below, with the same grade component */
.nn-rating { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--nn-radius-sm); background: var(--nn-surface-2); border: 1px solid var(--nn-line-2); }
.nn-rating__score { font: 800 34px/1 var(--nn-font-sans); color: var(--nn-ink); font-variant-numeric: tabular-nums; }
.nn-rating__score small { font-size: 14px; font-weight: 600; color: var(--nn-ink-3); }
.nn-rating__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nn-rating__name { font: 600 15px/20px var(--nn-font-display); color: var(--nn-title); }
.nn-rating__sub { font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-rating > :last-child.nn-btn { margin-left: auto; }
.nn-indicators { display: flex; flex-direction: column; }
.nn-indicator { display: grid; grid-template-columns: 22px minmax(0, 1fr) 72px 30px; align-items: center; gap: 10px; min-height: 34px; padding: 4px 0; border-bottom: 1px solid var(--nn-line-2); font-size: var(--nn-fs-sm); color: var(--nn-ink); }
.nn-indicator:last-child { border-bottom: 0; }
.nn-indicator__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-indicator__score { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* CVSS score with its severity word */
.nn-cvss { --t: var(--nn-info); display: inline-flex; align-items: baseline; gap: 5px; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); white-space: nowrap; }
.nn-cvss b { font-size: 13px; font-weight: 800; color: var(--t); font-variant-numeric: tabular-nums; }
.nn-cvss.is-crit { --t: var(--nn-crit-ink); } .nn-cvss.is-high { --t: var(--nn-high-ink); } .nn-cvss.is-med { --t: var(--nn-med-ink); } .nn-cvss.is-low { --t: var(--nn-low-ink); }

/* --- Lists and filters -------------------------------------------------- */
/* Ops row: the one list row of every panel (locations, scenarios, techniques, CVE, detections, effects, zones) */
.nn-olist { display: flex; flex-direction: column; }
.nn-orow { --t: var(--nn-info); position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: start; gap: 2px 10px; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--nn-line-2); background: transparent; text-align: left; font: inherit; color: var(--nn-ink); }
.nn-orow--nolead { grid-template-columns: minmax(0, 1fr) auto; }
button.nn-orow, a.nn-orow { cursor: pointer; text-decoration: none; transition: background var(--nn-dur-1); }
button.nn-orow:hover, a.nn-orow:hover { background: var(--nn-surface-2); }
.nn-orow:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--nn-brand); }
.nn-orow.is-selected { background: var(--nn-surface-2); }
.nn-orow.is-selected::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--nn-brand); }
.nn-orow.is-dim { opacity: .55; }
.nn-orow__lead { display: grid; place-items: center; height: 20px; color: var(--nn-ink-3); font-size: 16px; }
.nn-orow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 18%, transparent); }
.nn-orow__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nn-orow__title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--nn-fs-sm); line-height: 20px; font-weight: 600; color: var(--nn-ink); }
.nn-orow__title > span:not(.nn-badge):not(.nn-orow__id) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-orow__id { flex: none; font: 600 12px/20px var(--nn-font-mono); color: var(--nn-ink-2); }
.nn-orow__sub { font-size: var(--nn-fs-xs); line-height: 17px; color: var(--nn-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-orow__sub.is-wrap { white-space: normal; }
.nn-orow__side { display: flex; align-items: center; gap: 8px; min-height: 20px; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); white-space: nowrap; }
.nn-orow__value { font-size: 13px; font-weight: 700; color: var(--nn-ink); font-variant-numeric: tabular-nums; }
.nn-orow__value small { font-weight: 500; color: var(--nn-ink-3); }
.nn-orow__extra { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nn-orow--nolead .nn-orow__extra { grid-column: 1 / -1; }
.nn-orow.is-crit { --t: var(--nn-crit); } .nn-orow.is-high { --t: var(--nn-high); } .nn-orow.is-med { --t: var(--nn-med); } .nn-orow.is-low { --t: var(--nn-low); } .nn-orow.is-ok { --t: var(--nn-ok); } .nn-orow.is-off { --t: var(--nn-ink-4); }
.nn-olist__more { padding: 10px 16px; }

/* Facets: filter groups of the left panel. Toggle chips with an optional state dot or icon and a count */
.nn-facet + .nn-facet { margin-top: 16px; }
.nn-facet__title { display: block; margin-bottom: 8px; }
.nn-facet__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nn-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--t, var(--nn-ink-3)); flex: none; }
.nn-chip .nn-i { font-size: 14px; color: var(--nn-ink-3); }
.nn-chip--toggle.is-active .nn-i { color: inherit; }
.nn-chip__dot.is-crit { --t: var(--nn-crit); } .nn-chip__dot.is-high { --t: var(--nn-high); } .nn-chip__dot.is-med { --t: var(--nn-med); } .nn-chip__dot.is-low { --t: var(--nn-low); } .nn-chip__dot.is-ok { --t: var(--nn-ok); } .nn-chip__dot.is-off { --t: var(--nn-ink-4); }
.nn-facet__foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }

/* Module evidence: which modules feed the view. A module without data is dashed and says why, never struck through */
.nn-modev { display: flex; flex-wrap: wrap; gap: 6px; }
.nn-modev__item { --m: var(--nn-ink-3); display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px 0 8px; border-radius: var(--nn-radius-pill); border: 1px solid var(--nn-line); background: var(--nn-surface-2); font-size: var(--nn-fs-xs); color: var(--nn-ink); white-space: nowrap; }
.nn-modev__item .nn-i { font-size: 14px; color: var(--m); }
.nn-modev__item b { font-weight: 700; font-variant-numeric: tabular-nums; }
.nn-modev__item.is-off { border-style: dashed; background: transparent; color: var(--nn-ink-3); }
.nn-modev__item.is-off .nn-i { color: var(--nn-ink-4); }
.nn-modev__item[data-mod="surface"] { --m: var(--nn-mod-surface); } .nn-modev__item[data-mod="endpoint"] { --m: var(--nn-mod-endpoint); } .nn-modev__item[data-mod="connect"] { --m: var(--nn-mod-connect); } .nn-modev__item[data-mod="embedded"] { --m: var(--nn-mod-embedded); } .nn-modev__item[data-mod="ai-audit"] { --m: var(--nn-mod-ai-audit); } .nn-modev__item[data-mod="spores"] { --m: var(--nn-mod-spores); } .nn-modev__item[data-mod="cti"] { --m: var(--nn-mod-cti); }

/* Technique pill: ATT&CK or ESTM id in mono, optional name, dot with its coverage state */
.nn-tech { --t: var(--nn-ink-4); display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 22px; padding: 0 8px 0 7px; border-radius: var(--nn-radius-2xs); border: 1px solid var(--nn-line); background: var(--nn-surface-2); font-size: 11.5px; color: var(--nn-ink-2); white-space: nowrap; }
.nn-tech::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--t); }
.nn-tech__id { font: 600 11px/1 var(--nn-font-mono); color: var(--nn-ink); }
.nn-tech__name { overflow: hidden; text-overflow: ellipsis; }
.nn-tech.is-crit { --t: var(--nn-crit); } .nn-tech.is-med { --t: var(--nn-med); } .nn-tech.is-low { --t: var(--nn-low); } .nn-tech.is-ok { --t: var(--nn-ok); }

/* Action row: something you can simulate or deploy (mitigations, data sources). Soft button, never green or uppercase */
.nn-actionrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--nn-line-2); }
.nn-actionrow__name { display: block; font-size: var(--nn-fs-sm); font-weight: 600; color: var(--nn-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-actionrow__sub { display: block; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); }
.nn-actionrow.is-done .nn-actionrow__name::after { content: ''; }

/* Active lens or filter on the stage ("Lente de amenaza: APT28") */
.nn-lens { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 10px; border-radius: var(--nn-radius-sm); border: 1px dashed var(--nn-line-strong); background: transparent; font-size: var(--nn-fs-xs); color: var(--nn-ink-3); width: 100%; text-align: left; cursor: pointer; }
.nn-lens .nn-i { font-size: 16px; color: var(--nn-ink-3); }
.nn-lens b { color: var(--nn-ink); font-weight: 600; }
.nn-lens.is-active { border-style: solid; border-color: var(--nn-brand-line); background: var(--nn-brand-soft); color: var(--nn-ink-2); }
.nn-lens.is-active .nn-i { color: var(--nn-brand-ink); }
.nn-lens .nn-close { margin-left: auto; }

/* Verdict: the conclusion of a simulation or a path, in one line and one sentence */
.nn-verdict { --t: var(--nn-info); display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 12px; padding: 12px 14px; border-radius: var(--nn-radius-sm); background: color-mix(in srgb, var(--t) 10%, transparent); border: 1px solid color-mix(in srgb, var(--t) 36%, transparent); }
.nn-verdict__icon { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: color-mix(in srgb, var(--t) 18%, transparent); color: var(--t); font-size: 18px; }
.nn-verdict__title { font: 600 15px/20px var(--nn-font-display); color: var(--nn-title); }
.nn-verdict__text { font-size: var(--nn-fs-xs); line-height: 17px; color: var(--nn-ink-2); }
.nn-verdict.is-crit { --t: var(--nn-crit); } .nn-verdict.is-ok { --t: var(--nn-ok); } .nn-verdict.is-med { --t: var(--nn-med); } .nn-verdict.is-brand { --t: var(--nn-brand); }

/* Public profile of the entity (Live): logo, name, domain and a grid of facts */
.nn-profile { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.nn-profile__logo { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; background: var(--nn-surface-3); display: grid; place-items: center; overflow: hidden; color: var(--nn-ink-3); }
.nn-profile__logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.nn-profile__name { font: 600 15px/20px var(--nn-font-display); color: var(--nn-title); }
.nn-profile__domain { font: 12px/16px var(--nn-font-mono); color: var(--nn-ink-3); }
.nn-factgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 12px; background: var(--nn-line-2); border-radius: var(--nn-radius-sm); overflow: hidden; border: 1px solid var(--nn-line-2); }
.nn-factgrid > div { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; background: var(--nn-surface); min-width: 0; }
.nn-factgrid dt, .nn-factgrid__label { font-size: 11px; color: var(--nn-ink-3); }
.nn-factgrid dd, .nn-factgrid__value { margin: 0; font-size: var(--nn-fs-sm); font-weight: 600; color: var(--nn-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Stage -------------------------------------------------------------- */
.nn-stage { position: relative; height: 100%; min-height: 0; overflow: hidden; border-radius: var(--nn-radius); background: var(--nn-stage-vignette), var(--nn-stage); }
.nn-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.nn-stage__layer { position: absolute; inset: 0; }

/* Pin: label of a place or a peak on a map (Live locations, tactic peaks of the Explorer) */
.nn-pin { --t: var(--nn-ink-3); position: absolute; z-index: 1; display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 1px 8px; padding: 6px 10px 6px 8px; border-radius: var(--nn-radius-sm); background: var(--nn-glass); border: 1px solid var(--nn-line); box-shadow: var(--nn-shadow-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.nn-pin::after { content: ''; position: absolute; left: 50%; bottom: -11px; width: 1px; height: 10px; background: var(--nn-line-strong); }
.nn-pin__name { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--nn-ink); }
.nn-pin__name::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--t); }
.nn-pin__count { justify-self: end; min-width: 22px; padding: 2px 6px; border-radius: var(--nn-radius-pill); background: var(--nn-surface-3); font: 700 11px/1 var(--nn-font-sans); color: var(--nn-ink); text-align: center; font-variant-numeric: tabular-nums; }
.nn-pin__sub { grid-column: 1 / -1; font-size: 11px; color: var(--nn-ink-3); padding-left: 13px; }
.nn-pin.is-crit { --t: var(--nn-crit); } .nn-pin.is-high { --t: var(--nn-high); } .nn-pin.is-med { --t: var(--nn-med); } .nn-pin.is-ok { --t: var(--nn-ok); } .nn-pin.is-low { --t: var(--nn-low); } .nn-pin.is-threat { --t: var(--nn-terrain-threat); }
.nn-pin.is-crit .nn-pin__count { background: var(--nn-crit-soft); color: var(--nn-crit-ink); }
.nn-pin.is-selected { border-color: var(--nn-brand); box-shadow: var(--nn-glow); }
.nn-pin--sm { padding: 4px 8px 4px 7px; }
/* Placement when pins are close: the label moves to a side and the leader line follows */
.nn-pin.is-right { transform: translate(14px, -50%); }
.nn-pin.is-right::after { left: -12px; top: 50%; bottom: auto; width: 11px; height: 1px; }
.nn-pin.is-left { transform: translate(calc(-100% - 14px), -50%); }
.nn-pin.is-left::after { left: auto; right: -12px; top: 50%; bottom: auto; width: 11px; height: 1px; }
.nn-pin.is-below { transform: translate(-50%, 12px); }
.nn-pin.is-below::after { top: -11px; bottom: auto; }
/* Placed by a library (globe.gl, Leaflet): the library positions it, the pin only paints */
.nn-pin--static { position: relative; transform: none; }
.nn-pin--static::after { display: none; }
.nn-pin--sm .nn-pin__name { font-size: 11.5px; }
.nn-pin:focus-visible { outline: none; box-shadow: var(--nn-focus); }

/* Node card: an endpoint or an asset on the fleet graph */
.nn-nodecard { --t: var(--nn-line-strong); position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; width: 248px; padding: 10px 12px 10px 13px; border-radius: var(--nn-radius-sm); background: var(--nn-surface); border: 1px solid var(--nn-line); box-shadow: var(--nn-shadow-2); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color var(--nn-dur-1), opacity var(--nn-dur-2); }
.nn-nodecard::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--t); }
.nn-nodecard:hover { border-color: var(--nn-line-strong); }
.nn-nodecard:focus-visible { outline: none; box-shadow: var(--nn-focus); }
.nn-nodecard__icon { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--nn-surface-3); color: var(--nn-ink-2); font-size: 17px; }
.nn-nodecard__title { font-size: 13px; font-weight: 600; color: var(--nn-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-nodecard__sub { grid-column: 2; font-size: 11.5px; color: var(--nn-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-nodecard__score { grid-row: 1 / span 2; grid-column: 3; }
.nn-nodecard__flags { position: absolute; top: -9px; right: 12px; display: flex; gap: 4px; }
.nn-nodecard__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--nn-line-2); font-size: 11px; color: var(--nn-ink-3); min-width: 0; }
.nn-nodecard__count { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--nn-ink-2); font-variant-numeric: tabular-nums; }
.nn-nodecard__count .nn-i { font-size: 13px; }
.nn-nodecard__foot .nn-tech { height: 20px; }
.nn-nodecard.is-crit { --t: var(--nn-crit); border-color: var(--nn-crit-line); } .nn-nodecard.is-high { --t: var(--nn-high); } .nn-nodecard.is-med { --t: var(--nn-med); } .nn-nodecard.is-ok { --t: var(--nn-ok); }
.nn-nodecard.is-selected { border-color: var(--nn-brand); box-shadow: var(--nn-glow); }
.nn-nodecard.is-dim { opacity: .35; }
.nn-nodecard--compact { width: 180px; grid-template-columns: 26px minmax(0, 1fr); padding: 7px 10px 7px 11px; }
.nn-nodecard--compact .nn-nodecard__icon { width: 26px; height: 26px; font-size: 14px; border-radius: 7px; }
.nn-nodecard--compact .nn-nodecard__title { font-size: 12px; }
.nn-nodecard--compact .nn-nodecard__sub { font-size: 11px; }
.nn-nodecard__step { position: absolute; left: -9px; bottom: -9px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--nn-radius-pill); background: var(--nn-surface-3); border: 1px solid var(--nn-line-strong); font: 700 10.5px/1 var(--nn-font-sans); color: var(--nn-ink); }
.nn-nodecard.is-on-path .nn-nodecard__step { background: var(--nn-crit); border-color: var(--nn-crit); color: #fff; }
.nn-nodecard.is-off-path { opacity: .45; border-style: dashed; box-shadow: none; }

/* Zone: a group on the graph (location, network segment, ATT&CK tactic). Neutral outline, its state is in the counts */
.nn-zone { position: absolute; border-radius: var(--nn-radius); border: 1px dashed var(--nn-zone-line); background: var(--nn-zone-fill); }
.nn-zone__head { position: absolute; left: 12px; right: 12px; top: -11px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.nn-zone__name { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; background: var(--nn-stage); font-size: 12px; font-weight: 600; color: var(--nn-ink-2); white-space: nowrap; }
.nn-zone__name .nn-i { font-size: 14px; color: var(--nn-ink-3); }
.nn-zone__name b { font-weight: 600; color: var(--nn-ink-3); }
.nn-zone__counts { margin-left: auto; display: inline-flex; gap: 10px; padding: 0 8px; background: var(--nn-stage); font-size: 11.5px; color: var(--nn-ink-2); }
.nn-zone__counts .nn-status { font-size: 11.5px; gap: 5px; }
.nn-zone__counts .nn-status::before { width: 6px; height: 6px; box-shadow: none; }
.nn-zone.is-focus { border-style: solid; border-color: var(--nn-brand-line); }

/* SVG marks of the stage. Edges, flows, contours and nodes take their colour from tokens */
.nn-edge { fill: none; stroke: var(--nn-edge); stroke-width: 1.5; }
.nn-edge.is-strong { stroke: var(--nn-edge-strong); }
.nn-edge.is-hot { stroke: var(--nn-edge-hot); stroke-width: 2.25; }
.nn-edge.is-cut { stroke: var(--nn-ok); stroke-dasharray: 4 5; }
.nn-edge.is-off { stroke-dasharray: 2 5; opacity: .6; }
.nn-edge.is-live { stroke: var(--nn-edge-live); stroke-width: 2; stroke-dasharray: 6 10; animation: nn-flow 1.2s linear infinite; }
@keyframes nn-flow { to { stroke-dashoffset: -32; } }
.nn-edge-label { font: 600 10.5px var(--nn-font-sans); fill: var(--nn-ink-3); paint-order: stroke; stroke: var(--nn-stage); stroke-width: 4px; }
.nn-contour { fill: none; stroke-width: 1; }
.nn-contour.is-1 { stroke: var(--nn-terrain-1); } .nn-contour.is-2 { stroke: var(--nn-terrain-2); } .nn-contour.is-3 { stroke: var(--nn-terrain-3); } .nn-contour.is-4 { stroke: var(--nn-terrain-4); } .nn-contour.is-5 { stroke: var(--nn-terrain-5); }
.nn-contour.is-threat { stroke: var(--nn-terrain-threat); }
.nn-contour.is-exposed { stroke: var(--nn-crit); }
.nn-map-land { fill: var(--nn-map-land); }
.nn-map-sea { fill: var(--nn-map-sea); }
.nn-map-grid { fill: none; stroke: var(--nn-map-grid); stroke-width: 1; }
.nn-map-dot { fill: var(--nn-map-dot); }
@media (prefers-reduced-motion: reduce) { .nn-edge.is-live { animation: none; } }

/* Hover card on the stage: title, a few facts and what a click does */
.nn-stagetip { position: absolute; z-index: 4; min-width: 220px; max-width: 300px; padding: 10px 12px; border-radius: var(--nn-radius-sm); background: var(--nn-surface); border: 1px solid var(--nn-line-strong); box-shadow: var(--nn-shadow-3); font-size: var(--nn-fs-xs); color: var(--nn-ink-2); pointer-events: none; }
.nn-stagetip__title { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--nn-ink); }
.nn-stagetip__row { display: flex; gap: 12px; justify-content: space-between; line-height: 19px; }
.nn-stagetip__row b { color: var(--nn-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.nn-stagetip__hint { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--nn-line-2); color: var(--nn-ink-3); }

/* Stage message: loading, empty and error, in the middle of the stage */
.nn-stagemsg { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; pointer-events: none; }
.nn-stagemsg > div { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 360px; padding: 20px 24px; border-radius: var(--nn-radius); background: var(--nn-glass); border: 1px solid var(--nn-line); pointer-events: auto; }
.nn-stagemsg__title { font: 600 16px/22px var(--nn-font-display); color: var(--nn-title); }
.nn-stagemsg__text { font-size: var(--nn-fs-sm); color: var(--nn-ink-2); }

/* Legend of the stage, with a title and swatches by kind of mark */
.nn-maplegend__title { font-size: 11px; font-weight: 600; color: var(--nn-ink-3); }
.nn-maplegend__row { display: inline-flex; align-items: center; gap: 8px; }
.nn-swatch { --t: var(--nn-ink-3); flex: none; display: inline-block; width: 14px; height: 10px; border-radius: 3px; background: var(--t); }
.nn-swatch--line { height: 2px; border-radius: 1px; }
.nn-swatch--dash { height: 0; border-top: 2px dashed var(--t); background: none; }
.nn-swatch--dot { width: 8px; height: 8px; border-radius: 50%; }
.nn-swatch--zone { background: transparent; border: 1px dashed var(--nn-zone-line); }
.nn-swatch.is-crit { --t: var(--nn-crit); } .nn-swatch.is-ok { --t: var(--nn-ok); } .nn-swatch.is-med { --t: var(--nn-med); } .nn-swatch.is-low { --t: var(--nn-low); } .nn-swatch.is-brand { --t: var(--nn-brand); } .nn-swatch.is-threat { --t: var(--nn-terrain-threat); } .nn-swatch.is-edge { --t: var(--nn-edge-strong); }

/* Minimap: small overview with the visible area */
.nn-minimap { position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 208px; border-radius: var(--nn-radius-sm); overflow: hidden; background: var(--nn-glass); border: 1px solid var(--nn-line); }
.nn-minimap__head { display: flex; align-items: center; height: 26px; padding: 0 10px; border-bottom: 1px solid var(--nn-line-2); font-size: 11px; color: var(--nn-ink-3); }
.nn-minimap > svg { display: block; width: 100%; height: 112px; }
/* A map library inside (Leaflet) keeps its own SVG layers: only the direct child SVG is sized */
.nn-minimap .leaflet-tooltip { padding: 4px 8px; border-radius: var(--nn-radius-xs); border: 1px solid var(--nn-line-strong); background: var(--nn-surface); color: var(--nn-ink); font: 600 11.5px/1.3 var(--nn-font-sans); box-shadow: var(--nn-shadow-2); }
.nn-minimap .leaflet-tooltip::before { display: none; }
.nn-minimap .leaflet-interactive { cursor: pointer; }
.nn-minimap__view { fill: var(--nn-brand-soft); stroke: var(--nn-brand); stroke-width: 1; }

/* --- Rail and time ------------------------------------------------------ */
/* Rail: the ordered steps under the stage (Mission Paths steps, kill chain tactics). Scrolls sideways, never wraps */
.nn-rail { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: stretch; height: 124px; border-radius: var(--nn-radius); background: var(--nn-surface); border: 1px solid var(--nn-line); overflow: hidden; }
.nn-rail__head { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 16px; border-right: 1px solid var(--nn-line); }
.nn-rail__title { font: 600 14px/18px var(--nn-font-display); color: var(--nn-title); }
.nn-rail__desc { font-size: 11.5px; line-height: 15px; color: var(--nn-ink-3); }
.nn-rail__track { display: flex; align-items: stretch; gap: 0; padding: 10px 12px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent); }
.nn-rail__step { --t: var(--nn-line-strong); position: relative; flex: none; display: flex; flex-direction: column; gap: 3px; width: 172px; padding: 9px 12px 8px; border-radius: var(--nn-radius-sm); border: 1px solid var(--nn-line); background: var(--nn-surface-2); text-align: left; font: inherit; color: inherit; cursor: pointer; scroll-snap-align: start; overflow: hidden; }
.nn-rail__step::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--t); }
.nn-rail__step:hover { border-color: var(--nn-line-strong); }
.nn-rail__step:focus-visible { outline: none; box-shadow: var(--nn-focus); }
.nn-rail__step.is-selected { border-color: var(--nn-brand); background: var(--nn-brand-soft); }
.nn-rail__top { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--nn-ink-3); }
.nn-rail__n { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--nn-surface-3); color: var(--nn-ink); font: 700 10.5px/1 var(--nn-font-sans); }
.nn-rail__top .nn-i { margin-left: auto; font-size: 14px; }
.nn-rail__id { font: 600 11.5px/1.3 var(--nn-font-mono); color: var(--nn-ink-2); }
.nn-rail__name { font-size: 12.5px; font-weight: 600; line-height: 16px; color: var(--nn-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-rail__sub { font-size: 11px; color: var(--nn-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-rail__sep { flex: none; display: grid; place-items: center; width: 22px; color: var(--nn-ink-4); font-size: 14px; }
.nn-rail__step.is-crit { --t: var(--nn-crit); } .nn-rail__step.is-high { --t: var(--nn-high); } .nn-rail__step.is-med { --t: var(--nn-med); } .nn-rail__step.is-ok { --t: var(--nn-ok); }

/* Scrubber additions: the live chip and the scale labels */
.nn-scrub__live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--nn-radius-pill); border: 1px solid var(--nn-brand-line); background: var(--nn-brand-soft); color: var(--nn-brand-ink); font: 600 11.5px/1 var(--nn-font-sans); cursor: pointer; }
.nn-scrub__live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--nn-live); animation: nn-live 1.8s ease-out infinite; }
.nn-scrub__live.is-off { border-color: var(--nn-line-strong); background: transparent; color: var(--nn-ink-3); }
.nn-scrub__live.is-off::before { background: var(--nn-ink-4); animation: none; }
.nn-scrub__scale { display: flex; justify-content: space-between; flex: 1; gap: 8px; font-size: 11px; color: var(--nn-ink-3); }
.nn-scrub__bar { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

/* Ticker: news of the entity on one line. Pauses on hover and focus. With "reduce motion" it does not move and scrolls by hand */
.nn-ticker { display: flex; align-items: center; height: 34px; border-radius: var(--nn-radius-sm); background: var(--nn-surface); border: 1px solid var(--nn-line); overflow: hidden; }
.nn-ticker__label { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; border-right: 1px solid var(--nn-line); font-size: var(--nn-fs-xs); font-weight: 600; color: var(--nn-ink); }
.nn-ticker__label .nn-i { color: var(--nn-brand-ink); font-size: 15px; }
.nn-ticker__viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.nn-ticker__track { display: inline-flex; gap: 36px; padding-left: 24px; white-space: nowrap; animation: nn-ticker var(--dur, 60s) linear infinite; }
.nn-ticker:hover .nn-ticker__track, .nn-ticker:focus-within .nn-ticker__track { animation-play-state: paused; }
.nn-ticker__item { display: inline-flex; align-items: center; gap: 8px; font-size: var(--nn-fs-xs); color: var(--nn-ink-2); text-decoration: none; }
.nn-ticker__item:hover { color: var(--nn-ink); }
.nn-ticker__src { font-weight: 600; color: var(--nn-brand-ink); }
.nn-ticker__time { font: 11px var(--nn-font-mono); color: var(--nn-ink-3); }
@keyframes nn-ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .nn-ticker__track { animation: none; } .nn-ticker__viewport { overflow-x: auto; } }

/* Status bar end: attribution and scope on the right */
.nn-statusbar__end { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; color: var(--nn-ink-4); }

/* Legend list inside the help modal of a cockpit */
.nn-legendlist { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.nn-legendlist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px; font-size: var(--nn-fs-sm); line-height: 20px; color: var(--nn-ink-2); }
.nn-legendlist li > :first-child { justify-self: center; margin-top: 5px; }
.nn-legendlist b { color: var(--nn-ink); font-weight: 600; }

/* Centre column when the stage has a rail or a ticker under it */
.nn-ops__main { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.nn-ops__main > .nn-stage { flex: 1 1 auto; height: auto; }
.nn-ops__bar { display: flex; flex-direction: column; gap: 8px; }
/* Zones laid out by the flow of the page (graph layouts that are not free positions) */
.nn-stage__flow { position: absolute; inset: 0; overflow: auto; padding: 34px 24px 140px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 34px 24px; }
.nn-zone.is-flow { position: relative; display: flex; flex-wrap: wrap; gap: 22px 18px; padding: 24px 18px 18px; }
@media (max-width: 1023px) { .nn-ops__main { grid-column: 1; grid-row: auto; } .nn-ops__main > .nn-stage { min-height: 60vh; } }
/* ==========================================================================
   NNEAT Design System 1.0 · 06 Bridge: Tabler 1.4 / Bootstrap 5.3 markup on NNEAT tokens
   The app keeps the Tabler engine (grid, utilities, JS of modals, dropdowns, offcanvas, tooltips).
   This layer makes the existing markup look like the system without touching any view:
   Tabler variables point to the tokens, and the common components get the NNEAT anatomy.
   Scope: only presentation. No display, order or visibility rule that a screen could depend on.
   Load order in the app: template.min.css > nneat-ds.css (this bundle) > module CSS.
   ========================================================================== */

/* ---------- Variables ---------- */
:root:not([data-bs-theme=dark]),
[data-bs-theme-base]:not([data-bs-theme=dark]) {
  --tblr-font-sans-serif: var(--nn-font-sans);
  --tblr-font-monospace: var(--nn-font-mono);
  --tblr-body-font-size: .875rem;
  --tblr-body-color: var(--nn-ink);
  --tblr-body-color-rgb: 38, 26, 21;
  --tblr-body-bg: var(--nn-bg);
  --tblr-bg-surface: var(--nn-surface);
  --tblr-bg-surface-secondary: var(--nn-surface-2);
  --tblr-bg-surface-tertiary: var(--nn-surface-3);
  --tblr-border-color: var(--nn-line);
  --tblr-border-color-light: var(--nn-line-2);
  --tblr-border-color-translucent: rgba(38, 26, 21, .1);
  --tblr-border-radius: var(--nn-radius-sm);
  --tblr-border-radius-sm: var(--nn-radius-xs);
  --tblr-border-radius-lg: var(--nn-radius);
  --tblr-border-radius-pill: var(--nn-radius-pill);
  --tblr-box-shadow: var(--nn-shadow-2);
  --tblr-box-shadow-sm: var(--nn-shadow-1);
  --tblr-box-shadow-dropdown: var(--nn-shadow-3);
  --tblr-card-shadow: var(--nn-shadow-1);
  --tblr-primary: #cc4205;
  --tblr-primary-rgb: 204, 66, 5;
  --tblr-primary-text: #933003;
  --tblr-primary-lt: #fbefe9;
  --tblr-primary-darken: #b53a04;
  --tblr-link-color: #650d00;
  --tblr-link-color-rgb: 101, 13, 0;
  --tblr-link-hover-color: #cc4205;
  --tblr-secondary: #62574f;
  --tblr-secondary-rgb: 98, 87, 79;
  --tblr-muted: #786d66;
  --tblr-secondary-color: #62574f;
  --tblr-tertiary-color: #786d66;
  --tblr-emphasis-color: #261a15;
  /* Tabler named colours collapse onto the five status colours, so bg-red, text-green, bg-blue-lt… follow the palette */
  --tblr-red: #c92a2a;     --tblr-red-rgb: 201, 42, 42;     --tblr-red-lt: #fdecec;
  --tblr-danger: #c92a2a;  --tblr-danger-rgb: 201, 42, 42;
  --tblr-orange: #d9480f;  --tblr-orange-rgb: 217, 72, 15;  --tblr-orange-lt: #fff0e6;
  --tblr-yellow: #a87900;  --tblr-yellow-rgb: 168, 121, 0;  --tblr-yellow-lt: #fbf3dc;
  --tblr-warning: #a87900; --tblr-warning-rgb: 168, 121, 0;
  --tblr-green: #2b8a3e;   --tblr-green-rgb: 43, 138, 62;   --tblr-green-lt: #e6f6e6;
  --tblr-success: #2b8a3e; --tblr-success-rgb: 43, 138, 62;
  --tblr-teal: #2b8a3e;    --tblr-teal-rgb: 43, 138, 62;    --tblr-teal-lt: #e6f6e6;
  --tblr-lime: #2b8a3e;    --tblr-lime-rgb: 43, 138, 62;
  --tblr-blue: #2c7fa3;    --tblr-blue-rgb: 44, 127, 163;   --tblr-blue-lt: #e5f4fa;
  --tblr-azure: #2c7fa3;   --tblr-azure-rgb: 44, 127, 163;  --tblr-azure-lt: #e5f4fa;
  --tblr-cyan: #2c7fa3;    --tblr-cyan-rgb: 44, 127, 163;   --tblr-cyan-lt: #e5f4fa;
  --tblr-info: #2c7fa3;    --tblr-info-rgb: 44, 127, 163;
  --tblr-indigo: #2b2b8c;  --tblr-indigo-rgb: 43, 43, 140;
  --tblr-purple: #650d00;  --tblr-purple-rgb: 101, 13, 0;   --tblr-purple-lt: #f6e9e6;
  --tblr-pink: #650d00;    --tblr-pink-rgb: 101, 13, 0;     --tblr-pink-lt: #f6e9e6;
  --tblr-dark: #380d00;    --tblr-dark-rgb: 56, 13, 0;
  --tblr-gray-50: #faf9f8; --tblr-gray-100: #f5f4f3; --tblr-gray-200: #e7e3e0; --tblr-gray-300: #d5cfcb; --tblr-gray-400: #b4aba5;
  --tblr-gray-500: #8f847d; --tblr-gray-600: #786d66; --tblr-gray-700: #62574f; --tblr-gray-800: #3f332c; --tblr-gray-900: #261a15;
}

/* Ops screens that still use Tabler markup */
[data-nn-theme="ops"] {
  --tblr-body-color: var(--nn-ink);
  --tblr-body-bg: var(--nn-bg);
  --tblr-bg-surface: var(--nn-surface);
  --tblr-bg-surface-secondary: var(--nn-surface-2);
  --tblr-border-color: var(--nn-line);
  --tblr-primary: #e3561a;
  --tblr-primary-rgb: 227, 86, 26;
  --tblr-link-color: #ff9a66;
  --tblr-muted: var(--nn-ink-3);
  --tblr-secondary: var(--nn-ink-2);
}

/* ---------- Page ---------- */
body:not(.theme-dark):not([data-bs-theme=dark]) .page-wrapper { background: var(--nn-bg); }
.page-wrapper .page-header .page-pretitle { font-size: var(--nn-fs-label); letter-spacing: var(--nn-tracking-label); text-transform: uppercase; color: var(--nn-ink-3); font-weight: 600; }
.page-wrapper .page-header .page-title { font-family: var(--nn-font-display); font-weight: 600; font-size: var(--nn-fs-h1); line-height: var(--nn-lh-h1); color: var(--nn-title); letter-spacing: var(--nn-tracking-title); }
.page-wrapper .card-title, .page-wrapper .card-header :is(h2, h3, h4):not(.nn-label), .modal-title, .offcanvas-title, .offcanvas-header :is(h2, h3, h4) { font-family: var(--nn-font-display); font-weight: 600; color: var(--nn-title); letter-spacing: var(--nn-tracking-title); }
.modal-title { font-size: 18px; line-height: 24px; }
.offcanvas-title { font-size: 20px; line-height: 26px; }
.page-wrapper .text-muted, .page-wrapper .text-secondary { color: var(--nn-ink-2) !important; }

/* ---------- Buttons ---------- */
.btn { text-transform: none; font-weight: 600; letter-spacing: 0; border-radius: var(--nn-radius-sm); }
.btn:focus-visible { box-shadow: var(--nn-focus); }
.btn-primary { --tblr-btn-bg: var(--nn-brand); --tblr-btn-border-color: var(--nn-brand); --tblr-btn-hover-bg: var(--nn-brand-hover); --tblr-btn-hover-border-color: var(--nn-brand-hover); --tblr-btn-active-bg: var(--nn-brand-press); --tblr-btn-active-border-color: var(--nn-brand-press); --tblr-btn-color: #fff; --tblr-btn-hover-color: #fff; }
.btn-white, .btn-outline-secondary, .btn-secondary, .btn-light { --tblr-btn-bg: var(--nn-surface); --tblr-btn-color: var(--nn-ink); --tblr-btn-border-color: var(--nn-line); --tblr-btn-hover-bg: var(--nn-surface-2); --tblr-btn-hover-color: var(--nn-ink); --tblr-btn-hover-border-color: var(--nn-line-strong); --tblr-btn-active-bg: var(--nn-surface-3); --tblr-btn-active-color: var(--nn-ink); }
.btn-outline-primary { --tblr-btn-color: var(--nn-brand-ink); --tblr-btn-border-color: var(--nn-brand-line); --tblr-btn-bg: var(--nn-surface); --tblr-btn-hover-bg: var(--nn-brand-soft); --tblr-btn-hover-color: var(--nn-brand-ink); --tblr-btn-hover-border-color: var(--nn-brand-line); }
.btn-ghost-secondary, .btn-ghost { --tblr-btn-color: var(--nn-ink-2); --tblr-btn-hover-bg: var(--nn-surface-3); --tblr-btn-hover-color: var(--nn-ink); }
.btn-danger { --tblr-btn-bg: var(--nn-crit); --tblr-btn-border-color: var(--nn-crit); --tblr-btn-hover-bg: var(--nn-crit-ink); --tblr-btn-hover-border-color: var(--nn-crit-ink); }
.btn-success { --tblr-btn-bg: var(--nn-ok); --tblr-btn-border-color: var(--nn-ok); --tblr-btn-hover-bg: var(--nn-ok-ink); }
.btn-sm { border-radius: var(--nn-radius-xs); }
.btn-icon .icon, .btn .icon { stroke-width: 1.75; }

/* ---------- Badges: Tabler badges become NNEAT soft badges ---------- */
.page-wrapper .badge { font: 600 11.5px/1 var(--nn-font-sans); letter-spacing: 0; text-transform: none; border-radius: var(--nn-radius-xs); padding: 5px 8px; }
.page-wrapper .badge.bg-red, .page-wrapper .badge.bg-danger, .page-wrapper .badge.bg-red-lt { background: var(--nn-crit-soft) !important; color: var(--nn-crit-ink) !important; }
.page-wrapper .badge.bg-orange, .page-wrapper .badge.bg-orange-lt { background: var(--nn-high-soft) !important; color: var(--nn-high-ink) !important; }
.page-wrapper .badge.bg-yellow, .page-wrapper .badge.bg-warning, .page-wrapper .badge.bg-yellow-lt { background: var(--nn-med-soft) !important; color: var(--nn-med-ink) !important; }
.page-wrapper .badge.bg-green, .page-wrapper .badge.bg-success, .page-wrapper .badge.bg-green-lt, .page-wrapper .badge.bg-teal, .page-wrapper .badge.bg-teal-lt, .page-wrapper .badge.bg-lime-lt { background: var(--nn-ok-soft) !important; color: var(--nn-ok-ink) !important; }
.page-wrapper .badge.bg-blue, .page-wrapper .badge.bg-info, .page-wrapper .badge.bg-blue-lt, .page-wrapper .badge.bg-azure, .page-wrapper .badge.bg-azure-lt, .page-wrapper .badge.bg-cyan-lt { background: var(--nn-low-soft) !important; color: var(--nn-low-ink) !important; }
.page-wrapper .badge.bg-secondary, .page-wrapper .badge.bg-secondary-lt, .page-wrapper .badge.bg-dark-lt, .page-wrapper .badge.bg-gray-lt, .page-wrapper .badge.bg-muted-lt { background: var(--nn-info-soft) !important; color: var(--nn-info-ink) !important; }
.page-wrapper .badge.bg-primary, .page-wrapper .badge.bg-primary-lt, .page-wrapper .badge.bg-purple-lt, .page-wrapper .badge.bg-pink-lt { background: var(--nn-brand-soft) !important; color: var(--nn-brand-ink) !important; }

/* ---------- Cards ---------- */
.page-wrapper .card { border-color: var(--nn-line); border-radius: var(--nn-radius); box-shadow: var(--nn-shadow-1); }
.page-wrapper .card-header { border-bottom-color: var(--nn-line-2); }
.page-wrapper .card-footer { background: var(--nn-surface-2); border-top-color: var(--nn-line-2); }

/* ---------- Tables ---------- */
.page-wrapper .table > thead > tr > th, .page-wrapper .table thead th { background: var(--nn-surface-2); color: var(--nn-ink-3); font: 600 var(--nn-fs-label)/1.2 var(--nn-font-sans); letter-spacing: var(--nn-tracking-label); text-transform: uppercase; border-bottom-color: var(--nn-line); }
.page-wrapper .table > tbody > tr > td { border-bottom-color: var(--nn-line-2); }
.page-wrapper .table-hover > tbody > tr:hover > * { --tblr-table-accent-bg: var(--nn-surface-2); }

/* ---------- Forms ---------- */
.form-control, .form-select { border-color: var(--nn-line); border-radius: var(--nn-radius-sm); color: var(--nn-ink); }
.form-control:hover, .form-select:hover { border-color: var(--nn-line-strong); }
.form-control:focus, .form-select:focus { border-color: var(--nn-brand); box-shadow: var(--nn-focus); }
.form-select { padding-right: 2.25rem; }
.form-label { font-weight: 600; color: var(--nn-ink); }
.form-hint { color: var(--nn-ink-3); }
.form-check-input:checked { background-color: var(--nn-brand); border-color: var(--nn-brand); }
.form-check-input:focus { box-shadow: var(--nn-focus); border-color: var(--nn-brand); }
.form-switch .form-check-input:checked { background-color: var(--nn-brand); }
.ts-wrapper.focus .ts-control { border-color: var(--nn-brand); box-shadow: var(--nn-focus); }
.ts-dropdown .active { background: var(--nn-brand-soft); color: var(--nn-ink); }

/* ---------- Navigation ---------- */
.nav-tabs { border-bottom-color: var(--nn-line); }
.nav-tabs .nav-link { color: var(--nn-ink-2); font-weight: 500; }
.nav-tabs .nav-link:hover { color: var(--nn-ink); }
.nav-tabs .nav-link.active { color: var(--nn-brand-ink); font-weight: 600; border-color: transparent transparent var(--nn-brand); }
.pagination .page-item.active .page-link { background: var(--nn-surface); color: var(--nn-ink); border-color: var(--nn-line-strong); font-weight: 700; }

/* ---------- Overlays ---------- */
.dropdown-menu { border-color: var(--nn-line); border-radius: var(--nn-radius-sm); box-shadow: var(--nn-shadow-3); padding: 6px; }
.dropdown-item { border-radius: 6px; color: var(--nn-ink); font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--nn-surface-3); color: var(--nn-ink); }
.dropdown-item.active, .dropdown-item:active { background: var(--nn-brand-soft); color: var(--nn-brand-ink); }
.dropdown-item.text-danger:hover { background: var(--nn-crit-soft); }
.modal-content { border-color: var(--nn-line); border-radius: var(--nn-radius-lg); box-shadow: var(--nn-shadow-4); }
.modal-header { border-bottom-color: var(--nn-line-2); }
.modal-footer { background: var(--nn-surface-2); border-top-color: var(--nn-line-2); border-radius: 0 0 var(--nn-radius-lg) var(--nn-radius-lg); }
.modal-backdrop.show { opacity: 1; background: var(--nn-overlay); }
.offcanvas { border-color: var(--nn-line) !important; box-shadow: var(--nn-shadow-4); }
.offcanvas-end { width: min(var(--nn-drawer-w), 100vw); }
.offcanvas.show:not(.hiding), .offcanvas.showing { display: flex; flex-direction: column; }
.offcanvas > .offcanvas-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tooltip { --tblr-tooltip-bg: var(--nn-surface-inverse); --tblr-tooltip-color: var(--nn-ink-inverse); --tblr-tooltip-font-size: var(--nn-fs-xs); --tblr-tooltip-border-radius: var(--nn-radius-xs); }
.popover { --tblr-popover-border-color: var(--nn-line); --tblr-popover-border-radius: var(--nn-radius); --tblr-popover-box-shadow: var(--nn-shadow-3); }

/* ---------- Feedback ---------- */
.alert { border-radius: var(--nn-radius-sm); border-color: var(--nn-line); }
.alert-danger { background: var(--nn-crit-soft); border-color: var(--nn-crit-line); color: var(--nn-ink); }
.alert-warning { background: var(--nn-med-soft); border-color: var(--nn-med-line); color: var(--nn-ink); }
.alert-success { background: var(--nn-ok-soft); border-color: var(--nn-ok-line); color: var(--nn-ink); }
.alert-info { background: var(--nn-low-soft); border-color: var(--nn-low-line); color: var(--nn-ink); }
.progress { background: var(--nn-line-2); border-radius: 6px; }
.progress-bar { background-color: var(--nn-brand); }
.toast { border-radius: var(--nn-radius-sm); box-shadow: var(--nn-shadow-3); }

/* ---------- Page header: actions on the right of the title, aligned with it (audit: 105 screens had them below) ----------
   Views print <div class="page-header"><div class="row"><div class="col">title</div><div class="mt-3">actions</div></div></div>:
   the actions block becomes the right column, without touching the views. */
.page-wrapper .page-header { margin-bottom: var(--nn-space-8); }
.page-wrapper .page-header > .row,
.page-wrapper .page-header > .container-xl > .row { display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: var(--nn-space-5); column-gap: var(--nn-space-6); margin: 0; }
.page-wrapper .page-header > .row > *,
.page-wrapper .page-header > .container-xl > .row > * { padding-left: 0; padding-right: 0; }
.page-wrapper .page-header > .row > .col,
.page-wrapper .page-header > .container-xl > .row > .col { flex: 1 1 320px; min-width: 0; }
.page-wrapper .page-header > .row > :not(.col),
.page-wrapper .page-header > .container-xl > .row > :not(.col) { flex: 0 1 auto; width: auto; max-width: 100%; margin-top: 0 !important; margin-left: auto; }
.page-wrapper .page-header .btn-list { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--nn-space-4); margin: 0; }
.page-wrapper .page-header .btn-list > * { margin: 0 !important; }
.page-wrapper .page-header .page-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.page-wrapper .page-header .form-help { width: 18px; height: 18px; border-radius: 50%; font: 700 11px/18px var(--nn-font-sans); background: var(--nn-low) !important; color: #fff !important; }
@media (max-width: 767px) { .page-wrapper .page-header > .row > :not(.col) { margin-left: 0; width: 100%; } .page-wrapper .page-header .btn-list { justify-content: flex-start; } }

/* ---------- Segmented controls: one style (audit: active white, orange or black depending on the screen) ---------- */
.btn-group > .btn-check + .btn, .nav-segmented .nav-link, .btn-group.nn-seg-like > .btn { --tblr-btn-bg: transparent; --tblr-btn-border-color: transparent; color: var(--nn-ink-2); font-weight: 600; }
.btn-group:has(> .btn-check) , .nav-segmented { padding: 3px; gap: 2px; background: var(--nn-surface-3); border-radius: var(--nn-radius-sm); border: 0; }
.btn-group > .btn-check:checked + .btn, .btn-group > .btn-check + .btn.active, .nav-segmented .nav-link.active { background: var(--nn-surface) !important; color: var(--nn-ink) !important; border-color: transparent !important; box-shadow: var(--nn-shadow-1), 0 0 0 1px var(--nn-line); border-radius: 6px !important; }
.btn-group:has(> .btn-check) > .btn { border-radius: 6px !important; margin: 0 !important; }
/* Fixed order of the header actions: search first, then the rest, "Actualizar" always last (audit: 22 screens). */
.page-wrapper .page-header .btn-list > :has(input[type="search"], .input-icon, .nn-search) { order: -2; }
.page-wrapper .page-header .btn-list > #refresh-data,
.page-wrapper .page-header .btn-list > [id$="-refresh"],
.page-wrapper .page-header .btn-list > :is(a, button):has(> svg[class*="refresh"], > .nn-i-refresh) { order: 99; }

/* Icons inside Tabler buttons: .nn-i gets the same gap as Tabler's svg.icon (never glued to the text) */
.btn .nn-i:not(:last-child), .dropdown-item .nn-i:not(:last-child) { margin-right: 8px; flex: none; }
.btn.btn-icon .nn-i { margin-right: 0; }
