/* CyberNative brand kit v1.4.2 — Inked Dark, games surface.
 *
 * Drop-in replacement for tokens-inked.css. Every variable name in v1.3.2 is
 * kept, for the same reason v1.3.2 kept v1.1.1's: the stylesheets that consume
 * them do not change. The role column in BRAND.md stays normative; the names
 * are historical, and on this file several of them read as their opposite
 * ("ink" is the light text, "canvas" is the near-black field).
 *
 * Type, spacing, radii and page widths are identical to tokens-inked.css and
 * must not be changed here.
 *
 * Measured, not guessed. Every pair below is a WCAG 2.1 contrast ratio against
 * the surface the shell actually paints it on, at the threshold that applies
 * (4.5:1 text, 3:1 non-text/UI):
 *
 *   ink on canvas .............. 16.84  text
 *   ink on panel ............... 15.22  text
 *   muted on canvas ............  8.40  text
 *   muted on panel .............  7.59  text
 *   link on canvas ............. 10.65  text
 *   link on panel ..............  9.63  text
 *   amber on canvas ............  9.27  text and focus ring
 *   edge on canvas .............  3.68  UI outline
 *   edge on panel ..............  3.32  UI outline
 *   on-fill on leaf ............  9.18  button label
 *   on-fill on amber ...........  9.27  button label
 *   ink on mint ................ 13.52  chip label
 *   danger on canvas ...........  7.59  text
 *
 * Reproduce with scripts/check-contrast.mjs, which reads this file rather than
 * a copy of these numbers, so the table cannot drift away from the palette.
 */
:root {
  color-scheme: dark;

  --cn-color-canvas: #0c0e12;      /* Field — near-black page base */
  --cn-color-panel: #161a20;       /* Panel — the raised card surface */
  --cn-color-ink: #f3efe7;         /* Ink — text. On this surface it is warm off-white. */
  --cn-color-muted: #a2acb8;       /* Muted */
  --cn-color-link: #f6b455;        /* Inline links — the accent family, one step lighter than Signal */
  --cn-color-leaf: #14c8b8;        /* Bio — fill only, never a stroke or text */
  --cn-color-leaf-strong: #1c6f68; /* Deep */
  --cn-color-mint: #1a262a;        /* Wash — quiet highlight. Dark surfaces wash down, not up. */
  --cn-color-amber: #f6a13c;       /* Signal — the only accent, and now genuinely amber */
  --cn-color-line: #2b323c;        /* Hairline — chart grid only, decorative */
  --cn-color-danger: #ff7a6b;      /* Danger */

  /* Three roles that --cn-color-ink carried alone on the light surface, where
     text, outline and offset shadow could all be the same near-black. They
     cannot be the same colour here: an outline as bright as the text turns
     every card into a bright box, and a 5px offset shadow in the text colour
     is a white slab under everything on the page. Split once, in the token
     layer, so the shell keeps one rule per role at both polarities. */
  --cn-color-edge: #626d7c;        /* Outline — the 2.5px stroke, 3:1 against both surfaces */
  --cn-color-on-fill: #0c0e12;     /* Label on a bright fill (Bio, Signal, and Ink slabs) */
  /* The hard offset is the whole Inked drawing language, and it is the one
     token that does not survive the polarity flip. On Paper it is the darkest
     value on the page; here there is nothing darker than the canvas to cast,
     and black renders as no shadow at all — every button and card comes out
     flat. So on this surface the offset is a lit ledge rather than a shadow:
     1.93:1 against the canvas and 1.75:1 against Panel, which reads as a lift
     at 5px without becoming the white slab a text-coloured offset would be. */
  --cn-color-offset: #3a4351;      /* Hard offset — a lit ledge, not a shadow */
  /* A divider is decorative and carries no 3:1 duty, so it does not take the
     control-outline value: a full-bleed rule at outline strength is the
     loudest thing on a near-black page and cuts it into slabs. */
  --cn-color-divider: #2b323c;     /* Header, footer and section dividers */

  --cn-chart-1: #14c8b8;
  --cn-chart-2: #f6a13c;
  --cn-chart-3: #c79bea;
  --cn-chart-4: #ff7a6b;
  --cn-chart-5: #7fb2ff;

  --cn-font-display: "Fraunces", Georgia, serif;
  --cn-font-body: "IBM Plex Sans", Arial, sans-serif;
  --cn-font-mono: "IBM Plex Mono", monospace;

  --cn-space-1: 0.25rem;
  --cn-space-2: 0.5rem;
  --cn-space-3: 0.75rem;
  --cn-space-4: 1rem;
  --cn-space-6: 1.5rem;
  --cn-space-8: 2rem;
  --cn-space-12: 3rem;
  --cn-space-16: 4rem;
  --cn-space-24: 6rem;
  --cn-space-32: 8rem;

  --cn-radius-rule: 0.125rem;
  --cn-radius-control: 0.625rem;
  --cn-page-max: 74rem;
  --cn-reading-max: 68ch;
  --cn-figure-max: 60rem;

  /* Inked drawing language, unchanged from v1.2.0. */
  --cn-stroke: 2.5px;
  --cn-stroke-small: 2px;
  --cn-offset: 5px;
  --cn-offset-figure: 8px;
}
