/* ============================================================
   THEME TOKENS
   ------------------------------------------------------------
   Every colour, font stack and color-scheme in the app, in one
   file because more than one page now needs them: index.html
   draws the dial, today/index.html prints the day's readings,
   and a palette kept in two places drifts within a week.

   Loaded as a stylesheet rather than inlined so both pages get
   the same bytes from the same cache entry. It must come BEFORE
   each page's own <style>, which is where the cascade expects
   it and where the inline copy used to sit.
   ============================================================ */

  :root{
    --ink:#0D1014;
    --ink-2:#151A21;
    --ink-3:#1E252E;
    --rule:#2B333E;
    --paper:#E9E5DA;
    --paper-dim:#9AA3AE;
    /* Harvested from the window itself, not chosen: the warmest gold in the
       photograph's own ten-colour reduction. See ROADMAP.md 0d. Was an
       arbitrary #C9A227. */
    --brass:#DAA233;

    /* The greys were literals scattered through the sheet, which meant there
       was no single place a second palette could be defined. They are named for
       their job rather than their value: dim-1 through dim-3 are the three
       steps of receding metadata, and warm/soft/quiet are the three weights of
       body text. Their dark values below are exactly what they always were. */
    --dim-1:#8E97A2;
    --dim-2:#6E7883;
    --dim-3:#5C6672;
    --fg-warm:#DCD6C8;
    --fg-soft:#CFC9BC;
    --fg-quiet:#C6C0B3;
    --glow:#1A222D;
    --scrim:rgba(5,7,10,.72);
    --shadow:rgba(0,0,0,.5);
    --swatch-edge:rgba(255,255,255,.28);
    /* The deep blue of the glass, available for the season dividers if they
       are ever made to echo the window rather than just sit next to it. */
    --glass-blue:#223FA2;

    --c-violet:#4B2E6E;
    /* Sarum blue. Many TEC parishes keep Advent in blue rather than violet, to
       distinguish its expectancy from Lent's penitence. `violet` is used by
       Advent and nothing else in the whole calendar, so the toggle is a single
       variable swap and needs no engine change. */
    --c-sarum:#2F4076;
    --c-violet-lent:#3B2851;
    --c-white:#EFE4C4;
    --c-green:#2E6B4E;
    --c-red:#A81F2D;
    --c-oxblood:#65212F;
    --c-bare:#20242B;

    --display:"Spectral",Georgia,"Times New Roman",serif;
    --ui:"Inter Tight",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    --mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;

    /* Tells the browser what to make of the controls it draws itself: the date
       inputs in the range dialog, scrollbars, and the default focus rings. */
    color-scheme:dark;
  }

/* ---- light ----
   The same design lit from the other side, not a different one. Only the
   neutrals move: the liturgical colours are the whole point of the dial and
   are not ours to retune for taste.

   Two of them do move, and both for the same reason -- they are defined by
   their relationship to the ground rather than by their hue. `white` is a warm
   near-white that has to read as a band against the page, so on cream it is
   deepened to a gold; `bare` is the colour of no colour and sits almost on top
   of the ground, so it follows the ground from near-black to near-cream. Give
   bare its dark value here and a ferial Tuesday becomes the loudest thing on
   the wheel.

   Written as an attribute rather than a media query because theme.js resolves
   the system preference itself and always writes an explicit value. That keeps
   the palette in one block instead of two, and this app requires JavaScript for
   anything at all -- the dial is drawn by it. */
:root[data-theme="light"]{
  --ink:#F5F1E7;
  --ink-2:#EDE8DA;
  --ink-3:#E3DDCB;
  --rule:#CCC3AF;
  --paper:#181C22;
  --paper-dim:#5F6773;
  --brass:#8A6014;

  --dim-1:#6B7481;
  --dim-2:#7C8590;
  --dim-3:#8C949E;
  --fg-warm:#2B3037;
  --fg-soft:#343A42;
  --fg-quiet:#3C424A;
  --glow:#FFFDF5;
  --scrim:rgba(38,32,22,.55);
  --shadow:rgba(70,58,40,.22);
  --swatch-edge:rgba(0,0,0,.30);

  --c-white:#E0CFA1;
  --c-bare:#E6E0D0;
  color-scheme:light;
}

:root[data-advent="blue"]{--c-violet:var(--c-sarum)}
