/* =========================================================================
   Open VSX Pulse — 5 themes
   aurora (default) · synthwave · win11 · win10 · winxp
   ========================================================================= */

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=VT323&family=Space+Mono:wght@400;700&family=Fraunces:opsz,ital,wght@9..144,0,300;9..144,0,400;9..144,0,500;9..144,1,300;9..144,1,400&family=Geist:wght@300;400;500;600&display=swap");

/* =========================================================================
   DEFAULT / WIN11 — Mica + Fluent
   ========================================================================= */

:root,
[data-theme="win11"] {
  color-scheme: light;

  /* Mica-style neutrals over a faint hue */
  --bg: #f3f3f3;
  --bg-2: #e7e7e7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.55);
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.04);
  --text: #1b1b1b;
  --text-strong: #000000;
  --muted: #5b5b5b;
  --muted-2: #8a8a8a;

  --accent: #0067c0;          /* Windows accent blue */
  --accent-2: #338cd1;
  --accent-soft: rgb(0 103 192 / 10%);
  --accent-ring: rgb(0 103 192 / 30%);

  --positive: #107c10;
  --positive-soft: rgb(16 124 16 / 10%);
  --negative: #c42b1c;
  --negative-soft: rgb(196 43 28 / 10%);
  --live: #0078d4;
  --live-soft: rgb(0 120 212 / 12%);

  --radius: 6px;
  --radius-lg: 8px;
  --shell-w: 1240px;

  --font-display: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "JetBrains Mono", Consolas, ui-monospace, monospace;

  --display-weight: 600;
  --display-italic: normal;

  --shadow-card:
    0 0 0 1px rgb(0 0 0 / 4%),
    0 1px 2px rgb(0 0 0 / 4%),
    0 8px 28px -12px rgb(0 0 0 / 10%);
}

/* =========================================================================
   WIN10 — Metro, flat, sharp edges, accent blue
   ========================================================================= */

[data-theme="win10"] {
  color-scheme: light;

  --bg: #f2f2f2;
  --bg-2: #e6e6e6;
  --panel: #ffffff;
  --panel-2: #f4f4f4;
  --line: #d1d1d1;
  --line-soft: #e5e5e5;
  --text: #1f1f1f;
  --text-strong: #000000;
  --muted: #555555;
  --muted-2: #888888;

  --accent: #0078d7;          /* the iconic Win10 blue */
  --accent-2: #2196f3;
  --accent-soft: rgb(0 120 215 / 12%);
  --accent-ring: rgb(0 120 215 / 35%);

  --positive: #107c10;
  --positive-soft: rgb(16 124 16 / 12%);
  --negative: #d83b01;
  --negative-soft: rgb(216 59 1 / 12%);
  --live: #00b294;
  --live-soft: rgb(0 178 148 / 14%);

  --radius: 0px;              /* Metro — no rounded corners */
  --radius-lg: 0px;
  --shell-w: 1240px;

  --font-display: "Segoe UI", "Segoe UI Variable Display", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Consolas", "Cascadia Mono", "JetBrains Mono", ui-monospace, monospace;

  --display-weight: 200;       /* Metro loves thin display weights */
  --display-italic: normal;

  --shadow-card: 0 1px 0 var(--line);
}

/* =========================================================================
   SYNTHWAVE — bold neon, readable
   ========================================================================= */

[data-theme="synthwave"] {
  color-scheme: dark;

  --bg: #07021a;
  --bg-2: #100530;
  /* Original look: very transparent panels that let the neon glow bleed through.
     Trades a bit of readability for maximum vibe. */
  --panel: rgba(22, 9, 58, 0.45);
  --panel-2: rgba(29, 12, 77, 0.45);
  --line: rgba(255, 95, 215, 0.45);
  --line-soft: rgba(255, 95, 215, 0.18);

  --text: #f0e0ff;            /* lavender body text — moody */
  --text-strong: #ffffff;
  --muted: #c9b8e0;
  --muted-2: #9485b8;

  --accent: #ff36d4;
  --accent-2: #ff8ee8;
  --accent-soft: rgb(255 54 212 / 18%);
  --accent-ring: rgb(255 54 212 / 55%);

  --positive: #6cffc4;
  --positive-soft: rgb(108 255 196 / 16%);
  --negative: #ff5577;
  --negative-soft: rgb(255 85 119 / 18%);
  --live: #2afff0;
  --live-soft: rgb(42 255 240 / 18%);

  --radius: 2px;
  --radius-lg: 4px;
  --shell-w: 1240px;

  --font-display: "Space Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-ui: "JetBrains Mono", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --display-weight: 700;
  --display-italic: normal;

  --shadow-card:
    0 0 0 1px rgb(255 54 212 / 30%),
    0 0 40px -8px rgb(255 54 212 / 45%),
    inset 0 0 60px -10px rgb(42 255 240 / 10%);
}

/* =========================================================================
   WINXP — Luna blue
   ========================================================================= */

[data-theme="winxp"] {
  color-scheme: light;

  --bg: #ece9d8;               /* XP desktop beige */
  --bg-2: #d4d0c4;
  --panel: #ffffff;
  --panel-2: #ecf3fc;
  --line: #7ba0d4;
  --line-soft: #c5d3ea;
  --text: #000000;
  --text-strong: #000000;
  --muted: #444444;
  --muted-2: #777777;

  --accent: #0a55c9;           /* XP titlebar blue */
  --accent-2: #2273eb;
  --accent-soft: rgb(10 85 201 / 12%);
  --accent-ring: rgb(10 85 201 / 35%);

  --positive: #2e7d2e;         /* XP green start button */
  --positive-soft: rgb(46 125 46 / 14%);
  --negative: #c4302b;
  --negative-soft: rgb(196 48 43 / 14%);
  --live: #f08000;             /* XP orange notification */
  --live-soft: rgb(240 128 0 / 16%);

  --radius: 4px;
  --radius-lg: 6px;
  --shell-w: 1240px;

  --font-display: "Trebuchet MS", "Tahoma", ui-sans-serif, sans-serif;
  --font-ui: "Tahoma", "Trebuchet MS", ui-sans-serif, sans-serif;
  --font-mono: "Lucida Console", "Cascadia Mono", Consolas, ui-monospace, monospace;

  --display-weight: 700;
  --display-italic: normal;

  --shadow-card:
    inset 0 1px 0 rgb(255 255 255 / 80%),
    0 1px 0 rgb(0 0 0 / 10%),
    0 2px 4px rgb(0 0 0 / 8%);
}

/* =========================================================================
   AURORA — photographic gradient, minimal rounded, editorial calm
   ========================================================================= */

[data-theme="aurora"] {
  color-scheme: dark;

  /* Deep dawn sky base. Real richness lives in the body gradient layer. */
  --bg: #0a0d18;
  --bg-2: #11162a;
  --panel: rgba(20, 24, 42, 0.55);
  --panel-2: rgba(28, 33, 56, 0.55);
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #ecefff;
  --text-strong: #ffffff;
  --muted: #aab2d5;
  --muted-2: #6f7799;

  /* Sunrise accent — peach to magenta to cyan in flavor section */
  --accent: #ff9a6d;
  --accent-2: #ffb88a;
  --accent-soft: rgb(255 154 109 / 14%);
  --accent-ring: rgb(255 154 109 / 40%);

  --positive: #7dd3a8;
  --positive-soft: rgb(125 211 168 / 14%);
  --negative: #ff7a9e;
  --negative-soft: rgb(255 122 158 / 16%);
  --live: #8ec5ff;
  --live-soft: rgb(142 197 255 / 16%);

  --radius: 6px;
  --radius-lg: 10px;
  --shell-w: 1280px;

  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-ui: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --display-weight: 300;
  --display-italic: italic;

  --shadow-card:
    0 0 0 1px rgb(255 255 255 / 6%) inset,
    0 30px 80px -30px rgb(0 0 0 / 60%),
    0 8px 24px -16px rgb(0 0 0 / 50%);
}

/* =========================================================================
   BASE — shared structure across themes
   ========================================================================= */

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100%;
}

body > * { position: relative; z-index: 2; }

a { color: inherit; text-decoration: none; transition: color 140ms ease; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: #fff; }

.shell {
  width: min(var(--shell-w), calc(100vw - 40px));
  margin: 0 auto;
}

/* =========================================================================
   HEADER / NAV
   ========================================================================= */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-style: var(--display-italic);
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--text-strong);
}

.brand::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.brand em {
  font-family: var(--font-ui);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
}

.links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
}

.links a {
  position: relative;
  padding: 8px 12px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 120ms ease, background 120ms ease;
}

.links a:hover, .links a.active {
  color: var(--text-strong);
  background: var(--panel-2);
}

.links a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Theme switcher */

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 3px;
  margin-left: 4px;
}

.theme-switch button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}

.theme-switch button:hover { color: var(--text-strong); }
.theme-switch button.active { background: var(--accent); color: #fff; }

.swatch {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}

.swatch--win11     { background: linear-gradient(135deg, #f3f3f3 50%, #0067c0 50%); }
.swatch--win10     { background: linear-gradient(135deg, #f2f2f2 50%, #0078d7 50%); }
.swatch--winxp     { background: linear-gradient(135deg, #ece9d8 50%, #0a55c9 50%); }
.swatch--aurora    { background: linear-gradient(135deg, #0a0d18 30%, #ff9a6d 60%, #8ec5ff 90%); }
.swatch--synthwave { background: linear-gradient(135deg, #07021a 50%, #ff36d4 50%); }

/* =========================================================================
   ANALYTICS CONSENT
   Mirrors the theme switch: same panel/line/radius tokens, the same
   segmented pill treatment for the action group, accent for the primary.
   ========================================================================= */

.consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
  pointer-events: none;
}

.consent[hidden] { display: none; }

.consent-card {
  pointer-events: auto;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-card, 0 20px 60px -20px rgb(0 0 0 / 50%));
  transform: translateY(14px);
  opacity: 0;
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1), opacity 220ms ease;
}

.consent.is-open .consent-card { transform: translateY(0); opacity: 1; }

.consent-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.consent-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--accent-soft, var(--panel));
  color: var(--accent);
}

.consent-headtext { flex: 1; min-width: 0; }

.consent-titlerow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.consent-head h2 {
  margin: 1px 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.consent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--positive, #7dd3a8);
  background: var(--positive-soft, color-mix(in srgb, var(--accent) 14%, transparent));
  border: 1px solid color-mix(in srgb, var(--positive, #7dd3a8) 35%, transparent);
}

.consent-badge[hidden] { display: none; }

.consent-badge.is-flash { animation: consent-saved 900ms ease; }

@keyframes consent-saved {
  0%   { transform: scale(0.85); opacity: 0; }
  25%  { transform: scale(1.06); opacity: 1; }
  60%  { transform: scale(1); }
}

/* Toggle row — the analytics switch, styled to match the theme-switch surface. */
.consent-toggle {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease;
}

.consent-toggle:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.consent.is-on .consent-toggle {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft, var(--panel-2));
}

.consent-toggle-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.consent-toggle-title {
  font-size: 12.75px;
  font-weight: 500;
  color: var(--text-strong);
  letter-spacing: -0.005em;
}

.consent-toggle-state {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.consent.is-on .consent-toggle-state { color: var(--accent); }

.consent-track {
  flex: none;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  border: 1px solid var(--line);
  transition: background 160ms ease;
}

.consent.is-on .consent-track { background: var(--accent); border-color: transparent; }

.consent-knob {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transform: translate(0, -50%);
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
}

.consent.is-on .consent-knob { transform: translate(18px, -50%); }

[data-theme="aurora"] .consent.is-on .consent-track {
  background: linear-gradient(120deg, #ff9a6d, #ff7eb6);
}

.consent-head p {
  margin: 0;
  font-size: 12.75px;
  line-height: 1.55;
  color: var(--muted);
}

.consent-head a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Action group styled as one segmented control, echoing .theme-switch:
   a padded track that wraps the buttons, divider hairline between them. */
.consent-actions {
  display: inline-flex;
  align-self: flex-end;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.consent-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 7px 14px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  background: transparent;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.consent-btn:hover { color: var(--text-strong); background: var(--panel-2); }

.consent-btn--accept {
  color: #fff;
  background: var(--accent);
}

.consent-btn--accept:hover {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-ring, transparent), 0 6px 18px -8px var(--accent);
}

/* Aurora uses the same warm gradient as .button--primary for the accept CTA. */
[data-theme="aurora"] .consent-btn--accept {
  background: linear-gradient(120deg, #ff9a6d, #ff7eb6);
  color: #0a0d18;
  font-weight: 600;
}

[data-theme="aurora"] .consent-btn--accept:hover {
  background: linear-gradient(120deg, #ffb088, #ffa0cc);
  color: #0a0d18;
}

@media (max-width: 540px) {
  .consent-card { gap: 12px; }
  .consent-actions { align-self: stretch; }
  .consent-btn { flex: 1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-card { transition: opacity 160ms ease; transform: none; }
  .consent-knob, .consent-track { transition: none; }
  .consent-badge.is-flash { animation: none; }
}

/* =========================================================================
   PAGE HEAD
   ========================================================================= */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: var(--display-weight);
  letter-spacing: -0.02em;
  line-height: 1;
}

h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.025em;
}

h1 em {
  font-style: var(--display-italic);
  color: var(--accent);
}

h2 { font-size: 20px; letter-spacing: -0.015em; line-height: 1.15; }
h3 { font-size: 16px; }

.muted { color: var(--muted); }
small  { color: var(--muted); font-size: 12.5px; }

.timestamp {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.timestamp::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 3px var(--positive-soft);
}

/* =========================================================================
   KPI GRID
   ========================================================================= */

.kpis {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 220ms ease;
}

.card:hover { transform: translateY(-2px); }

.card.hero {
  background:
    radial-gradient(120% 110% at 0% 0%, var(--accent-soft), transparent 60%),
    var(--panel);
}

.card-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-strong);
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.card.hero .card-value {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(44px, 5.8vw, 78px);
  letter-spacing: -0.03em;
}

.card-value .unit {
  font-size: 0.42em;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}

.card-foot {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.chip--live { color: var(--live); background: var(--live-soft); border-color: transparent; }

/* =========================================================================
   PANELS
   ========================================================================= */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px 24px;
  margin-bottom: 22px;
  position: relative;
  box-shadow: var(--shadow-card);
}

.panel.featured {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 90px),
    var(--panel);
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head h2 { font-size: 18px; }
.panel-head .eyebrow { margin-bottom: 6px; }

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

/* =========================================================================
   SEGMENTED + BUTTONS
   ========================================================================= */

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
  padding: 2px;
  gap: 2px;
}

.segmented button {
  min-height: 28px;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: calc(var(--radius) - 1px);
  transition: color 120ms ease, background 120ms ease;
}

.segmented button:hover { color: var(--text-strong); }
.segmented button.active { background: var(--accent); color: #fff; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.button:hover { border-color: var(--accent); color: var(--accent); }

.button--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.button--primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

.button--ghost { background: transparent; }

.button .arrow { transition: transform 160ms ease; }
.button:hover .arrow { transform: translateX(3px); }

/* =========================================================================
   CHART
   ========================================================================= */

.chart { height: 360px; min-width: 0; }

/* =========================================================================
   CRAWLER
   ========================================================================= */

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border-radius: 999px;
  padding: 2px 12px 2px 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}

.live-pill::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.live-pill[data-state="running"] { color: var(--live); background: var(--live-soft); border-color: transparent; }
.live-pill[data-state="running"]::before { background: var(--live); animation: pulse 1.4s ease-out infinite; }
.live-pill[data-state="waiting"] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.live-pill[data-state="waiting"]::before { background: var(--accent); }
.live-pill[data-state="failed"] { color: var(--negative); background: var(--negative-soft); border-color: transparent; }
.live-pill[data-state="failed"]::before { background: var(--negative); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 70%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}

.crawler-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.crawler-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crawler-card[data-status="running"] {
  border-color: color-mix(in srgb, var(--live) 50%, var(--line));
  background:
    linear-gradient(180deg, var(--live-soft), transparent 60%),
    var(--panel-2);
}

.crawler-card[data-status="failed"] {
  border-color: color-mix(in srgb, var(--negative) 50%, var(--line));
  background:
    linear-gradient(180deg, var(--negative-soft), transparent 60%),
    var(--panel-2);
}

.crawler-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crawler-top strong {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 16px;
  color: var(--text-strong);
}

.crawler-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.crawler-card[data-status="running"]   .crawler-status { color: var(--live); border-color: transparent; background: var(--live-soft); }
.crawler-card[data-status="failed"]    .crawler-status { color: var(--negative); border-color: transparent; background: var(--negative-soft); }
.crawler-card[data-status="completed"] .crawler-status { color: var(--positive); border-color: transparent; background: var(--positive-soft); }

.crawler-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  min-height: 19px;
}

.progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
  position: relative;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--live));
  transition: width 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.crawler-card[data-status="running"] .progress span {
  background: linear-gradient(90deg, var(--live), var(--accent), var(--live));
  background-size: 200% 100%;
  animation: shimmer 2.2s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.crawler-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
}

.crawler-meta .count {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.crawler-meta .count .sep { color: var(--muted-2); margin: 0 4px; }
.crawler-meta .percent { color: var(--accent); font-size: 13px; font-weight: 600; }

.crawler-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.crawler-times span b { font-weight: 600; color: var(--text); margin-left: 4px; }

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.phase-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
}
.phase-card[data-state="active"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.phase-card[data-state="done"]   { opacity: 0.85; }
.phase-card[data-state="idle"]   { opacity: 0.55; }
.phase-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.phase-head strong { font-size: 13px; }
.phase-state {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.phase-card[data-state="active"] .phase-state { color: var(--accent); }
.phase-meta, .phase-times {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.phase-meta span:nth-child(2) { color: var(--text); font-weight: 600; }
.phase-times span b { font-weight: 600; color: var(--text); margin-left: 4px; }
.phase-current {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 720px) {
  .phase-grid { grid-template-columns: 1fr; }
}

.crawler-error {
  color: var(--negative) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  background: var(--negative-soft);
  border-radius: var(--radius);
}

/* =========================================================================
   TABLES
   ========================================================================= */

.table-wrap { overflow-x: auto; margin: 0 -8px; }
table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 13px 12px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

td {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-strong);
  border-bottom: 1px solid var(--line-soft);
}

tbody tr { transition: background 120ms ease; }
tbody tr:hover { background: var(--panel-2); }
tbody tr:last-child td { border-bottom: 0; }

th:first-child, td:first-child { text-align: left; padding-left: 8px; }
th:last-child,  td:last-child  { padding-right: 8px; }

td:first-child { min-width: 280px; }

td .ext-title {
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

td .ext-title:hover { color: var(--accent); }

td small {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
}

tr:nth-child(1) .rank {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.gain {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--positive);
  font-weight: 600;
}

.gain::before { content: "↑"; font-size: 11px; }
.gain.zero { color: var(--muted); }
.gain.zero::before { content: "·"; }

.th-spark {
  width: 96px;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
}
.td-spark { width: 96px; padding-right: 4px; }
.spark {
  display: inline-block;
  width: 80px;
  height: 24px;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 240ms ease;
  position: relative;
}
.spark.is-ready { opacity: 0.9; }
.spark.is-empty {
  position: relative;
  opacity: 1;
}
.spark.is-empty::before {
  content: "";
  position: absolute;
  left: 0; right: 6px; top: 50%;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0, var(--line) 3px,
    transparent 3px, transparent 6px
  );
  opacity: 0.7;
}
.spark.is-empty::after {
  content: "";
  position: absolute;
  right: 6px;
  top: calc(50% - 2px);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--line);
  opacity: 0.6;
}
.spark:hover { opacity: 1; }
.spark canvas, .spark > div { width: 100% !important; height: 100% !important; }

.rating-stars { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.rating-stars .num { color: var(--text-strong); font-weight: 600; }

.ext-link {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: var(--radius);
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.ext-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translate(1px, -1px);
}

/* =========================================================================
   SEARCH
   ========================================================================= */

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.search {
  position: relative;
  flex: 1;
  display: flex;
  gap: 10px;
}

.search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-strong);
  border-radius: var(--radius);
  padding: 0 14px 0 40px;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 13.5px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.search input::placeholder { color: var(--muted-2); }

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.search::before {
  content: "⌕";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}

.result-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* =========================================================================
   BADGES / TAGS / DETAIL
   ========================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--negative-soft);
  color: var(--negative);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.tags span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.tags span:hover { border-color: var(--accent); color: var(--accent); }

.release-history {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}
.release-history li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  color: var(--text-strong);
  transition: border-color 160ms ease, color 160ms ease;
}
.release-history li a:hover { border-color: var(--accent); color: var(--accent); }
.release-version { font-weight: 600; }
.release-date { font-size: 11px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.detail-grid > .panel { margin: 0; }

dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 18px;
  margin: 16px 0 0;
  font-size: 13.5px;
}

dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 2px;
}

dd { margin: 0; overflow-wrap: anywhere; color: var(--text-strong); font-family: var(--font-mono); font-size: 13px; }

dd a { color: var(--accent); border-bottom: 1px dashed transparent; transition: border-color 120ms ease; }
dd a:hover { border-bottom-color: var(--accent); }

.ext-header {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 28px;
}

.ext-mark {
  flex-shrink: 0;
  width: 76px; height: 76px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 100% at 0% 0%, var(--accent-soft), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: var(--display-weight);
  color: var(--accent);
  box-shadow: var(--shadow-card);
}

.ext-id { flex: 1; min-width: 0; }

/* =========================================================================
   FOOTER
   ========================================================================= */

.footer {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 36px 0 28px;
  margin-top: 48px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}

.footer a { color: var(--text); border-bottom: 1px dotted var(--muted-2); transition: color 120ms ease, border-color 120ms ease; }
.footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* =========================================================================
   PROSE (privacy / contact)
   ========================================================================= */

.prose {
  max-width: 720px;
  margin: 0 auto 22px;
  line-height: 1.7;
  font-size: 15px;
}

.prose h2 { font-size: 22px; margin-top: 36px; margin-bottom: 10px; }
.prose p  { margin: 12px 0; color: var(--text); }
.prose ul { padding-left: 22px; margin: 10px 0; }
.prose li { margin: 6px 0; color: var(--text); }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}
.prose a { color: var(--accent); border-bottom: 1px dashed transparent; transition: border-color 120ms ease; }
.prose a:hover { border-bottom-color: var(--accent); }

/* =========================================================================
   CONTACT FORM
   ========================================================================= */

.contact-form { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; }

.contact-form label span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 13.5px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  resize: vertical;
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.contact-form .botcheck {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.form-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.form-status { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.form-status.ok  { color: var(--positive); }
.form-status.err { color: var(--negative); }
.form-note { margin-top: 18px; font-size: 12.5px; }

/* =========================================================================
   SKELETON + RESPONSIVE
   ========================================================================= */

.skeleton { position: relative; overflow: hidden; }
.skeleton::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent);
  animation: shimmer 1.6s linear infinite;
}

@media (max-width: 980px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .card.hero { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav { min-height: 52px; gap: 12px; flex-wrap: wrap; }
  .brand em { display: none; }
  .links a { padding: 6px 8px; }
  .page-head, .ext-header { flex-direction: column; align-items: stretch; gap: 16px; padding-top: 36px; }
  .kpis { grid-template-columns: 1fr; }
  .panel { padding: 18px 16px; }
  .panel-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .chart-controls { justify-content: flex-start; }
  .crawler-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  dl { grid-template-columns: 1fr; gap: 4px 0; }
  dt { margin-top: 10px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   ===================== THEME FLAVOR LAYERS ===============================
   ========================================================================= */

/* ---------- WIN11 — Mica wallpaper, subtle hue, hairline borders ---------- */

[data-theme="win11"] body {
  background:
    radial-gradient(900px 600px at 15% -10%, rgb(0 103 192 / 10%), transparent 60%),
    radial-gradient(800px 600px at 100% 30%, rgb(125 60 200 / 6%), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

[data-theme="win11"] header {
  background: rgb(243 243 243 / 75%);
}

[data-theme="win11"] .panel,
[data-theme="win11"] .card,
[data-theme="win11"] .crawler-card,
[data-theme="win11"] .ext-mark {
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

[data-theme="win11"] .brand::before { border-radius: 4px; }

/* ---------- WIN10 — Metro flat, accent strip, sharp squares ---------- */

[data-theme="win10"] body {
  background: var(--bg);
}

[data-theme="win10"] header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}

[data-theme="win10"] .brand { font-weight: 300; font-size: 18px; letter-spacing: -0.005em; }
[data-theme="win10"] .brand::before { border-radius: 0; }
[data-theme="win10"] .brand em { color: var(--muted); }

[data-theme="win10"] .links a { font-weight: 400; border-radius: 0; }
[data-theme="win10"] .links a:hover { background: var(--panel-2); color: var(--text-strong); }
[data-theme="win10"] .links a.active { background: transparent; color: var(--text-strong); }
[data-theme="win10"] .links a.active::after { background: var(--accent); height: 3px; left: 12px; right: 12px; bottom: 0; }

[data-theme="win10"] .theme-switch { border-radius: 0; }
[data-theme="win10"] .theme-switch button { border-radius: 0; }

[data-theme="win10"] .panel,
[data-theme="win10"] .card,
[data-theme="win10"] .crawler-card,
[data-theme="win10"] .ext-mark {
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: none;
}

[data-theme="win10"] .panel { box-shadow: 0 2px 8px rgb(0 0 0 / 4%); }
[data-theme="win10"] .card:hover { transform: none; box-shadow: 0 2px 14px rgb(0 0 0 / 8%); }

/* Metro hero: bold accent-blue color block treatment */
[data-theme="win10"] .card.hero {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

[data-theme="win10"] .card.hero .card-label { color: rgb(255 255 255 / 80%); }
[data-theme="win10"] .card.hero .card-value { color: #ffffff; font-weight: 200; }
[data-theme="win10"] .card.hero .card-foot { color: rgb(255 255 255 / 75%); }
[data-theme="win10"] .card.hero .chip { background: rgb(255 255 255 / 18%); color: #ffffff; border-color: transparent; }

[data-theme="win10"] h1 { font-weight: 200; letter-spacing: -0.025em; }
[data-theme="win10"] h1 em { font-style: normal; font-weight: 400; }

[data-theme="win10"] .button {
  border-radius: 0;
  border: 1px solid var(--text-strong);
  background: transparent;
  color: var(--text-strong);
  font-weight: 400;
}

[data-theme="win10"] .button:hover {
  background: var(--text-strong);
  color: var(--bg);
  border-color: var(--text-strong);
}

[data-theme="win10"] .button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

[data-theme="win10"] .button--primary:hover {
  background: #005a9e;
  border-color: #005a9e;
  color: #ffffff;
}

[data-theme="win10"] .segmented { border-radius: 0; }
[data-theme="win10"] .segmented button { border-radius: 0; }

[data-theme="win10"] .search input { border-radius: 0; }
[data-theme="win10"] .contact-form input,
[data-theme="win10"] .contact-form textarea { border-radius: 0; }

[data-theme="win10"] .live-pill { border-radius: 0; }
[data-theme="win10"] .badge { border-radius: 0; }
[data-theme="win10"] .tags span { border-radius: 0; }
[data-theme="win10"] .chip { border-radius: 0; }
[data-theme="win10"] .rank { border-radius: 0; }
[data-theme="win10"] .ext-link { border-radius: 0; }

[data-theme="win10"] .ext-mark { background: var(--accent); color: #ffffff; border-color: var(--accent); }

/* ---------- SYNTHWAVE — bold neon, scanlines that don't kill text ---------- */

[data-theme="synthwave"] body {
  background:
    radial-gradient(1100px 600px at 50% -10%, rgb(255 54 212 / 32%), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgb(42 255 240 / 22%), transparent 55%),
    radial-gradient(900px 600px at 100% 100%, rgb(170 70 255 / 22%), transparent 55%),
    linear-gradient(180deg, #07021a 0%, #100530 100%);
  background-attachment: fixed;
}

/* Full-page CRT scanlines — louder than v2. Behind content (z=1) but visible. */
[data-theme="synthwave"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgb(0 0 0 / 55%) 2px 3px);
  mix-blend-mode: multiply;
  opacity: 0.55;
}

/* Strong corner vignette */
[data-theme="synthwave"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 100% 85% at 50% 50%, transparent 50%, rgb(0 0 0 / 70%) 100%);
}

[data-theme="synthwave"] header {
  background: rgb(7 2 26 / 92%);
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 4px 30px rgb(255 54 212 / 25%);
}

[data-theme="synthwave"] .brand {
  font-family: "VT323", monospace;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px var(--accent),
    0 0 20px rgb(255 54 212 / 60%),
    0 0 40px rgb(255 54 212 / 30%);
}

[data-theme="synthwave"] .brand::before {
  background: var(--live);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 18px var(--live);
}

[data-theme="synthwave"] .brand em {
  font-family: var(--font-ui);
  text-shadow: none;
  color: var(--accent);
}

[data-theme="synthwave"] .links a { text-transform: uppercase; font-size: 12px; letter-spacing: 0.06em; }

[data-theme="synthwave"] h1 {
  text-transform: uppercase;
  letter-spacing: 0.005em;
  text-shadow:
    0 0 20px rgb(255 54 212 / 40%),
    0 0 40px rgb(255 54 212 / 20%);
}

[data-theme="synthwave"] h1 em {
  color: var(--live);
  text-shadow:
    0 0 22px rgb(42 255 240 / 60%),
    0 0 44px rgb(42 255 240 / 30%);
}

[data-theme="synthwave"] .card.hero .card-value {
  text-shadow:
    0 0 24px var(--accent-ring),
    0 0 48px rgb(255 54 212 / 30%);
}

[data-theme="synthwave"] .panel,
[data-theme="synthwave"] .crawler-card,
[data-theme="synthwave"] .card {
  border: 1px solid var(--line);
  background: var(--panel);                /* very transparent — glow bleeds through */
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
}

/* Neon piping at the top of every panel */
[data-theme="synthwave"] .panel::before,
[data-theme="synthwave"] .card.hero::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--live), var(--accent));
  background-size: 200% 100%;
  animation: neon-flow 4s linear infinite;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 0 12px var(--accent);
}

[data-theme="synthwave"] .card.hero { overflow: hidden; }

@keyframes neon-flow {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

[data-theme="synthwave"] .panel.featured {
  border-color: var(--live);
}

[data-theme="synthwave"] .panel.featured::before {
  background: linear-gradient(90deg, var(--live), var(--accent), var(--live));
  background-size: 200% 100%;
  box-shadow: 0 0 12px var(--live);
}

[data-theme="synthwave"] .live-pill[data-state="running"]::before {
  box-shadow: 0 0 0 0 var(--live), 0 0 14px var(--live);
}

[data-theme="synthwave"] .button--primary {
  background: var(--accent);
  color: #07021a;
  border: 1px solid var(--accent);
  text-shadow: none;
  font-weight: 700;
  box-shadow: 0 0 20px rgb(255 54 212 / 50%);
}

[data-theme="synthwave"] .button--primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 0 28px rgb(255 142 232 / 60%);
}

[data-theme="synthwave"] .button {
  color: var(--text-strong);
}

[data-theme="synthwave"] .eyebrow {
  text-shadow: 0 0 10px var(--accent-ring);
}

[data-theme="synthwave"] tbody tr:hover { background: rgb(255 54 212 / 8%); }

[data-theme="synthwave"] .ext-link {
  color: var(--live);
  border-color: var(--live);
  background: rgb(42 255 240 / 8%);
}

[data-theme="synthwave"] .ext-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 12px var(--accent-ring);
}

/* Animated perspective grid floor */
[data-theme="synthwave"] .footer {
  position: relative;
  border-top: 1px solid var(--accent);
  box-shadow: 0 -4px 30px rgb(255 54 212 / 20%);
  margin-top: 80px;
}

[data-theme="synthwave"] .footer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 200vw;
  height: 120px;
  transform: translateX(-50%);
  background-image:
    linear-gradient(rgb(255 54 212 / 35%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 54 212 / 35%) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: translateX(-50%) perspective(140px) rotateX(58deg);
  transform-origin: 50% 0%;
  mask-image: linear-gradient(180deg, var(--accent) 0%, transparent 95%);
  pointer-events: none;
  z-index: -1;
}

/* ---------- WINXP — Luna blue gradient titlebars, raised buttons ---------- */

[data-theme="winxp"] body {
  background:
    /* Bliss-ish soft sky gradient */
    linear-gradient(180deg, #5b9bd5 0%, #aacde0 40%, #ece9d8 60%, #ece9d8 100%);
  background-attachment: fixed;
}

[data-theme="winxp"] header {
  background: linear-gradient(180deg, #0a55c9 0%, #1d6dde 45%, #0a4ec4 100%);
  border-bottom: 1px solid #03286b;
  box-shadow: 0 1px 0 rgb(255 255 255 / 20%) inset;
}

[data-theme="winxp"] .brand,
[data-theme="winxp"] .links a { color: #ffffff; text-shadow: 1px 1px 1px rgb(0 0 0 / 40%); }
[data-theme="winxp"] .brand em { color: #cfe0f7; }
[data-theme="winxp"] .links a { font-weight: 700; }
[data-theme="winxp"] .links a:hover, [data-theme="winxp"] .links a.active {
  background: rgb(255 255 255 / 18%);
  color: #ffffff;
}
[data-theme="winxp"] .links a.active::after { background: #ffd800; }

[data-theme="winxp"] .brand::before {
  background: linear-gradient(180deg, #79c84b, #4e9b1c);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgb(255 255 255 / 60%), 0 0 0 1px #1f6c0a;
}

[data-theme="winxp"] .theme-switch { background: rgb(255 255 255 / 18%); border-color: rgb(255 255 255 / 30%); }
[data-theme="winxp"] .theme-switch button { color: rgb(255 255 255 / 80%); }
[data-theme="winxp"] .theme-switch button.active { background: #ffd800; color: #000; }

[data-theme="winxp"] .panel,
[data-theme="winxp"] .card,
[data-theme="winxp"] .crawler-card {
  border: 1px solid #7ba0d4;
  background: var(--panel);
  border-radius: 6px;
}

[data-theme="winxp"] .panel-head { border-bottom: 1px solid #c5d3ea; }

[data-theme="winxp"] .button {
  background: linear-gradient(180deg, #ffffff, #d6e4f5 50%, #b6c8e0);
  border: 1px solid #003c74;
  border-radius: 3px;
  font-weight: 700;
  color: #000;
  text-shadow: 0 1px 0 rgb(255 255 255 / 70%);
}

[data-theme="winxp"] .button:hover { background: linear-gradient(180deg, #ffffff, #e7f1ff 50%, #c8d8f0); color: #000; border-color: #003c74; }

[data-theme="winxp"] .button--primary {
  background: linear-gradient(180deg, #79c84b 0%, #5cae23 50%, #3e8108 100%);
  border: 1px solid #1f6c0a;
  color: #fff;
  text-shadow: 0 -1px 0 rgb(0 0 0 / 30%);
}

[data-theme="winxp"] .button--primary:hover { background: linear-gradient(180deg, #8fe060 0%, #66c022 50%, #3e8108 100%); color: #fff; border-color: #1f6c0a; }

[data-theme="winxp"] h1 { font-weight: 700; letter-spacing: -0.02em; }

/* ---------- AURORA — photographic gradient, glass cards, minimal radius ---------- */

[data-theme="aurora"] body {
  background:
    /* Sun glow bottom-left */
    radial-gradient(900px 700px at 5% 110%, rgb(255 154 109 / 55%), transparent 55%),
    /* Magenta cloud top-right */
    radial-gradient(1100px 800px at 100% -10%, rgb(218 110 195 / 45%), transparent 55%),
    /* Cyan haze middle */
    radial-gradient(1200px 900px at 80% 60%, rgb(120 170 255 / 30%), transparent 60%),
    /* Deep base */
    linear-gradient(160deg, #050818 0%, #0a0d18 60%, #1a1428 100%);
  background-attachment: fixed;
}

[data-theme="aurora"] body::before {
  /* Subtle film grain to keep gradients from feeling banded / AI-flat */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.5;
}

[data-theme="aurora"] header {
  background: rgb(10 13 24 / 50%);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}

[data-theme="aurora"] .panel,
[data-theme="aurora"] .card,
[data-theme="aurora"] .crawler-card,
[data-theme="aurora"] .ext-mark {
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  background:
    linear-gradient(160deg, rgb(255 255 255 / 5%), rgb(255 255 255 / 1%)),
    var(--panel);
}

[data-theme="aurora"] .panel.featured {
  background:
    linear-gradient(160deg, rgb(255 154 109 / 14%), rgb(142 197 255 / 8%) 100%),
    var(--panel);
}

[data-theme="aurora"] h1 {
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

[data-theme="aurora"] h1 em {
  font-style: italic;
  font-weight: 300;
  /* Sunrise gradient across the italic word */
  background: linear-gradient(110deg, #ff9a6d 0%, #ff7eb6 40%, #b388ff 70%, #8ec5ff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: aurora-flow 12s ease-in-out infinite;
}

@keyframes aurora-flow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

[data-theme="aurora"] .card.hero .card-value {
  font-weight: 300;
  background: linear-gradient(110deg, #ffffff 0%, #ffd1b8 60%, #ffb0d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="aurora"] .brand {
  font-weight: 400;
}

[data-theme="aurora"] .brand::before {
  background: linear-gradient(135deg, #ff9a6d, #ff7eb6, #8ec5ff);
  box-shadow: 0 0 0 3px rgb(255 154 109 / 14%), 0 0 22px rgb(255 154 109 / 50%);
}

[data-theme="aurora"] .eyebrow {
  background: linear-gradient(90deg, #ff9a6d, #ff7eb6 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="aurora"] .eyebrow::before { background: #ff9a6d; }

[data-theme="aurora"] .button--primary {
  background: linear-gradient(120deg, #ff9a6d, #ff7eb6);
  color: #0a0d18;
  border: 0;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgb(255 154 109 / 50%);
}

[data-theme="aurora"] .button--primary:hover {
  background: linear-gradient(120deg, #ffb088, #ffa0cc);
  color: #0a0d18;
  box-shadow: 0 14px 34px -10px rgb(255 154 109 / 60%);
}

[data-theme="aurora"] tbody tr:hover {
  background: linear-gradient(90deg, rgb(255 154 109 / 8%), transparent);
}

[data-theme="aurora"] .ext-link {
  background: rgb(255 255 255 / 5%);
  border-color: rgb(255 255 255 / 10%);
}

[data-theme="aurora"] .ext-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
