/* =========================================================
   完美体育 · 共享样式 /assets/site.css
   深空黑画布 + 侧边轨道 + 数据面板组件
   ========================================================= */

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

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

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

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

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

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

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

table { border-collapse: collapse; width: 100%; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #080B10;
  --ink-2: #111827;
  --beam: #4D8DFF;
  --beam-soft: #A9C7FF;
  --gold: #F5A623;
  --crimson: #C44536;
  --paper: #F3E8D0;
  --paper-ink: #1B1511;
  --mist: #9AA4B2;
  --white: #F7FAFF;

  --line: rgba(169, 199, 255, 0.16);
  --line-strong: rgba(169, 199, 255, 0.34);

  --rail-w: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "Source Han Sans CN",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular",
    "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(24px, 5vw, 72px);
}

/* ---------- Base ---------- */
html, body { background-color: var(--ink); }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--white);
  letter-spacing: 0.01em;
  min-height: 100vh;
  padding-left: var(--rail-w);
  overflow-x: hidden;
  background-image:
    radial-gradient(1100px 620px at 84% -12%, rgba(77, 141, 255, 0.13), transparent 62%),
    radial-gradient(760px 420px at 4% 108%, rgba(245, 166, 35, 0.07), transparent 60%),
    linear-gradient(rgba(77, 141, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 141, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  background-attachment: fixed, fixed, fixed, fixed;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 7vw, 96px); }
h2 { font-size: clamp(26px, 4vw, 46px); }
h3 { font-size: clamp(19px, 2vw, 24px); }

p { text-wrap: pretty; }

strong { font-weight: 800; color: var(--white); }

::selection {
  background: var(--beam);
  color: #04101F;
}

/* ---------- Layout utilities ---------- */
.u-wrap {
  width: min(var(--wrap), 100% - var(--gutter));
  margin-inline: auto;
}

.grid-12 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 32px);
}

@media (min-width: 861px) {
  .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-9 { grid-column: span 9; }
  .span-12 { grid-column: span 12; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 12px);
  z-index: 300;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--beam);
  color: #04101F;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transform: translateY(-220%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* =========================================================
   Header · 侧边轨道
   ========================================================= */
.site-header {
  position: relative;
  z-index: 80;
}

.site-header::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(4, 7, 12, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 80;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 22px 0 18px;
  background-color: #0A0F16;
  background-image:
    linear-gradient(180deg, rgba(77, 141, 255, 0.42), rgba(77, 141, 255, 0) 132px),
    linear-gradient(180deg, #0A0F16 0%, #0B111A 46%, #090D14 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

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

/* --- 品牌 --- */
.rail__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 4px 6px 18px;
}

.rail__brand::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 30px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--line-strong);
}

.rail__glyph {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(169, 199, 255, 0.3);
  border-radius: 12px;
  background: rgba(77, 141, 255, 0.09);
  transition: border-color 0.24s var(--ease), background 0.24s var(--ease);
}

.rail__brand:hover .rail__glyph {
  border-color: rgba(169, 199, 255, 0.62);
  background: rgba(77, 141, 255, 0.17);
}

.rail__glyph-line {
  position: absolute;
  left: 9px;
  height: 2px;
  border-radius: 2px;
  background: var(--beam);
}

.rail__glyph-line--a { top: 12px; width: 20px; }
.rail__glyph-line--b { top: 19px; width: 12px; background: var(--beam-soft); opacity: 0.72; }

.rail__glyph-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.72);
}

.rail__brandwords {
  display: flex;
  gap: 7px;
}

.rail__brandtext {
  writing-mode: vertical-rl;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.24em;
  line-height: 1;
  color: var(--white);
}

.rail__brandsub {
  writing-mode: vertical-rl;
  font-size: 8.5px;
  letter-spacing: 0.3em;
  line-height: 1;
  color: var(--mist);
}

/* --- 导航 --- */
.rail__nav {
  position: relative;
  flex: 0 0 auto;
  margin-top: 18px;
  padding: 0 8px;
}

.rail__nav-note {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--mist);
  padding-bottom: 12px;
}

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

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 4px;
  border-radius: 8px;
  transition: background 0.24s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--beam);
  transform: translateY(-50%);
  transition: height 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.rail__idx {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  color: rgba(154, 164, 178, 0.78);
  transition: color 0.24s var(--ease);
}

.rail__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: #C6D0DE;
  white-space: nowrap;
  transition: color 0.24s var(--ease);
}

.rail__link:hover { background: rgba(77, 141, 255, 0.1); }
.rail__link:hover .rail__label { color: var(--white); }
.rail__link:hover .rail__idx { color: var(--beam-soft); }

.rail__link[aria-current="page"] {
  background: rgba(77, 141, 255, 0.13);
}

.rail__link[aria-current="page"] .rail__label { color: var(--beam-soft); }
.rail__link[aria-current="page"] .rail__idx { color: var(--beam); }

.rail__link[aria-current="page"]::before {
  height: 22px;
  box-shadow: 0 0 12px rgba(77, 141, 255, 0.85);
}

/* --- 抽屉关闭按钮 --- */
.rail__close {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(8, 11, 16, 0.6);
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease);
}

.rail__close:hover {
  background: rgba(77, 141, 255, 0.16);
  border-color: var(--beam);
}

.rail__close-bar {
  position: absolute;
  width: 16px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--beam-soft);
}

.rail__close-bar:first-child { transform: rotate(45deg); }
.rail__close-bar:last-child { transform: rotate(-45deg); }

/* --- 轨道底部 --- */
.rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-inline: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rail__sync {
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--mist);
}

.rail__cta {
  writing-mode: vertical-rl;
  padding: 14px 7px;
  border-radius: 999px;
  border: 1px solid rgba(77, 141, 255, 0.45);
  background: rgba(77, 141, 255, 0.14);
  color: var(--beam-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  transition: background 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.rail__cta:hover {
  background: var(--beam);
  border-color: var(--beam);
  color: #04101F;
  box-shadow: 0 0 26px rgba(77, 141, 255, 0.45);
}

.rail__meter {
  position: relative;
  width: 2px;
  height: 54px;
  border-radius: 2px;
  background: rgba(169, 199, 255, 0.16);
  overflow: hidden;
}

.rail__meter-fill {
  position: absolute;
  inset: 0;
  transform: scaleY(0);
  transform-origin: top center;
  background: linear-gradient(180deg, var(--gold), var(--beam));
  transition: transform 0.14s linear;
}

/* --- 移动端触发按钮 --- */
.rail-toggle {
  display: none;
}

/* =========================================================
   Footer · 年鉴尾页
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  padding: clamp(42px, 6vw, 76px) 0 0;
  color: var(--white);
  border-top: 1px solid var(--line);
  background-color: #080B10;
  background-image:
    radial-gradient(900px 440px at 16% 0%, rgba(77, 141, 255, 0.13), transparent 62%),
    radial-gradient(620px 340px at 92% 12%, rgba(196, 69, 54, 0.1), transparent 66%),
    linear-gradient(180deg, #0A1018 0%, #080B10 72%);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  opacity: 0.55;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(169, 199, 255, 0.4) 0 1px,
    transparent 1px 22px
  );
}

.footer__inner,
.footer__base {
  width: min(var(--wrap), 100% - var(--gutter));
  margin-inline: auto;
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(34px, 5vw, 72px);
}

.footer__lead { min-width: 0; }

.footer__kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--beam-soft);
}

.footer__kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.16);
}

.footer__brand {
  margin: 15px 0 8px;
  font-size: clamp(30px, 3.8vw, 42px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.footer__line {
  font-size: 13px;
  letter-spacing: 0.07em;
  color: var(--mist);
}

.footer__desc {
  margin-top: 16px;
  max-width: 36em;
  font-size: 14.5px;
  line-height: 1.9;
  color: #B9C4D4;
}

.footer__cta { margin-top: 24px; }

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

.footer__col { min-width: 0; }

.footer__col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--gold);
}

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

.footer__list a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: #C2CCDA;
  transition: color 0.2s var(--ease);
}

.footer__list a::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  width: 7px;
  height: 1px;
  background: var(--beam);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease);
}

.footer__list a:hover { color: var(--white); }
.footer__list a:hover::before { transform: translateY(-50%) scaleX(1); }

.footer__base {
  margin-top: clamp(34px, 5vw, 58px);
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 12.5px;
  color: #9FABBB;
  letter-spacing: 0.02em;
}

.footer__contact-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.footer__contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(169, 199, 255, 0.78);
}

.footer__legal {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #7F8B9C;
}

.footer__legal-sep {
  margin: 0 8px;
  opacity: 0.45;
}

/* =========================================================
   通用组件
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  transition: background 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease), transform 0.24s var(--ease),
    box-shadow 0.24s var(--ease);
}

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

.btn--beam {
  background: var(--beam);
  border-color: var(--beam);
  color: #04101F;
  box-shadow: 0 12px 32px -14px rgba(77, 141, 255, 0.9);
}

.btn--beam:hover {
  background: var(--beam-soft);
  border-color: var(--beam-soft);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(169, 199, 255, 0.4);
  color: var(--beam-soft);
}

.btn--ghost:hover {
  background: rgba(77, 141, 255, 0.14);
  border-color: var(--beam);
  color: var(--white);
}

.btn--paper {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--paper-ink);
}

.btn--paper:hover { background: #FFF7E6; }

/* --- 面包屑 --- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.crumbs a { color: var(--beam-soft); transition: color 0.2s var(--ease); }
.crumbs a:hover { color: var(--white); }
.crumbs-sep { color: rgba(154, 164, 178, 0.5); }
.crumbs [aria-current="page"] { color: var(--gold); }

/* --- 长文 --- */
.prose {
  max-width: 72ch;
  font-size: 16.5px;
  line-height: 1.9;
  color: #C8D2E0;
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  margin-top: 2em;
  font-size: clamp(23px, 3vw, 32px);
  color: var(--white);
}

.prose h3 {
  margin-top: 1.7em;
  font-size: 20px;
  color: var(--beam-soft);
}

.prose a {
  color: var(--beam-soft);
  border-bottom: 1px solid rgba(169, 199, 255, 0.42);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.prose a:hover { color: var(--white); border-color: var(--white); }

.prose li {
  position: relative;
  padding-left: 20px;
  margin-top: 0.55em;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 9px;
  height: 1px;
  background: var(--gold);
}

/* --- 章节头 --- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: clamp(20px, 3vw, 38px);
}

.section-head h2 { max-width: 18em; }

/* --- 文本标签 --- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--beam-soft);
}

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

.v-note {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--mist);
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
  white-space: nowrap;
}

.pill--beam { color: var(--beam-soft); background: rgba(77, 141, 255, 0.12); }
.pill--gold { color: var(--gold); background: rgba(245, 166, 35, 0.12); }
.pill--crimson { color: #F08274; background: rgba(196, 69, 54, 0.18); }

.pill--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pillPulse 2.6s var(--ease) infinite;
}

@keyframes pillPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(245, 166, 35, 0); }
}

/* --- 分隔与色块 --- */
.hairline {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--line-strong), transparent 82%);
}

.panel {
  background: rgba(17, 24, 39, 0.66);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 34px);
}

.surface-paper {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: clamp(18px, 3vw, 30px);
  padding: clamp(24px, 4vw, 56px);
}

.surface-paper h2,
.surface-paper h3 { color: var(--paper-ink); }

.surface-paper .eyebrow { color: #8A5B21; }

/* --- 图片容器 --- */
.figure {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  isolation: isolate;
  background: linear-gradient(150deg, #111827 0%, #080B10 58%, #0E1626 100%);
}

.figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(169, 199, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 199, 255, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(8, 11, 16, 0.78) 100%);
}

.figure > img,
.figure > picture > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06) brightness(0.94);
}

.figure--wide { aspect-ratio: 16 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--square { aspect-ratio: 1 / 1; }
.figure--band { aspect-ratio: 21 / 9; }

.figure__cap {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--beam-soft);
}

/* --- 主题筛选 --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 40px;
  padding: 8px 17px;
  border-radius: 999px;
  border: 1px solid rgba(169, 199, 255, 0.28);
  background: transparent;
  color: #B8C4D4;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.filter-btn:hover {
  border-color: var(--beam);
  color: var(--white);
  background: rgba(77, 141, 255, 0.1);
}

.filter-btn[aria-pressed="true"] {
  background: var(--beam);
  border-color: var(--beam);
  color: #04101F;
}

[data-filter-item][hidden] { display: none; }

@keyframes filterIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.is-entering {
  animation: filterIn 0.34s var(--ease) both;
}

/* --- 滚动显现 --- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
}

.has-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   响应式
   ========================================================= */
@media (min-width: 861px) {
  .footer__inner {
    grid-template-columns: minmax(280px, 1.05fr) 1.9fr;
  }
  .footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --gutter: clamp(20px, 6vw, 40px); }

  body {
    padding-left: 0;
    background-attachment: scroll, scroll, scroll, scroll;
  }

  .skip-link { left: 14px; top: 74px; }

  /* --- 抽屉形态 --- */
  .site-header::before { display: block; }
  .site-header[data-open]::before { opacity: 1; pointer-events: auto; }

  .rail {
    width: min(84vw, 330px);
    padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px
      calc(env(safe-area-inset-bottom, 0px) + 24px);
    gap: 18px;
    background-color: #0B111A;
    border-right: 1px solid rgba(169, 199, 255, 0.2);
    box-shadow: 28px 0 64px rgba(0, 0, 0, 0.62);
    transform: translateX(-104%);
    transition: transform 0.34s var(--ease);
    overflow-y: auto;
  }

  .site-header[data-open] .rail { transform: translateX(0); }

  .rail__brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 13px;
    padding: 0 56px 18px 0;
  }

  .rail__brand::after {
    left: 0;
    transform: none;
    width: 100%;
  }

  .rail__brandwords {
    flex-direction: column;
    gap: 3px;
  }

  .rail__brandtext {
    writing-mode: horizontal-tb;
    font-size: 20px;
    letter-spacing: 0.06em;
  }

  .rail__brandsub {
    writing-mode: horizontal-tb;
    font-size: 9.5px;
    letter-spacing: 0.22em;
  }

  .rail__nav {
    margin-top: 4px;
    padding: 0;
  }

  .rail__nav-note { display: block; }

  .rail__list { gap: 3px; }

  .rail__link {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 10px;
  }

  .rail__link::before {
    left: 0;
    top: 50%;
    height: 18px;
    transform: translateY(-50%);
  }

  .rail__idx { width: 18px; flex: 0 0 18px; font-size: 10px; }

  .rail__label {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #D6DEEA;
  }

  .rail__close { display: inline-flex; }

  .rail__foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 6px 0 0;
    padding-top: 18px;
  }

  .rail__sync { text-align: left; font-size: 10px; }
  .rail__sync-br { display: none; }

  .rail__cta {
    writing-mode: horizontal-tb;
    padding: 12px 18px;
    font-size: 13px;
    letter-spacing: 0.1em;
  }

  .rail__meter { display: none; }

  /* --- 触发按钮 --- */
  .rail-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 16px 10px 13px;
    border-radius: 999px;
    border: 1px solid rgba(169, 199, 255, 0.3);
    background: rgba(17, 24, 39, 0.9);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    backdrop-filter: blur(10px);
    transition: opacity 0.22s var(--ease), border-color 0.22s var(--ease);
  }

  .rail-toggle:hover { border-color: var(--beam); }

  .rail-toggle__bars {
    position: relative;
    display: block;
    width: 16px;
    height: 10px;
  }

  .rail-toggle__bars::before,
  .rail-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
    height: 1.6px;
    border-radius: 2px;
    background: var(--beam);
  }

  .rail-toggle__bars::before { top: 0; width: 16px; }
  .rail-toggle__bars::after { bottom: 0; width: 11px; background: var(--gold); }

  .rail-toggle__text { line-height: 1; }

  .site-header[data-open] .rail-toggle {
    opacity: 0;
    pointer-events: none;
  }

  body.nav-open { overflow: hidden; }

  /* --- 页脚 --- */
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .footer__cols { grid-template-columns: minmax(0, 1fr); }
  .footer__cta { width: 100%; }
}

/* ---------- 动效偏好 ---------- */
@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;
  }

  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .rail { transition: none; }
  .rail__meter-fill { transition: none; }
}
