/* ═══════════════════════════════════════════════════════════════
   基础：重置 · 背景 · 排版 · 版块标题 · 显现动画
   ═══════════════════════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 16px);
  scrollbar-gutter: stable;                /* 打开浮层锁定滚动时，页面不会左右跳动 */
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* 刘海屏顶部安全区色带 */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--bg);
}

/* 背景色光：三团极缓慢漂移的紫 / 品红 / 青。打开浮层时暂停，省电 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora i {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.aurora i:nth-child(1) {
  width: 90vmax; height: 90vmax;
  left: 50%; top: -58vmax;
  margin-left: -45vmax;
  background: radial-gradient(closest-side, rgba(96, 70, 220, .38), transparent);
  animation: drift-a 28s var(--ease-in-out) infinite alternate;
}
.aurora i:nth-child(2) {
  width: 70vmax; height: 70vmax;
  right: -34vmax; top: 18vh;
  background: radial-gradient(closest-side, rgba(190, 70, 175, .16), transparent);
  animation: drift-b 34s var(--ease-in-out) infinite alternate;
}
.aurora i:nth-child(3) {
  width: 70vmax; height: 70vmax;
  left: -36vmax; bottom: -34vmax;
  background: radial-gradient(closest-side, rgba(40, 160, 190, .13), transparent);
  animation: drift-c 38s var(--ease-in-out) infinite alternate;
}
.has-ov .aurora i { animation-play-state: paused; }
@keyframes drift-a { to { transform: translate3d(5vw, 6vh, 0) scale(1.06); } }
@keyframes drift-b { to { transform: translate3d(-9vw, 12vh, 0) scale(.94); } }
@keyframes drift-c { to { transform: translate3d(10vw, -9vh, 0) scale(1.08); } }

main, .ftr { position: relative; z-index: 2; }

img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a, button, label, summary, [role="button"] { touch-action: manipulation; } /* 去掉双击缩放（连点 + 号时页面不会放大） */
ul, ol { list-style: none; margin: 0; padding: 0; }
p, h1, h2, h3, h4 { margin: 0; font-weight: inherit; font-size: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(171, 160, 255, .42); color: var(--ink); }

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

.i {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.mono { font-family: var(--font-mono); font-feature-settings: "zero" 1; }
.latin { font-family: var(--font-latin); }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: max(16px, env(safe-area-inset-left, 0px));
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform var(--d-3) var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ═════ 版块 ═════ */
.sec { position: relative; padding-block: var(--sec-y); }
.sec + .sec { padding-top: calc(var(--sec-y) * .55); }
/* 点导航跳转时，让版块标题落在页头下方不远处，而不是隔着一大段留白 */
.sec { scroll-margin-top: calc(var(--sec-y) * -1 + 20px); }
.sec + .sec { scroll-margin-top: calc(var(--sec-y) * -.55 + 20px); }

/* 版块标题：左侧「编号 + 名称」，标题与说明左右分列（桌面） */
.sec__head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(28px, 3.4vw, 44px);
}
.sec__head > div { display: grid; gap: 14px; min-width: 0; }
@media (min-width: 900px) {
  .sec__head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 24em); align-items: end; column-gap: 48px; }
  .sec__head--split .sec__sub { justify-self: end; padding-bottom: 6px; }
}
.sec__head--center { justify-items: center; text-align: center; }
.sec__head--center > div { justify-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-sm);
  line-height: 1;
  letter-spacing: .16em;
  color: var(--ink-2);
}
.eyebrow b {
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow i {
  width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--line-3), transparent);
}
.sec__head--center .eyebrow i:first-child { background: linear-gradient(90deg, transparent, var(--line-3)); }

.h2 {
  font-family: var(--font-cn);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 1.22;
  letter-spacing: .02em;
  text-wrap: balance;
}
.sec__sub {
  max-width: 30em;
  color: var(--ink-2);
  font-size: var(--fs-md);
  line-height: 1.8;
  text-wrap: pretty;
}

/* ═════ 滚动显现（仅首屏以下；脚本失效时内容照常可见） ═════ */
.rv-wait { opacity: 0; transform: translate3d(0, 10px, 0); }
.rv-in {
  opacity: 1;
  transform: none;
  transition: opacity 520ms var(--ease-out) var(--rv-d, 0ms), transform 600ms var(--ease-out) var(--rv-d, 0ms);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  text-align: center;
}

/* 轻量模式（低端设备 / 省流量 / 系统要求减少透明效果）：去掉毛玻璃模糊与背景漂移，保持操作流畅 */
html.lite *, html.lite *::before, html.lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lite .aurora i { animation: none; }
html.lite .ov__scrim { background: rgba(5, 5, 20, .78); }
html.lite .hdr::before, html.lite .mdock { background-color: rgba(12, 13, 40, .97); }
@media (prefers-reduced-transparency: reduce) {
  *, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .ov__scrim { background: rgba(5, 5, 20, .82); }
}
/* 系统要求更高对比度：提高次要文字与描边的对比 */
@media (prefers-contrast: more) {
  :root { --ink-2: #D4D7F5; --ink-3: #A9AED8; --line: rgba(170, 178, 255, .28); --line-2: rgba(170, 178, 255, .42); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
  .rv-wait { opacity: 1; transform: none; }
}
