/* Klaro Health colour system. Hex values are the official brand codes
   (Klaro colour codes (4).pdf / klaro-colours.json) — do not adjust. */
:root{
  /* ---- Brand palette (base) ---- */
  --klaro-teal:#36A089;      /* PRIMARY brand colour */
  --klaro-blue:#4880BE;      /* supporting + designated font colour */
  --klaro-coral:#EF5745;     /* brand accent — decoration and large promotional marks */
  --klaro-yellow:#FBD854;    /* accent, sparing */

  /* ---- Ink & neutrals ---- */
  --klaro-navy:#16283A;      /* ink: body + headlines on light */
  --klaro-slate:#5A6B76;     /* captions, secondary text */
  --klaro-light:#F7F9FB;     /* card / section tint on white */
  --klaro-white:#FFFFFF;
  --klaro-hairline:#C9D6DD;  /* step connectors, faint rules */

  /* ---- Tints ---- */
  --klaro-teal-tint:#E7F2EF;
  --klaro-coral-tint:#FCE7E4;
  --klaro-blue-tint:#E4EEF7;
  /* DEPRECATED (DR-55, 11 Aug 2026) — do not use. Yellow is an accent mark only,
     never a surface ground. Use --klaro-light or --klaro-blue-tint instead. */
  --klaro-yellow-tint:#FEF6D9;

  /* ---- Deeper shades (interaction states, gradient stops) ---- */
  --klaro-teal-deep:#2B8A77;
  --klaro-teal-press:#238069;
  --klaro-blue-deep:#305C8C;
  --klaro-blue-press:#2A5E97;
  --klaro-coral-deep:#DB4632;
  --klaro-coral-press:#C43C2A;

  /* ---- Expressive surfaces (DR-57) ----
     These are role colours derived for accessible white text on large marketing
     grounds. They do not replace or adjust the official base brand colours. */
  --klaro-teal-surface:#267865;   /* white 5.31:1 */
  --klaro-blue-surface:#2C5C8A;   /* white 6.99:1 */
  --klaro-coral-surface:#A8301B;  /* white 6.77:1; text-bearing promotional pill/surface */

  /* Colour-rich support washes. Use inside a composition, not as the default
     full-page ground. Navy text exceeds 11:1 on each. */
  --klaro-teal-wash:#CFE9E2;
  --klaro-blue-wash:#D6E6F5;
  --klaro-coral-wash:#F8D8D2;

  /* ---- DEPRECATED — never a background ---- */
  --klaro-cream-deprecated:#FCF9D6;

  /* ---- Gradients (ship as images in decks; CSS here for web) ---- */
  --klaro-gradient-dark:linear-gradient(135deg,#2B8A77 0%,#305C8C 100%); /* @kind color */   /* deck title/section/closing */
  --klaro-gradient-band:linear-gradient(90deg,#2A5E97 0%,#4880BE 100%); /* @kind color */    /* ad band / footer */
  --klaro-gradient-warm:linear-gradient(135deg,#C05A2A 0%,#2E6E64 100%); /* @kind color */   /* "One Panel" warm ground */
  --klaro-gradient-vivid:linear-gradient(135deg,#267865 0%,#2C5C8A 58%,#16283A 100%); /* @kind color */
  --klaro-gradient-coral:linear-gradient(135deg,#A8301B 0%,#16283A 100%); /* @kind color */

  /* ---- Semantic aliases (use these in components) ---- */
  --surface-page:var(--klaro-white);
  --surface-card:var(--klaro-white);
  --surface-tint:var(--klaro-light);
  --surface-tint-teal:var(--klaro-teal-tint);
  --surface-tint-coral:var(--klaro-coral-tint);
  --surface-brand:var(--klaro-teal);
  --surface-brand-alt:var(--klaro-blue);
  --surface-dark:var(--klaro-gradient-dark); /* @kind color */
  --surface-vivid-teal:var(--klaro-teal-surface);
  --surface-vivid-blue:var(--klaro-blue-surface);
  --surface-vivid-coral:var(--klaro-coral-surface);
  --surface-vivid-navy:var(--klaro-navy);
  --surface-vivid-gradient:var(--klaro-gradient-vivid); /* @kind color */
  --surface-vivid-warm:var(--klaro-gradient-coral); /* @kind color */
  --surface-wash-teal:var(--klaro-teal-wash);
  --surface-wash-blue:var(--klaro-blue-wash);
  --surface-wash-coral:var(--klaro-coral-wash);

  --text-heading:var(--klaro-navy);
  --text-body:var(--klaro-navy);
  --text-muted:var(--klaro-slate);
  --text-brand:var(--klaro-teal);
  --text-link:var(--klaro-blue);
  --text-link-hover:var(--klaro-blue-press);
  --text-accent:var(--klaro-coral);
  --text-on-dark:var(--klaro-white);
  --text-on-dark-muted:rgba(255,255,255,.85);

  /* ---- Inks for the wash grounds (v1.0.0 contrast patch) ----
     The inks above are derived for white. On --surface-wash-teal/blue/coral they
     drop to 4.15-4.34:1, which is below AA for any text under 24px — the washes'
     ">11:1" note holds for --text-body navy only. These two are derived against
     the lightest wash (coral #F8D8D2) so they clear AA on all three. */
  --text-muted-on-wash:#4E5D68;   /* 5.02:1 coral wash · 5.23:1 teal · 5.26:1 blue */
  --text-brand-on-wash:#17614F;   /* 5.36:1 coral wash · 5.74:1 teal · 5.78:1 blue */

  /* ---- Eyebrow ink on vivid and gradient grounds (v1.0.2, closes DR-54) ----
     Klaro Yellow on --surface-vivid-gradient lands at 4.09-4.44:1 depending where
     the element sits on the axis: the first stop #267865 is light enough that a
     13px eyebrow fails AA. There is no darker yellow available — a yellow dark
     enough to carry small text is olive, which is why the contract forbids
     --k-brand-yellow-text. So the ink is white (>=5.31:1 on every stop) and yellow
     stays in its sanctioned role as a non-text accent mark beside the label. */
  --text-eyebrow-on-vivid:var(--text-on-dark);
  --mark-accent-on-vivid:var(--klaro-yellow);

  /* ---- Action roles ----
     Coral arrived through promotional pills; it is not the universal action
     colour. Patient progress uses the same AA-safe teal ramp in marketing,
     commerce and product. Vivid grounds reverse the primary to white/navy. */
  --action-primary-bg:#267865;       /* white 5.31:1 */
  --action-primary-bg-hover:#216B5B; /* white 6.33:1 */
  --action-primary-bg-press:#1B5B4D; /* white 7.92:1 */
  --action-primary-fg:var(--klaro-white);

  --action-secondary-bg:transparent;
  --action-secondary-fg:#17614F;     /* 7.45:1 on white */
  --action-secondary-border:#267865;
  --action-secondary-bg-hover:var(--klaro-teal-tint);
  --action-secondary-bg-press:var(--klaro-teal-wash);

  --action-inverse-bg:var(--klaro-white);
  --action-inverse-fg:var(--klaro-navy);
  --action-inverse-bg-hover:var(--klaro-blue-tint);
  --action-inverse-bg-press:var(--klaro-blue-wash);
  --action-inverse-border:rgba(255,255,255,.76);

  /* Destructive is a semantic system red, deliberately not brand coral and
     never a health-status colour. It requires explicit destructive wording. */
  --action-danger-bg:#B42318;        /* white 6.57:1 */
  --action-danger-bg-hover:#912018;  /* white 8.66:1 */
  --action-danger-bg-press:#7A1C14;  /* white 10.48:1 */
  --action-danger-fg:var(--klaro-white);

  /* Promotional attention is non-interactive. Base coral may decorate; a
     labelled pill uses the darker surface so ordinary text remains AA. */
  --promotion-bg:var(--klaro-coral-surface);
  --promotion-fg:var(--klaro-white);

  /* Backward-compatible aliases. New work must use the explicit roles above. */
  --action-bg:var(--action-primary-bg);
  --action-bg-hover:var(--action-primary-bg-hover);
  --action-bg-press:var(--action-primary-bg-press);
  --action-fg:var(--action-primary-fg);

  --border-subtle:#E6ECF1;
  --border-hairline:var(--klaro-hairline);

  --status-positive:var(--klaro-teal);
  --status-negative:var(--klaro-coral);
  --status-highlight:var(--klaro-yellow);
  --status-info:var(--klaro-blue);
}
