/**
 * Template Theme
 *
 * CSS custom properties driven by CLIENT_CONFIG.branding.
 * js/theme-init.js reads CLIENT_CONFIG and sets the --client-* vars on
 * :root before paint. These vars then feed the --brand-* vars below,
 * which tile CSS should reference.
 *
 * Fallback chain: tile CSS → --brand-* → --client-* → hardcoded default
 */
:root {
    /* Brand primary — header, buttons, dominant brand color */
    --brand-primary:       var(--client-primary, #16a34a);
    --brand-primary-light: var(--client-primary-light, #22c55e);
    --brand-primary-dark:  var(--client-primary-dark, #15803d);

    /* Brand accent — success states, badges, call-to-action highlights.
       Hex fallbacks match CLIENT_CONFIG.branding.accentColor* defaults
       (WCS green for this fork). */
    --brand-accent:        var(--client-accent, #16a34a);
    --brand-accent-light:  var(--client-accent-light, #22c55e);
    --brand-accent-dark:   var(--client-accent-dark, #15803d);

    /* Visual-overhaul tokens — consumed by css/visual-overhaul.css (the RT overhaul
       ported to WCS and adapted to green). Mirror RT's pattern: a --client-* hook
       with a WCS-green hex fallback. js/theme-init.js does NOT set these --client-*
       hooks yet (same as RT), so the fallbacks below carry the values. A client fork
       can override by redefining these --brand-* vars or wiring the hooks in theme-init.js. */
    --brand-primary-rgb:   var(--client-primary-rgb, 22, 163, 74);  /* #16a34a as R,G,B for rgba() tints */
    --brand-on-primary:    var(--client-on-primary, #ffffff);       /* text/ink on a primary-color (green) fill */
    --brand-primary-deep:  var(--client-primary-deep, #14532d);     /* deepest green — emphasis numerals on a light tint */
    --brand-primary-sheen: var(--client-primary-sheen, #1eb24f);    /* lit top stop of the primary-button gradient */

    /* Legacy aliases — existing CSS files (notably css/shared.css line ~6) and
       a small number of inline styles in tile HTML still reference these
       WCS-era names. The aliases let that code keep working while picking up
       the configured brand color automatically. Note: WCS used "primary green"
       semantically as the dominant brand color, so these aliases map onto
       --brand-primary (not --brand-accent) for visual continuity. */
    --primary-green:       var(--brand-primary);
    --primary-green-light: var(--brand-primary-light);
    --primary-green-dark:  var(--brand-primary-dark);
}
