/**
 * Design tokens — role-based CSS custom properties.
 *
 * Redefines SWELL's own `--color_*` vars (so every existing SWELL component
 * picks up the new palette for free) and adds the new `--wynx-*` tokens used
 * by child-theme components (global.css, cta.css siblings, later phases).
 *
 * Load order: enqueued on `wp_enqueue_scripts` at priority 20 with dependency
 * `swell_custom` (SWELL's own dynamic `:root` vars print inline on that
 * handle at priority 8, right before this file). That ordering is what makes
 * the redefinitions below win over SWELL's defaults.
 *
 * The dark-mode blocks below exist only to keep the existing article-level
 * dark components (assets/css/cta.css) coherent. This is NOT a site-wide
 * dark theme — SWELL's --color_* vars are intentionally left untouched here,
 * so headers/footers/backgrounds do not flip with the reader's OS theme.
 */

:root {
  /* SWELL vars — redefined */
  --color_main: #0b2540;
  --color_text: #1e2a38;
  --color_link: #1665c9;
  --color_bg: #ffffff;
  --color_htag: #0b2540;
  --color_header_bg: #ffffff;
  --color_header_text: #0b2540;
  --color_footer_bg: #0b2540;
  --color_footer_text: #c9d4e2;

  /* SWELL-derived vars — SWELL computes these in PHP from the *customizer*
     color_main (still the old teal), so they must be re-derived from our navy
     here or they stay teal-tinted. Mirrors classes/Style/Color.php:
       --color_main_thin = get_rgba(main, 0.05, +.25)  (faint bg)
       --color_main_dark = get_rgba(main, 1, -.25)      (darker, e.g. hovers)
       --color_list_check / --color_list_num = main */
  --color_main_thin: rgba(11, 37, 64, 0.06);
  --color_main_dark: #081b30;
  --color_list_check: #0b2540;
  --color_list_num: #0b2540;

  /* wynx vars — new */
  --wynx-brass: #a8772e;
  --wynx-brass-ink: #8a5f1e;
  --wynx-brass-tint: #f5eedf;
  --wynx-line: #e2e7ef;
  --wynx-surface: #f4f6fa;
  --wynx-muted: #5a6675;
  --wynx-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --wynx-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* No dark-mode overrides for --wynx-*: the header (white), footer (navy) and
   homepage are intentionally theme-stable (no site-wide dark theme). The
   existing dark article components (cta.css) use their own hardcoded
   prefers-color-scheme rules and do NOT read these tokens, so flipping
   --wynx-* here only broke theme-stable surfaces (e.g. a --wynx-surface card
   going dark while --color_htag text stayed navy). Keep --wynx-* constant. */
