/* Cenno design tokens. One source, named as in the design system.
   Mirrors theme.py in the app repo. */

:root {
  /* colour: night */
  --paper: #0E0F0C;
  --paper-raised: #1e1c17;
  --paper-sunk: #121310;
  --ink: #f2eee4;
  --ink-muted: #a8a293;
  --on-ink: #14130f;
  --line: #2e2b24;
  --line-strong: #6e685a;
  --trace: #C9EB2E;
  --trace-soft: #2b3013;
  --trace-ink: #c9eb2e;
  --on-trace: #16140f;
  --ember: #ff6b35;
  --ember-ink: #ff8a5c;
  --on-ember: #16140f;
  --danger: #ff7d8e;
  --focus: var(--ember-ink);

  /* type */
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-20: 80px;

  /* radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* motion */
  --motion-state: 120ms ease-out;
  --motion-overlay: 200ms ease-out;
  --flash: 400ms;
}

/* Day theme. Follows the system appearance.
   --trace stays #C9EB2E and --focus stays var(--ember-ink):
   both are identical in Day and Night.

   Lime and white do not go together. --trace on the Day paper is 1.2:1
   and on a white card 1.4:1, which is unreadable, so in Day the brand
   lime is a fill colour only: buttons, the lime panel, the numbered
   circles. Lime text uses --trace-ink, 6:1 on the Day paper and 6.8:1
   on a white card. Night reads the same, because --trace-ink is the
   lime there. Run tools/check_contrast.py to re-measure. */
@media (prefers-color-scheme: light) {
  :root {
    --paper: #f4f1ea;
    --paper-raised: #ffffff;
    --paper-sunk: #e9e4d8;
    --ink: #16140f;
    --ink-muted: #5f5a4e;
    --on-ink: #f4f1ea;
    --line: #d9d3c4;
    --line-strong: #847d6b;
    --trace-soft: #e4f0af;
    --trace-ink: #526209;
    --on-trace: #16140f;
    --ember: #ff5a1f;
    --ember-ink: #ae3303;
    --on-ember: #16140f;
    --danger: #a3122a;
  }
}
