/* ===== TOKENS — DARK (default) ===== */
:root {
  --bg: #0c1220;
  --surface: #111928;
  --surface-raised: #162032;
  --surface-hover: #1a2740;
  --text: #e8eaed;
  --text-secondary: #8b97a8;
  --text-dim: #5e6b7d;
  --border: rgba(136, 153, 176, 0.14);
  --border-strong: rgba(136, 153, 176, 0.28);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-mid: rgba(59, 130, 246, 0.25);
  --score-acute: #dc2626;
  --score-elevated: #ea580c;
  --score-watch: #ca8a04;
  --score-lower: #16a34a;
  --underbuilt: #f97316;
  --overpriced: #ec4899;
  --radius: 10px;
  --radius-lg: 16px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, monospace;
  --decomp-track: rgba(255,255,255,0.06);
  --scatter-grid: rgba(136,153,176,0.1);
  --scatter-median: rgba(136,153,176,0.25);
  --scatter-label: #5e6b7d;
  --tile-style: dark;
}

/* ===== TOKENS — LIGHT ===== */
[data-theme="light"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-raised: #f0f1f4;
  --surface-hover: #e8eaef;
  --text: #1a1d23;
  --text-secondary: #4b5563;
  --text-dim: #7c8596;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.18);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-mid: rgba(37, 99, 235, 0.18);
  --score-acute: #dc2626;
  --score-elevated: #ea580c;
  --score-watch: #a16207;
  --score-lower: #15803d;
  --underbuilt: #ea580c;
  --overpriced: #db2777;
  --decomp-track: rgba(0,0,0,0.06);
  --scatter-grid: rgba(0,0,0,0.07);
  --scatter-median: rgba(0,0,0,0.18);
  --scatter-label: #7c8596;
  --tile-style: light;
}

/* Auto-detect browser light mode when no explicit choice */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-raised: #f0f1f4;
    --surface-hover: #e8eaef;
    --text: #1a1d23;
    --text-secondary: #4b5563;
    --text-dim: #7c8596;
    --border: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.18);
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.08);
    --accent-mid: rgba(37, 99, 235, 0.18);
    --score-acute: #dc2626;
    --score-elevated: #ea580c;
    --score-watch: #a16207;
    --score-lower: #15803d;
    --underbuilt: #ea580c;
    --overpriced: #db2777;
    --decomp-track: rgba(0,0,0,0.06);
    --scatter-grid: rgba(0,0,0,0.07);
    --scatter-median: rgba(0,0,0,0.18);
    --scatter-label: #7c8596;
    --tile-style: light;
  }
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT ===== */
.page-shell {
  width: min(1360px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.hero-copy { max-width: 800px; }
.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.lede {
  color: var(--text-secondary);
  max-width: 64ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding-top: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #2563eb; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ===== VINTAGE STRIP ===== */
.vintage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.vintage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.vintage-chip strong { color: var(--text); font-weight: 600; }

/* ===== MODE TOGGLE ===== */
.mode-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.mode-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.mode-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.mode-btn {
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mode-btn:hover { color: var(--text); background: var(--surface-hover); }
.mode-btn.is-active {
  background: var(--accent);
  color: #fff;
}

/* ===== PANELS ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 20px 24px 0;
}
.panel-head h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}
.panel-note {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 0;
  white-space: nowrap;
}

/* ===== MAP ===== */
.map-container {
  height: 460px;
  margin: 16px 20px 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-legend {
  padding: 0 24px 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.gradient-legend {
  width: 100%;
  max-width: 420px;
}
.gradient-legend-bar {
  height: 10px;
  border-radius: 5px;
  width: 100%;
}
.gradient-legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ===== DUO ROW ===== */
.duo-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ===== SCATTERPLOT ===== */
.scatter-wrap {
  padding: 8px 20px 0;
  display: flex;
  justify-content: center;
}
#scatterplot {
  width: 100%;
  max-width: 560px;
  height: auto;
  aspect-ratio: 4/3;
}
.panel-scatter { position: relative; }
.scatter-axis-labels {
  display: flex;
  justify-content: center;
  padding: 4px 24px 16px;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.axis-y {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: rotate(-90deg) translateX(-50%);
  transform-origin: left center;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ===== RANKING TABLE ===== */
.panel-table { margin-bottom: 20px; }
.table-head { align-items: center; }
.table-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
#table-filter {
  width: 220px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0 12px;
  font-size: 0.85rem;
}
#table-filter::placeholder { color: var(--text-dim); }
.table-wrap {
  overflow-x: auto;
  padding: 12px 20px 20px;
}
#ranking-table {
  width: 100%;
  border-collapse: collapse;
}
#ranking-table th,
#ranking-table td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 0.88rem;
}
#ranking-table th {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.sortable { cursor: pointer; }
.sortable:hover { color: var(--accent); }
.is-active-sort { color: var(--accent) !important; }
.th-rank { width: 36px; text-align: center; }
.th-metro { min-width: 200px; }
.th-score { width: 70px; }
.th-bar { min-width: 140px; }

#ranking-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
#ranking-table tbody tr:hover { background: var(--surface-hover); }
#ranking-table tbody tr.is-selected { background: var(--accent-soft); }
#ranking-table tbody tr.is-highlighted { background: rgba(251, 191, 36, 0.08); }

.rank-num { text-align: center; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.metro-name-cell {
  font-weight: 600;
  font-size: 0.88rem;
}
.metro-state { color: var(--text-dim); font-weight: 400; font-size: 0.8rem; margin-left: 4px; }
.score-cell {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.decomp-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--decomp-track);
  margin-top: 4px;
  width: 100%;
  max-width: 120px;
}
.decomp-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.compare-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ===== COMPARE TRAY ===== */
.compare-tray {
  display: none;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.compare-tray.is-open { display: block; }
.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.compare-header h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin: 0;
}
.compare-clear {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}
.compare-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.compare-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
}
.compare-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.compare-metric {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.compare-metric:last-child { border-bottom: none; }
.compare-metric-label { color: var(--text-secondary); }
.compare-metric-value { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== DETAIL SECTION ===== */
.detail-section {
  margin-bottom: 20px;
}
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.detail-header h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin: 0;
}
.detail-score-group {
  display: flex;
  align-items: center;
  gap: 24px;
}
.score-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.score-ring-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.detail-components { display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.component-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.component-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 72px;
  flex-shrink: 0;
}
.component-bar-track {
  flex: 1;
  height: 8px;
  background: var(--decomp-track);
  border-radius: 4px;
  overflow: hidden;
}
.component-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.component-bar-under { background: var(--underbuilt); }
.component-bar-over { background: var(--overpriced); }
.component-value {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  width: 32px;
  text-align: right;
}

/* ===== EXPLAINER ===== */
.explainer-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.explainer-panel strong { color: var(--text); }
.explainer-panel .explainer-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.explainer-bullets {
  margin: 8px 0 0;
  padding-left: 20px;
}
.explainer-bullets li { margin-bottom: 4px; }

/* ===== DETAIL GRID ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
  margin-bottom: 20px;
}
.detail-placeholder {
  margin: 16px 20px 20px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  color: var(--text-dim);
  text-align: center;
}
.hidden { display: none; }

/* ===== COUNTY STRIP ===== */
.county-strip {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
}
.county-card {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
}
.county-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.county-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.county-metric {
  font-size: 0.78rem;
}
.county-metric-label { color: var(--text-dim); display: block; }
.county-metric-value { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== DETAIL METRICS ===== */
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.detail-metric-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.detail-metric-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.detail-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ===== LIMITATIONS ===== */
.panel-limitations { margin-bottom: 20px; }
.limitations-list {
  margin: 0;
  padding: 16px 24px 24px 44px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}
.limitations-list li { margin-bottom: 10px; }
.limitations-list li strong { color: var(--text); }

/* ===== SOURCE CARDS ===== */
.panel-sources { margin-bottom: 20px; }
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px 24px 24px;
}
.source-card {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
}
.source-card-name {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.source-card-vintage {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 6px;
}
.source-card-purpose {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.source-card a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
}
.source-card a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
.site-footer {
  padding: 32px 0 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.7;
}
.footer-links {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }
.footer-byline {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.footer-byline a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.footer-byline a:hover { color: var(--accent); }

/* ===== LEAFLET OVERRIDES ===== */
.leaflet-container { background: var(--bg); }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-popup-content-wrapper {
  background: var(--surface-raised);
  color: var(--text);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.leaflet-popup-tip { background: var(--surface-raised); }
.leaflet-popup-content { margin: 12px 14px; font-size: 0.85rem; line-height: 1.5; }

/* ===== TOOLTIP (hover detail on scatter/map) ===== */
.hover-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  max-width: 260px;
}
.hover-tooltip strong { display: block; margin-bottom: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .duo-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .page-shell { width: calc(100% - 24px); }
  .hero {
    flex-direction: column;
    gap: 16px;
  }
  .hero-actions { justify-content: flex-start; }
  .hero h1 { font-size: 2rem; }
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-score-group { flex-wrap: wrap; }
  .detail-metrics { grid-template-columns: 1fr 1fr; }
  .compare-cards { grid-template-columns: 1fr; }
  .mode-toggle { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .detail-metrics { grid-template-columns: 1fr; }
  .county-metrics { grid-template-columns: 1fr; }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ===== MAP RESET BUTTON (Leaflet custom control) ===== */
.leaflet-control-reset {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text) !important;
  text-decoration: none !important;
  line-height: 30px !important;
  text-align: center;
}
.leaflet-control-reset:hover {
  background: var(--surface-hover) !important;
}

/* ===== LIGHT-MODE LEAFLET OVERRIDES ===== */
[data-theme="light"] .leaflet-control-zoom a {
  background: #fff !important;
  color: #333 !important;
  border-color: rgba(0,0,0,0.15) !important;
}
[data-theme="light"] .leaflet-popup-content-wrapper {
  background: #fff;
  color: #1a1d23;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
[data-theme="light"] .leaflet-popup-tip { background: #fff; }
[data-theme="light"] .leaflet-control-reset {
  background: #fff !important;
  color: #333 !important;
  border-color: rgba(0,0,0,0.15) !important;
}
[data-theme="light"] .hover-tooltip {
  background: #fff;
  color: #1a1d23;
  border-color: rgba(0,0,0,0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
/* Auto browser light mode without explicit data-theme */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) .leaflet-control-zoom a {
    background: #fff !important;
    color: #333 !important;
    border-color: rgba(0,0,0,0.15) !important;
  }
  :root:not([data-theme="dark"]):not([data-theme="light"]) .leaflet-popup-content-wrapper {
    background: #fff; color: #1a1d23;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  }
  :root:not([data-theme="dark"]):not([data-theme="light"]) .leaflet-popup-tip { background: #fff; }
  :root:not([data-theme="dark"]):not([data-theme="light"]) .leaflet-control-reset {
    background: #fff !important; color: #333 !important; border-color: rgba(0,0,0,0.15) !important;
  }
  :root:not([data-theme="dark"]):not([data-theme="light"]) .hover-tooltip {
    background: #fff; color: #1a1d23;
    border-color: rgba(0,0,0,0.15); box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  }
}
