/* =========================================================================
   Epoché — colour themes (2026-08-13)
   -------------------------------------------------------------------------
   The one place the palette is DECIDED. Every stylesheet reads these root
   tokens (the 2026-08-13 sweep converted ~470 literal call-sites to
   var(--th-*)); plates.css re-exports them as the .pl aliases. A theme is a
   class on <html> — `theme-brass`, `theme-lapis`, … — applied pre-paint by
   the head boot script from localStorage `epoche_theme_color`, and switched
   live from Settings. No class = Verdigris, the house default.

   Day mode composes on top: the whole page runs through
   `filter: invert(1) hue-rotate(180deg)` (plates.css §daymode), so every
   theme gets its day face free. The only day-tuned tokens here are the
   --th-day-acc pair, read by the feed's counter-inverted panel.

   Held constant across themes, by design: subject pigments, the success /
   warn semantics (two exceptions below where a theme collides with them),
   strata bands, avatars, and every canvas/WebGL surface — plate art, star
   skies, the globes. Those are artwork and keep the house verdigris the
   same way they keep their night skies in day mode.
   ========================================================================= */

html{
  /* accent — Verdigris, the default */
  --th-acc:#84b680;      --th-acc-rgb:132,182,128;
  --th-hi:#a7cfa2;       --th-hi-rgb:167,207,162;
  --th-deep:#5f9160;     --th-deep-rgb:95,145,96;
  --th-acc-ink:#08190e;  /* text on an accent-filled surface */
  --th-tint:#b2d6b0;     /* the pale reading tint (stat numerals, active pills) */
  --th-day-acc:#568653;  --th-day-acc-rgb:86,134,83; /* counter-inverted feed only */
  /* ground — the night key */
  --th-paper:#06090e; --th-card:#101720; --th-card2:#0b1014; --th-well:#04060a;
  --th-ink:#ece7dd;   --th-ink-rgb:236,231,221;
  --th-ink2:#b3aca0;  --th-ink3:#7e786d;
}

/* ── Brass — the black & gold the app wore before August ─────────────── */
html.theme-brass{
  --th-acc:#d3a95c;      --th-acc-rgb:211,169,92;
  --th-hi:#ecca88;       --th-hi-rgb:236,202,136;
  --th-deep:#a37a2f;     --th-deep-rgb:163,122,47;
  --th-acc-ink:#221604;
  --th-tint:#e3c68f;
  --th-day-acc:#8a6a24;  --th-day-acc-rgb:138,106,36;
}

/* ── Lapis — the field pigment promoted to the accent chair ──────────── */
html.theme-lapis{
  --th-acc:#8fa3ff;      --th-acc-rgb:143,163,255;
  --th-hi:#b7c3ff;       --th-hi-rgb:183,195,255;
  --th-deep:#6377d6;     --th-deep-rgb:99,119,214;
  --th-acc-ink:#0a0f2b;
  --th-tint:#c3cdff;
  --th-day-acc:#4757b8;  --th-day-acc-rgb:71,87,184;
}
/* lapis IS the philosophy pigment and the success moss — shift both a step
   so "correct" and the subject chip stay distinguishable from the accent */
html.theme-lapis .pl{
  --p-phil:#9b8fe8;
  --moss:#72c39a; --moss-soft:rgba(114,195,154,0.14);
}

/* ── Oxide — fired clay against the night ────────────────────────────── */
html.theme-oxide{
  --th-acc:#d4805e;      --th-acc-rgb:212,128,94;
  --th-hi:#eda683;       --th-hi-rgb:237,166,131;
  --th-deep:#a75937;     --th-deep-rgb:167,89,55;
  --th-acc-ink:#240e04;
  --th-tint:#ecb59c;
  --th-day-acc:#b25f3b;  --th-day-acc-rgb:178,95,59;
}
/* oxide IS the warn semantic and sits on the politics pigment — push warn
   clearly red so destructive actions never read as primary */
html.theme-oxide .pl{
  --oxide:#cd5647; --oxide-soft:rgba(205,86,71,0.14);
  --p-pol:#b8697a;
}

/* ── Quiet — no accent hue; ivory carries every action ───────────────── */
html.theme-quiet{
  --th-acc:#ece7dd;      --th-acc-rgb:236,231,221;
  --th-hi:#ffffff;       --th-hi-rgb:255,255,255;
  --th-deep:#b3ab9c;     --th-deep-rgb:179,171,156;
  --th-acc-ink:#16120b;
  --th-tint:#f4f1ea;
  --th-day-acc:#4a453c;  --th-day-acc-rgb:74,69,60;
}

/* ── Candlelight — the ground itself goes warm; brass key on umber ───── */
html.theme-candle{
  --th-acc:#dcaf62;      --th-acc-rgb:220,175,98;
  --th-hi:#f3cf8e;       --th-hi-rgb:243,207,142;
  --th-deep:#ab7d31;     --th-deep-rgb:171,125,49;
  --th-acc-ink:#241703;
  --th-tint:#ecd29b;
  --th-day-acc:#8a6420;  --th-day-acc-rgb:138,100,32;
  --th-paper:#0c0907; --th-card:#191209; --th-card2:#120d07; --th-well:#070503;
  --th-ink:#efe3cd;   --th-ink-rgb:239,227,205;
  --th-ink2:#b9a98d;  --th-ink3:#857659;
}
