/* ==========================================================================
   乐竞赛场 · 共享样式 /assets/site.css
   夜场灯光下的数据竞技场
   ========================================================================== */

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

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

body { margin: 0; }

h1, h2, h3, h4, h5, p, figure, blockquote, ol, ul, dl, dd, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* ---------- tokens ---------- */
:root {
  /* 色彩 */
  --ink-0: #0A1220;
  --ink-1: #072019;
  --ink-2: #0E3A2C;
  --ink-3: #1F6B52;
  --lime: #D9FF3C;
  --lime-mist: #F1FFB8;
  --alert: #FF6B3D;
  --fog: #E8F1EB;
  --moss: #8CA79A;
  --line: #1C3B30;
  --paper: #EDF2E9;
  --paper-ink: #0B231B;

  /* 字体 */
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 尺度 */
  --shell: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 64px;
  --gap: clamp(16px, 2.4vw, 32px);
  --block: clamp(48px, 8vw, 112px);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--ink-0);
  background-image:
    radial-gradient(1100px 620px at 82% -8%, rgba(31, 107, 82, .30), transparent 62%),
    radial-gradient(900px 560px at -6% 104%, rgba(7, 32, 25, .95), transparent 72%),
    linear-gradient(178deg, rgba(10, 18, 32, 0) 0%, rgba(7, 32, 25, .55) 100%);
  color: var(--fog);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 12 栏极淡竖向网格，呼应非对称构图 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(28, 59, 48, .55) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: .42;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .2) 58%, transparent 92%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .2) 58%, transparent 92%);
}

main { position: relative; z-index: 1; }

::selection {
  background: var(--lime);
  color: #08170F;
}

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

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

.section { padding-block: var(--block); }

.section__head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(24px, 4vw, 48px);
  max-width: 46em;
}

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(28px, 4vw, 56px);
  background: linear-gradient(90deg, var(--ink-3), rgba(28, 59, 48, .15) 62%, transparent);
}

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

/* ---------- 中文排版 ---------- */
.display {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 6.5rem);
  line-height: .94;
  letter-spacing: -.02em;
  color: var(--fog);
  transform: skewX(-4deg);
  transform-origin: left bottom;
  padding-right: .08em;
}

.lede {
  max-width: 34em;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.75;
  color: var(--moss);
}

.body-text {
  max-width: 34em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--moss);
}

.body-text + .body-text { margin-top: 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .66em;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .32em;
  color: var(--moss);
  text-transform: uppercase;
}

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

.annotation {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  letter-spacing: .32em;
  color: var(--moss);
  opacity: .85;
  padding-block: 6px;
  user-select: none;
}

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  transform: translateY(-120%);
  display: inline-block;
  padding: 12px 20px;
  background: var(--lime);
  color: #08170F;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -4px;
}

/* ---------- 滚动进度 ---------- */
.scroll-meter {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 80;
  pointer-events: none;
  background: transparent;
}

.scroll-meter__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lime), var(--lime-mist));
  box-shadow: 0 0 12px rgba(217, 255, 60, .55);
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #0A1220 0%, #0A1220 54%, #072019 100%);
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: clamp(64px, 16vw, 200px);
  height: 1px;
  background: linear-gradient(90deg, var(--lime), transparent);
}

.header__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  min-height: var(--header-h);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--fog);
}

.brand__mark {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid var(--lime);
  transform: skewX(-12deg);
  transition: border-color .18s ease;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--lime);
  transition: transform .18s var(--ease);
}

.brand:hover .brand__mark::after { transform: scale(.55); }

.brand__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
  transform: skewX(-4deg);
  white-space: nowrap;
}

.brand__ver {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.6;
  padding: 1px 5px;
  color: #08170F;
  background: var(--lime);
}

/* 命令栏导航 */
.cmd-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.cmd-nav__lead { display: none; }

.cmd-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.1vw, 16px);
  flex-wrap: nowrap;
}

.cmd-item { flex: 0 0 auto; }

.cmd-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: .4em;
  padding: 6px 2px 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--moss);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.cmd-no {
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
  color: var(--ink-3);
  transition: color .18s ease;
}

.cmd-label { white-space: nowrap; }

.cmd-link:hover,
.cmd-link:focus-visible { color: var(--fog); }

.cmd-link:hover .cmd-no,
.cmd-link:focus-visible .cmd-no { color: var(--lime); }

.cmd-link[aria-current="page"] { color: var(--lime); }

.cmd-link[aria-current="page"] .cmd-no { color: var(--lime); }

.cmd-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lime);
}

/* 右侧工具区 */
.header__tail {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 16px);
  margin-left: auto;
  flex: 0 0 auto;
}

.sync-lamp {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--moss);
  cursor: default;
  white-space: nowrap;
}

.sync-lamp__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--alert);
  animation: elj-lamp .6s ease-out 2;
}

.sync-lamp__text { line-height: 1; }

.sync-lamp__tip {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 5;
  padding: 6px 10px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--fog);
  font-size: 11px;
  letter-spacing: .06em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.sync-lamp:hover .sync-lamp__tip,
.sync-lamp:focus-visible .sync-lamp__tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@keyframes elj-lamp {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 61, .6); }
  70% { box-shadow: 0 0 0 7px rgba(255, 107, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 61, 0); }
}

/* 移动端开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5em;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fog);
  font-size: 12px;
  letter-spacing: .18em;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}

.nav-toggle:hover { border-color: var(--lime); color: var(--lime); }

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

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

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

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

.nav-toggle__text { line-height: 1; }

body.is-nav-open { overflow: hidden; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 11px 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fog);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: #08170F;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .45), 0 10px 24px -18px rgba(217, 255, 60, .9);
}

.btn--lime:hover {
  background: var(--lime-mist);
  border-color: var(--lime-mist);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--fog);
}

.btn--ghost:hover {
  border-color: var(--ink-3);
  color: var(--lime);
}

.btn--sm { padding: 8px 12px; font-size: 12px; }

.copy-btn { letter-spacing: .04em; }

.copy-btn.is-copied {
  border-color: var(--lime);
  color: var(--lime);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55em;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--moss);
  margin-bottom: clamp(18px, 3vw, 32px);
}

.breadcrumbs__item { display: inline-flex; align-items: center; gap: .55em; }

.breadcrumbs a { color: var(--moss); text-decoration: none; transition: color .18s ease; }
.breadcrumbs a:hover { color: var(--lime); }

.breadcrumbs__sep { color: var(--ink-3); }

/* ---------- 面板 / 数据 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 28px);
  background: linear-gradient(180deg, rgba(14, 58, 44, .78), rgba(7, 32, 25, .92));
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -42px rgba(0, 0, 0, .95);
}

.panel--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--moss);
}

.stat { display: grid; gap: .18em; }

.stat__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--lime);
}

.stat__unit {
  font-size: .42em;
  letter-spacing: .16em;
  color: var(--moss);
  vertical-align: super;
  margin-left: .28em;
}

.stat__label {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--moss);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.6;
  color: var(--moss);
  background: rgba(14, 58, 44, .55);
  border: 1px solid var(--line);
}

.tag--lime {
  color: var(--lime);
  border-color: rgba(217, 255, 60, .42);
  background: rgba(217, 255, 60, .09);
}

.tag--alert {
  color: var(--alert);
  border-color: rgba(255, 107, 61, .45);
  background: rgba(255, 107, 61, .10);
}

/* ---------- 分段控件 ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--moss);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .18s ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -1px;
  height: 2px;
  background: var(--lime);
  transition: left .18s var(--ease), right .18s var(--ease);
}

.tab:hover { color: var(--fog); }

.tab[aria-selected="true"] { color: var(--lime); }

.tab[aria-selected="true"]::after { left: 0; right: 0; }

.tab-panels { padding-top: clamp(18px, 3vw, 32px); }

.tab-panel:not([hidden]) { animation: elj-fade .22s ease-out both; }

@keyframes elj-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 折叠面板 ---------- */
.acc { border-top: 1px solid var(--line); }

.acc__item { border-bottom: 1px solid var(--line); }

.acc__trigger {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: var(--fog);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: color .18s ease;
}

.acc__trigger:hover { color: var(--lime); }

.acc__sign {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--lime);
  transition: transform .2s var(--ease);
}

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

.acc__panel {
  padding: 0 0 20px;
  max-width: 46em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--moss);
}

/* ---------- 媒体容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 18% 0%, rgba(31, 107, 82, .55), transparent 62%),
    linear-gradient(158deg, #072019 0%, #0A1220 74%);
}

.media::after {
  content: "";
  position: absolute;
  inset: auto -20% 22% -10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 255, 60, .75), transparent);
  transform: rotate(-8deg);
  opacity: .55;
  pointer-events: none;
}

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

.media__caption {
  display: block;
  padding-top: 9px;
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1.6;
  color: var(--moss);
}

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

/* ---------- 粘性目录轨 ---------- */
.rail {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  font-size: 13px;
}

.rail__title {
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: .32em;
  color: var(--moss);
}

.rail__list { display: grid; gap: 2px; }

.rail__link {
  display: flex;
  align-items: baseline;
  gap: .6em;
  padding: 7px 0 7px 12px;
  border-left: 1px solid var(--line);
  color: var(--moss);
  text-decoration: none;
  line-height: 1.5;
  transition: color .18s ease, border-color .18s ease;
}

.rail__link:hover { color: var(--fog); border-color: var(--ink-3); }

.rail__link[aria-current="true"] {
  color: var(--lime);
  border-color: var(--lime);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: var(--block);
  overflow: hidden;
  color: var(--fog);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 32, 25, .35) 0%, #071019 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime) 16%, var(--ink-3) 62%, transparent);
  opacity: .85;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(44px, 6vw, 84px);
}

.footer__brand { max-width: 26em; }

.brand--footer .brand__name { font-size: 20px; }

.footer__line {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--moss);
}

.footer__motto {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: .26em;
  color: var(--lime);
  opacity: .82;
}

.footer__meta {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-top: 18px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--moss);
}

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

.footer__col { min-width: 0; }

.footer__col-title {
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .32em;
  color: var(--moss);
}

.footer__list { display: grid; gap: 2px; }

.footer__list a,
.footer__plain {
  display: inline-block;
  padding-block: 5px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--moss);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer__list a { transition: color .18s ease; }

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

.footer__plain { cursor: text; }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--moss);
}

.footer__icp { font-family: var(--font-mono); letter-spacing: .02em; }

.footer__contact-line { flex: 1 1 22em; }

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

.footer__legal-links a {
  color: var(--moss);
  text-decoration: none;
  transition: color .18s ease;
}

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

/* ---------- 动效 ---------- */
[data-reveal] {
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(18px);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .cmd-link { font-size: 13px; }
  .sync-lamp__text { display: none; }
}

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

  .col-3, .col-4, .col-5, .col-7, .col-8 { grid-column: span 12; }

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

  .cmd-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1;
    max-height: 100vh;
    overflow-y: auto;
    padding: calc(var(--header-h) + 22px) var(--gutter) 28px;
    background: linear-gradient(180deg, #072019 0%, #0A1220 92%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 40px 70px -50px #000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-102%);
    transition: transform .32s var(--ease), opacity .24s ease, visibility .32s;
  }

  .cmd-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .cmd-nav__lead {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    letter-spacing: .32em;
    color: var(--moss);
  }

  .cmd-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

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

  .cmd-link {
    display: flex;
    width: 100%;
    gap: .8em;
    padding: 15px 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--fog);
  }

  .cmd-link[aria-current="page"] { color: var(--lime); }

  .cmd-link[aria-current="page"]::after { display: none; }

  .cmd-no { font-size: 11px; letter-spacing: .22em; }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .footer__brand { grid-column: 1 / -1; max-width: none; }

  .rail {
    position: static;
    margin-bottom: 24px;
  }

  .rail__list {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
  }

  .rail__link {
    border-left: 0;
    border-bottom: 1px solid transparent;
    padding: 8px 12px 8px 0;
    white-space: nowrap;
  }

  .rail__link[aria-current="true"] {
    border-color: transparent;
    border-bottom-color: var(--lime);
  }
}

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

  .display { font-size: clamp(2rem, 9vw, 3rem); }

  .sync-lamp { display: none; }

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

  .footer__legal { justify-content: flex-start; }

  .tabs { flex-wrap: nowrap; overflow-x: auto; }

  .tab { white-space: nowrap; padding: 10px 12px; font-size: 13px; }

  .panel--cut { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); }
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  [data-reveal],
  [data-reveal].is-pending {
    opacity: 1;
    transform: none;
  }

  .tab-panel:not([hidden]) { animation: none; }
  .scroll-meter__bar { box-shadow: none; }
}
