:root {
  /* Black industrial identity (Vercel-style). One theme: black, always.
     Native controls (selects, scrollbars, form widgets) match. */
  color-scheme: dark;

  /* Named color primitives — OKLCH.
     The historical names (--lch-black / --lch-white) are kept so every semantic
     token and component keeps working; their VALUES are now the dark palette.
     "black" = primary ink (near-white), "white" = page background (pure black). */
  /* Neutral scale follows GitHub Primer's dark-theme structure (measured from
     their shipped dark.css, converted to OKLCH): background never touches 0%
     lightness — it stays out of the near-black range where HDR tone-mapping
     and cheap-panel black-crush make grays unreliable across real screens.
     Flat achromatic gray throughout — no hue at all — so the neutral scale
     stays fully neutral; --lch-blue is the one and only hue in the palette. */
  --lch-black: 92% 0 0;              /* primary ink — flat neutral off-white (#e3e3e3) */
  --lch-white: 17% 0 0;              /* page background — flat neutral near-black (#0f0f0f) */
  --lch-gray-light: 22% 0 0;         /* elevated surfaces: cards, panels, inputs */
  --lch-gray: 38% 0 0;               /* hairline borders + row hover fill */
  --lch-gray-mid: 55% 0 0;           /* dimmed/disabled text — quieter than muted, still legible */
  --lch-gray-dark: 68% 0 0;          /* muted / secondary text */
  --lch-blue: 66% 0.17 248;    /* the one accent — links / interactive only */
  --lch-blue-light: 26% 0.06 248;
  --lch-blue-dark: 44% 0.09 248;
  --lch-red: 64% 0.21 27;
  --lch-green: 70% 0.12 150;
  /* Resource-type badge accents — the one sanctioned set of category hues
     outside the monochrome+blue rule (see CLAUDE.md). Used ONLY for the small
     type pills on lesson resources, never for general UI. */
  --lch-purple: 70% 0.17 300;
  --lch-yellow: 84% 0.14 95;
  --lch-amber: 75% 0.15 80;          /* honey marker — hue 95 turns olive when translucent on black */
  --lch-teal: 78% 0.11 195;
  --lch-cyan: 74% 0.12 225;    /* doc / datasheet badge */
  --lch-pink: 74% 0.16 350;    /* software (ПО) badge */
  /* Code syntax-highlighting accents (code.css only) — soft hues, readable on
     the black ground without competing with UI color. Never general UI. */
  --lch-orange: 76% 0.14 60;
  --lch-rose: 72% 0.12 20;
  --lch-always-black: 0% 0 0;
  --lch-always-white: 100% 0 0;

  /* Semantic abstractions — unchanged names, so components stay theme-agnostic. */
  --color-bg: oklch(var(--lch-white));
  --color-ink: oklch(var(--lch-black));
  --color-ink-reversed: oklch(var(--lch-white));
  --color-link: oklch(var(--lch-blue));
  --color-negative: oklch(var(--lch-red));
  --color-positive: oklch(var(--lch-green));
  --color-marker: var(--color-ink);   /* monochrome: no chromatic accent — emphasis is ink (brightness), not hue */
  --color-highlight: oklch(var(--lch-amber) / 0.45);   /* rough-notation marker behind the trust-ladder phrase; translucent so near-white ink stays readable on the dark theme */
  --color-subtle-light: oklch(var(--lch-gray-light));
  --color-subtle: oklch(var(--lch-gray));
  --color-disabled: oklch(var(--lch-gray-mid));
  --color-subtle-dark: oklch(var(--lch-gray-dark));
  /* --color-subtle only reaches 1.9:1 against the page background — fine for
     decorative hairlines, but below WCAG 1.4.11's 3:1 floor for a UI control's
     own boundary (an outlined button/input has no fill to fall back on). Same
     primitive as --color-disabled (--lch-gray-mid), named for its real job. */
  --color-border-interactive: oklch(var(--lch-gray-mid));
  --color-selected: oklch(var(--lch-blue-light));
  --color-selected-dark: oklch(var(--lch-blue-dark));
  /* Text selection: hi-vis safety-yellow + black ink — the industrial signal
     language (vests, hazard tape), and the most legible pairing there is. */
  --color-selection: oklch(var(--lch-yellow));
  --color-selection-ink: var(--color-ink-reversed);
  --color-always-black: oklch(var(--lch-always-black));
  --color-always-white: oklch(var(--lch-always-white));
}
