/**
 * WvdS "Riviera" color scheme (one of three brand accents: Riviera/Night/
 * White - see css/schemes/night.css, css/schemes/white.css)
 *
 * Scheme mechanics (styles contract v2): a :root override file, linked by
 * main.php AFTER the css.php bundle when the admin option 'colorscheme'
 * selects it, so it wins the cascade without touching any component CSS.
 * This scheme (formerly named navy-ivory.css/"Premium Navy Ivory") also
 * overrides the neutral base tokens (ink, paper, text, border, sidebar) -
 * the full palette below, not just the accent family - because it is the
 * template's brand default, not a lightweight accent-only retint.
 *
 * Palette source: brand crest + wordmark assets delivered 2026-07-08
 * (wk:banner.png / wvds_white_knight_labs_logo_1024.png), already
 * rendered in this exact palette - navy shield, gold crown, ivory ground -
 * matching the "MED NAMI - Riviera" social media letterhead template
 * (ivory ground, navy wave, gold frame, thin red hairline). Base hex
 * values as specified by the brand owner:
 *   --wk-ink:         #06162A
 *   --wk-navy:        #0B2238
 *   --wk-steel-azure: #3B7EA8
 *   --wk-gold:        #C19C66   (was #B08A42 until 2026-08-11, see below)
 *   --wk-ivory:       #F7F5EF
 *   --wk-ivory-2:     #ECE7DB
 *
 * --wk-steel-azure/-ivory/-ivory-2 themselves are NOT declared as
 * custom properties below -
 * verified (grep across this template and every wvds* plugin) that no
 * component ever consumes them via var(), only their SAME hex values
 * under the generic contract names (--wk-accent, --wk-surface-alt,
 * --wk-surface-muted below). Kept here as prose only, tying the
 * generic token values back to the brand-named hex they originated from.
 *
 * Values not given directly by the brand owner (accent-light, gold-dark/
 * -light, text, border, highlight) are derived tints/shades of the above
 * and are ANNOTATED as such below, each with the base colour it is derived
 * from, so the derivation can be re-done from this file alone; the token
 * contract itself is de:wiki:dwe:styles-contract.
 *
 * CONTRAST AUDIT (WCAG 2.2 AA, standard relative-luminance contrast formula
 * applied to this file's own shipped hex values). Body text needs 4.5:1,
 * large text (>=24px, or >=18.66px bold) and UI-component boundaries need
 * 3:1:
 *   --wk-text on --wk-paper/--wk-surface            9.02 / 9.84  pass
 *   --wk-text-alt on --wk-paper/--wk-surface        5.37 / 5.85  pass
 *   --wk-ink on --wk-paper (large text only)        16.66:1      pass
 *   --wk-gold on the navy chrome band (label text)  6.32:1       pass
 *   --wk-gold-on-surface on --wk-paper/--wk-surface 4.74 / 5.16  pass
 *
 * THE SENTENCE THAT STOOD HERE WAS RIGHT AND WAS IGNORED, so it is worth
 * keeping the record: it read "--wk-gold as text on --wk-paper/--wk-surface
 * 2.94 / 3.20 FAIL ... never use --wk-gold for body-size text on a light
 * surface, use --wk-gold-dark instead". Measured 2026-08-11, SIX rules did
 * exactly that - three blog icons, two section marks and, worst of them, the
 * CTA button's focus ring at 3.20:1 against the white fill the :focus rule
 * two lines above it sets. A rule written in a docblock is a rule nobody
 * checks; the split into two ground-named slots makes the wrong choice hard
 * to make. The check a reader can run: every rule that paints with --wk-gold
 * must sit in a block whose own background is the navy chrome, or be the
 * background itself - anything on --wk-surface takes --wk-gold-on-surface.
 * The steel-azure accent/link/button family (--wk-accent/-link/
 * -admin-accent/-focus/-btn-primary) originally shared one value,
 * #3B7EA8, steel-azure as specified by the brand owner (see above) - that
 * measured 4.07:1 as body text on --wk-paper and 4.43:1 on --wk-surface
 * (both FAIL 4.5:1), and 4.43:1 for white button text on that same fill as
 * --wk-btn-primary (also FAIL). All three uses share one token value, so
 * one adjustment fixes all three: darkened by one HSL-lightness step to
 * #367399 (same hue/saturation, ~4.5% darker), which measures 4.73:1 /
 * 5.16:1 as text and 5.16:1 for white-on-fill - comfortably past 4.5:1
 * everywhere the un-darkened value fell short, and still recognizably the
 * same steel-azure. --wk-steel-azure itself, in the brand-owner palette
 * above, is left as specified - only the derived tokens below moved.
 *
 * --wk-brand-hairline is consumed by css/brand-accent.css (hairline
 * motif at the site header/menu seam and the wiki topbar) - not part of
 * the cross-template styles contract, only meaningful together with that
 * component. (The page-shell top rule that component also draws is a
 * fixed red, --wk-error, not scheme-dependent - see that file.)
 *
 * License: GPLv3 (see template LICENSE.md)
 */
/* THE NEUTRAL HALF, ON `html` - see css/tokens.css for the full reasoning.
   Short version: this file is linked after the css.php bundle, so at `:root` it
   would win every tie against `wkfluentui` on source order and the skin and
   scheme axes would never be visible. At `html` it is outweighed while the
   plugin is installed and carries the whole scheme when it is not.
   These ten values are also the source the `bizway` skin's HERITAGE world was
   derived from, so with the plugin present the page keeps this palette - it
   arrives through the axis instead of through this file. */
html {
    /* ---- neutral base tokens ---- */
    --wk-ink: #06162A;
    --wk-ink-soft: #0B2238;
    --wk-paper: #F7F5EF;

    --wk-surface: #ffffff;
    --wk-surface-alt: #F7F5EF;
    --wk-surface-muted: #ECE7DB;

    --wk-text: #3c4450;         /* derived: cool navy-leaning gray, replaces BizWay's #5c5c5c */
    --wk-text-alt: #5c6670;     /* derived: lighter tint of --wk-text, replaces BizWay's #717070 */
    --wk-border: #D9D2C0;       /* derived: warm ivory-gray, replaces BizWay's #cdcdcd */
    --wk-border-light: #E7E1D2; /* derived, lighter tint of the above */

    /* A hover tint is a neutral, so it is handed over with the rest. It sat in
       the brand half at first and the probe caught it: declared in both halves,
       one of the two dead. */
    --wk-sidebar-hover: rgba(11, 34, 56, 0.06); /* derived: navy tint */
}

/* THE BRAND HALF, on `:root` on purpose - what the template states about
   itself rather than what it hands over. */
:root {
    /* ---- brand primitives (as specified) ---- */
    --wk-navy: #0B2238;

    /* ---- accent family (primary = steel azure, replaces BizWay blue) ----
       #367399, not the brand-specified #3B7EA8 (--wk-steel-azure above) -
       see the CONTRAST AUDIT note in this file's docblock. */
    --wk-accent: #367399;
    --wk-accent-dark: #0B2238;
    --wk-accent-light: #6FA4C6; /* derived: lightened steel-azure */

    /* ---- gold family (secondary accent slot) ----
       Split by ground on 2026-08-11; contract in wkfluentui/style.css. */
    --wk-gold: #C19C66;
    --wk-gold-on-surface: #88682F;
    --wk-gold-light: #C7A768;   /* derived: ~+15% luminance */

    --wk-link: #367399;
    --wk-link-hover: #0B2238;

    --wk-highlight: rgba(59, 126, 168, 0.08); /* derived: steel-azure tint on ivory */

    --wk-admin-accent: #367399;
    --wk-admin-accent-light: #6FA4C6;

    --wk-focus: #367399;
    /* Derived rather than restated - see white.css for what came apart when it
       was its own rgba literal. */
    --wk-focus-shadow: color-mix(in srgb, var(--wk-focus) 25%, transparent);

    --wk-btn-primary: #367399;
    --wk-btn-primary-hover: #0B2238;

    /* ---- brand accent motif (css/brand-accent.css) ----
       Red hairline, matching the Riviera letterhead template. --wk-error
       is the existing contract red (#c0392b, css/tokens.css) reused here
       rather than introducing a new, un-audited color. */
    --wk-brand-hairline: var(--wk-error);
}

/* ---- "Premium Navy Ivory" body canvas ----
   Consumed by css/base.css: body { background: var(--wk-body-bg, ...) }.

   GUARDED BY THE SCHEME IT WAS DRAWN FOR, and that guard is the whole point.
   Which scheme FILE is linked and which scheme AXIS is active are two different
   decisions - the file follows the operator's `colorscheme` option, the axis
   follows the reader, a namespace or a request. They agree in the ordinary
   case (inc/wk-axes.php offers this file's world as the axis value), and when
   they do not, an unguarded ivory gradient would paint the canvas of a page
   whose surfaces are navy. css/tokens.css states the flat, role-derived ground
   for every world; this adds the decoration back for the one world it belongs
   to.
   `html[...]` is (0,1,1) and beats that flat declaration at (0,0,1) without
   reaching the (0,2,0) the plugin's own scheme blocks use - which is correct,
   because the plugin declares nothing for this token and should not have to. */
html[data-wk-scheme="heritage"] {
    --wk-body-bg:
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.92) 0 16rem, transparent 34rem),
        radial-gradient(circle at 80% 88%, rgba(176, 138, 66, 0.07) 0 15rem, transparent 32rem),
        linear-gradient(135deg, #FFFDF7 0%, #F7F5EF 42%, #ECE7DB 100%);
}
