/* =========================================================
   人生規劃 Life Planning — design tokens (Milestone 1)
   Source of truth: 04-design-constitution.md
   The three LOCKED primaries must not be changed:
     coral #C94B3A · gold #C9A24A · soft green #2A6B62
   Do NOT use the test-page off-tokens #D4AF37 / #5E9A7A.
   ========================================================= */

:root {
  /* ---- Locked primaries (憲法鎖定) ---- */
  --coral: #C94B3A;          /* 工作收入期、重點行動、示範橫額強調 */
  --gold: #C9A24A;           /* 非工作收入期金色家族起點、飾線 */
  --green: #2A6B62;          /* 點綴、希望感、次要裝飾 */

  /* ---- Recommended supporting (憲法建議配套) ---- */
  --cream: #F7F0E1;          /* 頁面背景 */
  --cream-card: #FFFDF7;     /* 卡片、圈外說明卡 */
  --navy: #16325C;           /* 主要文字、金邊歲數 */
  --navy-soft: #3A5478;      /* 次要文字、英文 */
  --coral-deep: #A83A2E;     /* 需要較深珊瑚的文字（示範橫額標題等） */
  --gold-prework: #F3E7B8;   /* 非工作期：開工前（較淺） */
  --gold-retire: #D9C05A;    /* 非工作期：退休後（較深） */

  /* ---- App-added derived tones (not new primaries; for contrast only) ----
     gold-ink: gold-family text colour that passes 4.5:1 on cream.
     Plain #C9A24A is decoration only — never body text on cream. */
  --gold-ink: #7A5C17;
  --coral-tint: #FBE9E4;     /* very pale coral wash for backgrounds */
  --gold-tint: #FAF1D6;      /* very pale gold wash */
  --green-tint: #E3EFEC;     /* very pale green wash */
  --line: #E6DCC6;           /* hairlines on cream */
  --line-strong: #D3C4A3;
  --on-coral: #FFFDF7;       /* text on coral fills (4.6:1) */
  --on-green: #FFFDF7;       /* text on green fills (6.2:1) */

  /* ---- Typography ----
     Titles: rounded CJK (Chiron GoRound TC, OFL-1.1).
     Body:   HK Traditional sans (Chiron Hei HK, OFL-1.1).
     "LP *" = vendored local copies (scripts/fetch-fonts.sh);
     "Chiron *" = Google Fonts copy when online; then system fallbacks. */
  --font-round: "LP GoRound", "Chiron GoRound TC", "PingFang HK", "PingFang TC",
    "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-body: "LP Hei", "Chiron Hei HK", "PingFang HK", "Noto Sans HK",
    "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;

  /* Chinese-first scale. English companions use --en-ratio of their zh size. */
  --fs-display: clamp(2.5rem, 4.5vw + 1.2rem, 4.25rem);
  --fs-h1: clamp(1.9rem, 2.4vw + 1.1rem, 2.75rem);
  --fs-h2: clamp(1.45rem, 1.2vw + 1rem, 2rem);
  --fs-h3: clamp(1.2rem, 0.5vw + 1rem, 1.375rem);
  --fs-body: 1.0625rem;      /* 17px — readable across a meeting table */
  --fs-small: 0.9375rem;     /* 15px */
  --fs-micro: 0.8125rem;     /* 13px — English microcopy minimum */
  --fs-figure-xl: clamp(2.25rem, 3vw + 1.2rem, 3.5rem);
  --fs-figure-l: clamp(1.6rem, 1.5vw + 1rem, 2.25rem);
  --en-ratio: 0.62;          /* English ≈ 62% of the Chinese it accompanies (headings) */

  --lh-tight: 1.25;
  --lh-zh: 1.75;             /* CJK body needs generous leading */

  --w-regular: 400;
  --w-medium: 500;
  --w-bold: 700;
  --w-heavy: 900;

  /* ---- Space (4px base) ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* ---- Shape ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-card: 0 1px 0 rgba(22, 50, 92, 0.04), 0 6px 20px -8px rgba(22, 50, 92, 0.14);
  --shadow-lift: 0 2px 0 rgba(22, 50, 92, 0.05), 0 14px 32px -12px rgba(22, 50, 92, 0.22);

  /* ---- Touch & layout ---- */
  --tap-min: 48px;           /* minimum touch target (tablet use) */
  --content-max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}
