/* Chinese (zh-Hans, zh-Hant) tweaks for the funnel homepage (/zh/, /zh-hant/). Load after funnel.css.
   Only typography: CJK font stacks, line breaking, tracking and line height. No layout changes. */

/* fonts: Inter keeps Latin and digits, then the system CJK face for the page's written form */
:root:lang(zh-Hans) {
  --font: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans CJK SC', 'Source Han Sans SC', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', monospace;
}
:root:lang(zh-Hant) {
  --font: 'Inter', 'PingFang HK', 'PingFang TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'Noto Sans HK', 'Noto Sans TC', 'Noto Sans CJK TC', 'Source Han Sans TC', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, 'PingFang HK', 'PingFang TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'Noto Sans TC', monospace;
}

/* Chinese breaks between any two characters; keep punctuation rules strict and never forbid breaks */
:lang(zh) body { line-break: strict; word-break: normal; overflow-wrap: break-word; }
/* CJK fonts have no italic: never slant Han glyphs */
:lang(zh) em, :lang(zh) i, :lang(zh) cite { font-style: normal; }

/* Headline word-split: funnel.js wraps each space-separated run in .w (inline-block, white-space: pre).
   A Chinese sentence has no spaces, so one run would be one unbreakable box. Let the runs flow inline. */
.js:lang(zh) [data-split] .w { display: inline; white-space: normal; }
.js:lang(zh) [data-split] .w > i { display: inline; }

/* tracking: tight negative letter-spacing squeezes Han glyphs together; wide tracking spreads them apart */
:lang(zh) .h1, :lang(zh) .h2, :lang(zh) .h3, :lang(zh) .h2-side { letter-spacing: -0.01em; word-spacing: normal; line-height: 1.14; }
/* balance splits a Chinese line before the sticker and strands one character ("收 / 费，"); pretty only fixes the last line */
:lang(zh) .h1, :lang(zh) .h2, :lang(zh) .h3 { text-wrap: pretty; }
:lang(zh) .h1 { font-size: clamp(36px, 7vw, 80px); }
:lang(zh) .h2 { font-size: clamp(30px, 4.6vw, 60px); }
:lang(zh) .h2-side { font-size: clamp(30px, 4vw, 52px); }
:lang(zh) .final .h2 { font-size: clamp(34px, 6vw, 80px); }
:lang(zh) .lead { letter-spacing: 0; line-height: 1.7; }
:lang(zh) .eyebrow, :lang(zh) .cta-sub, :lang(zh) .sec-more, :lang(zh) .app-grp, :lang(zh) .trig .n,
:lang(zh) .stamp-r, :lang(zh) .tools-st em, :lang(zh) .inc-g h4, :lang(zh) .sheet a.sl small,
:lang(zh) .announce .tag, :lang(zh) .plan-stamp, :lang(zh) .soon-tag, :lang(zh) .xv-stamp, :lang(zh) .stamp,
:lang(zh) .susp-stamp, :lang(zh) .lane-score small, :lang(zh) .pp-risk em, :lang(zh) .ticker-label,
:lang(zh) .tpl-h, :lang(zh) .rcpt-h .mono, :lang(zh) .h1-brand { letter-spacing: 0; }
:lang(zh) p, :lang(zh) li, :lang(zh) small, :lang(zh) dt, :lang(zh) dd { letter-spacing: 0; }
:lang(zh) .xp-turn .mark, :lang(zh) .xp-sum, :lang(zh) .calc-save p, :lang(zh) .soon-h, :lang(zh) .tz-h { letter-spacing: -0.01em; }

/* the "exposed" sticker on the identity card is CSS text */
:lang(zh) .pp-row::after { content: '暴露'; letter-spacing: .04em; }
