/* Dark mode for all three pages: black and white swap (a soft near-black and off-white, so nothing glares), the blue and green stay (a shade lighter where they are text on
   black, so they stay readable). It follows the device's setting unless the visitor picked one with the moon / sun button
   (sn.js stores it; a one-line script in each page's <head> applies it before the first paint).
   Every page reads its colours from these variables; the light values are in each page's own :root. */
:root { --surface: #fff; --on-fg: #fff; --btn-hover: #000; --nav-bg: rgba(255,255,255,.8); --float: rgba(255,255,255,.92);
  --toast-bg: rgba(29,29,31,.92); --ink: 0,0,0; --placeholder: #c7c7cc; --warn-bg: #fdf3e2; --sel-fill: #0a5fd0;
  --track: #e3e3e8; --track-fill: #b9b9c0; --soft: #e8e8ed; --sel-bg: #eef4fd;
  --draw: #3b73c7; --edge: transparent;
  --hero-glow: radial-gradient(ellipse 42% 215px at 50% 270px, rgba(10,95,208,.13), rgba(10,95,208,.045) 55%, transparent 85%); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0e10; --bg-alt: #1c1c1f; --surface: #26262a; --fg: #e6e6e9; --text: #e6e6e9; --on-fg: #121214; --btn-hover: #f5f5f7;
    --muted: #9b9ba1; --faint: #7d7d83; --line: #36363b; --soft: #2c2c31; --placeholder: #6a6a70;
    --nav-bg: rgba(14,14,16,.78); --float: rgba(44,44,49,.94); --toast-bg: rgba(230,230,233,.95); --ink: 230,230,233;
    --sel: #3a86f0; --link: #3a86f0; --sel-fill: #0a5fd0; --hl: #3a86f0; --sel-bg: #10233d;
    --good: #2fb866; --good-bg: #10281a; --bad: #f2575b; --bad-bg: #351517; --warn: #e89c22; --warn-bg: #30230c;
    --track: #27272b; --track-fill: #5c5c62;
    --stage: #202024; --draw: #7ea6e0;
    --edge: rgba(255,255,255,.06); --hero-glow: radial-gradient(ellipse 42% 215px at 50% 270px, rgba(58,134,240,.16), rgba(58,134,240,.05) 55%, transparent 85%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e10; --bg-alt: #1c1c1f; --surface: #26262a; --fg: #e6e6e9; --text: #e6e6e9; --on-fg: #121214; --btn-hover: #f5f5f7;
  --muted: #9b9ba1; --faint: #7d7d83; --line: #36363b; --soft: #2c2c31; --placeholder: #6a6a70;
  --nav-bg: rgba(14,14,16,.78); --float: rgba(44,44,49,.94); --toast-bg: rgba(230,230,233,.95); --ink: 230,230,233;
  --sel: #3a86f0; --link: #3a86f0; --sel-fill: #0a5fd0; --hl: #3a86f0; --sel-bg: #10233d;
  --good: #2fb866; --good-bg: #10281a; --bad: #f2575b; --bad-bg: #351517; --warn: #e89c22; --warn-bg: #30230c;
  --track: #27272b; --track-fill: #5c5c62;
  --stage: #202024; --draw: #7ea6e0;
    --edge: rgba(255,255,255,.06); --hero-glow: radial-gradient(ellipse 42% 215px at 50% 270px, rgba(58,134,240,.16), rgba(58,134,240,.05) 55%, transparent 85%);
}

/* the moon / sun button beside EN / SQ */
.theme-btn { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--faint); cursor: pointer; }
.theme-btn:hover { color: var(--fg); background: var(--soft); }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .sun { display: block; } :root:not([data-theme="light"]) .theme-btn .moon { display: none; } }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }

/* Point Computers' logo is white; the light pages draw it black, on black it shows as it is */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img[src$="point-computers.png"] { filter: none; } }
:root[data-theme="dark"] img[src$="point-computers.png"] { filter: none; }

/* Cards get a faint edge in dark mode (light mode has none: --edge is transparent there), since on near-black a card one
   shade lighter than the page barely shows. Cards with a 2px border take it in place of their transparent border (each
   page's own rule reads var(--edge)); the borderless ones get it as a 1px inset line. */
.rest, .sheet, .rec-hint, .picker-note, .empty, .verdict, .pc, .vis, .shop { box-shadow: inset 0 0 0 1px var(--edge); }

/* a faint blue glow behind the landing page's headline (light: the site's blue on white; dark: a lighter blue on black) */
.hero { background: var(--hero-glow); }
