/* =========================================================
   W88赛场 · 共享样式 /assets/site.css
   轨道外壳 / 切角面板 / 赛场比赛数据色彩体系
   ========================================================= */

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

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

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

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

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

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

a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 深层 */
  --deep: #061321;
  --steel: #0B2233;
  --steel-2: #123A4E;
  /* 霓虹 */
  --cyan: #35E0D0;
  --cyan-soft: #7FF2E8;
  --orange: #FF5A2B;
  --orange-deep: #E8461B;
  --amber: #FFC24B;
  /* 矿物层 */
  --rock: #3A4753;
  --moss: #6E8B6A;
  --clay: #A9603F;
  --paper: #F2EDE4;

  --ink: var(--paper);
  --ink-2: rgba(242, 237, 228, 0.74);
  --ink-3: rgba(242, 237, 228, 0.52);
  --line: rgba(58, 71, 83, 0.85);
  --line-cyan: rgba(53, 224, 208, 0.3);

  --rail-w: 88px;
  --rail-slim: 56px;
  --topbar-h: 60px;
  --maxw: 1180px;
  --gap: 24px;
  --cut: 14px;

  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(53, 224, 208, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 224, 208, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.55;
}

h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

p { max-width: 68ch; }

::selection {
  background: var(--cyan);
  color: #04222a;
}

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

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

/* ---------- 4. 通用工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.divider {
  position: relative;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line);
  overflow: visible;
}

.divider::after {
  content: "";
  position: absolute;
  top: -5px;
  right: 0;
  width: 140px;
  height: 11px;
  background: linear-gradient(90deg, transparent, var(--cyan));
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  opacity: 0.6;
}

.display {
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

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

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

.lede {
  font-size: 18px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 64ch;
}

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

/* ---------- 5. 切角面板 ---------- */
.panel {
  position: relative;
  isolation: isolate;
  padding: clamp(18px, 2.2vw, 26px);
  --panel-bg: var(--steel);
  --cut: 14px;
  color: var(--ink);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--panel-bg);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
  transition: box-shadow 240ms var(--ease), background-color 240ms var(--ease);
}

.panel--accent::before {
  background: linear-gradient(150deg, rgba(18, 58, 78, 0.96), rgba(11, 34, 51, 0.96));
  box-shadow: inset 0 0 0 1px rgba(53, 224, 208, 0.34);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
  --btn-bg: transparent;
  --btn-edge: rgba(53, 224, 208, 0.5);
  --cut: 10px;
  transition: color 200ms var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-bg);
  box-shadow: inset 0 0 0 1px var(--btn-edge);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
  transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.btn--solid {
  --btn-bg: var(--cyan);
  --btn-edge: var(--cyan);
  color: #04222a;
}

.btn--solid:hover { --btn-bg: var(--cyan-soft); }

.btn--ghost:hover {
  --btn-bg: rgba(53, 224, 208, 0.12);
  --btn-edge: var(--cyan);
  color: var(--cyan-soft);
}

.btn--amber {
  --btn-bg: var(--amber);
  --btn-edge: var(--amber);
  color: #2a1a00;
}

.btn--amber:hover { --btn-bg: #ffd377; }

/* ---------- 7. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(53, 224, 208, 0.12);
  box-shadow: inset 0 0 0 1px rgba(53, 224, 208, 0.35);
}

.tag--orange {
  color: var(--orange);
  background: rgba(255, 90, 43, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 43, 0.42);
}

.tag--amber {
  color: var(--amber);
  background: rgba(255, 194, 75, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 194, 75, 0.42);
}

.tag--moss {
  color: #A3C29C;
  background: rgba(110, 139, 106, 0.2);
  box-shadow: inset 0 0 0 1px rgba(110, 139, 106, 0.55);
}

/* ---------- 8. 图片容器 ---------- */
.figure {
  position: relative;
  display: block;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--steel);
  isolation: isolate;
}

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

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 82% 8%, rgba(53, 224, 208, 0.18), transparent 62%),
    radial-gradient(90% 70% at 8% 92%, rgba(255, 90, 43, 0.16), transparent 66%);
}

.figure__media {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.figure__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  max-width: 100%;
  padding: 8px 14px;
  background: rgba(6, 19, 33, 0.78);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

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

/* ---------- 9. 面包屑 ---------- */
.crumbs { padding-block: 20px 0; }

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

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

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

.crumbs__link {
  color: var(--ink-3);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

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

.crumbs__sep {
  color: var(--rock);
}

/* ---------- 10. 头部轨道 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 400;
  padding: 12px 20px;
  background: var(--cyan);
  color: #04222a;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  transform: translateY(-260%);
  transition: transform 200ms var(--ease);
}

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

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  z-index: 120;
  display: flex;
  background: linear-gradient(
    180deg,
    rgba(6, 19, 33, 0.08) 0%,
    rgba(6, 19, 33, 0.58) 55%,
    rgba(6, 19, 33, 0.88) 100%
  );
  border-right: 1px solid rgba(58, 71, 83, 0.55);
  transition: width 240ms var(--ease), background 240ms var(--ease),
    border-color 240ms var(--ease);
}

html[data-scrolled] .site-header {
  width: var(--rail-slim);
  background: rgba(11, 34, 51, 0.97);
  border-right-color: var(--line-cyan);
}

.site-header__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 6px 18px;
  overflow-y: auto;
  scrollbar-width: none;
}

.site-header__inner::-webkit-scrollbar { display: none; }

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  text-decoration: none;
  color: var(--paper);
}

.brand__mark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cyan);
  transition: color 200ms var(--ease);
}

.brand__cn {
  writing-mode: vertical-rl;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.28em;
  color: var(--paper);
}

.brand:hover .brand__mark { color: var(--cyan-soft); }

/* 导航 */
.rail-nav {
  width: 100%;
  margin-block: auto;
  padding-inline: 4px;
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.rail-nav__item { display: block; }

.rail-nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 2px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}

.rail-nav__link:hover {
  color: var(--paper);
  background: rgba(53, 224, 208, 0.08);
}

.rail-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--clay);
  transition: color 200ms var(--ease);
}

.rail-nav__label {
  writing-mode: vertical-rl;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.2em;
}

.rail-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(53, 224, 208, 0.1);
}

.rail-nav__link[aria-current="page"] .rail-nav__idx { color: var(--cyan); }

.rail-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 26px;
  transform: translateY(-50%);
  background: var(--cyan);
}

/* 轨道底部 */
.rail-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  flex: 0 0 auto;
}

.rail-foot__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 194, 75, 0.3);
  transition: color 200ms var(--ease), background-color 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.rail-foot__link:hover {
  color: var(--deep);
  background: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
}

.rail-foot__hint {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* 检索触发 */
.search-trigger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--cyan);
  background: rgba(53, 224, 208, 0.08);
  box-shadow: inset 0 0 0 1px rgba(53, 224, 208, 0.35);
  flex: 0 0 auto;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.search-trigger:hover {
  background: rgba(53, 224, 208, 0.2);
  color: var(--cyan-soft);
}

.search-trigger__icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.search-trigger__icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 7px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-trigger__text {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.14em;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(58, 71, 83, 0.9);
  flex: 0 0 auto;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

.nav-toggle__text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

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

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

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

/* 阅读进度 */
.rail-progress {
  position: absolute;
  top: 0;
  right: -1px;
  width: 2px;
  height: 100%;
  background: rgba(58, 71, 83, 0.4);
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
  --p: 0;
}

.rail-progress__bar {
  display: block;
  width: 100%;
  height: calc(var(--p, 0) * 100%);
  background: linear-gradient(180deg, var(--cyan), var(--amber));
}

/* ---------- 11. 检索浮层 ---------- */
.search {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 8vh, 96px) 16px;
}

.search__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 20, 0.84);
}

.search__panel {
  position: relative;
  width: min(560px, 100%);
  padding: 22px clamp(16px, 4vw, 28px) 10px;
  background: var(--steel);
  box-shadow: inset 0 0 0 1px rgba(53, 224, 208, 0.32), 0 30px 60px -30px #000;
  clip-path: polygon(
    16px 0,
    100% 0,
    100% calc(100% - 16px),
    calc(100% - 16px) 100%,
    0 100%,
    0 16px
  );
  animation: search-in 200ms var(--ease) both;
}

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

.search__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.search__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-2);
  transition: color 200ms var(--ease);
}

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

.search__label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-3);
}

.search__input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  background: rgba(6, 19, 33, 0.92);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 0;
  outline-offset: 2px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.search__input:focus {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.search__hint {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.search__list {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  max-height: 46vh;
  overflow-y: auto;
}

.search__item {
  border-top: 1px solid rgba(58, 71, 83, 0.5);
}

.search__link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 10px 6px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.search__link:hover,
.search__link:focus-visible {
  color: var(--cyan);
  background: rgba(53, 224, 208, 0.08);
}

.search__link-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--clay);
}

.search__link-text {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.search__empty {
  padding: 18px 6px;
  font-size: 14px;
  color: var(--ink-3);
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  background: linear-gradient(
    180deg,
    rgba(11, 34, 51, 0) 0%,
    rgba(11, 34, 51, 0.88) 38%,
    rgba(8, 24, 38, 0.96) 100%
  );
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(320px, 62%);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr 1.3fr;
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
  padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 44px);
}

.footer-brand__mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.footer-brand__domain {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.footer-brand__line {
  margin-top: 16px;
  max-width: 20ch;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
}

.footer-col__title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}

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

.footer-col__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.footer-col__link:hover { color: var(--cyan); }

.footer-contact__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  line-height: 1.7;
}

.footer-contact__row dt {
  flex: 0 0 44px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--clay);
}

.footer-contact__row dd {
  margin: 0;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-contact__note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-3);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 16px 30px;
  border-top: 1px solid rgba(58, 71, 83, 0.5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.site-footer__copy { max-width: none; }

.site-footer__icp {
  color: var(--moss);
  max-width: none;
}

/* ---------- 13. 入场显现（由 JS 打开开关） ---------- */
html[data-motion] [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

html[data-motion] [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 平板与移动端 ---------- */
@media (max-width: 1023px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  body {
    padding-top: var(--topbar-h);
    padding-left: 0;
  }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: var(--topbar-h);
    border-right: 0;
    border-bottom: 1px solid rgba(58, 71, 83, 0.7);
    background: rgba(6, 19, 33, 0.92);
  }

  html[data-scrolled] .site-header {
    width: auto;
    background: rgba(11, 34, 51, 0.98);
    border-right: 0;
    border-bottom-color: var(--line-cyan);
  }

  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    overflow: visible;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
  }

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

  .rail-nav {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    width: auto;
    margin: 0;
    padding: 10px 14px 22px;
    background: var(--steel);
    border-bottom: 1px solid var(--line-cyan);
    max-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    box-shadow: 0 26px 44px -26px #000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 200ms var(--ease), transform 200ms var(--ease),
      visibility 200ms var(--ease);
  }

  .rail-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .rail-nav__list { gap: 0; }

  .rail-nav__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 8px;
    border-bottom: 1px solid rgba(58, 71, 83, 0.45);
  }

  .rail-nav__label {
    writing-mode: horizontal-tb;
    font-size: 15px;
    letter-spacing: 0.06em;
  }

  .rail-nav__idx { font-size: 11px; }

  .rail-nav__link[aria-current="page"]::after {
    left: auto;
    right: 10px;
    top: 50%;
    width: 2px;
    height: 22px;
  }

  .rail-foot { display: none; }

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

  .search-trigger {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 130;
    flex-direction: row;
    gap: 8px;
    width: auto;
    min-width: 44px;
    padding: 12px 16px;
    background: var(--steel);
    box-shadow: inset 0 0 0 1px rgba(53, 224, 208, 0.55), 0 18px 30px -16px #000;
    clip-path: polygon(
      10px 0,
      100% 0,
      100% calc(100% - 10px),
      calc(100% - 10px) 100%,
      0 100%,
      0 10px
    );
  }

  .search-trigger__text { font-size: 11px; }

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

  .rail-progress__bar {
    width: calc(var(--p, 0) * 100%);
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--amber));
  }

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

@media (max-width: 639px) {
  body { font-size: 15px; }

  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }

  .site-footer__base { flex-direction: column; align-items: flex-start; }

  .figure { aspect-ratio: 4 / 3; }
  .figure--wide { aspect-ratio: 16 / 9; }

  .search__panel { padding-inline: 14px; }
}

/* ---------- 15. 动效降级 ---------- */
@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[data-motion] [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .skip-link { transform: none; }
}
