/* ============================================================================
   THEME TOKENS — the single source of truth for every raw style value.
   Spec: renovation/04-THEME-SYSTEM.md §2.
   RULE: raw values (hex, px sizes) may live ONLY in this file.
   Screens/components consume semantic tokens via var(--...) and never
   hardcode a value. A seasonal theme overrides ONLY the values marked
   "themeable" — typography, spacing, shape and motion are locked across
   themes (§5: readability is not seasonal). NO BLUR anywhere, ever.
   ========================================================================== */

:root,
[data-theme="default"] {
  /* ---- Color: surfaces (themeable tints) ---- */
  --color-bg: #f4f6f3;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;
  --color-border: #dde3dc;
  --color-divider: #e7eae5;

  /* ---- Color: text (locked direction: dark on light) ---- */
  --color-text-primary: #1f2a24;
  --color-text-secondary: #55645a;
  --color-text-disabled: #9aa79e;
  --color-text-on-accent: #ffffff;

  /* ---- Color: the one calm accent + states (themeable shades;
          state MEANINGS never change per theme) ---- */
  --color-accent: #2e7d5b;
  --color-accent-pressed: #256a4c;
  --color-accent-tint: #e3efe8;
  --color-success: #2e7d32;
  --color-warning: #a85f00;
  --color-danger: #b3261e;
  --color-info: #1f5fa8;

  /* ---- Color: drill-label chips, one token pair per label family
          (Level / Category / Sub-category — spec §2) ---- */
  --color-chip-level-bg: #e3efe8;
  --color-chip-level-text: #1f5c3d;
  --color-chip-category-bg: #e6ebf5;
  --color-chip-category-text: #2c4a7c;
  --color-chip-subcategory-bg: #f3ead9;
  --color-chip-subcategory-text: #75510d;

  /* ---- Typography (NEVER themed) — system stack only, no downloads ---- */
  --font-family-base: -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-size-caption: 12px;
  --font-size-body: 15px;
  --font-size-title: 17px;
  --font-size-heading: 20px;
  --font-size-display: 24px;
  --font-weight-regular: 400;
  --font-weight-medium: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-body: 1.5;

  /* ---- Shape & space (NEVER themed) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --border-width: 1px;
  --shadow-card: 0 1px 3px rgba(31, 42, 36, 0.1);
  --shadow-raised: 0 4px 14px rgba(31, 42, 36, 0.14);
  --touch-target-min: 44px;
  --tabbar-height: 56px;
  --icon-size: 24px;
  --icon-size-sm: 20px;

  /* ---- Motion (NEVER themed) — transform/opacity only, no blur ---- */
  --motion-duration-fast: 120ms;
  --motion-duration-normal: 200ms;
  --motion-easing: ease-out;
}

/* ============================================================================
   TEST THEME — "test-christmas" (staging proof only, spec §7 check 2)
   Deliberately PARTIAL on the asset side (see registry.js): only a few
   icons have variants; every other key must fall back to the default pool.
   Token side: accent + tints shift only. Typography / spacing / shape /
   motion are NOT redefined here — that absence is part of the proof.
   ========================================================================== */
[data-theme="test-christmas"] {
  --color-bg: #f7f2ec;
  --color-surface: #fffdf9;
  --color-surface-raised: #fffdf9;
  --color-border: #e4d9cb;
  --color-divider: #ece3d6;

  --color-accent: #b3352b;
  --color-accent-pressed: #942a23;
  --color-accent-tint: #f7e6e2;

  --color-chip-level-bg: #f7e6e2;
  --color-chip-level-text: #8c2b23;
}
