/* =========================================================
   KAIYUN赛场 · 共享样式表  /assets/site.css
   夜光赛场指挥室 · 技术蓝图网格 · 侧边轨道导航
   ========================================================= */

/* ---------- 01 · 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, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { width: 100%; border-collapse: collapse; }

/* ---------- 02 · Tokens ---------- */
:root {
  --ink: #06110D;
  --carbon: #0B0D0C;
  --paper: #F2EEE6;
  --silver: #A9B4B0;
  --lime: #C6FF3D;
  --orange: #FF6A2B;
  --panel: #12211C;
  --mist: #6F8A80;
  --glow: #E9FFB8;
  --white: #FFFFFF;
  --text: #E4EBE7;

  --line: rgba(169, 180, 176, .18);
  --line-soft: rgba(169, 180, 176, .12);
  --line-strong: rgba(169, 180, 176, .34);

  --font-head: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', 'SFMono-Regular', 'Courier New', monospace;

  --rail-w: 220px;
  --gap: 24px;
}

/* ---------- 03 · 页面底色与蓝图网格 ---------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(169, 180, 176, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 180, 176, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(130% 82% at 78% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(130% 82% at 78% 0%, #000 0%, transparent 72%);
}

#main-content {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: block;
}

/* ---------- 04 · 排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.022em;
  color: var(--white);
}

h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -.036em;
}

h2 {
  font-size: clamp(28px, 3.8vw, 44px);
  letter-spacing: -.03em;
}

h3 {
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.26;
}

h4 {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.42;
}

p { max-width: 74ch; }

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

.mono,
[data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.75;
  color: var(--silver);
  max-width: 62ch;
}

.vlabel {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--mist);
}

.hr {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}

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

.section--paper :focus-visible { outline-color: #0E1A15; }

/* ---------- 05 · 容器与章节 ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 22px;
  position: relative;
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

@media (min-width: 1024px) {
  .container { padding-inline: 48px; }
}

.section {
  position: relative;
  padding-block: clamp(56px, 7vw, 104px);
}

.section--carbon { background: var(--carbon); }
.section--panel { background: var(--panel); }

.section--paper {
  background: var(--paper);
  color: #0E1A15;
}

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: #08120E; }

.section--paper .lede { color: #41544C; }
.section--paper .eyebrow { color: #2C4A3C; }
.section--paper .eyebrow::before { background: #2C4A3C; }

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--lime);
  flex: 0 0 auto;
}

.stack > * + * { margin-top: var(--stack-gap, 16px); }

/* ---------- 06 · 长文排版 ---------- */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose p { color: var(--text); }
.prose a { color: var(--lime); border-bottom: 1px solid rgba(198, 255, 61, .4); }
.prose a:hover { border-bottom-color: var(--lime); }
.prose ul li {
  position: relative;
  padding-left: 22px;
}
.prose ul li + li { margin-top: .5em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 12px;
  height: 1px;
  background: var(--lime);
}
.section--paper .prose p { color: #26382F; }
.section--paper .prose a { color: #0E1A15; border-bottom-color: rgba(14, 26, 21, .4); }
.section--paper .prose ul li::before { background: #0E1A15; }

/* ---------- 07 · 栅格 ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

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

.grid--12 > * { grid-column: span 12; }

@media (min-width: 900px) {
  .span-4 { grid-column: span 4; }
  .span-6 { grid-column: span 6; }
  .span-8 { grid-column: span 8; }
}

/* ---------- 08 · 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.btn--primary {
  background: var(--lime);
  color: #06110D;
  border-color: var(--lime);
}
.btn--primary:hover {
  background: var(--glow);
  border-color: var(--glow);
  box-shadow: 0 0 0 6px rgba(198, 255, 61, .14);
}

.btn--ghost {
  background: transparent;
  color: var(--lime);
  border-color: rgba(198, 255, 61, .5);
}
.btn--ghost:hover {
  border-color: var(--lime);
  background: rgba(198, 255, 61, .08);
}

.btn--orange {
  background: var(--orange);
  color: #1A0800;
  border-color: var(--orange);
}
.btn--orange:hover {
  background: #FF844F;
  border-color: #FF844F;
}

.btn--block { width: 100%; }

/* ---------- 09 · 卡片与数据 ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .2s ease, transform .2s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--lime);
  border-left: 2px solid var(--lime);
  opacity: 0;
  transition: opacity .2s ease;
}

.card:hover { border-color: rgba(198, 255, 61, .45); }
.card:hover::before { opacity: 1; }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mist);
  max-width: none;
}

.card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 20px;
}

.card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  color: var(--white);
  letter-spacing: -.01em;
}

.section--paper .card {
  background: #FFFFFF;
  border-color: rgba(10, 21, 18, .14);
}
.section--paper .card:hover { border-color: rgba(10, 21, 18, .4); }
.section--paper .card__head {
  color: #5A6B63;
  border-bottom-color: rgba(10, 21, 18, .1);
}
.section--paper .card__title { color: #0A1512; }

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

.stat__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--lime);
  text-shadow: 0 0 18px rgba(198, 255, 61, .35);
}

.stat__label {
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--mist);
}

/* ---------- 10 · 标签与筛选 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--silver);
  white-space: nowrap;
}

.tag--lime {
  border-color: rgba(198, 255, 61, .5);
  color: var(--lime);
  background: rgba(198, 255, 61, .08);
}

.tag--orange {
  border-color: rgba(255, 106, 43, .5);
  color: var(--orange);
  background: rgba(255, 106, 43, .08);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.chip:hover {
  color: var(--lime);
  border-color: rgba(198, 255, 61, .6);
}

.chip[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: #06110D;
}

.section--paper .chip { color: #3C4F46; border-color: rgba(10, 21, 18, .2); }
.section--paper .chip:hover { color: #0A1512; border-color: #0A1512; }
.section--paper .chip[aria-pressed="true"] { background: #0A1512; border-color: #0A1512; color: var(--glow); }

/* ---------- 11 · 图片容器（供页面阶段使用） ---------- */
.figure {
  position: relative;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.figure__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--panel);
  background-image:
    radial-gradient(120% 90% at 82% 0%, rgba(198, 255, 61, .16), transparent 62%),
    repeating-linear-gradient(115deg, rgba(169, 180, 176, .1) 0 1px, transparent 1px 9px);
}

.figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--mist);
  max-width: none;
}

.figure__caption b { color: var(--lime); font-weight: 600; }

.figure--wide .figure__media { aspect-ratio: 21 / 9; }
.figure--tall .figure__media { aspect-ratio: 4 / 5; }

@media (min-width: 1024px) {
  .figure--wide .figure__media { aspect-ratio: 24 / 9; }
}

/* ---------- 12 · 面包屑 ---------- */
.breadcrumbs {
  padding-block: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mist);
}

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

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(169, 180, 176, .45);
}

.breadcrumbs a:hover { color: var(--lime); }
.breadcrumbs [aria-current="page"] { color: var(--silver); }

/* ---------- 13 · Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lime);
  color: #06110D;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  transform: translateY(-200%);
  transition: transform .2s ease;
}

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

/* ---------- 14 · 头部：侧边轨道 ---------- */
.site-header {
  position: relative;
  z-index: 60;
}

/* 移动端抽屉面板 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  width: min(88vw, 340px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 22px 28px;
  background: var(--carbon);
  border-right: 1px solid var(--line);
  transform: translateX(-102%);
  transition: transform .42s cubic-bezier(.22, .75, .12, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

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

.site-header[data-open]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(6, 17, 13, .74);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark__glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  background: linear-gradient(160deg, rgba(198, 255, 61, .16), transparent 62%);
}

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

.brand-mark__name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--white);
}

.brand-mark__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mist);
}

.rail__brand {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.rail__caption {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mist);
  max-width: none;
}

.rail__list {
  display: flex;
  flex-direction: column;
}

.rail__link {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 6px;
  border-left: 1px solid var(--line);
  color: var(--silver);
  font-size: 14.5px;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, padding-left .18s ease;
}

.rail__idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--mist);
}

.rail__link:hover {
  color: var(--white);
  border-left-color: var(--lime);
  background: rgba(198, 255, 61, .06);
  padding-left: 12px;
}

.rail__link[aria-current="page"] {
  background: var(--lime);
  border-left-color: var(--lime);
  color: #06110D;
  font-weight: 700;
}

.rail__link[aria-current="page"] .rail__idx { color: #0B1A14; }

.rail__quick {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

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

.rail__quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: rgba(18, 33, 28, .6);
  color: var(--silver);
  font-size: 13.5px;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.rail__quick-link::after {
  content: "\2192";
  font-family: var(--font-mono);
  color: var(--orange);
  transition: transform .18s ease;
}

.rail__quick-link:hover {
  color: var(--white);
  border-color: rgba(255, 106, 43, .55);
  background: rgba(255, 106, 43, .08);
}

.rail__quick-link:hover::after { transform: translateX(3px); }

.rail__cta { margin-top: 2px; }

.rail__note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.85;
  letter-spacing: .06em;
  color: var(--mist);
  max-width: none;
}

/* 移动端触发器 */
.nav-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--carbon);
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: box-shadow .18s ease, background-color .18s ease;
}

.nav-toggle:hover { box-shadow: 0 0 0 6px rgba(198, 255, 61, .12); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color .2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .22s ease;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* 桌面端：轨道固定 */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    z-index: 60;
    display: flex;
    flex-direction: column;
    background: var(--carbon);
    border-right: 1px solid var(--line);
  }

  .rail {
    position: static;
    flex: 1 1 auto;
    width: auto;
    transform: none;
    z-index: auto;
    padding: 24px 18px 20px;
    gap: 18px;
    background: transparent;
    border-right: 0;
    overflow-y: auto;
  }

  .site-header[data-open] .rail { transform: none; }
  .site-header[data-open]::after { display: none; }
  .nav-toggle { display: none; }
}

/* ---------- 15 · 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  background: var(--carbon);
  border-top: 1px solid var(--line);
  padding-block: 54px 26px;
}

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

.site-footer::after {
  content: "GRID 12 / RAIL 220";
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: rgba(169, 180, 176, .28);
}

.footer__top {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .footer__top {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 56px;
  }
}

.footer__tagline {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--silver);
  max-width: 30ch;
}

.footer__stamp {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .04em;
  color: var(--mist);
  max-width: 34ch;
}

.footer__grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
}

.footer__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
  max-width: none;
}

.footer__links {
  display: flex;
  flex-direction: column;
}

.footer__links a {
  position: relative;
  display: inline-block;
  padding-block: 5px;
  color: var(--silver);
  font-size: 14.5px;
  transition: color .18s ease;
}

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: var(--lime);
  transition: width .2s ease;
}

.footer__links a:hover { color: var(--white); }
.footer__links a:hover::after { width: 100%; }

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

.footer__meta li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding-block: 7px;
  border-bottom: 1px solid rgba(169, 180, 176, .1);
}

.footer__k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--mist);
  text-transform: uppercase;
}

.footer__v {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--silver);
}

.footer__copy {
  align-self: center;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--mist);
  transition: color .18s ease, border-color .18s ease;
}

.footer__copy:hover { color: var(--lime); border-color: var(--lime); }
.footer__copy.is-done { color: var(--lime); border-color: var(--lime); }

.footer__bottom {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 900px) {
  .footer__bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
  }
}

.footer__copyline,
.footer__note,
.footer__legal {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  line-height: 1.8;
  color: var(--mist);
  max-width: none;
}

.footer__note { max-width: 62ch; }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer__legal a { color: var(--silver); }
.footer__legal a:hover { color: var(--lime); }

/* ---------- 16 · 进度条与返回顶部 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--orange));
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 75;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--carbon);
  border: 1px solid var(--line-strong);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s, color .18s ease, border-color .18s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { color: var(--lime); border-color: var(--lime); }

@media (min-width: 1024px) {
  .to-top { right: 28px; bottom: 28px; }
}

/* ---------- 17 · 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .52s cubic-bezier(.22, .75, .12, 1);
  will-change: opacity, transform;
}

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

/* ---------- 18 · Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .rail,
  .nav-toggle,
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after,
  .to-top,
  .btn,
  .card,
  .chip,
  .figure,
  .footer__copy {
    transition-duration: .01ms !important;
  }
}
