/* Keys Medical Thermography — base palette.

   DAWN (2026-08-31). Cool, light, airy. This replaces "Coastal warmth"
   (sand/sun/terracotta) and is built to the site brief's §2 Direction D, which is
   itself built on evidence the warm palette never had: her 27 Aug style-board
   feedback, where she compared warm and cool grounds side by side on real boards.

   Three of her sentences decide this file:

     "I prefer the background colors from tide"     -> cool near-white ground, not sand
     "not the brick color for the font"             -> terracotta is OFF type and prices
     "want different complementary colours"         -> accents are NOT sampled from her
                                                       sunset photos; those stay as imagery

   So the palette is now two ideas instead of four. GROUND (cool near-white paper and
   white cards) and SEA (one blue family, carrying eyebrows, links, prices and every
   action). Plus a small set of pale geometric TINTS for section grounds — the "pastel
   geometry" room the brief asks for, used as shapes and fields, never as type colour.

   HER LOGO stays navy #001040 + copper #A86838 (assets/brand/). Copper is defensible
   as a brand accent inside the lockup; as the action or price colour it is the exact
   thing she rejected on the boards. It is deliberately not in this file.

   RETIRED: --sun as a warm terracotta, and --bloom entirely. Both are kept below as
   aliases onto the blue family so existing components and kits keep resolving and
   quietly follow the new direction. Prefer --accent / --ground / --tint-* in new work. */
:root{
  /* GROUND — cool paper and surfaces (light) */
  /* The affiliate strip. A theme-invariant KIND of surface -- always light, because the
     marks on it are dark artwork -- but not the same light in both themes: near-white
     glares against a dark page. */
  --affil-bg:#E4EDEE; --affil-ink:#4A5C63;
  --ground:#F7FAFB;
  --ground-sunken:#EDF3F6;
  --surface:#FFFFFF;
  --sand:var(--ground);        /* deprecated name, kept resolving */
  --sand-deep:var(--ground-sunken);
  --paper:var(--ground);
  --surface-2:var(--ground-sunken);

  /* ink + lines — her existing ink survives the move; it was always a sea-slate.
     --ink-soft was darkened from #5D7379 on 31 Aug: at the old value muted copy
     measured 4.24:1 on --tint-lilac and 4.37:1 on --tint-sky, so it passed on white
     and on --ground but failed AA on the tint fields themselves.
     THE SAME TRAP AS --sky-deep ON --sky-light, one level subtler: a muted colour
     checked only against the page ground will fail on a tinted section. Check every
     text token against the DARKEST tint, not against --ground. Now 4.97:1 on
     --tint-lilac, 5.11:1 on --tint-sky, 5.86:1 on white.

     THE GENERAL RULE, arrived at the hard way three times over:
       1. --sky-deep on --sky-light      — a pair that never had enough separation
       2. --ink-soft on the tint fields  — checked against the ground, not the tint
       3. --accent-light on --plate      — a theme-FLIPPING colour on a theme-INVARIANT surface
     So: every theme-invariant surface (--sea, --plate) must carry its OWN
     theme-invariant on-colours, and no token that inverts between themes may ever be
     used as foreground on one. And every text token must be measured against the
     darkest surface it is allowed to sit on, not the lightest. */
  --ink:#22343A;
  --ink-soft:#54686E;
  --line:#DDE7EB;

  /* SEA — the one accent family. --accent carries actions, prices and links.
     Measured on --ground: --accent 6.4:1, --accent-deep 12.9:1. White on --accent
     is 6.8:1, so it carries white at body sizes and above.
     NOT A TEXT PAIR: --accent on --accent-light is 3.4:1 — fine for large type and
     icons, fails AA for body. Put --ink on the tints instead. */
  --accent:#2F6280;
  --accent-deep:#1F4A63;
  --accent-light:#C8DCE6;
  --on-action:#FFFFFF;

  /* the mid blue, for eyebrows, rules and the gradient device */
  --sky:#4E88A3;
  --sky-deep:var(--accent);
  --sky-light:var(--accent-light);

  /* TINTS — pale geometric fields for section grounds. Shapes, not type. */
  --tint-sky:#E8F1F5;
  --tint-mist:#E4EDEE;
  --tint-lilac:#EDEBF5;

  /* DANGER — a real red, now that the action colour is no longer warm.
     SUCCESS / INFO complete the status set. Info is the accent — status colour is
     not a fourth hue budget, it is three semantics on the existing palette.
     Measured on --ground: danger 6.2:1, success 6.1:1, info (accent) 6.3:1. */
  --danger:#A8342A;
  --danger-deep:#8C2A22;
  --success:#1F6B4A;
  --success-deep:#17553A;
  --info:var(--accent);
  --info-deep:var(--accent-deep);

  /* SEA BAND — the permanently-dark footer. Cooled toward her logo navy. */
  --sea:#152F3E;
  --on-sea:#D6E4EA;
  --on-sea-strong:#FFFFFF;
  --on-sea-quiet:#8FA6B2;

  /* the thermogram plate keeps its cool indigo — it is imagery, not brand.
     Like --sea, it is THEME-INVARIANT, so it carries its own non-inverting
     on-colours. --on-plate 15.6:1, --on-plate-quiet 9.7:1 on --plate. */
  --plate:#0A1230;
  --on-plate:#E4EEF5;
  --on-plate-quiet:#9FC0D4;

  /* deprecated aliases — do not use in new work. --sun and --bloom now resolve to
     the blue family on purpose: the warm terracotta was rejected 27 Aug. */
  --sun:var(--accent);
  --sun-deep:var(--accent-deep);
  --sun-light:var(--accent-light);
  --bloom:var(--tint-lilac);
  --aqua:var(--sky);
  --aqua-deep:var(--accent);
  --aqua-bright:var(--accent-light);
  --coral:var(--accent);
  --coral-deep:var(--accent-deep);
  --gold:var(--tint-lilac);
  --ink-fixed:var(--sea);
  --on-ink:var(--on-sea);
  --on-ink-strong:var(--on-sea-strong);
  --on-ink-quiet:var(--on-sea-quiet);
}

/* Dark theme — evening water. Surfaces, ink and lines cool down; the accent
   lightens so it stays the brightest thing on the page. */
@media (prefers-color-scheme:dark){
  :root{
    --affil-bg:#A9B9C1; --affil-ink:#22343A;
    --ground:#101A20;
    --ground-sunken:#14212A;
    --surface:#182833;
    --ink:#E6EDF0;
    --ink-soft:#9FB3BC;
    --line:#273A45;
    --accent:#8FBCD0;
    --accent-deep:#B4D6E6;
    --accent-light:#223A47;
    --sky:#8FBCD0;
    --tint-sky:#1A2B35;
    --tint-mist:#18272E;
    --tint-lilac:#20222F;
    --danger:#E8756A;
    --danger-deep:#F09287;
    --success:#6DBF97;
    --success-deep:#8FD3B0;
    /* on dark the accent lightens, so action text goes dark rather than white */
    --on-action:#0E1E28;
  }
}
:root[data-theme="light"]{
  --affil-bg:#E4EDEE; --affil-ink:#4A5C63;
  --ground:#F7FAFB; --ground-sunken:#EDF3F6; --surface:#FFFFFF;
  --ink:#22343A; --ink-soft:#54686E; --line:#DDE7EB;
  --accent:#2F6280; --accent-deep:#1F4A63; --accent-light:#C8DCE6;
  --sky:#4E88A3; --on-action:#FFFFFF;
  --tint-sky:#E8F1F5; --tint-mist:#E4EDEE; --tint-lilac:#EDEBF5;
  --danger:#A8342A; --danger-deep:#8C2A22;
  --success:#1F6B4A; --success-deep:#17553A;
}
:root[data-theme="dark"]{
  --affil-bg:#A9B9C1; --affil-ink:#22343A;
  --ground:#101A20; --ground-sunken:#14212A; --surface:#182833;
  --ink:#E6EDF0; --ink-soft:#9FB3BC; --line:#273A45;
  --accent:#8FBCD0; --accent-deep:#B4D6E6; --accent-light:#223A47;
  --sky:#8FBCD0; --on-action:#0E1E28;
  --tint-sky:#1A2B35; --tint-mist:#18272E; --tint-lilac:#20222F;
  --danger:#E8756A; --danger-deep:#F09287;
  --success:#6DBF97; --success-deep:#8FD3B0;
}
