/* Design tokens — colors, type scale, spacing, shared theme values.
   Stylesheet load order: tokens → reset → typography → accessibility →
   components → page styles. */

:root {
  font-size: 16px;

  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Type scale — 12px is the hard site-wide minimum. */
  --text-min: 0.75rem;    /* 12px: dates, tags, version labels, HUD text */
  --text-small: 0.875rem; /* 14px: nav, buttons, inputs, supporting labels */
  --text-body: 1rem;      /* 16px: normal reading text */
  --text-large: 1.125rem; /* 18px */
  --text-title: clamp(1.75rem, 4vw, 2.5rem);

  --leading-tight: 1.3;
  --leading-normal: 1.6;
  --leading-reading: 1.75;

  --measure: 42rem;        /* ~66ch reading width for long text */
  --shell-max: 62.5rem;    /* 1000px content column */
  --touch-target: 2.75rem; /* 44px minimum touch target */
}

/* Dark (default) — neutral off-white carries reading text; green is reserved
   for interaction, identity, and active state. Amber = warning/version,
   red = error/exposed. */
:root,
[data-theme="dark"] {
  --color-bg: #0b0f0c;
  --color-surface: #111713;
  --color-surface-raised: #182019;

  --color-text: #e7eee8;
  --color-text-soft: #bac7bc;
  --color-text-muted: #93a297;

  --color-accent: #70d98b;
  --color-accent-strong: #8bea9f;
  --color-warning: #f2bd69;
  --color-danger: #ff7b72;

  --color-border: #334139;
  --color-control-border: #5b7062;

  --color-accent-tint: rgba(112, 217, 139, 0.08);
  --shell-bg: rgba(11, 15, 12, 0.88);
  --vignette: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --color-bg: #f2f5f0;
  --color-surface: #ffffff;
  --color-surface-raised: #e9efe8;

  --color-text: #1d2b1f;
  --color-text-soft: #3c5240;
  --color-text-muted: #5b6b5d;

  --color-accent: #00701f;
  --color-accent-strong: #005a19;
  --color-warning: #8a5200;
  --color-danger: #b3261e;

  --color-border: #d8e0d6;
  --color-control-border: #9bab9d;

  --color-accent-tint: rgba(0, 112, 31, 0.06);
  --shell-bg: rgba(242, 245, 240, 0.93);
  --vignette: transparent;
}
