/* Editorial design tokens (paper / ink / garnet), adapted from the UN-HRDB tokens.
   Dark mode follows the OS (prefers-color-scheme); [data-theme] on <html> overrides. */
:root {
  --paper:        oklch(98% 0.008 75);
  --paper-2:      oklch(96% 0.010 75);
  --paper-3:      oklch(93% 0.012 75);
  --rule:         oklch(86% 0.013 75);
  --rule-soft:    oklch(91% 0.011 75);

  --ink:          #0f1117;
  --ink-2:        #2b2e35;
  --ink-3:        #45474f;
  --ink-4:        #60636a;

  --garnet:       oklch(45% 0.13 25);
  --garnet-2:     oklch(38% 0.12 25);
  --garnet-soft:  oklch(94% 0.04 25);
  --garnet-edge:  oklch(80% 0.06 25);

  --hl:           oklch(92% 0.10 95);     /* search highlight (vellum yellow) */
  --hl-edge:      oklch(80% 0.12 95);
  --hl-pdf:       oklch(88% 0.16 95 / .55); /* PDF overlay: stays light on the white page in both themes */

  /* Outcome semantics (zasadne = GAAR applied against the taxpayer) */
  --status-bad:          #b22222;
  --status-bad-soft:     #fdf2f2;
  --status-good:         #2c6e3a;
  --status-good-soft:    #f1f8f3;
  --status-neutral:      #6b6058;
  --status-neutral-soft: #f6f1ec;
  --status-neutral-edge: #b9ad9d;
  --status-warn:         #8a4a00;
  --status-warn-soft:    #fdf6ee;
  --status-warn-edge:    #c98e3f;

  --scrim:        rgba(15, 17, 23, .45);
  --shadow:       0 12px 40px rgba(15, 17, 23, .22);

  --display: 'Spectral', 'Iowan Old Style', Georgia, serif;
  --body:    'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:        oklch(16% 0.012 270);
    --paper-2:      oklch(19% 0.013 270);
    --paper-3:      oklch(23% 0.013 270);
    --rule:         oklch(30% 0.013 270);
    --rule-soft:    oklch(25% 0.013 270);
    --ink:          #eeeae5;
    --ink-2:        #c8c3bd;
    --ink-3:        #9c9791;
    --ink-4:        #a39d96;
    --garnet:       oklch(72% 0.11 25);
    --garnet-2:     oklch(78% 0.10 25);
    --garnet-soft:  oklch(28% 0.05 25);
    --garnet-edge:  oklch(40% 0.08 25);
    --hl:           oklch(40% 0.08 95);
    --hl-edge:      oklch(55% 0.10 95);
    --status-bad:          oklch(70% 0.14 25);
    --status-bad-soft:     oklch(25% 0.05 25);
    --status-good:         oklch(72% 0.10 150);
    --status-good-soft:    oklch(24% 0.04 150);
    --status-neutral:      oklch(72% 0.02 75);
    --status-neutral-soft: oklch(24% 0.012 75);
    --status-neutral-edge: oklch(45% 0.02 75);
    --status-warn:         oklch(74% 0.11 70);
    --status-warn-soft:    oklch(25% 0.04 70);
    --status-warn-edge:    oklch(50% 0.08 70);
    --scrim:        rgba(0, 0, 0, .6);
    --shadow:       0 12px 40px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --paper: oklch(16% 0.012 270); --paper-2: oklch(19% 0.013 270); --paper-3: oklch(23% 0.013 270);
  --rule: oklch(30% 0.013 270); --rule-soft: oklch(25% 0.013 270);
  --ink: #eeeae5; --ink-2: #c8c3bd; --ink-3: #9c9791; --ink-4: #a39d96;
  --garnet: oklch(72% 0.11 25); --garnet-2: oklch(78% 0.10 25); --garnet-soft: oklch(28% 0.05 25); --garnet-edge: oklch(40% 0.08 25);
  --hl: oklch(40% 0.08 95); --hl-edge: oklch(55% 0.10 95);
  --status-bad: oklch(70% 0.14 25); --status-bad-soft: oklch(25% 0.05 25);
  --status-good: oklch(72% 0.10 150); --status-good-soft: oklch(24% 0.04 150);
  --status-neutral: oklch(72% 0.02 75); --status-neutral-soft: oklch(24% 0.012 75); --status-neutral-edge: oklch(45% 0.02 75);
  --status-warn: oklch(74% 0.11 70); --status-warn-soft: oklch(25% 0.04 70); --status-warn-edge: oklch(50% 0.08 70);
  --scrim: rgba(0, 0, 0, .6); --shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
