/* ════════════════════════════════════════════════════════════════════
   OPTION LEGAL — Chinese Typography
   File: /css/zh-typography.css
   Locked: Phase 7 (2026-06-14)

   USAGE — link ONLY from /zh/*.html pages. Never link from RU root or /en/.
   Requires <html lang="zh-Hans"> on the consuming page.

   This file is paired with /fonts/NotoSansSC-subset-var.woff2 — both
   produced in Plan 07-02. Phases 8-11 author /zh/ pages that consume
   these two assets via:
     <link rel="preload" href="/fonts/NotoSansSC-subset-var.woff2"
           as="font" type="font/woff2" crossorigin>
     <link rel="stylesheet" href="/css/zh-typography.css">

   PRC Standard Mandarin (普通话) only. Taiwan/HK variants prohibited
   per glossary v1.

   CJK Punctuation Rules (enforced by Phase 12 audit DEPL-01):
     - Period:        。  (NOT .)
     - Comma:         ，  (NOT ,)
     - Quote marks:   「」 or ""  (NOT ASCII " ")
     - Colon:         ：  (NOT :)
     - Semicolon:     ；  (NOT ;)
     - Enum comma:    、  (between list items in CJK)
   ════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Noto Sans SC';
  src: url('/fonts/NotoSansSC-subset-var.woff2') format('woff2');
  font-weight: 100 900;       /* full variable range */
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2000-206F,
                 U+3000-303F, U+4E00-9FFF, U+FF00-FFEF;
}

/* Body — Noto SC primary; system CJK fallback (PingFang SC / YaHei) */
:lang(zh) body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB',
               'Microsoft YaHei', '\5FAE\8F6F\96C5\9ED1', sans-serif;
  font-weight: 400;           /* min floor — weight 300 illegible on dark bg */
  line-height: 1.8;           /* up from 1.65 Latin (CJK ideographs are square) */
}

/* Headings */
:lang(zh) h1,
:lang(zh) h2,
:lang(zh) h3,
:lang(zh) h4 {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.25;          /* up from 1.14 Latin */
  letter-spacing: -0.01em;    /* CJK heads need less negative tracking than Latin */
}

/* Paragraph / list */
:lang(zh) p {
  line-height: 1.8;
}

:lang(zh) p,
:lang(zh) li,
:lang(zh) .body-text {
  word-break: normal;         /* allows CJK break between chars; keeps Latin words intact */
  overflow-wrap: break-word;  /* prevents Latin overflow in narrow containers */
}

/* Section labels — override .sec-label letter-spacing + text-transform */
:lang(zh) .sec-label {
  letter-spacing: 0.06em;     /* reduced from 0.14em; CJK doesn't benefit from wide tracking */
  text-transform: none;       /* CJK has no uppercase; prevents M&A/brand-name case bugs */
}

/* Buttons — keep on Noto SC stack */
:lang(zh) .btn,
:lang(zh) button {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* East-Asian glyph proportions + spacing trim
   text-spacing-trim: Chrome 123+, Safari 17.4+. Graceful degradation in Firefox. */
:lang(zh) {
  font-variant-east-asian: proportional-width;
  text-spacing-trim: trim-start allow-end trim-adjacent;
}
