/* 2026-10-31 · 中文站按负责人的方案加一层（纯增量，不改既有页面结构与文案）
   五色成章：五个章节色，按章节顺序循环使用；页脚改为居中版式，六个入口用大号汉字 + 小标签、细线分格。
   其它语言版本暂不引用本文件。 */

:root {
  --ch-1: #5f8f6b;   /* 墨绿 */
  --ch-2: #a8563f;   /* 赭红 */
  --ch-3: #4a7ab5;   /* 靛青 */
  --ch-4: #8b6a9e;   /* 紫 */
  --ch-5: #c9a227;   /* 金 */
}

/* ---------- 五色成章 ---------- */
/* 章节色只出现在：章节导航、章节标题左侧短条、步骤卡左沿、章节号。正文仍是白与灰。 */
[data-ch="1"] { --ch: var(--ch-1); }
[data-ch="2"] { --ch: var(--ch-2); }
[data-ch="3"] { --ch: var(--ch-3); }
[data-ch="4"] { --ch: var(--ch-4); }
[data-ch="5"] { --ch: var(--ch-5); }
[data-ch="6"] { --ch: var(--ch-1); }
[data-ch="7"] { --ch: var(--ch-2); }
[data-ch="8"] { --ch: var(--ch-3); }

.ch-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0; margin: 34px 0 56px; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); list-style: none; padding: 0; }
.ch-nav li { margin: 0; border-left: 1px solid var(--rule-soft); }
.ch-nav li:first-child { border-left: 0; }
.ch-nav a { display: block; padding: 18px 16px 20px; text-decoration: none; color: var(--ink-2); }
.ch-nav a:hover { color: var(--ink); }
.ch-nav__n { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); }
.ch-nav__t { display: block; margin-top: 6px; font-size: 16px; line-height: 1.3; color: var(--ink); }
.ch-nav a:hover .ch-nav__t { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ch-nav li[aria-current="page"] a { color: var(--ink); }
.ch-nav li[aria-current="page"] { box-shadow: inset 0 2px 0 var(--ch, var(--red)); }

.ch-head { position: relative; padding-left: 18px; }
.ch-head::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 3px; background: var(--ch, var(--red)); }
.ch-num { font-size: .72em; letter-spacing: .12em; color: var(--ch, var(--ink-4)); margin-right: .6em; }

/* 步骤卡左沿取本章色 */
[data-ch] .step, [data-ch] .bx--step { border-left: 2px solid var(--ch, transparent); }

/* ---------- 页脚（居中版式） ---------- */
.site-foot {
  text-align: center;
  background: var(--bg-1);
  border-top: 1px solid var(--rule-soft);
  padding: 64px 0 40px;
  margin-top: 96px;
}
.site-foot::before { display: none; }
.site-foot .wrap { display: block; }
.site-foot p { margin: 0; max-width: none; }

.foot-brand { display: flex; justify-content: center; align-items: center; margin: 0 0 10px; }
.foot-brand img { display: block; width: 169px; height: 30px; }
.foot-tagline { font-size: 14px; line-height: 1.5; color: var(--ink-3); letter-spacing: .01em; }

.foot-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 60rem; margin: 42px auto 0; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); list-style: none; padding: 0; }
.foot-cells li { margin: 0; border-left: 1px solid var(--rule-soft); }
.foot-cells li:first-child { border-left: 0; }
.foot-cells a { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 96px; padding: 20px 6px; text-decoration: none; color: var(--ink-2); }
.foot-cells a:hover { color: var(--ink); background: rgba(var(--warm-rgb), .035); }
/* 一格一个字排一行：字号按最长的「结局与奖杯」来定，六格同高同宽 */
.foot-cells__g { display: block; font-family: var(--kai); font-size: 24px; line-height: 1.35; letter-spacing: .02em; color: var(--ink); white-space: nowrap; }

.foot-pages, .foot-site-row, .foot-langs { margin: 0; font-size: 14px; line-height: 2; color: var(--ink-4); }
.foot-under { max-width: 78rem; margin: 40px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; text-align: left; border-top: 1px solid var(--rule-soft); }
.foot-under > div { padding: 18px 20px 16px; border-left: 1px solid var(--rule-soft); }
.foot-under > div:first-child { border-left: 0; }
.foot-pages a, .foot-site-row a, .foot-langs a { color: var(--ink-3); text-decoration: none; }
.foot-pages a:hover, .foot-site-row a:hover, .foot-langs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-pages span[aria-hidden], .foot-site-row span[aria-hidden], .foot-langs span[aria-hidden] { color: var(--rule); padding: 0 .5em; }
.foot-k { display: block; margin: 0 0 4px; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-4); }

.foot-legal { margin: 48px auto 0; padding-top: 22px; border-top: 1px solid var(--rule-soft); max-width: 62ch; font-size: 12.5px; line-height: 1.7; color: var(--ink-4); }
.foot-legal a { color: var(--ink-3); }
.foot-copy { margin: 14px 0 0 !important; font-size: 12.5px; color: var(--ink-4); }

@media (max-width: 760px) {
  .site-foot { padding: 48px 0 32px; margin-top: 72px; }
  /* 六格：手机排两列三行（原先写的是 flex 属性，但 .foot-cells 是 grid，六格挤成一行，字全叠在一起） */
  .foot-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cells li { border-top: 1px solid var(--rule-soft); }
  .foot-cells li:nth-child(2n+1) { border-left: 0; }
  .foot-cells li:first-child, .foot-cells li:nth-child(2) { border-top: 0; }
  .foot-cells a { padding: 18px 8px 20px; min-height: 84px; }
  /* 重点页面、本站、语言：手机单列（原先一直是三列 119px 宽，中文被挤成一字一行） */
  .foot-under { grid-template-columns: minmax(0, 1fr); }
  .foot-under > div { padding: 16px 0 14px; border-left: 0; border-top: 1px solid var(--rule-soft); }
  .foot-under > div:first-child { border-top: 0; }
}

/* 五色成章：步骤小节左侧色条与编号取本章色（正文仍是白与灰） */
section[data-ch] { position: relative; }
section[data-ch] > h2 { position: relative; padding-left: 16px; }
section[data-ch] > h2::before { content: ""; position: absolute; left: 0; top: .16em; bottom: .16em; width: 3px; background: var(--ch); }
section[data-ch] > h2::after { content: none; }
