/* Kendo dark-mode palette. Enabled/disabled alongside data-bs-theme by appFunc.ToggleDarkMode (site.js)
   and the bootstrap sync script in _Layout.cshtml. Kept as its own stylesheet rather than folded into
   site.css so a light-mode page never pays to parse it.

   bootstrap-main.css (~/lib/kendo-ui/styles/) builds its ENTIRE palette - text colors, hover states,
   "subtle"/"alt" variants, the lot - as oklch() relative-color expressions derived from a handful of
   root seed variables (--kendo-color-app-surface, -surface, -base, -border, -inverse, -subtle). Most of
   those derivations are e.g. `oklch(from var(--kendo-color-app-surface) clamp(0.2621, (0.6 - l) *
   99999, 0.95) ...)` - a formula that already picks light text on a dark surface and dark text on a
   light one - so overriding just the seed variables below re-themes grids/buttons/chips/inputs/etc.
   throughout, without touching per-widget .k-* rules. Brand/status hues (primary, secondary, success,
   warning, error, info, tertiary, series) are deliberately NOT overridden here, same reasoning as
   site.css's --jas-accent: they already read fine against both a light and a dark surface.

   Verify visually after any change here - per docs/kendo-traps.md, a wrong value here fails silently
   (no error, no console warning), it just renders with poor contrast. */
[data-bs-theme="dark"] {
    --kendo-color-app-surface: oklch(18% 0.006 250deg);
    --kendo-color-surface: oklch(22% 0.006 250deg);
    --kendo-color-base: oklch(30% 0.008 248deg);

    /* Light-mode border/border-alt/inverse are a DARK color at low alpha, which reads as a soft gray
       line against app-surface's white. The same dark-at-low-alpha would be nearly invisible against
       this dark-mode app-surface, so these flip to a light color at the same alpha/lightness shape
       instead - border/border-alt keep their light-mode alpha values (.13 / .2) so line weight matches,
       inverse keeps light-mode's shape too (a color meant to contrast against app-surface either way). */
    --kendo-color-border: oklch(92% 0.01 248deg / 0.13);
    --kendo-color-border-alt: oklch(92% 0.01 248deg / 0.2);
    --kendo-color-inverse: oklch(92% 0.01 248deg);

    /* Fixed (not surface-relative) medium gray used for muted/secondary text - nudged lighter than
       light mode's 47.71% for more headroom against a near-black surface instead of a white one. */
    --kendo-color-subtle: oklch(65% 0.014 240.22deg);
}
