/* ============================================================================
   Snellius — colour palette   (primary colours: white · red · blue · yellow)
   ----------------------------------------------------------------------------
   This is the one place to change the site's colours.

   HOW IT WORKS
   • index.html ships with a built-in copy of these same values, and then links
     this file AFTER them — so whatever you set here WINS. Edit values here and
     refresh index.html in your browser; you never need to touch index.html.
   • Colours are read both by the CSS (text, buttons) and by the canvas script
     that draws the ray, so one change updates everything at once.

   WHERE EACH COLOUR SHOWS UP
     --bg .......... page background (white)
     --ink ......... headings, body emphasis, θ₁/n₁/point labels
     --muted ....... secondary text and the "normal"/"interface" captions
     --ray ......... the light ray, its arrows and glow            (RED)
     --ray-soft .... the faint, not-yet-travelled part of the ray  (keep alpha < 1)
     --blue ........ interface line, dashed normal, angle arcs, n₂,
                     and interactive states (nav hover, button)    (BLUE)
     --medium ...... the denser medium washed below the interface  (pale BLUE, alpha < 1)
     --yellow ...... the glowing head of the light + travelling spark (YELLOW)
     --yellow-soft . the outer edge of that glow — same hue, alpha 0

   THE THREE BLOCKS BELOW
     1. :root .......................... LIGHT palette (the default)
     2. @media (prefers-color-scheme: dark) ... DARK palette, auto by OS setting
     3. :root[data-theme="dark"] ....... same dark palette when forced explicitly
   Keep every token defined in all blocks, or a colour can go missing in a theme.
   ========================================================================== */

/* 1 · LIGHT ---------------------------------------------------------------- */
:root{
  --bg:          #FFFFFF;
  --ink:         #111318;
  --muted:       #8A9199;
  --ray:         #FF0000;             /* #E30613 primary red */
  --ray-soft:    rgba(227,6,19,.15);
  --blue:        #0A4FCB;             /* primary blue */
  --medium:      rgba(10,79,203,.10);
  --yellow:      #FFCE00;             /* primary yellow */
  --yellow-soft: rgba(255,206,0,0);
}

/* 2 · DARK (automatic, follows the viewer's OS setting) -------------------- */
/* The :not([data-theme="light"]) guard lets an explicit light choice beat a dark OS. */
/* Flattened (no CSS nesting) so browsers predating native nesting still get dark mode. */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:          #0B0E13;
    --ink:         #ECEFF3;
    --muted:       #7E8894;
    --ray:         #FF3B30;
    --ray-soft:    rgba(255,59,48,.22);
    --blue:        #4C86FF;
    --medium:      rgba(76,134,255,.14);
    --yellow:      #FFD429;
    --yellow-soft: rgba(255,212,41,0);
  }
}

/* 3 · DARK (explicit — wins even on a light OS) ---------------------------- */
:root[data-theme="dark"]{
  --bg:          #0B0E13;
  --ink:         #ECEFF3;
  --muted:       #7E8894;
  --ray:         #FF3B30;
  --ray-soft:    rgba(255,59,48,.22);
  --blue:        #4C86FF;
  --medium:      rgba(76,134,255,.14);
  --yellow:      #FFD429;
  --yellow-soft: rgba(255,212,41,0);
}

/* ============================================================================
   TWEAKS YOU MIGHT WANT
   • Bolder Mondrian primaries:  --ray:#ED1C24;  --blue:#0033A0;  --yellow:#FFD200;
   • Softer / pastel version:    --ray:#E4572E;  --blue:#3A6EA5;  --yellow:#F2C14E;
   • Stronger blue medium (more visible water): raise --medium's alpha, e.g.
       --medium: rgba(10,79,203,.16);
   • Fade the diagram labels more or less: this is in index.html, not here —
       search for  const LABEL_ALPHA = 0.5   (0 = invisible, 1 = full strength).

   FORCING A THEME (optional)
   By default the site follows the viewer's OS light/dark setting. To lock one,
   add an <html> tag at the very top of index.html with:
       <html data-theme="light">   or   <html data-theme="dark">
   ========================================================================== */
