/* =========================================================
   亿万国开服 · 共享样式 /assets/site.css
   深空档案库：蓝图网格 + 双色轨道 + 切角舱体
   ========================================================= */

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

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

body,
h1, h2, h3, h4, h5,
p, figure, blockquote,
ul, ol, 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;
  padding: 0;
}

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

table {
  border-collapse: collapse;
  border-spacing: 0;
}

[hidden] {
  display: none !important;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 色板 */
  --c-void: #070B14;
  --c-night: #0B1220;
  --c-panel: #101A2E;
  --c-line: #1C2A44;
  --c-cyan: #45E0E0;
  --c-amber: #F0B23C;
  --c-cold: #4C8DFF;
  --c-wine: #7A2740;
  --c-teal: #0E3B3A;
  --c-indigo: #2B2350;
  --c-text: #E8EEF9;
  --c-muted: #93A4C0;
  --c-focus: #B08BFF;

  /* 字体 */
  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 字号层级 */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-28: 1.75rem;
  --fs-44: 2.75rem;
  --fs-72: 4.5rem;
  --fs-120: 7.5rem;

  /* 结构 */
  --page-max: 1240px;
  --gutter: clamp(18px, 4vw, 56px);
  --radius: 16px;
  --cut: 12px;
  --dur: 180ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 74px;
  --shadow-lift: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

/* ---------- 3. 基础中文排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--c-text);
  background-color: var(--c-void);
  background-image:
    radial-gradient(1100px 560px at 82% -8%, rgba(69, 224, 224, 0.075), transparent 68%),
    radial-gradient(880px 480px at 4% 6%, rgba(240, 178, 60, 0.05), transparent 70%),
    linear-gradient(to right, rgba(28, 42, 68, 0.42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 42, 68, 0.42) 1px, transparent 1px);
  background-size: auto, auto, 88px 88px, 88px 88px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.2vw, var(--fs-72)); }
h2 { font-size: clamp(1.7rem, 3.2vw, var(--fs-44)); }
h3 { font-size: clamp(1.2rem, 1.9vw, var(--fs-28)); font-weight: 800; line-height: 1.3; }
h4 { font-size: var(--fs-20); font-weight: 800; }

p {
  max-width: 42em;
  color: var(--c-text);
}

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

::selection {
  background: var(--c-cyan);
  color: #04121A;
}

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

/* ---------- 4. 通用工具 ---------- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.text-cyan { color: var(--c-cyan); }
.text-amber { color: var(--c-amber); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-cyan);
}

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--c-line), rgba(28, 42, 68, 0.1));
  margin-block: clamp(24px, 4vw, 48px);
}

.lead {
  font-size: var(--fs-20);
  line-height: 1.7;
  color: var(--c-text);
  max-width: 40em;
}

/* ---------- 5. 跳过链接 ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 10px;
  z-index: 120;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--c-cyan);
  color: #04121A;
  font-weight: 700;
  font-size: var(--fs-14);
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}

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

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.88);
  border-bottom: 1px solid var(--c-line);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.header-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.header-rail__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-amber));
  transition: transform 120ms linear;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 12px var(--gutter);
  min-height: var(--header-h);
  transition: min-height var(--dur) var(--ease), padding var(--dur) var(--ease);
}

.site-header[data-condensed="true"] .header-inner {
  min-height: 58px;
  padding-block: 6px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 4px;
  border-radius: 10px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(69, 224, 224, 0.55);
  background: rgba(69, 224, 224, 0.06);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform var(--dur) var(--ease);
}

.site-header[data-condensed="true"] .brand__mark { transform: scale(0.88); }

.brand__mark-core {
  width: 10px;
  height: 10px;
  background: var(--c-amber);
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(240, 178, 60, 0.7);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--c-text);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: var(--c-muted);
  transition: opacity var(--dur) var(--ease);
}

.site-header[data-condensed="true"] .brand__sub { opacity: 0.55; }

/* 悬浮胶囊导航 */
.nav-capsule {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: rgba(16, 26, 46, 0.74);
  box-shadow: inset 0 0 0 1px rgba(69, 224, 224, 0.045);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-muted);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--c-text);
  background: rgba(69, 224, 224, 0.09);
}

.nav-link[aria-current="page"] {
  color: #04121A;
  background: var(--c-cyan);
  box-shadow: 0 0 20px -8px rgba(69, 224, 224, 0.9);
}

.nav-link[aria-current="page"]:hover {
  color: #04121A;
  background: #6BE9E9;
}

/* 右侧状态区 */
.header-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: rgba(16, 26, 46, 0.62);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-amber);
  box-shadow: 0 0 10px rgba(240, 178, 60, 0.9);
}

.status-chip__label { color: var(--c-text); }
.status-chip__sep { color: rgba(28, 42, 68, 1); }
.status-chip__meta { color: var(--c-cyan); }
.status-chip__state { color: var(--c-amber); }

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: rgba(16, 26, 46, 0.72);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}

.nav-toggle:hover { border-color: rgba(69, 224, 224, 0.5); }

.nav-toggle__bars {
  display: grid;
  gap: 5px;
  width: 18px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--c-cyan);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 7. 章节与内容组件 ---------- */
.section {
  padding-block: clamp(48px, 7vw, 104px);
}

.section--tight {
  padding-block: clamp(32px, 4vw, 60px);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 24px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

.layout-rail {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}

.chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(12px, 3vw, 40px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: clamp(24px, 4vw, 44px);
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 9vw, var(--fs-120));
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: rgba(69, 224, 224, 0.14);
  -webkit-text-stroke: 1px rgba(69, 224, 224, 0.45);
}

.chapter-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 900;
}

.chapter-lede {
  flex: 1 1 260px;
  font-size: var(--fs-14);
  color: var(--c-muted);
  max-width: 40em;
}

/* ---------- 8. 舱体面板 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-panel);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.panel--cut {
  border-color: transparent;
  border-radius: 0;
  background:
    linear-gradient(140deg, rgba(69, 224, 224, 0.08), transparent 58%),
    var(--c-panel);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

.panel--cut::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: calc(var(--cut) * 1.42);
  height: 1px;
  background: rgba(69, 224, 224, 0.4);
  transform: rotate(45deg);
  transform-origin: top right;
  pointer-events: none;
}

.panel--teal {
  background: linear-gradient(160deg, rgba(14, 59, 58, 0.92), rgba(7, 11, 20, 0.94));
  border-color: rgba(69, 224, 224, 0.2);
}

.panel--wine {
  background: linear-gradient(160deg, rgba(122, 39, 64, 0.88), rgba(7, 11, 20, 0.94));
  border-color: rgba(240, 178, 60, 0.2);
}

.panel--indigo {
  background: linear-gradient(160deg, rgba(43, 35, 80, 0.92), rgba(7, 11, 20, 0.94));
  border-color: rgba(176, 139, 255, 0.22);
}

.panel--lift:hover,
.panel--lift:focus-within {
  transform: translateY(-2px);
  border-color: rgba(69, 224, 224, 0.42);
  box-shadow: var(--shadow-lift);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel__title {
  margin: 0;
  font-size: var(--fs-20);
  font-weight: 800;
}

.panel__body {
  color: var(--c-muted);
  font-size: var(--fs-14);
}

.panel__body p { color: inherit; }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--c-amber);
  color: #17100400;
  color: #170F00;
}

.btn--primary:hover {
  background: #FFC65A;
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: rgba(69, 224, 224, 0.5);
  background: rgba(69, 224, 224, 0.07);
  color: var(--c-cyan);
}

.btn--ghost:hover {
  border-color: var(--c-cyan);
  background: rgba(69, 224, 224, 0.15);
  transform: translateY(-2px);
}

.btn--quiet {
  border-color: var(--c-line);
  background: rgba(16, 26, 46, 0.7);
  color: var(--c-text);
}

.btn--quiet:hover {
  border-color: rgba(147, 164, 192, 0.6);
  transform: translateY(-2px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--c-muted);
}

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

.breadcrumb__link {
  color: var(--c-muted);
  transition: color var(--dur) var(--ease);
}

.breadcrumb__link:hover { color: var(--c-cyan); }

.breadcrumb__item [aria-current="page"] { color: var(--c-text); }

.breadcrumb__sep {
  color: rgba(28, 42, 68, 1);
  user-select: none;
}

/* ---------- 11. 对照表 ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: rgba(16, 26, 46, 0.55);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 560px;
  font-size: 0.9375rem;
  text-align: left;
}

.data-table caption {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-line);
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}

.data-table thead th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  background: rgba(7, 11, 20, 0.62);
  white-space: nowrap;
}

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table td.num {
  font-family: var(--font-mono);
  color: var(--c-cyan);
  white-space: nowrap;
}

.data-table tr.is-diff td { background: rgba(240, 178, 60, 0.07); }
.data-table tr.is-same td { color: var(--c-muted); }

/* ---------- 12. 双色轨道 ---------- */
.track {
  --track-a: var(--c-cold);
  --track-b: var(--c-amber);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.track__rail {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--track-a) 0 50%, var(--track-b) 50% 100%);
}

.track__rail::before,
.track__rail::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.track__rail::before { left: 0; background: var(--track-a); }
.track__rail::after { right: 0; background: var(--track-b); }

.track__nodes {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 24px;
}

.track__node {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.track__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--track-a);
  box-shadow: 0 0 12px -2px var(--track-a);
}

.track__label {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--c-text);
}

.track__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--c-muted);
}

.track__node--aug .track__dot { background: var(--c-cold); box-shadow: 0 0 12px -2px var(--c-cold); }
.track__node--sep .track__dot { background: var(--c-amber); box-shadow: 0 0 12px -2px var(--c-amber); }

/* ---------- 13. 标签与指标 ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  background: rgba(16, 26, 46, 0.7);
}

.tag--amber { color: var(--c-amber); border-color: rgba(240, 178, 60, 0.38); }
.tag--cold { color: var(--c-cold); border-color: rgba(76, 141, 255, 0.38); }

.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi__num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-cyan);
}

.kpi__label {
  font-size: var(--fs-12);
  letter-spacing: 0.16em;
  color: var(--c-muted);
}

/* ---------- 14. 折叠面板 ---------- */
.fold {
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: rgba(16, 26, 46, 0.62);
  overflow: hidden;
}

.fold__item + .fold__item { border-top: 1px solid var(--c-line); }

.fold__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.fold__trigger:hover { background: rgba(69, 224, 224, 0.07); }
.fold__trigger[aria-expanded="true"] { color: var(--c-cyan); }

.fold__icon {
  position: relative;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease);
}

.fold__icon::before,
.fold__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
}

.fold__icon::after { transform: translateY(-50%) rotate(90deg); }

.fold__trigger[aria-expanded="true"] .fold__icon { transform: rotate(45deg); }

.fold__panel {
  padding: 0 20px 20px;
  font-size: var(--fs-14);
  line-height: 1.8;
  color: var(--c-muted);
}

/* ---------- 15. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--c-line);
  background:
    linear-gradient(135deg, rgba(69, 224, 224, 0.07), transparent 62%),
    var(--c-panel);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(180deg, rgba(232, 238, 249, 0.05) 0 1px, transparent 1px 4px);
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  background: rgba(7, 11, 20, 0.78);
  border-top: 1px solid var(--c-line);
  border-right: 1px solid var(--c-line);
}

/* ---------- 16. 扫描线氛围 ---------- */
.scanlines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.55;
}

.scanlines::before {
  content: "";
  position: absolute;
  inset: -10% -6%;
  background: repeating-linear-gradient(180deg, rgba(232, 238, 249, 0.05) 0 1px, transparent 1px 6px);
  animation: yw-scan 12s linear infinite alternate;
}

@keyframes yw-scan {
  from { transform: translate3d(-2.5%, 0, 0); }
  to { transform: translate3d(2.5%, 0, 0); }
}

/* ---------- 17. 显现动效 ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ---------- 18. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 140px);
  border-top: 1px solid var(--c-line);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.98), #05080F);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(to right, rgba(28, 42, 68, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 42, 68, 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 78%);
}

.footer-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background: repeating-linear-gradient(180deg, rgba(232, 238, 249, 0.035) 0 1px, transparent 1px 5px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 88%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 88%);
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
}

.footer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: clamp(24px, 3.5vw, 40px);
  border-bottom: 1px solid var(--c-line);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-brand__mark {
  width: 26px;
  height: 26px;
  background:
    linear-gradient(135deg, var(--c-cyan), transparent 55%),
    var(--c-amber);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}

.footer-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.footer-brand__name {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.footer-brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--c-muted);
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  max-width: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 48px);
  padding-block: clamp(28px, 4vw, 48px);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--c-cyan);
  text-transform: uppercase;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--fs-14);
}

.footer-link {
  display: inline-block;
  color: var(--c-muted);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer-link:hover {
  color: var(--c-text);
  transform: translateX(2px);
}

.footer-list--plain li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(147, 164, 192, 0.7);
}

.footer-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--c-text);
  word-break: break-word;
}

.footer-small {
  font-size: var(--fs-12);
  line-height: 1.8;
  color: rgba(147, 164, 192, 0.85);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--c-line);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--c-muted);
}

.footer-copy--muted { color: rgba(147, 164, 192, 0.6); }

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1180px) {
  .nav-link {
    padding: 7px 11px;
    font-size: 12.5px;
  }
  .status-chip { font-size: 11px; padding: 6px 10px; }
}

@media (max-width: 1100px) {
  .status-chip { display: none; }
}

@media (max-width: 980px) {
  :root { --header-h: 66px; }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 10px;
  }

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

  .nav-capsule {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: var(--radius);
    background: rgba(11, 18, 32, 0.98);
    box-shadow: var(--shadow-lift);
    max-height: 72vh;
    overflow-y: auto;
    justify-self: stretch;
  }

  .nav-capsule[data-open="true"] { display: flex; }

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

  .nav-item { width: 100%; }

  .nav-link {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    white-space: normal;
  }

  .nav-link[aria-current="page"] {
    box-shadow: none;
  }

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

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

  .rail { position: static; }

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

@media (max-width: 720px) {
  .chapter-num { font-size: clamp(2.6rem, 16vw, 4.5rem); }
  .footer-head { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .brand__sub { display: none; }
  .brand__mark { width: 30px; height: 30px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
}

/* ---------- 20. 焦点与动效偏好 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}

@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;
    scroll-behavior: auto !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .scanlines::before { animation: none; }
  .header-rail__fill { transition: none; }
}
