/* ============================================================
   Trade Challenge — 中文排版优化层 (Chinese typography layer)
   独立、可一键回退:删除各页 <head> 中本文件的 <link> 即还原。
   目标:① 正文行高 1.8×  ② 8pt 网格段距/节奏  ③ 中文长文行宽 ≤1200px
        ④ 降低密度、增加呼吸感 —— 同时不破坏紧凑型 UI 组件。
   加载顺序在所有样式之后,故无需 !important。
   ============================================================ */

/* —— ① 行高:正文继承基准设为 1.8(字号的 1.8 倍) —— */
body { line-height: 1.8; }

/* 运行性文本统一 1.8,中文阅读最舒适 */
p, li, dd, dt, blockquote, figcaption,
.tcm-stepcard p, .entry-d, .pod-loc {
  line-height: 1.8;
}

/* 标题保持克制(中文标题比拉丁略宽,1.4 足够,过宽会松散) */
h1, h2, h3, h4, h5, h6 { line-height: 1.4; }

/* —— 中文模式专属:章节标题字号偏大 + 行高过紧 + 负字距 的修正 ——
   这些标题由组件以内联 style 渲染,需 !important 才能覆盖。
   仅在切到「中」文(html[lang="zh-CN"])时生效,英文版不受影响。 */
html[lang="zh-CN"] .tcm-reveal > h1 {
  /* 头图主标题保持原始大字号(不缩小),仅优化行高与字距 */
  line-height: 1.3 !important;                     /* 折行后留呼吸 */
  letter-spacing: .08em !important;                /* 负字距→明显放宽,中文舒展 */
}
html[lang="zh-CN"] .tcm-reveal > h2 {
  font-size: clamp(24px, 3vw, 38px) !important;    /* 48→38:降约 20% */
  line-height: 1.36 !important;
  letter-spacing: .08em !important;
}
/* 标题与其下副文之间留更舒展的间距 */
html[lang="zh-CN"] .tcm-reveal > h1 + p,
html[lang="zh-CN"] .tcm-reveal > h2 + p { margin-top: 20px !important; }

/* 章节副标题:中文按标点折行,避免双字词被拆行(如“游戏”) */
html[lang="zh-CN"] .tcm-reveal > p { word-break: keep-all; }

/* 首页 hero 主标题「拼策略，不拼本金」:中文单行展示(英文仍保持两行),
   隐藏强制换行的 <br>,并在逗号后补一个空格的间隙。 */
html[lang="zh-CN"] .hero-cine .ex-title br,
.hero-cine .ex-title br { display: none; }
.hero-cine .ex-title > span { margin-left: .2em; }

/* 单行 / 数字 / 胶囊 / 按钮 等紧凑组件维持原紧凑度,避免被撑高错位 */
button, a.btn, .btn, input, select, textarea,
.nav, .logo, .tcm-chip, .tcm-seg button, .tcm-calctab button,
.tcm-cc-btn, .tcm-cc-item, .tcm-dd-trigger, .tcm-dd-item,
.tcm-eyebrow span, .entry-n, .tok-step b, .tok-step span,
.tok-coin b, .tok-coin span, .tok-chip i, .tok-chip span,
.pod-name, .pod-val, .pod-roi, .tcm-stepbg, .tok-ghost,
[class*="badge"], [class*="pill"], [class*="-val"],
[class*="-num"], [class*="stat-"], [class*="-stat"] {
  line-height: normal;
}

/* —— ② 中文长段落行宽上限 1200px(仅限制运行性文本,不动布局容器) —— */
p, li, blockquote {
  max-width: 1200px;
}
/* 居中文本块同时居中其测量框,避免左偏 */
[style*="text-align:center"] > p,
[style*="text-align: center"] > p,
.tcm-reveal[style*="center"] p {
  margin-left: auto;
  margin-right: auto;
}

/* —— ③ 8pt 网格段距:相邻段落间留 16px 呼吸(仅对真正相邻的两段生效, */
/*       不会冲掉卡片里 margin:0 的单段描述) —— */
/* 注:不对 li 生效——导航/胶囊等多为横向 <li> 列表,加 margin-top 会错位 */
p + p {
  margin-top: 16px;
}

/* —— ④ 降低密度 / 增加呼吸感:中文字距整体放宽 —— */
/* 英文版仅极轻微字距;中文模式给正文更舒展的字间距(约 0.06em) */
p, li { letter-spacing: .01em; }
html[lang="zh-CN"] p,
html[lang="zh-CN"] li,
html[lang="zh-CN"] dd,
html[lang="zh-CN"] dt,
html[lang="zh-CN"] blockquote,
html[lang="zh-CN"] figcaption,
html[lang="zh-CN"] .tcm-chip,
html[lang="zh-CN"] .tcm-seg button {
  letter-spacing: .06em;
}
/* 副标题/眉标等说明文也同步放宽 */
html[lang="zh-CN"] .tcm-reveal > h1 + p,
html[lang="zh-CN"] .tcm-reveal > h2 + p { letter-spacing: .05em !important; }

/* Engines = section centerpiece → keep its title the largest even in CN;
   Pain = compact intro → noticeably smaller. (Both beat the generic
   .tcm-reveal > h2 !important rule via the extra class in the selector.) */
html[lang="zh-CN"] .tcm-reveal > h2.eng-title { font-size: clamp(28px, 4vw, 44px) !important; }
html[lang="zh-CN"] .tcm-reveal > h2.pain-title { font-size: clamp(20px, 2.4vw, 27px) !important; }

/* 富文本/说明型容器纵向呼吸(按 8pt 网格,温和) */
.tcm-glass p, .tcm-glass-2 p,
.entry-tx, .tcm-stepcard, .tcm-mode {
  /* 不改组件既有 padding 结构,仅在其内部正文之间补足节奏 */
}
.entry-tx .entry-d { margin-top: 8px; }

/* 移动端:行高略收,避免小屏过于松散 */
@media (max-width: 560px) {
  body { line-height: 1.7; }
  p, li, dd, blockquote, figcaption { line-height: 1.7; }
}

/* ============================================================
   品牌 Logo 锁定优化(全语言,仅 header 导航)
   徽标放大至 34px 与加粗字标平衡;「Trading / Challenge」统一 21px、
   收紧间距,使锁定更均衡。需 !important 覆盖各页内联 height 与 .mark 规则。
   ============================================================ */
header .logo { gap: 11px !important; font-size: 21px !important; }
header .logo .mark { height: 34px !important; }
header .logo .mark .logo-img { height: 34px !important; max-height: 34px !important; }
header .logo span { font-size: 21px !important; }
/* 统一字重与字距,使「Trading / Challenge」成为一个整体字标,仅以白/青配色区分 */
header .logo b,
header .logo span { font-weight: 800 !important; letter-spacing: 1px !important; }
