/* ============================================================
 * Axismundi — tokens.sys.light.css
 * v3.6.1 — Token Architecture Refactor Phase 1A
 *
 * Runtime semantic light layer.
 * Light mode maps md-sys roles to md-ref primitives.
 * ============================================================ */

/* ============================================================
 * §2 System layer — Color schemes
 *
 * Sys tokens consume ref palette tones. Same role names in
 * light + dark, different ref tones per scheme.
 *
 * Scheme application strategy (BRIEF.md — dark-first):
 *   :root            → light scheme defaults
 *   [data-theme="dark"]            → dark scheme override
 *   @media (prefers-color-scheme: dark) :root:not([data-theme="light"])
 *                                    → auto follows system
 *
 * NOTE: this pass writes §2.1 (Light scheme) only. Dark scheme
 * arrives in the next pass.
 *
 * 38 sys-color tokens per scheme:
 *   12 brand   (primary/secondary/tertiary × 4)
 *    4 status  (error × 4)
 *   13 surface (background, on-bg, surface, on-surface,
 *               surface-variant, on-surface-variant,
 *               surface-bright, surface-dim,
 *               surface-container-{lowest,low,base,high,highest})
 *    3 inverse (inverse-surface, inverse-on-surface,
 *               inverse-primary)
 *    2 outline (outline, outline-variant)
 *    2 other   (shadow, scrim)
 *   ----
 *   38 total. surface-tint excluded (deprecated, prompt-v2 §1.3).
 * ============================================================ */

/* ------------------------------------------------------------
 * §2.1 Light scheme
 * Source: M3-COLOR-TOKEN.md §2.1
 * Applied as :root default. Dark scheme overrides in §2.2.
 * ------------------------------------------------------------ */
:root {
  /* --- Brand: primary --- */
  --md-sys-color-primary:              var(--md-ref-palette-primary-40);  /* primary 40  */
  --md-sys-color-on-primary:           var(--md-ref-palette-primary-100); /* primary 100 */
  --md-sys-color-primary-container:    var(--md-ref-palette-primary-90);  /* primary 90  */
  --md-sys-color-on-primary-container: var(--md-ref-palette-primary-30);  /* primary 30  */

  /* --- Brand: secondary --- */
  --md-sys-color-secondary:              var(--md-ref-palette-secondary-40);  /* secondary 40  */
  --md-sys-color-on-secondary:           var(--md-ref-palette-secondary-100); /* secondary 100 */
  --md-sys-color-secondary-container:    var(--md-ref-palette-secondary-90);  /* secondary 90  */
  --md-sys-color-on-secondary-container: var(--md-ref-palette-secondary-30);  /* secondary 30  */

  /* --- Brand: tertiary --- */
  --md-sys-color-tertiary:              var(--md-ref-palette-tertiary-40);  /* tertiary 40  */
  --md-sys-color-on-tertiary:           var(--md-ref-palette-tertiary-100); /* tertiary 100 */
  --md-sys-color-tertiary-container:    var(--md-ref-palette-tertiary-90);  /* tertiary 90  */
  --md-sys-color-on-tertiary-container: var(--md-ref-palette-tertiary-30);  /* tertiary 30  */

  /* --- Status: error --- */
  --md-sys-color-error:              var(--md-ref-palette-error-40);  /* error 40  */
  --md-sys-color-on-error:           var(--md-ref-palette-error-100); /* error 100 */
  --md-sys-color-error-container:    var(--md-ref-palette-error-90);  /* error 90  */
  --md-sys-color-on-error-container: var(--md-ref-palette-error-30);  /* error 30  */

  /* --- Surface: background + surface --- */
  --md-sys-color-background:         var(--md-ref-palette-neutral-98);           /* neutral 98 */
  --md-sys-color-on-background:      var(--md-ref-palette-neutral-10);           /* neutral 10 */
  --md-sys-color-surface:            var(--md-ref-palette-neutral-98);           /* neutral 98 */
  --md-sys-color-on-surface:         var(--md-ref-palette-neutral-10);           /* neutral 10 */
  --md-sys-color-surface-variant:    var(--md-ref-palette-neutral-variant-90);   /* neutral-variant 90 */
  --md-sys-color-on-surface-variant: var(--md-ref-palette-neutral-variant-30);   /* neutral-variant 30 */
  --md-sys-color-surface-bright:     var(--md-ref-palette-neutral-98);           /* neutral 98 */
  --md-sys-color-surface-dim:        var(--md-ref-palette-neutral-87);           /* neutral 87 */

  /* --- Surface: 5 container levels (lowest → highest) --- */
  --md-sys-color-surface-container-lowest:  var(--md-ref-palette-neutral-100); /* neutral 100 */
  --md-sys-color-surface-container-low:     var(--md-ref-palette-neutral-96);  /* neutral 96  */
  --md-sys-color-surface-container:         var(--md-ref-palette-neutral-94);  /* neutral 94  */
  --md-sys-color-surface-container-high:    var(--md-ref-palette-neutral-92);  /* neutral 92  */
  --md-sys-color-surface-container-highest: var(--md-ref-palette-neutral-90);  /* neutral 90  */

  /* --- Inverse (Snackbar, Slider value indicator,
         Outlined toggle button selected) --- */
  --md-sys-color-inverse-surface:    var(--md-ref-palette-neutral-20); /* neutral 20  */
  --md-sys-color-inverse-on-surface: var(--md-ref-palette-neutral-95); /* neutral 95  */
  --md-sys-color-inverse-primary:    var(--md-ref-palette-primary-80); /* primary 80  */

  /* --- Outline --- */
  --md-sys-color-outline:         var(--md-ref-palette-neutral-variant-50); /* neutral-variant 50 */
  --md-sys-color-outline-variant: var(--md-ref-palette-neutral-variant-80); /* neutral-variant 80 */

  /* --- Other --- */
  --md-sys-color-shadow: var(--md-ref-palette-neutral-0);
  --md-sys-color-scrim:  var(--md-ref-palette-neutral-0);
}

/* ------------------------------------------------------------ */
