/* R-Star Management — "Golden Hour" palette
   The amber of the Roanoke Star at golden hour, over the blue-purple of the far ridgelines.

   Hex first, oklch layered on top behind @supports. Reason: a custom property holding an
   unsupported color function does NOT fall back the way a normal declaration does, so hex
   has to be the base value, not the fallback.

   Two things to preserve if you extend this palette:
   - In DARK mode --accent-strong is LIGHTER than --accent, not darker. On a dark panel the
     emphatic value gains contrast by going up.
   - --accent alone is 3.68:1 on --paper in light mode. That is fine for graphics, icons and
     large display type, NOT for body copy or small labels. Use --accent-strong for text.

   Contrast, measured (WCAG 2.1 ratios):
                                LIGHT    DARK
     ink        on paper        15.33    16.14
     ink        on panel        14.46    14.50
     ink        on accent-tint  13.52    12.35
     ink-soft   on paper         5.31     8.10
     ink-soft   on panel         5.01     7.28
     accent-str on paper         6.65    11.78
     accent-str on accent-tint   5.86     9.02
     paper      on accent-str    6.65    11.78   (primary button)
   All text pairs pass AA at body size; dollar amounts and due dates sit on
   ink/paper or ink/accent-tint, the two highest pairs in the set.
*/

:root {
  --paper:          #fff9f3;                       /* warm near-white */
  --panel:          #faf2ea;
  --ink:            #202030;                       /* far-ridge blue-purple */
  --ink-soft:       #676777;
  --accent:         #cc6600;                       /* the star, lit — graphics & large text only */
  --accent-strong:  #9b3b08;                       /* buttons, links, small text */
  --accent-tint:    #ffe8d2;
  --rule:           #e5dcd4;

  --font-heading: 'Newsreader', Georgia, serif;   /* weights 500, 600 */
  --font-body:    'Karla', system-ui, sans-serif; /* weights 400, 600, 700 */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:          #121021;
    --panel:          #1d1b2e;
    --ink:            #f4ede6;
    --ink-soft:       #b3a99e;
    --accent:         #fda856;
    --accent-strong:  #ffc273;
    --accent-tint:    #292743;
    --rule:           #343344;
  }
}

:root[data-theme="dark"] {
  --paper:          #121021;
  --panel:          #1d1b2e;
  --ink:            #f4ede6;
  --ink-soft:       #b3a99e;
  --accent:         #fda856;
  --accent-strong:  #ffc273;
  --accent-tint:    #292743;
  --rule:           #343344;
}

/* oklch overlay — identical colors, wider gamut where supported */
@supports (color: oklch(0.5 0.1 60)) {
  :root {
    --paper:          oklch(0.985 0.010 68);
    --panel:          oklch(0.965 0.014 68);
    --ink:            oklch(0.250 0.030 285);
    --ink-soft:       oklch(0.520 0.025 285);
    --accent:         oklch(0.620 0.160 55);
    --accent-strong:  oklch(0.480 0.140 42);
    --accent-tint:    oklch(0.945 0.040 65);
    --rule:           oklch(0.900 0.015 68);
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --paper:          oklch(0.185 0.035 288);
      --panel:          oklch(0.235 0.035 288);
      --ink:            oklch(0.950 0.012 70);
      --ink-soft:       oklch(0.740 0.020 70);
      --accent:         oklch(0.800 0.140 62);
      --accent-strong:  oklch(0.870 0.130 66);
      --accent-tint:    oklch(0.290 0.050 285);
      --rule:           oklch(0.330 0.030 288);
    }
  }
  :root[data-theme="dark"] {
    --paper:          oklch(0.185 0.035 288);
    --panel:          oklch(0.235 0.035 288);
    --ink:            oklch(0.950 0.012 70);
    --ink-soft:       oklch(0.740 0.020 70);
    --accent:         oklch(0.800 0.140 62);
    --accent-strong:  oklch(0.870 0.130 66);
    --accent-tint:    oklch(0.290 0.050 285);
    --rule:           oklch(0.330 0.030 288);
  }
}
