/* ConsumerDJ tokens — the one source for colour, type, radius and spacing.
   Dark is the default. Light follows the OS unless a theme is forced with
   data-theme="light" | "dark" on <html> or on any element (scoped theming).

   Colour is a verb:
     --acc  blue  = live or measured
     --ok   green = inside
     --bad  red   = crossed
     --ink        = everything at rest. The mark never takes colour.

   --acc / --ok / --bad are the brief's fixed values, used for fills, bars,
   rings and borders. Where one of them colours small text, use the matching
   *-text token: it is the same hue, adjusted so text clears WCAG AA (4.5:1)
   on paper, card and soft in that theme. */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a0a0b;
  --ink: #f4f3ef;
  --mute: #8d8c88;
  --rule: #232327;
  --card: #111113;
  --soft: #17171a;
  --acc: #3d6bff;
  --ok: #39d98a;
  --bad: #ff5a3c;
  --acc-text: #6a8cff;
  --ok-text: #39d98a;
  --bad-text: #ff5a3c;
  --on-acc: #ffffff;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .5);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --paper: #ffffff;
    --ink: #0b0d12;
    --mute: #5f6672;
    --rule: #e6e8ec;
    --card: #ffffff;
    --soft: #f6f7f9;
    --acc: #1f4fe0;
    --ok: #15935c;
    --bad: #d1412a;
    --acc-text: #1f4fe0;
    --ok-text: #0e7247;
    --bad-text: #b8341f;
    --on-acc: #ffffff;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .18);
  }
}

[data-theme="light"] {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #0b0d12;
  --mute: #5f6672;
  --rule: #e6e8ec;
  --card: #ffffff;
  --soft: #f6f7f9;
  --acc: #1f4fe0;
  --ok: #15935c;
  --bad: #d1412a;
  --acc-text: #1f4fe0;
  --ok-text: #0e7247;
  --bad-text: #b8341f;
  --on-acc: #ffffff;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .18);
}

/* Repeated so a dark island inside a light page still resolves to dark. */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a0a0b;
  --ink: #f4f3ef;
  --mute: #8d8c88;
  --rule: #232327;
  --card: #111113;
  --soft: #17171a;
  --acc: #3d6bff;
  --ok: #39d98a;
  --bad: #ff5a3c;
  --acc-text: #6a8cff;
  --ok-text: #39d98a;
  --bad-text: #ff5a3c;
  --on-acc: #ffffff;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .5);
}

:root {
  /* Type. Two weights for meaning: 100 for the world, 800 for the move.
     600 for body emphasis. 200/300/500/700 exist for the wordmark, subs,
     labels and buttons only. */
  --font: Archivo, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --w-world: 100;
  --w-move: 800;
  --w-emph: 600;

  --fs-display: clamp(38px, 5.2vw, 74px);   /* site hero */
  --fs-h2: clamp(30px, 4.4vw, 58px);        /* site section */
  --fs-page: clamp(24px, 3vw, 34px);        /* app page title */
  --fs-number: 22px;                        /* a figure on a card */
  --fs-move: 16px;                          /* move title */
  --fs-body: 14px;
  --fs-small: 12.5px;
  --fs-meta: 11.5px;
  --fs-label: 10.5px;                       /* uppercase, tracked .14em */

  --track-tight: -.03em;                    /* 800 */
  --track-label: .14em;
  --lh: 1.45;

  /* Radius */
  --r-card: 10px;
  --r-row: 8px;
  --r-tag: 4px;
  --r-pill: 999px;

  /* Space */
  --gap: 12px;
  --gap-s: 6px;
  --pad-card: 18px;
  --section: 56px;
  --maxw: 1160px;
}
