/* ==========================================================================
   百博指南 · 共享样式表 /assets/site.css
   堆叠面板 · 居中刊头 · 墨蓝与琥珀橙双色节奏
   ========================================================================== */

/* ---------- 01 设计变量 ---------- */
:root {
  --ink-900: #0E1B2E;
  --ink-700: #1B3355;
  --ink-500: #33507E;
  --amber-500: #F2A03D;
  --amber-200: #F8DDB2;
  --mist-050: #F3F4F6;
  --mist-200: #DFE3E9;
  --mist-500: #767F8E;
  --paper: #FCFBF8;
  --green: #2F7E6B;

  --font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "Courier New", monospace;

  --wrap: 1180px;
  --gutter: clamp(18px, 4.5vw, 48px);
  --cut: 14px;
  --cut-sm: 8px;
  --sp-section: clamp(56px, 7.5vw, 104px);
  --shadow-1: 0 2px 0 rgba(14, 27, 46, .05), 0 22px 44px -30px rgba(14, 27, 46, .5);
}

/* ---------- 02 重置与中文排版 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: inherit;
}

p, figure, blockquote, dl, dd, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; }

a {
  color: var(--ink-500);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--amber-500);
}

:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 03 工具与容器 ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }

.cut {
  --cut: 14px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.cut-sm {
  --cut: 8px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.section { padding-block: var(--sp-section); }
.section--mist { background: var(--mist-050); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink-900); color: var(--paper); }

.rule { height: 1px; border: 0; background: var(--mist-200); }
.slash {
  height: 10px;
  background-image: repeating-linear-gradient(-45deg, var(--mist-200) 0 2px, transparent 2px 12px);
}
.section--ink .slash {
  background-image: repeating-linear-gradient(-45deg, rgba(252, 251, 248, .22) 0 2px, transparent 2px 12px);
}

/* 显现（无脚本时保持可见） */
[data-reveal] { transition: opacity 220ms ease, transform 220ms ease; }
.js [data-reveal] { opacity: 0; transform: translateY(12px); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 04 页头：版本条 + 居中刊头 ---------- */
.skip-link {
  position: fixed;
  left: 50%;
  top: -80px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 22px;
  background: var(--amber-500);
  color: var(--ink-900);
  font: 700 15px/1 var(--font-body);
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: top 160ms ease;
}
.skip-link:focus { top: 10px; }

.site-header {
  --hd-fg: var(--ink-900);
  --hd-dim: var(--mist-500);
  --hd-line: var(--mist-200);
  --hd-bg: var(--paper);
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--hd-bg);
  color: var(--hd-fg);
  border-bottom: 1px solid var(--hd-line);
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.site-header[data-scrolled] {
  --hd-fg: var(--paper);
  --hd-dim: rgba(252, 251, 248, .72);
  --hd-line: rgba(252, 251, 248, .16);
  --hd-bg: var(--ink-900);
  box-shadow: 0 16px 36px -20px rgba(14, 27, 46, .7);
}

.site-header__wire { background: var(--ink-900); color: rgba(252, 251, 248, .78); }
.wire {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wire__meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}
.wire__dot {
  width: 6px;
  height: 6px;
  background: var(--amber-500);
  transform: rotate(45deg);
}
.wire__actions { display: inline-flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.wire__link {
  font-size: 13px;
  font-weight: 600;
  color: rgba(252, 251, 248, .8);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.wire__link:hover { color: var(--paper); border-bottom-color: var(--amber-500); }
.wire__link[aria-current="page"] { color: var(--amber-500); border-bottom-color: var(--amber-500); }
.wire__cta {
  font: 700 13px/1 var(--font-body);
  letter-spacing: .06em;
  color: var(--ink-900);
  background: var(--amber-500);
  padding: 8px 14px;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background-color 160ms ease, color 160ms ease;
}
.wire__cta:hover { background: var(--amber-200); }

.site-header__band { background: var(--hd-bg); transition: background-color 220ms ease; }

.masthead {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--hd-fg);
}
.brandmark__mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--amber-500);
  color: var(--ink-900);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 21px;
  line-height: 1;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.brandmark__text { display: flex; flex-direction: column; gap: 3px; }
.brandmark__name {
  font-family: var(--font-head);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.1;
}
.brandmark__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  line-height: 1.2;
  color: var(--hd-dim);
}

.site-nav { padding-bottom: 4px; }
.site-nav__list {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(12px, 3vw, 42px);
  flex-wrap: wrap;
}
.site-nav__item { position: relative; }
.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 14px 2px 16px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--hd-fg);
  text-decoration: none;
  transition: color 180ms ease;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  height: 3px;
  width: 0;
  background: var(--amber-500);
  transform: translateX(-50%);
  transition: width 180ms ease;
}
.site-nav__link:hover::after { width: 16px; }
.site-nav__link[aria-current="page"] { font-weight: 800; }
.site-nav__link[aria-current="page"]::after { width: 100%; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: transparent;
  color: var(--hd-fg);
  border: 1px solid var(--hd-line);
  cursor: pointer;
  font: 700 14px/1 var(--font-body);
  letter-spacing: .08em;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; width: 16px; }
.nav-toggle__bars > span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 140ms ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars > span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle__label { display: inline-block; }

.progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--amber-500);
  transition: width 120ms linear;
}

/* ---------- 05 页脚 ---------- */
.site-footer {
  --ft-fg: var(--paper);
  --ft-dim: rgba(252, 251, 248, .68);
  --ft-line: rgba(252, 251, 248, .14);
  background: var(--ink-900);
  color: var(--ft-fg);
}
.site-footer__main { background: var(--ink-900); }
.site-footer__main::before {
  content: "";
  display: block;
  height: 8px;
  background-image: repeating-linear-gradient(-45deg, var(--amber-500) 0 3px, transparent 3px 14px);
  opacity: .9;
}
.site-footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--gutter) 36px;
  display: grid;
  grid-template-columns: minmax(230px, .85fr) 2fr;
  gap: clamp(24px, 3.6vw, 56px);
}
.footer-brand { display: flex; flex-direction: column; }
.footer-brand__name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .08em;
}
.footer-brand__line {
  margin-top: 10px;
  max-width: 22em;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ft-dim);
}
.footer-brand__meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--amber-500);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 36px);
}
.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--amber-500);
}
.footer-col__list { display: flex; flex-direction: column; gap: 10px; }
.footer-col__list a {
  display: inline-block;
  font-size: 15px;
  color: var(--ft-fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.footer-col__list a:hover { color: var(--amber-500); border-bottom-color: var(--amber-500); }
.footer-col__list a[aria-current="page"] { color: var(--amber-500); border-bottom-color: var(--amber-500); }

.footer-contact {
  grid-column: 1 / -1;
  border-top: 1px solid var(--ft-line);
  padding-top: 24px;
}
.footer-contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px clamp(18px, 3vw, 36px);
}
.footer-contact__item { display: flex; flex-direction: column; gap: 6px; }
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ft-dim);
}
.footer-contact__val { font-size: 15px; line-height: 1.7; color: var(--ft-fg); }

.copy {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--ft-fg);
  cursor: pointer;
  border-bottom: 1px dashed var(--ft-line);
  transition: color 160ms ease, border-color 160ms ease;
}
.copy:hover { color: var(--amber-500); border-bottom-color: var(--amber-500); }
.copy[data-copied]::after {
  content: "已复制";
  margin-left: 8px;
  font-size: 11px;
  color: var(--amber-500);
}
.copy[data-copied="fail"]::after { content: "请长按复制"; color: var(--amber-200); }

.site-footer__base { border-top: 1px solid var(--ft-line); }
.site-footer__base-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter) 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(14px, 3vw, 28px);
}
.footer-legal {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ft-fg);
}
.footer-note { font-size: 13px; color: var(--ft-dim); }
.footer-stamp {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ft-dim);
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 70;
  padding: 12px 16px;
  background: var(--amber-500);
  color: var(--ink-900);
  border: 0;
  cursor: pointer;
  font: 700 13px/1 var(--font-body);
  letter-spacing: .06em;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  box-shadow: 0 14px 28px -16px rgba(14, 27, 46, .85);
  transition: opacity 200ms ease, transform 200ms ease, background-color 160ms ease;
}
.to-top[data-visible] { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--amber-200); }

/* ---------- 06 文字件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--ink-500);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--amber-500); }
.section--ink .eyebrow { color: var(--amber-200); }

.num {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(52px, 9vw, 120px);
  line-height: .86;
  letter-spacing: -.03em;
  color: var(--amber-500);
}
.num--ghost { color: transparent; -webkit-text-stroke: 1.5px var(--mist-200); }
.section--ink .num--ghost { -webkit-text-stroke-color: rgba(252, 251, 248, .3); }

.sec-title {
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 900;
  letter-spacing: -.015em;
}
.lede {
  max-width: 34em;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.8;
  color: var(--ink-700);
}
.section--ink .lede { color: rgba(252, 251, 248, .82); }
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--mist-500);
}

/* ---------- 07 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border: 0;
  background: transparent;
  color: var(--ink-900);
  font: 700 16px/1 var(--font-body);
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.btn--primary { background: var(--amber-500); color: var(--ink-900); }
.btn--primary:hover { background: var(--amber-200); transform: translateY(-2px); }
.btn--ink { background: var(--ink-900); color: var(--paper); }
.btn--ink:hover { background: var(--ink-700); transform: translateY(-2px); }
.btn--ghost { box-shadow: inset 0 0 0 1.5px var(--ink-900); color: var(--ink-900); }
.btn--ghost:hover { background: var(--ink-900); color: var(--paper); }
.btn--quiet {
  padding: 8px 0;
  color: var(--ink-500);
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  border-bottom: 3px solid var(--amber-500);
}
.btn--quiet:hover { color: var(--ink-900); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--amber-200);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
.tag--ink { background: var(--ink-900); color: var(--paper); }
.tag--line { background: transparent; color: var(--mist-500); box-shadow: inset 0 0 0 1px var(--mist-200); }
.tag--ok { background: rgba(47, 126, 107, .12); color: var(--green); box-shadow: inset 0 0 0 1px rgba(47, 126, 107, .35); }

/* ---------- 08 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mist-500);
}
.crumbs a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--mist-200);
  transition: color 160ms ease, border-color 160ms ease;
}
.crumbs a:hover { color: var(--ink-900); border-bottom-color: var(--amber-500); }
.crumbs__sep { color: var(--mist-200); }
.crumbs [aria-current="page"] { color: var(--ink-900); }

/* ---------- 09 面板与网格 ---------- */
.panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--mist-200);
  padding: clamp(20px, 3vw, 34px);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.panel--mist { background: var(--mist-050); }
.panel--ink { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper); }
.panel--amber { background: var(--amber-200); border-color: var(--amber-200); color: var(--ink-900); }
.panel--accent { border-top: 4px solid var(--amber-500); }

.grid { display: grid; gap: clamp(20px, 3vw, 36px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.grid--split-rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.62fr); }

/* ---------- 10 图片容器 ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--mist-050);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--pattern {
  background-image: repeating-linear-gradient(-45deg, var(--mist-200) 0 1px, transparent 1px 12px);
}
.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mist-500);
}

/* ---------- 11 正文容器 ---------- */
.prose {
  max-width: 42em;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-700);
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2em;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--ink-900);
}
.prose h3 { margin-top: 1.7em; font-size: 20px; font-weight: 800; color: var(--ink-900); }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { font-weight: 700; color: var(--ink-900); }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: .5em; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 10px;
  height: 2px;
  background: var(--amber-500);
}
.prose ol { counter-reset: item; }
.prose ol li { position: relative; padding-left: 30px; counter-increment: item; }
.prose ol li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-500);
}
.prose a {
  color: var(--ink-500);
  text-decoration: underline;
  text-decoration-color: var(--amber-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--ink-900); }
.prose blockquote {
  padding: 18px 22px;
  background: var(--mist-050);
  border-left: 3px solid var(--amber-500);
  color: var(--ink-900);
}
.prose code {
  font-family: var(--font-mono);
  font-size: .9em;
  padding: 2px 6px;
  background: var(--mist-050);
  color: var(--ink-900);
}
.prose hr { height: 1px; border: 0; background: var(--mist-200); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--mist-200); text-align: left; }
.prose th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--mist-500); }
.section--ink .prose { color: rgba(252, 251, 248, .84); }
.section--ink .prose h2, .section--ink .prose h3, .section--ink .prose strong { color: var(--paper); }

/* ---------- 12 章节目录 ---------- */
.toc { position: sticky; top: 150px; }
.toc__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--mist-500);
}
.toc__list { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--mist-200); }
.toc__link {
  display: block;
  margin-left: -1px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mist-500);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.toc__link:hover { color: var(--ink-900); background: var(--mist-050); }
.toc__link[data-active] {
  color: var(--ink-900);
  font-weight: 700;
  border-left-color: var(--amber-500);
}
.section--ink .toc__list { border-left-color: rgba(252, 251, 248, .2); }
.section--ink .toc__link { color: rgba(252, 251, 248, .66); }
.section--ink .toc__link:hover, .section--ink .toc__link[data-active] { color: var(--paper); background: rgba(252, 251, 248, .06); }

/* ---------- 13 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 108px; }

  .masthead { justify-content: space-between; padding: 12px var(--gutter) 10px; }
  .nav-toggle { display: inline-flex; }

  .site-nav { display: none; padding: 0 var(--gutter) 14px; }
  .site-nav[data-open] { display: block; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 6px 0 4px;
    border-top: 1px solid var(--hd-line);
  }
  .site-nav__item { border-bottom: 1px solid var(--hd-line); }
  .site-nav__link {
    display: block;
    padding: 15px 4px 15px 14px;
    font-size: 17px;
    border-left: 3px solid transparent;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link:hover { background: rgba(252, 251, 248, .06); }
  .site-nav__link[aria-current="page"] { color: var(--amber-500); border-left-color: var(--amber-500); }

  .grid--2, .grid--3, .grid--split, .grid--split-rev { grid-template-columns: minmax(0, 1fr); }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc { position: static; }
  .footer-stamp { margin-left: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wire__link { display: none; }
  .brandmark__sub { letter-spacing: .1em; }
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .footer-contact__list { grid-template-columns: minmax(0, 1fr); }
  .btn { padding: 14px 20px; font-size: 15px; }
}

/* ---------- 14 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .to-top { transform: none; }
}
