/* Светлая тема по умолчанию; тёмная — html[data-theme="dark"] */

:root {
  --bg0: #f4f7fb;
  --bg1: #e8eef5;
  --card: rgba(255, 255, 255, 0.82);
  --card-border: rgba(15, 35, 55, 0.1);
  --text: #152033;
  --muted: #5c6b7e;
  --accent: #1fa968;
  --accent-2: #2f77e0;
  --warn: #d4890f;
  --danger: #d64545;
  --ok: #1fa968;
  --radius: 14px;
  --font: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --btn-bg: rgba(15, 35, 55, 0.04);
  --input-bg: #ffffff;
  --alert-bg: rgba(255, 255, 255, 0.65);
  --stat-bg: rgba(15, 35, 55, 0.04);
  --detail-bg: rgba(15, 35, 55, 0.03);
  --progress-track: rgba(15, 35, 55, 0.08);
  --surface-sticky: #eef3f8;
  --surface-thead: #e7eef6;
  --surface-head: #f7fafc;
  --glow-a: rgba(31, 169, 104, 0.14);
  --glow-b: rgba(47, 119, 224, 0.12);
  --shadow-sticky: 4px 0 10px rgba(20, 40, 60, 0.06);
  --on-accent: #04150c;
  --badge-bg: rgba(47, 119, 224, 0.12);
  --badge-fg: #2459b0;
  --badge-border: rgba(47, 119, 224, 0.28);
  --badge-live-bg: rgba(31, 169, 104, 0.12);
  --badge-live-fg: #147a4a;
  --badge-live-border: rgba(31, 169, 104, 0.3);
  --chart-tick: #5c6b7e;
  --chart-grid: rgba(15, 35, 55, 0.07);

  --weekly-article: #b45309;
  --weekly-grid: rgba(15, 35, 55, 0.07);
  --weekly-warn: rgba(212, 137, 15, 0.16);
  --weekly-info: rgba(47, 119, 224, 0.12);
  --weekly-ok: rgba(31, 169, 104, 0.14);
}

html[data-theme="dark"] {
  --bg0: #0f1419;
  --bg1: #172029;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #2bb673;
  --accent-2: #3d8bfd;
  --warn: #e8a838;
  --danger: #e85d5d;
  --ok: #2bb673;

  --btn-bg: rgba(255, 255, 255, 0.04);
  --input-bg: rgba(0, 0, 0, 0.25);
  --alert-bg: rgba(255, 255, 255, 0.03);
  --stat-bg: rgba(0, 0, 0, 0.18);
  --detail-bg: rgba(0, 0, 0, 0.2);
  --progress-track: rgba(255, 255, 255, 0.08);
  --surface-sticky: #141b22;
  --surface-thead: #121820;
  --surface-head: #172029;
  --glow-a: rgba(43, 182, 115, 0.18);
  --glow-b: rgba(61, 139, 253, 0.14);
  --shadow-sticky: 4px 0 8px rgba(0, 0, 0, 0.18);
  --on-accent: #04150c;
  --badge-bg: rgba(61, 139, 253, 0.15);
  --badge-fg: #9ec5ff;
  --badge-border: rgba(61, 139, 253, 0.25);
  --badge-live-bg: rgba(43, 182, 115, 0.15);
  --badge-live-fg: #8fe0b5;
  --badge-live-border: rgba(43, 182, 115, 0.3);
  --chart-tick: #8b9aab;
  --chart-grid: rgba(255, 255, 255, 0.04);

  --weekly-article: #e0a45e;
  --weekly-grid: rgba(255, 255, 255, 0.06);
  --weekly-warn: rgba(232, 168, 56, 0.14);
  --weekly-info: rgba(61, 139, 253, 0.14);
  --weekly-ok: rgba(43, 182, 115, 0.14);
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--glow-a), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, var(--glow-b), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.theme-toggle {
  margin-left: auto;
  font-family: var(--font);
  border: 1px solid var(--card-border);
  background: var(--btn-bg);
  color: var(--text);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: 0.15s ease;
}
.theme-toggle:hover {
  border-color: rgba(43, 182, 115, 0.45);
}
.theme-toggle .theme-icon {
  font-size: 0.95rem;
  line-height: 1;
}
