/* =====================================================
   cve.theadminstack.com — OSINT Design System
   IBM Plex Sans · Monochrome · Light/Dark
   ===================================================== */

/* ── Google Fonts ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

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

/* ── Design tokens ────────────────────────────── */
:root {
  /* Surface */
  --bg:        #f9fafb;
  --bg-1:      #ffffff;
  --bg-2:      #f3f4f6;
  --bg-3:      #e5e7eb;

  /* Text */
  --text:      #111827;
  --text-2:    #4b5563;
  --text-3:    #9ca3af;

  /* Border */
  --border:    #e5e7eb;
  --border-2:  #d1d5db;

  /* Accent — monochrome, no blue */
  --accent:        #111827;
  --accent-inv:    #ffffff;
  --accent-subtle: #f3f4f6;

  /* Severity (functional only — unchanged in dark) */
  --sev-critical: #dc2626;
  --sev-high:     #ea580c;
  --sev-medium:   #d97706;
  --sev-low:      #16a34a;
  --sev-none:     #6b7280;

  /* Nav */
  --nav-h: 64px;
  --nav-bg: rgba(249,250,251,0.92);

  /* Radius / shadow */
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   14px;
  --r-pill: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 32px rgba(0,0,0,.10);

  /* Legacy compat (kept so old inline styles don't break) */
  --bg-base:      var(--bg);
  --bg-surface:   var(--bg-1);
  --bg-elevated:  var(--bg-2);
  --border-light: var(--border);
  --text-primary: var(--text);
  --text-muted:   var(--text-2);
  --text-link:    var(--accent);
  --accent-glow:  rgba(17,24,39,.08);
  --radius:    var(--r);
  --radius-sm: var(--r-sm);
}

html.dark {
  --bg:        #0f1117;
  --bg-1:      #161b22;
  --bg-2:      #21262d;
  --bg-3:      #30363d;

  --text:      #f0f6fc;
  --text-2:    #8b949e;
  --text-3:    #484f58;

  --border:    #30363d;
  --border-2:  #3d444d;

  --accent:        #f0f6fc;
  --accent-inv:    #0f1117;
  --accent-subtle: #21262d;

  --nav-bg: rgba(15,17,23,0.92);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow:    0 4px 16px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 32px rgba(0,0,0,.45);
  --accent-glow: rgba(240,246,252,.08);

  --bg-base:      var(--bg);
  --bg-surface:   var(--bg-1);
  --bg-elevated:  var(--bg-2);
  --border-light: var(--border);
  --text-primary: var(--text);
  --text-muted:   var(--text-2);
  --text-link:    var(--accent);
}

/* ── Base ─────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: .85em;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-2); }

/* ── Navigation ───────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 12px;
}

/* Brand */
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none !important; flex-shrink: 0;
}
.nav-brand-icon {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-inv);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace; font-size: .65rem;
  font-weight: 500; letter-spacing: -.5px; flex-shrink: 0;
}
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-brand-name { font-size: .875rem; font-weight: 600; color: var(--text); }
.nav-brand-role { font-size: .7rem; color: var(--text-3); font-family: 'IBM Plex Mono', monospace; }

/* Nav separator */
.nav-sep { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; margin: 0 4px; }

/* Pill nav */
.nav-pill {
  display: flex; align-items: center; gap: 2px;
  list-style: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 3px;
}
.nav-pill li a {
  display: block; padding: 5px 14px;
  border-radius: var(--r-pill);
  font-size: .8125rem; font-weight: 500; color: var(--text-2);
  white-space: nowrap; transition: color .15s, background .15s;
  text-decoration: none !important;
}
.nav-pill li a:hover { color: var(--text); background: var(--bg-1); }
.nav-pill li a.active {
  color: var(--accent-inv);
  background: var(--accent);
}

/* Nav right cluster */
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Theme toggle */
.nav-theme {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  background: none; border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.nav-theme:hover { color: var(--text); background: var(--bg-2); }
.nav-theme .icon-sun { display: none; }
html.dark .nav-theme .icon-moon { display: none; }
html.dark .nav-theme .icon-sun  { display: block; }

/* Back link */
.nav-back {
  padding: 6px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border);
  font-size: .8125rem; font-weight: 500; color: var(--text-2);
  text-decoration: none !important; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.nav-back:hover { color: var(--text); border-color: var(--border-2); background: var(--bg-2); }

/* Hamburger */
.nav-hamburger {
  display: none; width: 34px; height: 34px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: none; cursor: pointer;
  color: var(--text-2); align-items: center; justify-content: center;
  margin-left: auto; flex-shrink: 0;
}

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 199;
  background: var(--bg-1); border-bottom: 1px solid var(--border);
  padding: 16px 24px; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 500; color: var(--text-2);
  text-decoration: none !important; transition: color .15s, background .15s;
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--text); background: var(--bg-2); }

/* Legacy header compat */
.site-header { display: none; }
.page-wrap { min-height: 80vh; }

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
  text-decoration: none !important; white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent); color: var(--accent-inv);
  border-color: var(--accent);
}
.btn-primary:hover { opacity: .88; }
.btn-ghost {
  background: transparent; color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-2); background: var(--bg-2); }
.btn-outline {
  background: transparent; color: var(--text);
  border-color: var(--border-2);
}
.btn-outline:hover { background: var(--bg-2); }
.btn-sm  { padding: 5px 12px; font-size: .8rem; }
.btn-xs  { padding: 2px 8px;  font-size: .75rem; }
.btn-full { width: 100%; }

/* ── Hub hero ─────────────────────────────────── */
.hub-hero {
  padding: 72px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hub-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: var(--r-pill);
  margin-bottom: 20px;
}
.hub-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 700;
  color: var(--text); letter-spacing: -.03em;
  line-height: 1.15; margin-bottom: 14px;
}
.hub-hero p {
  font-size: 1.0625rem; color: var(--text-2);
  max-width: 540px; margin: 0 auto 32px;
  line-height: 1.7;
}
.hub-hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Tool cards grid ─────────────────────────── */
.tools-section { padding: 56px 0; }
.tools-section-header { text-align: center; margin-bottom: 36px; }
.tools-section-header h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 6px; }
.tools-section-header p  { color: var(--text-2); font-size: .9375rem; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.tool-card {
  display: flex; flex-direction: column;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
  text-decoration: none !important;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tool-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tool-card-icon {
  width: 48px; height: 48px; border-radius: var(--r);
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem; margin-bottom: 16px;
}
.tool-card-title {
  font-size: 1.0625rem; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.tool-card-desc {
  font-size: .875rem; color: var(--text-2); line-height: 1.65;
  flex: 1; margin-bottom: 18px;
}
.tool-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-card-tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 3px 10px;
  color: var(--text-3);
}
.tool-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--border);
  font-size: .8125rem; font-weight: 600; color: var(--text-2);
}
.tool-card-footer svg { transition: transform .15s; }
.tool-card:hover .tool-card-footer { color: var(--text); }
.tool-card:hover .tool-card-footer svg { transform: translateX(3px); }

/* ── Tool hero (cve-lookup page) ─────────────── */
.hero-section {
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 32px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: var(--r-pill);
  margin-bottom: 14px;
}
.hero-title { font-size: clamp(1.5rem, 3.5vw, 2.125rem); font-weight: 700; margin-bottom: 8px; letter-spacing: -.02em; }
.hero-sub   { color: var(--text-2); margin-bottom: 28px; font-size: .9375rem; max-width: 560px; line-height: 1.65; }

/* ── Search form ─────────────────────────────── */
.search-form {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.search-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search-row:last-child { margin-bottom: 0; align-items: flex-end; }
.search-row--filters { padding-top: 14px; border-top: 1px solid var(--border); }

.search-field { display: flex; flex-direction: column; gap: 5px; min-width: 160px; flex: 1; }
.search-field--wide { flex: 2; min-width: 260px; }
.search-field--actions { flex: 0; flex-direction: row; align-items: flex-end; gap: 8px; min-width: auto; }
.search-field label { font-size: .775rem; color: var(--text-2); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

input[type="text"], input[type="email"], input[type="date"], select, textarea {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: .9rem;
  width: 100%;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--text-3);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder { color: var(--text-3); }
select option { background: var(--bg-1); }

/* Severity checkboxes */
.sev-checkboxes { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.sev-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  font-size: .75rem; font-weight: 600; cursor: pointer;
  transition: all .15s; user-select: none; color: var(--text-2);
}
.sev-chip input { display: none; }
.sev-chip--critical:has(input:checked), .sev-chip--critical:hover { border-color: var(--sev-critical); color: var(--sev-critical); background: color-mix(in srgb, var(--sev-critical) 10%, transparent); }
.sev-chip--high:has(input:checked),     .sev-chip--high:hover     { border-color: var(--sev-high);     color: var(--sev-high);     background: color-mix(in srgb, var(--sev-high) 10%, transparent); }
.sev-chip--medium:has(input:checked),   .sev-chip--medium:hover   { border-color: var(--sev-medium);   color: var(--sev-medium);   background: color-mix(in srgb, var(--sev-medium) 10%, transparent); }
.sev-chip--low:has(input:checked),      .sev-chip--low:hover      { border-color: var(--sev-low);      color: var(--sev-low);      background: color-mix(in srgb, var(--sev-low) 10%, transparent); }

/* ── Stats bar ───────────────────────────────── */
.stats-bar {
  background: var(--bg-1); border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.stats-bar-inner { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.stat-pill { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 64px; }
.stat-num  { font-size: 1.0625rem; font-weight: 700; font-family: 'IBM Plex Mono', monospace; color: var(--text); }
.stat-lbl  { font-size: .68rem; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.stat-pill--critical .stat-num { color: var(--sev-critical); }
.stat-pill--high     .stat-num { color: var(--sev-high);     }
.stat-pill--medium   .stat-num { color: var(--sev-medium);   }
.stat-pill--low      .stat-num { color: var(--sev-low);      }

/* ── CVE List rows ───────────────────────────── */
.results-section, .recent-section { padding: 32px 0; }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.results-header h2 { font-size: .9375rem; font-weight: 600; }
.results-actions { display: flex; gap: 8px; }

.cve-list { display: flex; flex-direction: column; gap: 6px; }

.cve-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px;
  gap: 20px;
  transition: border-color .15s, box-shadow .15s;
}
.cve-row:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.cve-row-left  { flex: 1; min-width: 0; }
.cve-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

.cve-id   {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .9375rem; font-weight: 600; color: var(--text);
  letter-spacing: -.3px;
}
.cve-id:hover { text-decoration: underline; }
.cve-desc { color: var(--text-2); font-size: .875rem; margin-top: 5px; line-height: 1.55; }
.cve-meta {
  display: flex; gap: 12px; margin-top: 8px;
  font-size: .775rem; color: var(--text-3); flex-wrap: wrap;
  font-family: 'IBM Plex Mono', monospace;
}
.meta-status {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 1px 6px;
}

.cvss-score {
  font-size: 1.375rem; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace; line-height: 1;
  color: var(--text);
}

/* ── Severity badges ─────────────────────────── */
.sev-badge {
  display: inline-block; padding: 3px 8px;
  border-radius: var(--r-sm); font-size: .7rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid transparent;
}
.sev-badge--lg { padding: 5px 12px; font-size: .8125rem; }
.sev-critical { background: color-mix(in srgb, var(--sev-critical) 12%, transparent); color: var(--sev-critical); border-color: color-mix(in srgb, var(--sev-critical) 30%, transparent); }
.sev-high     { background: color-mix(in srgb, var(--sev-high)     12%, transparent); color: var(--sev-high);     border-color: color-mix(in srgb, var(--sev-high)     30%, transparent); }
.sev-medium   { background: color-mix(in srgb, var(--sev-medium)   12%, transparent); color: var(--sev-medium);   border-color: color-mix(in srgb, var(--sev-medium)   30%, transparent); }
.sev-low      { background: color-mix(in srgb, var(--sev-low)      12%, transparent); color: var(--sev-low);      border-color: color-mix(in srgb, var(--sev-low)      30%, transparent); }
.sev-none     { background: var(--bg-2); color: var(--text-3); border-color: var(--border); }

/* ── Quick filter cards ───────────────────────── */
.quick-filters { padding: 40px 0; }
.quick-filters h2 { margin-bottom: 16px; font-size: 1rem; font-weight: 600; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.filter-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px 16px; border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg-1);
  text-decoration: none !important; gap: 4px;
  transition: all .2s;
}
.filter-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-2); }
.filter-card--critical:hover { border-color: var(--sev-critical); background: color-mix(in srgb, var(--sev-critical) 5%, var(--bg-1)); }
.filter-card--high:hover     { border-color: var(--sev-high);     background: color-mix(in srgb, var(--sev-high)     5%, var(--bg-1)); }
.filter-card--medium:hover   { border-color: var(--sev-medium);   background: color-mix(in srgb, var(--sev-medium)   5%, var(--bg-1)); }
.filter-card--low:hover      { border-color: var(--sev-low);      background: color-mix(in srgb, var(--sev-low)      5%, var(--bg-1)); }
.fc-score { font-size: .75rem; color: var(--text-3); }
.fc-label { font-size: .9375rem; font-weight: 700; letter-spacing: .04em; }
.filter-card--critical .fc-label { color: var(--sev-critical); }
.filter-card--high     .fc-label { color: var(--sev-high);     }
.filter-card--medium   .fc-label { color: var(--sev-medium);   }
.filter-card--low      .fc-label { color: var(--sev-low);      }
.fc-count { font-size: .8rem; color: var(--text-3); }

/* ── Detail cards ────────────────────────────── */
.detail-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 24px;
  margin-bottom: 16px;
}
.detail-card h2 {
  font-size: .9375rem; font-weight: 600; margin-bottom: 14px;
  color: var(--text); padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

/* ── CVE Detail page ─────────────────────────── */
.main-content { padding: 32px 0 64px; }
.breadcrumb {
  display: flex; gap: 6px; align-items: center;
  font-size: .8125rem; color: var(--text-3); margin-bottom: 20px;
  font-family: 'IBM Plex Mono', monospace;
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--text-2); text-decoration: none; }
.breadcrumb span:not(:last-child) { color: var(--border-2); }

.cve-detail-header { margin-bottom: 24px; }
.cve-detail-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.cve-detail-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; color: var(--text);
}
.cve-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cve-detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cve-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.cve-detail-main { min-width: 0; }
.cve-detail-sidebar { display: flex; flex-direction: column; }

.cve-description { line-height: 1.75; color: var(--text-2); font-size: .9375rem; }

.products-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th {
  text-align: left; padding: 8px 12px;
  color: var(--text-3); font-size: .725rem;
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-2); }
.version-range { font-family: 'IBM Plex Mono', monospace; font-size: .8rem; color: var(--text-2); }

.ref-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ref-list li { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; }
.ref-list a { word-break: break-all; color: var(--text); }
.ref-list a:hover { text-decoration: underline; }
.ref-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ref-tag {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 1px 6px;
  font-size: .7rem; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .03em;
}

/* CVSS Score gauge */
.score-card { text-align: center; }
.score-gauge { display: flex; justify-content: center; margin: 12px 0; }
.score-ring {
  width: 110px; height: 110px; border-radius: 50%;
  border: 6px solid var(--bg-2);
  outline: 3px solid var(--score-color, var(--text));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0;
}
.score-num {
  font-size: 2rem; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--score-color, var(--text)); line-height: 1;
}
.score-max { font-size: .75rem; color: var(--text-3); }
.cvss-vector {
  display: flex; align-items: center; gap: 6px; margin-top: 10px;
  background: var(--bg-2); border-radius: var(--r-sm); padding: 8px;
}
.vector-string { font-size: .72rem; word-break: break-all; color: var(--text-2); flex: 1; font-family: 'IBM Plex Mono', monospace; }
.score-row { display: flex; align-items: center; gap: 12px; }
.score-num-sm { font-size: 1.75rem; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }

.cwe-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cwe-list a { font-size: .875rem; }
.count-badge {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 1px 8px;
  font-size: .75rem; color: var(--text-3); margin-left: 6px;
}

.watch-card { border-color: var(--border-2); }
.watch-card p { font-size: .875rem; color: var(--text-2); margin-bottom: 8px; }

/* ── Vendors / Products ───────────────────────── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
  padding: 32px 0 0;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; }
.page-header p { color: var(--text-2); margin-top: 4px; font-size: .9375rem; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.view-all { font-size: .875rem; color: var(--text-2); }
.view-all:hover { color: var(--text); }

.vendor-search-bar { margin-bottom: 24px; }
.vendor-search-bar form { display: flex; gap: 10px; }
.inline-search { flex: 1; max-width: 320px; }

.vendor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 24px;
}
.vendor-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  text-decoration: none !important;
}
.vendor-card:hover { border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.vendor-name { color: var(--text); font-weight: 600; font-size: .9rem; }
.vendor-count { color: var(--text-3); font-size: .8rem; font-family: 'IBM Plex Mono', monospace; }

.product-nav { margin-bottom: 16px; }
.product-chip-list { display: flex; gap: 8px; flex-wrap: wrap; }
.product-chip {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 4px 12px;
  font-size: .8rem; color: var(--text-2);
  text-decoration: none !important; display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.product-chip:hover { border-color: var(--border-2); color: var(--text); }
.chip-count {
  background: var(--bg-2); border-radius: var(--r-pill);
  padding: 1px 6px; font-size: .7rem;
  font-family: 'IBM Plex Mono', monospace;
}

/* ── Filter bar ───────────────────────────────── */
.filter-bar {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
  font-size: .8125rem; color: var(--text-2);
}
.sev-filter-btn {
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border); color: var(--text-2);
  text-decoration: none !important; font-size: .8rem; font-weight: 500;
  background: var(--bg-1); transition: all .15s;
}
.sev-filter-btn:hover, .sev-filter-btn.active { border-color: currentColor; background: transparent; }
.sev-filter-btn.active { font-weight: 700; }
.sev-filter-btn.sev-critical { color: var(--sev-critical); }
.sev-filter-btn.sev-critical.active { border-color: var(--sev-critical); }
.sev-filter-btn.sev-high     { color: var(--sev-high);     }
.sev-filter-btn.sev-high.active { border-color: var(--sev-high); }
.sev-filter-btn.sev-medium   { color: var(--sev-medium);   }
.sev-filter-btn.sev-medium.active { border-color: var(--sev-medium); }
.sev-filter-btn.sev-low      { color: var(--sev-low);      }
.sev-filter-btn.sev-low.active { border-color: var(--sev-low); }

/* ── Stats dashboard ─────────────────────────── */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 16px; text-align: center;
}
.kpi-num { font-size: 1.75rem; font-weight: 700; font-family: 'IBM Plex Mono', monospace; color: var(--text); }
.kpi-lbl { font-size: .7rem; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi-card--critical .kpi-num { color: var(--sev-critical); }
.kpi-card--high     .kpi-num { color: var(--sev-high);     }
.kpi-card--medium   .kpi-num { color: var(--sev-medium);   }
.kpi-card--low      .kpi-num { color: var(--sev-low);      }

.charts-row { display: grid; grid-template-columns: 320px 1fr; gap: 16px; margin-bottom: 16px; }
.chart-card canvas { width: 100% !important; height: 280px !important; }

.top-vendor-list { display: flex; flex-direction: column; gap: 10px; }
.top-vendor-row { display: flex; align-items: center; gap: 12px; }
.rank { color: var(--text-3); font-size: .8rem; width: 20px; text-align: right; flex-shrink: 0; font-family: 'IBM Plex Mono', monospace; }
.tv-name { font-size: .875rem; font-weight: 500; min-width: 120px; flex-shrink: 0; }
.tv-bar-wrap { flex: 1; background: var(--bg-2); border-radius: 4px; height: 6px; overflow: hidden; }
.tv-bar { height: 100%; background: var(--text); border-radius: 4px; transition: width .5s; opacity: .5; }
.tv-bar--top { background: var(--sev-critical); opacity: 1; }
.tv-count { color: var(--text-3); font-size: .8rem; font-family: 'IBM Plex Mono', monospace; min-width: 50px; text-align: right; }

/* ── Watch / Alert form ───────────────────────── */
.watch-section { padding: 40px 0; }
.watch-form-card { max-width: 540px; margin: 0 auto; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: .875rem; font-weight: 600; }
.form-group small { color: var(--text-3); font-size: .8rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-size: .875rem; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: color-mix(in srgb, var(--sev-low)      10%, transparent); border-color: color-mix(in srgb, var(--sev-low)      30%, transparent); color: var(--sev-low); }
.alert-error   { background: color-mix(in srgb, var(--sev-critical) 10%, transparent); border-color: color-mix(in srgb, var(--sev-critical) 30%, transparent); color: var(--sev-critical); }

/* ── Empty state ─────────────────────────────── */
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-2); }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }
.empty-state code {
  display: block; margin-top: 12px;
  background: var(--bg-2); padding: 10px 16px;
  border-radius: var(--r-sm); font-size: .85rem; color: var(--text-2);
}

/* ── Pagination ──────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 24px; padding: 16px 0; }
.page-btn {
  padding: 7px 16px; border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-2);
  text-decoration: none !important; font-size: .875rem;
  background: var(--bg-1); transition: all .15s;
}
.page-btn:hover { border-color: var(--border-2); color: var(--text); background: var(--bg-2); }
.page-info { color: var(--text-3); font-size: .875rem; font-family: 'IBM Plex Mono', monospace; }

/* ── Site footer ─────────────────────────────── */
.site-footer {
  background: var(--bg-1); border-top: 1px solid var(--border);
  margin-top: 80px; padding: 48px 0 0;
}
.footer-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px; padding-bottom: 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col strong { color: var(--text); font-size: .875rem; margin-bottom: 4px; font-weight: 600; }
.footer-col a, .footer-col p { color: var(--text-2); font-size: .8375rem; line-height: 1.7; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 16px 0;
  text-align: center; color: var(--text-3); font-size: .8rem;
}

/* ── Copy button (clipboard) ─────────────────── */
.copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 2px 6px; border-radius: var(--r-sm);
  font-size: .75rem; transition: color .15s, background .15s;
}
.copy-btn:hover { color: var(--text); background: var(--bg-2); }
.copy-btn.copied { color: var(--sev-low); }

/* ── Spinner / Loading ───────────────────────── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--border); border-top-color: var(--text);
  border-radius: 50%; animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .cve-detail-grid { grid-template-columns: 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .nav-pill { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 0 16px; }
  .nav-back { display: none; }
  .search-row { flex-direction: column; }
  .search-field--wide { min-width: 0; }
  .cve-row { flex-direction: column; gap: 12px; }
  .cve-row-right { flex-direction: row; align-items: center; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .hub-hero { padding: 48px 0 36px; }
  .tools-grid { grid-template-columns: 1fr; }
}
