/* colata design tokens (M-030), values from the design "Monitor · jedna mapa".
   Light theme on :root. Dark theme when the visitor chose it (data-theme="dark",
   rendered by the server from the "theme" cookie) or, without a choice, when
   the system prefers dark. The dark block is repeated because CSS cannot share
   one rule between a selector and a media query. */

:root {
  /* brand */
  --brand: #ffcf06;
  --brand-strong: #ebbd00;
  --brand-deep: #c18d00;
  --brand-ink: #262626;
  --page: #fafbfd;

  /* fonts */
  --font-sans: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-size: 14px;

  /* state accents (same in both themes) */
  --red: #e23d3d;
  --yel: #ebbd00;
  --org: #f46d5b;
  --grn: #1f9d5c;
  --blu: #3f6fd8;
  --pur: #8a5ad8;
  --gry: #6b6b6b;

  color-scheme: light;

  /* theme */
  --panel: #ffffff;
  --ink: #262626;
  --mute: #6b6b6b;
  --soft: #f2f4f7;
  --line: #eff2f7;
  --line2: #e3e7ee;
  --bg: #d4dee6;
  --halo: #ffffff;
  --shadow: 0 4px 24px rgba(0, 0, 0, .12);
  --redBg: #fde3e3;
  --redFg: #b21f1f;

  /* state backgrounds and text (light) */
  --yelBg: #fff3c1;
  --yelFg: #7a5a00;
  --orgBg: #ffe4df;
  --orgFg: #9a2f1f;
  --grnBg: #ccffd4;
  --grnFg: #1d6b3f;
  --bluBg: #e3ebfb;
  --bluFg: #24479a;
  --purBg: #efe7fb;
  --purFg: #5a3596;
  --gryBg: #eff2f7;
  --gryFg: #424242;
}

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

  --panel: #1c1d20;
  --ink: #f2f2f2;
  --mute: #a9a9a9;
  --soft: #2a2b2f;
  --line: #2e2f33;
  --line2: #3a3b40;
  --bg: #121820;
  --halo: #1d1e21;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 8px 24px rgba(0, 0, 0, .55);
  --redBg: rgba(226, 61, 61, .22);
  --redFg: #ff9a9a;

  --yelBg: rgba(255, 207, 6, .2);
  --yelFg: #ffd84d;
  --orgBg: rgba(244, 109, 91, .22);
  --orgFg: #ffab9e;
  --grnBg: rgba(91, 216, 153, .18);
  --grnFg: #5bd899;
  --bluBg: rgba(63, 111, 216, .22);
  --bluFg: #9bb8f5;
  --purBg: rgba(138, 90, 216, .22);
  --purFg: #c7a8f5;
  --gryBg: #2a2b2f;
  --gryFg: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    --panel: #1c1d20;
    --ink: #f2f2f2;
    --mute: #a9a9a9;
    --soft: #2a2b2f;
    --line: #2e2f33;
    --line2: #3a3b40;
    --bg: #121820;
    --halo: #1d1e21;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 8px 24px rgba(0, 0, 0, .55);
    --redBg: rgba(226, 61, 61, .22);
    --redFg: #ff9a9a;

    --yelBg: rgba(255, 207, 6, .2);
    --yelFg: #ffd84d;
    --orgBg: rgba(244, 109, 91, .22);
    --orgFg: #ffab9e;
    --grnBg: rgba(91, 216, 153, .18);
    --grnFg: #5bd899;
    --bluBg: rgba(63, 111, 216, .22);
    --bluFg: #9bb8f5;
    --purBg: rgba(138, 90, 216, .22);
    --purFg: #c7a8f5;
    --gryBg: #2a2b2f;
    --gryFg: #e0e0e0;
  }
}
