/* tokens.css - LAB owned design tokens. Loaded BEFORE custom.css.
   Replaces the former Pico v1->v2 compatibility shim. */
:root {
  /* ---- bridge: legacy alias names resolve to owned tokens (was the shim) ---- */
  --muted-color: var(--pico-muted-color);
  --muted-border-color: var(--pico-muted-border-color);
  --card-background-color: var(--pico-card-background-color);
  --card-border-color: var(--pico-card-border-color);
  --color: var(--pico-color);
  --primary: var(--pico-primary);
  --primary-focus: var(--pico-primary-focus, rgba(94, 191, 179, 0.25));
  --del-color: var(--pico-del-color);
  --ins-color: var(--pico-ins-color);
  --border-radius: var(--pico-border-radius);
  --secondary: var(--pico-secondary);
  /* --pico-primary-rgb is undefined in Pico v2, so the fallback list is what
     actually resolves - preserves the old shim's brand teal at custom.css:2183 */
  --primary-rgb: var(--pico-primary-rgb, 94, 191, 179);
  --form-element-focus-border-color: var(--pico-form-element-focus-border-color);
  /* dropped (0 uses anywhere, incl. custom.css): --spacing */

  /* ---- semantic status tones (light): AA-verified by scripts/check_tones.py ---- */
  --tone-positive:    #1c7038;  --tone-positive-bg: rgba(46,158,79,.16);
  --tone-warning:     #9a5b12;  --tone-warning-bg:  rgba(217,131,36,.16);
  --tone-danger:      #b32d2d;  --tone-danger-bg:   rgba(214,69,69,.16);
  --pico-color-red-500: var(--tone-danger);
  --tone-info:        #1f5fa8;  --tone-info-bg:     rgba(47,127,209,.16);
  --tone-neutral:     var(--pico-muted-color);
  --tone-neutral-bg:  rgba(128,128,128,.14);

  /* ---- training/sandbox: brand accent (violet), NOT a warning tone ---- */
  --accent-training:    #7a4fb5; --accent-training-bg: rgba(122,79,181,.14);

  /* ---- SOLID status fills (fixed, theme-independent) for elements that carry
     fixed white text. The --tone-*/--accent-* foregrounds above flip bright in
     dark mode and would fail under white text on a solid fill. These do NOT get
     a [data-theme="dark"] override. All verified AA (>=4.5:1) with #fff text by
     scripts/check_tones.py. ---- */
  --tone-positive-solid: #2e7d32;
  --tone-warning-solid:  #b45309;
  --tone-danger-solid:   #c62828;
  --tone-neutral-solid:  #495057;
  --accent-training-solid: #7a4fb5;
}

[data-theme="dark"] {
  --tone-positive: #5dc97e;
  --tone-warning:  #f0a850;
  --tone-danger:   #ef6c6c;
  --pico-color-red-500: var(--tone-danger);
  --tone-info:     #5aa6e8;
  --accent-training: #b794e0;
}
