/* Shared shell + dashboard styles for every DataMetrics page.
   Extracted from the inline <style> block so the four pages stay in sync
   and browsers fetch it once. Served same-origin, so `style-src 'self'`
   in the CSP covers it. */

/* Self-hosted so the page needs no external origin and works under a
   strict `default-src 'self'` CSP. */
@font-face {
  font-family: 'Space Mono'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('./fonts/SpaceMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('./fonts/SpaceMono-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 300 700;
  font-display: swap; src: url('./fonts/DMSans-Variable.woff2') format('woff2');
}

:root {
  --bg: #0b0f1a;
  --surface: #131929;
  --surface2: #1a2236;
  --border: #1e2d47;
  --accent: #00e5ff;
  --accent2: #7c5cfc;
  --accent3: #ff6b6b;
  --accent4: #43e97b;
  --text: #e8edf5;
  --text-muted: #6b7fa3;
  --high: #ff4d6d;
  --medium: #ffd166;
  --low: #06d6a0;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
  --radius: 12px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── HEADER ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.logo span { color: var(--accent2); }

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-left: 28px;
  transition: var(--transition);
}
nav a:hover, nav a.active { color: var(--text); }
nav a.active { color: var(--accent); }

/* ── MAIN ── */
main { padding: 40px 0 80px; }

/* ── DASHBOARD HEADER ── */
.dashboard-header {
  margin-bottom: 40px;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
}
.dashboard-header h1 {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.dashboard-header p { color: var(--text-muted); font-size: 0.95rem; }

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.si-1 { background: rgba(0,229,255,0.12); color: var(--accent); }
.si-2 { background: rgba(124,92,252,0.12); color: var(--accent2); }
.si-3 { background: rgba(67,233,123,0.12); color: var(--accent4); }
.si-4 { background: rgba(255,107,107,0.12); color: var(--accent3); }

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── SEARCH SECTION ── */
.search-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}
.search-section h2 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.field-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 160px; }
.field-group label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

select, input[type="text"] {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
select:focus, input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,255,0.1); }
select option { background: var(--surface2); }

.btn-search {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  align-self: flex-end;
}
.btn-search:hover { background: #33ecff; transform: translateY(-1px); }

.btn-clear {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  align-self: flex-end;
}
.btn-clear:hover { color: var(--text); border-color: var(--text-muted); }

/* active filter pills */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--accent);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  animation: fadeIn 0.2s ease;
}
.pill button {
  background: none; border: none; color: var(--accent); cursor: pointer;
  padding: 0; line-height: 1; opacity: 0.6; font-size: 0.85rem;
}
.pill button:hover { opacity: 1; }

@keyframes fadeIn { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }

/* ── CHARTS ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
@media (max-width: 750px) { .charts-grid { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.chart-card:hover { border-color: rgba(0,229,255,0.3); }

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.chart-header h3 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.chart-header span {
  font-size: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
  background: rgba(0,229,255,0.08);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,229,255,0.2);
}

.chart-wrap { position: relative; height: 240px; }

/* ── TABLE ── */
.table-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.table-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.table-top h3 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

#tableSearch {
  width: 220px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

#result-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
#result-count strong { color: var(--accent); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.data-table th:hover { color: var(--text); }
.data-table th .sort-icon { margin-left: 4px; opacity: 0.4; font-size: 0.7rem; }
.data-table th.sort-asc .sort-icon::after { content: '↑'; opacity:1; }
.data-table th.sort-desc .sort-icon::after { content: '↓'; opacity:1; }
.data-table th .sort-icon::after { content: '↕'; }

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30,45,71,0.5);
  vertical-align: middle;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table tbody tr.hidden { display: none; }

.domain-cell { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-social  { background: rgba(124,92,252,0.15); color: #9f7ffc; border: 1px solid rgba(124,92,252,0.3); }
.badge-retail  { background: rgba(255,209,102,0.1); color: #ffd166; border: 1px solid rgba(255,209,102,0.3); }
.badge-healthcare { background: rgba(67,233,123,0.1); color: #43e97b; border: 1px solid rgba(67,233,123,0.3); }
.badge-news    { background: rgba(0,229,255,0.1); color: var(--accent); border: 1px solid rgba(0,229,255,0.3); }
.badge-finance { background: rgba(255,107,107,0.1); color: #ff8e8e; border: 1px solid rgba(255,107,107,0.3); }
.badge-technology { background: rgba(255,165,0,0.1); color: #ffb347; border: 1px solid rgba(255,165,0,0.3); }

.status-high   { color: var(--high); font-weight: 600; font-size: 0.82rem; }
.status-medium { color: var(--medium); font-weight: 600; font-size: 0.82rem; }
.status-low    { color: var(--low); font-weight: 600; font-size: 0.82rem; }

.cookie-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-bar-fill {
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  flex: 1;
  overflow: hidden;
}
.cookie-bar-fill-inner {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width 0.4s ease;
}
.cookie-val { font-family: var(--font-mono); font-size: 0.8rem; width: 28px; }

.action-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  margin-right: 4px;
}
.action-btn:hover { color: var(--text); border-color: var(--text-muted); }

/* empty state */
.empty-state {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.3; display: block; }
.empty-state p { font-size: 0.9rem; }

/* pagination */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.pagination { display: flex; gap: 4px; }
.page-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }


/* ── DETAIL MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3,6,13,0.72);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(720px, 100%); max-height: 85vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.modal-head h3 { margin: 0; color: var(--text); font-size: 1.15rem; }
.modal-head .modal-sub { color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-mono); margin-top: 4px; }
.modal-close {
  margin-left: auto; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 8px; cursor: pointer;
  min-width: 32px; min-height: 32px; font-size: 1rem; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .modal-grid { grid-template-columns: 1fr; } }
.modal-grid h4 {
  margin: 0 0 10px; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); font-family: var(--font-mono);
}
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed rgba(30,45,71,0.6); font-size: 0.85rem; }
.kv span:first-child { color: var(--text-muted); }
.kv span:last-child { color: var(--text); font-family: var(--font-mono); text-align: right; word-break: break-word; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-btn {
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
  border: 1px solid var(--border); background: var(--surface2); color: var(--text);
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.modal-btn.primary { background: var(--accent); color: var(--bg); border-color: transparent; font-weight: 600; }
.modal-state { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem; padding: 28px 0; text-align: center; }

/* Icon-only controls keep a usable hit target even if the icon font fails. */
.action-btn, .pill button { min-width: 24px; min-height: 24px; }


/* ── PRIVACY & COOKIE CONSENT ── */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 900;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 8px 28px rgba(2,6,23,0.6);
  animation: fadeIn 0.25s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { color: var(--text-muted); font-size: 0.88rem; flex: 1; min-width: 260px; margin: 0; }
.cookie-banner a { color: var(--accent); }
.cc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cc-btn {
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
  font-family: var(--font-body); border: 1px solid var(--border);
  background: var(--surface2); color: var(--text);
  min-height: 36px; white-space: nowrap; transition: var(--transition);
}
.cc-btn:hover { border-color: var(--text-muted); }
.cc-btn.primary { background: var(--accent); color: var(--bg); border-color: transparent; font-weight: 600; }
.cc-btn.primary:hover { background: #33ecff; }

.cc-backdrop {
  position: fixed; inset: 0; z-index: 1100; padding: 24px;
  background: rgba(3,6,13,0.75);
  display: flex; align-items: center; justify-content: center;
}
.cc-backdrop[hidden] { display: none; }
.cc-modal {
  width: min(760px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  animation: fadeIn 0.2s ease;
}
.cc-modal h3 {
  font-family: var(--font-mono); color: var(--accent); font-size: 1rem;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px;
}
.cc-updated { color: var(--text-muted); font-size: 0.75rem; font-family: var(--font-mono); margin-bottom: 20px; }
.cc-modal h4 {
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text); margin: 22px 0 8px; font-family: var(--font-mono);
}
.cc-modal p, .cc-modal li { color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; }
.cc-modal ul { margin: 8px 0 0 20px; }
.cc-modal li { margin-bottom: 5px; }
.cc-note {
  border-left: 2px solid var(--accent); padding: 10px 14px; margin-top: 18px;
  background: rgba(0,229,255,0.05); border-radius: 0 8px 8px 0;
}

.cc-pref {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 0; border-bottom: 1px dashed rgba(30,45,71,0.6);
}
.cc-pref-text { flex: 1; }
.cc-pref label { color: var(--text); font-size: 0.9rem; cursor: pointer; }
.cc-pref p { margin-top: 3px; font-size: 0.82rem; }
.cc-always {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent);
  border: 1px solid rgba(0,229,255,0.3); background: rgba(0,229,255,0.08);
  border-radius: 99px; padding: 2px 8px; margin-left: 6px; text-transform: uppercase;
}
.cc-toggle { width: 20px; height: 20px; min-width: 20px; accent-color: var(--accent); cursor: pointer; margin-top: 2px; }
.cc-toggle:disabled { cursor: not-allowed; opacity: 0.55; }
.cc-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); font-weight: 700; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ── SHARED PAGE COMPONENTS ────────────────────────────────────────────────────
   Used by index.html (Home), about.html and analytics.html. The dashboard's own
   components are above; these are the marketing/editorial building blocks. */

.hero { padding: 72px 0 56px; text-align: center; }
.hero .eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  color: var(--text-muted); font-size: 1.05rem; line-height: 1.65;
  max-width: 620px; margin: 0 auto;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: var(--transition);
}
.btn:hover { border-color: var(--text-muted); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--bg); border-color: transparent; }
.btn.primary:hover { background: #33ecff; }

.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 32px; max-width: 720px; }
.section-head h2 {
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px;
}
.section-head p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: var(--transition);
}
.card:hover { border-color: rgba(0,229,255,0.3); transform: translateY(-2px); }
.card .card-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  font-size: 1rem; margin-bottom: 16px;
}
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; }

/* Long-form copy: About, methodology notes. */
.prose { max-width: 720px; }
.prose h3 {
  font-size: 1.05rem; font-weight: 600; margin: 28px 0 10px;
  color: var(--text); letter-spacing: -0.01em;
}
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.75; margin-bottom: 14px; }
.prose ul { margin: 0 0 16px 20px; }
.prose li { color: var(--text-muted); font-size: 0.93rem; line-height: 1.75; margin-bottom: 7px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent);
  background: var(--surface2); padding: 2px 6px; border-radius: 5px;
}
.prose a { color: var(--accent); }

/* Numbered "how it works" steps. */
.steps { display: grid; gap: 2px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--surface); padding: 22px 24px; display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--accent);
  background: rgba(0,229,255,0.1); border-radius: 8px; width: 32px; height: 32px;
  min-width: 32px; display: grid; place-items: center;
}
.step h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; }

/* Definition rows — tracking levels, cookie categories. */
.def-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 700px) { .def-grid { grid-template-columns: 1fr; } }
.def {
  background: var(--surface); border: 1px solid var(--border);
  border-left-width: 3px; border-radius: var(--radius); padding: 18px 20px;
}
.def h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.def p { color: var(--text-muted); font-size: 0.86rem; line-height: 1.6; }
.def.lvl-high { border-left-color: var(--high); }
.def.lvl-high h4 { color: var(--high); }
.def.lvl-medium { border-left-color: var(--medium); }
.def.lvl-medium h4 { color: var(--medium); }
.def.lvl-low { border-left-color: var(--low); }
.def.lvl-low h4 { color: var(--low); }
.def.neutral { border-left-color: var(--accent2); }

/* Closing call to action. */
.cta {
  background: linear-gradient(135deg, rgba(0,229,255,0.07), rgba(124,92,252,0.07));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px; text-align: center; margin-top: 56px;
}
.cta h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.cta p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 24px; }

/* Analytics page: wider charts and the takeaway list beside them. */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 860px) { .chart-row { grid-template-columns: 1fr; } }
.chart-card.tall .chart-wrap { height: 300px; }

.insight-list { display: grid; gap: 12px; }
.insight {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.insight i { color: var(--accent); font-size: 0.95rem; margin-top: 3px; }
.insight p { color: var(--text-muted); font-size: 0.89rem; line-height: 1.65; }
.insight strong { color: var(--text); font-weight: 600; }

.metric-note {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted);
  margin-top: 10px;
}
