/* The palette, defined once for every service.
 *
 * This file does two jobs:
 *
 * 1. Points Web Awesome's `brand` ramp at yellow, which is the accent the
 *    services have always used. WA's own yellow ramp is a full 11-step scale
 *    in oklch, so hover/active/border/on-colour all derive correctly - which
 *    is the thing hand-picking a single #eab308 never gave us.
 *
 * 2. Keeps the old semantic names (--bg, --surface, --accent, ...) alive as
 *    aliases onto WA tokens. Nothing new should use them, but every service
 *    has hundreds of lines of CSS that does, and aliasing lets a service
 *    migrate page by page instead of all at once. Delete a name here only
 *    once no service references it.
 */

:root {
  --wa-color-brand-95: var(--wa-color-yellow-95);
  --wa-color-brand-90: var(--wa-color-yellow-90);
  --wa-color-brand-80: var(--wa-color-yellow-80);
  --wa-color-brand-70: var(--wa-color-yellow-70);
  --wa-color-brand-60: var(--wa-color-yellow-60);
  --wa-color-brand-50: var(--wa-color-yellow-50);
  --wa-color-brand-40: var(--wa-color-yellow-40);
  --wa-color-brand-30: var(--wa-color-yellow-30);
  --wa-color-brand-20: var(--wa-color-yellow-20);
  --wa-color-brand-10: var(--wa-color-yellow-10);
  --wa-color-brand-05: var(--wa-color-yellow-05);

  /* The "loud" brand surface - solid buttons, the active toggle, focus.
   *
   * Overridden rather than taken from the ramp. Web Awesome picks step 50
   * for a loud fill because that is the darkest point that still carries
   * white text, which for yellow is #b45f04 - a brown. The services have
   * always used bright yellow with DARK text on it, so the pair is set
   * explicitly: step 80 for the fill, near-black for what sits on it.
   *
   * These rules are deliberately unlayered. Web Awesome's own theme lives
   * in @layer wa-theme, and unlayered declarations beat layered ones, so
   * this wins without !important and without raising specificity.
   */
  --wa-color-brand-fill-loud: var(--wa-color-yellow-80);
  --wa-color-brand-on-loud: var(--wa-color-neutral-10);
  --wa-color-brand-border-loud: var(--wa-color-yellow-70);
  --wa-color-focus: var(--wa-color-yellow-70);

  /* Corner radius: the services settled on 14px long before WA arrived. */
  --wa-border-radius-m: 10px;
  --wa-border-radius-l: 14px;
}

/* --- compatibility aliases (deprecated) ---------------------------------- */
:root {
  --bg: var(--wa-color-surface-lowered);
  --surface: var(--wa-color-surface-default);
  --surface-hover: var(--wa-color-surface-raised);
  --border: var(--wa-color-surface-border);
  --text: var(--wa-color-text-normal);
  --text-muted: var(--wa-color-text-quiet);
  --accent: var(--wa-color-brand-70);
  --on-accent: var(--wa-color-brand-on-loud);
  --radius: var(--wa-border-radius-l);
  --shadow: var(--wa-shadow-m);
  --ok: var(--wa-color-success-fill-loud);
  --warn: var(--wa-color-warning-fill-loud);
  --err: var(--wa-color-danger-fill-loud);
  --info: var(--wa-color-brand-fill-loud);
}
