/* =========================================================
   乐鱼赛事 · 共享样式表 /assets/site.css
   结构：变量 → reset → 排版 → 头部轨道 → 移动顶栏 → 页脚
        → 通用组件 → 响应式 → 动效降级
   ========================================================= */

/* ---------- 1. 变量 ---------- */
:root {
  --abyss-950: #040D1A;
  --abyss-800: #0A1F38;
  --abyss-600: #123A63;
  --line-700: #1E4569;
  --cyan-400: #35F0DA;
  --cyan-600: #0FB9A8;
  --coral-500: #FF6B4A;
  --coral-300: #FFA48C;
  --ink-100: #E8F1F8;
  --ink-300: #A9BED2;
  --paper-50: #F4F7FB;
  --paper-ink-900: #0B1A2B;

  --rail-w: 96px;
  --ticker-h: 40px;
  --bar-h: 56px;

  --shell-max: 1280px;
  --gutter: clamp(18px, 4vw, 56px);
  --cut: 18px;

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);

  --grid:
    repeating-linear-gradient(90deg, rgba(53, 240, 218, .055) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, rgba(53, 240, 218, .045) 0 1px, transparent 1px 40px);
}

/* ---------- 2. reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

html[data-nav-lock] { overflow: hidden; }

html[data-reveal="on"] { scroll-padding-top: calc(var(--bar-h) + 16px); }

body {
  margin: 0;
  padding-top: var(--bar-h);
  background: var(--abyss-950);
  color: var(--ink-100);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

a { color: var(--cyan-400); text-decoration-thickness: 1px; text-underline-offset: 3px; }

[hidden] { display: none !important; }

::selection {
  background: var(--cyan-400);
  color: var(--abyss-950);
}

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

/* ---------- 3. 排版 ---------- */
h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--ink-100);
}

h1 { font-size: clamp(34px, 6vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(25px, 3.6vw, 42px); }
h3 { font-size: clamp(19px, 2.4vw, 26px); }
h4 { font-size: clamp(16px, 1.8vw, 19px); }

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

/* ---------- 4. 跳至主要内容 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 20px;
  background: var(--cyan-400);
  color: var(--abyss-950);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

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

/* ---------- 5. 赛事跑马灯 ---------- */
.ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ticker-h);
  z-index: 80;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background:
    linear-gradient(90deg, var(--abyss-600) 0%, var(--abyss-800) 42%, var(--abyss-950) 100%);
  border-bottom: 1px solid var(--line-700);
}

.ticker__flag {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--coral-500);
  color: var(--abyss-950);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

.ticker__viewport {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  list-style: none;
  animation: ticker-run 46s linear infinite;
  will-change: transform;
}

.ticker__item {
  display: flex;
  align-items: center;
  padding-right: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--ink-300);
  white-space: nowrap;
}

.ticker__item::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  margin-left: 22px;
  background: var(--cyan-600);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.ticker__cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-left: 1px solid var(--line-700);
  color: var(--cyan-400);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.ticker__cta:hover { background: var(--cyan-400); color: var(--abyss-950); }

.ticker:hover .ticker__track { animation-play-state: paused; }

@keyframes ticker-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 6. 移动顶栏 ---------- */
.mobilebar { display: none; }

.mobilebar__brand {
  color: var(--ink-100);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .05em;
  text-decoration: none;
  white-space: nowrap;
}

.mobilebar__brand::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--cyan-400);
  transform: translateY(-2px) rotate(45deg);
}

.mobilebar__badge {
  padding: 3px 7px;
  border: 1px solid var(--line-700);
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

.navtoggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  margin-left: auto;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--line-700);
  color: var(--ink-100);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.navtoggle:hover { border-color: var(--cyan-600); color: var(--cyan-400); }

.navtoggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--cyan-400);
  transition: background .18s var(--ease);
}

.navtoggle__bars::before,
.navtoggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--cyan-400);
  transition: transform .22s var(--ease), top .22s var(--ease);
}

.navtoggle__bars::before { top: -5px; }
.navtoggle__bars::after { top: 5px; }

.navtoggle[aria-expanded="true"] .navtoggle__bars { background: transparent; }
.navtoggle[aria-expanded="true"] .navtoggle__bars::before { top: 0; transform: rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- 7. 侧边轨道导航 ---------- */
.rail {
  position: fixed;
  top: var(--ticker-h);
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: linear-gradient(180deg, var(--abyss-800) 0%, var(--abyss-950) 72%);
  border-right: 1px solid rgba(53, 240, 218, .22);
}

.rail::-webkit-scrollbar { display: none; }

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--line-700);
  text-decoration: none;
}

.rail__word {
  writing-mode: vertical-rl;
  color: var(--cyan-400);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .3em;
  line-height: 1.1;
}

.rail__sub {
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .24em;
}

.rail__hint {
  width: 46px;
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .22em;
  text-align: center;
}

.rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  list-style: none;
}

.rail__item { width: 100%; }

.rail__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 9px 2px;
  color: var(--ink-300);
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.rail__num {
  color: rgba(169, 190, 210, .45);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .08em;
  transition: color .18s var(--ease);
}

.rail__label {
  writing-mode: vertical-rl;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1;
}

.rail__link:hover { background: rgba(53, 240, 218, .1); color: var(--ink-100); }
.rail__link:hover .rail__num { color: var(--cyan-400); }

.rail__link[aria-current="page"] {
  background: var(--cyan-400);
  color: var(--abyss-950);
}

.rail__link[aria-current="page"] .rail__num { color: rgba(4, 13, 26, .55); }

.rail__badge {
  width: 100%;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-700);
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.7;
  letter-spacing: .1em;
  text-align: center;
}

/* 抽屉遮罩（仅移动端可见） */
.rail-scrim { display: none; }

/* ---------- 8. 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: var(--ticker-h);
  left: var(--rail-w);
  right: 0;
  height: 2px;
  z-index: 95;
  pointer-events: none;
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan-600), var(--cyan-400) 62%, var(--coral-500));
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  padding: clamp(56px, 7vw, 84px) var(--gutter) 26px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--abyss-800) 0%, var(--abyss-950) 58%);
  clip-path: polygon(0 34px, 100% 0, 100% 100%, 0 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grid);
  opacity: .55;
  pointer-events: none;
}

.footer__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr 1.3fr;
  gap: clamp(22px, 3vw, 46px);
  max-width: var(--shell-max);
  margin: 0 auto;
}

.footer__logo {
  color: var(--ink-100);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.1;
}

.footer__logo::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 12px;
  background: var(--cyan-400);
  transform: skewX(-26deg);
}

.footer__tag {
  margin-top: 14px;
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
}

.footer__desc {
  max-width: 30ch;
  margin-top: 10px;
  color: var(--ink-300);
  font-size: 14px;
  line-height: 1.75;
}

.footer__brand .btn { margin-top: 18px; }

.footer__title {
  margin-bottom: 14px;
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: none;
}

.footer__list a {
  color: var(--ink-100);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer__list a:hover {
  color: var(--cyan-400);
  border-bottom-color: var(--cyan-600);
}

.footer__list--plain li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink-100);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

.footer__list--plain li span {
  color: var(--ink-300);
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: .2em;
}

.footer__note {
  margin-top: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--line-700);
  color: var(--ink-300);
  font-size: 12px;
  line-height: 1.7;
}

.footer__legal {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  max-width: var(--shell-max);
  margin: clamp(30px, 4vw, 46px) auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-700);
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
}

.footer__legal a {
  color: var(--ink-300);
  text-decoration: none;
  border-bottom: 1px solid var(--line-700);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

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

.footer__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__icp { margin-left: auto; color: var(--ink-100); }

/* ---------- 10. 布局容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: clamp(40px, 6vw, 88px) 0;
}

.section--paper {
  background: var(--paper-50);
  color: var(--paper-ink-900);
}

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--paper-ink-900); }

.section--paper a { color: var(--cyan-600); }

.section--paper .eyebrow { color: var(--cyan-600); }
.section--paper .panel { background: #fff; border-color: #CFDCE8; color: var(--paper-ink-900); }
.section--paper .stat { background: #fff; border-color: #CFDCE8; }
.section--paper .stat__num { color: var(--cyan-600); }
.section--paper .stat--accent .stat__num { color: var(--coral-500); }
.section--paper .stat__label { color: #4A6區; }
.section--paper .stat__label { color: #4A6478; }
.section--paper .filter-btn { color: #4A6478; border-color: #CFDCE8; }
.section--paper .filter-btn:hover { color: var(--paper-ink-900); border-color: var(--cyan-600); }
.section--paper .filter-btn[aria-pressed="true"] { background: var(--cyan-600); border-color: var(--cyan-600); color: #041018; }
.section--paper .tag { color: var(--cyan-600); background: rgba(15, 185, 168, .1); border-color: rgba(15, 185, 168, .45); }
.section--paper .side-note { color: #5C7near; }
.section--paper .side-note { color: #5C7488; }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

/* ---------- 11. 通用组件 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--abyss-800);
  border: 1px solid var(--line-700);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}

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

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
  transform: skewX(-32deg);
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 0;
  background: transparent;
  color: var(--ink-100);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}

.btn::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 13px;
  transition: transform .18s var(--ease);
}

.btn:hover::after { transform: translateX(4px); }

.btn--solid { background: var(--cyan-400); color: var(--abyss-950); }
.btn--solid:hover { background: var(--cyan-600); }

.btn--ghost {
  color: var(--cyan-400);
  box-shadow: inset 0 0 0 1px var(--line-700);
}
.btn--ghost:hover {
  background: rgba(53, 240, 218, .1);
  box-shadow: inset 0 0 0 1px var(--cyan-400);
}

.btn--coral { background: var(--coral-500); color: var(--abyss-950); }
.btn--coral:hover { background: var(--coral-300); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--abyss-800);
  border: 1px solid var(--line-700);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

.stat__num {
  display: block;
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}

.stat--accent .stat__num { color: var(--coral-500); }

.stat__unit {
  margin-left: 4px;
  color: var(--ink-300);
  font-size: .4em;
  letter-spacing: .04em;
}

.stat__label {
  display: block;
  margin-top: 10px;
  color: var(--ink-300);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: .06em;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid rgba(53, 240, 218, .34);
  background: rgba(53, 240, 218, .1);
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
}

.tag--coral {
  border-color: rgba(255, 107, 74, .42);
  background: rgba(255, 107, 74, .13);
  color: var(--coral-300);
}

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

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--line-700);
  background: transparent;
  color: var(--ink-300);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}

.filter-btn:hover { color: var(--ink-100); border-color: var(--cyan-600); }

.filter-btn[aria-pressed="true"] {
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  color: var(--abyss-950);
}

.media {
  position: relative;
  overflow: hidden;
  background: var(--abyss-600);
  border: 1px solid var(--line-700);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--grid);
  pointer-events: none;
}

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

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

.side-note {
  writing-mode: vertical-rl;
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .3em;
  line-height: 1;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
}

.crumbs a { color: var(--ink-300); text-decoration: none; }
.crumbs a:hover { color: var(--cyan-400); }
.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-700);
}

.index-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  border-top: 1px solid var(--line-700);
}

.index-list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line-700);
}

.prose {
  max-width: 38rem;
  font-size: 16.5px;
  line-height: 1.8;
}

.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; color: var(--cyan-400); }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .5em; }
.prose strong { color: var(--cyan-400); font-weight: 800; }
.section--paper .prose h2,
.section--paper .prose strong { color: var(--cyan-600); }

.reveal { will-change: opacity, transform; }

html[data-reveal="on"] .reveal {
  opacity: 0;
  transform: translateY(12px);
}

html[data-reveal="on"] .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .34s var(--ease), transform .34s var(--ease);
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 92;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-700);
  background: var(--abyss-600);
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: opacity .22s var(--ease), transform .22s var(--ease), background .18s var(--ease);
}

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

.to-top:hover { background: var(--abyss-800); }

/* ---------- 12. 响应式 ---------- */
@media (min-width: 901px) {
  body {
    padding-top: var(--ticker-h);
    padding-left: var(--rail-w);
  }
}

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

  .mobilebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--bar-h);
    padding: 0 14px;
    background: rgba(4, 13, 26, .93);
    border-bottom: 1px solid var(--line-700);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .ticker {
    position: static;
    height: 34px;
    z-index: auto;
  }

  .ticker__flag { padding: 0 10px; font-size: 10px; letter-spacing: .14em; }
  .ticker__item { font-size: 11px; padding-right: 16px; }
  .ticker__item::after { margin-left: 16px; }
  .ticker__cta { display: none; }

  .rail {
    top: var(--bar-h);
    bottom: 0;
    width: min(310px, 84vw);
    align-items: stretch;
    gap: 10px;
    padding: 18px 16px 24px;
    background: var(--abyss-800);
    box-shadow: 24px 0 60px rgba(0, 0, 0, .55);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s var(--ease);
  }

  .rail[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  .rail__brand {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 0 0 14px;
  }

  .rail__word { writing-mode: horizontal-tb; font-size: 21px; letter-spacing: .08em; }
  .rail__sub { font-size: 10px; }
  .rail__hint { display: none; }
  .rail__list { gap: 2px; }

  .rail__link {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  }

  .rail__label { writing-mode: horizontal-tb; font-size: 16px; letter-spacing: .04em; }
  .rail__num { font-size: 11px; color: var(--cyan-600); }
  .rail__link[aria-current="page"] .rail__num { color: rgba(4, 13, 26, .55); }

  .rail__badge {
    margin-top: auto;
    padding: 14px 0 0 12px;
    text-align: left;
    border-top: 1px solid var(--line-700);
  }

  .rail-scrim {
    display: block;
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 84;
    border: 0;
    background: rgba(4, 13, 26, .7);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
  }

  .rail-scrim[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
  }

  .scroll-progress { display: none; }

  .site-footer { clip-path: polygon(0 22px, 100% 0, 100% 100%, 0 100%); }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col--contact { grid-column: 1 / -1; }
  .footer__icp { margin-left: 0; }
}

@media (min-width: 841px) {
  .split { grid-template-columns: 62fr 38fr; }
  .split--flip { grid-template-columns: 38fr 62fr; }
}

@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .to-top { right: 12px; bottom: 12px; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---------- 13. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .ticker__track { animation: none; }
  .ticker__viewport { overflow-x: auto; scrollbar-width: none; }
  .ticker__viewport::-webkit-scrollbar { display: none; }

  html[data-reveal="on"] .reveal,
  html[data-reveal="on"] .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rail,
  .rail-scrim,
  .navtoggle__bars,
  .navtoggle__bars::before,
  .navtoggle__bars::after,
  .to-top,
  .btn::after,
  .skip-link { transition: none; }
}
