/* === Modern Minimalist Theme === */

:root {
  --bg: #09090b;
  --bg-card: #111113;
  --bg-elevated: #18181b;
  --bg-hover: #1e1e22;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.1);
  --accent-medium: rgba(34, 211, 238, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --red: #ef4444;
  --green: #22c55e;
  --purple: #a78bfa;
  --amber: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --max-w: 1080px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Light Theme === */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-hover: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0891b2;
  --accent-soft: rgba(8,145,178,0.1);
  --accent-medium: rgba(8,145,178,0.15);
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --red: #dc2626;
  --green: #16a34a;
  --purple: #7c3aed;
  --amber: #d97706;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
}
[data-theme="light"] .navbar { background: rgba(248,250,252,0.9); }
[data-theme="light"] .nav-tabs.open { background: rgba(248,250,252,0.98); }
[data-theme="light"] .badge-source { background: rgba(59,130,246,0.08); color: #2563eb; }
[data-theme="light"] .badge-category { background: rgba(124,58,237,0.08); color: #7c3aed; }
[data-theme="light"] .badge-vendor { background: rgba(8,145,178,0.08); color: #0891b2; }
[data-theme="light"] .cve-id { background: rgba(8,145,178,0.08); color: #0891b2; }
[data-theme="light"] .cve-id.cve-critical { background: rgba(220,38,38,0.08); color: #dc2626; }
[data-theme="light"] .cve-id.cve-high { background: rgba(217,119,6,0.08); color: #d97706; }
[data-theme="light"] .cve-id.cve-medium { background: rgba(124,58,237,0.08); color: #7c3aed; }
[data-theme="light"] .hero h1 { -webkit-text-fill-color: var(--text); background: none; }

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #67e8f9; }

/* === Layout === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* === Navbar === */
.navbar {
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner { display: flex; align-items: center; height: 3.5rem; gap: 0; }
.logo {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin-right: 2rem; flex-shrink: 0; letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo span { color: var(--accent); }

/* Nav tabs */
.nav-tabs { display: flex; align-items: center; gap: 0.125rem; flex: 1; }
.nav-tab {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-xs); font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted); background: transparent; transition: all var(--transition); white-space: nowrap;
}
.nav-tab:hover { color: var(--text-secondary); background: var(--bg-hover); text-decoration: none; }
.nav-tab.active { color: var(--text); background: var(--bg-elevated); }
.chevron { width: 13px; height: 13px; flex-shrink: 0; transition: transform var(--transition); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown:hover .chevron { transform: rotate(180deg); }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 0.4rem; padding-top: calc(0.4rem + 6px); margin-top: 0; z-index: 300;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}
.dropdown-menu::before {
  content: ''; position: absolute; top: -6px; left: 0; right: 0; height: 6px;
}
.dropdown-menu-scroll { max-height: 320px; overflow-y: auto; }
.dropdown-menu-scroll::-webkit-scrollbar { width: 4px; }
.dropdown-menu-scroll::-webkit-scrollbar-track { background: transparent; }
.dropdown-menu-scroll::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }
.dropdown-item {
  display: block; padding: 0.45rem 0.7rem; font-size: 0.8rem; color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: all var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.3rem 0; }
.dropdown-all { color: var(--accent); font-weight: 500; }

/* Nav search */
.nav-right { display: flex; align-items: center; margin-left: auto; flex-shrink: 0; }
.nav-search {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.35rem 0.7rem;
  transition: all var(--transition);
}
.nav-search-icon { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.nav-search input {
  background: none; border: none; color: var(--text);
  font-family: var(--font); font-size: 0.8rem; width: 140px; outline: none;
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; margin-left: 0.5rem; }

/* === Hero === */
.hero { text-align: center; padding: 3.5rem 0 2rem; }
.hero h1 {
  font-size: 2rem; font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; }

/* === Search box === */
.search-box { position: relative; max-width: 520px; margin: 0 auto; }
.search-wrapper {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-card); border: 1px solid var(--border-hover);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  transition: all var(--transition);
}
.search-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-wrapper input {
  flex: 1; background: none; border: none; color: var(--text);
  font-family: var(--font); font-size: 0.95rem; outline: none; min-width: 0;
}
.search-wrapper input::placeholder { color: var(--text-muted); }
.search-hint {
  font-size: 0.65rem; color: var(--text-muted);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 4px; padding: 0.15rem 0.45rem; flex-shrink: 0;
  font-family: var(--font);
}

/* === Suggestions dropdown === */
.suggestions {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--border-hover);
  border-radius: var(--radius); overflow: hidden; z-index: 200;
  box-shadow: var(--shadow-lg);
}
.suggestions.open { display: block; }
.suggestion-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 1rem; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border); transition: background var(--transition);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover, .suggestion-item.active { background: var(--bg-hover); }
.suggestion-title { font-size: 0.85rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-title mark { background: none; color: var(--accent); font-weight: 600; }
.suggestion-badges { display: flex; gap: 0.35rem; flex-shrink: 0; }
.suggestion-empty { padding: 0.75rem 1rem; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.suggestion-loading { padding: 0.65rem 1rem; display: flex; justify-content: center; }
.suggestion-spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === CVE Ticker === */
.cve-ticker-section {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 2rem; position: relative;
}
.cve-ticker-label {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(239, 68, 68, 0.1); border-right: 1px solid var(--border);
  padding: 0.6rem 1rem; font-size: 0.65rem; font-weight: 700;
  color: var(--red); white-space: nowrap; letter-spacing: 0.08em;
  flex-shrink: 0; z-index: 2;
}
.cve-icon { width: 14px; height: 14px; color: var(--red); flex-shrink: 0; }
.cve-ticker-wrapper {
  flex: 1; overflow: hidden; position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
}
.cve-ticker-track {
  display: flex; gap: 2rem; white-space: nowrap;
  animation: cve-scroll 60s linear infinite;
  width: max-content; padding: 0.6rem 0;
}
.cve-ticker-track:hover { animation-play-state: paused; }
.cve-ticker-item {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text-secondary); font-size: 0.78rem;
  text-decoration: none; transition: color var(--transition);
  flex-shrink: 0;
}
.cve-ticker-item:hover { color: var(--text); }
.cve-id {
  font-weight: 600; font-size: 0.72rem; padding: 0.1rem 0.45rem;
  border-radius: 4px; background: var(--accent-soft); color: var(--accent);
  flex-shrink: 0;
}
.cve-id.cve-critical { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.cve-id.cve-high { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.cve-id.cve-medium { background: rgba(167, 139, 250, 0.12); color: var(--purple); }
.cve-desc {
  max-width: 280px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 0.75rem; color: var(--text-muted);
}
@keyframes cve-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === CVE Lookup Card === */
.cve-lookup-card {
  background: var(--bg-card); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 2rem;
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.cve-lookup-header {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem;
}
.cve-lookup-icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.cve-lookup-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); background: var(--accent-soft); padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.cve-lookup-id {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  text-decoration: none;
}
.cve-lookup-id:hover { color: var(--accent); }
.badge-severity {
  font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.5rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-severity-critical { background: rgba(239,68,68,0.12); color: var(--red); }
.badge-severity-high { background: rgba(251,191,36,0.12); color: var(--amber); }
.badge-severity-medium { background: rgba(167,139,250,0.12); color: var(--purple); }
.badge-severity-low { background: rgba(34,197,94,0.12); color: #22c55e; }
.cve-lookup-desc {
  font-size: 0.875rem; line-height: 1.6; color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.cve-lookup-meta {
  display: flex; gap: 1.25rem; font-size: 0.75rem; color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.cve-lookup-refs {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.75rem; padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.cve-lookup-refs-label { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.cve-lookup-ref {
  color: var(--accent); text-decoration: none; padding: 0.1rem 0.4rem;
  background: var(--accent-soft); border-radius: 3px; font-size: 0.7rem;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-block;
}
.cve-lookup-ref:hover { text-decoration: underline; }

/* === Vulnerability Nav Tab === */
.nav-tab-vuln { display: flex; align-items: center; gap: 0.3rem; }
.vuln-nav-icon { width: 14px; height: 14px; flex-shrink: 0; }

/* === Vulnerability Lookup Page — Hero Search === */
.vuln-hero {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(60vh - 60px); text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem 0;
}
.vuln-hero-inner { max-width: 680px; width: 100%; }
.vuln-hero-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 1.25rem;
}
.vuln-hero-icon svg { width: 28px; height: 28px; }
.vuln-hero-title {
  font-size: 1.75rem; font-weight: 800; color: var(--text);
  margin-bottom: 0.5rem; letter-spacing: -0.02em;
}
.vuln-hero-subtitle {
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto;
}

/* Hero compact mode (after search) */
.vuln-hero-compact {
  min-height: unset; padding: 1rem 0;
}
.vuln-hero-compact .vuln-hero-icon,
.vuln-hero-compact .vuln-hero-title,
.vuln-hero-compact .vuln-hero-subtitle {
  display: none;
}

/* Search box */
.vuln-search-box { position: relative; max-width: 600px; margin: 0 auto; }
.vuln-search-wrapper {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1.15rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.vuln-search-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md);
}
.vuln-search-icon { width: 22px; height: 22px; color: var(--text-muted); flex-shrink: 0; }
.vuln-search-wrapper input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 1.05rem; font-family: var(--font); outline: none;
  letter-spacing: 0.02em;
}
.vuln-search-wrapper input::placeholder { color: var(--text-muted); }
.vuln-search-btn {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: var(--radius-xs); padding: 0.45rem 0.7rem;
  cursor: pointer; display: flex; align-items: center;
  transition: all var(--transition); opacity: 1;
}
.vuln-search-btn:disabled { opacity: 0.3; cursor: default; }
.vuln-search-btn:not(:disabled):hover { transform: scale(1.08); }
.vuln-search-btn svg { width: 18px; height: 18px; }
.vuln-search-hint {
  margin-top: 0.75rem; font-size: 0.78rem; color: var(--text-muted);
}
.vuln-search-hint code {
  background: var(--bg-elevated); padding: 0.12rem 0.35rem;
  border-radius: 3px; font-size: 0.72rem;
}
.vuln-hero-compact .vuln-search-hint { display: none; }

/* Suggestions dropdown */
.vuln-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg); z-index: 100;
  display: none; overflow: hidden;
}
.vuln-sug-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem; cursor: pointer; font-size: 0.8rem;
  transition: background var(--transition); color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.vuln-sug-item:last-child { border-bottom: none; }
.vuln-sug-item:hover, .vuln-sug-item:focus { background: var(--bg-hover); }
.vuln-sug-valid { color: var(--green); }
.vuln-sug-valid strong { color: var(--text); }
.vuln-sug-invalid { color: var(--red); }
.vuln-sug-hint { margin-left: auto; font-size: 0.65rem; color: var(--text-muted); }
.vuln-sug-cve { cursor: pointer; }
.vuln-sug-cve-id { font-weight: 700; color: var(--accent); font-size: 0.78rem; flex-shrink: 0; }
.vuln-sug-sev {
  font-size: 0.6rem; font-weight: 700; padding: 0.1rem 0.35rem;
  border-radius: 3px; text-transform: uppercase; flex-shrink: 0;
}
.vuln-sev-critical { background: rgba(239,68,68,0.12); color: var(--red); }
.vuln-sev-high { background: rgba(251,191,36,0.12); color: var(--amber); }
.vuln-sev-medium { background: rgba(167,139,250,0.12); color: var(--purple); }
.vuln-sev-low { background: rgba(34,197,94,0.12); color: #22c55e; }
.vuln-sug-desc {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.72rem; color: var(--text-muted);
}

/* Loading */
.vuln-loading {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; padding: 3rem 0; color: var(--text-muted);
}
.vuln-spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: vuln-spin 0.8s linear infinite;
}
@keyframes vuln-spin { to { transform: rotate(360deg); } }

/* Error */
.vuln-error {
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius); padding: 1rem 1.5rem;
  color: var(--red); text-align: center; margin-bottom: 1.5rem;
}

/* Panels */
.vuln-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.vuln-panel-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
  padding-bottom: 0.65rem; border-bottom: 1px solid var(--border);
}
.vuln-panel-title svg { color: var(--accent); flex-shrink: 0; }

/* Cards */
.vuln-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.vuln-card-title {
  font-size: 0.85rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
}

/* Header card (CVE overview) */
.vuln-header-card { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.vuln-header-top { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.vuln-header-id { font-size: 1.4rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.vuln-header-id:hover { color: var(--accent); }
.vuln-severity-badge {
  font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.7rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.vuln-severity-critical { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.vuln-severity-high { background: rgba(251,191,36,0.15); color: var(--amber); border: 1px solid rgba(251,191,36,0.3); }
.vuln-severity-medium { background: rgba(167,139,250,0.15); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }
.vuln-severity-low { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.vuln-header-desc { font-size: 0.875rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 0.75rem; }
.vuln-header-meta {
  display: flex; gap: 1.25rem; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem;
}
.vuln-header-meta strong { color: var(--text-secondary); font-weight: 600; }
.vuln-vector code {
  background: var(--bg-elevated); padding: 0.15rem 0.4rem;
  border-radius: 3px; font-size: 0.68rem;
}
.vuln-weaknesses { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.vuln-cwe-badge {
  font-size: 0.65rem; font-weight: 600; padding: 0.15rem 0.45rem;
  border-radius: 3px; background: rgba(167,139,250,0.1); color: var(--purple);
}

/* === Exploitation & PoC Status Grid === */
.vuln-status-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.vuln-status-card {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 1rem 1.15rem; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.vuln-status-icon {
  flex-shrink: 0; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.vuln-status-danger { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); }
.vuln-status-danger .vuln-status-icon { background: rgba(239,68,68,0.15); color: var(--red); }
.vuln-status-warn { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); }
.vuln-status-warn .vuln-status-icon { background: rgba(251,191,36,0.15); color: var(--amber); }
.vuln-status-safe { background: rgba(34,197,94,0.06); border: 1px solid rgba(34,197,94,0.12); }
.vuln-status-safe .vuln-status-icon { background: rgba(34,197,94,0.12); color: var(--green); }
.vuln-status-neutral { background: var(--bg-elevated); border: 1px solid var(--border); }
.vuln-status-neutral .vuln-status-icon { background: var(--bg-hover); color: var(--text-muted); }
.vuln-status-text { flex: 1; min-width: 0; }
.vuln-status-label {
  display: block; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); margin-bottom: 0.2rem;
}
.vuln-status-value { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); }
.vuln-status-danger .vuln-status-value { color: var(--red); }
.vuln-status-warn .vuln-status-value { color: var(--amber); }
.vuln-status-safe .vuln-status-value { color: var(--green); }

/* CISA KEV card */
.vuln-cisa-card { border-left: 3px solid var(--red); }
.vuln-cisa-title { color: var(--red); }
.vuln-cisa-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem; margin-bottom: 0.85rem;
}
.vuln-cisa-field {}
.vuln-cisa-key {
  display: block; font-size: 0.62rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.15rem;
}
.vuln-cisa-val { display: block; font-size: 0.82rem; color: var(--text); font-weight: 500; }
.vuln-cisa-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }
.vuln-cisa-action {
  font-size: 0.8rem; color: var(--amber); margin-top: 0.65rem;
  padding: 0.6rem 0.8rem; background: rgba(251,191,36,0.06);
  border-radius: var(--radius-xs); border: 1px solid rgba(251,191,36,0.12);
}

/* Source cards */
.vuln-subsection-title {
  font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
  margin: 1rem 0 0.5rem;
}
.vuln-source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; }
.vuln-source-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.85rem 1rem;
  transition: all var(--transition);
}
.vuln-source-found { border-left: 3px solid var(--green); }
.vuln-source-miss { border-left: 3px solid var(--text-muted); opacity: 0.55; }
.vuln-source-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.vuln-source-name-row { display: flex; align-items: center; gap: 0.4rem; }
.vuln-source-name-row svg { color: var(--text-muted); }
.vuln-source-found .vuln-source-name-row svg { color: var(--accent); }
.vuln-source-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.vuln-source-badge {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 0.15rem 0.4rem; border-radius: 3px;
}
.vuln-badge-found { background: rgba(34,197,94,0.12); color: var(--green); }
.vuln-badge-miss { background: var(--bg-hover); color: var(--text-muted); }
.vuln-source-detail {
  font-size: 0.75rem; color: var(--text-secondary); line-height: 1.45;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.vuln-source-id {
  display: inline-block; font-size: 0.68rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 0.1rem 0.4rem;
  border-radius: 3px; margin-top: 0.35rem; text-decoration: none;
}

/* Affected packages */
.vuln-affected-item {
  padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.8rem;
}
.vuln-affected-item:last-child { border-bottom: none; }
.vuln-affected-item code { font-size: 0.75rem; color: var(--accent); }

/* References */
.vuln-ref-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background var(--transition);
}
.vuln-ref-item:last-child { border-bottom: none; }
.vuln-ref-item:hover { background: var(--bg-hover); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: var(--radius-xs); }
.vuln-ref-source {
  font-size: 0.68rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 0.12rem 0.45rem;
  border-radius: 3px; flex-shrink: 0; min-width: 60px; text-align: center;
}
.vuln-ref-url {
  font-size: 0.72rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* External links grid */
.vuln-panel-links { background: transparent; border: none; padding: 0; }
.vuln-panel-links .vuln-panel-title {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.5rem; margin-bottom: 0.75rem;
}
.vuln-link-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.5rem;
}
.vuln-ext-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.35rem; padding: 0.5rem 0.7rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xs); text-decoration: none;
  transition: all var(--transition); font-size: 0.75rem;
}
.vuln-ext-link:hover { border-color: var(--accent); background: var(--bg-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.vuln-ext-name { color: var(--text); font-weight: 500; }
.vuln-ext-link svg { color: var(--text-muted); flex-shrink: 0; }
.vuln-link-primary { border-left: 2px solid var(--accent); }
.vuln-link-vendor { border-left: 2px solid var(--purple); }
.vuln-link-exploit { border-left: 2px solid var(--red); }
.vuln-link-cloud { border-left: 2px solid #06b6d4; }
.vuln-link-zeroday { border-left: 2px solid var(--amber); }
.vuln-link-exploitation { border-left: 2px solid var(--red); }
.vuln-link-poc { border-left: 2px solid var(--amber); }
.vuln-link-community { border-left: 2px solid var(--green); }
.vuln-link-bugbounty { border-left: 2px solid var(--green); }

/* === Copy CVE Button === */
.vuln-copy-btn {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 0.3rem;
  cursor: pointer; display: inline-flex; align-items: center;
  color: var(--text-muted); transition: all var(--transition);
}
.vuln-copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.vuln-copy-btn .vuln-copy-check { display: none; }
.vuln-copy-btn.vuln-copied svg:first-child { display: none; }
.vuln-copy-btn.vuln-copied .vuln-copy-check { display: block; color: var(--green); }

/* === Search History Chips === */
.vuln-history {
  display: flex; align-items: center; gap: 0.4rem;
  flex-wrap: wrap; margin-top: 0.75rem; justify-content: center;
}
.vuln-history-label {
  font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.vuln-history-chip {
  font-size: 0.68rem; font-weight: 600; font-family: var(--font);
  padding: 0.2rem 0.55rem; border-radius: 12px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition);
}
.vuln-history-chip:hover { border-color: var(--accent); color: var(--accent); }
.vuln-hist-critical { border-color: rgba(239,68,68,0.3); color: var(--red); }
.vuln-hist-high { border-color: rgba(251,191,36,0.3); color: var(--amber); }
.vuln-hist-medium { border-color: rgba(167,139,250,0.3); color: var(--purple); }
.vuln-hist-low { border-color: rgba(34,197,94,0.3); color: #22c55e; }

/* === Recent CVEs Section === */
.vuln-recent-section { max-width: 900px; margin: 0 auto 2rem; }
.vuln-recent-header { margin-bottom: 0.75rem; }
.vuln-recent-title {
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 0.5rem;
}
.vuln-recent-title svg { color: var(--accent); }
.vuln-recent-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.6rem;
}
.vuln-recent-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.85rem 1rem;
  cursor: pointer; transition: all var(--transition);
}
.vuln-recent-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.vuln-recent-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.4rem;
}
.vuln-recent-card-id { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.vuln-recent-sev { font-size: 0.55rem; padding: 0.1rem 0.3rem; }
.vuln-recent-card-desc {
  font-size: 0.72rem; color: var(--text-muted); line-height: 1.45;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.vuln-recent-loading {
  grid-column: 1 / -1; text-align: center;
  font-size: 0.8rem; color: var(--text-muted); padding: 2rem;
}
.vuln-recent-empty {
  grid-column: 1 / -1; text-align: center;
  font-size: 0.8rem; color: var(--text-muted); padding: 1rem;
}

/* === Loading source chips === */
.vuln-loading-sources {
  display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center;
  margin-top: 0.25rem;
}
.vuln-loading-chip {
  font-size: 0.62rem; font-weight: 600; padding: 0.15rem 0.5rem;
  border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-muted); animation: vuln-chip-pulse 1.5s ease-in-out infinite;
}
.vuln-loading-chip:nth-child(2) { animation-delay: 0.2s; }
.vuln-loading-chip:nth-child(3) { animation-delay: 0.4s; }
.vuln-loading-chip:nth-child(4) { animation-delay: 0.6s; }
.vuln-loading-chip:nth-child(5) { animation-delay: 0.8s; }
@keyframes vuln-chip-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; border-color: var(--accent); color: var(--accent); }
}

/* === EPSS Score Card === */
.vuln-epss-card { border-color: var(--accent); }
.vuln-epss-content { display: flex; gap: 1.5rem; align-items: flex-start; }
.vuln-epss-gauge { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.vuln-epss-ring {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid var(--border);
}
.vuln-epss-high { border-color: var(--red); background: rgba(239,68,68,0.06); }
.vuln-epss-medium { border-color: var(--amber); background: rgba(251,191,36,0.06); }
.vuln-epss-low { border-color: var(--green); background: rgba(34,197,94,0.06); }
.vuln-epss-number { font-size: 1rem; font-weight: 800; color: var(--text); }
.vuln-epss-gauge-label {
  font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.vuln-epss-details { flex: 1; min-width: 0; }
.vuln-epss-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.75rem; }
.vuln-epss-stats { display: flex; gap: 1.5rem; margin-bottom: 0.75rem; }
.vuln-epss-stat {}
.vuln-epss-stat-label {
  display: block; font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.15rem;
}
.vuln-epss-stat-value { display: block; font-size: 1.15rem; font-weight: 800; color: var(--text); }
.vuln-epss-val-high { color: var(--red); }
.vuln-epss-val-medium { color: var(--amber); }
.vuln-epss-val-low { color: var(--green); }
.vuln-epss-bar-container { margin-top: 0.5rem; }
.vuln-epss-bar-bg {
  height: 6px; background: var(--bg-elevated); border-radius: 3px;
  overflow: hidden; margin-bottom: 0.3rem;
}
.vuln-epss-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.vuln-epss-bar-high { background: var(--red); }
.vuln-epss-bar-medium { background: var(--amber); }
.vuln-epss-bar-low { background: var(--green); }
.vuln-epss-bar-label { font-size: 0.65rem; color: var(--text-muted); }

/* === CVSS Vector Breakdown === */
.vuln-cvss-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}
.vuln-cvss-metric {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.7rem; background: var(--bg-elevated);
  border-radius: var(--radius-xs); border: 1px solid var(--border);
}
.vuln-cvss-metric-label {
  font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
}
.vuln-cvss-metric-value {
  font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.vuln-cvss-high { background: rgba(239,68,68,0.12); color: var(--red); }
.vuln-cvss-medium { background: rgba(251,191,36,0.12); color: var(--amber); }
.vuln-cvss-low { background: rgba(34,197,94,0.1); color: var(--green); }

/* === Threat Intelligence Panel === */
.vuln-panel-threat { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(251,191,36,0.1); }
.vuln-panel-threat .vuln-panel-title svg { color: var(--amber); }

/* Stats bar */
.threat-stats-bar {
  display: flex; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem 1rem; background: var(--bg-elevated);
  border-radius: var(--radius-sm); margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.threat-stat-item {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding-right: 1rem; border-right: 1px solid var(--border);
}
.threat-stat-item:last-child { border-right: none; padding-right: 0; }
.threat-stat-number {
  font-size: 1.2rem; font-weight: 800; color: var(--text);
  line-height: 1.1;
}
.threat-stat-vulnname { color: var(--amber); font-size: 1rem; }
.threat-stat-label {
  font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.threat-stat-name { order: -1; }

/* Threat Actor cards */
.threat-actor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.6rem; margin-bottom: 1.25rem;
}
.threat-actor-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-left: 3px solid var(--red); border-radius: var(--radius-sm);
  padding: 0.8rem 1rem; transition: all var(--transition);
}
.threat-actor-card:hover { border-left-color: var(--amber); box-shadow: var(--shadow-sm); }
.threat-actor-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.3rem;
}
.threat-actor-name { font-size: 0.88rem; font-weight: 800; color: var(--text); }
.threat-actor-origin {
  font-size: 0.62rem; font-weight: 700; padding: 0.15rem 0.45rem;
  border-radius: 3px; background: var(--bg-hover); color: var(--text-secondary);
  white-space: nowrap;
}
.threat-actor-aliases {
  font-size: 0.68rem; color: var(--text-muted); font-style: italic;
  margin-bottom: 0.35rem;
}
.threat-actor-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.threat-actor-motiv {
  font-size: 0.6rem; font-weight: 700; padding: 0.12rem 0.4rem;
  border-radius: 3px; text-transform: uppercase; letter-spacing: 0.03em;
}
.threat-motiv-financial { background: rgba(239,68,68,0.1); color: var(--red); }
.threat-motiv-espionage { background: rgba(167,139,250,0.12); color: var(--purple); }
.threat-motiv-preposition { background: rgba(251,191,36,0.12); color: var(--amber); }
.threat-actor-seen { font-size: 0.62rem; color: var(--text-muted); }

/* Industry Sector Heatmap */
.threat-heatmap-legend {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 0.6rem; font-size: 0.65rem; color: var(--text-muted);
}
.threat-legend-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.threat-legend-item { display: flex; align-items: center; gap: 0.2rem; }
.threat-heat-swatch {
  width: 14px; height: 14px; border-radius: 2px;
  display: inline-block; border: 1px solid rgba(255,255,255,0.05);
}
.threat-heatmap-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 4px; margin-bottom: 1.25rem;
}
.threat-heat-cell {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.65rem; border-radius: var(--radius-xs);
  transition: all var(--transition);
}
.threat-heat-sector { font-size: 0.72rem; font-weight: 600; }
.threat-heat-level { font-size: 0.6rem; font-weight: 700; opacity: 0.7; }

/* Heatmap levels */
.threat-heat-0 { background: var(--bg-elevated); color: var(--text-muted); }
.threat-heat-1 { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.15); }
.threat-heat-2 { background: rgba(251,191,36,0.08); color: var(--amber); border: 1px solid rgba(251,191,36,0.15); }
.threat-heat-3 { background: rgba(251,146,60,0.12); color: #fb923c; border: 1px solid rgba(251,146,60,0.2); }
.threat-heat-4 { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.threat-heat-5 { background: rgba(239,68,68,0.18); color: var(--red); border: 1px solid rgba(239,68,68,0.3); font-weight: 700; }

/* Swatch colors (for legend) */
.threat-heat-bg-0 { background: var(--bg-elevated); border-color: var(--border); }
.threat-heat-bg-1 { background: rgba(34,197,94,0.3); border-color: rgba(34,197,94,0.4); }
.threat-heat-bg-2 { background: rgba(251,191,36,0.35); border-color: rgba(251,191,36,0.5); }
.threat-heat-bg-3 { background: rgba(251,146,60,0.4); border-color: rgba(251,146,60,0.55); }
.threat-heat-bg-4 { background: rgba(239,68,68,0.35); border-color: rgba(239,68,68,0.5); }
.threat-heat-bg-5 { background: rgba(239,68,68,0.55); border-color: rgba(239,68,68,0.7); }

/* Incident cards */
.threat-incidents-list {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.threat-incident-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  border-left: 3px solid var(--text-muted);
}
.threat-inc-breach { border-left-color: var(--red); }
.threat-inc-mass { border-left-color: var(--amber); }
.threat-inc-espionage { border-left-color: var(--purple); }
.threat-inc-other { border-left-color: var(--accent); }
.threat-inc-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.3rem;
}
.threat-inc-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.threat-inc-date {
  font-size: 0.62rem; font-weight: 700; padding: 0.1rem 0.4rem;
  border-radius: 3px; background: var(--bg-hover); color: var(--text-muted);
  white-space: nowrap;
}
.threat-inc-type {
  display: inline-block; font-size: 0.6rem; font-weight: 700;
  padding: 0.1rem 0.4rem; border-radius: 3px;
  background: rgba(167,139,250,0.1); color: var(--purple);
  text-transform: uppercase; letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}
.threat-inc-impact { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }

@media (max-width: 768px) {
  .vuln-hero { min-height: calc(50vh - 60px); padding: 1.5rem 0; }
  .vuln-hero-title { font-size: 1.3rem; }
  .vuln-hero-subtitle { font-size: 0.82rem; }
  .vuln-search-wrapper { padding: 0.7rem 0.85rem; }
  .vuln-search-wrapper input { font-size: 0.92rem; }
  .vuln-link-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .vuln-status-grid { grid-template-columns: 1fr; }
  .vuln-source-grid { grid-template-columns: 1fr; }
  .vuln-header-id { font-size: 1.1rem; }
  .vuln-panel { padding: 1rem; }
  .vuln-epss-content { flex-direction: column; align-items: stretch; }
  .vuln-epss-gauge { flex-direction: row; gap: 0.75rem; }
  .vuln-epss-stats { flex-direction: column; gap: 0.5rem; }
  .vuln-cvss-grid { grid-template-columns: 1fr 1fr; }
  .vuln-recent-grid { grid-template-columns: 1fr; }
  .threat-stats-bar { gap: 0.5rem; }
  .threat-stat-item { padding-right: 0.5rem; }
  .threat-actor-grid { grid-template-columns: 1fr; }
  .threat-heatmap-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .rfd-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .rfd-stat { padding: 0.6rem 0.75rem; }
  .rfd-stat-num { font-size: 1.15rem; }
  .rfd-charts-row { grid-template-columns: 1fr; }
  .rfd-mid-row { grid-template-columns: 1fr; }
  .rfd-table-filters { flex-direction: column; align-items: stretch; }
  .rf-table { font-size: 0.75rem; }
  .rf-table th, .rf-table td { padding: 0.4rem 0.55rem; }
}

/* === Stats row === */
.stats-row { display: flex; gap: 0.625rem; flex-wrap: wrap; margin-bottom: 2.5rem; justify-content: center; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1.5rem; text-align: center; min-width: 115px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-1px); text-decoration: none; }
.stat-card:hover::before { opacity: 1; }
.stat-card strong { display: block; font-size: 1.4rem; color: var(--accent); position: relative; font-weight: 700; letter-spacing: -0.02em; }
.stat-card span { font-size: 0.75rem; color: var(--text-muted); position: relative; font-weight: 500; }

/* === Vendor bar === */
.vendor-bar { margin-bottom: 2.5rem; }
.vendor-bar h2 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem; }
.vendor-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* === Badges === */
.badge {
  display: inline-flex; align-items: center; padding: 0.2rem 0.55rem;
  border-radius: 100px; font-size: 0.7rem; font-weight: 500; white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge-source { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }
.badge-category { background: rgba(167, 139, 250, 0.1); color: var(--purple); }
.badge-vendor { background: var(--accent-soft); color: var(--accent); transition: all var(--transition); }
.badge-vendor:hover { text-decoration: none; background: var(--accent-medium); }

/* === Section headers === */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.section-header h2 {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin: 0;
}
.section-header a { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.section-header a:hover { color: var(--accent); }

/* === Article list === */
.article-list { display: flex; flex-direction: column; gap: 0.5rem; }
.article-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  transition: all var(--transition);
}
.article-card:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.article-meta time { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; font-weight: 500; }
.article-card h3 { font-size: 0.95rem; margin-bottom: 0.35rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.article-card h3 a { color: var(--text); display: inline; }
.article-card h3 a:hover { color: var(--accent); text-decoration: none; }
.ext-icon { width: 11px; height: 11px; display: inline; vertical-align: middle; margin-left: 4px; opacity: 0; transition: opacity var(--transition); flex-shrink: 0; color: var(--text-muted); }
.article-card h3 a:hover .ext-icon { opacity: 1; }
.badge-new {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem; border-radius: 3px;
  background: rgba(239, 68, 68, 0.15); color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: new-pulse 2s ease-in-out infinite;
  font-family: var(--font-mono);
}
@keyframes new-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.summary { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }
.read-more { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; }
.read-more a { color: var(--text-secondary); font-weight: 500; }
.read-more a:hover { color: var(--accent); }

/* === Pagination === */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.25rem; margin-top: 1.5rem; flex-wrap: wrap; }
.page-btn, .page-num {
  padding: 0.4rem 0.75rem; border-radius: var(--radius-xs); font-size: 0.8rem;
  border: 1px solid var(--border); color: var(--text-muted);
  background: var(--bg-card); transition: all var(--transition); text-decoration: none;
  font-weight: 500;
}
.page-btn:hover, .page-num:hover { border-color: var(--border-hover); color: var(--text); text-decoration: none; background: var(--bg-elevated); }
.page-num.active { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.page-dots { color: var(--text-muted); font-size: 0.8rem; padding: 0 0.25rem; }

/* === Grid cards (vendors, categories, sectors) === */
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.625rem; }
.vendor-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1rem; text-align: center;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.vendor-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.vendor-card:hover { border-color: var(--border-hover); text-decoration: none; transform: translateY(-1px); }
.vendor-card:hover::before { opacity: 1; }
.vendor-card strong { display: block; color: var(--text); margin-bottom: 0.3rem; font-weight: 600; font-size: 0.9rem; position: relative; }
.vendor-card span { font-size: 0.75rem; color: var(--text-muted); position: relative; }

/* === Data table === */
.data-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.data-table th, .data-table td {
  padding: 0.75rem 0.85rem; text-align: left;
  border-bottom: 1px solid var(--border); font-size: 0.85rem;
}
.data-table th {
  color: var(--text-muted); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.data-table tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg-card); }
.status-ok { color: var(--green); font-weight: 500; }
.status-err { color: var(--red); font-weight: 500; }

/* === Alert messages === */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 1.25rem; }
.alert-ok { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.2); color: var(--green); }
.alert-err { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); color: var(--red); }
.alert-warn { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.2); color: var(--amber); }
.status-pending { color: var(--amber); }
.btn-link { background: none; border: none; color: var(--accent); font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; font-family: var(--font); }
.btn-link:hover { color: #67e8f9; }

/* === Alerts nav === */
.nav-tab-alert { gap: 0.35rem; }
.alert-bell { width: 14px; height: 14px; }

/* === Alerts forms === */
.alerts-form { max-width: 680px; }
.form-group { margin-bottom: 1.5rem; }
.form-group > label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.form-group input[type="email"],
.form-group input[type="text"],
.form-input {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); padding: 0.6rem 0.85rem;
  font-family: var(--font); font-size: 0.85rem; outline: none;
  transition: all var(--transition);
}
.form-group input:focus, .form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.form-select {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); padding: 0.6rem 0.85rem;
  font-family: var(--font); font-size: 0.85rem; outline: none;
  transition: all var(--transition);
}
.form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.35rem; }
.checkbox-label {
  display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem;
  color: var(--text-secondary); cursor: pointer; padding: 0.35rem 0;
  transition: color var(--transition);
}
.checkbox-label:hover { color: var(--text); }
.checkbox-label input[type="checkbox"] { accent-color: var(--accent); }
.newsletter-toggle { margin-top: 0.5rem; font-size: 0.85rem; color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55rem 1.25rem; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.82rem; font-weight: 600;
  border: none; cursor: pointer; transition: all var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { background: #06b6d4; box-shadow: 0 4px 12px rgba(34, 211, 238, 0.25); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25); }

/* === Manage alerts === */
.rules-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.5rem; }
.rule-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.65rem 0.9rem;
  transition: all var(--transition);
}
.rule-card:hover { border-color: var(--border-hover); }
.rule-value { flex: 1; font-size: 0.85rem; }
.rule-delete { margin-left: auto; }
.btn-icon {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-xs);
  color: var(--text-muted); font-size: 1.1rem; line-height: 1;
  padding: 0.2rem 0.5rem; cursor: pointer; transition: all var(--transition);
}
.btn-icon:hover { color: var(--red); border-color: var(--red); }

.add-rule-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.add-rule-form .form-input { flex: 1; min-width: 200px; }
.alerts-actions { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.text-muted { color: var(--text-muted); }

/* === Page headers === */
.page-header { margin-bottom: 2rem; padding-top: 1.5rem; }
.page-header h1 {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.25rem;
}
.page-header p { color: var(--text-muted); font-size: 0.9rem; }

/* === Misc === */
.empty { color: var(--text-muted); padding: 3rem 0; text-align: center; font-size: 0.9rem; }
h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.25rem; }
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin: 1.75rem 0 0.75rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
section { margin-bottom: 2.5rem; }

/* === Footer === */
.footer {
  border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 4rem;
  text-align: center; color: var(--text-muted); font-size: 0.78rem;
}
.footer-legal {
  margin-top: 0.75rem; font-size: 0.7rem; color: var(--text-muted);
  line-height: 1.6; max-width: 560px; margin-left: auto; margin-right: auto; opacity: 0.7;
}
.footer-legal a { color: var(--accent); }

/* === Scrollbar global === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === Selection === */
::selection { background: var(--accent-medium); color: var(--text); }

/* === Mobile === */
@media (max-width: 768px) {
  .nav-tabs {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(9, 9, 11, 0.95); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem; z-index: 200;
  }
  .nav-tabs.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-right { display: flex; align-items: center; margin-left: auto; }
  .nav-search input { width: 100px; }
  .nav-dropdown .dropdown-menu { position: static; box-shadow: none; border: none; margin: 0; padding-left: 1rem; background: transparent; }
  .stats-row { justify-content: flex-start; }
  .hero { padding: 2.5rem 0 1.5rem; }
  .cve-ticker-label { padding: 0.5rem 0.65rem; font-size: 0.6rem; }
  .cve-ticker-label span { display: none; }
  .cve-desc { max-width: 180px; }
  .hero h1 { font-size: 1.4rem; }
  .vendor-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .container { padding: 0 1rem; }
}

@media (max-width: 480px) {
  .stats-row { gap: 0.5rem; }
  .stat-card { min-width: 90px; padding: 0.65rem 0.75rem; }
  .stat-card strong { font-size: 1.1rem; }
  .nav-search { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cve-ticker-track { animation: none; }
  .cve-ticker-track:hover { animation: none; }
  @keyframes live-pulse { 0%, 100% { opacity: 1; } }
  .badge-new { animation: none; }
  main.container { animation: none; }
}

/* === Theme Toggle === */
.theme-toggle {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); cursor: pointer; padding: 0.4rem 0.5rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); margin-right: 0.5rem; flex-shrink: 0;
  width: 32px; height: 32px;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--bg-hover); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
[data-theme="dark"] .theme-icon-light { display: none !important; }
[data-theme="light"] .theme-icon-dark { display: none !important; }
[data-theme="dark"] .theme-icon-dark { display: block; }
[data-theme="light"] .theme-icon-light { display: block; }

/* === Trending Page === */
.trending-controls { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.trending-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); }
.trending-btn:hover { border-color: var(--border-hover); color: var(--text); }
.trending-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.trending-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.trending-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem;
  overflow: hidden;
}
.trending-section h2 {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin: 0 0 1rem;
}
.chart-container { position: relative; height: 280px; width: 100%; }
.chart-container-sm { height: 200px; }
@media (max-width: 768px) {
  .trending-grid { grid-template-columns: 1fr; }
}

/* === MITRE Badges === */
.badge-mitre {
  background: rgba(239, 68, 68, 0.1); color: var(--red);
  font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.55rem;
  border-radius: 4px; text-decoration: none; transition: all var(--transition);
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem;
}
.badge-mitre:hover { background: rgba(239, 68, 68, 0.2); text-decoration: none; }
.badge-mitre-active { background: var(--red); color: #fff; }
.badge-mitre-more { background: rgba(239, 68, 68, 0.06); color: var(--red); font-size: 0.65rem; padding: 0.15rem 0.35rem; border-radius: 4px; }
.mitre-tech-name { font-weight: 400; margin-left: 0.25rem; }

/* === IOC Badges === */
.badge-ioc { background: rgba(251, 191, 36, 0.1); color: var(--amber); font-size: 0.65rem; font-weight: 600; padding: 0.15rem 0.45rem; border-radius: 4px; text-decoration: none; transition: all var(--transition); }
.badge-ioc:hover { background: rgba(251, 191, 36, 0.2); text-decoration: none; }
.badge-ioc-cve { background: rgba(239, 68, 68, 0.1); color: var(--red); font-size: 0.68rem; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: 4px; }
.badge-ioc-ip { background: rgba(34, 197, 94, 0.1); color: var(--green); font-size: 0.68rem; padding: 0.1rem 0.4rem; border-radius: 4px; font-family: monospace; }
.badge-ioc-hash { background: rgba(167, 139, 250, 0.1); color: var(--purple); font-size: 0.68rem; padding: 0.1rem 0.4rem; border-radius: 4px; font-family: monospace; cursor: help; }
.badge-ioc-domain { background: rgba(96, 165, 250, 0.1); color: #60a5fa; font-size: 0.68rem; padding: 0.1rem 0.4rem; border-radius: 4px; font-family: monospace; }
.badge-ioc-more { background: var(--bg-elevated); color: var(--text-muted); font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: 4px; }

/* === Article Indicators Row === */
.article-indicators { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; align-items: center; }

/* === IOC Details (IOC page) === */
.ioc-details { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.ioc-group { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.ioc-label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); min-width: 55px; }

/* === MITRE Page === */
.mitre-tactics { display: flex; flex-direction: column; gap: 1.25rem; }
.mitre-tactic-group { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.mitre-tactic-name { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.65rem; }
.mitre-technique-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mitre-active-filter { background: var(--bg-card); border: 1px solid var(--accent); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2rem; }
.mitre-filter-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mitre-filter-header h2 { font-size: 1.1rem; margin: 0; color: var(--text); }
.mitre-result-count { font-size: 0.85rem; color: var(--text-muted); margin: 0.35rem 0 1rem; }
.btn-sm { font-size: 0.75rem; padding: 0.3rem 0.7rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; transition: all var(--transition); }
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }

/* === Light theme IOC/MITRE overrides === */
[data-theme="light"] .badge-mitre { background: rgba(220, 38, 38, 0.08); color: #dc2626; }
[data-theme="light"] .badge-ioc { background: rgba(217, 119, 6, 0.08); color: #d97706; }
[data-theme="light"] .badge-ioc-cve { background: rgba(220, 38, 38, 0.08); color: #dc2626; }
[data-theme="light"] .badge-ioc-ip { background: rgba(22, 163, 74, 0.08); color: #16a34a; }
[data-theme="light"] .badge-ioc-hash { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }
[data-theme="light"] .badge-ioc-domain { background: rgba(37, 99, 235, 0.08); color: #2563eb; }

/* === Health dashboard extras === */
.health-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--bg-hover); min-width: 80px; }
.health-bar-ok { background: var(--green); }
.health-bar-fail { background: var(--red); }
.health-pct { font-size: 0.75rem; font-weight: 600; margin-left: 0.5rem; }

/* === Threat Heatmap === */
.heatmap-wrapper {
  overflow-x: auto; overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.heatmap-table {
  border-collapse: separate; border-spacing: 2px;
  width: max-content; min-width: 100%;
}
.heatmap-corner {
  position: sticky; left: 0; z-index: 3;
  background: var(--bg-card); min-width: 140px;
}
.heatmap-col-header {
  vertical-align: bottom; padding: 0 0.15rem;
  height: 130px; position: relative;
}
.heatmap-col-label {
  writing-mode: vertical-rl; text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.68rem; font-weight: 500; color: var(--text-muted);
  white-space: nowrap; padding: 0.35rem 0.15rem;
  max-height: 120px; overflow: hidden; text-overflow: ellipsis;
}
.heatmap-row-header {
  position: sticky; left: 0; z-index: 2;
  background: var(--bg-card);
  font-size: 0.72rem; font-weight: 500; color: var(--text-secondary);
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  white-space: nowrap; text-align: right;
  min-width: 140px; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis;
  border-right: 1px solid var(--border);
}
.heatmap-cell {
  width: 34px; height: 34px; min-width: 34px;
  text-align: center; vertical-align: middle;
  border-radius: 4px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  position: relative;
}
.heatmap-cell-active { cursor: pointer; }
.heatmap-cell-active:hover {
  border-color: var(--text);
  transform: scale(1.15);
  z-index: 10;
  box-shadow: 0 0 8px rgba(34,211,238,0.3);
}
.heatmap-cell-num {
  font-size: 0.6rem; font-weight: 700; color: var(--text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Tooltip */
.heatmap-tooltip {
  display: none; position: fixed; z-index: 9999;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem; color: var(--text);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  max-width: 280px;
  line-height: 1.5;
}

/* Legend */
.heatmap-legend {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem; justify-content: flex-end;
}
.heatmap-legend-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }
.heatmap-legend-bar {
  width: 160px; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, rgba(34,211,238,0.15), rgba(34,211,238,0.5), rgba(251,191,36,0.6), rgba(239,68,68,0.9));
}

/* Entity lists (top malware / actors) */
.heatmap-entity-list { display: flex; flex-direction: column; gap: 0.35rem; }
.heatmap-entity-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--border);
}
.heatmap-entity-row:last-child { border-bottom: none; }
.heatmap-entity-rank {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  min-width: 20px; text-align: right;
}
.heatmap-entity-name {
  font-size: 0.8rem; font-weight: 500; color: var(--text);
  min-width: 120px; flex-shrink: 0;
}
.heatmap-entity-name:hover { color: var(--accent); text-decoration: none; }
.heatmap-entity-bar-wrap {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--bg-hover); overflow: hidden;
}
.heatmap-entity-bar { height: 100%; border-radius: 3px; min-width: 2px; transition: width 0.4s ease; }
.heatmap-bar-malware { background: linear-gradient(90deg, var(--accent), var(--red)); }
.heatmap-bar-actor { background: linear-gradient(90deg, var(--purple), var(--red)); }
.heatmap-entity-count { font-size: 0.72rem; font-weight: 600; color: var(--accent); min-width: 28px; text-align: right; }

@media (max-width: 768px) {
  .heatmap-row-header { min-width: 110px; max-width: 130px; font-size: 0.65rem; padding: 0.25rem 0.5rem; }
  .heatmap-col-label { font-size: 0.6rem; }
  .heatmap-cell { width: 28px; height: 28px; min-width: 28px; }
  .heatmap-cell-num { font-size: 0.55rem; }
  .heatmap-col-header { height: 100px; }
}


/* =============================================
   IP & Domain Reputation Lookup  (ir-*)
   ============================================= */

/* Hero */
.ir-hero { display:flex; align-items:center; justify-content:center; min-height:55vh; padding:3rem 1rem; text-align:center; transition:min-height .4s ease, padding .4s ease; }
.ir-hero.ir-hero-compact { min-height:auto; padding:1.25rem 1rem; }
.ir-hero-inner { width:100%; max-width:600px; margin:0 auto; }
.ir-hero-title { font-size:1.9rem; font-weight:700; letter-spacing:-0.03em; background:linear-gradient(135deg,var(--text) 0%,var(--accent) 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; margin-bottom:.4rem; }
.ir-hero-sub { color:var(--text-secondary); font-size:.9rem; margin-bottom:1.5rem; }

/* Search */
.ir-search-box { display:flex; align-items:center; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:border-color var(--transition); }
.ir-search-box:focus-within { border-color:var(--accent); }
.ir-search-icon { flex-shrink:0; margin:0 .75rem; color:var(--text-muted); }
.ir-search-box input { flex:1; background:none; border:none; outline:none; color:var(--text); font-size:.95rem; padding:.85rem 0; font-family:var(--font); }
.ir-search-box input::placeholder { color:var(--text-muted); }
.ir-search-btn { background:var(--accent); border:none; padding:0 1.1rem; min-height:48px; color:#000; cursor:pointer; display:flex; align-items:center; transition:background var(--transition); }
.ir-search-btn:hover { background:#67e8f9; }

/* History */
.ir-history { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; margin-top:.65rem; justify-content:center; }
.ir-hist-label { font-size:.75rem; color:var(--text-muted); }
.ir-hist-chip { font-size:.73rem; padding:.18rem .55rem; border-radius:99px; background:var(--bg-elevated); border:1px solid var(--border); color:var(--text-secondary); cursor:pointer; transition:all var(--transition); }
.ir-hist-chip:hover,.ir-hist-chip:focus { border-color:var(--accent); color:var(--accent); }
.ir-hist-high { border-color:rgba(239,68,68,.3); color:var(--red); }
.ir-hist-medium { border-color:rgba(251,191,36,.3); color:var(--amber); }
.ir-hist-low { border-color:rgba(167,139,250,.3); color:var(--purple); }
.ir-hist-clean { border-color:rgba(34,197,94,.3); color:var(--green); }

/* Loading */
.ir-loading { display:flex; align-items:center; gap:.75rem; padding:2.5rem 1rem; color:var(--text-secondary); font-size:.9rem; }
.ir-spinner { width:20px; height:20px; border-radius:50%; border:2px solid var(--border); border-top-color:var(--accent); animation:ir-spin .7s linear infinite; flex-shrink:0; }
@keyframes ir-spin { to { transform:rotate(360deg); } }

/* Error */
.ir-error { display:flex; align-items:center; gap:.5rem; background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.2); border-radius:var(--radius); padding:.9rem 1.1rem; color:var(--red); font-size:.88rem; margin-bottom:1rem; }

/* ── Top panel (summary + map) ── */
.ir-top { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1rem; align-items:start; }
@media(max-width:768px){ .ir-top { grid-template-columns:1fr; } }

/* Summary card */
.ir-summary { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:1.25rem; }
.ir-summary-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; margin-bottom:1rem; }
.ir-subject-host { font-size:1.05rem; font-weight:700; color:var(--text); word-break:break-all; }
.ir-subject-ip { font-size:.8rem; color:var(--text-muted); font-weight:400; }

/* Score badge */
.ir-score-badge { font-size:1.3rem; font-weight:700; padding:.3rem .7rem; border-radius:var(--radius-sm); flex-shrink:0; font-variant-numeric:tabular-nums; }
.ir-score-clean  { background:rgba(34,197,94,.12);  color:var(--green); }
.ir-score-low    { background:rgba(167,139,250,.12); color:var(--purple); }
.ir-score-medium { background:rgba(251,191,36,.12);  color:var(--amber); }
.ir-score-high   { background:rgba(239,68,68,.12);   color:var(--red); }
.ir-score-unknown{ background:var(--bg-elevated); color:var(--text-muted); }

/* Score badge (small, for network rows) */
.ir-score-sm { font-size:.75rem; font-weight:700; padding:.15rem .45rem; border-radius:4px; }

/* Risk rating bar */
.ir-rating-bar-wrap { padding:.25rem 0; }
.ir-rating-bar { position:relative; height:8px; border-radius:99px; background:linear-gradient(90deg,var(--green) 0%,var(--amber) 50%,var(--red) 100%); margin-bottom:.4rem; }
.ir-rating-marker { position:absolute; top:50%; transform:translate(-50%,-50%); width:14px; height:14px; border-radius:50%; border:2px solid var(--bg-card); transition:left .5s ease; }
.ir-marker-clean  { background:var(--green); }
.ir-marker-low    { background:var(--purple); }
.ir-marker-medium { background:var(--amber); }
.ir-marker-high   { background:var(--red); }
.ir-marker-unknown{ background:var(--text-muted); }
.ir-rating-labels { display:flex; justify-content:space-between; font-size:.72rem; color:var(--text-muted); }

/* Factor badges */
.ir-factors { display:flex; gap:.4rem; flex-wrap:wrap; }
.ir-factor { font-size:.76rem; font-weight:600; padding:.22rem .65rem; border-radius:99px; }
.ir-f-low   { background:rgba(34,197,94,.1);  border:1px solid rgba(34,197,94,.25);  color:var(--green); }
.ir-f-warn  { background:rgba(251,191,36,.1); border:1px solid rgba(251,191,36,.25); color:var(--amber); }
.ir-f-high  { background:rgba(239,68,68,.1);  border:1px solid rgba(239,68,68,.25);  color:var(--red); }
.ir-f-clean { background:rgba(34,197,94,.08); border:1px solid rgba(34,197,94,.2);   color:var(--green); }

/* Summary rows */
.ir-section { margin-top:.85rem; }
.ir-section-label { font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); font-weight:600; margin-bottom:.4rem; }
.ir-row { display:flex; align-items:baseline; gap:.5rem; margin-top:.55rem; font-size:.84rem; }
.ir-row-label { color:var(--text-muted); min-width:120px; flex-shrink:0; font-size:.82rem; }
.ir-row-val { color:var(--text); flex:1; }
.ir-muted { color:var(--text-muted); }

/* IP Network row */
.ir-network-row { display:flex; align-items:center; gap:.5rem; font-size:.83rem; padding:.3rem 0; }
.ir-net-ip { color:var(--accent); font-variant-numeric:tabular-nums; }
.ir-net-flag { font-size:1rem; }
.ir-net-org { color:var(--text-secondary); font-size:.8rem; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Certificate */
.ir-cert-valid   { color:var(--green); font-size:.84rem; }
.ir-cert-expired { color:var(--red);   font-size:.84rem; }

/* ── Map panel ── */
.ir-map-panel { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; position:relative; }
.ir-map-wrap { position:relative; width:100%; }
.ir-worldmap { display:block; width:100%; height:auto; }
.ir-map-info { position:absolute; bottom:.75rem; left:.75rem; display:flex; align-items:center; gap:.4rem; background:rgba(9,9,11,.75); border:1px solid var(--border); border-radius:var(--radius-xs); padding:.35rem .65rem; font-size:.8rem; color:var(--text); backdrop-filter:blur(6px); }
.ir-map-flag { font-size:1.1rem; }
.ir-map-loc { color:var(--text-secondary); }

/* ── Tabs ── */
.ir-tabs { display:flex; gap:.15rem; border-bottom:1px solid var(--border); margin-bottom:1rem; overflow-x:auto; scrollbar-width:none; }
.ir-tabs::-webkit-scrollbar { display:none; }
.ir-tab { background:none; border:none; padding:.6rem .9rem; font-size:.82rem; font-weight:500; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:all var(--transition); white-space:nowrap; font-family:var(--font); text-transform:uppercase; letter-spacing:.05em; }
.ir-tab:hover { color:var(--text); }
.ir-tab.ir-tab-active { color:var(--accent); border-bottom-color:var(--accent); }

/* ── Tab panel content ── */
.ir-tab-panel { padding:.25rem 0 1rem; }
.ir-panel-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1rem; }
@media(max-width:640px){ .ir-panel-grid { grid-template-columns:1fr; } }
.ir-panel-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:1.1rem; }
.ir-card-title { font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); font-weight:600; display:flex; align-items:center; gap:.4rem; margin-bottom:.8rem; }

/* KV pairs */
.ir-kv { display:flex; gap:.5rem; font-size:.83rem; padding:.25rem 0; border-bottom:1px solid var(--border); }
.ir-kv:last-child { border-bottom:none; }
.ir-kv-k { color:var(--text-muted); min-width:100px; flex-shrink:0; }
.ir-kv-v { color:var(--text); word-break:break-all; }
.ir-kv-grid { display:grid; grid-template-columns:1fr 1fr; }
.ir-kv-lg .ir-kv-k { min-width:130px; }

/* AbuseIPDB */
.ir-abuse-bar-bg { height:5px; background:var(--bg-elevated); border-radius:99px; overflow:hidden; margin-bottom:.35rem; }
.ir-abuse-bar { height:100%; border-radius:99px; transition:width .6s ease; }
.ir-abuse-clean  { background:var(--green); }
.ir-abuse-low    { background:var(--purple); }
.ir-abuse-medium { background:var(--amber); }
.ir-abuse-high   { background:var(--red); }
.ir-abuse-pct { font-size:.82rem; font-weight:600; margin-bottom:.65rem; }
.ir-text-clean  { color:var(--green); }
.ir-text-low    { color:var(--purple); }
.ir-text-medium { color:var(--amber); }
.ir-text-high   { color:var(--red); }

/* External links */
.ir-ext-wrap { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:1.1rem; }
.ir-ext-grid { display:flex; flex-wrap:wrap; gap:.4rem; }
.ir-ext-link { display:inline-flex; align-items:center; gap:.3rem; padding:.3rem .65rem; border-radius:var(--radius-xs); background:var(--bg-elevated); border:1px solid var(--border); color:var(--text-secondary); font-size:.78rem; font-weight:500; transition:all var(--transition); }
.ir-ext-link:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }

/* DNS tab */
.ir-dns-body { display:flex; flex-direction:column; gap:.75rem; }
.ir-dns-section { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.9rem 1rem; }
.ir-dns-label { font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); font-weight:600; margin-bottom:.5rem; }
.ir-dns-row { display:flex; align-items:center; gap:.75rem; padding:.25rem 0; border-bottom:1px solid var(--border); font-size:.83rem; }
.ir-dns-row:last-child { border-bottom:none; }
.ir-dns-val { color:var(--accent); font-size:.82rem; word-break:break-all; flex:1; background:none; }
.ir-dns-note { color:var(--text-muted); font-size:.78rem; flex-shrink:0; }

/* URLHaus tab */
.ir-uh-header { display:flex; align-items:baseline; gap:.4rem; margin-bottom:.75rem; }
.ir-uh-count { font-size:2rem; font-weight:700; color:var(--red); }
.ir-uh-label { font-size:.85rem; color:var(--text-secondary); }
.ir-uh-clean { display:flex; align-items:center; gap:.5rem; color:var(--green); font-size:.9rem; }
.ir-bl-row { display:flex; gap:.4rem; flex-wrap:wrap; margin-bottom:.75rem; }
.ir-bl { font-size:.75rem; padding:.2rem .55rem; border-radius:99px; }
.ir-bl-bad { background:rgba(239,68,68,.1); color:var(--red); border:1px solid rgba(239,68,68,.2); }
.ir-bl-ok  { background:rgba(34,197,94,.08); color:var(--green); border:1px solid rgba(34,197,94,.15); }
.ir-url-table { border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; }
.ir-url-row { display:flex; align-items:center; gap:.5rem; padding:.4rem .75rem; border-bottom:1px solid var(--border); font-size:.8rem; flex-wrap:wrap; }
.ir-url-row:last-child { border-bottom:none; }
.ir-url-status { padding:.13rem .4rem; border-radius:3px; font-size:.68rem; font-weight:700; text-transform:uppercase; flex-shrink:0; }
.ir-url-online  { background:rgba(239,68,68,.15); color:var(--red); }
.ir-url-offline { background:var(--bg-elevated); color:var(--text-muted); }
.ir-url-threat { color:var(--amber); font-size:.75rem; flex-shrink:0; }
.ir-url-val { color:var(--text-secondary); font-size:.75rem; word-break:break-all; flex:1; }
.ir-url-date { color:var(--text-muted); font-size:.72rem; flex-shrink:0; }

/* Related hosts tab */
.ir-rel-table { border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; }
.ir-rel-head { display:grid; grid-template-columns:1fr auto; gap:1rem; padding:.45rem .9rem; background:var(--bg-elevated); font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; }
.ir-rel-row { display:grid; grid-template-columns:1fr auto; gap:1rem; padding:.4rem .9rem; border-top:1px solid var(--border); font-size:.83rem; align-items:center; }
.ir-rel-host { color:var(--text); word-break:break-all; }
.ir-rel-ip { font-variant-numeric:tabular-nums; }

/* Notes */
.ir-note { font-size:.84rem; color:var(--text-muted); }
.ir-note code { color:var(--accent); font-size:.8rem; }

/* Cert */
.ir-cert-grid { display:flex; flex-direction:column; }

/* === Entity Pages (Threat Groups, Software, Campaigns) === */
.entity-section { margin-bottom: 2.5rem; }
.entity-section-title {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1rem; font-weight: 600; color: var(--text);
  margin-bottom: 1rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.entity-card {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  transition: all var(--transition); text-decoration: none; color: inherit;
}
.entity-card:hover {
  border-color: var(--border-hover); background: var(--bg-elevated);
  transform: translateY(-1px); box-shadow: var(--shadow-md);
  text-decoration: none; color: inherit;
}
.entity-card-auto { opacity: 0.6; }
.entity-card-auto:hover { opacity: 1; }
.entity-card-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem;
}
.entity-name {
  font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.3;
}
.entity-country {
  font-size: 0.7rem; color: var(--text-muted); background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 0.1rem 0.4rem; white-space: nowrap; flex-shrink: 0;
}
.entity-desc {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.entity-stats { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: auto; }
.stat-pill {
  font-size: 0.68rem; font-weight: 500; padding: 0.15rem 0.5rem;
  border-radius: 99px; border: 1px solid transparent;
}
.stat-total { background: var(--accent-soft); color: var(--accent); border-color: rgba(34,211,238,0.2); }
.stat-recent { background: rgba(34,197,94,0.1); color: var(--green); border-color: rgba(34,197,94,0.2); }
.stat-auto { background: var(--bg-elevated); color: var(--text-muted); border-color: var(--border); }

/* Entity type badges */
.badge-red    { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.2); font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-orange { background: rgba(251,191,36,0.12); color: var(--amber); border: 1px solid rgba(251,191,36,0.2); font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-blue   { background: rgba(167,139,250,0.12); color: var(--purple); border: 1px solid rgba(167,139,250,0.2); font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-gray   { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 600px) {
  .entity-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   Dashboard — /dashboard
   ============================================= */

/* Page header */
.dash-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; padding-top: 0.25rem;
}
.dash-page-title {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text);
}
.dash-page-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Metric Cards ── */
.iw-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.iw-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.iw-metric-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}
.iw-metric-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.6rem;
}
.iw-metric-label {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
}
.iw-metric-icon {
  width: 28px; height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.iw-metric-icon svg { width: 14px; height: 14px; stroke: var(--accent); }
.iw-metric-value {
  font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text); line-height: 1;
}
.iw-metric-sub {
  font-size: 0.72rem; color: var(--text-muted); margin-top: 0.3rem;
}

/* ── Threat Level Distribution ── */
.iw-dist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.iw-dist-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.iw-dist-title {
  font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.iw-dist-bar {
  display: flex; height: 32px; border-radius: 6px; overflow: hidden; gap: 2px;
  margin-bottom: 0.65rem;
}
.iw-dist-seg {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; min-width: 0;
  transition: opacity var(--transition);
}
.iw-dist-seg:hover { opacity: 0.85; }
.iw-dist-seg span { font-size: 0.65rem; font-weight: 700; color: #fff; line-height: 1; }
.iw-dist-seg small { font-size: 0.55rem; color: rgba(255,255,255,0.75); line-height: 1; }
.iw-seg-critical { background: #ef4444; border-radius: 4px 0 0 4px; }
.iw-seg-high     { background: #f97316; }
.iw-seg-medium   { background: #fbbf24; }
.iw-seg-low      { background: #22c55e; border-radius: 0 4px 4px 0; }
.iw-dist-legend {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
}
.iw-dist-legend span {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; color: var(--text-muted);
}

/* ── Charts Row (two donut cards) ── */
.iw-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.iw-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.iw-chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.9rem;
}
.iw-chart-title {
  font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.iw-chart-link {
  font-size: 0.72rem; color: var(--accent); text-decoration: none;
}
.iw-chart-link:hover { text-decoration: underline; }

/* Donut chart with center label */
.iw-donut-wrap {
  position: relative; width: 160px; height: 160px;
  margin: 0 auto 1rem;
}
.iw-donut-wrap canvas { width: 160px !important; height: 160px !important; }
.iw-donut-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.iw-donut-num {
  display: block; font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.03em; color: var(--text); line-height: 1;
}
.iw-donut-lbl {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase;
}

/* Chart legend */
.iw-chart-legend { display: flex; flex-direction: column; gap: 0.4rem; }
.iw-leg-row {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.75rem; color: var(--text-secondary);
}
.iw-leg-row > span:nth-child(2) { flex: 1; }
.iw-leg-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.iw-leg-count {
  font-size: 0.72rem; font-weight: 600; color: var(--text);
  margin-left: auto;
}

/* ── Bottom Row ── */
.iw-bottom-row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.iw-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.iw-table-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}

/* High-risk article list */
.iw-article-list { display: flex; flex-direction: column; gap: 0; }
.iw-article-row {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.iw-article-row:last-child { border-bottom: none; }
.iw-risk-badge {
  font-size: 0.6rem; font-weight: 700; padding: 0.15rem 0.4rem;
  border-radius: 3px; text-transform: uppercase; letter-spacing: 0.05em;
  flex-shrink: 0; white-space: nowrap;
}
.iw-article-title {
  flex: 1; font-size: 0.78rem; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; text-decoration: none;
  transition: color var(--transition);
}
.iw-article-title:hover { color: var(--accent); }
.iw-article-age {
  font-size: 0.68rem; color: var(--text-muted); flex-shrink: 0; white-space: nowrap;
}

/* Sparkline bar chart */
.iw-sparkline {
  display: flex; align-items: flex-end; gap: 3px;
  height: 60px; margin-bottom: 0.4rem;
}
.iw-spark-bar {
  flex: 1; background: var(--accent); border-radius: 2px 2px 0 0;
  min-height: 3px; opacity: 0.7; transition: opacity var(--transition);
}
.iw-spark-bar:hover { opacity: 1; }
.iw-spark-labels {
  display: flex; justify-content: space-between;
  font-size: 0.65rem; color: var(--text-muted);
}

/* ── Dashboard Responsive ── */
@media (max-width: 900px) {
  .iw-metric-row { grid-template-columns: repeat(2, 1fr); }
  .iw-bottom-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .iw-metric-row { grid-template-columns: 1fr 1fr; }
  .iw-charts-row { grid-template-columns: 1fr; }
  .iw-metric-value { font-size: 1.4rem; }
}
