/* VIR Explorer — security-platform dark theme (with light variant via [data-theme]).
   Color tokens, layout, table, badges, hero, CVE detail. Keep selectors short. */

/* ---------- Tokens ---------- */
:root,
[data-theme="dark"] {
  --bg:       #0d1117;
  --surface:  #161b22;
  --surface-2:#1c2230;
  --border:   #21262d;
  --border-2: #2d343d;
  --text:     #e6edf3;
  --muted:    #7d8590;
  --accent:   #22d3ee;
  --accent-2: #0891b2;
  --zebra:    rgba(255,255,255,0.018);
  --row-hover:#1c232d;
  --shadow:   0 1px 2px rgba(0,0,0,0.4);
}
[data-theme="light"] {
  --bg:       #fafbfc;
  --surface:  #ffffff;
  --surface-2:#f3f5f8;
  --border:   #e1e6eb;
  --border-2: #cdd3da;
  --text:     #1d2733;
  --muted:    #5a6470;
  --accent:   #0891b2;
  --accent-2: #0e7490;
  --zebra:    rgba(0,0,0,0.025);
  --row-hover:#eef3f8;
  --shadow:   0 1px 2px rgba(0,0,0,0.06);
}

/* Severity colors — identical in both themes */
:root {
  --sev-critical: #f85149;
  --sev-high:     #f7861a;
  --sev-medium:   #d4a72c;
  --sev-low:      #3fb950;
  --sev-none:     #6e7681;
  --kev-bg:       #f85149;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }
body {
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "SF Pro Text", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
code { background: var(--surface-2); color: var(--text); padding: 1px 5px; border-radius: 3px; }

h1 { font-size: 22px; margin: 16px 0 12px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 20px 0 10px; font-weight: 600; }
h3 { font-size: 14px; margin: 14px 0 6px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
p  { margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }
section { margin: 20px 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 10px 24px; max-width: 1280px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.brand-mark {
  height: 30px; width: auto; display: inline-block;
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.brand-tagline { font-size: 12px; color: var(--muted); margin-left: 6px; }
.brand-logo { height: 22px; width: auto; }
.site-nav { display: flex; gap: 18px; margin-left: 24px; }
.site-nav a { color: var(--muted); font-size: 13px; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); border-bottom-color: var(--accent); text-decoration: none; }
.header-spacer { flex: 1; }
.theme-toggle {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .12s, border-color .12s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-2); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }

/* ---------- Footer — see the .site-footer + .footer-grid block lower
   in this file for the actual styling. Old single-row chain styles
   removed because they had higher specificity than the new grid
   selectors and silently broke the new layout. ---------- */

/* ---------- Hero / search ---------- */
.hero { padding: 32px 0 16px; text-align: center; }
.hero h1 { font-size: 26px; margin: 0 0 6px; }
.hero .lede { color: var(--muted); margin: 0 0 18px; }
.search-form { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; }
.search-form input {
  flex: 1; padding: 10px 14px; font-size: 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  outline: none;
}
.search-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,211,238,0.15); }
.search-form button {
  padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #001016; border: 0; border-radius: 6px;
}
.search-form button:hover { background: var(--accent-2); color: #fff; }

/* ---------- KPI cards ---------- */
.stat-row, .card-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 18px 0;
}
.stat-card, .kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 96px;
  transition: border-color .12s;
}
.stat-card:hover, .kpi-card:hover { border-color: var(--border-2); }
.stat-icon, .kpi-icon { color: var(--accent); margin-bottom: 4px; height: 18px; }
.stat-icon svg, .kpi-icon svg { width: 18px; height: 18px; }
.stat-value, .kpi-value { font-size: 22px; font-weight: 600; line-height: 1.15; color: var(--text); letter-spacing: -0.01em; }
.stat-label, .kpi-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Tables ---------- */
.cve-table, .kv-table, .impact-table, .dashboard-table {
  width: 100%; border-collapse: collapse; margin: 8px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; font-size: 13px;
}
.cve-table th, .cve-table td,
.kv-table th, .kv-table td,
.impact-table th, .impact-table td,
.dashboard-table th, .dashboard-table td {
  text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.cve-table th, .kv-table th, .impact-table th, .dashboard-table th {
  background: var(--surface); color: var(--muted);
  font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-2);
  user-select: none; cursor: default;
}
.cve-table.sortable th, .dashboard-table.sortable th { cursor: pointer; }
.cve-table tbody tr:nth-child(even) td { background: var(--zebra); }
.cve-table tbody tr:hover td { background: var(--row-hover); cursor: pointer; }
.cve-table tr:last-child td { border-bottom: 0; }
.cve-table td.num, .cve-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cve-table td.muted, .muted { color: var(--muted); }
.cve-table .cve-id { font-family: ui-monospace, Consolas, monospace; font-size: 13px; white-space: nowrap; color: var(--accent); }
.cve-table .cve-id:hover { text-decoration: underline; }
.cve-table .col-sev { width: 96px; }
.cve-table .col-num { width: 64px; }
.cve-table .col-date { width: 110px; white-space: nowrap; color: var(--muted); }
.cve-table .col-icons { width: 140px; }
.cve-table td.desc {
  max-width: 540px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text);
}

/* ---------- OS impact (grouped, collapsible) ---------- */
/* One <details> per OS family; summary is a fixed-height flex row so the list
   doesn't jitter as groups open/close. Affected/mixed groups render with the
   `open` attribute server-side. Works with JS disabled (native <details>). */
.os-impact { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.os-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.os-group-affected { border-left: 3px solid var(--sev-critical); }
.os-group-mixed    { border-left: 3px solid var(--sev-high); }
.os-group-fixed    { border-left: 3px solid var(--sev-low); }
.os-group-summary {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px; cursor: pointer; user-select: none;
  list-style: none;
}
.os-group-summary::-webkit-details-marker { display: none; }
.os-group-summary:hover { background: var(--row-hover); }
.os-group-caret {
  flex: 0 0 auto; width: 0; height: 0;
  border-left: 5px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .12s ease;
}
.os-group[open] > .os-group-summary .os-group-caret { transform: rotate(90deg); }
.os-group-icon {
  flex: 0 0 28px; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
}
.os-group-icon .icon { width: 26px; height: 26px; }
.os-group-name { flex: 1 1 auto; font-weight: 600; color: var(--text); }
.os-group-count { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
/* Per-family worst-case pill on the summary row. */
.os-pill {
  flex: 0 0 auto; display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.os-pill-affected { background: rgba(248,81,73,0.16);  color: var(--sev-critical); }
.os-pill-mixed    { background: rgba(247,134,26,0.16); color: var(--sev-high); }
.os-pill-fixed    { background: rgba(63,185,80,0.15);  color: #3fb950; }
/* Nested per-release table. No outer border/radius — it lives inside the group. */
.os-group-table { margin: 0; border: 0; border-radius: 0; border-top: 1px solid var(--border); }
.os-group-table tr:last-child td { border-bottom: 0; }
/* Per-row status badge (tints mirror the summary pills). */
.os-st {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.os-st-affected { background: rgba(248,81,73,0.16); color: var(--sev-critical); }
.os-st-fixed    { background: rgba(63,185,80,0.15); color: #3fb950; }
.os-st-clear    { background: var(--surface-2); color: var(--muted); }
.os-st-unknown  { background: var(--surface-2); color: var(--muted); }
.os-empty { color: var(--muted); opacity: 0.6; }

/* ---------- Severity / status badges ---------- */
.sev-badge {
  display: inline-block; padding: 2px 8px; min-width: 64px; text-align: center;
  border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.5;
}
.sev-critical { background: var(--sev-critical); }
.sev-high     { background: var(--sev-high); }
.sev-medium   { background: var(--sev-medium); }
.sev-low      { background: var(--sev-low); }
.sev-none     { background: var(--sev-none); }
.kev-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; background: var(--kev-bg); color: #fff;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.chip {
  display: inline-block; padding: 2px 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; font-size: 11px;
  color: var(--muted); margin-right: 4px;
}

.status-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; }
.status-badge.ok, .status-badge.alive   { background:rgba(63,185,80,0.15); color:#3fb950; }
.status-badge.warn, .status-badge.draining{ background:rgba(212,167,44,0.15); color:#d4a72c; }
.status-badge.error                     { background:rgba(248,81,73,0.15); color:#f85149; }
.status-badge.dead                      { background:var(--surface-2); color:var(--muted); }

/* ---------- Row icons ---------- */
.row-icons { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.row-icons .icon {
  width: 16px; height: 16px;
  border-radius: 1px;
  padding: 1px;
  box-sizing: content-box;
  opacity: 0.95;
  transition: opacity .12s;
}
.row-icons .icon:hover { opacity: 1; }
.row-icons .more { font-size: 11px; color: var(--muted); margin-left: 2px; }
.icon { vertical-align: middle; }
/* Theme-aware dark icons (linux, rust, cargo, github):
   currentColor -> black on light theme, white on dark theme. */
[data-theme="dark"]  [data-icon-theme="dark-aware"],
[data-theme="dark"]  [data-icon-theme="dark-aware"] path { fill: #ffffff !important; color: #ffffff; }
[data-theme="light"] [data-icon-theme="dark-aware"],
[data-theme="light"] [data-icon-theme="dark-aware"] path { fill: #000000 !important; color: #000000; }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 10px 12px; margin: 12px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px;
}
.filter-bar .filter { display: inline-flex; align-items: center; gap: 6px; }
.filter-bar .filter-label {
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 11px; font-weight: 600;
}
.filter-bar .filter-val {
  display: inline-block; min-width: 24px; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600;
}
.filter-bar input[type="range"] { width: 100px; vertical-align: middle; }
.filter-bar select {
  padding: 4px 6px; font-size: 12px; border-radius: 4px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
}
.filter-bar .sev-chip {
  display: inline-block; padding: 2px 8px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  text-decoration: none;
}
.filter-bar .sev-chip:hover { border-color: var(--border-2); text-decoration: none; }
.filter-bar .sev-chip.active.sev-critical { background: var(--sev-critical); color: #fff; border-color: var(--sev-critical); }
.filter-bar .sev-chip.active.sev-high     { background: var(--sev-high);     color: #fff; border-color: var(--sev-high); }
.filter-bar .sev-chip.active.sev-medium   { background: var(--sev-medium);   color: #fff; border-color: var(--sev-medium); }
.filter-bar .sev-chip.active.sev-low      { background: var(--sev-low);      color: #fff; border-color: var(--sev-low); }
.filter-bar .sev-chip.active.sev-none     { background: var(--sev-none);     color: #fff; border-color: var(--sev-none); }
.filter-bar .filter-toggle {
  display: inline-block; padding: 4px 10px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  text-decoration: none;
}
.filter-bar .filter-toggle:hover { border-color: var(--border-2); text-decoration: none; }
.filter-bar .filter-toggle.active { background: var(--accent); color: #001016; border-color: var(--accent); }
.filter-bar .filter-apply {
  padding: 4px 12px; font-size: 12px; font-weight: 600;
  background: var(--accent); color: #001016; border: 0; border-radius: 4px; cursor: pointer;
}
.filter-bar .filter-apply:hover { background: var(--accent-2); color: #fff; }
.filter-bar .filter-reset {
  font-size: 11px; color: var(--muted); text-decoration: none;
  padding: 4px 8px; border-radius: 4px;
}
.filter-bar .filter-reset:hover { color: var(--text); text-decoration: underline; }

/* ---------- List pager ---------- */
.pager.pager-list {
  flex-wrap: wrap; gap: 12px; padding: 8px 0;
}
.pager-perpage { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pager-perpage select { padding: 3px 6px; font-size: 12px; }
.pager-nav { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.pager a.disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Year page ---------- */
.year-header h1 { margin-bottom: 4px; }
.year-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.year-top-col {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
}
.year-top-col h3 { margin-top: 0; }
.mini-list { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.mini-list li { padding: 3px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li a { color: var(--accent); }

/* ---------- CVE detail ---------- */
.cve-detail h1 { margin: 16px 0 8px; font-family: ui-monospace, Consolas, monospace; font-size: 22px; }
.cve-header { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.cve-header .badges { display: flex; gap: 6px; margin: 8px 0 6px; }
.cve-header .meta { color: var(--muted); font-size: 12px; }

.score-row, .pred-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.score-card, .pred-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px;
}
.score-card.risk { border-color: var(--accent); }
.score-label, .pred-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.score-value, .pred-value { font-size: 26px; font-weight: 600; margin: 4px 0; letter-spacing: -0.01em; }
.score-meta { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; word-break: break-all; }
.gauge { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.gauge-fill { height: 100%; background: linear-gradient(90deg, var(--sev-low), var(--sev-medium), var(--sev-high), var(--sev-critical)); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 14px; margin: 8px 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.mitigation {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 12px; margin: 8px 0;
}
.mitigation header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tier-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.mitigation.tier-vendor .tier-badge { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.mitigation.tier-lbreeze .tier-badge { background: var(--accent); color: #001016; }

.refs li { word-break: break-all; font-size: 13px; }
.footnote { font-size: 12px; color: var(--muted); margin-top: 8px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Search page: meta line + examples ---------- */
.search-meta { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.search-meta strong { color: var(--text); }
.match-chip {
  display: inline-block; padding: 2px 8px; margin-left: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; font-size: 12px; color: var(--accent);
}
.search-examples { max-width: 720px; margin: 24px auto; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.search-examples h2 { margin: 0 0 12px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.examples-list { list-style: none; padding: 0; margin: 0; }
.examples-list li { padding: 6px 0; font-size: 14px; }
.examples-list li a { text-decoration: none; }
.examples-list li code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; color: var(--accent); }
.examples-list .hint, .search-examples > .hint { color: var(--muted); font-size: 12px; }
.search-examples > .hint { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }

details { margin: 8px 0; }
details summary {
  cursor: pointer; padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  font-weight: 600; font-size: 13px; list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: '▸ '; color: var(--muted); }
details[open] summary::before { content: '▾ '; }
details summary h2.inline { display: inline; font-size: 13px; margin: 0; color: var(--text); text-transform: none; letter-spacing: 0; }
details .impact-table { margin-top: 6px; }

/* ---------- Pager / meta ---------- */
.pager { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; font-size: 13px; }
.pager a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 4px; color: var(--text); }
.pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.meta { color: var(--muted); font-size: 12px; }

/* ---------- Timeline ---------- */
.timeline-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px; margin: 12px 0; overflow-x: auto;
}
.timeline-wrap canvas { display: block; max-width: 100%; cursor: crosshair; }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.legend .dot.kev  { background: var(--sev-critical); }
.legend .dot.exp  { background: var(--sev-high); }
.legend .dot.none { background: var(--muted); }

.kv-table { max-width: 420px; }

/* ---------- Forms ---------- */
input[type="text"], input[type="search"], select {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 12px; font-size: 14px; font-family: inherit;
}
input[type="text"]:focus, input[type="search"]:focus, select:focus {
  outline: none; border-color: var(--accent);
}
button {
  font-family: inherit; cursor: pointer;
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: calc(100vh - 220px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 28px 22px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.login-card h1 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.login-lede { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.login-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 4px;
}
.login-input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px; font-family: inherit;
}
.login-input:focus { outline: none; border-color: var(--accent); }
.login-submit {
  margin-top: 6px;
  background: var(--accent);
  color: #04141a;
  border: 0; border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px; font-weight: 600;
}
.login-submit:hover { background: var(--accent-2); color: #fff; }
.login-error {
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid var(--sev-critical);
  color: var(--sev-critical);
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px;
}
.login-foot { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.login-foot code { font-size: 12px; }

/* ---------- Header logout ---------- */
.logout-form { margin: 0; display: inline-flex; }
.logout-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px; font-weight: 500;
  margin-right: 8px;
}
.logout-btn:hover { color: var(--text); border-color: var(--border-2); }

/* ---------- Charts (ECharts) ---------- */
.vir-chart {
  width: 100%;
  height: 320px;
  margin: 8px 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.vir-chart.tall  { height: 420px; }
.vir-chart.short { height: 220px; }
details.chart-details {
  margin: 8px 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
}
details.chart-details > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 0;
  user-select: none;
}
details.chart-details[open] > summary { color: var(--text); }

/* Mitigation-content tabbed section */
.mit-content { margin-top: 16px; }
.mit-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.mit-tab {
  background: var(--surface); border: 1px solid var(--border);
  border-bottom: none; border-radius: 6px 6px 0 0;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.mit-tab:hover { background: var(--surface-hover, var(--border)); }
.mit-tab.active { background: var(--bg); border-bottom: 1px solid var(--bg); margin-bottom: -1px; font-weight: 600; }
.mit-tab-source { font-weight: 600; }
.mit-tab-tier { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.mit-panel { display: none; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 0 6px 6px 6px; }
.mit-panel.active { display: block; }
.mit-attribution { font-size: 12px; color: var(--muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.mit-attribution a { color: var(--accent); }
.mit-license { font-family: var(--mono, monospace); font-size: 11px; padding: 1px 6px; background: var(--bg); border-radius: 3px; }
.mit-summary { font-style: italic; color: var(--text); margin: 8px 0 12px; }
.mit-workaround { background: var(--bg); border-left: 3px solid var(--accent); padding: 8px 12px; margin: 12px 0; }
.mit-body { font-size: 13px; line-height: 1.5; }
.mit-body table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.mit-body th, .mit-body td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.mit-body th { background: var(--bg); }
.mit-structured-only { font-size: 12px; color: var(--muted); padding: 12px; background: var(--bg); border-radius: 4px; }

.mit-code-blocks { margin-top: 12px; }
.code-block {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  margin: 8px 0; overflow: hidden;
}
.code-meta {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--surface); border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.code-lang { font-family: var(--mono, monospace); color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.code-kind {
  padding: 1px 6px; border-radius: 3px; font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: 0.05em;
}
.code-kind.kind-fix { background: #1f7a32; color: #fff; }
.code-kind.kind-workaround { background: #c47900; color: #fff; }
.code-kind.kind-verify { background: #1f4f8b; color: #fff; }
.code-kind.kind-rollback { background: #7a1f1f; color: #fff; }
.code-copy {
  margin-left: auto; font-size: 11px; padding: 2px 8px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 3px; cursor: pointer;
}
.code-copy:hover { background: var(--accent); color: #001016; border-color: var(--accent); }
.code-copy.copied { background: #1f7a32; color: #fff; border-color: #1f7a32; }
.code-desc { padding: 6px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.code-block pre { margin: 0; padding: 10px 12px; font-size: 12px; overflow-x: auto; }
.code-block pre code { font-family: var(--mono, monospace); white-space: pre; }
.code-kind.kind-exploit { background: #7a1f1f; color: #fff; }
.code-source { margin-left: 8px; font-size: 11px; color: var(--muted); text-decoration: none; }
.code-source:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Exploit cards ---------- */
.exploit-section h3 { margin-top: 18px; margin-bottom: 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.exploit-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid #7a1f1f; border-radius: 6px;
  padding: 12px 14px; margin: 10px 0;
}
.exploit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.exploit-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exploit-title a { font-weight: 600; font-family: var(--mono, monospace); font-size: 13px; }
.exploit-meta { font-size: 12px; color: var(--muted); }
.exploit-desc { margin: 6px 0 10px; font-size: 13px; opacity: .9; }
.meta-pill { display: inline-block; padding: 1px 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; color: var(--muted); }
.meta-pill.ok { background: #1f7a32; color: #fff; border-color: #1f7a32; }
.meta-pill.code { background: var(--bg); color: var(--text); }
.exploit-pending { margin-top: 8px; padding: 10px 12px; background: var(--bg); border: 1px dashed var(--border); border-radius: 4px; font-size: 12px; color: var(--muted); }
.exploit-pending code { font-family: var(--mono, monospace); background: var(--surface); padding: 1px 4px; border-radius: 3px; }

/* ---------- Researcher credits ---------- */
.researcher-credits-section h2 { margin-bottom: 6px; }
.researcher-credits { list-style: none; padding-left: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.rc-item {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid #1d7548; border-radius: 6px;
  padding: 8px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.rc-name { font-weight: 600; font-size: 13px; }
.rc-type {
  font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  background: rgba(34, 139, 87, .14); color: #1d7548;
  padding: 2px 8px; border-radius: 99px; font-weight: 600;
}
[data-theme="dark"] .rc-type { background: rgba(64, 200, 128, .18); color: #7be0a3; }
.rc-source { font-size: 11.5px; color: var(--muted); margin-left: auto; font-family: var(--mono, monospace); }


/* ---------- Landing page additions ---------- */

/* 8-card grid: 4 cols desktop / 2 tablet / 1 phone */
.stat-row.stat-row-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat-card-link {
  color: inherit; text-decoration: none;
}
.stat-card-link:hover { text-decoration: none; border-color: var(--accent); }
.stat-card .stat-sub {
  font-size: 11px; color: var(--muted); margin-top: 2px;
}
.stat-card.stat-card-accent { border-left: 3px solid var(--accent); }

/* Generic panel wrapper used on landing */
.panel { margin: 20px 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header h2 { margin: 16px 0 8px; }
.panel-link { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-link:hover { color: var(--accent); text-decoration: none; }
.panel-link .see-all {
  font-size: 12px; font-weight: 500; color: var(--muted);
  text-transform: none; letter-spacing: 0;
}
.panel-link:hover .see-all { color: var(--accent); }
.panel-footer { margin: 8px 0 0; font-size: 13px; }
.panel-footer a { color: var(--accent); }

/* Per-OS 2x2 grid (4 cards) */
.os-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0;
}
.os-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.os-panel .panel-header h2 { margin: 0 0 8px; font-size: 14px; }
.os-panel .cve-table.mini { font-size: 12px; margin: 0; }
.os-panel .cve-table.mini th, .os-panel .cve-table.mini td { padding: 6px 8px; }
.os-panel .cve-table.mini .col-date { width: auto; }

/* Top-vendors horizontal chip row */
.vendor-chip-row {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
  margin: 0 -4px;
  scrollbar-width: thin;
}
.vendor-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  color: var(--text); text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  transition: border-color .12s, color .12s;
  flex: 0 0 auto;
}
.vendor-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.vendor-chip .vc-name { font-weight: 500; }
.vendor-chip .vc-count {
  color: var(--muted); font-size: 12px;
  background: var(--surface-2); padding: 1px 6px; border-radius: 8px;
}

/* Horizontal scroll wrapper for wide tables */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Mobile nav (disclosure) ---------- */
/* New hamburger — full-width slide-down panel with backdrop. Replaces the
   janky native <details> menu that opened inline. */
.mnav-toggle {
  display: none; /* shown only on mobile via @media below */
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 7px 9px; cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0; /* never get squeezed */
}
.mnav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.mnav-toggle .mnav-open, .mnav-toggle .mnav-close { width: 22px; height: 22px; display: block; }
.mnav-toggle .mnav-close { display: none; }
body.mnav-open .mnav-toggle .mnav-open { display: none; }
body.mnav-open .mnav-toggle .mnav-close { display: block; }
.mnav-panel {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 86vw; max-width: 360px; z-index: 100;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(0,0,0,.18);
  padding: 64px 22px 28px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateX(100%); transition: transform .22s ease-out;
}
body.mnav-open .mnav-panel { display: block; transform: translateX(0); }
.mnav-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
body.mnav-open .mnav-backdrop { display: block; opacity: 1; pointer-events: auto; }
.mnav-section { margin-bottom: 24px; }
.mnav-section .mnav-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text); opacity: 0.55; font-weight: 600;
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.mnav-section a {
  display: block; padding: 9px 4px;
  color: var(--text); text-decoration: none;
  font-size: 15px; font-weight: 500;
  border-radius: 4px;
}
.mnav-section a:hover, .mnav-section a:active { background: var(--bg); color: var(--accent); text-decoration: none; }

/* Vestigial — kept so older cached HTML doesn't break style-wise. */
.site-nav-mobile { display: none; margin-left: 8px; }
.site-nav-mobile summary {
  list-style: none; cursor: pointer; padding: 6px;
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
}
.site-nav-mobile summary::-webkit-details-marker { display: none; }
.site-nav-mobile summary::before { content: none; }
.site-nav-mobile summary svg { width: 18px; height: 18px; }
.site-nav-mobile summary:hover { color: var(--text); border-color: var(--border-2); }
.site-nav-mobile[open] summary { color: var(--text); border-color: var(--accent); }
.site-nav-mobile-menu {
  position: absolute; right: 12px; top: 56px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  padding: 8px; min-width: 180px;
  display: flex; flex-direction: column; gap: 2px;
  z-index: 20;
}
.site-nav-mobile-menu a {
  padding: 8px 12px; border-radius: 4px; color: var(--text); font-size: 14px;
}
.site-nav-mobile-menu a:hover { background: var(--surface-2); color: var(--accent); text-decoration: none; }

/* ---------- Responsive breakpoints ---------- */

/* Tablet (<= 768px) */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 10px 16px; gap: 8px; }

  /* Collapse main nav into menu disclosure */
  .site-nav { display: none; }
  .site-nav-mobile { display: none; }
  .mnav-toggle { display: inline-flex; }

  /* Force the whole document to NEVER horizontal-scroll on mobile.
     This is the root cause of '/stats looks broken' — a single wide
     chart or table was busting out and pushing the layout sideways. */
  html, body { overflow-x: hidden; max-width: 100vw; }
  .container { max-width: 100vw; box-sizing: border-box; }
  /* Chart containers — clamp width AND wrap canvas so ECharts can't burst. */
  .vir-chart, .echarts-container, [_echarts_instance_] {
    width: 100% !important; max-width: calc(100vw - 32px) !important;
    overflow: hidden;
  }
  .vir-chart > div, .vir-chart canvas {
    max-width: 100% !important; width: 100% !important;
  }
  /* /stats chart heights — tighter to match narrow viewport */
  .vir-chart { height: 240px !important; }
  .vir-chart.tall { height: 300px !important; }
  .vir-chart.short { height: 180px !important; }
  /* Year drill-down chips: 3 across instead of horizontal scroll */
  .year-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .year-chip { padding: 6px 4px; justify-content: center; font-size: 12px; min-width: 0; }
  /* Hero / section heading sizes on phone */
  section h1 { font-size: 22px; margin: 12px 0 6px; }
  section h2 { font-size: 16px; margin: 18px 0 10px; }
  section p.meta { font-size: 13px; }
  /* chart-details summary tappable target */
  details.chart-details > summary { padding: 8px 12px; font-size: 13px; }
  /* Generic tables — wrap in scroll instead of bursting the page. */
  pre { max-width: 100%; overflow-x: auto; }

  /* CVE results table — STACK each row as a card on mobile (left side was
     getting clipped because the table was horizontal-scrolling and the CVE
     column was the FIRST cell which slid off-screen). */
  .cve-table { display: block; border: 0; background: transparent; }
  .cve-table thead { display: none; }                       /* hide column headers */
  .cve-table tbody, .cve-table tr { display: block; width: 100%; }
  .cve-table tr {
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    padding: 12px; margin: 0 0 10px;
    display: grid; grid-template-columns: 1fr auto; gap: 6px 10px;
  }
  .cve-table td { display: block; border: 0; padding: 0; font-size: 13px; }
  .cve-table td.cve-id, .cve-table td:first-child {
    grid-column: 1 / 2; font-size: 14px; font-weight: 600;
  }
  .cve-table td.col-sev, .cve-table td:nth-child(2) {
    grid-column: 2 / 3; justify-self: end;
  }
  .cve-table td.num, .cve-table td.col-flags, .cve-table td.col-os,
  .cve-table td.col-vendor, .cve-table td.col-date {
    grid-column: 1 / 3; font-size: 12px; opacity: 0.85;
  }
  .cve-table td.desc {
    grid-column: 1 / 3; color: var(--text); opacity: 0.75;
    font-size: 12.5px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .cve-table td.num::before, .cve-table td.col-flags::before,
  .cve-table td.col-os::before, .cve-table td.col-vendor::before,
  .cve-table td.col-date::before {
    content: attr(data-label); font-weight: 500; opacity: 0.55;
    margin-right: 6px; font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  /* All OTHER tables (stats, impact, dashboard) — horizontal scroll inside
     a wrapper, the table itself stays a table. */
  .table-scroll, .impact-table, .kv-table, .dashboard-table {
    overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
  }

  /* Brand tighter */
  .brand-name { font-size: 14px; }
  .brand-tagline { font-size: 11px; }

  /* KPI: 4-col → 2-col */
  .stat-row, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-row.stat-row-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card, .kpi-card { padding: 12px 14px; min-height: 88px; }
  .stat-value, .kpi-value { font-size: 20px; }

  /* OS grid → single column */
  .os-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Hero tighter */
  .hero { padding: 20px 0 8px; }
  .hero h1 { font-size: 22px; }

  /* CVE table: hide lowest-priority cols (Published, CVSS, Impact) */
  .cve-table .col-date,
  .cve-table .col-num,
  .cve-table .col-icons,
  .cve-table thead th.col-date,
  .cve-table thead th.col-num,
  .cve-table thead th.col-icons { display: none; }
  .cve-table tbody td:nth-child(3),
  .cve-table tbody td:nth-child(5),
  .cve-table tbody td:nth-child(7),
  .cve-table thead th:nth-child(3),
  .cve-table thead th:nth-child(5),
  .cve-table thead th:nth-child(7) { display: none; }
  .cve-table td.desc { max-width: 100%; white-space: normal; }

  /* But mini tables (per-OS landing) keep all three columns visible */
  .cve-table.mini .col-date,
  .cve-table.mini tbody td:nth-child(3),
  .cve-table.mini thead th:nth-child(3) { display: table-cell; }

  /* Charts shorter */
  .vir-chart { height: 280px; }
  .vir-chart.tall { height: 340px; }
  .vir-chart.short { height: 200px; }

  /* CVE detail: scores stack tighter */
  .score-row, .pred-row { grid-template-columns: 1fr; gap: 10px; }
  .score-value, .pred-value { font-size: 22px; }
  .kv { grid-template-columns: 100px 1fr; font-size: 12px; }

  /* Filter bar: chips wrap, slider full-width */
  .filter-bar { gap: 8px 10px; padding: 10px; }
  .filter-bar input[type="range"] { width: 100%; }
  .filter-bar .filter-risk { flex: 1 0 100%; }

  /* (Old footer reflow rule removed — new .footer-grid handles its own
     responsive breakpoints at 900px and 540px lower in the file.) */
}

/* Phone (<= 480px) */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .header-inner { padding: 8px 12px; gap: 6px; }

  /* Hide tagline to free room */
  .brand-tagline { display: none; }
  .brand-name { font-size: 13px; }

  /* KPI: 2 columns at phone (1 col looked far too tall with 8 cards),
     stack content vertically inside each card and shrink everything. */
  .stat-row, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-row.stat-row-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card, .kpi-card {
    padding: 10px 11px; min-height: 0;
    flex-direction: column; align-items: flex-start; gap: 2px;
    overflow: hidden;
  }
  .stat-card .stat-icon, .kpi-card .kpi-icon { margin: 0 0 2px; flex: 0 0 auto; height: 14px; }
  .stat-card .stat-icon svg, .kpi-card .kpi-icon svg { width: 14px; height: 14px; }
  .stat-card .stat-value, .kpi-card .kpi-value {
    font-size: 17px; line-height: 1.1;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .stat-card .stat-label, .kpi-card .kpi-label {
    font-size: 10px; letter-spacing: 0.03em;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .stat-card .stat-sub { display: none; }

  /* /stats page on phones — charts and tables overflow without these.
     Shrink chart heights, allow horizontal scroll on tables, stack year chips. */
  .vir-chart { height: 200px !important; max-width: 100%; }
  .vir-chart.tall { height: 280px !important; }
  .vir-chart.short { height: 150px !important; }
  .impact-table, .cve-table, .kv-table, .dashboard-table {
    font-size: 12px;
  }
  .impact-table th, .impact-table td,
  .cve-table th, .cve-table td,
  .kv-table th, .kv-table td,
  .dashboard-table th, .dashboard-table td {
    padding: 6px 8px;
  }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Year chips wrap to 3 cols on phones */
  .year-chips { gap: 5px; }
  .year-chip { padding: 4px 8px; font-size: 11px; }
  /* /stats h1/h2 tighter spacing */
  section h1 { font-size: 20px; }
  section h2 { font-size: 16px; margin: 16px 0 8px; }
  /* echarts overflow guard */
  .echarts-container, [_echarts_instance_] { max-width: 100% !important; }

  /* Hero tighter still */
  .hero { padding: 14px 0 6px; }
  .hero h1 { font-size: 19px; }
  .hero .lede { font-size: 12px; margin-bottom: 12px; }
  .search-form { flex-wrap: wrap; }
  .search-form input { min-width: 0; }
  .search-form button { padding: 10px 14px; }

  /* CVE table: show only CVE / Severity / Risk (drop description too) */
  .cve-table tbody td:nth-child(6),
  .cve-table thead th:nth-child(6) { display: none; }
  /* Per-OS mini tables stay 3-col */
  .cve-table.mini tbody td:nth-child(3),
  .cve-table.mini thead th:nth-child(3) { display: table-cell; }

  /* Mini tables on landing — keep all 3 cols */
  .cve-table.mini td, .cve-table.mini th { padding: 5px 6px; font-size: 12px; }

  /* h1/h2 smaller */
  h1 { font-size: 19px; }
  h2 { font-size: 15px; }

  /* Charts further compressed */
  .vir-chart { height: 220px; }
  .vir-chart.tall { height: 260px; }
  .vir-chart.short { height: 180px; }

  /* Pager wraps neatly */
  .pager.pager-list { flex-direction: column; align-items: flex-start; }
  .pager-nav { margin-left: 0; flex-wrap: wrap; }

  /* Login fills phone width */
  .login-card { max-width: 92vw; }

  /* Vendor chips smaller */
  .vendor-chip { font-size: 12px; padding: 5px 10px; }
}

/* ============================================================
   Marketing pages — /about /community /vendors /legal/*
   Full-width, multi-section, hero-driven. Designed to PROMOTE.
   ============================================================ */
.mk { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Hero — full-width band, big headline, supporting copy, CTAs */
.mk-hero {
  padding: 56px 24px 64px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.mk-hero-inner { max-width: 1200px; margin: 0 auto; }
.mk-eyebrow {
  display: inline-block; padding: 4px 10px; margin-bottom: 16px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 99px;
}
.mk-hero h1 {
  font-size: 48px; line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 16px; max-width: 800px;
}
.mk-hero .mk-lede {
  font-size: 20px; line-height: 1.5; color: var(--text); opacity: 0.78;
  margin: 0 0 28px; max-width: 720px;
}
.mk-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.mk-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 7px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: filter .15s, transform .12s;
}
.mk-btn:hover { transform: translateY(-1px); text-decoration: none; }
.mk-btn-primary { background: var(--accent); color: #fff; }
.mk-btn-primary:hover { filter: brightness(1.1); }
.mk-btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.mk-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Section — bordered block of related content */
.mk-section { padding: 48px 0; border-top: 1px solid var(--border); }
.mk-section:first-of-type { border-top: 0; padding-top: 16px; }
.mk-section-head { max-width: 720px; margin: 0 auto 32px; text-align: center; }
.mk-section-head h2 {
  font-size: 32px; letter-spacing: -0.015em; margin: 0 0 12px; line-height: 1.2;
}
.mk-section-head p { font-size: 17px; color: var(--text); opacity: 0.75; margin: 0; line-height: 1.55; }

/* Feature grid — 3 columns of cards with icon + title + body */
.mk-features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.mk-feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px;
  transition: border-color .15s, transform .12s;
}
.mk-feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.mk-feature-icon {
  width: 36px; height: 36px; margin-bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); border-radius: 8px;
}
.mk-feature h3 { font-size: 17px; margin: 0 0 8px; }
.mk-feature p { font-size: 14px; line-height: 1.55; opacity: 0.78; margin: 0; }

/* Step / numbered flow — for "how it works" pipelines */
.mk-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  counter-reset: mk-step;
}
.mk-step {
  position: relative;
  padding: 24px 20px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.mk-step::before {
  counter-increment: mk-step;
  content: counter(mk-step);
  position: absolute; top: -14px; left: 20px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.mk-step h4 { font-size: 15px; margin: 4px 0 8px; }
.mk-step p { font-size: 13px; line-height: 1.55; opacity: 0.78; margin: 0; }

/* Stat strip — big numbers above the fold */
.mk-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  margin: 0 0 8px; overflow: hidden;
}
.mk-stat {
  padding: 24px 20px; text-align: center;
  border-right: 1px solid var(--border);
}
.mk-stat:last-child { border-right: 0; }
.mk-stat-num { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); margin: 0 0 4px; }
.mk-stat-lbl { font-size: 13px; color: var(--text); opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }

/* Two-col content slab (e.g. text + screenshot/list) */
.mk-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.mk-split h3 { font-size: 24px; margin: 0 0 14px; letter-spacing: -0.015em; }
.mk-split p { font-size: 15px; line-height: 1.65; opacity: 0.85; margin: 0 0 12px; }
.mk-split ul { padding-left: 20px; line-height: 1.7; }
.mk-split li { margin: 6px 0; font-size: 15px; }
.mk-split .mk-split-visual {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, monospace; font-size: 13px; color: var(--text); opacity: 0.8;
  white-space: pre-wrap; line-height: 1.6;
}

/* CTA strip — bottom of page */
.mk-cta-band {
  margin: 48px 0 64px;
  padding: 40px 32px; text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 14px;
}
.mk-cta-band h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.015em; }
.mk-cta-band p { font-size: 15px; opacity: 0.8; margin: 0 0 20px; }
.mk-cta-band .mk-ctas { justify-content: center; }

/* Legal / TOS-style long-form text. Re-uses .mk container.
   Narrower for readability, no flashy hero. */
.mk-legal { max-width: 760px; margin: 0 auto; padding: 32px 24px 64px; }
.mk-legal h1 { font-size: 32px; margin: 0 0 8px; }
.mk-legal h2 { font-size: 18px; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.mk-legal p, .mk-legal li { line-height: 1.7; font-size: 15px; }
.mk-legal ul, .mk-legal ol { padding-left: 22px; }
.mk-legal code { background: var(--bg); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--border); font-size: 13px; }
.mk-legal a { color: var(--accent); }
.mk-meta { color: var(--text); opacity: 0.6; font-size: 13px; font-style: italic; margin-bottom: 24px; }

/* Footer — proper 4-column grid (was a sad inline chain) */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 64px; padding: 40px 0 24px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 28px; border-bottom: 1px solid var(--border);
}
.footer-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text); opacity: 0.6; font-weight: 600;
  margin: 0 0 12px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: var(--text); opacity: 0.85; text-decoration: none; font-size: 14px; }
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-brand { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.footer-tag { font-size: 13px; opacity: 0.7; margin: 4px 0 8px; }
.footer-disclaimer { font-size: 12px; opacity: 0.6; margin: 0; }

@media (max-width: 900px) {
  .mk-hero h1 { font-size: 36px; }
  .mk-hero .mk-lede { font-size: 17px; }
  .mk-features, .mk-steps { grid-template-columns: repeat(2, 1fr); }
  .mk-stats { grid-template-columns: repeat(2, 1fr); }
  .mk-stat:nth-child(2) { border-right: 0; }
  .mk-stat:nth-child(1), .mk-stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .mk-split { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 540px) {
  .mk-hero { padding: 36px 16px 40px; }
  .mk-hero h1 { font-size: 28px; }
  .mk-section { padding: 36px 0; }
  .mk-section-head h2 { font-size: 24px; }
  .mk-features, .mk-steps, .mk-stats { grid-template-columns: 1fr; }
  .mk-stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .mk-stat:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Search result row pills — signals (KEV/EXP/FIX), OS, vendor */
.os-pill, .vendor-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; padding: 1px 6px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 3px; margin: 1px 2px 1px 0;
  white-space: nowrap;
}
.vendor-pill { background: var(--surface); }
.sig-pill {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 3px; margin-right: 3px;
  letter-spacing: 0.04em;
}
.sig-kev { background: #003E7E; color: #fff; }
.sig-exp { background: #E94E1B; color: #fff; }
.sig-fix { background: #16a34a; color: #fff; }
.col-flags  { width: 90px; white-space: nowrap; }
.col-os     { width: 160px; max-width: 200px; }
.col-vendor { width: 160px; max-width: 200px; }

/* Year drill-down chips on /stats */
.year-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.year-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 6px 12px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  font-size: 13px; transition: border-color .15s, color .15s;
}
.year-chip:hover { border-color: var(--accent); color: var(--accent); }
.year-chip-year  { font-weight: 600; }
.year-chip-count { color: var(--muted); font-size: 12px; }

/* Vendor chip monogram — colour-hashed circle with first letter for vendors
   without a brand icon. Matches the size of the brand SVG icons (14px). */
.vc-monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-transform: uppercase;
  line-height: 1;
  flex: 0 0 auto;
}

/* Vendor chip icon stack — monogram sits behind, real favicon (from DDG icon
   service) layered on top. If the favicon 404s or the network blocks it the
   img is empty and the monogram shows through. */
.vc-icon-stack { position: relative; display: inline-flex; width: 14px; height: 14px; flex: 0 0 auto; }
.vc-icon-stack .vc-monogram { position: absolute; inset: 0; }
.vc-icon-stack .vc-favicon { position: absolute; inset: 0; background: var(--surface); border-radius: 3px; }
.vc-favicon { object-fit: contain; }
