/* ============================================================
   丽人梦想秀® · 排版精雕 v2.0（全球顶尖中文排版 · 增量）
   typography-master.css —— 在所有样式之后加载（最高优先级）
   ============================================================
   v1.0（typography-final.css）已奠定字重/行高/字距基准；
   v2.0 补齐「现代排版」缺失特性，让文字排列达到全球顶尖：
   ① 文字环绕平衡 text-wrap: balance/pretty —— 根治标题末行孤字、段落孤行
   ② 中文标点悬挂 hanging-punctuation —— 引号/顿号对齐行边缘（印刷级）
   ③ CJK 比例宽度 font-feature-settings 'palt' —— 中文字距更匀称
   ④ 数字等宽 tabular-nums —— 统计数字上下行对齐
   ⑤ 字体栈补充 HarmonyOS Sans / MiSans —— 安卓端同样精致
   ⑥ 中英混排英文词间距微调 —— Latin 词「呼吸感」
   ============================================================ */

/* ── ① 全局字体渲染 + 字体特性 ─────────────────────────────── */
html, body, #page-content {
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: 'palt' 1, 'kern' 1, 'liga' 1;
  text-size-adjust: 100%;
}

/* ⑤ 字体栈补充：小米 MiSans / 华为 HarmonyOS Sans，安卓端更精致 */
body,
#page-content,
#page-content p,
#page-content li {
  font-family: 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Noto Sans SC',
    'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif !important;
}

/* ── ② 标题文字环绕平衡：避免标题末行孤字（现代浏览器） ───────── */
#page-content h1,
#page-content h2,
#page-content h3,
#page-content h4,
#page-content h5,
.page-title,
.eyebrow,
.overline,
.kicker {
  text-wrap: pretty;   /* 回退：较早版本 */
  text-wrap: balance;  /* 优先：末行孤字自动重排 */
}

/* ── ③ 段落文字环绕优化：避免孤行 / 孤字 ─────────────────────── */
#page-content p,
#page-content li,
#page-content blockquote,
#page-content td,
#page-content .card p,
#page-content .fed-card p {
  text-wrap: pretty;
}

/* ── ④ 中文标点悬挂（印刷级）：首尾引号 / 顿号对齐行边缘 ───────── */
#page-content p,
#page-content li,
#page-content blockquote {
  hanging-punctuation: first last;
}

/* ── ⑥ 数字等宽：统计数字上下对齐，杜绝「数字宽度不一」 ────────── */
#page-content .card-stat .value,
#page-content .stat-num,
#page-content .stat-val,
#page-content .stats-grid .stat-num,
#page-content [class*="stat"] .value {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'palt' 1, 'tnum' 1;
}

/* ── ⑦ 中英混排：英文单词间距微调（让 Latin 词呼吸） ──────────── */
#page-content p,
#page-content li,
#page-content .card p,
#page-content .fed-card p {
  word-spacing: 0.05em;
}

/* ── ⑧ 移动端排版再精修 ──────────────────────────────────────── */
@media (max-width: 767px) {
  /* 移动端标题字距更克制，长标题不显松散 */
  #page-content h1,
  #page-content h2 {
    letter-spacing: 0.02em !important;
  }
  /* 移动端卡片标题行高收紧，多行标题不显臃肿 */
  #page-content h3,
  #page-content h4 {
    line-height: 1.3 !important;
  }
}

/* ── ⑨ 打印样式（分享/存档时更清爽） ──────────────────────────── */
@media print {
  body, #page-content {
    font-size: 12pt !important;
    line-height: 1.7 !important;
  }
}
