/* Design tokens. Light by default, dark via prefers-color-scheme. One
   accent colour throughout; status colours are separate from the accent. */
:root {
  --color-bg: #ffffff;
  --color-bg-elevated: #f6f7f9;
  --color-bg-sunken: #eef0f3;
  --color-text: #14181f;
  --color-text-muted: #5c6472;
  --color-border: #e3e6ea;
  --color-accent: #2f6fed;
  --color-accent-text: #ffffff;
  --color-accent-soft: #e8f0fe;
  --color-ok: #1f9d55;
  --color-ok-soft: #e6f6ec;
  /* #b1791f on --color-warn-soft measured 3.33:1 (WCAG relative-luminance formula against these
     resolved tokens) — below the 4.5:1 AA minimum for normal text, and this is the pair the
     account-status "Expiring soon" chip and Home's "Check this" source chip render at 12.8px/600
     weight (well under the "large text" 3:1 threshold). #8a5c14 measures ~5.17:1 against the same
     background — comfortably AA — while staying the same hue as before. */
  --color-warn: #8a5c14;
  --color-warn-soft: #fbf1de;
  --color-error: #d1372f;
  --color-error-soft: #fbe9e8;
  --color-neutral-soft: #eef0f3;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --touch: 48px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-card: 0 1px 2px rgba(20, 24, 31, 0.06), 0 1px 8px rgba(20, 24, 31, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #101318;
    --color-bg-elevated: #171b21;
    --color-bg-sunken: #0b0d11;
    --color-text: #f1f3f6;
    --color-text-muted: #9aa3b2;
    --color-border: #272c34;
    --color-accent: #6d97ff;
    --color-accent-text: #0b0d11;
    --color-accent-soft: #1c2740;
    --color-ok: #3fcb7c;
    --color-ok-soft: #12291d;
    --color-warn: #e3ab4c;
    --color-warn-soft: #2c2313;
    --color-error: #ff6f66;
    --color-error-soft: #2e1614;
    --color-neutral-soft: #1d222a;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 8px rgba(0, 0, 0, 0.24);
  }
}
