/* =========================================================
   亚星赛场 · 共享样式 /assets/site.css
   结构：reset → 变量 → 基础排版 → 工具 → 按钮 → 头部
        → 页脚 → 区块与栅格 → 组件 → 图片容器 → 动效 → 响应式
   ========================================================= */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 128px; }
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { 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; }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* ---------- 变量 ---------- */
:root {
  --ink-950: #050C1A;
  --ink-900: #0A1730;
  --ink-800: #12244A;
  --ink-700: #1E3563;
  --slate-400: #6E86B8;
  --mist-100: #D7E0F2;
  --paper-050: #F2F5FA;
  --neon-400: #3DF29B;
  --clay-600: #B4472B;
  --amber-300: #E8B36A;

  --paper-ink: #16233C;
  --paper-head: #08132B;
  --paper-line: #C6D2E6;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;

  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-17: 1.0625rem;
  --fs-22: 1.375rem;
  --fs-28: 1.75rem;
  --fs-34: 2.125rem;
  --fs-48: 3rem;
  --fs-72: 4.5rem;

  --gutter: clamp(20px, 6vw, 88px);
  --rule: 2px solid var(--ink-700);
  --shadow-hard: 6px 6px 0 0 var(--ink-700);
  --speed: 0.18s;
}

/* ---------- 基础排版 ---------- */
body {
  background: var(--ink-950);
  color: var(--mist-100);
  font-family: var(--font-sans);
  font-size: var(--fs-17);
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #fff; }
p { max-width: 72ch; }
::selection { background: var(--neon-400); color: var(--ink-950); }
:focus-visible { outline: 2px solid var(--neon-400); outline-offset: 3px; }

.t-display { font-size: clamp(2.5rem, 6.4vw, var(--fs-72)); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: #fff; }
.t-h1 { font-size: clamp(2rem, 4.2vw, var(--fs-48)); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; color: #fff; }
.t-h2 { font-size: clamp(1.625rem, 2.8vw, var(--fs-34)); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #fff; }
.t-h3 { font-size: var(--fs-22); font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.t-lede { font-size: clamp(1.0625rem, 1.4vw, var(--fs-22)); line-height: 1.7; color: var(--slate-400); max-width: 46ch; }
.t-note { font-size: var(--fs-14); line-height: 1.8; color: var(--slate-400); }
.t-index {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: var(--slate-400);
  font-variant-numeric: tabular-nums;
}
.prose { max-width: 66ch; font-size: var(--fs-17); line-height: 1.75; }
.prose p + p { margin-top: 1em; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.8em; margin-bottom: 0.5em; }
.prose ul, .prose ol { margin-top: 1em; padding-left: 1.2em; list-style: square; }
.prose li + li { margin-top: 0.4em; }

/* ---------- 工具 ---------- */
.shell {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--neon-400);
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  padding: 12px 20px;
  border: 2px solid var(--ink-950);
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid var(--ink-700);
  background: var(--ink-800);
  color: var(--mist-100);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 4px 4px 0 0 var(--ink-700);
  transition: transform var(--speed) ease, box-shadow var(--speed) ease,
              background var(--speed) ease, color var(--speed) ease, border-color var(--speed) ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 var(--ink-700); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--ink-700); }
.btn--accent {
  background: var(--neon-400);
  border-color: var(--neon-400);
  color: var(--ink-950);
  box-shadow: 4px 4px 0 0 var(--clay-600);
}
.btn--accent:hover { box-shadow: 6px 6px 0 0 var(--clay-600); }
.btn--accent:active { box-shadow: 0 0 0 0 var(--clay-600); }
.btn--ghost { background: transparent; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink-950);
  border-bottom: var(--rule);
  transition: box-shadow var(--speed) ease, border-color var(--speed) ease;
}
.site-header[data-scrolled="true"] {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  border-bottom-color: var(--ink-800);
}

.sync-bar { background: var(--ink-900); border-bottom: 1px solid var(--ink-700); }
.sync-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.sync-bar__pulse {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--neon-400);
  animation: sync-pulse 2.6s ease-out infinite;
}
@keyframes sync-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 242, 155, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(61, 242, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 242, 155, 0); }
}
.sync-bar__label { color: var(--slate-400); }
.sync-bar__time { color: var(--neon-400); font-weight: 700; font-variant-numeric: tabular-nums; }
.sync-bar__note { margin-left: auto; color: var(--slate-400); opacity: 0.85; }

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  min-height: 76px;
  padding-block: 14px;
}

.brand { display: grid; gap: 2px; flex: none; }
.brand__mark {
  font-size: clamp(20px, 2.1vw, 25px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  transition: color var(--speed) ease;
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
  transition: color var(--speed) ease;
}
.brand:hover .brand__mark { color: var(--neon-400); }
.brand:hover .brand__tag { color: var(--mist-100); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--ink-700);
  background: var(--ink-800);
  color: var(--mist-100);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color var(--speed) ease, color var(--speed) ease;
}
.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle__bars i {
  display: block;
  height: 2px;
  width: 18px;
  background: currentColor;
  transition: transform var(--speed) ease, opacity var(--speed) ease;
}
.nav-toggle__text { white-space: nowrap; }
.nav-toggle[aria-expanded="true"] { border-color: var(--neon-400); color: var(--neon-400); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 26px); }
.site-nav__list { display: flex; align-items: center; }
.site-nav__item { display: flex; }
.site-nav__item + .site-nav__item { border-left: 1px solid var(--ink-700); }
.site-nav__link {
  display: grid;
  grid-template-rows: 14px auto;
  gap: 2px;
  padding: 6px clamp(10px, 1.1vw, 18px);
  color: var(--mist-100);
  transition: color var(--speed) ease;
}
.site-nav__code {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 14px;
  letter-spacing: 0.14em;
  color: var(--neon-400);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--speed) ease, transform var(--speed) ease;
}
.site-nav__label {
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.4;
  position: relative;
}
.site-nav__link:hover, .site-nav__link:focus-visible { color: var(--neon-400); }
.site-nav__link:hover .site-nav__code,
.site-nav__link:focus-visible .site-nav__code { opacity: 1; transform: none; }
.site-nav__link[aria-current="page"] { color: var(--neon-400); }
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--clay-600);
}
.nav-cta { flex: none; padding: 11px 18px; white-space: nowrap; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink-900);
  border-top: var(--rule);
  padding-top: clamp(48px, 6vw, 80px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: clamp(24px, 3.2vw, 56px);
}
.footer-col { min-width: 0; }
.footer-brand { font-size: clamp(20px, 2vw, 24px); font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.footer-line { margin-top: 12px; max-width: 34ch; font-size: var(--fs-14); line-height: 1.85; color: var(--slate-400); }
.footer-meta {
  margin-top: 18px;
  padding-left: 10px;
  border-left: 2px solid var(--clay-600);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--mist-100);
}
.footer-title {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.footer-list { display: grid; gap: 10px; }
.footer-list a {
  display: inline-block;
  font-size: var(--fs-14);
  color: var(--mist-100);
  border-bottom: 1px solid transparent;
  transition: color var(--speed) ease, border-color var(--speed) ease;
}
.footer-list a:hover { color: var(--neon-400); border-bottom-color: var(--neon-400); }
.footer-list--contact li {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  letter-spacing: 0.02em;
  color: var(--mist-100);
  word-break: break-all;
}
.footer-list__label {
  display: block;
  margin-bottom: 2px;
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.footer-icp {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.footer-base {
  margin-top: clamp(36px, 5vw, 64px);
  padding-block: 20px;
  border-top: 1px solid var(--ink-700);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  color: var(--slate-400);
}

/* ---------- 区块与栅格 ---------- */
.section { padding-block: clamp(56px, 8vw, 120px); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }
.section--ink { background: var(--ink-900); }
.section--paper { background: var(--paper-050); color: var(--paper-ink); }
.section--paper :is(h1, h2, h3, h4) { color: var(--paper-head); }
.section--paper .t-h1, .section--paper .t-h2, .section--paper .t-h3, .section--paper .t-display { color: var(--paper-head); }
.section--paper .t-lede, .section--paper .t-note { color: #55658A; }
.section--paper .t-index, .section--paper .mono { color: #55658A; }
.section--paper .rail { border-left-color: var(--paper-line); }
.section--paper .card {
  background: #fff;
  border-color: var(--paper-line);
  color: var(--paper-ink);
  box-shadow: 6px 6px 0 0 var(--paper-line);
}
.section--paper .card:hover { box-shadow: 9px 9px 0 0 var(--paper-line); border-color: var(--ink-700); }
.section--paper .card__title, .section--paper .card :is(h2, h3, h4) { color: var(--paper-head); }
.section--paper .card__meta { color: #55658A; }
.section--paper .fold { background: #fff; border-color: var(--paper-line); }
.section--paper .fold__body { border-top-color: var(--paper-line); color: var(--paper-ink); }
.section--paper .table-wrap { background: #fff; border-color: var(--paper-line); }
.section--paper .status-table th, .section--paper .status-table td { border-bottom-color: var(--paper-line); }
.section--paper .status-table thead th { background: #E4EBF7; color: #55658A; }
.section--paper .status-table td { color: var(--paper-ink); }
.section--paper .anchor-scale { border-bottom-color: var(--paper-line); }
.section--paper .anchor-scale__tick { border-left-color: var(--paper-line); color: #55658A; }
.section--paper .anchor-scale__tick--anchor { color: var(--paper-head); }
.section--paper .media { border-color: var(--paper-line); }

.section-head { margin-bottom: clamp(28px, 3.4vw, 52px); }
.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.section-kicker::before { content: ""; width: 28px; height: 2px; background: var(--clay-600); flex: none; }
.section-title { font-size: clamp(1.625rem, 2.8vw, var(--fs-34)); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.section-lead { margin-top: 14px; max-width: 46ch; font-size: var(--fs-17); line-height: 1.8; color: var(--slate-400); }

.grid { display: grid; grid-template-columns: 1fr; gap: clamp(24px, 3vw, 48px); }
@media (min-width: 900px) {
  .grid--7-5 { grid-template-columns: 7fr 5fr; }
  .grid--5-7 { grid-template-columns: 5fr 7fr; }
  .grid--8-4 { grid-template-columns: 8fr 4fr; }
  .grid--4-8 { grid-template-columns: 4fr 8fr; }
}
.rail { border-left: var(--rule); padding-left: clamp(16px, 2vw, 28px); }
.rail__note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  line-height: 1.9;
  color: var(--slate-400);
}

/* ---------- 卡片与数值 ---------- */
.card {
  background: var(--ink-800);
  border: var(--rule);
  padding: clamp(20px, 2.4vw, 32px);
  box-shadow: var(--shadow-hard);
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, border-color var(--speed) ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 0 var(--ink-700); border-color: var(--slate-400); }
.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.card__title { font-size: var(--fs-22); font-weight: 700; letter-spacing: -0.01em; }
.card__body { font-size: var(--fs-14); line-height: 1.85; color: var(--slate-400); }
.card__meta {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
  font-variant-numeric: tabular-nums;
}

.scoreline { display: flex; align-items: baseline; gap: 14px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.scoreline__num { font-size: clamp(2rem, 4.4vw, var(--fs-48)); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--neon-400); }
.scoreline__vs { font-size: var(--fs-14); letter-spacing: 0.12em; color: var(--slate-400); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 2px solid currentColor;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  line-height: 1.5;
  white-space: nowrap;
}
.badge--live { color: var(--neon-400); }
.badge--warn { color: var(--amber-300); }
.badge--calm { color: var(--slate-400); }
.badge--clay { background: var(--clay-600); border-color: var(--clay-600); color: var(--paper-050); }

/* ---------- 筛选与刻度 ---------- */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px;
  border: 2px solid var(--ink-700);
  background: transparent;
  color: var(--slate-400);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  line-height: 1.4;
  cursor: pointer;
  transition: color var(--speed) ease, border-color var(--speed) ease, background var(--speed) ease;
}
.chip:hover { color: var(--mist-100); border-color: var(--slate-400); }
.chip[aria-pressed="true"] { background: var(--neon-400); border-color: var(--neon-400); color: var(--ink-950); }

.anchor-scale {
  display: flex;
  align-items: flex-end;
  border-bottom: var(--rule);
  overflow-x: auto;
  scrollbar-width: thin;
}
.anchor-scale__tick {
  flex: 1 0 auto;
  min-width: 62px;
  padding: 10px 8px 14px;
  border-left: 2px solid var(--ink-700);
  border-top: 4px solid transparent;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
  font-variant-numeric: tabular-nums;
}
.anchor-scale__tick--anchor { border-top-color: var(--clay-600); color: var(--mist-100); }

/* ---------- 折叠面板与表格 ---------- */
.fold-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.fold { border: var(--rule); background: var(--ink-900); margin-bottom: -2px; }
.fold__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--mist-100);
  list-style: none;
}
.fold__summary::after {
  content: "＋";
  flex: none;
  font-family: var(--font-mono);
  color: var(--neon-400);
}
.fold[open] > .fold__summary::after { content: "－"; }
.fold__body {
  padding: 0 20px 20px;
  border-top: 2px solid var(--ink-700);
  max-width: 66ch;
  font-size: var(--fs-14);
  line-height: 1.85;
  color: var(--mist-100);
}

.table-wrap { border: var(--rule); background: var(--ink-900); overflow-x: auto; }
.status-table { width: 100%; min-width: 560px; font-size: var(--fs-14); }
.status-table th, .status-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--ink-700);
  vertical-align: middle;
}
.status-table thead th {
  background: var(--ink-800);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.status-table tbody tr:last-child td { border-bottom: 0; }
.status-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.status-table tr[hidden] { display: none; }

/* ---------- 图片容器 ---------- */
.media {
  position: relative;
  border: var(--rule);
  background: var(--ink-800);
  overflow: hidden;
}
.media__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--ink-800);
  background-image:
    linear-gradient(to right, rgba(110, 134, 184, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(110, 134, 184, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
}
.media__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom right,
    transparent calc(50% - 1px),
    rgba(61, 242, 155, 0.45) 50%,
    transparent calc(50% + 1px));
}
.media__frame img { width: 100%; height: 100%; object-fit: cover; }
.media__cap {
  padding: 10px 14px;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.media--wide .media__frame { aspect-ratio: 21 / 9; }
.media--tall .media__frame { aspect-ratio: 4 / 5; }
.section--paper .media__cap { border-top-color: var(--paper-line); color: #55658A; }

/* ---------- 页头与面包屑 ---------- */
.page-head { padding-block: clamp(40px, 6vw, 88px); border-bottom: var(--rule); }
.breadcrumb {
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  color: var(--slate-400);
}
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.breadcrumb__item + .breadcrumb__item::before { content: "/"; margin-right: 10px; color: var(--ink-700); }
.breadcrumb__item a:hover { color: var(--neon-400); }

/* ---------- 动效与回到顶部 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-reveal].is-in { opacity: 1; transform: none; }

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 70;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--ink-800);
  border: var(--rule);
  color: var(--neon-400);
  font-family: var(--font-mono);
  font-size: var(--fs-17);
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--speed) ease, transform var(--speed) ease, visibility var(--speed) ease;
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 28px;
    background: var(--ink-900);
    border-bottom: var(--rule);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  }
  .site-nav[data-open] { display: flex; }
  .site-nav__list { flex-direction: column; align-items: stretch; }
  .site-nav__item + .site-nav__item { border-left: 0; border-top: 1px solid var(--ink-700); }
  .site-nav__link {
    grid-template-rows: auto;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 4px;
  }
  .site-nav__code { opacity: 1; transform: none; line-height: 1.6; }
  .site-nav__label { font-size: var(--fs-17); }
  .site-nav__link[aria-current="page"]::after { left: 4px; width: 26px; bottom: 8px; }
  .nav-cta { margin-top: 20px; width: 100%; }
  .sync-bar__note { display: none; }
}

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: var(--fs-17); }
  .header-shell { min-height: 64px; padding-block: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col--brand { grid-column: auto; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .to-top { width: 44px; height: 44px; }
  .rail { border-left: 0; padding-left: 0; border-top: var(--rule); padding-top: 16px; }
}

@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .sync-bar__pulse { animation: none; }
}
