/* indigo — colour only. Belongs to a customer, not to a template.
   Generated by kit/make-palette.mjs from four decisions: ink #0E1116, accent
   #1B4FD8, paper #FBFCFD. Every role below was DERIVED until it cleared its
   contrast target against the ground it actually sits on, and the run is
   recorded at the end of this file.

   --p-* are primitives. A section may never reference one.
   --c-* are the roles a section may use, and the only ones. */
:root{
  --p-ink:#0E1116;
  --p-paper:#FBFCFD;
  --p-white:#ffffff;
  --p-accent:#1B4FD8;
  --p-tint:#eff0f1;
  --p-hair:#e1e2e4;

  --c-surface:#FBFCFD;
  --c-surface-raised:#ffffff;
  --c-text:#0e1116;
  --c-text-muted:#727477;
  --c-text-subtle:#717377;
  --c-border:#e1e2e4;
  --c-accent:#1B4FD8;
  --c-on-accent:#ffffff;
  --c-accent-text:#1b4fd8;
  --c-focus-ring:#1b4fd8;
}

/* An inverted band is a SCOPE, not a set of extra tokens. Same role names,
   different values. A section must never declare a --c-* on itself, or this
   stops working: a property declared on an element beats one inherited from an
   ancestor regardless of specificity. */
[data-surface="inverse"]{
  --c-surface:#0E1116;
  --c-surface-raised:#1f2226;
  --c-text:#ffffff;
  --c-text-muted:#9a9b9d;
  --c-text-subtle:#828386;
  --c-border:#434549;
  --c-accent:#5279e1;
  --c-on-accent:#0E1116;
  --c-accent-text:#5f84e4;
  --c-focus-ring:#5f84e4;
}

/* ── DARK MODE ──────────────────────────────────────────────────────────────
   Not a second palette. The page set and the inverse set SWAP, which is the
   only arrangement that survives PLAN.md §10's trap: in dark mode "inverse" has
   to become LIGHTER, or an inverse band on a dark page is a black band on a
   black page. Both sets were already derived and proved above, so dark mode
   inherits 108 verified pairs rather than needing 108 more.

   Specificity, because this is where it goes wrong: [data-mode="dark"] and
   [data-surface="inverse"] are both (0,1,0), and a property declared ON an
   element beats one inherited from an ancestor. The two-selector rule below is
   (0,2,0) and is what makes an inverse band inside a dark page come out light.
   Order matters too — these must stay after the two blocks above. */
[data-mode="dark"]{
  --c-surface:#0E1116;
  --c-surface-raised:#1f2226;
  --c-text:#ffffff;
  --c-text-muted:#9a9b9d;
  --c-text-subtle:#828386;
  --c-border:#434549;
  --c-accent:#5279e1;
  --c-on-accent:#0E1116;
  --c-accent-text:#5f84e4;
  --c-focus-ring:#5f84e4;
}
[data-mode="dark"] [data-surface="inverse"]{
  --c-surface:#FBFCFD;
  --c-surface-raised:#ffffff;
  --c-text:#0e1116;
  --c-text-muted:#727477;
  --c-text-subtle:#717377;
  --c-border:#e1e2e4;
  --c-accent:#1B4FD8;
  --c-on-accent:#ffffff;
  --c-accent-text:#1b4fd8;
  --c-focus-ring:#1b4fd8;
}

/* auto — the site owner said "follow the visitor's device". Same values. */
@media (prefers-color-scheme: dark){
  [data-mode="auto"]{
    --c-surface:#0E1116;
    --c-surface-raised:#1f2226;
    --c-text:#ffffff;
    --c-text-muted:#9a9b9d;
    --c-text-subtle:#828386;
    --c-border:#434549;
    --c-accent:#5279e1;
    --c-on-accent:#0E1116;
    --c-accent-text:#5f84e4;
    --c-focus-ring:#5f84e4;
  }
  [data-mode="auto"] [data-surface="inverse"]{
    --c-surface:#FBFCFD;
    --c-surface-raised:#ffffff;
    --c-text:#0e1116;
    --c-text-muted:#727477;
    --c-text-subtle:#717377;
    --c-border:#e1e2e4;
    --c-accent:#1B4FD8;
    --c-on-accent:#ffffff;
    --c-accent-text:#1b4fd8;
    --c-focus-ring:#1b4fd8;
  }
}

/* verified 2026-09-06
   ok   page     text on surface               18.41:1  needs 4.5
   ok   page     text-muted on surface          4.56:1  needs 4.5
   ok   page     text-subtle on surface         4.62:1  needs 4.5
   ok   page     text on surface-raised        18.91:1  needs 4.5
   ok   page     text-muted on surface-raised   4.69:1  needs 4.5
   ok   page     accent-text on surface         6.48:1  needs 4.5
   ok   page     on-accent on accent            6.65:1  needs 4.5
   ok   page     border on surface              1.26:1  needs 1.2
   ok   page     focus-ring on surface          6.48:1  needs 3
   ok   inverse  text on surface               18.91:1  needs 4.5
   ok   inverse  text-muted on surface           6.8:1  needs 4.5
   ok   inverse  text-subtle on surface         4.99:1  needs 4.5
   ok   inverse  text on surface-raised        15.97:1  needs 4.5
   ok   inverse  text-muted on surface-raised   5.74:1  needs 4.5
   ok   inverse  accent-text on surface         5.32:1  needs 4.5
   ok   inverse  on-accent on accent            4.67:1  needs 4.5
   ok   inverse  border on surface              1.97:1  needs 1.2
   ok   inverse  focus-ring on surface          5.32:1  needs 3 */
