/* ── Hørsholmvejr — Design tokens (Direction B, LOCKED) ───────────────────
   See docs/01-design-tokens.md. All colour usage goes through these variables.
   Hero gradients stay the same in both themes; only the data zone swaps.     */

:root {
  /* shared accents */
  --cyan:    #62D6CC;
  --rain:    #5EA9E6;
  --horizon: #E0A36B;

  /* forecast model lines */
  --ecmwf: #C9522E;
  --dmi:   #2E6FB0;
  --yr:    #3E9B6C;

  /* type stacks */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* layout — ÉN kilde til sitets indholdsbredde. Ændr her, ikke pr. side.
     Brugt af nav, .wrap/hero-in på alle sider + den delte footer. (docs.php har
     sin egen bredere sidebar-layout og bruger den bevidst ikke.) */
  --maxw: 1320px;

  /* data zone — light (default) */
  --paper:   #EEF1EC;
  --surface: #FFFFFF;
  --ink:     #16202B;
  --muted:   #5E6B73;
  --line:    #D7DCD3;

  /* enigheds-tilstande (chips + forsidens conf-indikator) — tekst/bg pr. tilstand.
     Tekst mod effektiv bg (bg over --surface) opfylder WCAG AA (målt 19-07,
     se verification/chip-dots-spike.spec.js). Prik-stilen (fyldt/halvfyldt/hul)
     er den redundante kanal for farveblinde. */
  --agree-ok:     #27702c;              /* enige — succes-grøn */
  --agree-ok-bg:  rgba(46,125,50,.12);
  --agree-mid:    #8a6400;              /* nogenlunde — rav/amber */
  --agree-mid-bg: rgba(230,168,0,.14);
  --agree-bad:    #a8431d;              /* uenige — terracotta/rust (adskilt fra rav) */
  --agree-bad-bg: rgba(201,82,46,.12);
}

/* OS-level dark preference (but not if user explicitly chose light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #10171F;
    --surface: #161F29;
    --ink:     #E7ECEF;
    --muted:   #8A98A2;
    --line:    #26313B;

    --agree-ok:     #7bc47f;
    --agree-ok-bg:  rgba(62,155,108,.16);
    --agree-mid:    #e0b84f;
    --agree-mid-bg: rgba(230,168,0,.12);
    --agree-bad:    #e08a66;
    --agree-bad-bg: rgba(201,82,46,.16);
  }
}

/* manual dark override — always wins */
:root[data-theme="dark"] {
  --paper:   #10171F;
  --surface: #161F29;
  --ink:     #E7ECEF;
  --muted:   #8A98A2;
  --line:    #26313B;

  --agree-ok:     #7bc47f;
  --agree-ok-bg:  rgba(62,155,108,.16);
  --agree-mid:    #e0b84f;
  --agree-mid-bg: rgba(230,168,0,.12);
  --agree-bad:    #e08a66;
  --agree-bad-bg: rgba(201,82,46,.16);
}

/* manual light override — always wins */
:root[data-theme="light"] {
  --paper:   #EEF1EC;
  --surface: #FFFFFF;
  --ink:     #16202B;
  --muted:   #5E6B73;
  --line:    #D7DCD3;

  --agree-ok:     #27702c;
  --agree-ok-bg:  rgba(46,125,50,.12);
  --agree-mid:    #8a6400;
  --agree-mid-bg: rgba(230,168,0,.14);
  --agree-bad:    #a8431d;
  --agree-bad-bg: rgba(201,82,46,.12);
}
