/*
 * theme-tokens.css — single source of truth for the light/dark palette.
 *
 * Loaded FIRST in every layout (legacy marketing header.php, v2/header.php,
 * v2/header_admin.php) so BOTH the legacy styles.css and the compiled
 * Tailwind utilities (tailwind.dist.css) resolve the same CSS variables.
 *
 * Channels are stored WITHOUT a colour function (space-separated) so
 * Tailwind's `<alpha-value>` opacity modifiers keep working:
 *   tailwind.config.js → bg: 'hsl(var(--c-bg) / <alpha-value>)'
 *   markup             → bg-bg/85   ⇒  hsl(var(--c-bg) / 0.85)
 *
 * DARK values are byte-for-byte the pre-theme colours, so dark mode renders
 * pixel-identical to before this change. LIGHT values are the new palette.
 *
 * The zinc ramp is MIRRORED in light mode (50↔950, 100↔900, … 500 stays put)
 * because the markup uses LOW zinc numbers for text (light-on-dark). Mirroring
 * turns them dark-on-light automatically across ~480 usages — one systematic
 * flip instead of 480 hand edits.
 */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* semantic — dark values == the exact pre-theme colours */
  --c-bg:         240 10% 3.9%;   /* page background   (was hsl(240 10% 3.9%)) */
  --c-card:       240 6% 6%;      /* elevated surface  (was hsl(240 6% 6%))    */
  --c-line:       240 4% 14%;     /* hairline border   (was hsl(240 4% 14%))   */
  --c-mute:       240 5% 64%;     /* muted text        (was hsl(240 5% 64%))   */
  --c-brand:      120 190 67;     /* #78BE43 */
  --c-brand-dark:  95 160 48;     /* #5fa030 */

  /* zinc ramp — standard Tailwind zinc in dark mode */
  --z-50:  250 250 250;
  --z-100: 244 244 245;
  --z-200: 228 228 231;
  --z-300: 212 212 216;
  --z-400: 161 161 170;
  --z-500: 113 113 122;
  --z-600:  82 82 91;
  --z-700:  63 63 70;
  --z-800:  39 39 42;
  --z-900:  24 24 27;
  --z-950:   9 9 11;
}

[data-theme="light"] {
  color-scheme: light;

  --c-bg:        220 20% 97%;     /* very light gray page                       */
  --c-card:        0 0% 100%;     /* white cards pop above the gray page        */
  --c-line:      240 6% 88%;      /* light border, visible on white             */
  --c-mute:      240 4% 40%;      /* dark-enough muted text for AA on white     */
  --c-brand:     120 190 67;      /* same bright green for fills/accents        */
  --c-brand-dark: 95 160 48;

  /* zinc ramp mirrored: 50↔950, 100↔900, 200↔800, 300↔700, 400↔600, 500↔500 */
  --z-50:    9 9 11;
  --z-100:  24 24 27;
  --z-200:  39 39 42;
  --z-300:  63 63 70;
  --z-400:  82 82 91;
  --z-500: 113 113 122;
  --z-600: 161 161 170;
  --z-700: 212 212 216;
  --z-800: 228 228 231;
  --z-900: 244 244 245;
  --z-950: 250 250 250;
}
