/* NCD brand kit v1: dark semantic values.
   Link AFTER tokens.css.

   Scoping:
   - [data-theme="dark"]  force dark on a whole page or any subtree (set it on <html> or a wrapper).
   - .dark                the live site scopes dark SECTIONS with .dark; kept so the swap needs no markup change.
   - :root[data-theme="auto"] inside prefers-color-scheme: dark  OPT-IN auto mode.

   AUTO MODE IS OPT-IN ON PURPOSE. Nothing here reacts to prefers-color-scheme unless <html data-theme="auto"> is set,
   so the live site does not flip for dark-mode visitors when INFRA swaps this file in.

   Only SEMANTIC tokens change. The live names (--bone, --ink, --line ...) keep their meaning everywhere.

   THE BLUE RULE on dark grounds: text, links and focus use --signal-d (#93A6FF, 8.3:1).
   --signal-2 (#4A61FF) is for large text, icons, UI marks and the brand dot only.
   #1E3BFF on ink is 2.84:1 and is forbidden. */

[data-theme="dark"],
.dark {
  --bg: var(--ink);
  --bg-2: var(--ink-2);
  --fg: var(--bone);
  --fg-muted: var(--mute-d);
  --accent: var(--signal-d);      /* text-safe */
  --accent-ui: var(--signal-2);   /* dot, icons, large text only */
  --on-accent: var(--ink);        /* ink on #93A6FF */
  --line-c: var(--line-d);
  --focus: var(--signal-d);
  color-scheme: dark;
  background-color: var(--bg);
  color: var(--fg);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: var(--ink);
    --bg-2: var(--ink-2);
    --fg: var(--bone);
    --fg-muted: var(--mute-d);
    --accent: var(--signal-d);
    --accent-ui: var(--signal-2);
    --on-accent: var(--ink);
    --line-c: var(--line-d);
    --focus: var(--signal-d);
    color-scheme: dark;
    background-color: var(--bg);
    color: var(--fg);
  }
}
