/* Watervize base design tokens (neutrals, foreground, lines, named brand shades,
   semantic accents, typography, motion).

   WHY THIS EXISTS: dashboard.css and power-console.css were authored against this
   token family, but the tokens were never shipped to a served stylesheet — they
   lived only in archived design-handoff files (docs/.../colors_and_type.css). Those
   pages render correctly today ONLY because every reference carries a hardcoded
   fallback (e.g. var(--wv-pine, #298452)). Defining the tokens here removes that
   fragility: the var() references now resolve to a real value instead of relying on
   the fallback, and dark mode becomes possible for neutral surfaces/text.

   The LIGHT values below are byte-identical to the fallbacks already used in those
   files, so light mode is unchanged. The dark block adapts the NEUTRAL surface/text/
   line tokens only (semantic colors, brand shades, type and motion are mode-neutral).

   DISTINCT from --wv-primary*: those brand-primary tokens are theme-derived and
   contract-tested in wv-themes.css; do NOT redefine them here. Bare --wv-primary-tint
   is intentionally omitted (its call sites disagree on the fallback — clean those up at
   the call sites to use --wv-primary-tint-10).

   Load order: after wv-themes.css, before core.css (see layout/partials/styles.html).

   INTERIM: the long-term home for these is the SCSS token layer (_theme/_wv-tokens.scss),
   so they derive and dark-adapt alongside the primary tokens. This served plain-CSS file
   is a non-regressive bridge until that migration happens. */

:root {
    /* Neutral scale (light surfaces) */
    --wv-n0: #fff;
    --wv-n50: #f7f8f6;
    --wv-n100: #eef0ec;

    /* Foreground / text */
    --wv-fg: #2a333c;
    --wv-ink: #2a333c;
    --wv-fg-muted: #5a6470;

    /* Lines */
    --wv-border: #e3e7e1;
    --wv-divider: #ecefe9;

    /* Named brand shades (fixed palette entries, not theme-derived) */
    --wv-pine: #298452;
    --wv-secondary: #0a5555;

    /* Semantic accents (intentionally mode-neutral; do not follow the brand primary) */
    --wv-info: #2b7a9b;
    --wv-warning: #c98a1d;
    --wv-warning-bg: #fbeed4;
    --wv-danger: #b3322b;
    --wv-status-draft: #be33ff;

    /* Typography */
    --wv-font-sans: 'Source Sans 3', system-ui, sans-serif;
    --wv-font-mono: monospace;

    /* Motion */
    --wv-dur-base: 180ms;
    --wv-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Dark adaptation of the neutral surface/text/line tokens. Values are sourced from the
   app's established dark palette (wv-dark-surfaces.scss: body #24393d, elevated #2d4b4a,
   AA-safe muted #bcc4c4). Semantic colors, brand shades, type and motion are unchanged.
   NOTE: these dark neutrals are a first pass and warrant a quick visual QA in dark mode. */
:root[data-bs-theme='dark'] {
    --wv-n0: #2d4b4a;
    --wv-n50: #294240;
    --wv-n100: #24393d;
    --wv-fg: #e4e8e8;
    --wv-ink: #e4e8e8;
    --wv-fg-muted: #bcc4c4;
    --wv-border: #3b5350;
    --wv-divider: #34504c;
}
