/* counsel — colour only. Belongs to a customer, not to a template.
   Generated by kit/make-palette.mjs from four decisions: ink #14161A, accent
   #7A3E2B, paper #FFFFFF. 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:#14161A;
  --p-paper:#FFFFFF;
  --p-white:#ffffff;
  --p-accent:#7A3E2B;
  --p-tint:#f3f3f4;
  --p-hair:#e5e5e6;

  --c-surface:#FFFFFF;
  --c-surface-raised:#ffffff;
  --c-text:#14161a;
  --c-text-muted:#757678;
  --c-text-subtle:#737577;
  --c-border:#e5e5e6;
  --c-accent:#7A3E2B;
  --c-on-accent:#ffffff;
  --c-accent-text:#7a3e2b;
  --c-focus-ring:#7a3e2b;
}

/* 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:#14161A;
  --c-surface-raised:#24262a;
  --c-text:#ffffff;
  --c-text-muted:#9c9d9f;
  --c-text-subtle:#858688;
  --c-border:#48494c;
  --c-accent:#a2786b;
  --c-on-accent:#14161A;
  --c-accent-text:#a2786b;
  --c-focus-ring:#a2786b;
}

/* ── 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:#14161A;
  --c-surface-raised:#24262a;
  --c-text:#ffffff;
  --c-text-muted:#9c9d9f;
  --c-text-subtle:#858688;
  --c-border:#48494c;
  --c-accent:#a2786b;
  --c-on-accent:#14161A;
  --c-accent-text:#a2786b;
  --c-focus-ring:#a2786b;
}
[data-mode="dark"] [data-surface="inverse"]{
  --c-surface:#FFFFFF;
  --c-surface-raised:#ffffff;
  --c-text:#14161a;
  --c-text-muted:#757678;
  --c-text-subtle:#737577;
  --c-border:#e5e5e6;
  --c-accent:#7A3E2B;
  --c-on-accent:#ffffff;
  --c-accent-text:#7a3e2b;
  --c-focus-ring:#7a3e2b;
}

/* auto — the site owner said "follow the visitor's device". Same values. */
@media (prefers-color-scheme: dark){
  [data-mode="auto"]{
    --c-surface:#14161A;
    --c-surface-raised:#24262a;
    --c-text:#ffffff;
    --c-text-muted:#9c9d9f;
    --c-text-subtle:#858688;
    --c-border:#48494c;
    --c-accent:#a2786b;
    --c-on-accent:#14161A;
    --c-accent-text:#a2786b;
    --c-focus-ring:#a2786b;
  }
  [data-mode="auto"] [data-surface="inverse"]{
    --c-surface:#FFFFFF;
    --c-surface-raised:#ffffff;
    --c-text:#14161a;
    --c-text-muted:#757678;
    --c-text-subtle:#737577;
    --c-border:#e5e5e6;
    --c-accent:#7A3E2B;
    --c-on-accent:#ffffff;
    --c-accent-text:#7a3e2b;
    --c-focus-ring:#7a3e2b;
  }
}

/* verified 2026-09-06
   ok   page     text on surface               18.11:1  needs 4.5
   ok   page     text-muted on surface          4.55:1  needs 4.5
   ok   page     text-subtle on surface         4.63:1  needs 4.5
   ok   page     text on surface-raised        18.11:1  needs 4.5
   ok   page     text-muted on surface-raised   4.55:1  needs 4.5
   ok   page     accent-text on surface         8.23:1  needs 4.5
   ok   page     on-accent on accent            8.23:1  needs 4.5
   ok   page     border on surface              1.26:1  needs 1.2
   ok   page     focus-ring on surface          8.23:1  needs 3
   ok   inverse  text on surface               18.11:1  needs 4.5
   ok   inverse  text-muted on surface          6.67:1  needs 4.5
   ok   inverse  text-subtle on surface         4.97:1  needs 4.5
   ok   inverse  text on surface-raised        15.15:1  needs 4.5
   ok   inverse  text-muted on surface-raised   5.58:1  needs 4.5
   ok   inverse  accent-text on surface         4.69:1  needs 4.5
   ok   inverse  on-accent on accent            4.69:1  needs 4.5
   ok   inverse  border on surface              2.01:1  needs 1.2
   ok   inverse  focus-ring on surface          4.69:1  needs 3 */
