/* ==========================================================================
   冠军白菜网 · 共享样式 /assets/site.css
   框架式导航 · 章节色带 · 批次时间轴 · 记分牌材质
   ========================================================================== */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul[class], ol[class] { list-style: none; }

img, svg, video { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

/* ---------- tokens ---------- */
:root {
  --gold: #F5C542;
  --gold-deep: #C9971F;
  --green: #7BC043;
  --green-deep: #1E7A57;
  --green-edge: #2FA37A;
  --ink-green: #0F3B33;
  --indigo: #1B2A4A;
  --wine: #7A2333;
  --paper: #FBF7EE;
  --paper-grey: #E7E1D4;
  --ink: #1A1A17;
  --moss: #4C6B5E;

  --line: rgba(15, 59, 51, .16);
  --line-soft: rgba(15, 59, 51, .09);
  --line-light: rgba(251, 247, 238, .22);
  --shadow: 0 1px 2px rgba(15, 59, 51, .12);
  --shadow-lift: 0 2px 10px rgba(15, 59, 51, .16);

  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --rail: 54px;
  --wrap: 1180px;
  --gutter: 24px;
  --header-h: 68px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-fast: 200ms;
  --t-mid: 280ms;
  --t-slow: 320ms;
}

/* ---------- base ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(32px, 4.6vw, 52px); }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: clamp(19px, 1.8vw, 24px); }

p { max-width: 36em; }

::selection { background: var(--gold); color: var(--ink-green); }

:focus-visible {
  outline: 2px solid var(--green-edge);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- utilities ---------- */
.u-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.u-meta {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .06em;
  color: var(--moss);
  text-transform: uppercase;
}

.u-hide-sm { display: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  border-radius: 2px;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- frame: L 形外框 ---------- */
.frame { position: relative; }

.frame__rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 60;
  display: none;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.frame__rail-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

.frame__rail-index {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 96px 0 40px;
  list-style: none;
}

.frame__rail-index a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--moss);
  border-left: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  white-space: nowrap;
  overflow: hidden;
}

.frame__rail-index a:hover,
.frame__rail-index a:focus-visible {
  color: var(--ink-green);
  border-left-color: var(--gold);
}

.frame__rail-index a.is-current {
  color: var(--ink-green);
  border-left-color: var(--green);
  font-weight: 700;
}

.frame__rail-index .rail-label {
  display: none;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0;
}

.frame__rail:hover .frame__rail-index .rail-label,
.frame__rail:focus-within .frame__rail-index .rail-label { display: inline; }

.frame__rail:hover { width: 168px; }

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--gold);
  color: var(--ink-green);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  transform: skewX(-3deg);
  box-shadow: var(--shadow);
}

.brand__text { display: flex; flex-direction: column; min-width: 0; }

.brand__name {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--ink-green);
  white-space: nowrap;
}

.brand__line {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--moss);
  white-space: nowrap;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px var(--gutter) 10px calc(var(--gutter) + var(--rail));
  max-width: var(--wrap);
  margin-inline: auto;
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* 主导航：移动端为折叠面板 */
.nav {
  display: none;
  width: 100%;
  order: 3;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}

.site-header[data-open="true"] .nav { display: block; }

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__link {
  display: block;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-left: 2px solid transparent;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nav__link:hover {
  background: var(--paper-grey);
  border-left-color: var(--gold);
}

.nav__link[aria-current="page"] {
  color: var(--ink-green);
  font-weight: 800;
  background: var(--paper-grey);
  border-left-color: var(--gold);
}

/* 移动导航按钮 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--ink-green);
  color: var(--paper);
  border: 1px solid var(--ink-green);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nav-toggle:hover { background: var(--wine); border-color: var(--wine); }

.nav-toggle__box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle__box span {
  display: block;
  height: 2px;
  background: var(--gold);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

.site-header[data-open="true"] .nav-toggle__box span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__box span:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle__box span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 快捷入口 */
.quick-entry {
  display: none;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-green);
  background: transparent;
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.quick-entry:hover { background: var(--gold); color: var(--ink); }

/* 批次直达 */
.batch-jump {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px 3px 3px 10px;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.batch-jump__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--green-deep);
  white-space: nowrap;
}

.batch-jump__input {
  width: 132px;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 5px 4px;
  color: var(--ink);
  min-width: 0;
}

.batch-jump__input::placeholder { color: var(--moss); font-family: var(--font-sans); }

.batch-jump__input:focus-visible { outline: 2px solid var(--green-edge); outline-offset: 1px; }

/* 辅助链接 */
.utility {
  display: flex;
  gap: 16px;
  padding-left: 44px;
  list-style: none;
}

.utility__link {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--moss);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.utility__link:hover { color: var(--green-deep); border-bottom-color: var(--gold-deep); }

/* ---------- 通用版心 / 栅格 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 780px; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.col-3 { grid-column: span 12; }
.col-4 { grid-column: span 12; }
.col-5 { grid-column: span 12; }
.col-6 { grid-column: span 12; }
.col-7 { grid-column: span 12; }
.col-8 { grid-column: span 12; }

/* ---------- 章节色带 ---------- */
.section-band { padding-block: 56px; background: var(--paper); }

.section-band--deep {
  background: var(--ink-green);
  color: var(--paper);
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.section-band--indigo {
  background: var(--indigo);
  color: var(--paper);
}

.section-band--wine {
  background: var(--wine);
  color: var(--paper);
}

.section-band--grey { background: var(--paper-grey); }

.section-band--deep p,
.section-band--indigo p,
.section-band--wine p { color: rgba(251, 247, 238, .82); }

.section-band--deep a:not(.btn),
.section-band--indigo a:not(.btn),
.section-band--wine a:not(.btn) { color: var(--gold); }

/* ---------- 章节标题组 ---------- */
.chapter {
  position: relative;
  padding-top: 10px;
  margin-bottom: 28px;
}

.chapter__no {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--moss);
  margin-bottom: 8px;
}

.section-band--deep .chapter__no,
.section-band--indigo .chapter__no,
.section-band--wine .chapter__no { color: rgba(245, 197, 66, .85); }

.chapter__title { font-family: var(--font-serif); }

.chapter__lede {
  margin-top: 12px;
  font-size: 16px;
  color: var(--moss);
  max-width: 34em;
}

.section-band--deep .chapter__lede,
.section-band--indigo .chapter__lede,
.section-band--wine .chapter__lede { color: rgba(251, 247, 238, .76); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  border: 1px solid var(--ink-green);
  border-radius: 2px;
  background: var(--ink-green);
  color: var(--paper);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.btn:hover { box-shadow: var(--shadow-lift); }

.btn--gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold-deep);
}
.btn--gold:hover { background: #FFD65E; }

.btn--ghost {
  background: transparent;
  color: var(--ink-green);
  border-color: var(--gold-deep);
}
.btn--ghost:hover { background: var(--gold); color: var(--ink); }

.btn--green {
  background: var(--green-deep);
  color: var(--paper);
  border-color: var(--green-deep);
}
.btn--green:hover { background: var(--green-edge); border-color: var(--green-edge); color: var(--ink-green); }

.section-band--deep .btn--ghost,
.section-band--indigo .btn--ghost,
.section-band--wine .btn--ghost { color: var(--paper); border-color: var(--gold); }
.section-band--deep .btn--ghost:hover,
.section-band--indigo .btn--ghost:hover,
.section-band--wine .btn--ghost:hover { background: var(--gold); color: var(--ink); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  list-style: none;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--moss);
}

.breadcrumb__item { display: inline-flex; align-items: center; gap: 6px; }

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--gold-deep);
  font-family: var(--font-mono);
}

.breadcrumb a:hover { color: var(--green-deep); border-bottom: 1px solid var(--gold-deep); }

/* ---------- 正文 ---------- */
.prose { max-width: 36em; }

.prose > * + * { margin-top: 18px; }

.prose h2 { margin-top: 40px; font-size: clamp(22px, 2.4vw, 30px); }

.prose h3 { margin-top: 28px; }

.prose ul, .prose ol { padding-left: 1.25em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }

.prose a { color: var(--green-deep); border-bottom: 1px solid var(--gold-deep); }
.prose a:hover { color: var(--wine); }

.prose--tight > * + * { margin-top: 12px; }

.prose blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 18px;
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--ink-green);
}

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--green-deep);
  margin-bottom: 8px;
}

.card__title { font-family: var(--font-sans); font-weight: 800; font-size: 19px; line-height: 1.4; }

.card__body { margin-top: 8px; font-size: 15px; color: var(--moss); }

.section-band--deep .card,
.section-band--indigo .card,
.section-band--wine .card {
  background: rgba(251, 247, 238, .06);
  border-color: var(--line-light);
  color: var(--paper);
}

.section-band--deep .card__body,
.section-band--indigo .card__body,
.section-band--wine .card__body { color: rgba(251, 247, 238, .74); }

/* ---------- 斜切标签 ---------- */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.6;
  transform: skewX(-3deg);
  border: 1px solid currentColor;
  border-radius: 1px;
  white-space: nowrap;
}

.tag > span { display: inline-block; transform: skewX(3deg); }

.tag--gold { background: var(--gold); color: var(--ink); border-color: var(--gold-deep); }
.tag--green { background: transparent; color: var(--green-deep); border-color: var(--green); }
.tag--wine { background: var(--wine); color: var(--paper); border-color: var(--wine); }

.section-band--deep .tag--green,
.section-band--indigo .tag--green,
.section-band--wine .tag--green { color: var(--green); }

/* ---------- 大号数字 ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }

.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-green);
  font-variant-numeric: tabular-nums;
}

.section-band--deep .stat__num,
.section-band--indigo .stat__num,
.section-band--wine .stat__num { color: var(--gold); }

.stat__cap {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--moss);
}

.section-band--deep .stat__cap,
.section-band--indigo .stat__cap,
.section-band--wine .stat__cap { color: rgba(251, 247, 238, .7); }

/* ---------- 批次时间轴 ---------- */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 1px solid var(--line);
}

.section-band--deep .timeline,
.section-band--indigo .timeline,
.section-band--wine .timeline { border-left-color: var(--line-light); }

.timeline__item {
  position: relative;
  padding: 12px 14px 14px;
  margin-left: -22px;
  border-left: 2px solid transparent;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-slow) var(--ease);
}

.timeline__item + .timeline__item { margin-top: 4px; }

.timeline__item:hover { background: rgba(231, 225, 212, .55); }

.section-band--deep .timeline__item:hover,
.section-band--indigo .timeline__item:hover,
.section-band--wine .timeline__item:hover { background: rgba(251, 247, 238, .07); }

.timeline__node {
  position: absolute;
  left: 14px;
  top: 18px;
  width: 9px;
  height: 9px;
  background: var(--paper);
  border: 2px solid var(--moss);
  transform: rotate(45deg);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.section-band--deep .timeline__node,
.section-band--indigo .timeline__node,
.section-band--wine .timeline__node { background: var(--ink-green); }

.timeline__item.is-done .timeline__node { border-color: var(--green); background: var(--green); }

.timeline__item.is-current .timeline__node { border-color: var(--gold); background: var(--gold); }

.timeline__item.is-hit {
  border-left-color: var(--gold);
  background: rgba(245, 197, 66, .16);
  box-shadow: var(--shadow);
}

.section-band--deep .timeline__item.is-hit,
.section-band--indigo .timeline__item.is-hit,
.section-band--wine .timeline__item.is-hit { background: rgba(245, 197, 66, .18); }

.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--moss);
}

.section-band--deep .timeline__meta,
.section-band--indigo .timeline__meta,
.section-band--wine .timeline__meta { color: rgba(251, 247, 238, .68); }

.timeline__title {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
}

.timeline__text { margin-top: 2px; font-size: 14px; color: var(--moss); max-width: 32em; }

.section-band--deep .timeline__text,
.section-band--indigo .timeline__text,
.section-band--wine .timeline__text { color: rgba(251, 247, 238, .72); }

/* ---------- 可展开组 ---------- */
.disclosure {
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: #fff;
  border-radius: 2px;
  box-shadow: var(--shadow);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.disclosure + .disclosure { margin-top: 10px; }

.disclosure:has([aria-expanded="true"]) { border-left-color: var(--gold); }

.disclosure__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-green);
  cursor: pointer;
}

.disclosure__trigger:hover { color: var(--wine); }

.disclosure__icon {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--green-deep);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.disclosure__trigger[aria-expanded="true"] .disclosure__icon {
  transform: rotate(90deg);
  background: var(--gold);
  color: var(--ink);
}

.disclosure__panel {
  padding: 0 18px 18px;
  font-size: 15px;
  color: var(--moss);
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  margin-top: 2px;
}

.disclosure__panel[hidden] { display: none; }

.disclosure__panel p { max-width: 34em; }

/* ---------- 赛道刻痕分隔 ---------- */
.ruled {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 14px;
  margin-block: 28px;
}

.ruled__mark {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--line) 0 12px, transparent 12px 20px);
}

.ruled::before,
.ruled::after {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--gold-deep);
  transform: rotate(45deg);
}

.section-band--deep .ruled__mark,
.section-band--indigo .ruled__mark,
.section-band--wine .ruled__mark {
  background: repeating-linear-gradient(to right, var(--line-light) 0 12px, transparent 12px 20px);
}

/* ---------- 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
}

.media__frame {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 59, 51, .08), rgba(27, 42, 74, .08)),
    var(--paper-grey);
  border: 1px solid var(--line);
  border-radius: 1px;
  aspect-ratio: 16 / 10;
}

.media__frame > img,
.media__frame > picture,
.media__frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide .media__frame { aspect-ratio: 21 / 9; }
.media--tall .media__frame { aspect-ratio: 4 / 5; }

.section-band--deep .media__frame,
.section-band--indigo .media__frame,
.section-band--wine .media__frame {
  background:
    linear-gradient(135deg, rgba(251, 247, 238, .07), rgba(245, 197, 66, .07)),
    rgba(251, 247, 238, .04);
  border-color: var(--line-light);
}

.media__caption {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--moss);
}

.section-band--deep .media__caption,
.section-band--indigo .media__caption,
.section-band--wine .media__caption { color: rgba(251, 247, 238, .66); }

/* ---------- 显现动效 ---------- */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  background: var(--ink-green);
  color: var(--paper);
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast) var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

.to-top:hover { background: var(--gold); color: var(--ink); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink-green);
  color: var(--paper);
  border-top: 3px solid var(--gold);
  padding-block: 48px 26px;
  margin-top: 0;
}

.site-footer .container { max-width: var(--wrap); }

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.footer__col--brand .brand__name { color: var(--paper); }
.footer__col--brand .brand__line { color: rgba(251, 247, 238, .62); }

.footer__tagline {
  margin-top: 14px;
  max-width: 22em;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  color: rgba(251, 247, 238, .86);
}

.footer__col--brand .btn { margin-top: 16px; }

.footer__title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 12px;
}

.footer__list { display: flex; flex-direction: column; gap: 8px; }

.footer__link {
  font-size: 14px;
  color: rgba(251, 247, 238, .86);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  word-break: break-word;
}

.footer__link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.footer__contact { display: flex; flex-direction: column; gap: 8px; }

.footer__text { font-size: 14px; color: rgba(251, 247, 238, .72); }

.footer__note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(251, 247, 238, .6);
  max-width: 24em;
}

.footer__rule {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-block: 30px 16px;
}

.footer__rule span {
  height: 1px;
  background: var(--line-light);
}

.footer__rule span:nth-child(1),
.footer__rule span:nth-child(3) { flex: 1; }

.footer__rule span:nth-child(2) {
  width: 34px;
  height: 3px;
  background: var(--gold);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(251, 247, 238, .62);
}

.footer__icp { font-family: var(--font-mono); }

/* ---------- 平板 ---------- */
@media (min-width: 640px) {
  .u-hide-sm { display: initial; }

  .site-header__inner { padding-inline: calc(var(--gutter) + var(--rail)); }

  .site-header__bar { flex-wrap: nowrap; }

  .quick-entry { display: inline-flex; }

  .batch-jump { display: inline-flex; }

  .utility { padding-left: 48px; }

  .col-6 { grid-column: span 6; }
  .col-4 { grid-column: span 6; }
  .col-3 { grid-column: span 6; }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__col--brand { grid-column: span 2; }
}

/* ---------- 桌面 ---------- */
@media (min-width: 900px) {
  body { font-size: 17px; }

  .frame__rail { display: block; }

  .site-header__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand tools"
      "nav nav";
    row-gap: 6px;
    padding-left: calc(var(--rail) + 28px);
  }

  .site-header__bar { display: contents; }

  .brand { grid-area: brand; }

  .site-header__tools { grid-area: tools; }

  .nav {
    grid-area: nav;
    display: block;
    order: 0;
    border-top: 0;
    padding-top: 0;
    width: auto;
  }

  .nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px 4px;
  }

  .nav__link {
    padding: 7px 12px;
    font-size: 14px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .nav__link:hover { background: var(--paper-grey); border-left: 0; border-bottom-color: var(--gold-deep); }

  .nav__link[aria-current="page"] {
    background: transparent;
    border-left: 0;
    border-bottom-color: var(--gold);
    color: var(--ink-green);
  }

  .nav-toggle { display: none; }

  .utility { padding-left: 0; justify-content: flex-end; margin-top: 2px; }

  .col-3 { grid-column: span 3; }
  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }

  .section-band { padding-block: 72px; }

  .chapter { margin-bottom: 36px; }

  .footer__grid { grid-template-columns: 1.5fr .8fr .8fr .8fr 1.2fr; gap: 24px; }
  .footer__col--brand { grid-column: auto; }

  .to-top { right: 24px; bottom: 24px; }
}

@media (min-width: 1180px) {
  .site-header__inner { padding-inline: calc(var(--rail) + 40px) 40px; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
