/* Shared theme for the station site: home page, /propagation, /feeds.
   Served from the site root as /theme.css. Page stylesheets load after it
   and only add their own components; colours and fonts come from here. */

:root {
  color-scheme: light dark;

  /* surfaces (Tailwind slate) */
  --bg:     #f1f5f9;
  --card:   #ffffff;
  --line:   #cbd5e1;
  --text:   #0f172a;
  --muted:  #64748b;
  --shadow: 0 1px 4px rgba(0, 0, 0, .15);

  /* accents */
  --accent: #0284c7;   /* links, selection, buttons */
  --amber:  #b45309;   /* station brand colour outside the LCD */

  /* status (propagation) */
  --ok:   #15803d;
  --warn: #b45309;
  --bad:  #b91c1c;
  --off:  #94a3b8;
  --ok-bg:   rgba(21, 128, 61, .12);
  --warn-bg: rgba(180, 83, 9, .12);
  --off-bg:  rgba(148, 163, 184, .18);
  --banner-bg: #fef3c7;
  --banner-fg: #78350f;

  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* the LCD is a physical display: same in light and dark */
  --lcd:      #ffb000;
  --lcd-dim:  #4a3600;
  --lcd-glow: rgba(255, 176, 0, .45);
  --lcd-bg:   #120d00;
}

/* Dark: follows the system unless the visitor picked a theme with the toggle
   (stored in localStorage, set as data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:     #0f172a;
    --card:   #1e293b;
    --line:   #334155;
    --text:   #e2e8f0;
    --muted:  #94a3b8;
    --shadow: 0 1px 4px rgba(0, 0, 0, .35);

    --accent: #38bdf8;
    --amber:  #fbbf24;

    --ok:   #4ade80;
    --warn: #fbbf24;
    --bad:  #f87171;
    --off:  #64748b;
    --ok-bg:   rgba(74, 222, 128, .16);
    --warn-bg: rgba(251, 191, 36, .16);
    --off-bg:  rgba(71, 85, 105, .3);
    --banner-bg: #422006;
    --banner-fg: #fde68a;
  }
}
:root[data-theme="dark"] {
  --bg:     #0f172a;
  --card:   #1e293b;
  --line:   #334155;
  --text:   #e2e8f0;
  --muted:  #94a3b8;
  --shadow: 0 1px 4px rgba(0, 0, 0, .35);

  --accent: #38bdf8;
  --amber:  #fbbf24;

  --ok:   #4ade80;
  --warn: #fbbf24;
  --bad:  #f87171;
  --off:  #64748b;
  --ok-bg:   rgba(74, 222, 128, .16);
  --warn-bg: rgba(251, 191, 36, .16);
  --off-bg:  rgba(71, 85, 105, .3);
  --banner-bg: #422006;
  --banner-fg: #fde68a;
}
:root[data-theme="light"] {
  /* surfaces (Tailwind slate) */
  --bg:     #f1f5f9;
  --card:   #ffffff;
  --line:   #cbd5e1;
  --text:   #0f172a;
  --muted:  #64748b;
  --shadow: 0 1px 4px rgba(0, 0, 0, .15);

  /* accents */
  --accent: #0284c7;   /* links, selection, buttons */
  --amber:  #b45309;   /* station brand colour outside the LCD */

  /* status (propagation) */
  --ok:   #15803d;
  --warn: #b45309;
  --bad:  #b91c1c;
  --off:  #94a3b8;
  --ok-bg:   rgba(21, 128, 61, .12);
  --warn-bg: rgba(180, 83, 9, .12);
  --off-bg:  rgba(148, 163, 184, .18);
  --banner-bg: #fef3c7;
  --banner-fg: #78350f;
  color-scheme: light;
}

:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
}
a { color: var(--accent); }
