/* SugarArk · Global Typography Scale (CR-036 / ADR-0038)
 *
 * 全站 typography design tokens. 所有公开 HTML 引用 var(--text-*) 即继承。
 * 调字号 = 改本文件 1 处, 38 页生效。
 *
 * Scale: Apple HIG + Material Design + iOS Safari 16px floor 对齐。
 * - body ≥ 16px 移动 (防 iOS Safari input zoom)
 * - labels ≥ 12px (高于 Apple HIG 13pt fine-print 边界)
 *
 * 用法: inline CSS 把 `font-size: 0.6rem` 改成 `font-size: var(--text-label)`.
 * 加 fallback 兼容老浏览器: `font-size: var(--text-label, 0.75rem)`.
 */

:root {
  /* ── Size scale (6 级) ─────────────────────────── */
  --text-xs:   0.75rem;   /* 12px — 小标签 / 副字 / footer copy */
  --text-sm:   0.875rem;  /* 14px — 二级 body / nav link / 卡片副文 */
  --text-base: 1rem;      /* 16px — 主 body (iOS Safari floor + Apple HIG callout) */
  --text-md:   1.125rem;  /* 18px — 段落强调 / lead paragraph */
  --text-lg:   1.5rem;    /* 24px — section subtitle / card title */
  --text-xl:   2rem;      /* 32px — H2 section title (大 hero 仍用 clamp) */

  /* ── 语义 tokens (按用途, 易后续微调) ─────────── */
  --text-label:        var(--text-xs);        /* uppercase tracked label (How We Match 等) */
  --text-body:         var(--text-base);      /* 主 body 段落 */
  --text-body-sm:      var(--text-sm);        /* 二级 body (卡片描述等) */
  --text-stat-sub:     0.8125rem;             /* 13px — stat 副字 (介于 xs/sm, 防 fine-print) */
  --text-stat-label:   var(--text-sm);        /* 14px — stat label */
  --text-sidebar-h3:   var(--text-xs);        /* FAQ 快速导航 h3 */
  --text-sidebar-link: var(--text-sm);        /* FAQ sidebar nav 链接 */
  --text-footer-copy:  var(--text-xs);        /* footer 版权 / 链接 */
  --text-button:       var(--text-sm);        /* CTA / link button 文字 */
  --text-form-input:   var(--text-base);      /* 输入框 (移动必 ≥ 16px 防 iOS zoom) */
}

/* ── 移动 (< 768px): body 系列锁定 ≥ 16px, labels 不变 ── */
@media (max-width: 768px) {
  :root {
    --text-body:    1rem;       /* 16px lock — 防被 inline 0.82rem 之类覆盖时仍 ≥ 16 */
    --text-body-sm: 0.9375rem;  /* 15px — bumps mobile body-sm 可读 */
  }
}
