/* ==========================================================================
   /assets/site.css — 旧网档案馆 共享层
   纸感底 · 堆叠画板 · 居中刊头 · 编辑部索引
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --paper: #F3E9D2;
  --paper-shadow: #E4D3AE;
  --card: #FFFDF7;
  --ink: #1C2721;
  --ink-2: #4A564E;
  --green: #1F4D3D;
  --green-deep: #16382C;
  --rust: #A84300;
  --rust-light: #D98A55;
  --indigo: #24466F;
  --term: #1F7A4D;
  --alert: #B3261E;

  --line: rgba(28, 39, 33, 0.16);
  --line-strong: rgba(28, 39, 33, 0.34);
  --line-soft: rgba(28, 39, 33, 0.08);
  --shadow-1: 0 1px 0 rgba(28, 39, 33, 0.05), 0 2px 8px -3px rgba(28, 39, 33, 0.28);
  --shadow-2: 0 2px 2px -1px rgba(28, 39, 33, 0.12), 0 10px 22px -10px rgba(28, 39, 33, 0.42);

  --shell: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
  --radius: 3px;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 2. reset + 中文排版基底 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding-left: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.012em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.015em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

/* 旧纸纤维噪点与压痕 —— 全站固定叠加 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 16%, rgba(168, 67, 0, 0.05), transparent 42%),
    radial-gradient(circle at 84% 6%, rgba(31, 77, 61, 0.055), transparent 46%),
    radial-gradient(circle at 60% 92%, rgba(36, 70, 111, 0.045), transparent 48%),
    repeating-linear-gradient(0deg, rgba(28, 39, 33, 0.032) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(28, 39, 33, 0.022) 0 1px, transparent 1px 5px);
}

.site-main { position: relative; z-index: 1; }

/* ---------- 3. 无障碍 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 11px 18px;
  background: var(--ink);
  color: var(--card);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}

/* ---------- 4. 布局骨架 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(34px, 5.5vw, 68px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
  padding-bottom: 12px;
  margin-bottom: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line-strong);
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(24px, 3.6vw, 40px);
  letter-spacing: 0.02em;
}
.section-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 42ch;
}

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

/* 非对称档案版面：主栏 + 旁注 */
.layout-archive {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: clamp(20px, 3.4vw, 44px);
  align-items: start;
}
.layout-archive__aside { display: grid; gap: 18px; }

/* ---------- 5. 画板 / 索引卡 / 胶带 ---------- */
.panel {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: clamp(18px, 2.6vw, 32px);
}
.panel--offset { margin-left: clamp(0px, 2vw, 26px); margin-right: clamp(0px, 1vw, 10px); }

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  font-size: clamp(17px, 2vw, 21px);
  letter-spacing: 0.02em;
}
.panel-body { font-size: 15px; line-height: 1.75; color: var(--ink-2); }

.tape {
  position: absolute;
  top: -9px;
  left: 26px;
  width: 76px;
  height: 18px;
  background: rgba(228, 211, 174, 0.88);
  border: 1px solid rgba(28, 39, 33, 0.12);
  transform: rotate(-2deg);
  pointer-events: none;
}

.index-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-1);
  padding: 20px 22px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.index-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}
.index-card:hover,
.index-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}
.index-card:hover::after,
.index-card:focus-visible::after { transform: scaleX(1); }

.index-card__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--rust);
  margin-bottom: 10px;
}
.index-card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}
.index-card__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------- 6. 文字工具 ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--rust { color: var(--rust); }
.tag--green { color: var(--green); }
.tag--indigo { color: var(--indigo); }
.tag--alert { color: var(--alert); }

.meta-row {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 13.5px;
  line-height: 1.6;
}
.meta-key {
  flex: 0 0 auto;
  min-width: 4.6em;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
}
.meta-val { color: var(--ink-2); word-break: break-word; }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--green);
  border-color: var(--green);
  color: #F6EFDE;
}
.btn--primary:hover { background: var(--green-deep); border-color: var(--green-deep); }

.btn--ghost { background: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--rust); color: var(--rust); }

.btn--quiet {
  padding: 2px 0;
  border-color: transparent;
  background: transparent;
  color: var(--indigo);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.btn--quiet:hover { transform: none; box-shadow: none; color: var(--rust); }

/* ---------- 8. 面包屑 / 正文 / 旁注 ---------- */
.breadcrumbs {
  padding-block: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "/";
  margin: 0 9px;
  color: rgba(28, 39, 33, 0.34);
}
.breadcrumbs a {
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.breadcrumbs a:hover { color: var(--rust); }

.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-top: 1.7em;
}
.prose h3 {
  font-size: clamp(17px, 1.9vw, 21px);
  margin-top: 1.5em;
}
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.35em; color: var(--ink-2); }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.35em; }
.prose a {
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--rust); }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(228, 211, 174, 0.62);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.08em 0.36em;
}

.note {
  border-left: 3px solid var(--indigo);
  background: rgba(36, 70, 111, 0.06);
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.note strong { color: var(--ink); }

/* ---------- 9. 图片容器（页面阶段放置真实图片） ---------- */
.figure-frame {
  position: relative;
  margin: 0;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-1);
}
.figure-frame__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper-shadow);
  border: 1px solid var(--line-soft);
}
.figure-frame__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(0.98);
}
.figure-frame--tall .figure-frame__media { aspect-ratio: 4 / 5; }
.figure-frame figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}

/* ---------- 10. 步骤轨道 ---------- */
.step-track {
  display: grid;
  gap: 12px;
}
.step-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--paper-shadow);
  border-radius: 2px;
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.step-card:hover,
.step-card:focus-visible {
  transform: translateY(-2px);
  border-left-color: var(--rust);
  box-shadow: var(--shadow-2);
}
.step-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--rust);
  letter-spacing: 0.02em;
}
.step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 4px;
}

/* ---------- 11. 折叠问答 ---------- */
.acc { border-top: 1px solid var(--line-strong); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 4px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  transition: color 0.16s ease;
}
.acc-trigger:hover { color: var(--green); }
.acc-trigger::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 400;
  color: var(--rust);
}
.acc-trigger[aria-expanded="true"]::after { content: "–"; }
.acc-panel {
  padding: 0 4px 18px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-2);
}
.acc-panel[hidden] { display: none; }

/* ---------- 12. 页内目录 ---------- */
.doc-index {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.doc-index li + li { margin-top: 2px; }
.doc-index a {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.doc-index a:hover {
  background: rgba(228, 211, 174, 0.5);
  color: var(--ink);
}
.doc-index a[aria-current="true"] {
  border-left-color: var(--rust);
  background: rgba(228, 211, 174, 0.55);
  color: var(--ink);
  font-weight: 500;
}

/* ---------- 13. 版本表格 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.archive-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.65;
}
.archive-table caption {
  text-align: left;
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.archive-table th {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.archive-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}
.archive-table tbody tr:nth-child(even) { background: rgba(228, 211, 174, 0.34); }
.archive-table tbody tr:hover { background: rgba(228, 211, 174, 0.6); }
.archive-table td .mono { color: var(--ink); }

/* ---------- 14. 页头 ---------- */
.site-header {
  position: relative;
  z-index: 60;
  background: linear-gradient(180deg, rgba(228, 211, 174, 0.62) 0%, rgba(243, 233, 210, 0.94) 62%, var(--paper) 100%);
  border-bottom: 1px solid var(--line-strong);
}

.header-utility {
  background: var(--ink);
  color: rgba(243, 233, 210, 0.78);
  border-bottom: 1px solid rgba(243, 233, 210, 0.14);
}
.header-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 36px;
  padding-block: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.14em;
}
.utility-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-transform: uppercase;
}
.status-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--term);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.22);
}
.utility-link {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 233, 210, 0.42);
  padding-bottom: 1px;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.utility-link:hover {
  color: var(--paper-shadow);
  border-bottom-color: var(--rust-light);
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "toggle brand cta";
  align-items: center;
  gap: 12px;
  padding-block: clamp(16px, 2.4vw, 28px) clamp(12px, 1.8vw, 20px);
}
.masthead-brand {
  grid-area: brand;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--ink);
}
.masthead-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rust);
}
.masthead-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 46px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.08em;
  transition: color 0.18s ease;
}
.masthead-brand:hover .masthead-title { color: var(--green); }
.masthead-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
}
.masthead-cta {
  grid-area: cta;
  justify-self: end;
  white-space: nowrap;
}

.nav-toggle {
  grid-area: toggle;
  justify-self: start;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.nav-toggle-bars {
  display: inline-grid;
  gap: 3px;
  width: 16px;
}
.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.site-nav {
  position: relative;
  z-index: 55;
  border-top: 1px solid var(--line);
  background: rgba(243, 233, 210, 0.92);
}
.site-nav .shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.nav-label { display: none; }
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 2px;
}
.nav-list a {
  display: block;
  padding: 13px clamp(9px, 1.5vw, 17px);
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.nav-list a:hover {
  color: var(--green);
  background: rgba(228, 211, 174, 0.62);
}
.nav-list a[aria-current="page"] {
  color: var(--rust);
  font-weight: 700;
  border-bottom-color: var(--rust);
}

/* ---------- 15. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(46px, 8vw, 96px);
  background: var(--ink);
  color: rgba(243, 233, 210, 0.84);
  border-top: 3px solid var(--rust);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: rgba(243, 233, 210, 0.16);
}
.footer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3.2vw, 46px);
  padding-block: clamp(32px, 5vw, 56px) clamp(24px, 3.4vw, 38px);
}
.footer-index,
.footer-contact {
  padding-left: clamp(0px, 2vw, 28px);
  border-left: 1px solid rgba(243, 233, 210, 0.16);
}
.footer-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--rust-light);
  margin-bottom: 12px;
}
.footer-brandline {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: 0.02em;
  color: #FBF5E6;
  margin-bottom: 10px;
}
.footer-desc {
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(243, 233, 210, 0.7);
}
.footer-h {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243, 233, 210, 0.55);
  margin-bottom: 13px;
}
.footer-list li + li { margin-top: 9px; }
.footer-list a {
  color: var(--paper);
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 233, 210, 0.3);
  padding-bottom: 1px;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer-list a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--rust-light);
}
.contact-list {
  display: grid;
  gap: 9px;
  font-size: 14px;
  line-height: 1.7;
}
.contact-list li { display: flex; gap: 10px; align-items: baseline; }
.contact-key {
  flex: 0 0 auto;
  min-width: 3.4em;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-light);
}
.contact-val {
  color: rgba(243, 233, 210, 0.86);
  word-break: break-word;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding-block: 16px 26px;
  border-top: 1px solid rgba(243, 233, 210, 0.18);
}
.footer-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: rgba(243, 233, 210, 0.62);
}
.to-top {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid rgba(243, 233, 210, 0.4);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.to-top:hover {
  border-color: var(--rust-light);
  color: #FFFFFF;
  background: rgba(243, 233, 210, 0.08);
}

/* ---------- 16. 阅读进度 / 光标 / 显现 ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: rgba(28, 39, 33, 0.12);
}
.reading-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--rust) 100%);
  transition: width 0.08s linear;
}

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--term);
  vertical-align: -0.12em;
  animation: term-blink 1s steps(1) infinite;
}
@keyframes term-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-archive { grid-template-columns: minmax(0, 1fr); }
  .layout-archive__aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .masthead {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand brand"
      "toggle cta";
    row-gap: 14px;
    padding-top: 18px;
  }
  .masthead-brand { justify-items: center; }
  .masthead-title { letter-spacing: 0.1em; }
  .nav-toggle { display: inline-flex; }
  .masthead-cta { padding: 8px 13px; font-size: 13px; }

  .site-nav {
    display: none;
    border-top: 1px solid var(--line-strong);
    background: var(--paper);
    box-shadow: 0 8px 16px -12px rgba(28, 39, 33, 0.55);
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav .shell {
    display: block;
    padding-block: 4px 16px;
  }
  .nav-label {
    display: block;
    padding: 12px 2px 8px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list a {
    padding: 14px 6px;
    border-bottom: 1px solid var(--line);
    border-left: 2px solid transparent;
    white-space: normal;
    font-size: 15px;
  }
  .nav-list a:hover { background: rgba(228, 211, 174, 0.5); }
  .nav-list a[aria-current="page"] {
    border-bottom-color: var(--line);
    border-left-color: var(--rust);
    padding-left: 12px;
    background: rgba(228, 211, 174, 0.5);
  }

  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .layout-archive__aside { grid-template-columns: minmax(0, 1fr); }
  .footer-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-index, .footer-contact {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(243, 233, 210, 0.16);
    padding-top: 20px;
  }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .header-utility-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    letter-spacing: 0.1em;
  }
  .footer-panel { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .panel--offset { margin-left: 0; margin-right: 0; }
}

/* ---------- 18. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .term-cursor { animation: none; opacity: 1; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .index-card:hover, .step-card:hover, .btn:hover { transform: none; }
  .reading-progress__bar { transition: none; }
}
