/* ─── Inter variable font — self-hosted, no external dependency, no FOUT ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('/css/fonts/inter-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url('/css/fonts/inter-variable-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Design tokens ─────────────────────────────────────────────────────── */

:root {
  --bg:           #080c14;
  --surface:      rgba(255,255,255,0.04);
  --surface-2:    rgba(255,255,255,0.07);
  --surface-solid:#0e1420;
  --border:       rgba(255,255,255,0.08);
  --border-2:     rgba(255,255,255,0.14);

  --text:         #e2e8f4;
  --text-2:       #8892a4;
  --text-3:       #4a5568;

  --blue:         #4f8ef7;
  --blue-dim:     rgba(79,142,247,0.12);

  --critical:     #f55252;
  --crit-dim:     rgba(245,82,82,0.12);
  --high:         #e8a44a;
  --high-dim:     rgba(232,164,74,0.12);
  --medium:       #d4a017;
  --med-dim:      rgba(212,160,23,0.12);
  --low:          #4ac97e;
  --low-dim:      rgba(74,201,126,0.12);
  --unknown:      #4a5568;

  --banking:      #4f8ef7;
  --govt:         #a78bfa;
  --health:       #4ac97e;
  --energy:       #f97316;
  --edu:          #06b6d4;
  --tech:         #ec4899;

  --navbar-h:     68px;
  --content-max:  1280px;
  --r:            8px;
  --r-lg:         12px;
  --mono:         ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 24px = 150% of 16px browser default — matches Chrome 150% zoom feel */
html { font-size: 24px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64'%3E%3Cpath d='M28 4 L52 18 L52 46 L28 60 L4 46 L4 18 Z' fill='none' stroke='%23ffffff' stroke-width='0.4' stroke-opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(79,142,247,0.07) 0%, transparent 60%);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #79beff; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ─── Navbar — centered layout ───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: rgba(8,12,20,0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.navbar-brand:hover {
  opacity: 0.92;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background:
    radial-gradient(circle at 50% 50%, rgba(226,232,244,0.94) 0 7%, transparent 8%),
    radial-gradient(circle at 50% 50%, transparent 0 26%, rgba(79,142,247,0.45) 27% 31%, transparent 32%),
    conic-gradient(from 312deg, rgba(74,201,126,0.96) 0 42deg, transparent 43deg 360deg),
    linear-gradient(135deg, #0f172a 0%, #1f3153 48%, #4f8ef7 100%);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(79,142,247,0.28), inset 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
}

.brand-mark::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(226,232,244,0.56);
  border-radius: 50%;
}

.brand-mark::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 2px;
  left: 15px;
  top: 15px;
  background: rgba(74,201,126,0.95);
  border-radius: 999px;
  transform: rotate(-30deg);
  transform-origin: left center;
  box-shadow: 0 0 10px rgba(74,201,126,0.5);
}

.brand-name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--low);
  background: rgba(74,201,126,0.1);
  border: 1px solid rgba(74,201,126,0.25);
  border-radius: 20px;
  padding: 2px 8px;
}

.live-dot {
  width: 5px;
  height: 5px;
  background: var(--low);
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-self: center;
}

.nav-link {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.nav-window {
  height: 38px;
  padding: 3px;
}

.nav-window .time-pill {
  min-width: 50px;
  height: 30px;
  padding: 0 10px;
  font-size: 0.65rem;
  font-weight: 700;
}

/* Search */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.7rem;
  padding: 5px 10px 5px 28px;
  width: 200px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.search-wrap input:focus {
  border-color: var(--blue);
  background: rgba(79,142,247,0.06);
}

.search-wrap input::placeholder { color: var(--text-3); }

.search-icon {
  position: absolute;
  left: 9px;
  color: var(--text-3);
  font-size: 0.8rem;
  pointer-events: none;
}

.btn-sync {
  background: rgba(79,142,247,0.12);
  border: 1px solid rgba(79,142,247,0.3);
  border-radius: 7px;
  color: var(--blue);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-sync:hover {
  background: rgba(79,142,247,0.22);
  border-color: rgba(79,142,247,0.5);
}

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* ─── Page layout ────────────────────────────────────────────────────────── */
.page {
  padding-top: calc(var(--navbar-h) + 28px);
  padding-bottom: 48px;
  padding-left: 36px;
  padding-right: 36px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.detail-body {
  overflow: hidden;
}

.detail-page {
  padding-top: calc(var(--navbar-h) + 10px);
  padding-bottom: 10px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.detail-page .breadcrumb {
  display: none;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.compact-page-meta {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  margin: -6px 0 8px;
}

.page-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ─── Time range pills ───────────────────────────────────────────────────── */
.time-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.nav-window {
  flex-wrap: nowrap;
}

.time-pill {
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.time-pill:hover { color: var(--text); }

.time-pill.active {
  background: var(--blue);
  color: #fff;
}

/* ─── Intel cards ────────────────────────────────────────────────────────── */
.intel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.intel-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  min-height: 252px;
  display: flex;
  flex-direction: column;
}

.intel-head {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.intel-rows {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 126px;
  margin-bottom: 14px;
}

.intel-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.sev-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sev-dot.critical { background: var(--critical); }
.sev-dot.high     { background: var(--high); }
.sev-dot.medium   { background: var(--medium); }
.sev-dot.low      { background: var(--low); }

.intel-label {
  font-size: 0.72rem;
  color: var(--text-2);
  min-width: 0;
  white-space: nowrap;
}

.intel-val {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.intel-val.c-critical { color: var(--critical); }
.intel-val.c-high     { color: var(--high); }
.intel-val.c-medium   { color: var(--medium); }
.intel-val.c-low      { color: var(--low); }
.intel-val.c-blue     { color: var(--blue); }

.intel-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-top: auto !important;
  margin-bottom: 12px;
}

.intel-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: 14px;
}

.intel-big {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  min-width: 86px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.intel-sub-rows {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 126px;
  margin-bottom: 14px;
}

.intel-sub-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.intel-sub-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-3);
  flex-shrink: 0;
}

/* ─── Dashboard overview ────────────────────────────────────────────────── */
.dashboard-page {
  --dash-s: 1.1;
  max-width: none;
  width: 100%;
  padding-left: calc(18px * var(--dash-s));
  padding-right: calc(18px * var(--dash-s));
  /* Default .page uses 48px bottom — dashboard ends on a card; keep scroll margin tighter */
  padding-bottom: calc(22px * var(--dash-s));
}

.wide-page {
  max-width: none;
  width: 100%;
  padding-left: 18px;
  padding-right: 18px;
}

.threats-page .card,
.actors-page .card,
.actors-page .filter-panel,
.threats-page .filter-panel,
.stack-risk-page .filter-panel,
.stack-risk-page .card {
  background: rgba(255,255,255,0.032);
}

.threats-page .data-table {
  font-size: 0.7rem;
}

.threats-page .data-table th,
.threats-page .data-table td {
  padding-left: 12px;
  padding-right: 12px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(14px * var(--dash-s, 1));
}

.dash-kpi {
  min-height: calc(88px * var(--dash-s, 1));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(79,142,247,0.08), transparent 44%),
    rgba(255,255,255,0.035);
  padding: calc(13px * var(--dash-s, 1)) calc(16px * var(--dash-s, 1));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: calc(6px * var(--dash-s, 1));
}

.dash-kpi-label {
  color: var(--text-3);
  font-size: calc(0.62rem * var(--dash-s, 1));
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dash-kpi-value {
  color: var(--text);
  font-size: calc(1.58rem * var(--dash-s, 1));
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.dash-kpi-sub {
  color: var(--text-3);
  font-size: calc(0.62rem * var(--dash-s, 1));
  line-height: 1.35;
}

.dash-kpi-delta {
  font-size: calc(0.58rem * var(--dash-s, 1));
  font-weight: 700;
  letter-spacing: 0.03em;
  min-height: calc(14px * var(--dash-s, 1));
}
.dash-kpi-delta.up   { color: var(--low); }
.dash-kpi-delta.down { color: var(--high); }
.dash-kpi-delta.flat { color: var(--text-3); }

.impact-panel {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.035);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Full-width row inside dashboard chart grid — uses grid gap, not extra margins */
.dashboard-chart-grid > .impact-panel {
  grid-column: 1 / -1;
  height: auto;
  min-height: 0;
  align-self: start;
}

/* Narrow vertical variant — sits alongside Top Threat Actors */
.dashboard-chart-grid > .impact-panel.impact-panel-narrow {
  grid-column: span 3;
  height: calc(400px * var(--dash-s, 1));
  align-self: stretch;
}

.impact-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(10px * var(--dash-s, 1));
  padding: calc(10px * var(--dash-s, 1)) calc(13px * var(--dash-s, 1)) calc(8px * var(--dash-s, 1));
  border-bottom: 1px solid var(--border);
}

.dashboard-page .impact-panel-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-start;
  gap: calc(10px * var(--dash-s, 1));
  text-align: center;
}
.dashboard-page .impact-panel-head > div:first-child {
  grid-column: 2;
  text-align: center;
}
.dashboard-page .impact-panel-head > .dash-info {
  grid-column: 3;
  justify-self: end;
}

.dashboard-page .dash-kpi-grid.mb-3 {
  margin-bottom: calc(10px * var(--dash-s));
}

.dashboard-page .dash-info {
  width: calc(20px * var(--dash-s));
  height: calc(20px * var(--dash-s));
  font-size: calc(0.54rem * var(--dash-s));
}

.dashboard-page .dash-info::after {
  top: calc(26px * var(--dash-s));
  padding: calc(10px * var(--dash-s)) calc(12px * var(--dash-s));
  font-size: calc(0.7rem * var(--dash-s));
}

.dashboard-page .kpi-skeleton {
  width: calc(56px * var(--dash-s));
  height: calc(1.2em * var(--dash-s));
}

.dashboard-page .impact-panel-narrow .impact-panel-head {
  justify-content: unset;
  text-align: center;
}

.impact-kpi-grid {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.impact-kpi {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 calc(16px * var(--dash-s, 1));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: calc(3px * var(--dash-s, 1));
  border-bottom: 1px solid var(--border);
}

.impact-kpi:last-child {
  border-bottom: none;
}

/* Hide sub-text and shrink value inside the narrow impact panel */
.impact-panel-narrow .impact-kpi .dash-kpi-sub {
  display: none;
}

.impact-panel-narrow .impact-kpi .dash-kpi-value {
  font-size: calc(1.45rem * var(--dash-s, 1));
}

/* Subtitle in narrow panel — allow wrapping, no truncation */
.impact-panel-narrow .impact-panel-head .dash-card-sub {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

/* Narrow impact column: keep tooltip + info btn inside card bounds */
.dashboard-chart-grid > .impact-panel.impact-panel-narrow {
  overflow: visible;
}

.impact-panel-narrow .impact-panel-head {
  position: relative;
  z-index: 6;
  overflow: visible;
}

.impact-panel-narrow .impact-panel-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.impact-panel-narrow .impact-panel-head .dash-info {
  flex-shrink: 0;
  align-self: flex-start;
}

.impact-panel-narrow .impact-panel-head .dash-info::after {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(220px, calc(100vw - 32px));
  max-width: none;
  line-height: 1.45;
  word-break: break-word;
}

.impact-panel-narrow .impact-kpi-grid {
  overflow: hidden;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* Skeleton loader for KPI values */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.kpi-skeleton {
  display: inline-block;
  width: 56px;
  height: 1.2em;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite linear;
  vertical-align: middle;
}

/* ─── Global shimmer loading system ─────────────────────────────────────── */
.shimmer {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 20%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 80%);
  background-size: 400px 100%;
  animation: shimmer 1.35s infinite linear;
}

.shimmer-bar { height: 10px; min-height: 10px; }
.shimmer-line-row { margin-bottom: 10px; }
.shimmer-line-row:last-child { margin-bottom: 0; }
.shimmer-panel { padding: 4px 0; }

.shimmer-pill {
  display: inline-block;
  height: 26px;
  border-radius: 999px;
  flex-shrink: 0;
}

.shimmer-cell {
  display: block;
  width: 72%;
  height: 12px;
  min-height: 12px;
}

.shimmer-table-row td {
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--border);
}

.shimmer-table-row:hover { background: transparent; }

.shimmer-table-banner {
  width: 100%;
  height: 220px;
  border-radius: 8px;
}

.shimmer-rank-row {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.shimmer-rank-name { height: 11px; width: 75%; }
.shimmer-rank-meter { height: 18px; border-radius: 4px; width: 100%; }

.shimmer-actor-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.02);
  margin-bottom: 10px;
}

.shimmer-stat-pill {
  flex: 1;
  min-width: 0;
  height: 52px;
  border-radius: var(--r);
}

.td-shimmer-shell { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.td-shimmer-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.td-shimmer-panel {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.02);
}

.dashboard-page.is-data-loading .dash-chart-body {
  position: relative;
  min-height: calc(120px * var(--dash-s, 1));
}

.dashboard-page.is-data-loading .dash-chart-body::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 20%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.02) 80%);
  background-size: 400px 100%;
  animation: shimmer 1.35s infinite linear;
  pointer-events: none;
  z-index: 2;
}

.dashboard-page.is-data-loading .dash-chart-body canvas,
.dashboard-page.is-data-loading #chart-actors {
  opacity: 0.35;
}

.tm-map-canvas-stack { position: relative; }

.tm-map-shimmer-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(8,12,20,0.35);
}

.tm-map-shimmer-overlay.is-active { opacity: 1; }

.tm-map-shimmer-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 40%, rgba(79,142,247,0.08) 50%, transparent 60%),
    linear-gradient(90deg, rgba(255,255,255,0.02) 20%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.02) 80%);
  background-size: 200% 100%, 400px 100%;
  animation: tmMapShimmer 1.6s infinite linear;
}

@keyframes tmMapShimmer {
  0% { background-position: 120% 0, -400px 0; }
  100% { background-position: -80% 0, 400px 0; }
}

.threat-map-page.is-page-loading .tm-shimmer-host {
  min-height: 48px;
}

.tm-category-strip.tm-shimmer-host {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
}

.shimmer-vuln-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.02);
}

.shimmer-vuln-chart {
  margin-top: 12px;
  height: 72px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 20%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.03) 80%);
  background-size: 400px 100%;
  animation: shimmer 1.35s infinite linear;
}

.is-page-loading .empty-title { display: none; }
.td-skeleton-wrap { padding: 24px; }
.td-shell:not(.is-page-loading) .td-skeleton-wrap { display: none; }

/* Dashboard — last ingest (footer, not navbar) */
.dashboard-page .dash-page-meta {
  margin: calc(10px * var(--dash-s, 1)) 0 0;
  padding: 0;
  text-align: center;
  font-size: calc(0.58rem * var(--dash-s, 1));
  font-weight: 600;
  color: var(--text-3);
  opacity: 0.55;
  letter-spacing: 0.02em;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: calc(14px * var(--dash-s, 1));
  align-items: stretch;
}

.coverage-gap-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,179,49,0.07);
  border: 1px solid rgba(245,179,49,0.2);
  border-radius: var(--r-lg);
  padding: 8px 14px;
  font-size: 0.7rem;
  color: var(--text-2);
  margin-bottom: 14px;
}
.coverage-gap-icon { font-style: normal; flex-shrink: 0; }

.dashboard-story-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16px * var(--dash-s, 1));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.032);
  padding: calc(12px * var(--dash-s, 1)) calc(16px * var(--dash-s, 1));
}

.dashboard-story-strip strong {
  display: block;
  color: var(--text);
  font-size: calc(0.76rem * var(--dash-s, 1));
  font-weight: 800;
}

.dashboard-story-strip span {
  display: block;
  margin-top: calc(2px * var(--dash-s, 1));
  color: var(--text-2);
  font-size: calc(0.62rem * var(--dash-s, 1));
  font-weight: 600;
}

.dash-chart-card {
  grid-column: span 3;
  height: calc(400px * var(--dash-s, 1));
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.035);
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.dash-chart-wide {
  grid-column: span 6;
}

.dash-chart-half {
  grid-column: span 6;
}

/* Row 2: same 3 + 6 + 3 column rhythm as row 1 */
.dash-chart-row-2.dash-chart-card,
.dashboard-chart-grid > .impact-panel.dash-chart-row-2 {
  height: calc(400px * var(--dash-s, 1));
}

/* Row 3: Palo Alto coverage full width */
.dash-chart-row-3.dash-chart-pa-coverage {
  grid-column: 1 / -1;
  height: calc(400px * var(--dash-s, 1));
}

.dash-chart-pa-coverage {
  overflow: visible;
}

.dash-chart-pa-coverage .pa-coverage-head {
  position: relative;
  z-index: 4;
  overflow: visible;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(10px * var(--dash-s, 1));
  text-align: left;
}

.dash-chart-pa-coverage .pa-coverage-head > div:first-child {
  grid-column: unset;
  text-align: left;
  min-width: 0;
  flex: 1 1 auto;
}

.dash-chart-pa-coverage .pa-coverage-head > .dash-info {
  grid-column: unset;
  justify-self: auto;
  flex-shrink: 0;
}

.pa-coverage-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(8px * var(--dash-s, 1));
  margin-top: calc(5px * var(--dash-s, 1));
}

.pa-coverage-head-meta .pa-coverage-panel-label {
  flex-shrink: 0;
}

.pa-platform-legend--head {
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}

.dash-chart-pa-coverage .dash-info::after {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(260px, 72vw);
  line-height: 1.45;
  word-break: break-word;
}

.dash-pa-coverage-grid {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: calc(14px * var(--dash-s, 1));
  flex: 1;
  min-height: 0;
  overflow: visible;
  padding: calc(8px * var(--dash-s, 1)) calc(12px * var(--dash-s, 1)) calc(12px * var(--dash-s, 1));
}

.pa-coverage-ring-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: visible;
  padding: calc(8px * var(--dash-s, 1)) calc(8px * var(--dash-s, 1)) 0;
  border-radius: calc(10px * var(--dash-s, 1));
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 18% 0%, rgba(79, 142, 247, 0.07), transparent 52%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pa-coverage-ring-inner {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(6px * var(--dash-s, 1)) calc(4px * var(--dash-s, 1)) 0;
  overflow: visible;
}

.pa-coverage-ring-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(5px * var(--dash-s, 1));
  padding: calc(10px * var(--dash-s, 1)) calc(10px * var(--dash-s, 1)) calc(8px * var(--dash-s, 1));
  text-align: center;
}

.pa-coverage-panel-label {
  color: var(--text-3);
  font-size: calc(0.58rem * var(--dash-s, 1));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pa-coverage-panel-hint {
  margin: 0;
  max-width: 11.5rem;
  color: var(--text-3);
  font-size: calc(0.62rem * var(--dash-s, 1));
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
}

.dash-chart-body--pa-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: calc(160px * var(--dash-s, 1));
  max-height: calc(240px * var(--dash-s, 1));
  padding: 0;
  overflow: visible;
}

.dash-chart-body--pa-ring > canvas {
  grid-area: 1 / 1;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}

.pa-coverage-center {
  grid-area: 1 / 1;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36%;
  min-width: 3.25rem;
  max-width: 5.25rem;
  aspect-ratio: 1;
  border-radius: 50%;
  transition: opacity 0.12s ease;
}

.dash-chart-body--pa-ring.is-chart-tooltip-active .pa-coverage-center {
  opacity: 0.2;
}

.pa-coverage-pct-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(3px * var(--dash-s, 1));
  text-align: center;
}

.pa-coverage-pct {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pa-coverage-pct-n {
  font-size: clamp(1.05rem, calc(1.28rem * var(--dash-s, 1)), 1.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pa-coverage-pct-sym {
  display: inline-block;
  margin-left: 0.05em;
  font-size: 0.48em;
  font-weight: 700;
  color: var(--text-2);
  transform: translateY(0.14em);
}

.pa-coverage-pct-hint {
  max-width: 100%;
  color: var(--text-3);
  font-size: calc(0.5rem * var(--dash-s, 1));
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.pa-coverage-bars-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.pa-platform-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: calc(6px * var(--dash-s, 1));
  max-width: 100%;
}

.pa-platform-legend-item {
  display: inline-flex;
  align-items: center;
  gap: calc(5px * var(--dash-s, 1));
  padding: calc(3px * var(--dash-s, 1)) calc(8px * var(--dash-s, 1));
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: calc(0.58rem * var(--dash-s, 1));
  font-weight: 700;
}

.pa-platform-legend-item i {
  width: calc(8px * var(--dash-s, 1));
  height: calc(8px * var(--dash-s, 1));
  border-radius: 50%;
  flex-shrink: 0;
}

.chartjs-tooltip {
  z-index: 40 !important;
  pointer-events: none;
}

.chartjs-tooltip-title,
.chartjs-tooltip-body {
  display: block;
  line-height: 1.35;
}

.chartjs-tooltip-body .chartjs-tooltip-body-item {
  display: block;
  margin-top: 0.2em;
}

.dash-chart-body--pa-bars {
  flex: 1 1 auto;
  min-height: 0;
  padding: calc(4px * var(--dash-s, 1)) calc(8px * var(--dash-s, 1)) calc(10px * var(--dash-s, 1));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pa-product-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: calc(4px * var(--dash-s, 1));
  padding-right: calc(4px * var(--dash-s, 1));
  -webkit-overflow-scrolling: touch;
}

.pa-product-row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 32%) minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(8px * var(--dash-s, 1));
  padding: calc(4px * var(--dash-s, 1)) calc(6px * var(--dash-s, 1));
  border-radius: calc(6px * var(--dash-s, 1));
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.12s ease;
}

.pa-product-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pa-product-name {
  font-size: calc(0.72rem * var(--dash-s, 1));
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.pa-product-track {
  height: calc(7px * var(--dash-s, 1));
  border-radius: calc(4px * var(--dash-s, 1));
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.pa-product-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pa-product-count {
  font-size: calc(0.72rem * var(--dash-s, 1));
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  min-width: 2ch;
}

.pa-product-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: calc(0.75rem * var(--dash-s, 1));
  font-weight: 600;
}

.dash-chart-eight {
  grid-column: span 8;
}

.dash-chart-nine {
  grid-column: span 9;
}

.dash-chart-third {
  grid-column: span 4;
}

.dash-chart-quarter {
  grid-column: span 2;
}

.dash-chart-two-thirds {
  grid-column: span 8;
}

.dash-chart-full {
  grid-column: 1 / -1;
}

.dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(10px * var(--dash-s, 1));
  padding: calc(10px * var(--dash-s, 1)) calc(13px * var(--dash-s, 1)) calc(8px * var(--dash-s, 1));
  border-bottom: 1px solid var(--border);
}

.dashboard-page .dash-card-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-start;
  gap: calc(10px * var(--dash-s, 1));
  text-align: center;
}

.dashboard-page .dash-card-head > div:first-child {
  grid-column: 2;
  text-align: center;
}

.dashboard-page .dash-card-head > .dash-info,
.dashboard-page .dash-card-head > .card-link {
  grid-column: 3;
  justify-self: end;
}

.dash-card-title {
  color: var(--text);
  font-size: calc(0.82rem * var(--dash-s, 1));
  font-weight: 800;
}

.dash-card-sub {
  margin-top: calc(2px * var(--dash-s, 1));
  color: var(--text-3);
  font-size: calc(0.64rem * var(--dash-s, 1));
  line-height: 1.35;
}

.dash-chart-body {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: calc(10px * var(--dash-s, 1)) calc(12px * var(--dash-s, 1)) calc(12px * var(--dash-s, 1));
}

.dash-chart-body canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── Actor Leaderboard ─────────────────────────────────────────────────────── */
.dash-chart-body:has(.actor-rank-list) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.actor-rank-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: calc(5px * var(--dash-s, 1));
  justify-content: space-between;
  overflow: visible;
  padding: 0 0 calc(2px * var(--dash-s, 1));
}

.actor-rank-row {
  display: grid;
  grid-template-columns: calc(28px * var(--dash-s, 1)) 1fr auto;
  align-items: center;
  gap: calc(8px * var(--dash-s, 1));
  flex: 1 1 0;
  min-height: 0;
  padding: calc(5px * var(--dash-s, 1)) calc(10px * var(--dash-s, 1));
  border-radius: calc(8px * var(--dash-s, 1));
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.actor-rank-row:hover { background: rgba(255,255,255,0.06); }

.actor-rank-medal {
  width: calc(24px * var(--dash-s, 1));
  height: calc(24px * var(--dash-s, 1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(0.65rem * var(--dash-s, 1));
  font-weight: 900;
  flex-shrink: 0;
}
.actor-rank-medal.rank-1 { background: rgba(245,158,11,0.18); color: #f59e0b; border: 1px solid rgba(245,158,11,0.35); }
.actor-rank-medal.rank-2 { background: rgba(148,163,184,0.14); color: #94a3b8; border: 1px solid rgba(148,163,184,0.28); }
.actor-rank-medal.rank-3 { background: rgba(180,120,80,0.18); color: #c2845a; border: 1px solid rgba(180,120,80,0.32); }
.actor-rank-medal.rank-n { background: rgba(255,255,255,0.05); color: var(--text-3); border: 1px solid rgba(255,255,255,0.08); }

.actor-rank-main { min-width: 0; }

.actor-rank-name {
  font-size: calc(0.78rem * var(--dash-s, 1));
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: calc(4px * var(--dash-s, 1));
}

.actor-rank-bar-track {
  height: calc(4px * var(--dash-s, 1));
  border-radius: calc(2px * var(--dash-s, 1));
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.actor-rank-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.actor-rank-count {
  flex-shrink: 0;
  font-size: calc(0.82rem * var(--dash-s, 1));
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
  line-height: 1;
}
.actor-rank-count small {
  display: block;
  font-size: calc(0.6rem * var(--dash-s, 1));
  font-weight: 600;
  color: var(--text-3);
  margin-top: calc(2px * var(--dash-s, 1));
}

.actor-rank-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-3);
  font-size: calc(0.78rem * var(--dash-s, 1));
  gap: calc(6px * var(--dash-s, 1));
}

/* ── Intel Yield Grid ──────────────────────────────────────────────────────── */
.intel-yield-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 7px;
  height: 100%;
}

.intel-yield-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  padding: 11px 13px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
  position: relative;
  overflow: hidden;
}
.intel-yield-cell:hover {
  background: rgba(79,142,247,0.08);
  border-color: rgba(79,142,247,0.28);
  transform: translateY(-1px);
}
.intel-yield-cell:hover .intel-yield-value { color: #6ba3ff; }
.intel-yield-cell::after {
  content: '→';
  position: absolute;
  top: 9px;
  right: 10px;
  font-size: 0.65rem;
  color: var(--text-3);
  opacity: 0;
  transition: opacity 0.12s, transform 0.12s;
  transform: translateX(-4px);
}
.intel-yield-cell:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.intel-yield-value {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #4f8ef7;
  transition: color 0.12s;
}
.intel-yield-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.intel-yield-sub {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.2;
}

@media (max-width: 600px) {
  .intel-yield-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
}

.intel-overview-panel {
  display: grid;
  gap: 10px;
  height: 100%;
  overflow: auto;
  padding-right: 2px;
}

.intel-overview-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.intel-chip {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  padding: 8px 9px;
  display: grid;
  gap: 2px;
  text-align: center;
}

.intel-chip span {
  font-size: 0.56rem;
  color: var(--text-2);
  font-weight: 650;
}

.intel-chip b {
  font-size: 0.92rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.intel-chip em {
  font-style: normal;
  font-size: 0.52rem;
  color: var(--text-3);
}

.intel-overview-bars {
  display: grid;
  gap: 7px;
}

.intel-stage-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  grid-template-areas:
    "label track value"
    "meta  track meta";
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
}

.intel-stage-row span {
  grid-area: label;
  color: var(--text-2);
  font-size: 0.6rem;
  font-weight: 700;
}

.intel-stage-track {
  grid-area: track;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.intel-stage-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--stage-color, var(--blue));
  box-shadow: 0 0 12px color-mix(in oklab, var(--stage-color, var(--blue)) 30%, transparent);
}

.intel-stage-row b {
  grid-area: value;
  color: var(--text);
  font-size: 0.64rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.intel-stage-row em {
  grid-area: meta;
  justify-self: end;
  font-style: normal;
  color: var(--text-3);
  font-size: 0.52rem;
  font-weight: 600;
}

.intel-overview-foot {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2);
  font-size: 0.6rem;
  font-weight: 650;
  text-align: center;
}

.dash-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text-2);
  font-size: 0.54rem;
  font-weight: 800;
  cursor: help;
}

.dash-info::after {
  content: attr(data-tip);
  position: absolute;
  top: 26px;
  right: 0;
  z-index: 300;
  width: min(300px, 80vw);
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(8,10,16,0.98);
  box-shadow: 0 14px 40px rgba(0,0,0,0.6);
  color: var(--text-2);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dash-info:hover::after {
  opacity: 1;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.card-link {
  font-size: 0.67rem;
  color: var(--text-2);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

/* ─── Filter panel (threats page) ───────────────────────────────────────── */
.filter-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.threat-filter-panel {
  --tf-control-h: 34px;
  --tf-chrome-h: 34px;
  padding: 10px 16px 12px;
}

.threats-page .threat-filter-panel {
  position: sticky;
  top: calc(var(--navbar-h) + 10px);
  z-index: 120;
  box-shadow: 0 12px 28px rgba(8,12,20,0.35);
}

.filter-panel-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.threat-filter-row {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px 14px;
}

/* Row 1: Severity(7) | Sector(5) | Type(3) | Vendor(4) | Search(5) = 24 cols */
.threat-filter-row .tf-severity { grid-column: span 7; }
.threat-filter-row .tf-sector   { grid-column: span 5; }
.threat-filter-row .tf-window   { grid-column: span 3; }
.threat-filter-row .tf-type     { grid-column: span 3; }
.threat-filter-row .tf-vendor   { grid-column: span 4; }
.threat-filter-row .tf-search   { grid-column: span 5; }

/* Row 2: Intel focus | Evidence | Origin/Target */
.threat-filter-row--secondary {
  padding-top: 9px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.threat-filter-row--secondary .tf-source  { grid-column: span 9; }
.threat-filter-row--secondary .tf-evidence { grid-column: span 4; }
.threat-filter-row--secondary .tf-geo     { grid-column: span 7; }
.threat-filter-row--secondary .tf-pa-product { grid-column: span 4; }

.threat-filter-row--secondary .tf-source,
.threat-filter-row--secondary .tf-evidence,
.threat-filter-row--secondary .tf-geo,
.threat-filter-row--secondary .tf-pa-product {
  min-width: 0;
  overflow: visible;
}

/* Threats filters: shared chrome height (matches severity row) */
.threat-filter-panel .fp-group--stack > .filter-group {
  box-sizing: border-box;
  min-height: var(--tf-chrome-h);
  height: var(--tf-chrome-h);
  align-items: stretch;
}

.threat-filter-panel .tf-dd-box.filter-group {
  justify-content: stretch;
  width: 100%;
}

.threat-filter-panel .tf-dd-box .filter-dropdown {
  flex: 1;
  min-width: 0;
  width: 100%;
  align-self: stretch;
}

.threat-filter-panel .tf-dd-box .filter-dd-btn {
  position: relative;
  width: 100%;
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
  justify-content: center;
  padding-left: 26px;
  padding-right: 26px;
}

.threat-filter-panel .tf-dd-box .filter-dd-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.threat-filter-panel .tf-evidence-box .filter-check-row {
  flex: 1;
  min-height: var(--tf-control-h);
  height: 100%;
  align-items: stretch;
}

.threat-filter-panel .tf-evidence-box .filter-check {
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
  box-sizing: border-box;
}

.threat-filter-panel .tf-search-box {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.threat-filter-panel .tf-search-box .search-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.threat-search-wrap {
  width: 100%;
}

.threat-search-wrap input {
  width: 100%;
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.65rem;
  font-weight: 600;
}

.threat-filter-panel .fp-group--stack > .filter-group > .filter-pill,
.threat-filter-panel .tf-sector .filter-pill,
.threat-filter-panel .tf-source .tf-source-pills .filter-pill {
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
}

.threat-filter-panel .tf-severity .filter-pill {
  flex-direction: column;
  gap: 0;
  padding: 2px 6px;
  line-height: 1.05;
}

.threat-filter-panel .tf-severity .filter-pill .pill-count {
  margin-left: 0;
  font-size: 0.58rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.62;
}

.threat-filter-panel .tf-severity .filter-pill.active .pill-count {
  opacity: 0.88;
}

.threat-filter-panel .tf-severity .filter-pill.is-zero-count .pill-count {
  opacity: 0.32;
}

.threat-filter-panel .tf-source .source-label-with-info {
  justify-content: center;
  width: 100%;
}

.threat-filter-panel .tf-source .filter-group.tf-source-pills {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  max-width: 100%;
  gap: 4px 6px;
  padding: 3px;
  overflow: visible;
}

.threat-filter-panel .tf-source .tf-source-pills .filter-pill {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0 6px;
  font-size: 0.65rem;
  font-weight: 600;
  box-sizing: border-box;
  letter-spacing: 0.01em;
}

/* Intel focus: selected pill — same pattern as Sector (tint + readable text), per option */
.threat-filter-panel .tf-source .tf-source-pills .filter-pill.active {
  font-weight: 700;
  padding: 0 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.threat-filter-panel .tf-source .tf-source-pills .filter-pill.active[data-source-kind=""] {
  background: var(--surface-2);
  color: var(--text);
}

.threat-filter-panel .tf-source .tf-source-pills .filter-pill.active[data-source-kind="articles"] {
  background: rgba(79, 142, 247, 0.16);
  color: #93c5fd;
}

.threat-filter-panel .tf-source .tf-source-pills .filter-pill.active[data-source-kind="victim_intel"] {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
}

.threat-filter-panel .tf-source .tf-source-pills .filter-pill.active[data-source-kind="unique"] {
  background: rgba(74, 201, 126, 0.14);
  color: #86efac;
}

.threat-filter-panel .tf-source .tf-source-pills .filter-pill.active[data-source-kind="demo_finds"] {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.threat-filter-panel .tf-source .tf-source-pills .filter-pill.active[data-source-kind="pending_comparison"] {
  background: rgba(232, 164, 74, 0.16);
  color: #fcd34d;
}

@media (max-width: 720px) {
  .threat-filter-panel .tf-source .filter-group.tf-source-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .threat-filter-row--secondary .tf-source,
  .threat-filter-row--secondary .tf-evidence,
  .threat-filter-row--secondary .tf-geo,
  .threat-filter-row--secondary .tf-pa-product {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .threat-filter-panel .tf-source .filter-group.tf-source-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.threat-filter-panel .filter-pill,
.threat-filter-panel .filter-dd-btn {
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
  box-sizing: border-box;
}

.threat-filter-panel .tf-sector .filter-dd-btn,
.threat-filter-panel .tf-type .filter-dd-btn,
.threat-filter-panel .tf-vendor .filter-dd-btn {
  font-size: 0.65rem;
  font-weight: 600;
}

.threat-filter-panel .tf-sector .fp-label,
.threat-filter-panel .tf-type .fp-label,
.threat-filter-panel .tf-vendor .fp-label {
  text-align: center;
  width: 100%;
}

.threat-filter-panel .tf-evidence .filter-check-row {
  min-height: var(--tf-control-h);
  height: 100%;
}

.threat-filter-panel .tf-evidence .filter-check {
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
  padding: 0 8px;
  font-size: 0.65rem;
  font-weight: 600;
  box-sizing: border-box;
}

.threat-filter-panel .fp-group {
  min-width: 0;
}

/* Ensure every stacked filter group in row 1 is exactly the same total height */
.threat-filter-row .fp-group--stack {
  height: 100%;
  justify-content: space-between;
}

.threat-filter-row .fp-group--stack .fp-label {
  flex-shrink: 0;
}

.threat-filter-row .fp-group--stack > .filter-group,
.threat-filter-row .fp-group--stack > .filter-group.tf-dd-box {
  flex: 1;
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
}

.filter-panel-row--secondary {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.fp-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fp-group--stack {
  align-items: stretch;
  flex-direction: column;
  gap: 7px;
}

.fp-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  min-width: 44px;
}

.fp-group--stack .fp-label {
  min-width: 0;
  text-align: center;
}

.source-label-with-info {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}

.source-label-with-info .tm-info-popover {
  top: 22px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  grid-template-columns: minmax(104px, 132px) minmax(0, 1fr);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.source-label-with-info .tm-info-popover strong {
  color: var(--text);
  font-size: 0.62rem;
  min-width: 0;
}

.source-label-with-info .tm-info-popover span {
  color: var(--text-2);
  font-size: 0.62rem;
  line-height: 1.35;
  min-width: 0;
}

/* ─── Filter bar — pill style ────────────────────────────────────────────── */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-group {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 4px 8px;
}

.filter-group--wide {
  justify-content: space-evenly;
  gap: 8px 12px;
}

.tf-severity .filter-group {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}


.tf-source .filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px 10px;
}

.filter-pill {
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.filter-pill:hover { color: var(--text); }
.filter-pill.active { background: var(--surface-2); color: var(--text); }
.filter-pill.active.critical { background: var(--crit-dim); color: var(--critical); }
.filter-pill.active.high     { background: var(--high-dim); color: var(--high); }
.filter-pill.active.medium   { background: var(--med-dim); color: var(--medium); }
.filter-pill.active.low      { background: var(--low-dim); color: var(--low); }
.filter-pill.active.banking  { background: rgba(79,142,247,0.12); color: var(--banking); }
.filter-pill.active.healthcare{ background: rgba(74,201,126,0.12); color: var(--health); }
.filter-pill.active.government{ background: rgba(167,139,250,0.12); color: var(--govt); }
.filter-pill.active.telecom  { background: rgba(245,158,11,0.12); color: #f59e0b; }

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238892a4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 6px 26px 6px 10px;
  min-height: 32px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.filter-select:hover { border-color: var(--border-2); }
.filter-select:focus { border-color: var(--blue); }
.filter-select option { background: #0e1420; color: var(--text); }

.filter-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 500;
  min-height: 32px;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s;
}

.filter-input:hover { border-color: var(--border-2); }
.filter-input:focus { border-color: var(--blue); }
.filter-input::placeholder { color: var(--text-3); }

.filter-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.67rem;
  font-weight: 650;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,0.03);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  min-height: var(--tf-control-h, 36px);
  height: var(--tf-control-h, 36px);
  user-select: none;
}

/* The actual checkbox — fully themed, no native chrome */
.filter-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  min-width: 15px;
  border-radius: 4px;
  border: 1.5px solid rgba(79,142,247,0.35);
  background: rgba(79,142,247,0.08);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Checkmark drawn with box-shadow trick — no pseudo-element needed */
.filter-check input[type="checkbox"]:checked {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6l2.5 2.5 4.5-4.5' stroke='%23ffffff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.filter-check:hover {
  color: var(--text);
  border-color: rgba(79,142,247,0.4);
  background: rgba(79,142,247,0.05);
}

.filter-check:hover input[type="checkbox"] {
  border-color: var(--blue);
  background: rgba(79,142,247,0.14);
}

/* Label bolds and outer pill glows when checked */
.filter-check:has(input:checked) {
  color: var(--text);
  border-color: rgba(79,142,247,0.5);
  background: rgba(79,142,247,0.1);
  font-weight: 700;
}

.filter-check-row { display: flex; gap: 6px; min-height: 32px; align-items: stretch; }

.filter-dropdown {
  position: relative;
  width: 100%;
}

.filter-dd-btn {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.filter-dd-btn:hover,
.filter-dropdown.open .filter-dd-btn {
  border-color: var(--border-2);
  background: rgba(255,255,255,0.06);
}

.filter-dd-caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-3);
}

.filter-dd-label-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
}

.filter-dd-btn.is-placeholder .filter-dd-label-text {
  color: var(--text-3);
  font-weight: 600;
}

.filter-dd-btn:not(.is-placeholder) .filter-dd-label-text {
  color: var(--text);
  font-weight: 600;
}

.filter-dd-search-wrap {
  padding: 4px 4px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111824;
}

.filter-dd-search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 6px 10px;
  box-sizing: border-box;
}

.filter-dd-search:focus {
  outline: none;
  border-color: rgba(79,142,247,0.45);
  background: rgba(79,142,247,0.08);
}

.filter-dd-search::placeholder {
  color: var(--text-3);
}

#vendor-dd-menu {
  min-width: 100%;
}

/* ── dropdown panel ── */
.filter-dd-menu {
  position: absolute;
  z-index: 200;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  display: none;
  max-height: 270px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: #111824;
  box-shadow: 0 18px 50px rgba(0,0,0,0.42);
  scrollbar-width: thin;
  scrollbar-color: rgba(79,142,247,0.2) transparent;
}

.filter-dd-menu::-webkit-scrollbar { width: 3px; }
.filter-dd-menu::-webkit-scrollbar-track { background: transparent; }
.filter-dd-menu::-webkit-scrollbar-thumb { background: rgba(79,142,247,0.25); border-radius: 3px; }

.filter-dropdown.open .filter-dd-menu {
  display: block;
}

/* ── dropdown options ── */
.filter-dd-option {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  text-align: left;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-dd-option:hover {
  background: rgba(79,142,247,0.14);
  color: var(--text);
}

.filter-dd-option.active {
  background: rgba(79,142,247,0.18);
  color: var(--text);
}

.filter-dd-option.active:hover {
  background: rgba(79,142,247,0.22);
}

.unique-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dashboard-unique-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  width: 100%;
}

.coverage-metric-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.unique-card {
  min-height: 104px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(16,22,34,0.72);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.unique-label {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-3);
  line-height: 1.3;
  text-align: center;
}

.unique-value {
  margin-top: 8px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text);
}

.unique-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 80px;
  gap: 16px;
  align-items: center;
  min-height: 92px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.unique-item:last-child { border-bottom: none; }
.unique-title { font-size: 0.78rem; font-weight: 700; line-height: 1.35; }
.unique-title a { color: var(--text); }
.unique-meta { margin-top: 4px; font-size: 0.62rem; color: var(--text-3); }
.unique-coverage { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.unique-severity-cell,
.unique-action-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.unique-action-cell .card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}
.coverage-chip {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(255,255,255,0.03);
}
.coverage-chip.unique { color: var(--low); border-color: rgba(74,201,126,0.28); background: rgba(74,201,126,0.1); }
.coverage-chip.seen { color: var(--medium); border-color: rgba(232,164,74,0.28); background: rgba(232,164,74,0.1); }
.coverage-chip.pending { color: var(--blue); border-color: rgba(79,142,247,0.28); background: rgba(79,142,247,0.1); }

.threat-filter-panel .filter-group,
.threat-filter-panel .time-pills,
.threat-filter-panel .filter-check-row {
  width: 100%;
}

.threat-filter-panel .time-pills,
.threat-filter-panel .filter-check-row {
  display: grid;
  gap: 4px;
}

.threat-filter-panel .time-pills {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.threat-filter-panel .filter-check-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.threat-filter-panel .time-pill,
.threat-filter-panel .filter-check {
  width: 100%;
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
}

.threat-filter-panel .filter-select {
  width: 100%;
}

.threat-filter-panel .tf-source .filter-group.tf-source-pills {
  min-width: 0;
}

.threat-filter-panel .tf-geo-box {
  padding: 3px;
  display: flex;
  align-items: stretch;
}

.threat-filter-panel .tf-geo-box .tf-country-pair {
  flex: 1;
  min-width: 0;
}

.tf-country-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.threat-filter-panel .tf-geo-box .tf-dd-box {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: var(--tf-control-h);
}

.threat-filter-panel .tf-geo-box .tf-dd-box .filter-dropdown {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.threat-filter-panel .tf-origin-box .filter-dd-menu,
.threat-filter-panel .tf-target-box .filter-dd-menu {
  left: 0;
  right: 0;
  min-width: 100%;
}

.threat-filter-row--secondary .tf-source .fp-label,
.threat-filter-row--secondary .tf-evidence .fp-label,
.threat-filter-row--secondary .tf-geo .fp-label,
.threat-filter-row--secondary .tf-geo .source-label-with-info,
.threat-filter-row--secondary .tf-pa-product .fp-label,
.threat-filter-row--secondary .tf-pa-product .source-label-with-info {
  text-align: center;
  width: 100%;
}

.threat-filter-panel .tf-pa-product-box {
  padding: 3px;
  min-width: 0;
  width: 100%;
}

.threat-filter-panel .tf-pa-product-box .filter-dropdown {
  position: relative;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.threat-filter-panel .tf-pa-product .filter-dropdown.open {
  z-index: 224;
}

#pa-product-dd-menu.filter-dd-menu--pa-products {
  min-width: 100%;
  max-height: min(70vh, 420px);
  z-index: 225;
}

/* PA gap option — visually separated, amber warning tone */
.filter-dd-option--gap {
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 2px;
  padding-top: 8px;
  color: #f59e0b;
  font-weight: 700;
}
.filter-dd-option--gap:hover { background: rgba(245,158,11,0.08); }
.filter-dd-option--gap.active { background: rgba(245,158,11,0.12); color: #f59e0b; }

.threat-filter-panel .tf-geo-box .tf-condition-toggle {
  align-self: stretch;
  min-height: var(--tf-control-h);
}

.threat-filter-panel .tf-origin-box .filter-dd-btn,
.threat-filter-panel .tf-target-box .filter-dd-btn,
.threat-filter-panel .tf-pa-product-box .filter-dd-btn {
  font-size: 0.65rem;
  font-weight: 600;
}

.threat-filter-panel .tf-source .filter-dropdown {
  position: relative;
  z-index: 2;
}

.threat-filter-panel .tf-source .filter-dropdown.open {
  z-index: 220;
}

.threat-filter-panel .tf-source .filter-dd-menu {
  z-index: 221;
  min-width: 100%;
}

.filter-dd-menu--right {
  left: auto;
  right: 0;
}

.tf-condition-toggle {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.threat-filter-panel .tf-condition-btn {
  min-height: var(--tf-control-h);
  height: var(--tf-control-h);
}

.tf-condition-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 32px;
  padding: 0 9px;
  border: none;
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-3);
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.tf-condition-btn:last-child { border-right: none; }

.tf-condition-btn.active {
  background: rgba(79,142,247,0.16);
  color: #93c5fd;
}

/* ─── IOC explorer ──────────────────────────────────────────────────────── */
.ioc-filter-panel {
  padding: 16px;
}

.ioc-filter-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(240px, 1.5fr);
  gap: 14px;
  align-items: end;
}

.ioc-search-group input {
  width: 100%;
}

.ioc-table-wrap {
  overflow-x: auto;
}

.ioc-table {
  min-width: 980px;
}

.ioc-table-head,
.ioc-table-row {
  display: grid;
  grid-template-columns: 132px minmax(300px, 1.8fr) minmax(120px, 0.75fr) minmax(220px, 1fr) 96px 44px;
  gap: 12px;
  align-items: center;
}

.ioc-table-head {
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ioc-table-row {
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.ioc-table-row:last-child {
  border-bottom: none;
}

.ioc-table-row:hover {
  background: rgba(255,255,255,0.02);
}

.ioc-type-cell,
.ioc-confidence-cell {
  min-width: 0;
}

.ioc-value-cell,
.ioc-family-cell,
.ioc-threat-link {
  min-width: 0;
}

.ioc-value-text {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ioc-context-line {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 0.58rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ioc-family-cell {
  color: var(--medium);
  font-size: 0.64rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ioc-threat-link {
  color: var(--text-2);
  font-size: 0.64rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ioc-threat-link:hover {
  color: var(--blue);
}

.ioc-confidence-cell span {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--text-2);
  font-size: 0.62rem;
  font-weight: 700;
}

.ioc-copy-btn {
  justify-self: end;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

/* ─── Data table ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.threats-page .threat-table-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--navbar-h) - 178px);
  min-height: 340px;
}

.threats-page .threat-table-card .table-wrap {
  flex: 1 1 auto;
  overflow: auto;
}

.threats-page .threat-table-card .pagination {
  flex: 0 0 auto;
}

.threats-page .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(10,15,24,0.98);
  box-shadow: inset 0 -1px 0 var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.data-table thead tr { border-bottom: 1px solid var(--border); }

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
}

.data-table th:hover { color: var(--text-2); }

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

.cell-title a { color: var(--text); font-weight: 500; font-size: 0.75rem; }
.cell-title a:hover { color: var(--blue); }
.cell-sub { font-size: 0.62rem; color: var(--text-3); margin-top: 2px; }

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-critical { background: var(--crit-dim); color: var(--critical); border: 1px solid rgba(245,82,82,0.25); }
.badge-high     { background: var(--high-dim); color: var(--high); border: 1px solid rgba(232,164,74,0.25); }
.badge-medium   { background: var(--med-dim); color: var(--medium); border: 1px solid rgba(212,160,23,0.25); }
.badge-low      { background: var(--low-dim); color: var(--low); border: 1px solid rgba(74,201,126,0.25); }
.badge-unknown  { background: rgba(74,85,104,0.2); color: var(--text-3); border: 1px solid var(--border); }

.badge-banking    { background: rgba(79,142,247,0.1);  color: var(--banking); border: 1px solid rgba(79,142,247,0.25); }
.badge-government { background: rgba(167,139,250,0.1); color: var(--govt);    border: 1px solid rgba(167,139,250,0.25); }
.badge-healthcare { background: rgba(74,201,126,0.1);  color: var(--health);  border: 1px solid rgba(74,201,126,0.25); }
.badge-telecom    { background: rgba(245,158,11,0.1);  color: #f59e0b;        border: 1px solid rgba(245,158,11,0.25); }
.badge-energy     { background: rgba(249,115,22,0.1);  color: var(--energy);  border: 1px solid rgba(249,115,22,0.25); }
.badge-education  { background: rgba(6,182,212,0.1);   color: var(--edu);     border: 1px solid rgba(6,182,212,0.25); }
.badge-technology { background: rgba(236,72,153,0.1);  color: var(--tech);    border: 1px solid rgba(236,72,153,0.25); }

.badge-ioc { background: rgba(79,142,247,0.1); color: var(--blue); border: 1px solid rgba(79,142,247,0.2); }
.badge-cve { background: var(--crit-dim); color: var(--critical); border: 1px solid rgba(245,82,82,0.2); }

/* ─── Credibility bar ────────────────────────────────────────────────────── */
.cred-wrap { display: flex; align-items: center; gap: 6px; }
.cred-bar { width: 44px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.cred-fill { height: 100%; border-radius: 2px; }
.cred-num { font-size: 0.62rem; color: var(--text-2); min-width: 20px; }
.conf-score { font-size: 0.72rem; font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ─── IOC pill ───────────────────────────────────────────────────────────── */
.ioc-type-pill {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ─── Charts grid ────────────────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ─── CVE / actor cards ──────────────────────────────────────────────────── */
.cve-card {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.cve-card:last-child { border-bottom: none; }

.cve-id {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--critical);
}

.cvss-chip {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.cve-desc {
  font-size: 0.68rem;
  color: var(--text-2);
  margin-top: 4px;
  line-height: 1.45;
}

.actor-card {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.actor-card:last-child { border-bottom: none; }
.actor-name { font-size: 0.78rem; font-weight: 500; }
.actor-meta { font-size: 0.65rem; color: var(--text-3); margin-top: 2px; }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.pg-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.68rem;
  padding: 4px 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pg-btn:hover, .pg-btn.active {
  background: var(--blue-dim);
  border-color: var(--blue);
  color: var(--blue);
}

.pg-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ─── Stats grid (feeds page) ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.stat-card .glow {
  position: absolute;
  top: -24px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(32px);
  opacity: 0.15;
}

.stat-card.c-low .glow    { background: var(--low); }
.stat-card.c-critical .glow { background: var(--critical); }
.stat-card.c-blue .glow   { background: var(--blue); }
.stat-card.c-purple .glow { background: var(--govt); }

.stat-icon { font-size: 1rem; margin-bottom: 8px; color: var(--text-3); }
.stat-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.stat-label { font-size: 0.65rem; color: var(--text-2); margin-top: 4px; }

.stat-card.c-low .stat-value    { color: var(--low); }
.stat-card.c-critical .stat-value { color: var(--critical); }
.stat-card.c-blue .stat-value   { color: var(--blue); }
.stat-card.c-purple .stat-value { color: var(--govt); }

/* ─── Feeds operations view ─────────────────────────────────────────────── */
.feed-stats-grid {
  gap: 12px;
  margin-bottom: 12px;
}

.feeds-page .stat-card {
  min-height: 102px;
  padding: 12px 14px 10px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    'icon'
    'value'
    'label'
    'sub';
  row-gap: 3px;
  justify-items: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  background:
    radial-gradient(circle at 14% 10%, rgba(79,142,247,0.1), transparent 58%),
    linear-gradient(165deg, rgba(255,255,255,0.065), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.feeds-page .stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 34%);
}

.feeds-page .stat-card:hover {
  border-color: rgba(255,255,255,0.16);
}

.feeds-page .stat-card .glow {
  opacity: 0.06;
}

.feeds-page .stat-icon {
  grid-area: icon;
  margin: 0;
  align-self: center;
  justify-self: center;
  font-size: 0.94rem;
  color: var(--text-2);
}

.feeds-page .stat-value {
  grid-area: value;
  justify-self: center;
  align-self: center;
  font-size: 1.34rem;
  line-height: 1;
}

.feeds-page .stat-label {
  grid-area: label;
  margin-top: 0;
  font-size: 0.66rem;
  font-weight: 680;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.feeds-page .stat-subline {
  grid-area: sub;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(8,12,20,0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.71rem;
  line-height: 1.2;
  width: 100%;
}

.feeds-page .stat-subline span {
  color: #9aa7bb;
  letter-spacing: 0.015em;
  font-weight: 620;
}

.feeds-page .stat-subline strong {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.feeds-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(440px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.feeds-status-card,
.feeds-panel {
  background: rgba(255,255,255,0.032);
}

.feeds-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.feed-health-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.feed-group-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.018);
}

.feed-group-card.muted {
  background: rgba(255,255,255,0.012);
}

.feed-group-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
}

.feed-group-title span {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.feed-group-title small {
  display: block;
  margin-top: 3px;
  font-size: 0.58rem;
  color: var(--text-3);
}

.feed-group-title strong {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-3);
  line-height: 1.45;
  text-align: right;
}

.feed-compact-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.feed-compact-row:last-child {
  border-bottom: none;
}

.feed-compact-row:hover,
.feed-mini-row:hover,
.feed-quality-row:hover {
  background: rgba(255,255,255,0.018);
}

.feed-compact-row.muted,
.feed-mini-row.muted {
  opacity: 0.55;
}

.feed-compact-main {
  min-width: 0;
}

.feed-inline-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 7px;
  vertical-align: middle;
}

.feed-inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-3);
  background: rgba(255,255,255,0.03);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.feed-inline-badge.priority {
  color: #93c5fd;
  border-color: rgba(79,142,247,0.28);
  background: rgba(79,142,247,0.12);
}

.feed-compact-metrics {
  display: grid;
  gap: 2px;
  min-width: 82px;
  text-align: right;
  white-space: nowrap;
  font-size: 0.6rem;
  color: var(--text-3);
}

.feed-compact-metrics b {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.feed-compact-status {
  min-width: 82px;
  text-align: right;
}

.feed-stat-loading {
  color: transparent;
  position: relative;
}

.feed-stat-loading::after {
  content: '';
  display: block;
  width: 44px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.045), rgba(255,255,255,0.12), rgba(255,255,255,0.045));
  background-size: 220% 100%;
  animation: feedSkeleton 1.15s linear infinite;
}

.feed-loading-block,
.feed-loading-list {
  pointer-events: none;
}

.loading-row {
  background: rgba(255,255,255,0.012);
}

.loading-row:hover {
  background: rgba(255,255,255,0.012);
}

.feed-skel {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.045), rgba(255,255,255,0.115), rgba(255,255,255,0.045));
  background-size: 220% 100%;
  animation: feedSkeleton 1.15s linear infinite;
}

.skel-title { width: 156px; height: 10px; }
.skel-title.short { width: 112px; }
.skel-sub { width: 82px; height: 8px; margin-top: 8px; }
.skel-count { width: 96px; height: 10px; margin-top: 2px; }
.skel-line { width: min(72%, 260px); height: 10px; }
.skel-line.short { width: min(48%, 190px); }
.skel-meta { width: min(58%, 220px); height: 8px; margin-top: 7px; }
.skel-meta.short { width: min(38%, 150px); }
.skel-metric { width: 86px; height: 24px; border-radius: 6px; }
.skel-meter { width: 96px; height: 26px; border-radius: 6px; }
.skel-pill { width: 64px; height: 20px; border-radius: 999px; }

@keyframes feedSkeleton {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.feeds-page .badge {
  font-size: 0.58rem;
  padding: 3px 7px;
}

.feed-quality-list,
.feed-mini-list {
  display: grid;
}

.feed-quality-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.feed-quality-row:last-child,
.feed-mini-row:last-child {
  border-bottom: none;
}

.feed-quality-main,
.feed-mini-main {
  min-width: 0;
}

.feed-quality-numbers {
  display: grid;
  gap: 2px;
  min-width: 78px;
  text-align: right;
  white-space: nowrap;
  font-size: 0.6rem;
  color: var(--text-3);
}

.feed-quality-numbers b {
  font-family: var(--mono);
  color: var(--text);
}

.feed-mini-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.feed-mini-row .feed-time {
  min-width: 48px;
  text-align: right;
}

/* ─── Sector tabs ────────────────────────────────────────────────────────── */
.sector-tabs {
  display: flex;
  gap: 6px;
}

.sector-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sector-tab.active.banking    { background: rgba(79,142,247,0.12);  border-color: rgba(79,142,247,0.4);  color: var(--banking); }
.sector-tab.active.government { background: rgba(167,139,250,0.12); border-color: rgba(167,139,250,0.4); color: var(--govt); }
.sector-tab.active.healthcare { background: rgba(74,201,126,0.12);  border-color: rgba(74,201,126,0.4);  color: var(--health); }
.sector-tab.active.telecom    { background: rgba(245,158,11,0.12);  border-color: rgba(245,158,11,0.4);  color: #f59e0b; }
.sector-tab.active.energy     { background: rgba(249,115,22,0.12);  border-color: rgba(249,115,22,0.4);  color: var(--energy); }
.sector-tab.active.education  { background: rgba(6,182,212,0.12);   border-color: rgba(6,182,212,0.4);   color: var(--edu); }
.sector-tab.active.technology { background: rgba(236,72,153,0.12);  border-color: rgba(236,72,153,0.4);  color: var(--tech); }
.sector-tab:not(.active):hover { border-color: var(--border-2); color: var(--text); }

.sector-actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px 16px;
}

.sector-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.sector-main,
.sector-side {
  min-width: 0;
}

.sector-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sector-cve-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
}

.sector-cve-list .cve-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
}

.sector-cve-list .cve-id {
  word-break: break-word;
}

/* ─── Feed health items ──────────────────────────────────────────────────── */
.feed-group-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 18px 6px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.feed-item {
  display: grid;
  grid-template-columns: 8px 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: rgba(255,255,255,0.015); }

.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.feed-dot.ok       { background: var(--low); box-shadow: 0 0 6px rgba(74,201,126,0.5); }
.feed-dot.err      { background: var(--critical); box-shadow: 0 0 6px rgba(245,82,82,0.5); }
.feed-dot.never    { background: var(--text-3); }
.feed-dot.disabled { background: var(--text-3); opacity: 0.4; }

.feed-info { min-width: 0; }
.feed-name { font-size: 0.72rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-meta { font-size: 0.6rem; color: var(--text-3); margin-top: 2px; }
.feed-error { font-size: 0.6rem; color: var(--critical); margin-top: 2px; }

.feed-count {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.feed-time {
  font-size: 0.62rem;
  color: var(--text-3);
  white-space: nowrap;
}

.feed-quality-table {
  min-width: 920px;
}

.quality-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.quality-value {
  width: 28px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.quality-bar {
  display: block;
  width: 68px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.quality-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

/* ─── Coverage gap proof view ───────────────────────────────────────────── */
.coverage-provider-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
}

.coverage-provider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  padding: 7px 10px;
}

.coverage-provider-name {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-2);
}

.coverage-provider-count {
  min-width: 22px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--blue);
}

.gap-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.gap-row:last-child { border-bottom: none; }

.gap-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.gap-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.gap-title a { color: var(--text); }

.gap-meta {
  margin-top: 4px;
  font-size: 0.62rem;
  color: var(--text-3);
}

.gap-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 210px;
}

.gap-summary {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.7rem;
  line-height: 1.6;
}

.gap-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.gap-facts span {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 7px;
  background: rgba(255,255,255,0.03);
  color: var(--text-3);
  font-size: 0.6rem;
  font-weight: 700;
}

.gap-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.gap-check {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255,255,255,0.025);
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 700;
}

.gap-check.found {
  color: var(--medium);
  border-color: rgba(232,164,74,0.28);
  background: rgba(232,164,74,0.08);
}

.gap-check.miss {
  color: var(--low);
  border-color: rgba(74,201,126,0.28);
  background: rgba(74,201,126,0.08);
}

.gap-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.gap-timeline-item {
  position: relative;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  padding: 9px 10px 9px 22px;
}

.gap-timeline-dot {
  position: absolute;
  left: 9px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.gap-timeline-label {
  display: block;
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 700;
}

.gap-timeline-time {
  display: block;
  margin-top: 5px;
  color: var(--text-3);
  font-size: 0.58rem;
}

.gap-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gap-evidence {
  min-height: 104px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  padding: 10px;
}

.gap-evidence-title {
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.35;
}

.gap-evidence-body {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 0.62rem;
  line-height: 1.55;
}

/* ─── Threat detail (tab layout) ─────────────────────────────────────────── */

/* Header */
.d-header {
  background:
    linear-gradient(135deg, rgba(79,142,247,0.08), rgba(255,255,255,0.02) 38%, rgba(167,139,250,0.05)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.d-header-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.d-title {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 6px;
}
.d-summary {
  font-size: 0.74rem;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 980px;
}

.d-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(430px, 0.82fr);
  align-items: start;
  gap: 12px;
}

.d-header-copy {
  min-width: 0;
}

.d-source-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.d-source-actions {
  margin-top: 10px;
}
.d-stix-btn {
  font-size: 0.65rem;
  padding: 3px 10px;
  opacity: 0.8;
}
.d-stix-btn:hover { opacity: 1; }

.d-meta-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 19px;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--text-3);
  font-size: 0.52rem;
  line-height: 1;
}

.d-meta-pill span {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.d-meta-pill strong {
  color: var(--text);
  font-size: 0.57rem;
  font-weight: 800;
  text-transform: capitalize;
}

.d-context-row {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(500px, 1.18fr);
  align-items: start;
  gap: 12px;
  margin-top: 9px;
}

.d-source-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  min-height: 0;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(79,142,247,0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(79,142,247,0.085), rgba(255,255,255,0.018)),
    rgba(79,142,247,0.035);
}

.d-rating-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
    rgba(255,255,255,0.028);
  overflow: hidden;
}

.d-rating-title {
  padding: 8px 12px 7px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.d-source-main {
  min-width: 0;
}

.d-source-kicker {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 3px;
}

.d-source-title {
  display: block;
  color: var(--text);
  font-size: 0.69rem;
  font-weight: 750;
  line-height: 1.24;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.d-source-title:hover {
  color: var(--blue);
}

.d-source-url {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 0.62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.d-source-facts {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
}

.d-source-facts div {
  min-width: 86px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0,0,0,0.12);
}

.d-source-facts span {
  display: block;
  font-size: 0.49rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.d-source-facts strong {
  display: block;
  margin-top: 1px;
  color: var(--text);
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.d-evidence-preview {
  margin-top: 10px;
}

.d-evidence-preview-title {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.d-evidence-preview-item {
  margin-bottom: 7px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.035);
}

.d-open-source {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 6px;
  border: 1px solid rgba(79,142,247,0.45);
  color: var(--blue);
  background: rgba(79,142,247,0.1);
  font-size: 0.63rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

/* Stat bar */
.d-statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.d-stat {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: var(--r);
  min-height: 58px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.d-stat:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
}
.d-stat-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.d-stat-label {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-top: 2px;
}

/* Layout */
.d-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 10px;
  align-items: start;
}
.d-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: clamp(340px, calc(100vh - 292px), 590px);
  display: flex;
  flex-direction: column;
}
.d-sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + 16px);
  display: grid;
  gap: 10px;
  align-self: start;
  max-height: clamp(340px, calc(100vh - 292px), 590px);
  overflow: auto;
}

/* Tabs */
.d-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.d-tabs::-webkit-scrollbar { display: none; }
.d-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-3);
  padding: 9px 10px 8px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.d-tab:hover { color: var(--text-2); }
.d-tab.active { color: var(--text); border-bottom-color: var(--blue); }
.d-tab:focus { outline: none; }
.d-tab:focus-visible { color: var(--text); background: rgba(79,142,247,0.08); }
.d-tab-count {
  background: var(--surface-2);
  border-radius: 20px;
  padding: 0 5px;
  font-size: 0.58rem;
  color: var(--text-3);
}

/* Tab content */
.d-tabcontent { padding: 12px; }
.d-tabcontent {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.d-block { margin-bottom: 16px; }
.d-block:last-child { margin-bottom: 0; }
.d-section-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
}
.d-block-title {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 12px;
}
.d-empty {
  font-size: 0.72rem;
  color: var(--text-3);
  padding: 10px 0;
  line-height: 1.5;
}
.d-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; }
.d-product {
  font-size: 0.72rem;
  min-height: 42px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sidebar */
.d-side-card {
  position: static;
  margin-bottom: 0;
}

.d-meta-list {
  padding: 2px 0;
}

.d-related-item {
  display: block;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.d-related-item:hover { border-color: var(--border-2); }
.d-related-sev { margin-bottom: 3px; }
.d-related-title {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 3px;
}

/* ─── Threat detail (old classes kept for compat) ─────────────────────────── */
.detail-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.detail-title {
  font-size: 1.0rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text);
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--text-2);
}

.detail-summary {
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 14px;
  align-items: start;
}

.detail-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}

.detail-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

.detail-section-count {
  font-size: 0.62rem;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: 20px;
  padding: 1px 7px;
}

/* Impact grid */
/* ── Sector impact: compact row list (replaces grid boxes) ── */
.impact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.impact-row {
  display: grid;
  grid-template-columns: 80px 1fr 46px;
  align-items: center;
  gap: 0 12px;
  padding: 9px 12px;
  border-radius: 7px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
}

.impact-sector-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  white-space: nowrap;
}

.impact-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.impact-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.impact-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.impact-reason-text {
  font-size: 0.58rem;
  color: var(--text-3);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.impact-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  justify-self: end;
}

.impact-score-num {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}

.impact-score-suffix {
  font-size: 0.44rem;
  font-weight: 600;
  color: var(--text-3);
}

/* kept for legacy compat — hidden via new HTML */
.impact-grid { display: none; }
.impact-box  { display: none; }

/* Meta table */
.meta-table { padding: 4px 0; }
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.meta-row:last-child { border-bottom: none; }
.meta-key { font-size: 0.65rem; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.meta-val { font-size: 0.68rem; color: var(--text); text-align: right; }

/* IOC row */
.ioc-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
}
.ioc-row:last-child { border-bottom: none; }
.ioc-val { font-family: var(--mono); font-size: 0.68rem; color: var(--text); word-break: break-all; flex: 1; min-width: 0; }
.ioc-conf { font-size: 0.6rem; color: var(--text-3); white-space: nowrap; }

.ioc-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.ioc-group:last-child { margin-bottom: 0; }

.ioc-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.ioc-group-type {
  font-size: 0.6rem;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid;
}

.ioc-group-count {
  font-size: 0.65rem;
  color: var(--text-3);
  margin-left: 2px;
}

.ioc-copy-all-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 5px;
  color: var(--text-3);
  font-size: 0.6rem;
  font-weight: 650;
  padding: 2px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, border-color .15s;
}
.ioc-copy-all-btn:hover { color: var(--text); border-color: var(--text-3); }

.ioc-artifact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  min-height: 40px;
}
.ioc-artifact-row:last-child { border-bottom: none; }

.ioc-stale-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245,179,49,0.08);
  border: 1px solid rgba(245,179,49,0.22);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.68rem;
  color: var(--medium);
  margin-bottom: 12px;
  line-height: 1.5;
}
.ioc-stale-icon { flex-shrink: 0; }
.ai-extracted-notice {
  font-size: 0.65rem;
  color: var(--text-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 10px;
  display: inline-block;
}

.ioc-artifact-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.ioc-family-tag {
  font-size: 0.6rem;
  color: var(--medium);
  background: rgba(245,179,49,0.1);
  border: 1px solid rgba(245,179,49,0.2);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.copy-btn:hover { color: var(--text); background: var(--surface-2); }

/* TTP item */
.ttp-item {
  min-height: 72px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ttp-item:last-child { border-bottom: none; }
.ttp-id {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-dim);
  padding: 2px 6px;
  border-radius: 4px;
}
.ttp-name { font-size: 0.72rem; font-weight: 500; margin-top: 5px; }
.ttp-proc { font-size: 0.65rem; color: var(--text-3); margin-top: 3px; line-height: 1.45; }

/* Related threat links — old vertical style */
.related-link {
  display: block;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.related-link:last-child { border-bottom: none; }
.related-link:hover { background: rgba(255,255,255,0.02); }
.related-title { font-size: 0.72rem; font-weight: 500; color: var(--text); }
.related-meta { font-size: 0.62rem; color: var(--text-3); margin-top: 2px; }

/* Related threats — full-width section + horizontal scroll */
.d-related-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 12px;
}

.d-related-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--border);
}

.d-related-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
}

.d-related-count {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: 20px;
  padding: 1px 8px;
}

.related-hscroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.related-hscroll::-webkit-scrollbar { height: 4px; }
.related-hscroll::-webkit-scrollbar-track { background: transparent; }
.related-hscroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.related-hcard {
  flex: 0 0 200px;
  min-height: 120px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.related-hcard:hover {
  border-color: var(--border-2);
  background: rgba(255,255,255,0.07);
  transform: translateY(-1px);
}
.related-hcard-title {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.d-actor-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.evidence-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.evidence-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.evidence-body {
  font-size: 0.66rem;
  color: var(--text-2);
  line-height: 1.55;
  margin-top: 8px;
}

.comparison-intro {
  color: var(--text-3);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.5;
  margin: -2px 0 12px;
}

/* ── Source comparison matrix table ── */
.cmat {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cmat-head {
  display: grid;
  grid-template-columns: 130px 110px 1fr 82px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  gap: 8px;
}

.cmat-row {
  display: grid;
  grid-template-columns: 130px 110px 1fr 82px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 8px;
  transition: background 0.1s;
}

.cmat-row:last-child { border-bottom: none; }
.cmat-row:hover { background: rgba(255,255,255,0.025); }

.cmat-provider {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}

.cmat-icon {
  font-size: 0.75rem;
  line-height: 1;
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}

/* status colours */
.cmat-seen    { color: var(--critical); }
.cmat-clean   { color: var(--low); }
.cmat-pending { color: var(--text-3); }
.cmat-na      { color: var(--text-3); opacity: 0.55; }
.cmat-error   { color: var(--critical); opacity: 0.8; }

.cmat-detail {
  font-size: 0.6rem;
  color: var(--text-3);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmat-time {
  font-size: 0.58rem;
  color: var(--text-3);
  text-align: right;
  white-space: nowrap;
}

/* legacy cards — hidden since we use cmat now */
.comparison-grid { display: none; }
.comparison-cell { display: none; }

.analyst-chip {
  margin-top: 5px;
  color: var(--text-3);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.threat-actions-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 10px;
}

.best-findings-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  padding: 12px;
}

.best-context-note,
.best-empty {
  border: 1px solid rgba(79,142,247,0.18);
  border-radius: 8px;
  background: rgba(79,142,247,0.06);
  padding: 8px 10px;
  color: var(--text-2);
  font-size: 0.6rem;
  font-weight: 700;
}

.best-empty strong,
.best-empty span {
  display: block;
}

.best-empty span {
  margin-top: 2px;
  color: var(--text-3);
}

.best-findings-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.best-finding-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: rgba(8,12,20,0.45);
  color: inherit;
  text-decoration: none;
}

.best-finding-row:hover {
  border-color: rgba(79,142,247,0.35);
  background: rgba(79,142,247,0.08);
}

.best-finding-title {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-finding-sub {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 0.6rem;
  font-weight: 700;
}

.best-finding-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.best-finding-meta span {
  padding: 3px 7px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.56rem;
  font-weight: 800;
}

.feed-evidence-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.feed-evidence-strip div {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  min-height: 84px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.feed-evidence-strip span {
  color: var(--text-3);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feed-evidence-strip strong {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1;
}

.feed-evidence-strip em {
  color: var(--text-2);
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 700;
}

.rating-explain {
  padding: 10px 14px 14px;
  display: grid;
  gap: 9px;
}

.rating-explain--compact {
  padding: 10px 14px 12px;
  gap: 8px;
}

.rating-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}

.rating-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rating-row span {
  color: var(--text-3);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-top: 2px;
  line-height: 1.2;
}

.rating-row strong {
  color: var(--text-2);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ─── Vulnerability pulse ───────────────────────────────────────────────── */
.vuln-page {
  padding-top: calc(var(--navbar-h) + 12px);
}

.vuln-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(79,142,247,0.1), transparent 46%),
    rgba(255,255,255,0.035);
  padding: 18px 20px;
}

.vuln-eyebrow {
  color: var(--blue);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.vuln-hero h1 {
  margin-top: 4px;
  color: var(--text);
  font-size: 1.14rem;
  line-height: 1.18;
  font-weight: 900;
}

.vuln-hero p {
  max-width: 980px;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.45;
}

.vuln-hero-meta {
  display: grid;
  gap: 7px;
  min-width: 240px;
}

.vuln-hero-meta span {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8,12,20,0.38);
  color: var(--text-2);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 7px 9px;
}

.vuln-kpi-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 0.85fr;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(79,142,247,0.1), transparent 45%),
    rgba(255,255,255,0.026);
  padding: 10px;
}

.vuln-kpi-grid .dash-kpi {
  min-height: 78px;
  border-color: rgba(255,255,255,0.08);
  border-radius: 13px;
  background: rgba(8,12,20,0.26);
}

.vuln-kpi-grid .dash-kpi:first-child {
  background:
    linear-gradient(135deg, rgba(79,142,247,0.18), rgba(74,201,126,0.08)),
    rgba(8,12,20,0.34);
}

.vuln-chart-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.vuln-chart-grid .dash-chart-card {
  height: 350px;
}

.vuln-chart-grid .dash-chart-half {
  grid-column: span 6;
}

.vuln-company-focus {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(74,201,126,0.075), transparent 42%),
    rgba(255,255,255,0.035);
  overflow: hidden;
}

.vuln-company-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.8fr);
  gap: 18px;
  align-items: center;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.vuln-company-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.vuln-company-tab {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(8,12,20,0.34);
  color: var(--text-2);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.vuln-company-tab span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vuln-company-tab strong {
  color: var(--text);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.vuln-company-tab.active,
.vuln-company-tab:hover {
  border-color: rgba(79,142,247,0.72);
  background: rgba(79,142,247,0.16);
  color: var(--text);
}

.vuln-company-empty {
  color: var(--text-3);
  font-size: 0.66rem;
  font-weight: 800;
}

.vuln-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(360px, 0.62fr);
  gap: 14px;
  padding: 14px 16px 16px;
  min-height: 430px;
}

.vuln-focus-chart {
  min-height: 400px;
}

.vuln-focus-side {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8,12,20,0.28);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.vuln-focus-name {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.vuln-focus-move {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.vuln-focus-move span {
  min-width: 0;
}

.vuln-focus-move strong {
  display: block;
  color: var(--text);
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.vuln-focus-move em {
  display: block;
  margin-top: 4px;
  color: var(--text-3);
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.vuln-focus-arrow {
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vuln-focus-delta {
  grid-column: 1 / -1;
  justify-self: start;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 900;
}

.vuln-focus-delta.up {
  color: var(--low);
  border-color: rgba(74,201,126,0.3);
  background: rgba(74,201,126,0.08);
}

.vuln-focus-delta.down {
  color: var(--critical);
  border-color: rgba(245,82,82,0.3);
  background: rgba(245,82,82,0.08);
}

.vuln-focus-copy {
  color: var(--text-2);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
}

.vuln-focus-examples {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.vuln-focus-examples a {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,0.035);
  padding: 8px 9px;
  color: inherit;
  display: grid;
  gap: 3px;
}

.vuln-focus-examples strong {
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 900;
}

.vuln-focus-examples span {
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.32;
}

.vuln-table-card {
  overflow: hidden;
}

.vuln-table th,
.vuln-table td {
  vertical-align: middle;
}

.vuln-vendor-name {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
}

.vuln-source-mix {
  margin-top: 2px;
  max-width: 320px;
  color: var(--text-3);
  font-size: 0.55rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vuln-examples {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vuln-examples a {
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.55rem;
  font-weight: 800;
}

.severity-mini {
  width: 112px;
  height: 9px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
}

.severity-mini span {
  min-width: 3px;
  height: 100%;
}

.vuln-empty {
  text-align: center;
  color: var(--text-3);
}

.vuln-empty strong,
.vuln-empty span {
  display: block;
}

.vuln-source-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vuln-source-card {
  min-height: 78px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.035);
  padding: 11px 13px;
  display: grid;
  gap: 2px;
  color: inherit;
}

.vuln-source-card span {
  color: var(--text-3);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vuln-source-card strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.vuln-source-card em {
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 800;
}

.vuln-pulse-board {
  /* border: 1px solid var(--border); */
  /* border-radius: 18px; */
  /* background:
    radial-gradient(circle at 22% 0%, rgba(79,142,247,0.12), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(74,201,126,0.1), transparent 30%),
    rgba(255,255,255,0.026); */
  padding: 12px;
}

.vuln-source-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.vuln-board-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px 16px;
  text-align: center;
}

.vuln-board-kicker {
  color: var(--blue);
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.vuln-board-title {
  font-family: inherit;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
}

.vuln-board-sub {
  max-width: 820px;
  color: var(--text-2);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  margin: 8px auto 0;
}

.vuln-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vuln-mini-card {
  position: relative;
  min-height: 276px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% -16%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent 52%),
    rgba(8,12,20,0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 28px rgba(0,0,0,0.16);
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}

.vuln-mini-card.vuln-surge-extreme {
  background:
    radial-gradient(circle at 50% -16%, rgba(245,82,82,0.18), transparent 46%),
    linear-gradient(180deg, rgba(245,82,82,0.08), transparent 52%),
    rgba(8,12,20,0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 34px rgba(245,82,82,0.1);
}

.vuln-mini-card.vuln-surge-high {
  background:
    radial-gradient(circle at 50% -16%, rgba(232,164,74,0.16), transparent 46%),
    linear-gradient(180deg, rgba(232,164,74,0.07), transparent 52%),
    rgba(8,12,20,0.34);
}

.vuln-glasswing-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  color: #d9e9ff;
  border: 1px solid rgba(79,142,247,0.52);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79,142,247,0.34), rgba(79,142,247,0.12));
  box-shadow: 0 0 18px rgba(79,142,247,0.18), inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 4px 10px;
  font-size: 0.47rem;
  font-weight: 900;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.vuln-mini-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 74%, transparent), transparent);
  opacity: 0.65;
}

.vuln-mini-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
}

.vuln-mini-name {
  color: color-mix(in srgb, var(--text) 86%, var(--text-2));
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.18;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vuln-mini-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 58px;
}

.vuln-mini-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--text-2);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 999px;
  background: rgba(255,255,255,0.028);
  padding: 4px 9px;
  font-size: 0.53rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.vuln-mini-metrics span em {
  color: inherit;
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.vuln-mini-metrics span strong {
  color: inherit;
  font-size: 0.56rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.vuln-mini-metrics b {
  color: color-mix(in srgb, var(--low) 88%, var(--text));
  border: 1px solid rgba(74,201,126,0.24);
  border-radius: 999px;
  background: rgba(74,201,126,0.06);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.vuln-mini-metrics b em {
  color: inherit;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vuln-surge-extreme .vuln-mini-metrics b {
  color: #ff7777;
  border-color: rgba(245,82,82,0.34);
  background: rgba(245,82,82,0.1);
}

.vuln-surge-high .vuln-mini-metrics b {
  color: #f0b866;
  border-color: rgba(232,164,74,0.32);
  background: rgba(232,164,74,0.09);
}

.vuln-surge-down .vuln-mini-metrics b,
.vuln-surge-flat .vuln-mini-metrics b {
  color: var(--text-2);
  border-color: rgba(136,146,164,0.18);
  background: rgba(136,146,164,0.06);
}

.vuln-mini-metrics span.down {
  color: #94a3b8;
}

.vuln-mini-metrics span.flat {
  color: var(--text-3);
}

.vuln-mini-chart {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 146px;
  margin-top: 2px;
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 999;
}

.toast {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.72rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  animation: slideIn 0.2s ease;
  max-width: 300px;
}
.toast.success { border-color: rgba(74,201,126,0.4); }
.toast.warning { border-color: rgba(232,164,74,0.4); }
.toast.info    { border-color: rgba(79,142,247,0.35); }

@keyframes slideIn {
  from { transform: translateX(16px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ─── Search overlay ─────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  top: calc(var(--navbar-h) + 5px);
  right: 28px;
  width: 340px;
  background: rgba(14,20,32,0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-height: 440px;
  overflow-y: auto;
}
.search-overlay.hidden { display: none; }

/* ─── Live threat map ───────────────────────────────────────────────────── */
.threat-map-shell {
  height: 100vh;
  overflow: hidden;
}

.threat-map-page {
  height: 100vh;
  padding: calc(var(--navbar-h) + 12px) 18px 18px;
  overflow: hidden;
}

.tm-stage {
  --tm-rail-w: clamp(300px, 23vw, 370px);
  height: calc(100vh - var(--navbar-h) - 30px);
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255,47,109,0.12), transparent 32%),
    linear-gradient(180deg, rgba(20,14,25,0.86), rgba(7,9,16,0.96));
  overflow: hidden;
  position: relative;
}

.tm-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,47,109,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,47,109,0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.tm-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 70px;
  padding: 10px 24px 8px;
  text-align: center;
}

.tm-header-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  width: min(100%, 980px);
}

.tm-map-legend-popover {
  width: min(300px, 82vw);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.45;
  white-space: normal;
  z-index: 50;
}

.tm-kicker {
  margin-bottom: 2px;
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tm-title {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.78rem, 0.62rem + 0.42vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-2);
  text-transform: uppercase;
}

.tm-context-title {
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 0.94rem + 1.05vw, 1.72rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: min(760px, 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-context-title:empty {
  display: none;
}

.tm-context-subtitle {
  color: var(--text-2);
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 650;
  max-width: min(860px, 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-subtitle {
  margin-top: 2px;
  font-family: inherit;
  font-size: 0.62rem;
  color: #ff2f6d;
  font-weight: 600;
}

.tm-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 31;
}

.tm-mode-note {
  display: none;
}

.tm-layout {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  height: calc(100% - 70px);
  min-height: 0;
  padding: 0 calc(var(--tm-rail-w) + 32px) 14px 18px;
}

.tm-left,
.tm-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.tm-right {
  position: absolute;
  z-index: 35;
  top: 0;
  right: 18px;
  bottom: 14px;
  width: var(--tm-rail-w);
  overflow-y: auto;
  padding-right: 2px;
}

.tm-map-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  background: rgba(3,5,11,0.16);
  box-sizing: border-box;
  overflow: hidden;
}

/* Strip is in-flow at top so this layer keeps height; canvas fills remaining space */
.tm-map-layer {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.tm-map-canvas-stack {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
}

#tm-map {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.tm-panel {
  background: rgba(6,8,14,0.86);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 9px 10px;
  min-height: 0;
  /* Prevents adjacent panel text bleeding through semi-transparent bg at scroll boundaries */
  isolation: isolate;
}

.tm-panel-title {
  font-size: 0.63rem;
  font-weight: 750;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.tm-right .tm-panel-title {
  text-align: center;
  justify-content: center;
}

.tm-title-with-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tm-info {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tm-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text-2);
  font-size: 0.5rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
}

.tm-info-popover {
  position: absolute;
  top: 24px;
  right: 0;
  width: min(310px, 72vw);
  z-index: 20;
  display: none;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(8,10,16,0.98);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  text-transform: none;
  letter-spacing: 0;
}

.tm-info:hover .tm-info-popover,
.tm-info:focus-within .tm-info-popover {
  display: grid;
  gap: 7px;
}

.tm-map-legend-info.tm-info:hover .tm-map-legend-popover,
.tm-map-legend-info.tm-info:focus-within .tm-map-legend-popover {
  display: block;
}

.tm-feed-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tm-live-feed {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: calc(100% - 28px);
  overflow: hidden;
}

.tm-event {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text-2);
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(79,142,247,0.09), transparent 42%),
    rgba(255,255,255,0.035);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.tm-event:hover {
  color: var(--text);
  border-color: rgba(79,142,247,0.24);
  background:
    linear-gradient(90deg, rgba(79,142,247,0.16), transparent 48%),
    rgba(255,255,255,0.055);
  transform: translateX(2px);
}

.tm-event-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tm-event-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.tm-event b {
  display: block;
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-event em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text-2);
  font-size: 0.48rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tm-event small {
  display: block;
  color: var(--text-3);
  font-size: 0.52rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-event-beacon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  background: #f5b331;
  box-shadow: 0 0 18px rgba(245,179,49,0.35);
}

.tm-event-beacon.malware { background: #ff3045; box-shadow: 0 0 18px rgba(255,48,69,0.35); }
.tm-event-beacon.phishing { background: #a855f7; box-shadow: 0 0 18px rgba(168,85,247,0.35); }
.tm-event-beacon.vulnerability-exploit { background: #f5b331; box-shadow: 0 0 18px rgba(245,179,49,0.35); }
.tm-event-beacon.ransomware { background: #fb7185; box-shadow: 0 0 18px rgba(251,113,133,0.35); }
.tm-event-beacon.identity { background: #06b6d4; box-shadow: 0 0 18px rgba(6,182,212,0.35); }
.tm-event-beacon.ai-security { background: #ec4899; box-shadow: 0 0 18px rgba(236,72,153,0.35); }
.tm-event-beacon.cloud { background: #22c55e; box-shadow: 0 0 18px rgba(34,197,94,0.35); }
.tm-event-beacon.data-theft { background: #f472b6; box-shadow: 0 0 18px rgba(244,114,182,0.35); }
.tm-event-beacon.supply-chain { background: #fb923c; box-shadow: 0 0 18px rgba(251,146,60,0.35); }
.tm-event-beacon.fraud { background: #eab308; box-shadow: 0 0 18px rgba(234,179,8,0.35); }
.tm-event-beacon.ddos { background: #38bdf8; box-shadow: 0 0 18px rgba(56,189,248,0.35); }
.tm-event-beacon.ot-iot { background: #14b8a6; box-shadow: 0 0 18px rgba(20,184,166,0.35); }
.tm-event-beacon.intrusion { background: #4f8ef7; box-shadow: 0 0 18px rgba(79,142,247,0.35); }

.tm-rank-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tm-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  padding: 6px 8px;
  margin: 0 -8px;
  width: calc(100% + 16px);
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 0.72rem;
  color: var(--text-2);
  position: relative;
  overflow: hidden;
}

.tm-rank-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--bar, 0%);
  background: rgba(79,142,247,0.07);
  border-radius: 6px;
  pointer-events: none;
  z-index: 0;
}

.tm-rank-row span,
.tm-rank-row b {
  position: relative;
  z-index: 1;
}

.tm-country-row {
  cursor: pointer;
  padding: 5px 6px;
  margin: -5px -6px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.tm-country-row:hover,
.tm-country-row.active {
  background: rgba(79,142,247,0.12);
  color: var(--text);
}

.tm-rank-row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tm-category-table {
  display: grid;
  gap: 6px;
}

.tm-map-layer .tm-category-strip {
  position: relative;
  flex: 0 0 auto;
  z-index: 12;
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 6px 8px;
  padding: 7px 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px 10px 0 0;
  background: rgba(8,10,16,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
  overflow: visible;
}

.tm-map-layer .tm-category-strip .tm-category-row {
  flex: 0 1 auto;
}

.tm-category-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  padding: 5px 7px;
  font-family: inherit;
  font-size: 0.66rem;
  cursor: pointer;
}

.tm-category-strip .tm-category-row {
  width: auto;
  grid-template-columns: minmax(0, auto) auto;
  padding: 4px 8px;
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
  white-space: nowrap;
}

.tm-category-row:hover,
.tm-category-row.active {
  background: rgba(79,142,247,0.1);
  border-color: rgba(79,142,247,0.24);
  color: var(--text);
}

.tm-category-row span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-category-row i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.tm-category-row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tm-quality {
  display: grid;
  gap: 9px;
}

.tm-quality-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px auto;
  gap: 8px;
  align-items: center;
  color: var(--text-2);
  font-size: 0.74rem;
}

.tm-qr-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-qr-val {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.tm-quality-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.tm-quality-fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #ff2f6d);
}

.tm-quality-reason-title {
  color: var(--text-3);
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tm-quality-reason {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.55rem;
  line-height: 1.3;
}

.tm-quality-reason span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-quality-reason b {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.tm-country-focus-panel {
  padding: 9px 10px;
}

.tm-country-focus-card {
  display: grid;
  gap: 8px;
}

.tm-country-focus-head {
  display: grid;
  gap: 3px;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

#tm-country-focus-title:empty {
  display: none;
}

.tm-country-focus-head b {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.1;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-country-focus-head span {
  color: var(--text-2);
  font-size: 0.7rem;
  line-height: 1.35;
  font-weight: 600;
}

.tm-country-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.tm-country-focus-grid span {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tm-country-focus-grid span::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 30%);
}

.tm-country-focus-grid span:hover {
  border-color: rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.045);
}

.tm-country-focus-grid b {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tm-country-focus-grid em {
  color: var(--text-3);
  font-style: normal;
  font-size: 0.63rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-country-focus-note {
  color: var(--text-3);
  font-size: 0.54rem;
  line-height: 1.45;
  font-weight: 600;
}

.tm-country-detail-btn {
  width: 100%;
  border: 1px solid var(--border-2);
  border-radius: 7px;
  background: rgba(79,142,247,0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 750;
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.tm-country-detail-btn:hover:not(:disabled) {
  border-color: rgba(79,142,247,0.42);
  background: rgba(79,142,247,0.13);
}

.tm-country-detail-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.tm-country-focus-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.tm-country-focus-actions .tm-country-detail-btn {
  flex: 1;
}

.tm-country-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  border: 1px solid rgba(79,142,247,0.3);
  border-radius: 7px;
  background: transparent;
  color: var(--blue);
  font-size: 0.58rem;
  font-weight: 700;
  min-height: 34px;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}

.tm-country-all-btn:hover {
  background: rgba(79,142,247,0.08);
  border-color: rgba(79,142,247,0.55);
}

/* Modal header actions group (view-all link + close button) */
.tm-country-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Modal header action link */
.tm-modal-header-link {
  display: inline-flex;
  align-items: center;
  height: 30px;
  box-sizing: border-box;
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--blue);
  text-decoration: none;
  padding: 0 12px;
  border: 1px solid rgba(79,142,247,0.28);
  border-radius: 7px;
  background: rgba(79,142,247,0.07);
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}

.tm-modal-header-link:hover {
  background: rgba(79,142,247,0.14);
  border-color: rgba(79,142,247,0.48);
  color: #79beff;
}

/* Mini bar chart */
.tm-mini-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-chart-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 56px 28px;
  align-items: center;
  gap: 8px;
}

.tm-chart-label {
  font-size: 0.65rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-chart-bar-wrap {
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.tm-chart-bar {
  height: 100%;
  border-radius: 3px;
  min-width: 3px;
  transition: width .4s ease;
}

.tm-chart-count {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Pair threats section */
.tm-pair-threats-section {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  padding: 12px;
  margin-top: 4px;
}

.tm-pair-threats-section h3 {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tm-pair-dir-section {
  margin-bottom: 10px;
}

.tm-pair-dir-section:last-child { margin-bottom: 0; }

.tm-pair-dir-count {
  font-weight: 700;
  color: var(--text);
  margin-left: 4px;
}

.tm-pair-empty {
  padding: 6px 0;
  color: var(--text-3);
}



/* Primary pair button in country focus */
.tm-country-all-btn--pair {
  background: rgba(79,142,247,0.12);
  border-color: rgba(79,142,247,0.4);
  color: var(--blue);
}

.tm-country-modal-footer {
  display: flex;
  gap: 8px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  flex-wrap: wrap;
}

.tm-country-all-link {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(79,142,247,0.25);
  border-radius: 6px;
  background: rgba(79,142,247,0.06);
  transition: background .15s, border-color .15s;
}

.tm-country-all-link:hover {
  background: rgba(79,142,247,0.12);
  border-color: rgba(79,142,247,0.45);
}

.tm-pair-direction-label {
  font-size: 0.62rem;
  font-weight: 750;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 12px 0 6px;
}

.tm-pair-threat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 5px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}

.tm-pair-threat:hover {
  border-color: var(--border-2);
  background: var(--surface-3);
}

.tm-pair-threat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tm-pair-threat-body b {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-pair-threat-body small {
  font-size: 0.62rem;
  color: var(--text-3);
}

.tm-country-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,0.68);
}

.tm-country-modal-backdrop.open {
  display: flex;
}

.tm-country-modal {
  width: min(860px, 94vw);
  max-height: min(820px, 92vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(8,10,16,0.98);
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}

.tm-country-modal-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tm-country-modal-kicker {
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tm-country-modal-title {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
}

.tm-country-modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  color: var(--text-2);
  font-size: 1.2rem;
  cursor: pointer;
}

.tm-country-modal-body {
  overflow-y: auto;
  padding: 16px 18px 18px;
}


/* Stat strip */
.tm-modal-stat-strip {
  display: flex;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  overflow: hidden;
}

.tm-modal-stat-strip > div {
  flex: 1;
  padding: 10px 12px;
  border-right: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.025);
}

.tm-modal-stat-strip > div:last-child {
  border-right: none;
}

.tm-modal-stat-strip b {
  display: block;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tm-modal-stat-strip span {
  display: block;
  margin-top: 4px;
  color: var(--text-3);
  font-size: 0.57rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 2-col layout */
.tm-modal-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.tm-modal-2col-left,
.tm-modal-2col-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-modal-section {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  padding: 12px;
}

.tm-modal-section--routes {
  padding-bottom: 0;
  overflow: hidden;
}

.tm-modal-section--routes .tm-routes-wrap {
  gap: 8px;
  margin-top: 2px;
}

.tm-modal-section h3,
.tm-country-recent h3 {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Actor intelligence strip in country modal — inside right column, gap handles spacing */
.tm-modal-actors-section { margin-top: 0; }

.tm-actor-loading,
.tm-actor-none {
  font-size: 0.67rem;
  color: var(--text-3);
  font-style: italic;
}

.tm-actor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  flex-wrap: wrap;
}

.tm-actor-row-dir {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 60px;
  flex-shrink: 0;
}

.tm-actor-dir-out { color: var(--medium); }
.tm-actor-dir-in  { color: var(--blue); }

.tm-actor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.tm-actor-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.tm-actor-chip:hover {
  background: rgba(79,142,247,0.14);
  border-color: rgba(79,142,247,0.3);
  color: var(--blue);
}

.tm-actor-chip--espionage    { border-color: rgba(167,139,250,0.2); }
.tm-actor-chip--financial    { border-color: rgba(74,201,126,0.2); }
.tm-actor-chip--sabotage,
.tm-actor-chip--cyberwarfare { border-color: rgba(245,82,82,0.2); }

.tm-actor-view-all {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.tm-actor-view-all:hover { color: var(--blue); }

/* keep legacy class wired for other uses */
.tm-country-recent {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  padding: 12px;
}

.tm-country-list {
  display: grid;
  gap: 7px;
}

.tm-country-list span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  color: var(--text-2);
  font-size: 0.67rem;
}

.tm-country-list em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.tm-country-list b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Attack routes — two-section list layout */
.tm-routes-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-routes-section {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tm-routes-section-label {
  padding: 7px 13px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tm-routes-section-label.in {
  color: #93c5fd;
  background: rgba(79,142,247,0.1);
  border-bottom: 1px solid rgba(79,142,247,0.14);
}

.tm-routes-section-label.out {
  color: #7dd3fc;
  background: rgba(6,182,212,0.08);
  border-bottom: 1px solid rgba(6,182,212,0.14);
}

.tm-routes-list {
  display: flex;
  flex-direction: column;
}

.tm-route-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
  width: 100%;
}

.tm-route-item:last-child {
  border-bottom: none;
}

.tm-route-item:hover {
  background: rgba(79,142,247,0.07);
}

.tm-route-item-name {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 650;
  flex: 1;
  text-align: left;
}

.tm-route-item-count {
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tm-route-empty {
  padding: 9px 13px;
  color: var(--text-3);
  font-size: 0.68rem;
  font-style: italic;
}

.tm-section-hint {
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 6px;
}

.tm-country-recent {
  display: grid;
  gap: 7px;
}

.tm-country-recent a {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--text-2);
  background: rgba(255,255,255,0.03);
}

.tm-country-recent a:hover {
  color: var(--text);
  background: rgba(79,142,247,0.1);
}

.tm-country-recent b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
}

.tm-country-recent span {
  color: var(--text-3);
  font-size: 0.57rem;
}

/* ─── Empty states ───────────────────────────────────────────────────────── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  text-align: center;
  gap: 7px;
}
.empty-icon { font-size: 1.5rem; opacity: 0.25; }
.empty-title { font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
.empty-sub { font-size: 0.68rem; color: var(--text-3); }

/* ─── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-3);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--text); }

/* ─── Utility ────────────────────────────────────────────────────────────── */
.mb-3  { margin-bottom: 10px; }
.mb-4  { margin-bottom: 14px; }
.mb-5  { margin-bottom: 18px; }
.mb-6  { margin-bottom: 22px; }
.mt-2  { margin-top: 6px; }
.mt-3  { margin-top: 10px; }

.flex        { display: flex; }
.flex-1      { flex: 1; }
.items-center { align-items: center; }
.gap-2       { gap: 8px; }

.text-xs   { font-size: 0.62rem; }
.text-sm   { font-size: 0.72rem; }
.text-2    { color: var(--text-2); }
.text-3    { color: var(--text-3); }
.c-critical { color: var(--critical); }
.c-high     { color: var(--high); }
.c-medium   { color: var(--medium); }
.c-low      { color: var(--low); }
.c-blue     { color: var(--blue); }
.mono       { font-family: var(--mono); }

@media (max-width: 900px) {
  .dash-pa-coverage-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(220px, 1fr);
  }

  .pa-coverage-ring-panel {
    min-height: calc(200px * var(--dash-s, 1));
  }

  .pa-coverage-ring-inner {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .dashboard-hero { align-items: stretch; flex-direction: column; }
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .impact-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-story-strip { align-items: flex-start; flex-direction: column; }
  .dashboard-chart-grid { grid-template-columns: 1fr; }
  .dash-chart-card,
  .dash-chart-wide,
  .dash-chart-half,
  .dash-chart-nine,
  .dash-chart-third,
  .dash-chart-quarter,
  .dash-chart-two-thirds,
  .dash-chart-full,
  .dashboard-chart-grid > .impact-panel.impact-panel-narrow,
  .dash-chart-row-2.dash-chart-card,
  .dash-chart-row-3.dash-chart-pa-coverage { grid-column: auto; }

  .dash-chart-row-2.dash-chart-card,
  .dashboard-chart-grid > .impact-panel.dash-chart-row-2,
  .dash-chart-row-3.dash-chart-pa-coverage {
    height: auto;
    min-height: calc(360px * var(--dash-s, 1));
  }

  .intel-grid   { grid-template-columns: 1fr; }
  .charts-grid  { grid-template-columns: 1fr; }
  .bottom-grid  { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .d-layout { grid-template-columns: 1fr; }
  .d-sidebar,
  .d-side-card { position: static; }
  .d-main,
  .d-sidebar { height: auto; max-height: none; }
  .d-tabcontent { max-height: none; overflow: visible; }
  .d-header-grid { grid-template-columns: 1fr; }
  .d-context-row { grid-template-columns: 1fr; }
  .d-source-card { grid-template-columns: 1fr; align-items: stretch; }
  .d-source-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-open-source { grid-column: 1 / -1; }
  .d-statbar { grid-template-columns: repeat(2, 1fr); }
  .comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .impact-grid  { grid-template-columns: 1fr; }
  .tm-layout {
    grid-template-columns: 1fr;
    padding: 6px 12px 14px;
  }
  .tm-right { display: none; }
  .tm-map-wrap, #tm-map { min-height: 0; }
  .tm-header {
    flex-direction: column;
    align-items: center;
    padding: 8px 14px 6px;
    text-align: center;
  }
  .tm-title {
    font-size: 0.72rem;
  }
  .tm-context-title {
    font-size: 1.08rem;
    white-space: normal;
  }
  .tm-context-subtitle {
    font-size: 0.64rem;
    white-space: normal;
  }
  .tm-map-layer .tm-category-strip {
    padding: 6px 8px;
    gap: 6px 8px;
  }
  .tm-country-focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tm-country-detail-btn {
    min-height: 30px;
  }
  .tm-live-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }
  .tm-event { min-height: 48px; }
  .tm-event em { display: none; }
  .feeds-layout { grid-template-columns: 1fr; }
  .feed-health-groups { grid-template-columns: 1fr; }
  .vuln-hero { grid-template-columns: 1fr; }
  .vuln-hero-meta { min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vuln-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vuln-company-head { grid-template-columns: 1fr; }
  .vuln-company-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vuln-focus-grid { grid-template-columns: 1fr; }
  .vuln-board-head { align-items: flex-start; flex-direction: column; }
  .vuln-board-sub { text-align: left; }
  .vuln-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vuln-chart-grid { grid-template-columns: 1fr; }
  .vuln-chart-grid .dash-chart-card { grid-column: auto; }
  .vuln-source-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
  .unique-grid  { grid-template-columns: repeat(2, 1fr); }
  .dashboard-unique-grid,
  .coverage-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .sector-layout { grid-template-columns: 1fr; }
  .gap-row-head { flex-direction: column; }
  .gap-status { justify-content: flex-start; min-width: 0; }
  .gap-timeline { grid-template-columns: 1fr; }
  .gap-evidence-grid { grid-template-columns: 1fr; }
  .threat-filter-row { display: flex; flex-direction: column; align-items: stretch; }
  .threat-filter-row .tf-severity,
  .threat-filter-row .tf-sector,
  .threat-filter-row .tf-window,
  .threat-filter-row .tf-type,
  .threat-filter-row .tf-vendor,
  .threat-filter-row .tf-search,
  .threat-filter-row--secondary .tf-source,
  .threat-filter-row--secondary .tf-evidence,
  .threat-filter-row--secondary .tf-geo,
  .threat-filter-row--secondary .tf-pa-product { grid-column: auto; }
  .ioc-filter-grid { grid-template-columns: 1fr; }
  .filter-group, .time-pills, .filter-check-row { overflow-x: auto; }
  .filter-group.tf-dd-box { overflow: visible; }
  .tf-severity .filter-group,
  .tf-source .filter-group,
  .threat-filter-panel .time-pills,
  .threat-filter-panel .filter-check-row { display: flex; }
  .filter-pill { width: auto; min-width: 82px; }
  .filter-select, .filter-input { width: 100%; }
  .page { padding-left: 16px; padding-right: 16px; }
  .navbar { grid-template-columns: 1fr auto; padding: 0 16px; }
  .navbar-links { display: none; }
  .nav-window .time-pill { min-width: 46px; padding: 0 8px; }
  .search-wrap input { width: 140px; }
  .threat-search-wrap input { width: 100%; }
  .threats-page .threat-table-card { max-height: none; }
}

@media (max-width: 640px) {
  .dash-kpi-grid,
  .impact-kpi-grid,
  .vuln-kpi-grid,
  .dashboard-unique-grid,
  .coverage-metric-grid,
  .unique-grid,
  .stats-grid,
  .d-statbar,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .vuln-hero-meta { grid-template-columns: 1fr; }
  .vuln-company-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vuln-focus-grid { padding: 12px; }
  .vuln-mini-grid { grid-template-columns: 1fr; }
  .vuln-source-strip { grid-template-columns: 1fr; }

  .feed-compact-row,
  .feed-quality-row,
  .feed-mini-row {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .feed-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tm-map-layer .tm-category-strip {
    padding: 5px 6px;
  }

  .tm-map-layer .tm-category-strip .tm-category-row {
    font-size: 0.58rem;
    padding: 3px 6px;
    width: auto;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, auto) auto;
  }

  .feed-compact-metrics,
  .feed-compact-status,
  .feed-quality-row .quality-meter,
  .feed-quality-numbers,
  .feed-mini-row .feed-count,
  .feed-mini-row .feed-time,
  .feed-mini-row .badge {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .brand-name,
  .live-indicator {
    display: none;
  }

  .feed-stats-grid {
    grid-template-columns: 1fr;
  }
}


/* Actor page */
/* ── Actor-page-specific styles ── */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.actor-tile {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-height: 182px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative;
  overflow: hidden;
}
.actor-tile:hover {
  border-color: var(--border-2);
  background: rgba(255,255,255,0.055);
  transform: translateY(-1px);
}
.actor-tile.selected {
  border-color: var(--blue);
  background: rgba(79,142,247,0.06);
}
.actor-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.actor-tile.soph-nation_state::before  { background: linear-gradient(90deg, #f55252, #e8a44a); }
.actor-tile.soph-advanced::before      { background: linear-gradient(90deg, #e8a44a, #d4a017); }
.actor-tile.soph-intermediate::before  { background: linear-gradient(90deg, #4f8ef7, #7c5cf6); }
.actor-tile.soph-basic::before         { background: linear-gradient(90deg, #4ac97e, #4f8ef7); }
.actor-tile.soph-unknown::before       { background: var(--border-2); }

.actor-tile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.actor-tile-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}
.actor-tile-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.actor-count-label {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-align: right;
  line-height: 1.2;
}

.actor-tag {
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.actor-tag.country  { background: rgba(79,142,247,0.12); color: var(--blue); border: 1px solid rgba(79,142,247,0.25); }
.actor-tag.motiv-financial   { background: rgba(74,201,126,0.12); color: var(--low); border: 1px solid rgba(74,201,126,0.25); }
.actor-tag.motiv-espionage   { background: rgba(167,139,250,0.12); color: var(--govt); border: 1px solid rgba(167,139,250,0.25); }
.actor-tag.motiv-sabotage    { background: rgba(245,82,82,0.12); color: var(--critical); border: 1px solid rgba(245,82,82,0.25); }
.actor-tag.motiv-hacktivism  { background: rgba(232,164,74,0.12); color: var(--high); border: 1px solid rgba(232,164,74,0.25); }
.actor-tag.motiv-cyberwarfare{ background: rgba(245,82,82,0.15); color: var(--critical); border: 1px solid rgba(245,82,82,0.35); }
.actor-tag.motiv-unknown     { background: rgba(74,85,104,0.15); color: var(--text-3); border: 1px solid var(--border); }
.actor-tag.soph { background: rgba(255,255,255,0.04); color: var(--text-3); border: 1px solid var(--border); }

.actor-tile-aliases {
  font-size: 0.62rem;
  color: var(--text-3);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actor-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.actor-card-facts div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,0.025);
  padding: 8px 9px;
}

.actor-card-facts span {
  display: block;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.actor-card-facts strong {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.actor-tile-sectors {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.actor-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.actor-last-seen {
  font-size: 0.6rem;
  color: var(--blue);
  font-weight: 700;
}
.actor-sev-row {
  display: flex;
  gap: 3px;
}

/* Actor detail modal */
.actor-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3,7,14,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.actor-modal-backdrop.open { display: flex; }

.actor-modal {
  width: min(920px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  background: #101722;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.48);
  overflow: hidden;
}

.actor-modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

.actor-modal-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,0.04);
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.actor-modal-close:hover {
  color: var(--text);
  border-color: var(--border-2);
}

.actor-modal-body {
  overflow-y: auto;
  padding: 14px;
}
.actor-modal-body::-webkit-scrollbar { width: 4px; }

.adp-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.adp-name {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.adp-section {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.022);
  min-width: 0;
}
.adp-section + .adp-section { margin-top: 12px; }
.adp-section-title {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 10px;
}
.adp-desc {
  font-size: 0.7rem;
  color: var(--text-2);
  line-height: 1.6;
}

.adp-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.adp-stat {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(79,142,247,0.055);
  padding: 12px;
}

.adp-stat span {
  display: block;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}

.adp-stat strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.adp-grid .adp-section {
  margin-top: 0;
}

.actor-modal-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.actor-modal-chip-row:last-child {
  margin-bottom: 0;
}

.actor-modal-aliases {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.adp-threat-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.adp-threat-item:last-child { border-bottom: none; }
.adp-threat-title {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}
.adp-threat-meta {
  font-size: 0.6rem;
  color: var(--text-3);
  margin-top: 2px;
}
.adp-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.adp-meta-row:last-child { border-bottom: none; }
.adp-meta-key  { font-size: 0.62rem; color: var(--text-3); }
.adp-meta-val  { font-size: 0.68rem; color: var(--text); font-weight: 500; text-align: right; }

.adp-empty {
  padding: 24px 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-3);
}

/* Summary bar */
.actor-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.asb-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(79,142,247,0.16), transparent 58%),
    linear-gradient(160deg, rgba(255,255,255,0.085), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 12px 28px rgba(0,0,0,0.24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.asb-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), transparent 38%);
}

.asb-card:hover {
  border-color: rgba(79,142,247,0.34);
  transform: translateY(-1px);
}
.asb-val  {
  font-size: 1.42rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  color: var(--text);
  text-shadow: 0 0 14px rgba(79,142,247,0.22);
}
.asb-label{
  font-size: 0.6rem;
  color: var(--text-2);
  margin-top: 4px;
  letter-spacing: 0.03em;
}

/* Country filter panel */
#country-chart { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 3px; }

.actors-page .actors-layout > div:last-child .card-head {
  justify-content: center;
  text-align: center;
}

.actors-page .actors-layout > div:last-child .card-title {
  width: 100%;
  text-align: center;
}

.country-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  width: 100%;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 0.13s;
}
.country-bar::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  border-radius: 2px;
  background: var(--blue);
  opacity: 0;
  transition: opacity 0.13s;
}
.country-bar:hover { background: rgba(255,255,255,0.04); }
.country-bar.active { background: rgba(79,142,247,0.07); }
.country-bar.active::before { opacity: 1; }
.country-bar.active .country-bar-name { color: var(--blue); }
.country-bar.active .country-bar-fill { background: var(--blue); }
.country-bar.active .country-bar-cnt  { color: var(--blue); }

.country-bar-all {
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 10px 10px;
  margin-bottom: 4px;
}
.country-bar-all::before { display: none; }
.country-bar-all:hover { background: none; }
.country-bar-all .country-bar-name { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.country-bar-all.active .country-bar-name { color: var(--text-2); }
.country-bar-all .country-bar-cnt { font-size: 0.62rem; color: var(--text-3); font-weight: 500; }
.country-bar-all.active .country-bar-cnt { color: var(--text-2); }

.country-bar-name { font-size: 0.72rem; font-weight: 500; color: var(--text-2); flex: 1; min-width: 0; }
.country-bar-track { width: 52px; flex-shrink: 0; height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.country-bar-fill  { height: 100%; border-radius: 2px; background: rgba(79,142,247,0.4); transition: background 0.13s; }
.country-bar-cnt   { font-size: 0.7rem; font-weight: 600; color: var(--text-3); min-width: 18px; text-align: right; }

/* Target-country bars: amber accent to distinguish from origin (blue) */
.country-bar--target.active { background: rgba(232,164,74,0.07); }
.country-bar--target.active::before { background: var(--medium); opacity: 1; }
.country-bar--target.active .country-bar-name { color: var(--medium); }
.country-bar--target.active .country-bar-fill { background: var(--medium); }
.country-bar--target.active .country-bar-cnt  { color: var(--medium); }
.country-bar-fill--target { background: rgba(232,164,74,0.35); }

/* Motivation filter panel */
#motiv-chart { padding: 10px 14px 14px; }
.motiv-list { display: flex; flex-direction: column; gap: 3px; }
.motiv-row  {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 0.13s;
  font: inherit;
}
.motiv-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  border-radius: 2px;
  background: var(--blue);
  opacity: 0;
  transition: opacity 0.13s;
}
.motiv-row:hover { background: rgba(255,255,255,0.04); }
.motiv-row:focus { outline: none; }
.motiv-row:focus-visible { box-shadow: inset 0 0 0 1px rgba(79,142,247,0.55); }
.motiv-row.active { background: rgba(79,142,247,0.07); }
.motiv-row.active::before { opacity: 1; }
.motiv-row.active .motiv-name,
.motiv-row.active .motiv-cnt { color: var(--blue); }
.motiv-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.motiv-name { font-size: 0.72rem; font-weight: 500; color: var(--text-2); flex: 1; min-width: 0; text-transform: capitalize; }
.motiv-cnt  { font-size: 0.7rem; font-weight: 600; color: var(--text); min-width: 18px; text-align: right; }
.motiv-bar-track { width: 52px; flex-shrink: 0; height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.motiv-bar-fill  { height: 100%; border-radius: 2px; background: rgba(79,142,247,0.4); transition: background 0.13s; }
.motiv-row.active .motiv-bar-fill { background: var(--blue); }
.motiv-row-all {
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 10px 10px;
  margin-bottom: 4px;
}
.motiv-row-all::before { display: none; }
.motiv-row-all:hover { background: none; }
.motiv-row-all .motiv-name {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.motiv-row-all .motiv-cnt { font-size: 0.62rem; color: var(--text-3); font-weight: 500; }
.motiv-row-all.active .motiv-name,
.motiv-row-all.active .motiv-cnt { color: var(--text-2); }

/* Main layout */
.actors-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 960px) {
  .actors-layout { grid-template-columns: 1fr; }
  .actor-grid { grid-template-columns: 1fr; }
  .actor-summary-bar { grid-template-columns: repeat(2, 1fr); }
  .adp-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adp-grid { grid-template-columns: 1fr; }
  .actor-modal-backdrop { padding: 12px; }
}

/* Landing page */
.landing-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 78% 48% at 50% 54%, rgba(79,142,247,0.16) 0%, rgba(79,142,247,0.05) 33%, transparent 70%),
    linear-gradient(180deg, #070a12 0%, #080c14 48%, #05070c 100%),
    #080c14;
}

.landing-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 38px;
  padding: calc(var(--navbar-h) + 20px) 36px 30px;
  overflow: hidden;
  isolation: isolate;
}

.landing-field,
.landing-honeycomb,
.landing-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.landing-field {
  z-index: -4;
  opacity: 0.95;
}

.landing-honeycomb {
  z-index: -3;
  background-image:
    linear-gradient(30deg, rgba(79,142,247,0.115) 12%, transparent 12.5%, transparent 87%, rgba(79,142,247,0.115) 87.5%, rgba(79,142,247,0.115)),
    linear-gradient(150deg, rgba(79,142,247,0.115) 12%, transparent 12.5%, transparent 87%, rgba(79,142,247,0.115) 87.5%, rgba(79,142,247,0.115)),
    linear-gradient(30deg, rgba(74,201,126,0.075) 12%, transparent 12.5%, transparent 87%, rgba(74,201,126,0.075) 87.5%, rgba(74,201,126,0.075)),
    linear-gradient(150deg, rgba(74,201,126,0.075) 12%, transparent 12.5%, transparent 87%, rgba(74,201,126,0.075) 87.5%, rgba(74,201,126,0.075));
  background-position: 0 0, 0 0, 46px 52px, 46px 52px;
  background-size: 92px 104px;
  mask-image: radial-gradient(ellipse 72% 58% at 50% 54%, black 0%, black 46%, transparent 78%);
  opacity: 0.82;
  animation: honeycombDrift 28s linear infinite;
}

.landing-noise {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8,12,20,0.42) 0%, rgba(8,12,20,0.15) 44%, rgba(8,12,20,0.7) 100%),
    linear-gradient(90deg, rgba(8,12,20,0.78) 0%, rgba(8,12,20,0.12) 50%, rgba(8,12,20,0.78) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px);
}

.landing-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  height: var(--navbar-h);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,12,20,0.76);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 20;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.landing-brand:hover {
  color: var(--text);
}

.landing-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(226,232,244,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: #91a0b8;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.landing-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--low);
  box-shadow: 0 0 16px rgba(74,201,126,0.7);
}

.landing-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 36px;
  border: 1px solid rgba(226,232,244,0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(79,142,247,0.28), rgba(74,201,126,0.18)),
    rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 18px 70px rgba(79,142,247,0.24);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.landing-enter:hover {
  color: var(--text);
  border-color: rgba(74,201,126,0.55);
  background:
    linear-gradient(135deg, rgba(79,142,247,0.26), rgba(74,201,126,0.18)),
    rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.landing-hero {
  width: min(1420px, 100%);
  padding: 0;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #8fb6ff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 22px;
  animation: landingReveal 700ms ease both;
}

.landing-kicker span {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--low), var(--blue));
  box-shadow: 0 0 18px rgba(79,142,247,0.65);
}

.landing-hero h1 {
  max-width: 1260px;
  color: var(--text);
  font-size: 5.25rem;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 20px 90px rgba(79,142,247,0.22);
  animation: landingReveal 900ms 90ms ease both;
}

.landing-hero p {
  max-width: 780px;
  margin-top: 26px;
  color: #a8b2c6;
  font-size: 0.9rem;
  line-height: 1.55;
  font-weight: 600;
  animation: landingReveal 900ms 180ms ease both;
}

.landing-hero .landing-enter {
  margin-top: 32px;
  animation: landingReveal 900ms 250ms ease both;
}

.landing-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr) 132px minmax(0, 1fr);
  gap: 0;
  width: min(1420px, 100%);
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  z-index: 1;
  align-items: center;
  animation: landingReveal 900ms 260ms ease both;
}

.landing-flow-step {
  position: relative;
  min-height: 166px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.landing-flow-step::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 86px;
  height: 86px;
  transform: translateX(-50%);
  border: 1px solid rgba(226,232,244,0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(226,232,244,0.22) 0 6%, transparent 7%),
    radial-gradient(circle at 50% 50%, transparent 0 38%, rgba(74,201,126,0.32) 39% 42%, transparent 43%),
    conic-gradient(from 290deg, rgba(79,142,247,0.55), rgba(74,201,126,0.36), rgba(79,142,247,0.08), rgba(79,142,247,0.55));
  box-shadow:
    0 0 46px rgba(79,142,247,0.32),
    0 0 90px rgba(74,201,126,0.13),
    inset 0 0 0 1px rgba(255,255,255,0.06);
}

.landing-flow-step::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--low), var(--blue));
  box-shadow: 0 0 18px rgba(74,201,126,0.6);
}

.landing-flow-link {
  position: relative;
  align-self: center;
  height: 3px;
  margin-top: -70px;
  background: linear-gradient(90deg, rgba(79,142,247,0.1), rgba(79,142,247,0.82), rgba(74,201,126,0.72));
  box-shadow: 0 0 28px rgba(79,142,247,0.34);
}

.landing-flow-link::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 50%;
  width: 13px;
  height: 13px;
  border-top: 3px solid rgba(74,201,126,0.9);
  border-right: 3px solid rgba(74,201,126,0.9);
  transform: translateY(-50%) rotate(45deg);
}

.landing-flow small,
.landing-flow strong,
.landing-flow span {
  display: block;
}

.landing-flow small {
  color: rgba(226,232,244,0.86);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  position: relative;
  z-index: 1;
  margin-top: 29px;
}

.landing-flow strong {
  color: var(--text);
  margin-top: 42px;
  font-size: 1.12rem;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

.landing-flow span {
  margin-top: 9px;
  max-width: 330px;
  color: #a7b1c4;
  font-size: 0.72rem;
  line-height: 1.32;
  font-weight: 650;
  position: relative;
  z-index: 1;
}

@keyframes landingReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes honeycombDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-92px, -104px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-honeycomb,
  .landing-kicker,
  .landing-hero h1,
  .landing-hero p,
  .landing-flow {
    animation: none;
  }
}

@media (max-width: 1180px) {
  .landing-hero h1 { font-size: 3.7rem; }
}

@media (max-width: 760px) {
  .landing-page {
    padding: calc(var(--navbar-h) + 18px) 18px 18px;
    gap: 22px;
  }
  .landing-topbar {
    align-items: center;
    padding: 0 18px;
  }
  .landing-status {
    display: none;
  }
  .landing-enter {
    min-height: 50px;
    padding: 0 20px;
    font-size: 0.68rem;
  }
  .landing-hero {
    padding-top: 0;
  }
  .landing-hero h1 {
    font-size: 2.3rem;
    line-height: 0.96;
  }
  .landing-hero p {
    font-size: 0.74rem;
    margin-top: 18px;
  }
  .landing-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .landing-flow-step {
    min-height: 140px;
    padding: 14px;
  }
  .landing-flow-step::before {
    width: 62px;
    height: 62px;
  }
  .landing-flow-step::after {
    top: 26px;
  }
  .landing-flow-link {
    width: 2px;
    height: 30px;
    margin-top: 0;
    justify-self: center;
    background: linear-gradient(180deg, rgba(79,142,247,0.16), rgba(79,142,247,0.85), rgba(74,201,126,0.72));
  }
  .landing-flow-link::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -2px;
    transform: translateX(-50%) rotate(135deg);
  }
  .landing-flow strong {
    margin-top: 30px;
    font-size: 0.9rem;
  }
  .landing-flow span {
    max-width: none;
    font-size: 0.6rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   PALO ALTO ADVISOR — threat detail page section
═══════════════════════════════════════════════════════════════════ */

.pa-section {
  margin-top: 32px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(250,100,0,0.22);
  background: linear-gradient(135deg, rgba(250,100,0,0.04) 0%, rgba(8,12,20,0) 55%);
}

/* Header */
.pa-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(250,100,0,0.14) 0%, rgba(250,100,0,0.03) 100%);
  border-bottom: 1px solid rgba(250,100,0,0.15);
}

.pa-header-left {
  flex: 1;
  min-width: 0;
}

.pa-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #FA6400;
  margin-bottom: 8px;
}

.pa-logo-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.pa-headline {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 8px;
}

.pa-narrative {
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.pa-header-stat {
  flex-shrink: 0;
  text-align: center;
  background: rgba(250,100,0,0.1);
  border: 1px solid rgba(250,100,0,0.25);
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 72px;
}

.pa-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #FA6400;
  line-height: 1;
  margin-bottom: 4px;
}

.pa-stat-label {
  font-size: 0.52rem;
  font-weight: 600;
  color: rgba(250,100,0,0.7);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Body */
.pa-section-body {
  padding: 22px 28px;
}

.pa-section-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 14px;
}

/* Kill Chain */
.pa-kc-section {
  margin-bottom: 28px;
}

.pa-killchain {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pa-kc-arrow {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--border);
  padding: 0 2px;
  flex-shrink: 0;
  margin-top: -2px;
}

.pa-kc-arrow-hot {
  color: rgba(250,100,0,0.5);
}

.pa-kc-stage {
  flex: 1;
  min-width: 80px;
  padding: 10px 8px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.pa-kc-stage.pa-kc-covered {
  border-color: rgba(250,100,0,0.4);
  background: rgba(250,100,0,0.08);
}

.pa-kc-stage.pa-kc-current {
  border-color: rgba(245,82,82,0.5);
  background: rgba(245,82,82,0.08);
}

.pa-kc-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-3);
  line-height: 1.3;
  margin-bottom: 4px;
}

.pa-kc-stage.pa-kc-covered .pa-kc-label {
  color: #FA6400;
}

.pa-kc-stage.pa-kc-current .pa-kc-label {
  color: var(--critical);
}

.pa-kc-check {
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(250,100,0,0.8);
  margin-bottom: 3px;
}

.pa-kc-check.pa-kc-uncovered {
  color: var(--text-3);
  font-weight: 400;
}

.pa-kc-products {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.pa-kc-product {
  font-size: 0.46rem;
  font-weight: 700;
  line-height: 1.3;
}

.pa-kc-note {
  font-size: 0.44rem;
  color: var(--text-3);
  margin-top: 3px;
  line-height: 1.4;
}

/* Product grid */
.pa-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.pa-product-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.18s, background 0.18s;
}

.pa-product-card:hover {
  border-color: rgba(250,100,0,0.35);
  background: rgba(250,100,0,0.04);
}

.pa-platform-badge {
  display: inline-block;
  font-size: 0.48rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  align-self: flex-start;
}

.pa-badge-strata   { background: rgba(232,176,32,0.18);  color: #E8B020;  border: 1px solid rgba(232,176,32,0.35); }
.pa-badge-prisma   { background: rgba(250,88,45,0.14);  color: #FA582D;  border: 1px solid rgba(250,88,45,0.3); }
.pa-badge-cortex   { background: rgba(34,197,94,0.14);   color: #22C55E;  border: 1px solid rgba(34,197,94,0.3); }
.pa-badge-identity { background: rgba(79,142,247,0.14);  color: #4f8ef7;  border: 1px solid rgba(79,142,247,0.3); }
.pa-badge-services { background: rgba(239,68,68,0.12);  color: #f55252;  border: 1px solid rgba(239,68,68,0.25); }

.pa-product-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.pa-product-desc {
  font-size: 0.63rem;
  color: var(--text-3);
  line-height: 1.55;
  flex: 1;
}

.pa-product-context {
  font-size: 0.6rem;
  color: var(--text-2);
  background: rgba(250,100,0,0.06);
  border-radius: 5px;
  padding: 5px 7px;
  line-height: 1.45;
}

.pa-product-link {
  font-size: 0.58rem;
  color: #FA6400;
  font-weight: 600;
  text-decoration: none;
}

.pa-product-link:hover { text-decoration: underline; }

/* Secondary products row */
.pa-secondary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pa-secondary-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  flex-shrink: 0;
}

.pa-secondary-pill {
  font-size: 0.6rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s;
}

.pa-secondary-pill:hover { opacity: 0.8; }

.pa-secondary-plat {
  font-size: 0.46rem;
  font-weight: 800;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Mitigations */
.pa-mitigation-section {
  margin-top: 4px;
}

.pa-mitigations {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: mitigation;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pa-mitigation-item {
  counter-increment: mitigation;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.7rem;
  color: var(--text-2);
  line-height: 1.6;
}

.pa-mitigation-item::before {
  content: counter(mitigation);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(250,100,0,0.15);
  border: 1px solid rgba(250,100,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: #FA6400;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════════
   STACK RISK PAGE — redesigned
═══════════════════════════════════════════════════════════════════ */

.sr-page {
  padding-top: 28px;
  padding-bottom: 60px;
}

/* Page header */
.sr-page-header {
  margin-bottom: 24px;
}
.sr-page-eyebrow {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.sr-page-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 8px;
}
.sr-page-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.65;
  max-width: 680px;
}

/* ── Input card ─────────────────────────────────────────────────── */
.sr-input-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 20px 24px 0;
  margin-bottom: 24px;
}

.sr-input-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sr-field-org   { flex: 0 0 260px; }
.sr-field-window { flex: 0 0 160px; }
.sr-field-action { flex-shrink: 0; }

.sr-field-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}

.sr-select {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.7rem;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234a5568'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.sr-select:focus { border-color: rgba(79,142,247,0.5); }

.sr-analyze-btn {
  padding: 9px 22px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.sr-analyze-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Stack row */
.sr-stack-row {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.sr-stack-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sr-stack-label-text {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}
.sr-stack-hint {
  font-size: 0.6rem;
  color: var(--text-3);
}
.sr-stack-hint kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.55rem;
  font-family: var(--mono);
}
.sr-sbom-trigger {
  color: var(--blue);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sr-sbom-trigger:hover { color: #79beff; }

.sr-stack-input-wrap {
  margin-bottom: 10px;
}
.sr-stack-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.7rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
}
.sr-stack-input:focus { border-color: rgba(79,142,247,0.45); }
.sr-stack-input::placeholder { color: var(--text-3); }

.sr-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}
.sr-tags-empty {
  font-size: 0.62rem;
  color: var(--text-3);
  font-style: italic;
  line-height: 24px;
}
.sr-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.22);
  color: var(--blue);
  border-radius: 20px;
  padding: 3px 5px 3px 10px;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
}
.sr-tag-x {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-size: 0.8rem;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.55;
  border-radius: 50%;
  transition: opacity 0.12s;
}
.sr-tag-x:hover { opacity: 1; }

.sr-stack-actions {
  padding: 8px 0 4px;
}
.sr-action-link {
  background: none;
  border: none;
  font-size: 0.6rem;
  color: var(--text-3);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sr-action-link:hover { color: var(--text-2); }

/* SBOM drop zone */
.sr-sbom-row {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sr-sbom-drop {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px dashed var(--border-2);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.sr-sbom-drop:hover,
.sr-sbom-drop.sr-sbom-dragover {
  border-color: rgba(79,142,247,0.45);
  background: rgba(79,142,247,0.04);
}
.sr-sbom-icon {
  font-size: 1.1rem;
  color: var(--text-3);
}
.sr-sbom-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sr-sbom-text strong {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-2);
}
.sr-sbom-text small {
  font-size: 0.58rem;
  color: var(--text-3);
}

/* ── Empty / loading states ─────────────────────────────────────── */
.sr-empty-state {
  padding: 48px 24px;
}
.sr-empty-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 780px;
  margin: 0 auto;
}
.sr-empty-step {
  flex: 1;
  text-align: center;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.sr-empty-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(79,142,247,0.12);
  border: 1px solid rgba(79,142,247,0.25);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.sr-empty-step-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.sr-empty-step-desc {
  font-size: 0.64rem;
  color: var(--text-3);
  line-height: 1.6;
}
.sr-empty-step-arrow {
  font-size: 1.2rem;
  color: var(--text-3);
  padding: 0 12px;
  flex-shrink: 0;
}

.sr-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 24px;
}
.sr-spinner-ring {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(250,100,0,0.15);
  border-top-color: #FA6400;
  border-radius: 50%;
  animation: sr-spin 0.75s linear infinite;
}
@keyframes sr-spin { to { transform: rotate(360deg); } }
.sr-loading-msg {
  font-size: 0.7rem;
  color: var(--text-3);
}

/* ── Summary bar ─────────────────────────────────────────────────── */
.sr-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  margin-bottom: 16px;
}
.sr-sum-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.sr-sum-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.sr-urgency-critical { background: rgba(245,82,82,0.14);   color: var(--critical); border: 1px solid rgba(245,82,82,0.28); }
.sr-urgency-high     { background: rgba(232,164,74,0.14);  color: var(--high);     border: 1px solid rgba(232,164,74,0.28); }
.sr-urgency-ok       { background: rgba(74,201,126,0.12);  color: var(--low);      border: 1px solid rgba(74,201,126,0.24); }
.sr-sum-meta {
  font-size: 0.64rem;
  color: var(--text-3);
}
.sr-sum-meta strong { color: var(--text-2); }
.sr-sum-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sr-sev-pill {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}
.sr-sev-critical { background: var(--crit-dim);  color: var(--critical); }
.sr-sev-high     { background: var(--high-dim);  color: var(--high); }
.sr-sev-medium   { background: var(--med-dim);   color: var(--medium); }
.sr-sev-low      { background: var(--low-dim);   color: var(--low); }

/* ── Kill chain aggregate ─────────────────────────────────────────── */
.sr-kc-aggregate {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 18px 20px 14px;
  margin-bottom: 20px;
}
.sr-kc-agg-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.sr-kc-agg-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.sr-kc-agg-sub {
  font-size: 0.58rem;
  color: var(--text-3);
}
.sr-kc-agg-chart {
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 84px;
}
.sr-kc-agg-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}
.sr-kc-agg-bar-wrap {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sr-kc-agg-bar {
  width: 60%;
  min-height: 0;
  border-radius: 4px 4px 0 0;
  background: rgba(255,255,255,0.08);
  transition: height 0.4s ease;
}
.sr-kc-agg-stage.sr-kc-cool .sr-kc-agg-bar { background: rgba(79,142,247,0.35); }
.sr-kc-agg-stage.sr-kc-warm .sr-kc-agg-bar { background: rgba(232,164,74,0.6); }
.sr-kc-agg-stage.sr-kc-hot  .sr-kc-agg-bar { background: rgba(245,82,82,0.75); }
.sr-kc-agg-count {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-2);
  min-height: 14px;
}
.sr-kc-agg-label {
  font-size: 0.52rem;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
}
.sr-kc-agg-arrow {
  font-size: 0.9rem;
  color: var(--border-2);
  padding: 0 2px;
  align-self: center;
  margin-bottom: 20px;
}

/* ── Threat feed ─────────────────────────────────────────────────── */
.sr-threat-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Threat card */
.sr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.sr-card:hover { border-color: var(--border-2); }

.sr-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px 0;
  flex-wrap: wrap;
}
.sr-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.sr-vendor-chip {
  font-size: 0.55rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(250,100,0,0.09);
  color: #FA6400;
  border: 1px solid rgba(250,100,0,0.2);
  font-weight: 700;
}
.sr-vendor-more {
  background: rgba(255,255,255,0.04);
  color: var(--text-3);
  border-color: var(--border);
}
.sr-card-meta {
  display: flex;
  gap: 10px;
  font-size: 0.58rem;
  color: var(--text-3);
  flex-shrink: 0;
}

.sr-card-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  padding: 8px 18px 4px;
}
.sr-card-summary {
  font-size: 0.68rem;
  color: var(--text-3);
  line-height: 1.6;
  padding: 0 18px 10px;
}
.sr-card-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 12px;
  flex-wrap: wrap;
}
.sr-card-stat-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.sr-cve-chip {
  font-size: 0.55rem;
  padding: 2px 7px;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.2);
  color: #38bdf8;
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--mono);
}
.sr-stat-chip {
  font-size: 0.58rem;
  color: var(--text-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-weight: 600;
}
.sr-detail-link {
  font-size: 0.6rem;
  color: var(--blue);
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}

/* ── Mitigation accordion ───────────────────────────────────────── */
.sr-mitigation-wrap {
  border-top: 1px solid var(--border);
}

.sr-mitigation-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: rgba(250,100,0,0.04);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.67rem;
  font-weight: 700;
  color: #FA6400;
  text-align: left;
  transition: background 0.15s;
  gap: 10px;
}
.sr-mitigation-toggle:hover { background: rgba(250,100,0,0.08); }

.sr-mit-toggle-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pa-logo-icon-sm {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sr-mit-chevron {
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.2s;
}
.sr-mitigation-open .sr-mit-chevron {
  transform: rotate(180deg);
}

.sr-mitigation-body {
  display: none;
}
.sr-mitigation-open .sr-mitigation-body {
  display: block;
}

/* Mitigation inner content */
.sr-mit-inner {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(250,100,0,0.02);
}
.sr-mit-loading {
  padding: 12px 18px;
  font-size: 0.65rem;
  color: var(--text-3);
}

.sr-mit-row-top,
.sr-mit-row-bottom {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sr-mit-section-label {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 8px;
}

/* Mini kill chain */
.sr-mit-kc-col {
  flex: 1;
  min-width: 0;
}
.sr-mkc-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  margin-bottom: 8px;
}
.sr-mkc-stage {
  flex: 1;
  min-width: 60px;
  padding: 6px 4px 5px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  text-align: center;
}
.sr-mkc-stage.sr-mkc-covered {
  border-color: rgba(250,100,0,0.35);
  background: rgba(250,100,0,0.07);
}
.sr-mkc-stage.sr-mkc-current {
  border-color: rgba(245,82,82,0.45);
  background: rgba(245,82,82,0.07);
}
.sr-mkc-label {
  font-size: 0.48rem;
  font-weight: 600;
  color: var(--text-3);
  line-height: 1.3;
}
.sr-mkc-stage.sr-mkc-covered .sr-mkc-label { color: #FA6400; }
.sr-mkc-stage.sr-mkc-current .sr-mkc-label { color: var(--critical); }
.sr-mkc-check {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(250,100,0,0.8);
  margin-top: 2px;
}
.sr-mkc-stage:not(.sr-mkc-covered):not(.sr-mkc-current) .sr-mkc-check {
  color: var(--text-3);
  font-weight: 400;
}
.sr-mkc-arrow {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--border-2);
  padding: 0 1px;
  flex-shrink: 0;
}
.sr-mkc-products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
  margin-top: 3px;
}
.sr-mkc-prod {
  font-size: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.9;
  white-space: nowrap;
}

.sr-mit-narrative {
  font-size: 0.63rem;
  color: var(--text-3);
  line-height: 1.55;
}

/* Products row */
.sr-mit-products-col {
  flex: 1;
  min-width: 280px;
}
.sr-products-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sr-product-card {
  flex: 1;
  min-width: 150px;
  max-width: 200px;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s;
}
.sr-product-card:hover { border-color: rgba(250,100,0,0.3); }
.sr-product-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.sr-product-desc {
  font-size: 0.58rem;
  color: var(--text-3);
  line-height: 1.5;
  flex: 1;
}
.sr-product-link {
  font-size: 0.55rem;
  color: #FA6400;
  font-weight: 600;
  text-decoration: none;
}
.sr-product-link:hover { text-decoration: underline; }

/* Actions col */
.sr-mit-actions-col {
  flex: 0 0 280px;
}
.sr-mit-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sr-mit-step {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.sr-mit-step-num {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(250,100,0,0.14);
  border: 1px solid rgba(250,100,0,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.48rem;
  font-weight: 800;
  color: #FA6400;
  margin-top: 1px;
}
.sr-mit-step-text {
  font-size: 0.64rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* No-threats state */
.sr-no-threats {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 32px;
  border: 1.5px dashed rgba(74,202,126,0.22);
  border-radius: 14px;
  background: rgba(74,202,126,0.02);
}
.sr-no-threats-icon { font-size: 2rem; color: var(--low); margin-bottom: 12px; }
.sr-no-threats-title { font-size: 0.9rem; font-weight: 700; color: var(--low); margin-bottom: 8px; }
.sr-no-threats-sub { font-size: 0.68rem; color: var(--text-3); line-height: 1.65; max-width: 440px; }

/* Responsive */
@media (max-width: 860px) {
  .sr-input-row { gap: 10px; }
  .sr-field-org { flex: 0 0 100%; }
  .sr-field-window { flex: 0 0 140px; }
  .sr-empty-grid { flex-direction: column; gap: 8px; }
  .sr-empty-step-arrow { transform: rotate(90deg); }
  .sr-mit-row-bottom { flex-direction: column; }
  .sr-mit-actions-col { flex: none; width: 100%; }
  .sr-products-row .sr-product-card { max-width: none; }
}
@media (max-width: 640px) {
  .sr-kc-agg-label { font-size: 0.44rem; }
  .pa-product-grid { grid-template-columns: 1fr 1fr; }
  .pa-kc-stage { min-width: 64px; padding: 7px 5px 5px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   THREATS PAGE — vendor filter + stats bar
   ═══════════════════════════════════════════════════════════════════════════ */

.tf-vendor-box { min-width: 0; width: 100%; }

#vendor-dd-menu .filter-dd-option[hidden] {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   THREAT DETAIL — viewport-fit single column
   ═══════════════════════════════════════════════════════════════════════════ */

.td-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.td-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.td-back {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}
.td-back:hover { color: var(--text); }

.td-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-toolbar-meta {
  font-size: 0.68rem;
  color: var(--text-3);
}
.td-toolbar-meta strong {
  color: var(--text);
  font-weight: 800;
}

.td-stix-btn {
  font-size: 0.65rem;
  padding: 4px 12px;
}

.detail-page .card {
  background: rgba(255,255,255,0.032);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.td-hero {
  flex: 0 0 auto;
  position: relative;
  padding: 16px 20px;
  overflow: visible;
}

.td-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 6px;
}

.td-hero-head .td-title {
  min-width: 0;
  margin: 0;
}

.td-hero-cred-popover {
  top: calc(100% + 10px);
  left: auto;
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 12px 14px;
  grid-template-columns: minmax(84px, 96px) minmax(0, 1fr);
  gap: 8px;
  z-index: 30;
}

.td-hero-cred-popover strong {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
}

.td-hero-cred-popover span {
  color: var(--text-2);
  font-size: 0.74rem;
  line-height: 1.5;
}

.td-hero-cred-info {
  flex-shrink: 0;
  align-self: start;
}

.td-hero-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.td-hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.td-hero-chips .badge {
  font-size: 0.62rem;
  padding: 4px 9px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.td-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-2);
}

.td-chip-type {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.td-chip-more {
  color: var(--text-3);
  font-weight: 600;
}

.td-chip-corr {
  color: #86efac;
  border-color: rgba(74,201,126,0.3);
  background: rgba(74,201,126,0.1);
}

.td-chip-gap--seen_elsewhere,
.td-chip-gap--not_checked {
  color: var(--text-2);
  border-color: var(--border);
}

.td-chip-gap--seen_by_us_first,
.td-chip-gap--not_seen_elsewhere,
.td-chip-gap--not_seen_monitored {
  color: #86efac;
  border-color: rgba(74,201,126,0.28);
  background: rgba(74,201,126,0.08);
}

.td-chip-gap--pending_comparison,
.td-chip-gap--inconclusive {
  color: #fcd34d;
  border-color: rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.08);
}

.td-hero-cred {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  cursor: help;
}

.td-hero-cred-num {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.td-hero-cred-num.is-high { color: #86efac; }
.td-hero-cred-num.is-mid  { color: #fcd34d; }
.td-hero-cred-num.is-low  { color: var(--text-2); }

.td-hero-cred-label {
  margin-top: 4px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.td-title {
  font-size: clamp(1.28rem, 1.15rem + 0.45vw, 1.42rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.22;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.td-summary {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.td-hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  font-size: 0.72rem;
  color: var(--text-3);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.td-source-link {
  font-weight: 700;
  color: var(--blue);
  font-size: 0.74rem;
  margin-right: 4px;
}

.td-foot-sep {
  width: 1px;
  height: 10px;
  background: var(--border);
  margin: 0 10px;
  flex-shrink: 0;
}

.td-foot-item {
  white-space: nowrap;
}

.td-foot-stix {
  margin-left: auto;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1px solid rgba(79,142,247,0.35);
  background: rgba(79,142,247,0.1);
  color: #93c5fd;
  font-size: 0.66rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.td-foot-stix:hover {
  background: rgba(79,142,247,0.18);
}

@media (max-width: 640px) {
  .td-hero-head {
    gap: 10px;
  }
  .td-hero-cred {
    flex-direction: row;
    gap: 8px;
    padding: 5px 10px;
  }
  .td-hero-cred-label { margin-top: 0; }
  .td-foot-stix { margin-left: 0; }
  .td-hero-cred-popover {
    right: 0;
    left: auto;
    width: min(300px, calc(100vw - 24px));
  }
}

.td-rating-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: visible;
  min-height: 56px;
  align-items: stretch;
}

.td-rating-item {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.td-rating-item:last-child { border-right: none; }

.td-rating-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.td-rating-text {
  font-size: 0.76rem;
  color: var(--text);
  line-height: 1.45;
  margin: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.td-statbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.td-stat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 56px;
  padding: 9px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.td-stat:hover {
  border-color: var(--border-2);
  background: rgba(255,255,255,0.05);
}
.td-stat.active {
  border-color: rgba(79,142,247,0.45);
  background: rgba(79,142,247,0.1);
}

.td-stat-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.td-stat-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

/* ── Threat timeline tab ─────────────────────────────────────────────── */
.td-tl-block-title { margin-bottom: 14px; }

/* Summary band: big count + date span */
.td-tl-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(79,142,247,0.06), rgba(255,255,255,0.015));
}
.td-tl-summary-main { display: flex; align-items: center; gap: 10px; }
.td-tl-count { font-size: 1.9rem; font-weight: 800; color: #4f8ef7; line-height: 1; }
.td-tl-count-label { font-size: 0.74rem; color: var(--text-2); line-height: 1.3; }
.td-tl-span { text-align: right; font-size: 0.72rem; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Recurring signals */
.td-tl-recur-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.td-tl-recur-lead {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); font-weight: 700; margin-right: 2px;
}
.td-tl-recur {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text);
}
.td-tl-recur-n { color: var(--high); font-weight: 800; font-variant-numeric: tabular-nums; }

/* Severity tag colors (shared) */
.tl-critical { color: var(--critical); background: rgba(245,82,82,0.12); }
.tl-high     { color: var(--high);     background: var(--high-dim); }
.tl-medium   { color: var(--medium);   background: rgba(212,160,23,0.14); }
.tl-low      { color: var(--low);      background: var(--low-dim); }

/* Horizontal time rail — equal columns, no horizontal scroll */
.td-tlh-wrap { margin-top: 4px; overflow: visible; }
.td-tlh-endpoints {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.66rem; color: var(--text-3); font-variant-numeric: tabular-nums;
  padding: 0 2px 6px;
}
.td-tlh-rail {
  display: flex; align-items: flex-start; gap: 0;
  position: relative; padding-top: 18px; overflow: visible;
}
.td-tlh-rail::before {
  content: ''; position: absolute; top: 26px; left: 6%; right: 6%; height: 2px;
  background: linear-gradient(90deg, var(--border), rgba(79,142,247,0.35), var(--border));
}
.td-tlh-node {
  flex: 1 1 0; min-width: 0; max-width: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 5px; position: relative;
}
.td-tlh-marker { position: relative; z-index: 1; margin-bottom: 10px; }
.td-tlh-dot {
  width: 11px; height: 11px; border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg); display: block;
}
.td-tlh-node.is-current .td-tlh-dot {
  width: 13px; height: 13px; background: #4f8ef7 !important;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(79,142,247,0.35);
}
.td-tlh-card {
  width: 100%; min-width: 0; padding: 9px 10px;
  border: 1px solid var(--border); border-top: 3px solid var(--border-2);
  border-radius: 10px; background: rgba(255,255,255,0.025);
  transition: border-color 0.15s, background 0.15s;
}
.td-tlh-card:hover { background: rgba(255,255,255,0.05); border-color: var(--border-2); }
.td-tlh-card.sev-critical { border-top-color: var(--critical); }
.td-tlh-card.sev-high     { border-top-color: var(--high); }
.td-tlh-card.sev-medium   { border-top-color: var(--medium); }
.td-tlh-card.sev-low      { border-top-color: var(--low); }
.td-tlh-node.is-current .td-tlh-card { border-color: rgba(79,142,247,0.45); background: rgba(79,142,247,0.08); }
.td-tlh-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.td-tlh-date { font-size: 0.64rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.td-tlh-sevtag {
  font-size: 0.56rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1px 6px; border-radius: 999px;
}
.td-tlh-here {
  font-size: 0.56rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: #4f8ef7; background: rgba(79,142,247,0.16); padding: 1px 6px; border-radius: 999px;
}
.td-tlh-title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 0.78rem; font-weight: 600; line-height: 1.35;
  color: var(--text); text-decoration: none;
}
a.td-tlh-title:hover { color: #4f8ef7; text-decoration: underline; }
.td-tlh-reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.td-tlh-reason {
  font-size: 0.58rem; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); padding: 1px 6px; border-radius: 999px;
}
@media (max-width: 720px) {
  .td-tlh-rail { flex-wrap: wrap; row-gap: 12px; padding-top: 0; }
  .td-tlh-rail::before { display: none; }
  .td-tlh-node { flex: 1 1 calc(50% - 8px); }
}

.td-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.td-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 4px;
}
.td-tabs::-webkit-scrollbar { display: none; }

.td-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-3);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 12px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.td-tab:hover { color: var(--text-2); }
.td-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 700;
}

.td-tab-count {
  display: inline-block;
  background: rgba(79,142,247,0.18);
  color: var(--blue);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.td-tabcontent {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
}

.detail-page .d-section-card {
  padding: 14px 16px;
  margin-bottom: 10px;
}
.detail-page .d-section-card:last-child { margin-bottom: 0; }

.detail-page .d-block-title {
  font-size: 0.66rem;
  margin-bottom: 12px;
}

.detail-page .d-empty {
  font-size: 0.78rem;
}

.td-overview-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
  align-items: start;
}

.td-overview-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-malware-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.td-intro {
  font-size: 0.74rem;
  color: var(--text-3);
  line-height: 1.5;
  margin: -4px 0 10px;
}

/* Sector impact — stacked rows, no overlap */
.detail-page .impact-list {
  gap: 8px;
}

.td-impact-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
}

.td-impact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.td-impact-sector {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.td-impact-score {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.td-impact-score-max {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-3);
  margin-left: 1px;
}

.td-impact-reason {
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sources tab — 3 columns only */
.td-sources-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.td-sources-head,
.td-sources-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.9fr) minmax(72px, 0.55fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.td-sources-head {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.td-sources-row {
  font-size: 0.76rem;
  border-bottom: 1px solid var(--border);
}
.td-sources-row:last-child { border-bottom: none; }

.td-sources-name {
  font-weight: 600;
  color: var(--text);
}

.td-sources-result {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.td-sources-result.src-ok { color: var(--low); }
.td-sources-result.src-clean { color: var(--text-3); }
.td-sources-result.src-pending { color: var(--medium); }
.td-sources-result.src-err { color: var(--critical); }
.td-sources-result.src-na { color: var(--text-3); }

.td-sources-detail {
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Threat detail — Attack flow tab */
.detail-page .td-atk-wrap,
.detail-page .td-def-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-page .td-atk-card .d-block-title,
.detail-page .td-def-card .d-block-title {
  margin-bottom: 6px;
}

.detail-page .td-atk-meta-inline {
  margin: 0 0 12px;
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.45;
}

.detail-page .td-atk-goto-tab {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.detail-page .td-atk-goto-tab:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.td-stat--attack .td-stat-num {
  font-size: 1.05rem;
  line-height: 1;
  filter: saturate(1.1);
}

.td-stat--attack.active {
  border-color: rgba(245,82,82,0.45);
  background: rgba(245,82,82,0.1);
}

.td-stat--attack.active .td-stat-num {
  color: #fca5a5;
}

.detail-page .td-atk-pipeline {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 0;
  padding: 4px 0 2px;
  overflow-x: auto;
}

.detail-page .td-atk-node {
  flex: 1 1 0;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 4px 6px 8px;
}

.detail-page .td-atk-node-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(79,142,247,0.45);
  background: rgba(79,142,247,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(79,142,247,0.06);
}

.detail-page .td-atk-node.is-current .td-atk-node-ring {
  border-color: rgba(245,82,82,0.65);
  background: rgba(245,82,82,0.14);
  box-shadow: 0 0 0 4px rgba(245,82,82,0.08);
}

.detail-page .td-atk-node-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: #93c5fd;
  line-height: 1;
}

.detail-page .td-atk-node.is-current .td-atk-node-num {
  color: #fca5a5;
}

.detail-page .td-atk-node-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.detail-page .td-atk-mitre-tactic {
  font-size: 0.68rem;
  font-weight: 600;
  color: #c4b5fd;
  line-height: 1.25;
}

.detail-page .td-atk-mitre-id {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.03em;
}

.detail-page .td-atk-node-techniques {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 100%;
}

.detail-page .td-atk-technique {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(167,139,250,0.14);
  border: 1px solid rgba(167,139,250,0.35);
  color: #ddd6fe;
}

.detail-page .td-atk-node-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(245,82,82,0.15);
  color: #fca5a5;
  border: 1px solid rgba(245,82,82,0.35);
}

.detail-page .td-atk-connector {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  position: relative;
  min-height: 40px;
}

.detail-page .td-atk-connector-line {
  position: absolute;
  left: 4px;
  right: 12px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, rgba(79,142,247,0.15), rgba(79,142,247,0.55));
  border-radius: 2px;
}

.detail-page .td-atk-connector-chev {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(147,197,253,0.9);
  line-height: 1;
}

.detail-page .td-atk-sub {
  margin: 0 0 12px;
  font-size: 0.68rem;
  color: var(--text-3);
  line-height: 1.45;
}

.detail-page .td-atk-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-page .td-atk-step-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.detail-page .td-atk-step-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.detail-page .td-atk-step-num {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.detail-page .td-atk-step-mitre {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(167,139,250,0.14);
  border: 1px solid rgba(167,139,250,0.35);
  color: #ddd6fe;
}

.detail-page .td-atk-step-tactic {
  font-size: 0.68rem;
  font-weight: 600;
  color: #c4b5fd;
}

.detail-page .td-atk-step-narrative {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* Threat detail — Defense tab */
.detail-page .td-def-card--products,
.detail-page .td-def-card--mitigations {
  width: 100%;
}

.detail-page .td-def-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.detail-page .td-def-product {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.detail-page .td-def-product-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.detail-page .td-def-product-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.detail-page .td-def-product-plat {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.detail-page .td-def-product-blurb {
  margin: 0;
  flex: 1;
  font-size: 0.74rem;
  color: var(--text-2);
  line-height: 1.5;
}

.detail-page .td-def-product-link {
  font-size: 0.72rem;
  font-weight: 600;
  color: #FA6400;
  text-decoration: none;
  align-self: flex-start;
}

.detail-page .td-def-product-link:hover {
  text-decoration: underline;
}

.detail-page .td-def-mit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: td-def-mit;
}

.detail-page .td-def-mit-item {
  counter-increment: td-def-mit;
  position: relative;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,0.02);
  font-size: 0.74rem;
  color: var(--text-2);
  line-height: 1.5;
}

.detail-page .td-def-mit-item::before {
  content: counter(td-def-mit);
  position: absolute;
  left: 10px;
  top: 11px;
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
  color: #FA6400;
  background: rgba(250,100,0,0.12);
  border: 1px solid rgba(250,100,0,0.28);
}

@media (max-width: 900px) {
  .detail-page .td-atk-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .detail-page .td-atk-pipeline {
    min-width: min(100%, 520px);
  }
  .detail-page .td-atk-node {
    min-width: 72px;
  }
  .detail-page .td-def-products {
    grid-template-columns: 1fr;
  }
}

.td-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px !important;
}

.td-block-sub {
  font-weight: 500;
  color: var(--text-3);
}

.td-export-btn {
  font-size: 0.65rem;
  padding: 4px 10px;
}


.detail-page .d-product {
  font-size: 0.78rem;
}

.detail-page .ioc-val {
  font-size: 0.76rem;
}

.detail-page .ioc-conf {
  font-size: 0.68rem;
}

.detail-page .cve-card {
  padding: 12px 14px;
}

.detail-page .cve-id {
  font-size: 0.82rem;
}

.detail-page .cve-desc {
  font-size: 0.76rem;
}

.detail-page .ttp-item {
  padding: 12px 14px;
}

.detail-page .ttp-id {
  font-size: 0.78rem;
}

.detail-page .ttp-name {
  font-size: 0.78rem;
}

.detail-page .ttp-proc {
  font-size: 0.74rem;
}

.detail-page .evidence-title {
  font-size: 0.8rem;
}

.detail-page .evidence-body {
  font-size: 0.76rem;
}

.detail-page .cmat-head,
.detail-page .cmat-row {
  font-size: 0.72rem;
}

/* Threat detail — Actors tab (flat panel, single card depth) */
.td-actors-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.td-actors-title {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.detail-page .td-actors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 14px;
  align-content: start;
}

.detail-page .td-actor-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.028);
}

.detail-page .td-actor-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-page .td-actor-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
  min-width: 0;
}

.detail-page .td-actor-motiv {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
  white-space: nowrap;
}

.detail-page .td-actor-sub {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-2);
  line-height: 1.45;
}

.detail-page .td-actor-sep {
  margin: 0 6px;
  color: var(--text-3);
}

.detail-page .td-actor-aliases {
  margin: 0;
  font-size: 0.68rem;
  color: var(--text-3);
  line-height: 1.4;
}

.detail-page .td-actor-desc {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-2);
  line-height: 1.5;
}

.detail-page .td-actor-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.detail-page .td-actor-stat {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  font-size: 0.74rem;
  line-height: 1.45;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.detail-page .td-actor-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-page .td-actor-stat-k {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.detail-page .td-actor-stat-v {
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-page .td-actor-foot {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

.detail-page .td-actor-link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.detail-page .td-actor-link:hover {
  color: #93c5fd;
}

@media (max-width: 640px) {
  .detail-page .td-actors-grid {
    grid-template-columns: 1fr;
  }

  .detail-page .td-actor-stat {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.td-pa-wrap .pa-section {
  margin-top: 0;
  border-radius: var(--r);
}

@media (max-width: 1100px) {
  .td-rating-strip { grid-template-columns: 1fr; }
  .td-rating-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .td-rating-item:last-child { border-bottom: none; }
  .td-stat { min-width: 68px; }  /* keep one scrollable line on tablets */
  .td-overview-grid,
  .detail-page .td-def-products { grid-template-columns: 1fr; }
  .td-sources-head,
  .td-sources-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 720px) {
  .detail-body { overflow: auto; }
  .detail-page {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .td-shell { height: auto; }
  .td-workspace { min-height: 420px; }
  .td-stat { min-width: 64px; }  /* keep one scrollable line on phones */
}

/* ── Stack Risk — dashboard scale + compact toolbar ───────────────── */
.stack-risk-page {
  padding-top: calc(var(--navbar-h) + 10px);
  /* Page horizontal padding — keep in sync with .dashboard-page padding-left/right */
  --sr-page-pad: calc(18px * var(--dash-s, 1.1));
}

.stack-risk-page .stack-risk-filter {
  --tf-control-h: 36px;
  --tf-chrome-h: 42px;
  position: sticky;
  top: calc(var(--navbar-h) + 8px);
  z-index: 120;
  padding: calc(8px * var(--dash-s, 1)) calc(14px * var(--dash-s, 1));
  background: var(--surface-solid);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(8, 12, 20, 0.55);
}

/* Invisible slab behind the card that fills the side + top gaps so scrolled
   content cannot bleed through when the toolbar is in its sticky position */
.stack-risk-page .stack-risk-filter::before {
  content: '';
  position: absolute;
  top: calc(-8px - 2px);
  bottom: -2px;
  left: calc(-1 * var(--sr-page-pad, 19.8px));
  right: calc(-1 * var(--sr-page-pad, 19.8px));
  background: var(--bg);
  z-index: -1;
  pointer-events: none;
}

.stack-risk-page .sr-toolbar-industry .filter-dd-btn {
  min-height: calc(var(--tf-control-h) * var(--dash-s, 1));
  height: calc(var(--tf-control-h) * var(--dash-s, 1));
  box-sizing: border-box;
}

.stack-risk-page .sr-toolbar-row {
  display: flex;
  align-items: center;
  gap: calc(12px * var(--dash-s, 1));
  min-height: var(--tf-chrome-h);
}

.stack-risk-page .sr-toolbar-industry {
  flex: 0 0 calc(300px * var(--dash-s, 1));
  min-width: 200px;
}

.stack-risk-page .sr-toolbar-industry .filter-dropdown {
  width: 100%;
}

/* Country filter — same height/style as industry, narrower fixed width */
.stack-risk-page .sr-toolbar-country {
  flex: 0 0 calc(200px * var(--dash-s, 1));
  min-width: 150px;
}

.stack-risk-page .sr-toolbar-country .filter-dropdown {
  width: 100%;
}

.stack-risk-page .sr-toolbar-country .filter-dd-btn {
  min-height: calc(var(--tf-control-h) * var(--dash-s, 1));
  height: calc(var(--tf-control-h) * var(--dash-s, 1));
  box-sizing: border-box;
}

/* Country dropdown menu — scrollable for long lists */
.stack-risk-page .sr-country-dd-menu {
  max-height: 280px;
  overflow-y: auto;
}

/* Threat count badge inside country dropdown options */
.filter-dd-count {
  margin-left: auto;
  font-size: 0.7em;
  font-weight: 600;
  color: var(--text-3, #8892a4);
  font-variant-numeric: tabular-nums;
}

/* Loading/empty states inside country dropdown */
.filter-dd-loading,
.filter-dd-empty {
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-3, #8892a4);
  font-style: italic;
}

.stack-risk-page .sr-toolbar-stack {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: calc(8px * var(--dash-s, 1));
  border-left: 1px solid var(--border);
  padding-left: calc(12px * var(--dash-s, 1));
}

.stack-risk-page .sr-toolbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: calc(10px * var(--dash-s, 1));
}

.stack-risk-page .sr-tool-link {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: calc(0.64rem * var(--dash-s, 1));
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
}

.stack-risk-page .sr-tool-link:hover {
  text-decoration: underline;
}

.stack-risk-page .sr-status-inline {
  font-size: calc(0.6rem * var(--dash-s, 1));
  color: var(--text-3);
  font-weight: 600;
  white-space: nowrap;
}

.stack-risk-page .sr-status-inline:not([hidden])::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 4px;
  animation: sr-pulse 1s ease-in-out infinite;
}

@keyframes sr-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.stack-risk-page .sr-stack-hint {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: calc(var(--tf-control-h) * var(--dash-s, 1));
  font-size: calc(0.58rem * var(--dash-s, 1));
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
  padding-right: calc(8px * var(--dash-s, 1));
  border-right: 1px solid var(--border);
  margin-right: calc(2px * var(--dash-s, 1));
}

/* Vendor picker — same position in the toolbar row as the old text input */
.stack-risk-page .sr-vendor-dd {
  flex: 0 0 calc(220px * var(--dash-s, 1));
  width: calc(220px * var(--dash-s, 1));
  min-width: 0;
}

.stack-risk-page .sr-vendor-dd .filter-dd-btn {
  height: calc(var(--tf-control-h) * var(--dash-s, 1));
  min-height: calc(var(--tf-control-h) * var(--dash-s, 1));
  font-size: calc(0.68rem * var(--dash-s, 1));
}

/* Widen the menu so long vendor names aren't clipped */
.stack-risk-page #sr-vendor-dd-menu {
  min-width: calc(260px * var(--dash-s, 1));
  max-height: calc(300px * var(--dash-s, 1));
}

.stack-risk-page .sr-tags-inline {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: calc(5px * var(--dash-s, 1));
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.stack-risk-page .sr-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-height: calc(var(--tf-control-h) * var(--dash-s, 1));
  box-sizing: border-box;
  font-size: calc(0.64rem * var(--dash-s, 1));
  font-weight: 600;
  padding: 0 calc(10px * var(--dash-s, 1));
  border-radius: 8px;
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid rgba(79, 142, 247, 0.22);
  color: #93c5fd;
}

.stack-risk-page .sr-tag-x {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}

.stack-risk-page .sr-tag-x:hover {
  opacity: 1;
}

.stack-risk-page .sr-toolbar-secondary {
  display: flex;
  align-items: center;
  gap: calc(12px * var(--dash-s, 1));
  padding: calc(8px * var(--dash-s, 1)) 0 0;
  border-top: 1px solid var(--border);
  margin-top: calc(8px * var(--dash-s, 1));
}

.stack-risk-page .sr-toolbar-secondary .sr-sbom-drop {
  flex: 1;
  min-width: 0;
  display: block;
}

.stack-risk-page .sr-toolbar-secondary .sr-status-inline {
  flex: 0 1 auto;
  min-width: 0;
}

.stack-risk-page .sr-toolbar-secondary .sr-tool-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.stack-risk-page .sr-sbom-drop {
  flex: 1;
  padding: calc(7px * var(--dash-s, 1)) calc(10px * var(--dash-s, 1));
  border: 1px dashed var(--border-2);
  border-radius: 6px;
  font-size: calc(0.64rem * var(--dash-s, 1));
  color: var(--text-3);
  cursor: pointer;
}

.stack-risk-page .sr-sbom-drop:hover,
.stack-risk-page .sr-sbom-drop.sr-sbom-dragover {
  border-color: rgba(79, 142, 247, 0.4);
  color: var(--text-2);
}

.stack-risk-page .sr-sbom-close {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: calc(0.64rem * var(--dash-s, 1));
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px 8px;
}

.stack-risk-page .sr-sbom-close:hover {
  color: var(--text-2);
}

.sr-empty-hint {
  text-align: center;
  padding: calc(20px * var(--dash-s, 1)) calc(16px * var(--dash-s, 1));
  font-size: calc(0.7rem * var(--dash-s, 1));
  color: var(--text-3);
}

.sr-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}
.sr-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text-3);
  font-size: 0.72rem;
}
.sr-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sr-dashboard {
  display: flex;
  flex-direction: column;
  gap: calc(14px * var(--dash-s, 1));
}

.sr-dashboard--busy {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* ── Stack Risk: intelligence brief ─────────────────────────────────────── */
.sr-brief {
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.05) 0%, rgba(255, 255, 255, 0.02) 48%, rgba(250, 88, 45, 0.03) 100%);
  border: 1px solid rgba(79, 142, 247, 0.14);
  border-radius: 10px;
  padding: calc(15px * var(--dash-s, 1)) calc(20px * var(--dash-s, 1));
}

.sr-brief-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: calc(9px * var(--dash-s, 1));
}

.sr-brief-item {
  display: grid;
  grid-template-columns: calc(1.35em * var(--dash-s, 1)) minmax(0, 1fr);
  gap: calc(8px * var(--dash-s, 1));
  align-items: start;
}

.sr-brief-idx {
  font-size: calc(0.72rem * var(--dash-s, 1));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  line-height: 1.65;
}

.sr-brief-text {
  font-size: calc(0.8rem * var(--dash-s, 1));
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-2);
  letter-spacing: 0.012em;
}

.sr-brief-num {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* CISO priorities — numbered circles */
.stack-risk-page .sr-ciso-priorities li {
  display: flex;
  align-items: flex-start;
  gap: calc(9px * var(--dash-s, 1));
  padding: calc(7px * var(--dash-s, 1)) 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  /* override inherited bullet */
  padding-left: 0;
}

.stack-risk-page .sr-ciso-priorities li:last-child { border-bottom: none; }

.stack-risk-page .sr-ciso-priorities li::before { display: none; }

.sr-priority-num {
  flex-shrink: 0;
  width: calc(19px * var(--dash-s, 1));
  height: calc(19px * var(--dash-s, 1));
  background: rgba(79,142,247,0.14);
  color: var(--blue);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: calc(0.6rem * var(--dash-s, 1));
  font-weight: 800;
  margin-top: 1px;
}

.sr-priority-text {
  font-size: calc(0.71rem * var(--dash-s, 1));
  line-height: 1.45;
  color: var(--text);
}

/* Chart grid: 5+4+3 row1, 7+5 row2 (12-col dashboard grid) */
.stack-risk-page .sr-chart-grid .sr-chart-sev {
  grid-column: span 5;
}

.stack-risk-page .sr-chart-grid .sr-chart-types {
  grid-column: span 4;
}

.stack-risk-page .sr-chart-grid .sr-chart-vendors {
  grid-column: span 3;
}

.stack-risk-page .sr-chart-grid .sr-chart-pa {
  grid-column: 1 / -1;
}

.stack-risk-page .sr-ciso-priorities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: calc(8px * var(--dash-s, 1));
}

.stack-risk-page .sr-ciso-priorities li {
  font-size: calc(0.7rem * var(--dash-s, 1));
  line-height: 1.45;
  color: var(--text);
  padding-left: calc(12px * var(--dash-s, 1));
  position: relative;
}

.stack-risk-page .sr-ciso-priorities li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.stack-risk-page .sr-ciso-lens {
  margin: 0;
  font-size: calc(0.72rem * var(--dash-s, 1));
  line-height: 1.55;
  color: var(--text-2);
  font-style: normal;
  padding-top: 0;
  border-top: 0;
}

.stack-risk-page .sr-ciso-recs {
  margin-top: 0;
}

.stack-risk-page .sr-ciso-recs-label {
  font-size: calc(0.58rem * var(--dash-s, 1));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: calc(6px * var(--dash-s, 1));
}

.stack-risk-page .sr-type-list li {
  font-size: calc(0.68rem * var(--dash-s, 1));
}

.sr-split-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
}

.sr-split-col {
  padding: 8px 12px 12px;
}

.sr-split-col + .sr-split-col {
  border-left: 1px solid var(--border);
}

.sr-split-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.sr-type-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sr-type-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.65rem;
  color: var(--text-2);
}

.sr-type-list li:last-child {
  border-bottom: 0;
}

.sr-type-list li strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sr-pa-empty,
.sr-list-empty {
  font-size: calc(0.66rem * var(--dash-s, 1));
  color: var(--text-3);
  padding: 4px 0;
}

@media (max-width: 1100px) {
  .stack-risk-page .sr-chart-grid .sr-chart-sev,
  .stack-risk-page .sr-chart-grid .sr-chart-types,
  .stack-risk-page .sr-chart-grid .sr-chart-vendors,
  .stack-risk-page .sr-chart-grid .sr-chart-pa {
    grid-column: 1 / -1;
  }
  .stack-risk-page .sr-toolbar-row {
    flex-wrap: wrap;
  }
  .stack-risk-page .sr-toolbar-industry {
    flex: 1 1 calc(50% - 6px);
  }
  .stack-risk-page .sr-toolbar-country {
    flex: 1 1 calc(50% - 6px);
  }
  .stack-risk-page .sr-toolbar-stack {
    flex: 1 1 100%;
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: calc(8px * var(--dash-s, 1));
  }
  .stack-risk-page .sr-toolbar-actions,
  .stack-risk-page .sr-toolbar-secondary {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
  .stack-risk-page .sr-toolbar-secondary {
    flex-wrap: wrap;
  }
  .stack-risk-page .sr-toolbar-secondary .sr-sbom-drop {
    flex: 1 1 100%;
  }
}

/* At ≤960px the .page rule switches to padding: 16px — sync --sr-page-pad
   so the full-width filter doesn't overshoot the viewport */
@media (max-width: 960px) {
  .stack-risk-page {
    --sr-page-pad: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR MODAL — TABS (adp-tabs-bar, adp-tab, adp-tab-content)
   ═══════════════════════════════════════════════════════════════════════════ */

.actor-modal-body {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.adp-tabs-bar {
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 8px 14px 0;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.adp-tabs-bar::-webkit-scrollbar { display: none; }

.adp-tab {
  padding: 5px 12px 7px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.02em;
}
.adp-tab:hover { color: var(--text-2); }
.adp-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.adp-tab-content {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.adp-tab-content::-webkit-scrollbar { width: 4px; }

.adp-loading {
  padding: 20px 0;
}

.adp-empty {
  padding: 28px 0;
  font-size: 0.68rem;
  color: var(--text-3);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR PLAYBOOK (pb-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.pb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.pb-count {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-2);
}
.pb-corr-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  color: var(--text-3);
}

.pb-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Stage card — left border uses per-stage color via CSS custom property */
.pb-stage {
  border: 1px solid var(--border);
  border-left: 3px solid var(--kc-col, var(--border));
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.012);
}
.pb-stage--unknown { opacity: 0.65; }

/* Stage header row: name + count badge */
.pb-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.pb-stage-name {
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--kc-col, var(--text-3));
}

.pb-stage-count {
  font-size: 0.56rem;
  font-weight: 600;
  color: var(--text-3);
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 3px;
}

.pb-stage-body {
  display: flex;
  flex-direction: column;
}

/* Compact technique row inside a stage */
.pb-ttp-row {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.pb-ttp-row:last-child { border-bottom: none; }

.pb-ttp-row-top {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.pb-ttp-name {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.pb-sub {
  font-size: 0.6rem;
  color: var(--text-3);
  font-weight: 400;
}
.pb-ttp-proc {
  font-size: 0.61rem;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR EMULATION (emu-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.emu-steps { display: flex; flex-direction: column; gap: 6px; }

.emu-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
}

.emu-step-num {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  /* color + background set inline per stage color */
}

.emu-step-body { flex: 1; min-width: 0; }

.emu-step-head,
.emu-step-row1 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.emu-stage-tag {
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  /* color + border-color set inline per stage color */
}

.emu-step-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.emu-step-proc {
  font-size: 0.61rem;
  color: var(--text-3);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR BEHAVIORAL PROFILE (prof-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.prof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) { .prof-grid { grid-template-columns: 1fr; } }

.prof-ttp-list { display: flex; flex-direction: column; gap: 6px; }
.prof-ttp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.prof-ttp-name {
  font-size: 0.65rem;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prof-ttp-count {
  font-size: 0.6rem;
  color: var(--blue);
  font-weight: 600;
  flex-shrink: 0;
}

.prof-bars { display: flex; flex-direction: column; gap: 6px; }
.prof-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 24px;
  align-items: center;
  gap: 6px;
}
.prof-bar-label {
  font-size: 0.6rem;
  color: var(--text-3);
  text-transform: capitalize;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prof-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.prof-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.prof-bar-fill--geo { background: #a78bfa; }
.prof-bar-val {
  font-size: 0.58rem;
  color: var(--text-3);
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR CVE EXPLOITATION (actor-cve-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.actor-cve-list { display: flex; flex-direction: column; gap: 10px; }

.actor-cve-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.018);
}

.actor-cve-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.actor-cve-desc {
  font-size: 0.65rem;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 6px;
}

.actor-cve-proc {
  font-size: 0.62rem;
  color: var(--text-3);
  line-height: 1.5;
  padding: 6px 8px;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--blue);
  border-radius: 0 4px 4px 0;
  margin-bottom: 6px;
}
.actor-cve-proc-label {
  display: block;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.actor-cve-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR TIMELINE (tl-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.tl-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 12px 0 4px;
  min-height: 100px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tl-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 42px;
  cursor: default;
}
.tl-bar-wrap {
  width: 28px;
  height: 64px;
  display: flex;
  align-items: flex-end;
  background: rgba(255,255,255,0.04);
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}
.tl-bar-fill {
  width: 100%;
  background: var(--blue);
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  min-height: 3px;
}
.tl-bar-count {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-2);
}
.tl-bar-label {
  font-size: 0.55rem;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
}
.tl-bar-tech {
  font-size: 0.52rem;
  color: var(--blue);
  font-weight: 600;
}

.tl-table { display: flex; flex-direction: column; gap: 0; }
.tl-head, .tl-row {
  display: grid;
  grid-template-columns: 80px 90px 1fr 1fr;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.6rem;
  align-items: center;
}
.tl-head {
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.55rem;
  background: rgba(255,255,255,0.02);
}
.tl-row { color: var(--text-2); }
.tl-row:last-child { border-bottom: none; }
.tl-row-month { font-family: var(--mono); color: var(--text-3); }
.tl-row-count { font-weight: 600; color: var(--text); }
.tl-row-types { color: var(--text-3); }
.tl-row-techs { font-family: var(--mono); font-size: 0.56rem; color: var(--blue); }

.ttp-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR MODAL — OVERVIEW TAB REDESIGN (adp-kpi, adp-alias, adp-threat-row)
   ═══════════════════════════════════════════════════════════════════════════ */

.adp-kpi-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.adp-kpi {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  min-width: 0;
  text-align: center;
}

.adp-kpi-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.adp-kpi-label {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.adp-section-label,
.impact-section-label {
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  display: block;
}

.adp-alias-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}

.adp-alias {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.6rem;
  color: var(--text-2);
  background: rgba(255,255,255,0.03);
  font-family: var(--mono);
}

.adp-meta-row-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.adp-meta-inline {
  font-size: 0.62rem;
  color: var(--text-3);
}

.adp-meta-sep {
  font-size: 0.6rem;
  color: var(--border-2);
}

.adp-desc {
  font-size: 0.7rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 16px;
}

.adp-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.adp-view-all {
  font-size: 0.6rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.adp-view-all:hover { text-decoration: underline; }

.adp-threat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.adp-threat-row:last-child { border-bottom: none; }
.adp-threat-row:hover .adp-threat-title { color: var(--blue); }

.adp-threat-sev {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}

.adp-threat-title {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.adp-threat-src {
  font-size: 0.58rem;
  color: var(--text-3);
  flex-shrink: 0;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adp-empty-inline {
  font-size: 0.65rem;
  color: var(--text-3);
  padding: 12px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR MODAL — TTPs TAB (ttp-view-toggle, tvt-btn, pb-ttp-top, pb-corr-badge)
   ═══════════════════════════════════════════════════════════════════════════ */

.ttp-tab-wrap { display: flex; flex-direction: column; gap: 0; }

.ttp-view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
  align-self: center;
}

.tvt-btn {
  padding: 4px 12px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-3);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.02em;
}
.tvt-btn:hover { color: var(--text-2); }
.tvt-btn.active {
  background: var(--blue);
  color: #fff;
}

.pb-ttp-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.pb-corr-badge {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-dim);
  border-radius: 10px;
  padding: 1px 6px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.pb-meta {
  font-size: 0.58rem;
  color: var(--text-3);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR MODAL — IMPACT TAB (impact-two-col, impact-bar-row, impact-tool-chip)
   ═══════════════════════════════════════════════════════════════════════════ */

.impact-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 540px) { .impact-two-col { grid-template-columns: 1fr; } }

.impact-col { display: flex; flex-direction: column; gap: 0; }

/* Card wrapper for sector/country columns */
.impact-col-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 6px;
  background: rgba(255,255,255,0.018);
}

.impact-bars { display: flex; flex-direction: column; gap: 9px; }

/* Stacked layout: label row on top, bar below — no truncation */
.impact-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.impact-bar-header {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Colored indicator dot */
.impact-bar-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  flex-shrink: 0;
}

.impact-bar-label {
  font-size: 0.63rem;
  font-weight: 500;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.impact-bar-val {
  font-size: 0.6rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  flex-shrink: 0;
}

.impact-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.impact-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.impact-tools-section { margin-top: 4px; }

/* Card wrapper for malware/tools section */
.impact-tools-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.018);
}

.impact-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.impact-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  cursor: default;
}

.impact-tool-name {
  font-size: 0.63rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--mono);
}

.impact-tool-type {
  font-size: 0.56rem;
  color: var(--text-3);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.impact-tool-count {
  font-size: 0.58rem;
  color: var(--blue);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTOR MODAL — ACTIVITY TAB (act-chart, act-bar-col, act-summary)
   ═══════════════════════════════════════════════════════════════════════════ */

.act-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 8px 0 0;
  min-height: 110px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.act-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 36px;
  flex: 1;
  cursor: default;
}

.act-bar-wrap {
  width: 100%;
  height: 70px;
  display: flex;
  align-items: flex-end;
  background: rgba(255,255,255,0.04);
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.act-bar-fill {
  width: 100%;
  background: var(--blue);
  border-radius: 3px 3px 0 0;
  transition: height 0.35s ease;
  min-height: 3px;
  opacity: 0.8;
}

.act-bar-col.is-peak .act-bar-fill {
  background: var(--blue);
  opacity: 1;
  box-shadow: 0 0 8px rgba(79,142,247,0.4);
}

.act-bar-count {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.act-bar-label {
  font-size: 0.5rem;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
}

.act-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.act-sum-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.act-sum-row:last-child { border-bottom: none; }

.act-sum-label {
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  flex-shrink: 0;
  width: 80px;
  padding-top: 1px;
}

.act-sum-val {
  font-size: 0.68rem;
  color: var(--text-2);
  flex: 1;
  line-height: 1.5;
}

.act-sum-types {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.act-sum-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   THREAT DETAIL — TTP EVIDENCE (ttp-evidence-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.ttp-evidence-trail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ttp-evidence-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 10px;
}
.ttp-evidence-item {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,0.018);
  margin-bottom: 8px;
}
.ttp-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.ttp-evidence-body {
  font-size: 0.62rem;
  color: var(--text-3);
  line-height: 1.5;
  font-style: italic;
  padding-left: 8px;
  border-left: 2px solid var(--border-2);
}

/* ── Stack Risk: live security principles ─────────────────────────────────── */
/* Bottom sections — consistent section headers */
.sr-principles-card,
.sr-landscape {
  padding: calc(16px * var(--dash-s, 1)) calc(18px * var(--dash-s, 1));
}

.sr-principles-card .dash-card-title,
.sr-landscape .dash-card-title {
  font-size: calc(0.84rem * var(--dash-s, 1));
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
}

.sr-principles-card .dash-card-sub,
.sr-landscape .dash-card-sub {
  font-size: calc(0.66rem * var(--dash-s, 1));
  text-transform: none;
  letter-spacing: 0.02em;
}
.sr-principles-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.sr-principles-badge {
  flex: 0 0 auto; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-2); background: var(--surface);
}
.sr-principles-badge.is-ai { color: #4f8ef7; border-color: rgba(79,142,247,0.4); background: rgba(79,142,247,0.1); }
.sr-principles-badge.is-base { color: var(--low); border-color: rgba(74,201,126,0.35); background: var(--low-dim); }

.sr-principles-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sr-pr-item {
  display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r);
  background: rgba(255,255,255,0.02);
}
.sr-pr-item:hover { border-color: var(--border-2); }
.sr-pr-rank {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  font-size: 0.78rem; font-weight: 800; color: #4f8ef7;
  background: rgba(79,142,247,0.12); border: 1px solid rgba(79,142,247,0.28);
}
.sr-pr-body { min-width: 0; }
.sr-pr-title { font-size: 0.82rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.sr-pr-why { font-size: 0.74rem; color: var(--text-2); line-height: 1.45; margin-top: 3px; }
.sr-pr-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sr-pr-chip {
  font-size: 0.64rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  color: var(--text-3); background: var(--surface); border: 1px solid var(--border);
}
.sr-pr-chip--cve { color: var(--high); border-color: rgba(232,164,74,0.3); background: var(--high-dim); font-variant-numeric: tabular-nums; }

.sr-deck-btn {
  font-size: 0.78rem; font-weight: 600; padding: 6px 13px; border-radius: var(--r);
  background: #FA582D; color: #fff; border: 1px solid #FA582D; cursor: pointer;
  transition: background 0.15s;
}
.sr-deck-btn:hover { background: #e14a22; }

@media (max-width: 900px) {
  .sr-principles-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sr-pr-item { grid-template-columns: 22px 1fr; }
}

/* ── Industry landscape section (bottom of Stack Risk) ─────────────────────── */

.sr-landscape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sr-ls-lane { display: flex; flex-direction: column; gap: 8px; }
.sr-ls-lane-title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.sr-ls-item {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,0.02);
}
.sr-ls-item:hover { border-color: var(--border-2); }
.sr-ls-title { display: block; font-size: 0.78rem; font-weight: 650; color: var(--text); text-decoration: none; line-height: 1.3; }
a.sr-ls-title:hover { color: #4f8ef7; text-decoration: underline; }
.sr-ls-sum { font-size: 0.7rem; color: var(--text-2); line-height: 1.45; margin: 5px 0 0; }
.sr-ls-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.sr-ls-chip { font-size: 0.6rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); }
.sr-ls-impact-high { color: var(--critical); border-color: rgba(245,82,82,0.3); background: rgba(245,82,82,0.1); }
.sr-ls-impact-med { color: var(--high); border-color: rgba(232,164,74,0.3); background: var(--high-dim); }
.sr-ls-impact-low { color: var(--low); border-color: rgba(74,201,126,0.3); background: var(--low-dim); }
.sr-ls-empty { font-size: 0.72rem; color: var(--text-3); padding: 6px 2px; }
@media (max-width: 860px) { .sr-landscape-grid { grid-template-columns: 1fr; } }

/* ── Intelligence Landscape page (legacy — page removed) ───────────────────── */
.lp-head { margin-bottom: 16px; }
.lp-title { font-size: 1.4rem; font-weight: 800; color: var(--text); margin: 0; }
.lp-sub { font-size: 0.85rem; color: var(--text-2); margin: 5px 0 0; }
.lp-overview { display: flex; flex-direction: column; gap: 14px; }
.lp-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-charts .dash-chart-body { height: 210px; }
@media (max-width: 760px) { .lp-charts { grid-template-columns: 1fr; } }

.lp-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}
.lp-grid.lp-busy { opacity: 0.6; transition: opacity 0.15s; }
@media (max-width: 1100px) { .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .lp-grid { grid-template-columns: 1fr; } }

.lp-col { padding: 14px; display: flex; flex-direction: column; min-height: 120px; }
.lp-col-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.lp-col-title { font-size: 0.82rem; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.lp-col-count {
  font-size: 0.72rem; font-weight: 800; color: var(--text-2);
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
}
.lp-list { display: flex; flex-direction: column; gap: 10px; }

.lp-card {
  padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--r);
  background: rgba(255,255,255,0.02); transition: border-color 0.15s, background 0.15s;
}
.lp-card:hover { border-color: var(--border-2); background: rgba(255,255,255,0.04); }
.lp-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lp-card-title { font-size: 0.86rem; font-weight: 650; color: var(--text); text-decoration: none; line-height: 1.3; }
a.lp-card-title:hover { color: #4f8ef7; text-decoration: underline; }
.lp-card-summary { font-size: 0.76rem; color: var(--text-2); line-height: 1.45; margin: 6px 0 0; }
.lp-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.lp-chip {
  font-size: 0.62rem; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  color: var(--text-3); background: var(--surface); border: 1px solid var(--border); text-transform: capitalize;
}
.lp-chip-region { text-transform: none; }
.lp-impact-high { color: var(--critical); border-color: rgba(245,82,82,0.3); background: rgba(245,82,82,0.1); }
.lp-impact-med { color: var(--high); border-color: rgba(232,164,74,0.3); background: var(--high-dim); }
.lp-impact-low { color: var(--low); border-color: rgba(74,201,126,0.3); background: var(--low-dim); }
.lp-card-src { font-size: 0.62rem; color: var(--text-3); margin-left: auto; }

.lp-trend {
  flex: 0 0 auto; font-size: 0.68rem; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.lp-trend-up { color: var(--critical); background: rgba(245,82,82,0.12); }
.lp-trend-down { color: var(--low); background: var(--low-dim); }
.lp-empty { font-size: 0.78rem; color: var(--text-3); padding: 8px 2px; }
