/* harbour — colour only. Belongs to a customer, not to a template.
   Generated by kit/make-palette.mjs from four decisions: ink #12222B, accent
   #0E5E6B, paper #FBFDFD. 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:#12222B;
  --p-paper:#FBFDFD;
  --p-white:#ffffff;
  --p-accent:#0E5E6B;
  --p-tint:#eff2f3;
  --p-hair:#e1e5e6;

  --c-surface:#FBFDFD;
  --c-surface-raised:#ffffff;
  --c-text:#12222b;
  --c-text-muted:#6c777c;
  --c-text-subtle:#6c767c;
  --c-border:#e1e5e6;
  --c-accent:#0E5E6B;
  --c-on-accent:#ffffff;
  --c-accent-text:#0e5e6b;
  --c-focus-ring:#0e5e6b;
}

/* 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:#12222B;
  --c-surface-raised:#23313a;
  --c-text:#ffffff;
  --c-text-muted:#9ba2a6;
  --c-text-subtle:#848c91;
  --c-border:#46535a;
  --c-accent:#5e939c;
  --c-on-accent:#12222B;
  --c-accent-text:#599099;
  --c-focus-ring:#568e97;
}

/* ── 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:#12222B;
  --c-surface-raised:#23313a;
  --c-text:#ffffff;
  --c-text-muted:#9ba2a6;
  --c-text-subtle:#848c91;
  --c-border:#46535a;
  --c-accent:#5e939c;
  --c-on-accent:#12222B;
  --c-accent-text:#599099;
  --c-focus-ring:#568e97;
}
[data-mode="dark"] [data-surface="inverse"]{
  --c-surface:#FBFDFD;
  --c-surface-raised:#ffffff;
  --c-text:#12222b;
  --c-text-muted:#6c777c;
  --c-text-subtle:#6c767c;
  --c-border:#e1e5e6;
  --c-accent:#0E5E6B;
  --c-on-accent:#ffffff;
  --c-accent-text:#0e5e6b;
  --c-focus-ring:#0e5e6b;
}

/* auto — the site owner said "follow the visitor's device". Same values. */
@media (prefers-color-scheme: dark){
  [data-mode="auto"]{
    --c-surface:#12222B;
    --c-surface-raised:#23313a;
    --c-text:#ffffff;
    --c-text-muted:#9ba2a6;
    --c-text-subtle:#848c91;
    --c-border:#46535a;
    --c-accent:#5e939c;
    --c-on-accent:#12222B;
    --c-accent-text:#599099;
    --c-focus-ring:#568e97;
  }
  [data-mode="auto"] [data-surface="inverse"]{
    --c-surface:#FBFDFD;
    --c-surface-raised:#ffffff;
    --c-text:#12222b;
    --c-text-muted:#6c777c;
    --c-text-subtle:#6c767c;
    --c-border:#e1e5e6;
    --c-accent:#0E5E6B;
    --c-on-accent:#ffffff;
    --c-accent-text:#0e5e6b;
    --c-focus-ring:#0e5e6b;
  }
}

/* verified 2026-09-06
   ok   page     text on surface               15.95:1  needs 4.5
   ok   page     text-muted on surface           4.5:1  needs 4.5
   ok   page     text-subtle on surface         4.55:1  needs 4.5
   ok   page     text on surface-raised        16.29:1  needs 4.5
   ok   page     text-muted on surface-raised    4.6:1  needs 4.5
   ok   page     accent-text on surface         7.26:1  needs 4.5
   ok   page     on-accent on accent            7.42:1  needs 4.5
   ok   page     border on surface              1.24:1  needs 1.2
   ok   page     focus-ring on surface          7.26:1  needs 3
   ok   inverse  text on surface               16.29:1  needs 4.5
   ok   inverse  text-muted on surface          6.29:1  needs 4.5
   ok   inverse  text-subtle on surface         4.76:1  needs 4.5
   ok   inverse  text on surface-raised        13.36:1  needs 4.5
   ok   inverse  text-muted on surface-raised   5.16:1  needs 4.5
   ok   inverse  accent-text on surface         4.56:1  needs 4.5
   ok   inverse  on-accent on accent            4.75:1  needs 4.5
   ok   inverse  border on surface              2.05:1  needs 1.2
   ok   inverse  focus-ring on surface          4.43:1  needs 3 */
