/* ==========================================================================
   万博主站 · 共享样式 /assets/site.css
   设计依据：档位地图 · 深渊靛底 × 霓虹青品红 × 琥珀刻度
   ========================================================================== */

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

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

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

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; padding: 0; }

a { color: inherit; }

hr { border: 0; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩 */
  --ink-abyss:   #070C24;
  --ink-cabin:   #0E1740;
  --line-scale:  #1B2A66;
  --cyan:        #00E5FF;
  --magenta:     #FF2D95;
  --amber:       #FFC24B;
  --violet:      #6C4BFF;
  --mint:        #38F2C0;
  --flame:       #FF6B4A;
  --paper:       #EDF1FF;
  --muted:       #98A3D6;
  --glass:       rgba(155, 183, 255, 0.08);

  /* 区间编码 */
  --r1: var(--cyan);
  --r2: var(--mint);
  --r3: var(--violet);
  --r4: var(--magenta);
  --r5: var(--amber);
  --r6: var(--flame);

  /* 字体 */
  --font-brand: 'Source Han Sans SC', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 节奏 */
  --shell-max: 1180px;
  --gutter: 72px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

  --z-header: 60;
  --z-drawer: 70;
  --z-tool: 45;
}

/* 区间 → --rc 注入协议 */
[data-range="r1"] { --rc: var(--r1); }
[data-range="r2"] { --rc: var(--r2); }
[data-range="r3"] { --rc: var(--r3); }
[data-range="r4"] { --rc: var(--r4); }
[data-range="r5"] { --rc: var(--r5); }
[data-range="r6"] { --rc: var(--r6); }

/* ---------- 3. Base ---------- */
body {
  background-color: var(--ink-abyss);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 28px;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* 深夜数据舱环境光：固定霓虹辉光，不参与布局 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 440px at 84% 8%, rgba(255, 45, 149, 0.16), transparent 70%),
    radial-gradient(760px 540px at 8% 76%, rgba(0, 229, 255, 0.13), transparent 72%),
    radial-gradient(560px 400px at 52% 46%, rgba(108, 75, 255, 0.10), transparent 70%);
}

body > * { position: relative; z-index: 1; }

::selection {
  background: rgba(0, 229, 255, 0.28);
  color: #ffffff;
}

#main-content { scroll-margin-top: 96px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--paper);
}

h1 { font-size: clamp(30px, 4.2vw, 40px); line-height: 1.3; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 22px; line-height: 32px; }
h4 { font-size: 18px; line-height: 28px; }

strong { font-weight: 700; color: #ffffff; }

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- 4. 通用容器与栅格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* 章节交界的六段细分隔线 */
.divider-ranges {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
  height: 1px;
}

.divider-ranges span {
  height: 1px;
  background: var(--rc, var(--line-scale));
  opacity: 0.4;
}

/* ---------- 5. 正文与面包屑 ---------- */
.prose {
  max-width: 34em;
  font-size: 16px;
  line-height: 28px;
  color: var(--paper);
}

.prose p { margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.35);
  transition: border-color 0.18s ease;
}

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

.prose ul,
.prose ol {
  margin-bottom: 16px;
  padding-left: 1.2em;
}

.prose ul li { list-style: none; position: relative; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: -1em;
  top: 12px;
  width: 6px;
  height: 1px;
  background: var(--cyan);
}

.prose ol { list-style: decimal; }
.prose ol li { margin-bottom: 6px; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--line-scale);
}

.breadcrumb-item a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.breadcrumb-item a:hover { color: var(--cyan); }

.breadcrumb-item[aria-current="page"] { color: var(--paper); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border: 1px solid var(--line-scale);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out),
              color 0.18s var(--ease-out);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.38);
  color: #ffffff;
}

.btn--primary { border-color: rgba(0, 229, 255, 0.6); color: #ffffff; }
.btn--amber   { border-color: rgba(255, 194, 75, 0.55); color: var(--amber); }
.btn--amber:hover,
.btn--amber:focus-visible {
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(255, 194, 75, 0.38);
  color: var(--amber);
}

/* ---------- 7. 图片容器（页面阶段放置占位图） ---------- */
.figure { margin: 0; }

.figure-img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-scale);
  border-radius: 2px;
  background:
    linear-gradient(142deg, rgba(108, 75, 255, 0.20), rgba(7, 12, 36, 0.92) 62%),
    var(--ink-cabin);
}

.figure-img--21x9 { aspect-ratio: 21 / 9; }
.figure-img--4x3  { aspect-ratio: 4 / 3; }
.figure-img--1x1  { aspect-ratio: 1 / 1; }

.figure-img > img,
.figure-img > picture > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 空容器时的刻度栅格 */
.figure-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(155, 183, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 183, 255, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
}

.figure-cap {
  margin-top: 10px;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- 8. 六区间切换器 ---------- */
.range-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-scale);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease-out),
              color 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out);
}

.range-btn::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rc, var(--line-scale));
  opacity: 0.55;
  transition: opacity 0.18s ease, box-shadow 0.18s ease;
}

.range-btn:hover {
  color: var(--paper);
  border-color: var(--line-scale);
}

.range-btn[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--rc, var(--cyan));
  box-shadow: 0 0 12px -2px var(--rc, var(--cyan));
}

.range-btn[aria-pressed="true"]::before {
  opacity: 1;
  box-shadow: 0 0 10px 1px var(--rc, var(--cyan));
}

/* ---------- 9. 左侧纵向区间索引轨 ---------- */
.index-rail {
  position: fixed;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-tool);
  display: none;
  padding: 16px 12px;
  background: var(--glass);
  border: 1px solid rgba(27, 42, 102, 0.85);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rail-item { display: block; }

.rail-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.14em;
  transition: color 0.18s ease;
}

.rail-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--rc, var(--line-scale));
  opacity: 0.55;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.rail-label { white-space: nowrap; }

.rail-link:hover { color: var(--paper); }
.rail-link:hover .rail-dot { opacity: 1; }

.rail-link[aria-current="true"] { color: #ffffff; }

.rail-link[aria-current="true"] .rail-dot {
  opacity: 1;
  transform: scale(1.35);
  box-shadow: 0 0 12px 2px var(--rc, var(--cyan));
}

@media (min-width: 1280px) {
  .index-rail { display: block; }
}

/* ---------- 10. 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.32s var(--ease-out), transform 0.32s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: linear-gradient(180deg, rgba(7, 12, 36, 0.97), rgba(7, 12, 36, 0.88));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(27, 42, 102, 0.85);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 120;
  padding: 10px 18px;
  background: var(--amber);
  color: #0B1020;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.18s var(--ease-out);
}

.skip-link:focus { top: 12px; }

.header-inner {
  position: relative;
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 34px var(--gutter) 0;
  transition: padding-top 0.2s var(--ease-out);
}

/* 报头 */
.masthead {
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  color: var(--paper);
  transition: opacity 0.18s ease;
}

.brand-cn {
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: 56px;
  line-height: 64px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--paper);
  -webkit-text-stroke: 0.5px rgba(0, 229, 255, 0.45);
  text-shadow:
    0 0 14px rgba(0, 229, 255, 0.55),
    0 0 38px rgba(0, 229, 255, 0.28),
    0 0 60px rgba(255, 45, 149, 0.24);
  transition: font-size 0.2s var(--ease-out),
              line-height 0.2s var(--ease-out),
              text-shadow 0.2s var(--ease-out);
}

.brand-latin {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.42em;
  color: var(--cyan);
  transition: font-size 0.2s var(--ease-out), letter-spacing 0.2s var(--ease-out);
}

.brand:hover .brand-cn {
  text-shadow:
    0 0 18px rgba(0, 229, 255, 0.75),
    0 0 46px rgba(255, 45, 149, 0.45);
}

.masthead-sub {
  margin-top: 8px;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.16em;
  color: var(--muted);
  max-height: 44px;
  overflow: hidden;
  transition: max-height 0.2s var(--ease-out),
              opacity 0.2s var(--ease-out),
              margin-top 0.2s var(--ease-out);
}

/* 右侧常驻资源包入口 */
.header-slot {
  position: absolute;
  right: var(--gutter);
  top: 36px;
  transition: top 0.2s var(--ease-out);
}

.slot-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 194, 75, 0.45);
  border-radius: 2px;
  text-decoration: none;
  color: var(--paper);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.08em;
  transition: border-color 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out),
              color 0.18s var(--ease-out);
}

.slot-cta:hover,
.slot-cta:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 12px -2px var(--cyan);
  color: #ffffff;
}

.slot-cta-ver {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0;
  color: var(--amber);
}

/* 栏目导航 */
.site-nav {
  margin-top: 20px;
  border-top: 1px solid rgba(27, 42, 102, 0.7);
  transition: margin-top 0.2s var(--ease-out);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  color: var(--paper);
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.08em;
  transition: border-color 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out),
              color 0.18s var(--ease-out);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  color: #ffffff;
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0;
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav-link[aria-current="page"] { color: #ffffff; }

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-link[aria-current="page"] .nav-num { color: var(--amber); }

/* 移动端专用抽屉里的资源包入口 */
.nav-item--cta { display: none; }

/* 移动端导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line-scale);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.2em;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 20px;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--cyan);
  color: var(--paper);
  box-shadow: 0 0 12px -3px var(--cyan);
}

.nav-toggle-bar {
  display: block;
  width: 13px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
}

.nav-toggle-label { margin-left: 4px; }

/* 刊头底部六色刻度条 */
.header-scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 18px;
  transition: margin-top 0.2s var(--ease-out);
}

.header-scale span {
  height: 2px;
  border-radius: 2px;
  background: var(--rc, var(--line-scale));
  opacity: 0.45;
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta), var(--amber));
  pointer-events: none;
}

/* 收缩状态 */
.site-header[data-stuck="true"] .header-inner { padding-top: 12px; }

.site-header[data-stuck="true"] .brand-cn {
  font-size: 22px;
  line-height: 28px;
  text-shadow:
    0 0 10px rgba(0, 229, 255, 0.55),
    0 0 26px rgba(255, 45, 149, 0.30);
}

.site-header[data-stuck="true"] .brand-latin {
  font-size: 10px;
  letter-spacing: 0.3em;
}

.site-header[data-stuck="true"] .masthead-sub {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.site-header[data-stuck="true"] .header-slot { top: 10px; }

.site-header[data-stuck="true"] .site-nav { margin-top: 6px; }

.site-header[data-stuck="true"] .nav-link { padding: 8px 14px; }

.site-header[data-stuck="true"] .nav-link::after { bottom: 3px; }

.site-header[data-stuck="true"] .header-scale { margin-top: 10px; }

/* ---------- 12. 站点页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 120px;
  background: linear-gradient(180deg, rgba(7, 12, 36, 0.4), rgba(7, 12, 36, 0.98));
  border-top: 1px solid rgba(27, 42, 102, 0.6);
}

.footer-line {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.footer-line span {
  height: 2px;
  background: var(--rc, var(--line-scale));
  opacity: 0.55;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.4fr;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 48px;
}

.footer-brand { min-width: 0; }

.footer-brand-link {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
}

.footer-brand-cn {
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: 30px;
  line-height: 38px;
  letter-spacing: 0.18em;
  color: var(--paper);
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.4), 0 0 34px rgba(255, 45, 149, 0.22);
}

.footer-brand-latin {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0.4em;
  color: var(--cyan);
}

.footer-tagline {
  margin-top: 14px;
  max-width: 26em;
  font-size: 13px;
  line-height: 22px;
  color: var(--muted);
}

.footer-icp {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.06em;
  color: rgba(152, 163, 214, 0.75);
}

.footer-col { min-width: 0; }

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-bottom: 18px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: inline-block;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--cyan);
  border-bottom-color: rgba(0, 229, 255, 0.55);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: baseline;
}

.footer-contact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 20px;
  letter-spacing: 0.14em;
  color: var(--amber);
}

.footer-contact-val {
  font-size: 14px;
  line-height: 22px;
  color: var(--paper);
  word-break: break-word;
}

.footer-note {
  margin-top: 18px;
  max-width: 30em;
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(27, 42, 102, 0.6);
}

.footer-legal-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.04em;
  color: rgba(152, 163, 214, 0.8);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal-links .footer-link {
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-tool);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-scale);
  border-radius: 2px;
  background: rgba(14, 23, 64, 0.85);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out),
              border-color 0.18s ease,
              color 0.18s ease,
              box-shadow 0.18s ease;
}

.to-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover,
.to-top:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 14px -3px var(--cyan);
}

.to-top-mark {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
}

/* ---------- 13. 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 40px; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-col--contact { grid-column: 1 / -1; }

  .col-3 { grid-column: span 6; }
  .col-4 { grid-column: span 6; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(7, 12, 36, 0.98);
  }

  .header-inner { padding: 20px 20px 0; }

  .brand { gap: 8px; }

  .brand-cn {
    font-size: 38px;
    line-height: 46px;
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.5), 0 0 30px rgba(255, 45, 149, 0.25);
  }

  .masthead-sub { font-size: 11px; letter-spacing: 0.12em; }

  .header-slot { display: none; }

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

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--z-drawer);
    width: min(82vw, 330px);
    margin-top: 0;
    padding: 84px 20px 40px;
    border-top: 0;
    border-right: 1px solid var(--line-scale);
    background: linear-gradient(180deg, #0A1130, #070C24 70%);
    transform: translateX(-102%);
    transition: transform 0.28s var(--ease-out);
    overflow-y: auto;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item { width: 100%; }

  .nav-link {
    padding: 14px 12px;
    font-size: 15px;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(27, 42, 102, 0.55);
  }

  .nav-link::after { display: none; }

  .nav-link:hover,
  .nav-link:focus-visible { box-shadow: none; }

  .nav-link[aria-current="page"] {
    border-bottom-color: var(--amber);
    color: #ffffff;
  }

  .nav-link[aria-current="page"] .nav-num { color: var(--amber); }

  .nav-item--cta { display: block; margin-top: 20px; }

  .nav-link--cta { border: 1px solid rgba(255, 194, 75, 0.5); border-radius: 2px; }

  .site-header[data-stuck="true"] .header-inner { padding-top: 12px; }

  .site-header[data-stuck="true"] .site-nav { margin-top: 0; }

  .footer-inner { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }

  .footer-legal { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 680px) {
  :root { --gutter: 20px; }

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

  .col-3, .col-4, .col-6, .col-8, .col-12 { grid-column: 1 / -1; }

  .brand-cn { font-size: 30px; line-height: 38px; letter-spacing: 0.14em; }

  .footer-brand-cn { font-size: 24px; line-height: 32px; }

  .to-top { right: 16px; bottom: 16px; }

  .footer-contact-item { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- 15. reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-progress { transition: none; }
}
