/* ===========================================================================
 * Dijiwa Design System — Dye Palette (chart surface)
 * ---------------------------------------------------------------------------
 * The chart-side sibling of tokens.css. Brand chrome and chart hues are
 * SIBLINGS — Cyan Green never appears as a chart series, and chart hues
 * never appear in chrome. Three temperature zones (cool / cool-neutral /
 * warm-reserved) prevent the uniform-temperature AI-default palette.
 *
 * Imported once on every dashboard HTML page.
 * login.html does not load this file (it links tokens.css + its own login.css).
 * =========================================================================== */

:root {
  /* =========================================================================
   * 2.2 Categorical palette — "Dijiwa Cool-Dye"
   * 8-slot, cool-pigment family of the same Balinese vernacular.
   *
   * ALL EIGHT SLOTS CLEAR `--pairs all` ON A WHITE CARD. Re-validate with:
   *   node scripts/validate_palette.js \
   *     "#2a78d6,#A83A2F,#0CA470,#e87ba4,#4a3aa7,#00B9E4,#881870,#C77F00" \
   *     --mode light --surface "#FFFFFF" --pairs all
   * -> worst all-pairs CVD ΔE 9.1 (dye-4 x dye-3, protan) · worst normal ΔE 15.3
   *    (dye-7 x dye-2). Gates are CVD >= 8 and normal-vision >= 15.
   *
   * `--pairs all` (not `--pairs adjacent`) is the honest pairlist here because a
   * donut/pie's wedge adjacency is DATA-ORDER dependent and a legend lets a reader
   * compare any two swatches, so no ordering can be relied on.
   *
   * WHY dye-3 and dye-7 hold these exact values (changed 2026-08-19): the previous
   * pair dye-5 #4a3aa7 x dye-7 #7B2D8E HARD-FAILED both gates — CVD ΔE 4.3 (protan)
   * and normal-vision ΔE 10.3 — i.e. two violets a FULL-COLOUR reader could not
   * reliably tell apart, let alone a protanope. Root cause is structural: four hues
   * (dye-6 222°, dye-1 256°, dye-5 284°, dye-7 305°) were crowded into a 83° arc that
   * protan/deutan simulation collapses toward one axis, so they had to separate on
   * LIGHTNESS alone — and dye-5 (L 0.433) and dye-7 (L 0.453) were both dark.
   * Moving dye-7 to a deeper magenta at 339° relieves the arc; dye-3 dropped a step
   * darker (#1baf7a -> #0CA470) to clear 3:1 contrast on white AND to open the
   * dye-3 x dye-4 pair, which was sitting in the 6-8 CVD floor band.
   * Measured: the fix moves ONLY these two slots, total drift ΔE 7.1 — a single-slot
   * change cannot satisfy the gates (verified exhaustively), and dye-1/dye-2 must not
   * move because they are also the diverging ramp's poles (see 2.4).
   *
   * KNOWN, ACCEPTED: dye-4 (2.69:1) and dye-6 (2.32:1) sit below 3:1 against white.
   * That is the validator's documented "relief required" band, NOT a failure, and the
   * relief condition is met — every chart on this dashboard ships a legend and an
   * adjacent data table. Do not "fix" it by lightening the surface or darkening those
   * two: dye-6 is also the sign-in accent's sibling value (see login.css) and dye-4
   * carries the Lokalua group identity.
   * ========================================================================= */
  --dye-1:  #2a78d6;   /* batik tulis navy — blue (220°) — action channels */
  --dye-2:  #A83A2F;   /* geringsing terracotta — red (25°) — RESERVED: status-critical / diverging positive */
  --dye-3:  #0CA470;   /* prada-leaf cyan-green — aqua-green (162°) — occupancy / realized */
  --dye-4:  #e87ba4;   /* cepuk plum — magenta (340°) — Lokalua group on shared charts */
  --dye-5:  #4a3aa7;   /* kain cepuk indigo violet — violet (265°) — misc / meta */
  --dye-6:  #00B9E4;   /* aqua blue — cyan (195°) — direct / website channels */
  --dye-7:  #881870;   /* cepuk magenta-plum — magenta-violet (339°) — secondary categorical */
  --dye-8:  #C77F00;   /* geringsing ochre — deep amber (36°) — secondary categorical (was oxide red, collided with slot 2) */

  /* =========================================================================
   * 2.3 Sequential ramp — "kain cepuk indigo" (hue ~265°)
   * Sits between categorical slot 1 (blue, 220°) and slot 5 (violet, 265°-adjacent).
   * ========================================================================= */
  --dye-seq-100: #A99FC6;
  --dye-seq-200: #8E80B1;
  --dye-seq-300: #72619C;
  --dye-seq-400: #574287;
  --dye-seq-500: #3B2472;
  --dye-seq-600: #241560;

  /* =========================================================================
   * 2.4 Diverging ramp — batik tulis navy ↔ geringsing terracotta
   * 7 steps. Midpoint MUST read as gray (never a 3rd hue).
   * Equal step count per arm.
   * ========================================================================= */
  --dye-div-0: #2a78d6;   /* batik tulis navy — negative pole */
  --dye-div-1: #5479B5;   /* batik tulis navy */
  --dye-div-2: #9CB1DC;   /* batik tulis navy */
  --dye-div-3: #E4E4E7;   /* neutral — neutral gray midpoint */
  --dye-div-4: #C28878;   /* geringsing terracotta */
  --dye-div-5: #B85848;   /* geringsing terracotta */
  --dye-div-6: #A83A2F;   /* geringsing terracotta — positive pole */

  /* =========================================================================
   * 2.5 Status palette (reserved — never themed)
   * Hue alone never carries meaning; icon + label is the mitigation.
   * Cool-leaning red/pink family (hue 0–10°) — never collides with Terracotta.
   * Light hex only — forced-light, no dark-mode remap (see note at EOF).
   * ========================================================================= */
  --status-good:     #0E8E5A;   /* ✓ OK — deep emerald */
  --status-warning:  #C84878;   /* ⚠ Aging — cool pink-red */
  --status-serious:  #A82850;   /* ! Stale — deep magenta */
  --status-critical: #8A1842;   /* ✕ Failed — deep magenta */
}

/* ===========================================================================
 * Colour scheme: FORCED LIGHT — the dark-mode remap was REMOVED (2026-08-19).
 *
 * DELIBERATE. Do NOT re-add an `@media (prefers-color-scheme: dark)` block.
 * tokens.css no longer flips --warm/--dark, so the page surface stays
 * neutral grey (#F4F4F5) in every browser colour scheme. Chart hues tuned for a
 * near-black surface would therefore be painted onto a LIGHT GREY page — a
 * contrast regression, not a dark mode. The light hexes above are the only
 * validated set. A real dark mode is a separate project: parallel tokens,
 * re-tuned dye slots, every contrast ratio re-validated.
 * ========================================================================= */

