/* =========================================================
   利记官网 · 共享样式表 /assets/site.css
   顺序：重置 → 令牌 → 基础排版 → 轨道导航 → 页脚 → 通用组件
   ========================================================= */

/* ---------- 1. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, dl, dt, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  --ink-900: #0E2233;
  --ink-800: #17324A;
  --ink-700: #24455F;
  --amber: #C8963E;
  --amber-bright: #E0B65C;
  --amber-ink: #8A5F14;
  --celadon: #4FA98C;
  --celadon-light: #A8D8C6;
  --paper: #F5F1E8;
  --paper-dim: #E4E0D6;
  --text-ink: #1B2430;
  --muted: #8A93A0;

  --line: #24455F;
  --line-soft: rgba(138, 147, 160, 0.22);
  --line-amber: rgba(200, 150, 62, 0.46);

  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;

  --rail-w: 272px;
  --topbar-h: 64px;
  --edge: clamp(1.25rem, 4vw, 4rem);
  --radius: 2px;
  --measure: 44rem;
}

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
}
@media (max-width: 1023.98px) {
  body { padding-top: var(--topbar-h); }
  html { scroll-padding-top: calc(var(--topbar-h) + 1rem); }
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.28; letter-spacing: -0.01em; }

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

::selection { background: var(--amber); color: #12202C; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.text-muted { color: var(--muted); }

.vnote {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--muted);
}
.vnote--amber { color: var(--amber); }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--amber);
  color: #12202C;
  font-size: 14px;
  border-radius: var(--radius);
  transform: translateY(calc(-100% - 1.6rem));
  transition: transform 200ms ease;
}
.skip-link:focus { transform: none; }

/* ---------- 5. 侧边轨道导航（头部） ---------- */
.site-rail {
  position: fixed;
  z-index: 60;
  background: linear-gradient(180deg, #132C42 0%, var(--ink-900) 48%, #0B1B29 100%);
  color: var(--paper);
}
@media (min-width: 1024px) {
  .site-rail {
    inset: 0 auto 0 0;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
  }
}
@media (max-width: 1023.98px) {
  .site-rail {
    inset: 0 0 auto 0;
    height: var(--topbar-h);
    border-bottom: 1px solid var(--line);
  }
}

/* 品牌行 */
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--paper); }
.brand__mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-amber);
  border-radius: var(--radius);
  color: var(--amber-bright);
  font-size: 15px;
  font-weight: 700;
}
.brand__mark::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 7px;
  height: 7px;
  background: var(--amber);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.3; }
.brand__name { font-size: 16px; font-weight: 700; letter-spacing: 0.14em; }
.brand__sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }

/* 目录按钮 */
.rail__toggle { display: none; }
.rail__toggle-bars { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.rail__toggle-bars i {
  display: block;
  height: 1px;
  background: var(--amber);
  transition: transform 220ms ease, width 220ms ease;
}
.rail__toggle-bars i:nth-child(2) { width: 70%; }

/* 面板与导航 */
.rail__tagline { position: relative; padding-left: 0.85rem; font-size: 13px; letter-spacing: 0.1em; color: var(--muted); }
.rail__tagline::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 8px; height: 1px; background: var(--amber); }

.rail__nav-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-list__item { display: block; }

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.7rem 0.5rem 0.7rem 1.75rem;
  color: rgba(245, 241, 232, 0.78);
  font-size: 15px;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  transition: color 200ms ease, background-color 200ms ease;
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--amber);
  transform: translateY(-50%);
  transition: width 240ms ease;
}
.nav-link:hover { color: #FFFFFF; background: rgba(200, 150, 62, 0.07); }
.nav-link:hover::before { width: 20px; }
.nav-link__num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0; }
.nav-link__label { flex: 1; }
.nav-link[aria-current="page"] { color: var(--amber-bright); background: rgba(200, 150, 62, 0.1); }
.nav-link[aria-current="page"]::before { width: 20px; background: var(--amber-bright); }
.nav-link[aria-current="page"] .nav-link__num { color: var(--amber-bright); }

/* 轨道底部动作 */
.rail__foot {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rail__link {
  align-self: flex-start;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.rail__link:hover { color: var(--amber-bright); border-bottom-color: var(--amber-bright); }
.rail__meta { font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: var(--muted); }

/* 遮罩 */
.rail__scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(6, 15, 24, 0.68);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease;
}
.rail__scrim[data-open] { opacity: 1; visibility: visible; pointer-events: auto; }
@media (min-width: 1024px) { .rail__scrim { display: none; } }

/* 阅读进度 */
.rail__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--amber-bright), var(--amber));
  transform: scaleY(var(--p, 0));
  transform-origin: top center;
}
@media (min-width: 1024px) {
  .rail__progress {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -1px;
    width: 2px;
    pointer-events: none;
  }
}
@media (max-width: 1023.98px) {
  .rail__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    pointer-events: none;
  }
  .rail__progress-bar {
    background: linear-gradient(90deg, var(--amber-bright), var(--amber));
    transform: scaleX(var(--p, 0));
    transform-origin: left center;
  }
}

/* 桌面端轨道展开 */
@media (min-width: 1024px) {
  .rail__bar { display: block; padding: 2.25rem 1.75rem 1.5rem; }
  .rail__panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 1.75rem 2rem;
    overflow-y: auto;
  }
  .rail__tagline { margin-bottom: 1.75rem; }
}

/* 移动端顶栏 + 抽屉 */
@media (max-width: 1023.98px) {
  .rail__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
    padding: 0 1.1rem;
  }
  .rail__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--paper);
    font-size: 13px;
    letter-spacing: 0.14em;
  }
  .rail__toggle[aria-expanded="true"] { border-color: var(--line-amber); color: var(--amber-bright); }
  .rail__toggle[aria-expanded="true"] .rail__toggle-bars i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
  .rail__toggle[aria-expanded="true"] .rail__toggle-bars i:nth-child(2) { opacity: 0; width: 0; }
  .rail__toggle[aria-expanded="true"] .rail__toggle-bars i:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

  .rail__panel {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    z-index: 70;
    width: min(86vw, 360px);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem 2.5rem;
    overflow-y: auto;
    background: linear-gradient(180deg, #132C42 0%, var(--ink-900) 100%);
    border-right: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), visibility 260ms;
  }
  .rail__panel[data-open] { transform: none; visibility: visible; }

  body.is-nav-open { overflow: hidden; }
}

/* ---------- 6. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(3.5rem, 9vw, 7rem);
  background: linear-gradient(180deg, var(--ink-900) 0%, #0A1A27 100%);
  border-top: 1px solid var(--line);
  color: var(--paper);
}
.site-foot__rule {
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, rgba(200, 150, 62, 0.28) 34%, rgba(200, 150, 62, 0) 72%);
}
.site-foot__inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--edge) clamp(2rem, 5vw, 3rem);
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .site-foot__inner { grid-template-columns: 1.15fr 1fr; }
}
@media (min-width: 1120px) {
  .site-foot__inner { grid-template-columns: 1.35fr 1.5fr 0.9fr; align-items: start; }
}

.site-foot__brand { font-family: var(--font-display); font-size: clamp(1.75rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: 0.08em; }
.site-foot__sig { margin-top: 0.4rem; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--amber); }
.site-foot__summary {
  margin: 1rem 0 1.5rem;
  max-width: 34rem;
  font-size: 15px;
  line-height: 1.95;
  color: rgba(245, 241, 232, 0.72);
}

.site-foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1.75rem;
}
.site-foot__col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--amber);
  margin-bottom: 0.9rem;
}
.site-foot__list { display: flex; flex-direction: column; }
.site-foot__link {
  display: inline-block;
  padding: 0.32rem 0;
  font-size: 15px;
  color: rgba(245, 241, 232, 0.72);
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.site-foot__link:hover { color: var(--amber-bright); border-bottom-color: var(--amber-bright); }

.site-foot__contact { display: flex; flex-direction: column; gap: 0.35rem; }
.site-foot__contact-line {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: rgba(245, 241, 232, 0.72);
  overflow-wrap: anywhere;
}
.site-foot__note {
  margin-top: 0.6rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--celadon);
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.site-foot__base {
  max-width: 1180px;
  margin-inline: auto;
  padding: 1.25rem var(--edge) 2.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.site-foot__legal { line-height: 1.7; }
.site-foot__legal-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-foot__legal-links a { color: var(--muted); border-bottom: 1px solid transparent; transition: color 200ms ease, border-color 200ms ease; }
.site-foot__legal-links a:hover { color: var(--amber-bright); border-bottom-color: var(--amber-bright); }

/* ---------- 7. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 15px;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.btn--amber { background: var(--amber); color: #12202C; }
.btn--amber:hover { background: var(--amber-bright); }
.btn--ghost { background: transparent; border-color: var(--line-amber); color: var(--amber-bright); }
.btn--ghost:hover { background: rgba(200, 150, 62, 0.14); }
.btn--sm { padding: 0.6rem 1.1rem; font-size: 14px; }
.btn--block { display: flex; width: 100%; }

/* ---------- 8. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--edge);
}
.section { padding-block: clamp(2.75rem, 6.5vw, 5.5rem); }
.section__head { display: flex; flex-direction: column; gap: 0.9rem; max-width: 46rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
}
.section__num {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--amber);
}
.section__title { font-size: clamp(1.75rem, 3.6vw, 3rem); }
.lede { font-size: 18px; line-height: 1.95; color: rgba(245, 241, 232, 0.76); max-width: var(--measure); }
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9.5vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.display--light { font-weight: 300; }

.grid { display: grid; gap: clamp(1.25rem, 2.6vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid--asym { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); align-items: start; }
}
.span-all { grid-column: 1 / -1; }
@media (min-width: 720px) { .span-2 { grid-column: span 2; } }

/* ---------- 9. 卡片与纸页 ---------- */
.card {
  position: relative;
  padding: clamp(1.25rem, 2.6vw, 2rem);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 200ms ease, background-color 200ms ease;
}
.card:hover { border-color: var(--line-amber); }
.card--wide { grid-column: 1 / -1; }
.card__title { font-size: 24px; line-height: 1.4; }
.card__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }
.card__body { margin-top: 0.75rem; font-size: 15px; line-height: 1.95; color: rgba(245, 241, 232, 0.74); }

.card--paper {
  background: var(--paper);
  border-color: var(--paper-dim);
  color: var(--text-ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}
.card--paper .card__title { color: var(--text-ink); }
.card--paper .card__body { color: #37414F; }

.prose {
  max-width: 46rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--paper);
  color: var(--text-ink);
  border-radius: var(--radius);
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 18px; }
.prose p, .prose li { font-size: 16px; line-height: 1.95; color: #37414F; }
.prose ul { list-style: disc; padding-left: 1.25rem; }
.prose a { color: var(--amber-ink); border-bottom: 1px solid rgba(138, 95, 20, 0.4); }

/* ---------- 10. 文档件 ---------- */
.doc-table { font-size: 15px; border-top: 1px solid var(--line); }
.doc-table th, .doc-table td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.doc-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--amber);
  white-space: nowrap;
}
.doc-table td { color: rgba(245, 241, 232, 0.82); line-height: 1.8; }
.doc-table tbody tr:nth-child(even) { background: rgba(36, 69, 95, 0.26); }

.doc-table--paper { border-top-color: var(--paper-dim); }
.doc-table--paper th { color: var(--amber-ink); }
.doc-table--paper td { color: #37414F; border-bottom-color: var(--paper-dim); }
.doc-table--paper tbody tr:nth-child(even) { background: rgba(164, 216, 198, 0.18); }

.figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
  overflow: hidden;
}
.figure__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1B3A55 0%, var(--ink-900) 100%);
}
.figure__img { width: 100%; height: 100%; object-fit: cover; }
.figure__cap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.figure--wide { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .figure--tall .figure__frame { aspect-ratio: 4 / 5; }
}

/* ---------- 11. 状态、图例、标签 ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--celadon-light);
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--celadon);
  box-shadow: 0 0 0 3px rgba(79, 169, 140, 0.18);
}
.status--new { color: var(--amber-bright); }
.status--new::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.18); }
.status--plan { color: var(--muted); }
.status--plan::before { background: var(--muted); box-shadow: none; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.legend__item { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend__key { width: 10px; height: 10px; border: 1px solid var(--line); background: var(--celadon); }
.legend__key--amber { background: var(--amber); border-color: var(--amber); }
.legend__key--open { background: var(--celadon); border-color: var(--celadon); }
.legend__key--plain { background: transparent; }

.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.tag--amber { border-color: var(--line-amber); color: var(--amber-bright); }

/* ---------- 12. 折叠面板 ---------- */
.fold { border-top: 1px solid var(--line); }
.fold__item { border-bottom: 1px solid var(--line); }
.fold__btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 0.25rem;
  text-align: left;
  color: var(--paper);
  font-size: 16px;
  line-height: 1.7;
  transition: color 200ms ease;
}
.fold__btn:hover { color: var(--amber-bright); }
.fold__index { flex: none; min-width: 2.4em; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.fold__text { flex: 1; }
.fold__icon { position: relative; flex: none; width: 14px; height: 14px; margin-top: 0.4rem; }
.fold__icon::before, .fold__icon::after {
  content: "";
  position: absolute;
  background: var(--amber);
  transition: transform 240ms ease, opacity 240ms ease;
}
.fold__icon::before { left: 0; top: 50%; width: 100%; height: 1px; transform: translateY(-50%); }
.fold__icon::after { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.fold__btn[aria-expanded="true"] .fold__icon::after { transform: translateX(-50%) scaleY(0); opacity: 0; }

.fold__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms ease; }
.fold__item[data-open] .fold__panel { grid-template-rows: 1fr; }
.fold__inner { overflow: hidden; visibility: hidden; transition: visibility 260ms ease; }
.fold__item[data-open] .fold__inner { visibility: visible; }
.fold__body {
  max-width: 44rem;
  padding: 0 2rem 1.6rem 0.25rem;
  font-size: 15px;
  line-height: 1.95;
  color: rgba(245, 241, 232, 0.76);
}

/* ---------- 13. 检索过滤 ---------- */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.filter__field {
  flex: 1 1 16rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: rgba(23, 50, 74, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.filter__field:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.16); }
.filter__icon { flex: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--amber); }
.filter__input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 15px; color: var(--paper); }
.filter__input::placeholder { color: var(--muted); }
.filter__count { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.filter__item { transition: opacity 200ms ease; }
.empty { padding: 2rem 0; font-size: 15px; color: var(--muted); }

/* ---------- 14. 目录锚点 ---------- */
.toc { font-size: 14px; }
.toc__label {
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc__list { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.toc__link {
  margin-left: -1px;
  padding: 0.45rem 0.9rem;
  border-left: 1px solid transparent;
  color: rgba(245, 241, 232, 0.6);
  transition: color 200ms ease, border-color 200ms ease;
}
.toc__link:hover { color: var(--paper); }
.toc__link[data-current] { color: var(--amber-bright); border-left-color: var(--amber); }

/* ---------- 15. 面包屑 ---------- */
.breadcrumb { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 0.5rem; }
.breadcrumb__item + .breadcrumb__item::before { content: "/"; color: var(--line); }
.breadcrumb__link { color: var(--muted); border-bottom: 1px solid transparent; transition: color 200ms ease, border-color 200ms ease; }
.breadcrumb__link:hover { color: var(--amber-bright); border-bottom-color: var(--amber-bright); }
.breadcrumb__item[aria-current="page"] { color: var(--paper); }

/* ---------- 16. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 55;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: rgba(14, 34, 51, 0.88);
  border: 1px solid var(--line-amber);
  border-radius: var(--radius);
  color: var(--amber-bright);
  font-family: var(--font-mono);
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease, background-color 200ms ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: rgba(23, 50, 74, 0.96); }

/* ---------- 17. 显现动效 ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 550ms ease, transform 550ms ease; }
.js [data-reveal].is-inview { opacity: 1; transform: none; }

/* ---------- 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;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .rail__panel { transition: none; }
  .rail__scrim { transition: none; }
}
