/**
 * WvdS "White" color scheme (one of three brand accents: Riviera/Night/
 * White - see css/schemes/riviera.css, css/schemes/night.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 -
 * same mechanism as riviera.css/night.css. Like those two, this scheme
 * overrides the full neutral base token set, not just the accent family.
 *
 * IMPORTANT: this is also the scheme main.php hard-codes for every page in
 * the 'wiki' area profile, regardless of the admin-configured
 * 'colorscheme' option (see main.php, "color scheme" section) - the wiki
 * area always renders with this file, by explicit user requirement ("White
 * gilt ausnahmslos fuer den Wiki-Bereich"). The 'colorscheme' config only
 * ever affects the 'site' area profile.
 *
 * Palette source: visually derived from the "MED NAMI - White Deck" social
 * media letterhead template (D:\med-nami\media\WhiteDeck.png, outside this
 * repository) - a light canvas with a navy foot/frame (NOT gold, unlike
 * Riviera/Night) and a thin red hairline. Values below are an
 * approximation of that reference, NOT pixel-measured against the source
 * PNG.
 *
 * Derivation approach: the near-white neutral tones are deliberately
 * aligned with the wiki area's own pre-existing neutrals (--wk-wiki-
 * page-bg/-mat-bg/-card-border in css/tokens.css) so the site and wiki
 * areas look coherent when this scheme is active in both. The accent/gold/
 * link family is reused 1:1 from riviera.css (same steel-azure/gold hues)
 * so all three schemes stay one recognizable brand family - only the
 * canvas differs.
 *
 * --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` AND NOT ON `:root` - same split, and the same
   reason, as css/tokens.css: these six are the ramp, and while `wkfluentui` is
   installed its skin/scheme axes own the ramp. `:root` here would outweigh the
   plugin (this file is linked AFTER the bundle, so it wins every tie on source
   order) and the axes would be dead for exactly the tokens they exist for.
   At `html` the file still carries the whole scheme when the plugin is absent,
   which is what a scheme file is for.
   The brand half of this file keeps `:root` - see the second block below. */
html {
    /* ---- neutral base tokens: near-white canvas ----
       Aligned with the pre-existing --wk-wiki-page-bg/-mat-bg/-card-border
       tokens in css/tokens.css, so the wiki area (always this scheme) and a
       site page using this scheme read as one coherent surface family. */
    --wk-ink: #0B2238;
    --wk-ink-soft: #16324F;      /* derived: lightened ink for secondary headings */
    --wk-paper: #FFFFFF;

    --wk-surface: #FFFFFF;
    --wk-surface-alt: #F5F7F9;   /* derived: matches the wiki area's light "mat" tone family */
    --wk-surface-muted: #E8EAED; /* same value as --wk-wiki-mat-bg (css/tokens.css) - deliberate reuse */
}

/* Sidebar/Auxbar Contract "App" variant (tokens.css, ".wk-shell-sidebar,
   .wk-shell-auxbar") wires --wk-sidebar-bg from --wk-surface-muted by
   default - correct where that token was tuned for (coordinating with the
   WIKI page's own mat/frame background behind the white content card, per
   this file's derivation note above), wrong here: the admin/Studio area
   this variant actually paints (#dokuwiki__docsidebar on an admin screen,
   wksqliteds' Object Explorer, ...) has no mat/card frame to coordinate
   with (admin screens render borderless, see wiki-shell.php's own note on
   the wiki-card being "a DOCUMENT affordance... admin screens are a
   WebView") - so the inherited value just reads as an unexplained cool-
   gray patch against the plain white canvas around it (user feedback
   2026-07-22). Overridden back to plain white here, specifically for this
   scheme: same selector tokens.css uses, so this wins the cascade purely
   by loading later (see this file's own docblock: linked AFTER the
   css.php bundle) - a :root-only override would NOT win here, since
   tokens.css's class selector directly matches the sidebar element while
   a :root rule only reaches it through inheritance, which the cascade
   always ranks below any directly-matching rule regardless of load order.
   --wk-sidebar-bg-alt (var(--wk-surface-alt), already near-white)
   is untouched - only the base tone was the reported mismatch. */
.wk-shell-sidebar,
.wk-shell-auxbar {
    --wk-sidebar-bg: var(--wk-surface, #FFFFFF);
}

/* Four more of the ramp, same reasoning as the block above. */
html {
    --wk-text: #3c4450;          /* reused from riviera.css: cool navy-leaning gray */
    --wk-text-alt: #5c6670;      /* reused from riviera.css */
    --wk-border: #D7D9DB;        /* same value as --wk-wiki-card-border (css/tokens.css) - deliberate reuse */
    --wk-border-light: #E3E6E8;  /* derived, lighter tint of the above */
}

/* THE BRAND HALF. `:root` on purpose: this is what the template states about
   itself rather than what it hands over, and it is the half a skin has no
   opinion about - `wkfluentui`'s accent vocabulary is three families and this
   template's steel azure is none of them (see css/tokens.css's closing block
   for the measurement and the decision that is still open). */
:root {
    /* ---- brand primitives (reused from Riviera for family consistency) ----
       --wk-steel-azure itself is not declared here - verified dead (no
       var() consumer anywhere in this template or any wvds* plugin); its
       value already lives under the generic --wk-accent below. */
    --wk-navy: #0B2238;

    /* ---- accent family (identical to riviera.css - same steel-azure hue,
       only the canvas/frame differ between Riviera and White) ----
       #367399, not the brand-specified #3B7EA8: on this scheme's own
       --wk-surface (#FFFFFF, even lighter than Riviera's ivory) the
       un-darkened value measured 4.43:1 as body text and for white button
       text on the --wk-btn-primary fill - both below WCAG AA's 4.5:1. Same
       fix and same measured reasoning as riviera.css's own contrast-audit
       note; #367399 clears 4.5:1 here too (5.16:1 on --wk-surface). */
    --wk-accent: #367399;
    --wk-accent-dark: #0B2238;
    --wk-accent-light: #6FA4C6;

    /* ---- gold family (kept for secondary-accent-slot consistency across
       the brand family, even though White's frame itself is navy) ----
       Two slots since 2026-08-11, split by ground; contract and measurement in
       wkfluentui/style.css. This is a light world, so the on-surface slot is the
       bronze: 5.16:1 on this scheme's --wk-surface. */
    --wk-gold: #C19C66;
    --wk-gold-on-surface: #88682F;
    --wk-gold-light: #C7A768;

    --wk-link: #367399;
    --wk-link-hover: #0B2238;

    --wk-highlight: rgba(59, 126, 168, 0.08);

    --wk-admin-accent: #367399;
    --wk-admin-accent-light: #6FA4C6;

    --wk-focus: #367399;
    /* Derived from the ring rather than restated as its own rgba. The literal
       was the azure at 25%, and it stayed the azure when an explicit scheme
       moved the ring itself - so a focused control drew a terracotta ring
       inside a blue glow. Deriving costs nothing and cannot come apart. */
    --wk-focus-shadow: color-mix(in srgb, var(--wk-focus) 25%, transparent);

    --wk-btn-primary: #367399;
    --wk-btn-primary-hover: #0B2238;

    /* ---- "White" body canvas ----
       NOT declared here any more. It was a flat #FFFFFF, which is this world's
       GROUND, so css/tokens.css states it once as that role for every world.
       Kept as a literal here it was the single most visible half-repaint: this
       file is what the wiki area always loads, so an explicitly dark page drew
       dark cards on a white canvas. The other two scheme files keep their
       gradient, guarded by the scheme they were drawn for. */

    /* ---- brand accent motif (css/brand-accent.css) ----
       Red hairline (--wk-error, the existing contract red #c0392b from
       css/tokens.css, reused rather than introducing a new, un-audited
       color - same reuse as riviera.css). */
    --wk-brand-hairline: var(--wk-error);
}
