/* ==========================================================================
   博胜联盟 · 共享样式表 /assets/site.css
   夜间资料库检索色谱 · 侧边索引轨道 · 纵向叙事长卷
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-900: #061019;
  --ink-800: #0B1B2B;
  --ink-700: #142B3F;
  --line: #244154;
  --line-soft: rgba(36, 65, 84, 0.55);

  --paper: #F3EBDD;
  --orange: #FF6A2B;
  --cyan: #63E6E2;
  --stone: #A7B4BC;
  --moss: #6F8C79;
  --clay: #B96548;

  --rail-w: 88px;
  --topbar-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);

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

/* ---------- 2. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-left: var(--rail-w);
  min-height: 100vh;
  background-color: var(--ink-800);
  background-image:
    radial-gradient(1200px 820px at 88% -12%, rgba(36, 65, 84, 0.55), transparent 62%),
    radial-gradient(900px 700px at 4% 112%, rgba(6, 16, 25, 0.92), transparent 60%);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ol, ul {
  padding: 0;
  list-style: none;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

hr {
  border: 0;
}

::selection {
  background: var(--orange);
  color: #160803;
}

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

#main-content {
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.16;
  color: var(--paper);
}

h1 { font-size: clamp(36px, 5vw, 72px); }
h2 { font-size: clamp(24px, 2.8vw, 36px); line-height: 1.26; }
h3 { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.4; letter-spacing: -.02em; }
h4 { font-size: 17px; line-height: 1.5; letter-spacing: -.01em; }

strong { font-weight: 700; }

/* ---------- 4. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 32px);
}

.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.section { padding-block: clamp(56px, 8vw, 112px); }
.section--tight { padding-block: clamp(34px, 5vw, 64px); }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.section__band {
  display: block;
  width: 8px;
  height: clamp(44px, 6vw, 72px);
  background: linear-gradient(180deg, var(--orange) 0%, var(--clay) 42%, var(--cyan) 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: var(--orange);
}

.lede {
  max-width: 62ch;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.85;
  color: rgba(243, 235, 221, 0.82);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .06em;
  color: var(--stone);
}

.rule {
  height: 1px;
  width: 100%;
  background: var(--line);
}

.prose { max-width: 68ch; }
.prose p + p { margin-top: 1em; }
.prose h2 { margin-top: 1.8em; margin-bottom: .55em; }
.prose h3 { margin-top: 1.5em; margin-bottom: .5em; }
.prose ul, .prose ol { padding-left: 1.35em; margin-top: .8em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  border-radius: 2px;
  transform: translateY(-200%);
  transition: transform .18s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- 6. 侧边索引轨道 / 头部 ---------- */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--rail-w);
  padding: 20px 0 16px;
  background: linear-gradient(180deg, #061019 0%, #0A1A29 55%, #071420 100%);
  border-right: 1px solid var(--line);
}

.site-rail__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.brandmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--paper);
}

.brandmark:hover { color: var(--paper); }

.brandmark__glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 106, 43, 0.7);
  background: rgba(255, 106, 43, 0.08);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}

.brandmark:hover .brandmark__glyph,
.brandmark:focus-visible .brandmark__glyph {
  border-color: var(--orange);
  background: rgba(255, 106, 43, 0.2);
  color: var(--orange);
}

.brandmark__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.brandmark__name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .1em;
  color: var(--paper);
  white-space: nowrap;
}

.brandmark__latin {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
}

/* 目录开关按钮 —— 桌面隐藏 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.nav-toggle:hover { color: var(--cyan); border-color: var(--line); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 12px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  transition: transform .2s var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { bottom: 0; }

.site-rail[data-open="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.site-rail[data-open="true"] .nav-toggle__bars span:nth-child(2) {
  transform: translateY(-5px) rotate(-45deg);
}

/* 导航 */
.sitenav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding-top: 10px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sitenav::-webkit-scrollbar { display: none; }

.sitenav__list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.sitenav__item {
  width: 100%;
  border-bottom: 1px solid rgba(36, 65, 84, 0.35);
}

.sitenav__item:last-child { border-bottom: 0; }

.sitenav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 62px;
  padding: 10px 4px;
  color: var(--stone);
  transition: color .18s var(--ease), background .18s var(--ease);
}

.sitenav__link:hover {
  color: var(--cyan);
  background: rgba(99, 230, 226, 0.07);
}

.sitenav__num {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .12em;
  color: rgba(167, 180, 188, 0.62);
  transition: color .18s var(--ease);
}

.sitenav__label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}

.sitenav__link[aria-current="page"] {
  color: var(--paper);
  background: rgba(255, 106, 43, 0.1);
}

.sitenav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--orange);
}

.sitenav__link[aria-current="page"] .sitenav__num { color: var(--orange); }

.sitenav__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.sitenav__action {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 40px;
  padding: 6px 2px;
  border: 1px solid rgba(36, 65, 84, 0.9);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: .02em;
  text-align: center;
  color: var(--stone);
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}

.sitenav__action:hover {
  color: var(--ink-900);
  background: var(--cyan);
  border-color: var(--cyan);
}

/* 滚动进度刻线 */
.rail-progress {
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 2px;
  background: rgba(36, 65, 84, 0.45);
  pointer-events: none;
}

.rail-progress__bar {
  display: block;
  width: 100%;
  height: calc(var(--progress, 0) * 1%);
  background: linear-gradient(180deg, var(--cyan) 0%, var(--moss) 55%, var(--orange) 100%);
  transition: height .14s linear;
}

/* 遮罩 —— 仅移动端生效 */
.nav-veil { display: none; }

/* ---------- 7. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(64px, 9vw, 140px);
  background: linear-gradient(180deg, #08151F 0%, var(--ink-900) 100%);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.site-foot__stripe {
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--clay) 26%, var(--ink-700) 56%, var(--cyan) 100%);
  opacity: .9;
}

.site-foot__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px);
  padding-block: clamp(48px, 7vw, 88px);
}

.site-foot__brand {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--paper);
}

.site-foot__latin {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.site-foot__note {
  max-width: 38ch;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--stone);
}

.site-foot__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.site-foot__contact-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--paper);
}

.site-foot__contact-label {
  flex: 0 0 38px;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
}

.site-foot__serve {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--moss);
}

.site-foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
  align-content: start;
}

.site-foot__col-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--stone);
}

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

.site-foot__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--paper);
  transition: color .18s var(--ease), transform .18s var(--ease);
}

.site-foot__link:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.site-foot__link[aria-current="page"] { color: var(--orange); }

.site-foot__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
  border-top: 1px solid var(--line-soft);
}

.site-foot__legal,
.site-foot__sig {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--stone);
}

.site-foot__sig { color: rgba(167, 180, 188, 0.62); }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(6, 16, 25, 0.92);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease),
              visibility .2s linear, border-color .2s var(--ease), color .2s var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 8. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

.btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #160803;
}

.btn--primary:hover {
  background: #FF8149;
  border-color: #FF8149;
  color: #160803;
}

.btn--ghost {
  background: rgba(20, 43, 63, 0.6);
  border-color: var(--line);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  background: rgba(99, 230, 226, 0.1);
  color: var(--cyan);
}

.btn--quiet {
  min-height: 44px;
  padding-inline: 0;
  border-color: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
}

.btn--quiet:hover { color: var(--orange); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(20, 43, 63, 0.55);
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .04em;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}

.tag--cyan { color: var(--cyan); border-color: rgba(99, 230, 226, 0.45); }
.tag--orange { color: var(--orange); border-color: rgba(255, 106, 43, 0.48); }
.tag--moss { color: var(--moss); border-color: rgba(111, 140, 121, 0.55); }
.tag--clay { color: var(--clay); border-color: rgba(185, 101, 72, 0.55); }

.breadcrumb { padding-block: 4px; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .06em;
  color: var(--stone);
}

.breadcrumb__link { color: var(--stone); transition: color .18s var(--ease); }
.breadcrumb__link:hover { color: var(--cyan); }
.breadcrumb__item[aria-current="page"] { color: var(--paper); }
.breadcrumb__sep { color: var(--line); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(20, 43, 63, 0.58);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}

.card:hover {
  border-color: rgba(99, 230, 226, 0.5);
  background: rgba(20, 43, 63, 0.85);
  transform: translateY(-2px);
}

.card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--paper);
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--stone);
}

.panel {
  padding: clamp(18px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(20, 43, 63, 0.5);
}

/* 图片容器基础规则 —— 页面阶段放入 <img> 或 <picture> 占位 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(20, 43, 63, 0.95) 0%, rgba(6, 16, 25, 0.98) 100%);
}

.media > img,
.media > picture,
.media > picture > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.86) contrast(1.05) brightness(.94);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(6, 16, 25, 0) 0 3px,
    rgba(6, 16, 25, 0.18) 3px 4px
  );
  opacity: .45;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 4 / 5; }
.media--fill { aspect-ratio: auto; height: 100%; }

.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--stone);
}

/* ---------- 9. 平板 ---------- */
@media (max-width: 900px) {
  .grid--12,
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .site-foot__inner { grid-template-columns: 1fr; }
  .site-foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 10. 移动端：轨道折叠为顶部条 + 抽屉 ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
    background-attachment: scroll;
  }

  body[data-nav-open="true"] { overflow: hidden; }

  .site-rail {
    right: 0;
    bottom: auto;
    width: auto;
    height: var(--topbar-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 16, 25, 0.96);
    backdrop-filter: blur(12px);
  }

  .site-rail__head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .brandmark {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: auto;
  }

  .brandmark__glyph {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .brandmark__text {
    align-items: flex-start;
    gap: 0;
    text-align: left;
  }

  .brandmark__name {
    font-size: 14px;
    letter-spacing: .06em;
  }

  .brandmark__latin { display: none; }

  .nav-toggle { display: inline-flex; }

  .sitenav {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    z-index: 85;
    flex: 0 0 auto;
    max-height: calc(100vh - var(--topbar-h));
    max-height: calc(100dvh - var(--topbar-h));
    overflow-y: auto;
    padding: 10px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    background: #08141F;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s linear;
  }

  .site-rail[data-open="true"] .sitenav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .sitenav__list { width: 100%; }

  .sitenav__item {
    border-bottom: 1px solid rgba(36, 65, 84, 0.6);
  }

  .sitenav__link {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    min-height: 52px;
    padding: 0 12px;
  }

  .sitenav__num {
    font-size: 11px;
    letter-spacing: .1em;
    color: var(--cyan);
  }

  .sitenav__label { font-size: 15px; }

  .sitenav__link[aria-current="page"]::before {
    top: 8px;
    bottom: 8px;
  }

  .sitenav__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
  }

  .sitenav__action {
    width: auto;
    min-height: 44px;
    padding: 0 16px;
    font-size: 12px;
    letter-spacing: .05em;
  }

  .rail-progress {
    top: auto;
    right: 0;
    left: 0;
    bottom: -1px;
    width: auto;
    height: 2px;
  }

  .rail-progress__bar {
    width: calc(var(--progress, 0) * 1%);
    height: 100%;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--moss) 55%, var(--orange) 100%);
    transition: width .14s linear;
  }

  .nav-veil {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0;
    z-index: 80;
    background: rgba(6, 16, 25, 0.66);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--ease), visibility .2s linear;
  }

  body[data-nav-open="true"] .nav-veil {
    opacity: 1;
    visibility: visible;
  }

  #main-content { scroll-margin-top: calc(var(--topbar-h) + 24px); }
}

/* ---------- 11. 小屏细调 ---------- */
@media (max-width: 640px) {
  .grid--12,
  .grid--3 { grid-template-columns: 1fr; }

  .site-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot__col:last-child { grid-column: 1 / -1; }

  .site-foot__link { min-height: 44px; }

  .site-foot__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .to-top {
    right: 12px;
    bottom: 12px;
    font-size: 11px;
    padding: 0 12px;
  }

  .section__band { height: 40px; }
}

/* ---------- 12. 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .to-top { transform: none; }
  .card:hover { transform: none; }
  .site-foot__link:hover { transform: none; }
}
