/* CyberX — dark SOC theme.
   Color roles from the validated reference palette (dark-mode steps). */
:root {
  color-scheme: light;
  /* Clean light system — matches FortHound navy + steel-gray logo palette */
  --page: #f4f6fc;         /* app canvas */
  --surface-1: #ffffff;    /* panels / cards */
  --surface-2: #f1f4fb;    /* raised / rows */
  --surface-3: #e8edf7;    /* hover */
  --glass: rgba(0,0,0,0);          /* overlays neutralized on light */
  --glass-2: rgba(15,23,42,0.03);
  --text-primary: #0d1326;
  --text-secondary: #4a5468;
  --muted: #8791a5;
  --grid: #e7eaf3;
  --baseline: #dde3ef;
  --border: rgba(15,23,42,0.10);
  --border-strong: rgba(15,23,42,0.17);
  --accent: #2b4a86;       /* royal navy — FortHound brand */
  --accent-2: #6e7276;     /* steel gray — FortHound secondary */
  --accent-2-dim: rgba(110,114,118,0.35);
  --terracotta: #ff6b3d;
  --series-1: #2b4a86;     /* navy */
  --series-2: #6e7276;     /* steel */
  --series-3: #3f6098;     /* steel-blue */
  --good: #10a37f;
  --warning: #d98e00;
  --serious: #ef7a34;
  --critical: #e0413f;
  --radius: 14px;          /* cards/panels */
  --radius-sm: 10px;       /* buttons, inputs */
  --radius-xs: 5px;        /* chips, tags */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-serif: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.ic { display: inline-block; vertical-align: -2px; flex-shrink: 0; }
.card-title .ic { vertical-align: -2px; margin-right: 6px; color: var(--muted); }
.btn .ic { vertical-align: -2px; margin-right: 5px; }

/* ---------- Scroll-reveal motion system ---------- */
.reveal { opacity: 0; transform: translateY(26px); will-change: opacity, transform;
  transition: opacity 0.8s cubic-bezier(0.22,0.7,0.15,1), transform 0.8s cubic-bezier(0.22,0.7,0.15,1);
  transition-delay: var(--ri, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none; } }

html, body { height: 100%; }
body { font-family: var(--font); background: var(--page); color: var(--text-primary); font-size: 14px; }
button { font-family: inherit; cursor: pointer; }

/* Soft light ambient tint behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(720px 480px at 85% -8%, rgba(43,74,134,0.07), transparent 60%),
    radial-gradient(680px 460px at 5% 106%, rgba(110,114,118,0.06), transparent 60%);
}

.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 224px; flex-shrink: 0; background: var(--surface-1);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 16px 16px 14px; border-bottom: 1px solid var(--border); }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center; font-size: 15px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.brand-logo { width: 30px; height: 30px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border-strong); }
.brand-name {
  font-family: var(--font-display); color: var(--text-primary);
  font-weight: 700; font-size: 15.5px; letter-spacing: 0.2px;
}
.brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: 0.2px; }
.nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0;
  background: transparent; color: var(--text-secondary); border-radius: var(--radius-sm);
  font-size: 13px; text-align: left; position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-primary); }
.nav-item.active { background: var(--surface-2); color: var(--text-primary); font-weight: 500; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent); }
.nav-ico { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; opacity: 0.85; }
.nav-ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav-badge { margin-left: auto; background: rgba(255,93,93,0.14); color: #ff8585; border: 1px solid rgba(255,93,93,0.35); font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; border-radius: var(--radius-xs); padding: 0 5px; min-width: 18px; text-align: center; }
.nav-badge:empty, .nav-badge[data-zero="1"] { display: none; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.playbook-toggle { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; }
.pt-title { font-size: 12.5px; font-weight: 600; }
.pt-sub { font-size: 11px; color: var(--muted); }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--baseline); border-radius: 22px; transition: 0.2s; }
.slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--good); }
.switch input:checked + .slider::before { transform: translateX(16px); }
.live-pill { font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 7px; padding: 0 4px; }
.dev-credit { font-size: 10.5px; color: var(--muted); padding: 6px 4px 0; border-top: 1px solid var(--border); margin-top: 2px; letter-spacing: 0.2px; }
.dev-credit span { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Main ---------- */
.main { flex: 1; padding: 0 30px 26px; min-width: 0; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, var(--page) 82%, transparent);
}
.search-trigger {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-1); border: 1px solid var(--border); color: var(--muted);
  border-radius: var(--radius-sm); padding: 7px 12px; font-size: 12.5px; min-width: 320px; text-align: left;
  transition: border-color 0.15s ease;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-secondary); }
.search-trigger kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 1px 6px; color: var(--muted);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.utc-clock { color: var(--muted); font-size: 12px; }
.mono-font { font-family: var(--font-mono); }
.btn-analyst {
  background: var(--surface-2);
  border: 1px solid var(--border-strong); color: var(--text-secondary); font-weight: 500;
}
.btn-analyst:hover { color: var(--accent); border-color: var(--accent); }

.page-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 8px; }
.page-title { font-family: var(--font-serif); font-size: 25px; font-weight: 500; letter-spacing: -0.2px; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.page-sub { color: var(--muted); font-size: 13px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: linear-gradient(180deg, var(--glass), rgba(255,255,255,0.012)), var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  position: relative; overflow: hidden; backdrop-filter: blur(8px);
  transition: transform 0.3s cubic-bezier(0.22,0.7,0.15,1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.kpi:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 18px 44px -26px rgba(0,0,0,0.8); }
.kpi-value { background: linear-gradient(180deg, var(--text-primary), #c7cede); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kpi-label { font-size: 10.5px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }
.kpi-value { font-family: var(--font-display); font-size: 26px; font-weight: 650; line-height: 1.1; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 11.5px; margin-top: 6px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi-delta.good { color: var(--good); }
.kpi-delta.bad { color: var(--critical); }

/* Cards & grid */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

/* Bento grid — asymmetric editorial layout */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento > .card { margin: 0; }
.b-wide   { grid-column: span 4; }
.b-narrow { grid-column: span 2; }
.b-half   { grid-column: span 3; }
.b-third  { grid-column: span 2; }
.b-tall   { grid-row: span 2; }
.b-full   { grid-column: 1 / -1; }
@media (max-width: 1000px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento > .card { grid-column: span 1 !important; grid-row: auto !important; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
}
.card {
  background: linear-gradient(180deg, var(--glass), rgba(255,255,255,0.012)), var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0;
  backdrop-filter: blur(8px);
  transition: transform 0.35s cubic-bezier(0.22,0.7,0.15,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.8), 0 0 0 1px var(--border), 0 0 30px -14px rgba(47,222,208,0.35);
  border-color: var(--border-strong);
}
.card-title { font-family: var(--font-serif); font-size: 15px; font-weight: 500; margin-bottom: 3px; letter-spacing: 0; }
.card-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }

/* ---------- Sections (editorial, oversized) ---------- */
.section { margin-top: 64px; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.section-num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-2); letter-spacing: 1px; padding-top: 4px; }
.section-title { font-family: var(--font-serif); font-size: 26px; font-weight: 500; letter-spacing: -0.4px; color: var(--text-primary); white-space: nowrap; }
.section-label { font-size: 11px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.section-rule { flex: 1; height: 1px; background: var(--border); align-self: center; }
@media (max-width: 640px) { .section-title { font-size: 21px; } }

/* ---------- Cinematic hero (Bellhop-style, immersive) ---------- */
.hero-cinematic { min-height: min(74vh, 600px); align-items: stretch; border-radius: var(--radius); }
.hero-cinematic .hero-video, .hero-cinematic .hero-bg { animation: heroZoom 18s ease-out both; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-cinematic .hero-shade {
  background: linear-gradient(180deg, rgba(12,14,10,0.15) 0%, rgba(12,14,10,0.30) 45%, rgba(12,14,10,0.82) 100%),
              linear-gradient(90deg, rgba(12,14,10,0.55), transparent 55%);
}
.hero-cinematic .hero-content { align-items: flex-end; padding: 32px 34px 30px; }
.hero-lead { max-width: 640px; }
.hero-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase;
  color: rgba(246,244,238,0.75); margin-bottom: 12px;
}
.hero-cinematic .hero-title { font-size: clamp(40px, 7vw, 76px); line-height: 0.98; font-weight: 500; letter-spacing: -1px; }
.hero-accent { font-style: italic; color: #7ff0e6; font-weight: 500; }
.hero-cinematic .hero-sub { max-width: 580px; font-size: 15px; line-height: 1.6; margin-top: 16px; }
.hero-cinematic .hero-eyebrow { font-size: 12px; letter-spacing: 3px; margin-bottom: 16px; }
/* staggered reveal */
.hero-eyebrow, .hero-cinematic .hero-title, .hero-cinematic .hero-sub, .hero-cinematic .hero-status {
  opacity: 0; animation: heroReveal 0.9s cubic-bezier(0.2,0.7,0.2,1) both; animation-delay: var(--d, 0s);
}
@keyframes heroReveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
/* scroll cue */
.hero-scroll { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); width: 22px; height: 34px;
  border: 1.5px solid rgba(246,244,238,0.55); border-radius: 12px; display: flex; justify-content: center; padding-top: 6px;
  opacity: 0; animation: heroReveal 0.9s ease both; animation-delay: 0.7s; }
.hero-scroll span { width: 3px; height: 7px; border-radius: 2px; background: rgba(246,244,238,0.8); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero-cinematic .hero-title, .hero-cinematic .hero-sub, .hero-cinematic .hero-status, .hero-scroll { animation: none; opacity: 1; }
  .hero-cinematic .hero-video, .hero-cinematic .hero-bg { animation: none; }
}

/* Charts */
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
  font-size: 12px; color: var(--text-primary); display: none; z-index: 5;
  white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.tooltip .tt-label { color: var(--muted); font-size: 11px; }

/* Severity bars */
.sev-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sev-name { width: 84px; font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.sev-track { flex: 1; height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.sev-fill { height: 100%; border-radius: 4px 0 0 4px; }
.sev-count { width: 36px; text-align: right; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Live feed */
.feed { display: flex; flex-direction: column; gap: 1px; max-height: 430px; overflow-y: auto; }
.feed-item { display: flex; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--grid); align-items: flex-start; animation: slidein 0.25s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.feed-time { font-size: 11px; color: var(--muted); white-space: nowrap; padding-top: 2px; font-family: var(--font-mono); }
.feed-body { min-width: 0; }
.feed-type { font-size: 13px; font-weight: 600; }
.feed-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Severity chips — bordered tag with a leading status square (no emoji) */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-xs); letter-spacing: 0.5px; border: 1px solid transparent; text-transform: uppercase; font-family: var(--font-mono); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 1px; background: currentColor; flex-shrink: 0; }
.chip-status::before { display: none; }
.chip-critical { background: rgba(224,65,63,0.10); color: #c0392b; border-color: rgba(224,65,63,0.30); }
.chip-high     { background: rgba(239,122,52,0.12); color: #c85a15; border-color: rgba(239,122,52,0.30); }
.chip-medium   { background: rgba(217,142,0,0.13); color: #9a6a00; border-color: rgba(217,142,0,0.30); }
.chip-low      { background: rgba(16,163,127,0.12); color: #0a7f66; border-color: rgba(16,163,127,0.30); }
.chip-status   { background: var(--surface-2); color: var(--text-secondary); border-color: var(--border-strong); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--grid); font-weight: 600; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--grid); font-size: 13px; vertical-align: top; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }

/* Filters */
.filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.fbtn { background: var(--surface-1); border: 1px solid var(--border); color: var(--text-secondary); padding: 5px 12px; border-radius: var(--radius-sm); font-size: 12px; }
.fbtn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.fbtn.active { background: var(--surface-3); border-color: var(--accent); color: var(--text-primary); font-weight: 500; }

/* Buttons */
.btn { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-secondary); padding: 6px 12px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 500; transition: border-color 0.12s ease, color 0.12s ease; }
.btn:hover { border-color: var(--muted); color: var(--text-primary); }
.btn-primary {
  background: linear-gradient(115deg,#2b4a86,#45608f); border: none;
  color: #fff; font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 10px 24px -10px rgba(43,74,134,0.65); }
.btn-danger { background: rgba(224,65,63,0.08); border-color: rgba(224,65,63,0.45); color: #c0392b; }
.btn-danger:hover { background: rgba(224,65,63,0.14); border-color: var(--critical); color: #a83228; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Alert / incident cards */
.item-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px; }
.item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-title { font-weight: 600; font-size: 13.5px; }
.item-id { color: var(--muted); font-size: 11.5px; font-family: var(--font-mono); }
.item-time { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; font-family: var(--font-mono); }
.item-detail { color: var(--text-secondary); font-size: 13px; margin: 8px 0; line-height: 1.5; }
.ai-box { background: var(--surface-2); border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; color: var(--text-secondary); margin: 8px 0; line-height: 1.55; }
.ai-box b { color: var(--text-primary); font-weight: 600; }
.meta-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.timeline-log { border-left: 2px solid var(--grid); margin: 10px 0 4px 6px; padding-left: 14px; display: flex; flex-direction: column; gap: 8px; }
.tl-item { font-size: 12.5px; color: var(--text-secondary); }
.tl-item .tl-by { color: var(--series-1); font-weight: 600; }
.tl-item .tl-t { color: var(--muted); font-size: 11px; }

/* Compliance */
.comp-row { margin-bottom: 18px; }
.comp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.comp-name { font-weight: 600; font-size: 14px; }
.comp-pct { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.comp-track { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.comp-fill { height: 100%; border-radius: 4px 0 0 4px; background: var(--series-1); }
.comp-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Cinematic hero banner (Higgsfield-generated art) */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 16px;
  background: var(--surface-1); min-height: 200px;
  display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  animation: heroDrift 24s ease-in-out infinite alternate;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
@keyframes heroDrift { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0.12) 0%, rgba(13,13,13,0.28) 60%, rgba(13,13,13,0.85) 100%),
              linear-gradient(90deg, rgba(13,13,13,0.45), transparent 38%);
}
.hero-content { position: relative; padding: 24px 26px 20px; width: 100%; display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.hero-title { font-family: var(--font-serif); font-size: 32px; font-weight: 500; letter-spacing: -0.3px; color: #f6f4ee; text-shadow: 0 2px 18px rgba(0,0,0,0.9); }
.hero-sub { color: rgba(246,244,238,0.82); font-size: 13px; margin-top: 6px; text-shadow: 0 1px 10px rgba(0,0,0,0.9); }
.hero-status { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500;
  background: rgba(15,15,12,0.6); backdrop-filter: blur(8px); color: rgba(246,244,238,0.9);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 12px;
}

/* Risk meter + threat radar */
.risk-hero { text-align: center; padding: 8px 0 4px; }
.risk-num { font-family: var(--font-display); font-size: 42px; font-weight: 650; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.risk-cap { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.radar-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
.radar { width: 190px; height: 190px; }
.radar-sweep { transform-origin: 50% 50%; animation: sweep 4s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-blip { animation: blip 4s ease-out infinite; }
@keyframes blip { 0%, 8% { opacity: 1; } 60% { opacity: 0.25; } 100% { opacity: 1; } }

/* Item cards */
.item-card { transition: border-color 0.15s ease; }
.item-card:hover { border-color: var(--border-strong); }

/* Page title accent — sage editorial bar */
.page-title { position: relative; padding-left: 14px; }
.page-title::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px;
  border-radius: 2px; background: var(--accent-2);
}

/* Toasts */
#toast-wrap { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 2px solid var(--accent); border-radius: var(--radius-sm); padding: 11px 15px; font-size: 12.5px; max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); animation: slidein 0.25s ease; }
.toast.crit { border-left-color: var(--critical); }
.toast .t-sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

/* ---------- Command palette ---------- */
.palette-overlay[hidden], .drawer[hidden] { display: none; }
.palette-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh;
}
.palette {
  width: min(600px, 92vw); background: var(--surface-1); border: 1px solid var(--border-strong);
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.65);
  animation: slidein 0.15s ease;
}
.palette-input {
  width: 100%; background: transparent; border: 0; outline: 0; color: var(--text-primary);
  font-family: var(--font); font-size: 15.5px; padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.palette-results { max-height: 46vh; overflow-y: auto; padding: 6px; }
.palette-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  cursor: pointer; font-size: 13.5px;
}
.palette-item:hover, .palette-item.sel { background: var(--surface-2); }
.palette-item .pi-kind {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; font-family: var(--font-mono);
  color: var(--muted); background: var(--surface-3); border-radius: var(--radius-xs); padding: 3px 7px; min-width: 64px; text-align: center;
}
.palette-item .pi-meta { margin-left: auto; color: var(--muted); font-size: 11.5px; font-family: var(--font-mono); }
.palette-empty { color: var(--muted); text-align: center; padding: 22px; font-size: 13px; }

/* ---------- AI Analyst drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw); z-index: 150;
  background: var(--surface-1);
  border-left: 1px solid var(--border-strong);
  box-shadow: -18px 0 50px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
  animation: drawerIn 0.2s ease;
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 12px; border-bottom: 1px solid var(--border); }
.drawer-title { font-family: var(--font-serif); font-size: 18px; font-weight: 500; color: var(--text-primary); }
.drawer-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.drawer-chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.analyst-hint { color: var(--muted); font-size: 13px; }
.analyst-msg { display: flex; animation: slidein 0.2s ease; }
.analyst-msg.user { justify-content: flex-end; }
.analyst-msg.ai { justify-content: flex-start; }
.am-bubble { max-width: 85%; font-size: 13px; line-height: 1.6; padding: 10px 13px; border-radius: 15px; }
.analyst-msg.user .am-bubble { background: linear-gradient(115deg, #2b4a86, #45608f); color: #fff; border-bottom-right-radius: 5px; }
.analyst-msg.ai .am-bubble { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-primary); border-bottom-left-radius: 5px; }
.am-dots { display: inline-flex; gap: 4px; align-items: center; }
.am-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); display: inline-block; animation: amdot 1s infinite; }
.am-dots i:nth-child(2) { animation-delay: .15s; }
.am-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes amdot { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.drawer-ask { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-1); }
.drawer-ask input { flex: 1; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 22px; padding: 10px 15px; font-size: 13.5px; color: var(--text-primary); font-family: inherit; }
.drawer-ask input:focus { outline: none; border-color: var(--accent); }
.drawer-ask button { border-radius: 50%; width: 38px; height: 38px; padding: 0; font-size: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; line-height: 1; }
.ai-spark { color: var(--accent); font-size: 13px; }

/* ---------- Triage queue (dashboard) ---------- */
.tq-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--surface-2); border-radius: 9px; margin-bottom: 8px; }
.tq-rank { font-family: var(--font-mono); font-weight: 600; color: var(--muted); font-size: 12px; width: 20px; }
.tq-body { min-width: 0; flex: 1; }
.tq-type { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tq-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.tq-risk { font-family: var(--font-display); font-weight: 700; font-size: 17px; width: 38px; text-align: right; }
.tq-actions { display: flex; gap: 6px; }
.tq-actions .btn { padding: 4px 9px; font-size: 11.5px; }

/* ---------- Attack origins beams ---------- */
.beam-flow { stroke-dasharray: 6 10; animation: beamflow 1.2s linear infinite; }
@keyframes beamflow { to { stroke-dashoffset: -16; } }
.origin-item { margin-bottom: 13px; }
.origin-row { display: flex; align-items: baseline; gap: 9px; font-size: 13px; margin-bottom: 6px; }
.origin-code { font-family: var(--font-mono); font-size: 10px; color: var(--muted); width: 20px; letter-spacing: 0.5px; }
.origin-name { color: var(--text-secondary); margin-right: auto; }
.origin-crit { color: #ff8585; font-size: 10px; font-weight: 600; font-family: var(--font-mono); }
.origin-count { font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); min-width: 26px; text-align: right; }
.origin-bar { height: 4px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.origin-bar span { display: block; height: 100%; border-radius: 3px; transition: width 0.6s cubic-bezier(0.22,0.7,0.15,1); }

/* ---------- Investigation Workbench ---------- */
.inv-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .inv-layout { grid-template-columns: 1fr; } }
.inv-side { display: flex; flex-direction: column; gap: 10px; }
.inv-history { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow-y: auto; }
.inv-case { text-align: left; background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; cursor: pointer; }
.inv-case:hover { border-color: rgba(57,135,229,0.4); }
.inv-case.active { border-color: var(--series-1); background: rgba(57,135,229,0.08); }
.inv-case-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.inv-case-ex { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.inv-mode { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; text-align: left; }
.inv-mode:hover { border-color: rgba(57,135,229,0.4); }
.inv-mode.active { border-color: var(--series-1); background: rgba(57,135,229,0.08); }
.inv-mode-ico { color: var(--muted); height: 16px; }
.inv-mode.active .inv-mode-ico { color: var(--accent); }
.inv-mode-label { font-size: 12.5px; font-weight: 500; margin-top: 7px; color: var(--text-secondary); }
.inv-mode.active .inv-mode-label { color: var(--text-primary); }
.inv-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.inv-textarea { width: 100%; min-height: 240px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 12px; color: var(--text-primary); font-family: var(--font-mono); font-size: 12.5px; resize: vertical; line-height: 1.5; }
.inv-textarea:focus { outline: none; border-color: var(--series-1); }
.inv-runbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.inv-note { font-size: 11.5px; color: var(--muted); }
.ai-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.ai-badge .ab-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ai-badge.live { background: rgba(55,217,158,0.12); color: #5fe3b6; border-color: rgba(55,217,158,0.3); }
.ai-badge.demo { background: rgba(255,207,92,0.12); color: #ffd77e; border-color: rgba(255,207,92,0.3); }
.verdict-strip { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid; }
.verdict-malicious { background: rgba(208,59,59,0.12); border-color: rgba(208,59,59,0.5); }
.verdict-suspicious { background: rgba(236,131,90,0.12); border-color: rgba(236,131,90,0.5); }
.verdict-benign { background: rgba(12,163,12,0.10); border-color: rgba(12,163,12,0.45); }
.verdict-inconclusive { background: var(--surface-2); border-color: var(--border); }
.verdict-ico { line-height: 1; }
.verdict-ico .ic { width: 22px; height: 22px; }
.verdict-bar { width: 3px; border-radius: 2px; align-self: stretch; flex-shrink: 0; }
.verdict-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.verdict-name { font-family: var(--font-display); font-weight: 650; font-size: 15px; letter-spacing: 0.3px; }
.verdict-name.malicious { color: #ff8585; } .verdict-name.suspicious { color: #ffb072; }
.verdict-name.benign { color: #5fe3b6; } .verdict-name.inconclusive { color: var(--text-secondary); }
.verdict-meta { font-size: 12px; color: var(--text-secondary); }
.verdict-summary { font-size: 13.5px; color: var(--text-primary); margin-top: 8px; line-height: 1.55; }
.inv-section-label { font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.finding { background: var(--surface-2); border: 1px solid var(--grid); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.finding-obs { font-size: 13px; }
.finding-sig { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ioc-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid var(--grid); font-size: 12.5px; }
.ioc-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #8ab8f0; width: 52px; flex-shrink: 0; }
.ioc-val { font-family: var(--font-mono); color: var(--text-primary); word-break: break-all; }
.ioc-note { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.rec-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rec-list li { display: flex; gap: 10px; font-size: 13px; }
.rec-num { font-family: var(--font-mono); color: var(--series-1); font-weight: 600; }
.script-block { background: #0c0c0c; border: 1px solid var(--baseline); border-radius: 9px; padding: 12px; font-family: var(--font-mono); font-size: 12px; color: #d6e2f0; overflow-x: auto; white-space: pre-wrap; line-height: 1.5; }
.chk-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-bottom: 1px solid var(--grid); cursor: pointer; }
.chk-row:hover { background: var(--surface-2); }
.chk-box { width: 16px; height: 16px; border: 1px solid var(--muted); border-radius: 4px; flex-shrink: 0; margin-top: 1px; display: grid; place-items: center; font-size: 11px; }
.chk-box.done { background: var(--good); border-color: var(--good); color: #fff; }
.chk-task.done { text-decoration: line-through; color: var(--muted); }
.chk-prio { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 4px; margin-right: 7px; }
.chk-prio.immediate { background: rgba(208,59,59,0.15); color: #ff9c9c; }
.chk-prio.short_term { background: rgba(250,178,25,0.14); color: var(--warning); }
.chk-prio.follow_up { background: var(--surface-2); color: var(--muted); }
.email-box { background: var(--surface-2); border: 1px solid var(--grid); border-radius: 9px; padding: 14px; }
.email-subj { font-weight: 600; font-size: 13.5px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--grid); }
.email-body { font-size: 13px; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.6; }

/* ---------- Fancy triage graphs ---------- */
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut { width: 128px; height: 128px; flex-shrink: 0; }
.donut-arc { filter: drop-shadow(0 0 4px currentColor); animation: donutIn 0.9s cubic-bezier(0.22,0.7,0.15,1) both; }
@keyframes donutIn { from { opacity: 0; } to { opacity: 1; } }
.donut-val { font-family: var(--font-display); font-size: 26px; font-weight: 700; fill: var(--text-primary); }
.donut-lbl { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; fill: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 120px; }
.dl-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.dl-dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.dl-name { flex: 1; }
.dl-val { font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); }

.funnel { display: flex; flex-direction: column; gap: 14px; padding-top: 2px; }
.fn-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.fn-lbl { font-size: 12.5px; color: var(--text-secondary); }
.fn-num { font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); }
.fn-conv { margin-left: auto; font-size: 10.5px; font-family: var(--font-mono); color: var(--muted); }
.fn-track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.fn-bar { display: block; height: 100%; border-radius: 5px; animation: fnGrow 0.8s cubic-bezier(0.22,0.7,0.15,1) both; box-shadow: 0 0 14px -4px currentColor; }
@keyframes fnGrow { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); } }

.gauge-wrap { text-align: center; }
.gauge { width: 100%; max-width: 180px; height: auto; }
.gauge-fill { animation: gaugeIn 1s cubic-bezier(0.22,0.7,0.15,1) both; filter: drop-shadow(0 0 6px rgba(47,222,208,0.5)); }
@keyframes gaugeIn { from { stroke-dasharray: 0 999; } }
.gauge-val { font-family: var(--font-display); font-size: 24px; font-weight: 700; fill: var(--text-primary); }
.gauge-lbl { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.gauge-sub { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* ---------- KPI sparklines ---------- */
.kpi-spark { margin-top: auto; padding-top: 12px; height: 42px; }
.kpi-spark svg { width: 100%; height: 42px; display: block; }

/* ---------- World attack map ---------- */
.worldmap-wrap { position: relative; }
.worldmap-wrap svg { width: 100%; height: auto; display: block; }
.map-dot-grid { fill: rgba(15,23,42,0.10); }
.map-arc { fill: none; stroke-linecap: round; opacity: 0.9; }
.map-arc-anim { stroke-dasharray: 4 8; animation: arcflow 1s linear infinite; }
@keyframes arcflow { to { stroke-dashoffset: -12; } }
.map-pulse { transform-origin: center; animation: mappulse 2s ease-out infinite; }
@keyframes mappulse { 0% { r: 3; opacity: 1; } 100% { r: 12; opacity: 0; } }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.map-legend b { color: var(--text-primary); font-family: var(--font-mono); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 7px; height: 7px; border-radius: 1px; display: inline-block; }

/* ---------- MITRE ATT&CK matrix ---------- */
.mitre-scroll { overflow-x: auto; padding-bottom: 8px; }
.mitre-grid { display: flex; gap: 8px; min-width: min-content; }
.mitre-col { flex: 0 0 150px; }
.mitre-col-head { font-size: 11px; font-weight: 700; color: var(--text-secondary); padding: 8px 8px 6px; border-bottom: 2px solid var(--baseline); margin-bottom: 8px; min-height: 46px; line-height: 1.3; }
.mitre-col-head .mc-count { display: inline-block; margin-top: 3px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); font-weight: 500; }
.mitre-cell { border-radius: 7px; padding: 8px 9px; margin-bottom: 6px; cursor: pointer; border: 1px solid var(--border); background: var(--surface-2); transition: transform 0.12s ease; }
.mitre-cell:hover { transform: translateY(-1px); border-color: var(--muted); }
.mitre-cell .mc-tid { font-family: var(--font-mono); font-size: 10px; opacity: 0.85; }
.mitre-cell .mc-name { font-size: 11.5px; font-weight: 600; margin-top: 2px; line-height: 1.25; }
.mitre-cell .mc-n { float: right; font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.mitre-empty-cell { border: 1px dashed var(--grid); border-radius: 7px; padding: 8px; margin-bottom: 6px; opacity: 0.35; font-size: 10px; color: var(--muted); text-align: center; }
.heat-1 { background: rgba(47,222,208,0.12); border-color: rgba(47,222,208,0.3); }
.heat-2 { background: rgba(255,207,92,0.14); border-color: rgba(255,207,92,0.34); }
.heat-3 { background: rgba(255,157,77,0.16); border-color: rgba(255,157,77,0.4); }
.heat-4 { background: rgba(255,93,93,0.18); border-color: rgba(255,93,93,0.45); }
.heat-4 .mc-name { color: #ff8585; }

/* ---------- Asset drill-down drawer ---------- */
.asset-drawer { width: min(460px, 94vw); }
.tbl tr.clickable { cursor: pointer; }
.asset-stat { display: flex; gap: 12px; margin: 12px 0; }
.asset-stat .as-box { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.as-box .as-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.as-box .as-val { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 3px; }

/* ---------- Integrations ---------- */
.intg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.intg-card { background: linear-gradient(180deg, var(--glass), rgba(255,255,255,0.012)), var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: transform 0.25s ease, border-color 0.25s ease; }
.intg-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.intg-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.intg-logo { width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border-strong); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--accent); flex-shrink: 0; }
.intg-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intg-cat { font-size: 11px; color: var(--muted); margin-top: 1px; }
.intg-status { margin-left: auto; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.intg-kind { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; min-height: 32px; }
.intg-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--grid); }
.intg-events { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }

/* ---------- Threat intel feed ---------- */
.intel-feed { display: flex; flex-direction: column; gap: 10px; }
.intel-item { display: flex; gap: 0; background: linear-gradient(180deg, var(--glass), rgba(255,255,255,0.012)), var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease; }
.intel-item:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.intel-sev { width: 3px; flex-shrink: 0; }
.intel-critical { background: var(--critical); } .intel-high { background: var(--serious); } .intel-medium { background: var(--warning); } .intel-low { background: var(--good); }
.intel-body { padding: 14px 16px; min-width: 0; }
.intel-top { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.intel-src { font-size: 11.5px; color: var(--text-secondary); font-weight: 600; }
.intel-ago { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-left: auto; }
.intel-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.intel-rel { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.intel-rel b { color: var(--accent); font-weight: 600; }

/* ---------- Drill-down KPI affordance ---------- */
.kpi.drillable { cursor: pointer; }
.kpi.drillable::after { content: "↗"; position: absolute; top: 12px; right: 14px; font-size: 12px; color: var(--muted); opacity: 0; transition: opacity 0.2s ease; }
.kpi.drillable:hover::after { opacity: 1; }
.drill-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 6px; cursor: pointer; }
.drill-row:hover { background: var(--surface-3); }
.drill-row .dr-main { min-width: 0; flex: 1; }
.drill-row .dr-title { font-size: 13px; font-weight: 500; }
.drill-row .dr-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.drill-row .dr-val { font-family: var(--font-mono); font-weight: 700; }
.drill-stat { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.drill-stat .ds { flex: 1; min-width: 90px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.drill-stat .ds-v { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.drill-stat .ds-l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 2px; }

/* ---------- Executive report ---------- */
.report-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); overflow-y: auto; padding: 40px 20px; }
.report-overlay[hidden] { display: none; }
.report-sheet { max-width: 900px; margin: 0 auto; background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 40px 44px; box-shadow: 0 40px 100px rgba(0,0,0,0.6); animation: slidein 0.25s ease; }
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.rp-eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.rp-title { font-family: var(--font-serif); font-size: 34px; font-weight: 500; letter-spacing: -0.5px; margin-top: 8px; }
.rp-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
.rp-actions { display: flex; gap: 8px; flex-shrink: 0; }
.rp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin: 26px 0; }
.rp-kpi { background: var(--surface-1); padding: 18px 16px; text-align: center; }
.rp-v { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; }
.rp-l { font-size: 11px; color: var(--muted); margin-top: 8px; letter-spacing: 0.3px; }
.rp-narrative { font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 26px; }
.rp-narrative b { color: var(--text-primary); font-weight: 600; }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 700px) { .rp-grid { grid-template-columns: 1fr; } .rp-kpis { grid-template-columns: repeat(2, 1fr); } }
.rp-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.rp-ct { font-family: var(--font-serif); font-size: 15px; margin-bottom: 14px; }
.rp-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.rp-bar-l { width: 42%; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-bar-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.rp-bar { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.rp-bar-v { font-family: var(--font-mono); font-weight: 700; min-width: 26px; text-align: right; }
.rp-foot { font-size: 11px; color: var(--muted); margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); line-height: 1.6; }
@media print {
  body * { visibility: hidden; }
  .report-overlay, .report-overlay * { visibility: visible; }
  .report-overlay { position: absolute; inset: 0; background: #fff; padding: 0; }
  .report-sheet { box-shadow: none; border: none; color: #111; max-width: 100%; }
  .rp-actions { display: none; }
}

/* ---------- Playbooks ---------- */
.inc-pb { background: var(--surface-2); border: 1px solid var(--border); border-left: 2px solid var(--accent-2); border-radius: var(--radius-sm); padding: 11px 13px; margin: 8px 0; }
.inc-pb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inc-pb-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: var(--accent-2); background: rgba(139,123,255,0.12); border: 1px solid rgba(139,123,255,0.3); border-radius: var(--radius-xs); padding: 2px 7px; }
.inc-pb-name { font-size: 13px; font-weight: 600; }
.inc-pb-toggle { margin-left: auto; background: transparent; border: 0; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; }
.inc-pb-steps { margin-top: 12px; }
.inc-pb-sum { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.pb-step { display: flex; gap: 11px; padding: 9px 0; border-top: 1px solid var(--grid); }
.pb-step:first-child { border-top: 0; }
.pb-step-n { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border-strong); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); }
.pb-step-body { min-width: 0; }
.pb-step-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pb-auto { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.5px; color: #5fe3b6; background: rgba(55,217,158,0.14); border-radius: 3px; padding: 1px 5px; }
.pb-manual { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.5px; color: var(--muted); background: var(--surface-3); border-radius: 3px; padding: 1px 5px; }
.pb-step-detail { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; line-height: 1.5; }
.pb-step-where { font-size: 11.5px; color: var(--accent); margin-top: 4px; font-family: var(--font-mono); }
.pb-config { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pb-mode { font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 3px 10px; border: 1px solid var(--border-strong); border-radius: 20px; user-select: none; }
.pb-mode.on { color: #5fe3b6; border-color: rgba(55,217,158,0.4); background: rgba(55,217,158,0.1); }
.pb-triggers { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.pb-trigger { font-size: 11px; color: var(--text-secondary); background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }
.pb-card .inc-pb-steps { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 14px; }

.empty { color: var(--muted); padding: 30px 0; text-align: center; font-size: 13px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--baseline); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- chip-good (green) ---------- */
.chip-good { background: rgba(55,217,158,0.12); color: #5fe3b6; border-color: rgba(55,217,158,0.3); }

/* inline SVG flags */
.flag-inline { vertical-align: -2px; border-radius: 1.5px; margin-right: 3px; }
.map-flag { pointer-events: none; }

/* ---------- Interactive attack map ---------- */
.map-node { cursor: pointer; }
.map-node:hover ~ text { fill: var(--text-primary); }
.map-packet { filter: drop-shadow(0 0 3px currentColor); }
.hq-ring { animation: hqpulse 2.4s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes hqpulse { 0% { opacity: .9; } 50% { opacity: .3; } 100% { opacity: .9; } }
.map-hint { color: var(--muted); font-style: italic; margin-left: auto; }
.map-tip {
  position: absolute; z-index: 30; min-width: 168px; max-width: 200px;
  background: rgba(10,13,20,0.96); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 12px; pointer-events: none;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.7); backdrop-filter: blur(6px);
}
.map-tip .mt-h { font-weight: 600; font-size: 12.5px; color: var(--text-primary); margin-bottom: 7px; }
.map-tip .mt-r { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-secondary); padding: 2px 0; }
.map-tip .mt-r b { font-family: var(--font-mono); color: var(--text-primary); }
.map-tip .mt-r b.mt-crit { color: #ff8585; }
.map-tip .mt-cta { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--accent); }

/* drill drawer stats + table */
.drill-stat-row { display: flex; gap: 12px; margin-bottom: 16px; }
.drill-stat { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.drill-stat .ds-v { font-size: 24px; font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); }
.drill-stat .ds-l { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.drawer-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.drawer-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.drawer-table td { padding: 8px; border-bottom: 1px solid var(--border); color: var(--text-secondary); text-transform: capitalize; }
.drawer-table td.mono { font-family: var(--font-mono); text-transform: none; color: var(--text-primary); }

/* custom connector accents */
.intg-custom { border-color: rgba(139,123,255,0.35); }
.custom-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; color: var(--accent-2); background: rgba(139,123,255,0.14); border: 1px solid rgba(139,123,255,0.35); border-radius: 20px; padding: 1px 7px; vertical-align: middle; margin-left: 4px; font-family: var(--font-mono); }
.intg-endpoint { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 5px; word-break: break-all; }

/* ---------- Attack paths (kill-chain graph) ---------- */
.ap-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ap-tab { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-1); border: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 30px; cursor: pointer; transition: .2s; }
.ap-tab:hover { color: var(--text-primary); border-color: var(--border-strong); }
.ap-tab.active { color: var(--text-primary); border-color: var(--accent); background: var(--surface-2); }
.ap-dotsev { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ap-summary { margin-bottom: 18px; }
.ap-summary .ap-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-left: 8px; }
.ap-summary .ap-status { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-left: 8px; font-family: var(--font-mono); }
.ap-summary p { color: var(--text-secondary); font-size: 13.5px; line-height: 1.6; margin: 10px 0 12px; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); }
.ap-meta b { color: var(--text-primary); font-family: var(--font-mono); }

.ap-scroll { overflow-x: auto; padding: 4px 2px 10px; }
.ap-canvas { position: relative; min-width: min-content; }
.ap-heads { position: absolute; top: 0; left: 0; right: 0; height: 30px; }
.ap-stage { position: absolute; top: 0; text-align: center; font-size: 10.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); font-family: var(--font-mono); }
.ap-edges { position: absolute; overflow: visible; }
.ap-edge { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 5 6; animation: arcflow 1s linear infinite; opacity: .8; }
.ap-nodes { position: absolute; left: 0; right: 0; top: 0; }
.ap-nstage { position: absolute; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 9px; }
.ap-snum { font-family: var(--font-mono); font-size: 9px; color: var(--accent); background: rgba(43,74,134,.10); border-radius: 4px; padding: 1px 5px; }
.ap-node { position: absolute; display: flex; flex-direction: column; gap: 3px; background: var(--surface-1); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); padding: 14px 15px 13px; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 26px -18px rgba(15,23,42,.25); transition: transform .15s, box-shadow .15s, opacity .2s, border-color .15s; overflow: hidden; }
.ap-node:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -16px rgba(15,23,42,.35); }
.ap-node.sev-critical { border-left-color: var(--critical); }
.ap-node.sev-high { border-left-color: var(--serious); }
.ap-node.sev-medium { border-left-color: var(--warning); }
.ap-node.sev-low { border-left-color: var(--good); }
.ap-nhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ap-nico { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ap-nico svg { width: 15px; height: 15px; }
.ap-node.sev-critical .ap-nico { color: var(--critical); background: rgba(224,65,63,.12); }
.ap-node.sev-high .ap-nico { color: var(--serious); background: rgba(239,122,52,.13); }
.ap-node.sev-medium .ap-nico { color: var(--warning); background: rgba(217,142,0,.15); }
.ap-node.sev-low .ap-nico { color: var(--good); background: rgba(16,163,127,.12); }
.ap-ntype { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ap-sevtag { margin-left: auto; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 20px; }
.ap-sevtag.critical { color: #c0392b; background: rgba(224,65,63,.12); }
.ap-sevtag.high { color: #c85a15; background: rgba(239,122,52,.14); }
.ap-sevtag.medium { color: #9a6a00; background: rgba(217,142,0,.16); }
.ap-sevtag.low { color: #0a7f66; background: rgba(16,163,127,.14); }
.ap-nl { font-size: 14.5px; font-weight: 700; line-height: 1.3; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ns { font-size: 11.5px; line-height: 1.4; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-nmeta { margin-top: auto; font-size: 11px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--border); }
.ap-nmeta b { color: var(--accent); font-family: var(--font-mono); }
.ap-tech { position: absolute; transform: translate(-50%, -50%); background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px; font-size: 10px; color: var(--text-secondary); font-family: var(--font-mono); white-space: nowrap; pointer-events: none; z-index: 2; }
.ap-tech b { color: var(--accent); }
/* highlight on hover */
.ap-canvas.ap-dim .ap-node { opacity: .3; }
.ap-canvas.ap-dim .ap-edge { opacity: .12; }
.ap-canvas.ap-dim .ap-tech { opacity: .2; }
.ap-node.lit { opacity: 1 !important; border-color: var(--accent); }
.ap-edge.lit { opacity: 1 !important; stroke: var(--accent); }
.ap-tech.lit { opacity: 1 !important; border-color: var(--accent); color: var(--text-primary); }
.ap-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 11.5px; color: var(--muted); align-items: center; }
.ap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ap-lg-ic { color: var(--text-secondary); display: flex; }
.ap-hint { margin-left: auto; font-style: italic; }
.drawer-sec { margin-top: 14px; }
.drawer-sec h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 6px; }
.ap-drawer-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; }
.ap-drawer-list b { color: var(--accent); font-family: var(--font-mono); }

/* ---------- Admin console ---------- */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.atab { background: none; border: none; color: var(--text-secondary); font-size: 13.5px; font-weight: 500; padding: 10px 16px; cursor: pointer; position: relative; border-radius: 8px 8px 0 0; }
.atab:hover { color: var(--text-primary); background: var(--surface-2); }
.atab.active { color: var(--accent); }
.atab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.admin-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.admin-form label { font-size: 12px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 5px; }
.admin-form input, .admin-form select { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-primary); padding: 9px 11px; font-size: 13px; font-family: inherit; }
.admin-form input:focus, .admin-form select:focus { outline: none; border-color: var(--accent); }
.af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.af-scopes-lbl { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.scope-chk { flex-direction: row !important; align-items: center; gap: 7px !important; font-size: 12.5px; color: var(--text-primary); cursor: pointer; }
.scope-chk input { width: 15px; height: 15px; accent-color: var(--accent); }
.member-list { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.member { display: flex; gap: 12px; align-items: flex-start; padding: 12px 6px; border-bottom: 1px solid var(--border); }
.member:last-child { border-bottom: none; }
.m-av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06201d; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.m-main { flex: 1; min-width: 0; }
.m-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; }
.m-email { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.m-scopes { display: flex; flex-wrap: wrap; gap: 5px; }
.scope-tag { font-size: 10.5px; color: var(--text-secondary); background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px; }
.scope-tag.muted { color: var(--muted); font-style: italic; }
.m-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.m-role { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-primary); padding: 5px 8px; font-size: 12px; cursor: pointer; }
.m-role:disabled { opacity: 0.6; cursor: default; }
.m-owner { font-size: 10.5px; color: var(--muted); }
.btn-sm { padding: 4px 12px !important; font-size: 12px !important; }
.m-remove { color: #ff8585; border-color: rgba(255,93,93,0.3); }
.m-remove:hover { background: rgba(255,93,93,0.1); }

/* admin playbooks */
.pb-admin-list { display: flex; flex-direction: column; gap: 12px; }
.pb-admin { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pb-admin.off { opacity: 0.6; }
.pb-a-head { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; align-items: flex-start; }
.pb-a-head:hover { background: var(--surface-2); }
.pb-a-name { font-size: 14.5px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.pb-a-sub { font-size: 12.5px; color: var(--text-secondary); margin: 4px 0 8px; line-height: 1.5; }
.pb-a-trig { display: flex; flex-wrap: wrap; gap: 5px; }
.pb-a-ctl { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pb-a-ctl select { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 20px; color: var(--text-primary); padding: 5px 12px; font-size: 12px; cursor: pointer; }
.pb-a-steps { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; padding: 0 18px; }
.pb-admin.open .pb-a-steps { max-height: 900px; padding: 4px 18px 18px; }
.pb-step { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.pb-step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--font-mono); }
.pb-step-t { font-size: 13px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.pb-step-w { font-size: 11.5px; color: var(--accent); font-family: var(--font-mono); margin: 3px 0; }
.pb-step-d { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }

/* admin platform */
.plan-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.plan-row:last-child { border-bottom: none; }
.plan-row b { color: var(--text-primary); font-weight: 600; }
.host-opt { padding: 10px 0; border-bottom: 1px solid var(--border); }
.host-opt b { display: block; color: var(--text-primary); font-size: 13px; margin-bottom: 2px; }
.host-opt span { font-size: 12px; color: var(--muted); }
.api-field { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.api-field .api-lbl { font-size: 11.5px; color: var(--muted); min-width: 108px; }
.api-field code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 4px 9px; font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }
@media (max-width: 720px) { .af-row { grid-template-columns: 1fr; } .scope-grid { grid-template-columns: 1fr; } }

/* ============================================================
   LIGHT THEME REFINEMENTS (override dark-tuned hardcoded bits)
   ============================================================ */
/* soft elevation so white cards read on the light canvas */
.card, .kpi, .item-card, .intg-card, .intel-item, .pb-admin, .step, .comp-row {
  box-shadow: 0 1px 2px rgba(15,23,42,0.05), 0 8px 24px -18px rgba(15,23,42,0.18);
}
.card:hover, .kpi:hover {
  box-shadow: 0 12px 32px -18px rgba(15,23,42,0.28), 0 0 0 1px var(--border) !important;
}
/* KPI big numbers → brand gradient text (background-image, so it doesn't reset background-clip) */
.kpi-value { background-image: linear-gradient(115deg,#2b4a86,#45608f); background-color: transparent; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
/* equal-height KPI cards with sparkline pinned to the bottom */
.kpi { display: flex; flex-direction: column; min-height: 156px; }
.kpi-label { min-height: 26px; }
.kpi-delta { margin-top: 6px; }
.risk-num { color: var(--accent); }
/* sidebar: subtle raised panel, active item tint */
.sidebar { background: var(--surface-1); box-shadow: 1px 0 0 var(--border); }
.nav-item.active { background: linear-gradient(90deg, rgba(43,74,134,0.10), rgba(43,74,134,0.02)); color: var(--text-primary); }
.nav-item.active::before { background: var(--accent); }
.brand-mark { background: linear-gradient(135deg,#2b4a86,#45608f); color:#fff; }
/* member avatar text on gradient */
.m-av { color: #fff; }
/* code blocks stay dark on purpose (readability) */

/* light gradient dashboard header */
.hero-lite {
  position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 26px;
  padding: 40px 40px 34px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(110,114,118,0.16), transparent 55%),
    radial-gradient(120% 160% at 0% 100%, rgba(63,96,152,0.14), transparent 55%),
    linear-gradient(120deg, #e9edf7 0%, #eef1f8 50%, #eaf0f6 100%);
  border: 1px solid var(--border);
}
.hero-lite .hl-glow { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
  linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(ellipse 70% 80% at 80% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 0%, #000, transparent 70%); pointer-events: none; }
.hero-lite .hl-inner { position: relative; z-index: 1; }
.hero-lite .hero-eyebrow { color: var(--accent); font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; opacity: 1; animation: none; }
.hl-title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); line-height: 1.05; }
.hl-grad { background: linear-gradient(115deg,#2b4a86,#45608f 55%,#3f6098); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hl-sub { color: var(--text-secondary); font-size: 15.5px; max-width: 620px; margin: 14px 0 22px; }
.hl-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.75); border: 1px solid var(--border-strong); color: var(--text-secondary); font-size: 12.5px; font-weight: 500; padding: 7px 13px; border-radius: 30px; backdrop-filter: blur(4px); }
.hero-pill b { color: var(--text-primary); font-weight: 700; font-family: var(--font-display); }
.hero-pill.on { color: #0a7f66; border-color: rgba(16,163,127,.3); background: rgba(16,163,127,.08); }
.hero-pill .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #3f6098; box-shadow: 0 0 0 3px rgba(63,96,152,.2); }
.prod-badge { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: rgba(43,74,134,.10); border: 1px solid rgba(43,74,134,.28); border-radius: 20px; padding: 4px 12px; align-self: flex-start; white-space: nowrap; }

/* Live attack-map "LIVE" pill + event ping */
.live-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #b0342f; background: rgba(224,65,63,.10); border: 1px solid rgba(224,65,63,.28); border-radius: 20px; padding: 2px 9px; }
.live-tag .live-dot { width: 6px; height: 6px; border-radius: 50%; background: #e0413f; animation: livepulse 1.4s ease-in-out infinite; }
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.map-ping { animation: mapping 1s ease-out forwards; }
@keyframes mapping { from { r: 3; opacity: .85; } to { r: 22px; opacity: 0; } }

/* Product (Hound SOC Tower) sidebar lockup — clean, aligned, no cybersecurity mark */
.brand-prod { flex-direction: column; align-items: flex-start; gap: 3px; }
.prod-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: #1c2c4c; letter-spacing: -.01em; line-height: 1.1; }
.prod-name span { color: var(--accent-2); font-weight: 600; }
.prod-by { font-size: 10px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }

/* ===== Attack Paths — dark causality graph (Cortex-style) ===== */
.apg-wrap { border-radius: 16px; overflow: hidden; border: 1px solid #16223f; background: linear-gradient(160deg, #080d1a, #0d1428 55%, #0a1020); box-shadow: 0 24px 60px -30px rgba(4, 10, 28, .9); }
.apg-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 13px 18px; border-bottom: 1px solid #16223f; background: rgba(255,255,255,.02); }
.apg-bar-t { display: inline-flex; align-items: center; gap: 8px; color: #e8eefc; font-size: 13px; font-weight: 700; letter-spacing: .2px; }
.apg-live { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgba(61,220,151,.7); animation: apgPing 2s infinite; }
@keyframes apgPing { 70% { box-shadow: 0 0 0 8px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.apg-bar-s { color: #8b9dc4; font-size: 12px; }
.apg-scroll { overflow-x: auto; padding: 6px 0 2px; }
.apg-svg { display: block; min-width: min-content; }

.apg-rail { stroke: #24345c; stroke-width: 1.5; stroke-dasharray: 3 6; }
.apg-tick { stroke: #22314f; stroke-width: 1.4; stroke-dasharray: 2 5; }
.apg-tickdot { fill: #3f568f; }
.apg-stnum { fill: #55688f; font: 700 10px var(--font-mono, monospace); text-anchor: middle; letter-spacing: .5px; }
.apg-sttxt { fill: #93a7cc; font: 700 10.5px Inter, sans-serif; text-anchor: middle; letter-spacing: 1.3px; }

.apg-edge { fill: none; stroke: #33477a; stroke-width: 2; }
.apg-edge-flow { fill: none; stroke: #6f9bff; stroke-width: 2.2; stroke-dasharray: 7 12; opacity: .75; animation: apgDash 1.5s linear infinite; }
@keyframes apgDash { to { stroke-dashoffset: -38; } }
.apg-packet { fill: #9dc0ff; filter: drop-shadow(0 0 6px rgba(120,165,255,.95)); }
.apg-tid rect { fill: #0e1730; stroke: #2b3d68; stroke-width: 1; }
.apg-tid text { fill: #9fb4dd; font: 600 11px var(--font-mono, monospace); text-anchor: middle; letter-spacing: .3px; }
.apg-edgeg:hover .apg-edge { stroke: #6f9bff; }
.apg-edgeg:hover .apg-tid rect { stroke: #6f9bff; }

.apg-node { cursor: pointer; }
.apg-halo { fill: var(--sc); opacity: .13; filter: url(#apg-blur); }
.apg-pulse { fill: none; stroke: var(--sc); stroke-width: 1.4; opacity: .5; transform-origin: center; animation: apgPulse 2.8s ease-out infinite; }
@keyframes apgPulse { 0% { transform: scale(1); opacity: .5; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }
.apg-ring { fill: #0c1428; stroke: var(--sc); stroke-width: 2.4; }
.apg-core { fill: #101b36; stroke: rgba(255,255,255,.06); stroke-width: 1; }
.apg-ico { color: var(--sc); }
.apg-lbl { fill: #eaf1ff; font: 700 13.5px Inter, sans-serif; text-anchor: middle; }
.apg-sub { fill: #8ea3ca; font: 500 11.5px Inter, sans-serif; text-anchor: middle; }
.apg-meta { fill: #5d7099; font: 600 10px var(--font-mono, monospace); text-anchor: middle; letter-spacing: .6px; text-transform: uppercase; }
.apg-sevb circle { fill: var(--sc); }
.apg-sevb text { fill: #0a1020; font: 800 10px Inter, sans-serif; text-anchor: middle; }
.apg-node:hover .apg-ring { stroke-width: 3.4; }
.apg-node:hover .apg-halo { opacity: .3; }

.apg-svg.apg-dim .apg-node { opacity: .28; transition: opacity .15s; }
.apg-svg.apg-dim .apg-edgeg { opacity: .12; transition: opacity .15s; }
.apg-svg.apg-dim .apg-node.lit, .apg-svg.apg-dim .apg-edgeg.lit { opacity: 1; }
.apg-svg.apg-dim .apg-stage { opacity: .3; }

.apg-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 12px 18px; border-top: 1px solid #16223f; font-size: 11.5px; color: #8b9dc4; background: rgba(255,255,255,.015); }
.apg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.apg-lg-ic { color: #6f9bff; display: inline-flex; }
.apg-sevkey { margin-left: auto; gap: 8px !important; }
.apg-sevkey i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 6px; }

/* ---------- responsive shell (design-system pass) ----------
   styles.css had ten media queries but none of them collapsed the sidebar, so
   the console was unusable below roughly 900px. */
@media (max-width:900px){
  .app{flex-direction:column}
  .sidebar{width:auto!important;position:static!important;height:auto!important;
    border-right:none;box-shadow:0 1px 0 var(--border);flex-direction:column}
  .sidebar .nav{flex-direction:row;overflow-x:auto;gap:6px;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .sidebar .nav-item{white-space:nowrap;flex:0 0 auto}
  .sidebar-foot{flex-direction:row;align-items:center;justify-content:space-between}
  .main{padding:0 16px 20px}
}
@media (max-width:700px){
  /* the SOAR toggle, live pill and sign-out sat in a column that squeezed to
     three cramped lines once the sidebar went horizontal */
  .sidebar-foot{flex-wrap:wrap;gap:8px;padding:10px 16px}
  .sidebar-foot .live-pill{order:3;flex-basis:100%}
  .utc-clock{display:none}          /* decorative; it wrapped and clipped */
  .topbar{gap:10px;padding-inline:2px;flex-wrap:wrap;row-gap:8px}
  .topbar-right{gap:8px}
}
@media (max-width:560px){
  .main{padding:0 12px 16px}
}
