/* =========================================================
   乐球指南 match-leqiu.com.cn
   全站共享样式 /assets/site.css
   索引轨道 · 展签 · 数据网格
   ========================================================= */

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

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

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

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

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

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

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; }

/* ---------- tokens ---------- */
:root {
  --ink-950: #07131C;
  --ink-800: #102532;
  --ink-600: #1D3A4C;
  --turf-500: #16C172;
  --turf-300: #6FE3A6;
  --signal-500: #FF7A2F;
  --signal-200: #FFD9BF;
  --chalk-050: #F2F6F4;
  --chalk-900: #0B1A24;
  --mute-400: #7C93A0;

  --rail-w: 88px;
  --topbar-h: 76px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-pill: 999px;
  --shell-max: 1180px;
  --aside-slot: 96px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo,
    Consolas, monospace;
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  padding-top: var(--topbar-h);
  background: var(--ink-950);
  color: var(--chalk-050);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--turf-500); color: var(--ink-950); }

[id] { scroll-margin-top: calc(var(--topbar-h) + 24px); }

:focus-visible {
  outline: 2px solid var(--turf-300);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(40px, 7vw, 96px); line-height: 1.04; }
h2 { font-size: clamp(26px, 3.4vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }

p { line-height: 1.75; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.stamp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--signal-500);
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: calc(var(--rail-w) + 14px);
  z-index: 140;
  transform: translateY(-220%);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--turf-500);
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 700;
  pointer-events: auto;
  transition: transform 0.24s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- header shell ---------- */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}

.skip-link,
.rail,
.topbar__nav,
.nav-toggle,
.topbar__cta { pointer-events: auto; }

/* ---------- left brand rail ---------- */
.rail {
  position: relative;
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0 28px;
  background-color: var(--ink-950);
  background-image: linear-gradient(
    180deg,
    rgba(22, 193, 114, 0.12),
    rgba(7, 19, 28, 0) 46%
  );
  border-right: 1px solid var(--ink-600);
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}

.rail__brand-cn {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.32em;
  line-height: 1;
  color: var(--chalk-050);
}

.rail__brand-en {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.36em;
  color: var(--turf-300);
}

.rail__version {
  writing-mode: vertical-rl;
  padding: 12px 6px;
  border-radius: var(--radius-pill);
  background: var(--turf-500);
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.rail__ticks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin: 4px 0;
}
.rail__ticks:empty { display: none; }

.rail__tick { position: relative; display: block; }

.rail__tick-link {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-600);
  transition: background 0.24s var(--ease), transform 0.24s var(--ease),
    box-shadow 0.24s var(--ease);
}
.rail__tick-link:hover { background: var(--turf-300); }
.rail__tick.is-active .rail__tick-link {
  background: var(--turf-500);
  transform: scale(1.4);
  box-shadow: 0 0 0 4px rgba(22, 193, 114, 0.16);
}

.rail__tick-label {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translate(-8px, -50%);
  white-space: nowrap;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  color: var(--chalk-050);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.26s var(--ease);
}
.rail__tick-link:hover + .rail__tick-label,
.rail__tick-link:focus-visible + .rail__tick-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail__track {
  position: relative;
  flex: 1 1 auto;
  width: 2px;
  min-height: 72px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--ink-600);
  overflow: hidden;
}

.rail__fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  display: block;
  background: linear-gradient(180deg, var(--turf-500), var(--signal-500));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.18s linear;
}

/* ---------- right side bar ---------- */
.topbar {
  position: relative;
  flex: 1 1 auto;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 40px 0 24px;
  background: linear-gradient(
    180deg,
    rgba(7, 19, 28, 0.97) 0%,
    rgba(7, 19, 28, 0.78) 62%,
    rgba(7, 19, 28, 0) 100%
  );
}

.topbar__nav { pointer-events: auto; }

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-list__item { display: block; }

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--mute-400);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.nav-link:hover {
  color: var(--chalk-050);
  background: rgba(29, 58, 76, 0.66);
}
.nav-link[aria-current="page"] {
  color: var(--turf-300);
  background: rgba(22, 193, 114, 0.12);
  border-color: rgba(22, 193, 114, 0.5);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.24s var(--ease), background 0.24s var(--ease),
    color 0.24s var(--ease), border-color 0.24s var(--ease);
}
.btn--cta {
  background: var(--signal-500);
  color: #220D01;
  box-shadow: 0 12px 28px -16px rgba(255, 122, 47, 0.95);
}
.btn--cta:hover { background: var(--signal-200); transform: translateY(-2px); }
.btn--turf { background: var(--turf-500); color: #04170E; }
.btn--turf:hover { background: var(--turf-300); transform: translateY(-2px); }
.btn--ghost {
  border-color: var(--ink-600);
  color: var(--chalk-050);
  background: rgba(16, 37, 50, 0.6);
}
.btn--ghost:hover {
  border-color: var(--turf-500);
  color: var(--turf-300);
  transform: translateY(-2px);
}

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-pill);
  background: rgba(16, 37, 50, 0.85);
  transition: border-color 0.24s var(--ease);
}
.nav-toggle:hover { border-color: var(--turf-500); }

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--chalk-050);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: 32px;
}

.section { padding-block: clamp(60px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }
.section:first-child { padding-top: clamp(28px, 4vw, 52px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  margin-bottom: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--turf-300);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--turf-500);
}

.section-title { margin: 0; }

.lede {
  max-width: 62ch;
  font-size: clamp(18px, 1.4vw, 19px);
  line-height: 1.72;
  color: var(--mute-400);
}

.divider {
  height: 1px;
  border: 0;
  background-image: linear-gradient(90deg, var(--ink-600) 44%, transparent 0);
  background-size: 12px 1px;
  background-repeat: repeat-x;
}

/* ---------- grid ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mute-400);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs li { display: flex; align-items: center; gap: 10px; }
.breadcrumbs li + li::before {
  content: "/";
  color: var(--ink-600);
}
.breadcrumbs a:hover { color: var(--turf-300); }

/* ---------- index rows (展签) ---------- */
.index-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink-600);
}

.index-row {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 12px 18px 4px;
  border-bottom: 1px solid var(--ink-600);
  transition: background 0.22s var(--ease);
}
.index-row:hover { background: rgba(22, 193, 114, 0.06); }

.index-row__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.index-row__dots {
  height: 1px;
  background-image: linear-gradient(90deg, var(--ink-600) 44%, transparent 0);
  background-size: 10px 1px;
  background-repeat: repeat-x;
  opacity: 0.9;
}

.index-row__time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--mute-400);
  white-space: nowrap;
  transition: color 0.22s var(--ease), transform 0.22s var(--ease);
}
.index-row:hover .index-row__time {
  color: var(--signal-500);
  transform: translateX(2px);
}

/* ---------- cards ---------- */
.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
}
.card--link { transition: transform 0.3s var(--ease), border-color 0.3s var(--ease); }
.card--link:hover {
  transform: translateY(-3px);
  border-color: var(--turf-500);
}
.card__title {
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.card__desc {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--mute-400);
}
.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

/* ---------- pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 13px;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mute-400);
  white-space: nowrap;
}
.pill--turf {
  border-color: rgba(22, 193, 114, 0.5);
  background: rgba(22, 193, 114, 0.1);
  color: var(--turf-300);
}
.pill--signal {
  border-color: rgba(255, 122, 47, 0.45);
  background: rgba(255, 122, 47, 0.12);
  color: var(--signal-200);
}

/* ---------- prose ---------- */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 42px; font-size: clamp(22px, 2.4vw, 30px); }
.prose h3 { margin-top: 32px; }
.prose ul, .prose ol { padding-left: 22px; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose strong { font-weight: 700; color: var(--turf-300); }

.prose--chalk {
  max-width: none;
  padding: clamp(24px, 4vw, 52px);
  border-radius: var(--radius-lg);
  background: var(--chalk-050);
  color: var(--chalk-900);
}
.prose--chalk p,
.prose--chalk li { color: #24343F; }
.prose--chalk h2,
.prose--chalk h3 { color: var(--chalk-900); }
.prose--chalk strong { color: #0B7A4B; }
.prose--chalk a {
  color: #0B7A4B;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- figures ---------- */
.figure { margin: 0; }

.figure__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
}
.figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--wide .figure__media { aspect-ratio: 21 / 9; }
.figure--square .figure__media { aspect-ratio: 1 / 1; }
.figure--tall .figure__media { aspect-ratio: 4 / 5; }

.figure__media--field::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 193, 114, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 193, 114, 0.1) 1px, transparent 1px);
  background-size: 52px 52px;
}

.figure__caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mute-400);
}

/* ---------- accordion ---------- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.accordion__item {
  overflow: hidden;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-md);
  background: var(--ink-800);
  transition: border-color 0.26s var(--ease);
}
.accordion__item[data-open] { border-color: rgba(22, 193, 114, 0.55); }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.accordion__icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink-600);
  color: var(--turf-300);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.accordion__item[data-open] .accordion__icon {
  transform: rotate(45deg);
  border-color: var(--turf-500);
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s var(--ease);
}
.accordion__item[data-open] .accordion__panel { grid-template-rows: 1fr; }
.accordion__panel-inner { overflow: hidden; }
.accordion__body {
  padding: 0 24px 22px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--mute-400);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-pill);
  background: var(--ink-800);
  color: var(--chalk-050);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s var(--ease), border-color 0.24s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--turf-500); color: var(--turf-300); }
.to-top__arrow { color: var(--signal-500); font-family: var(--font-mono); }

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(72px, 10vw, 140px);
  padding-block: clamp(48px, 6vw, 84px) 28px;
  border-top: 1px solid var(--ink-600);
  background-color: var(--ink-800);
  background-image: radial-gradient(
    120% 130% at 0% 0%,
    rgba(22, 193, 114, 0.12),
    rgba(16, 37, 50, 0) 58%
  );
  color: var(--chalk-050);
}
.site-foot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    90deg,
    rgba(124, 147, 160, 0.12) 1px,
    transparent 1px
  );
  background-size: var(--rail-w) 100%;
  opacity: 0.6;
}
.foot__shell { position: relative; }

.foot__grid {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.foot__brand-name {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.foot__brand-en {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--turf-300);
}
.foot__brand-tag {
  margin-top: 16px;
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--mute-400);
}
.foot__brand-cta { margin-top: 24px; }

.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.foot__col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mute-400);
}
.foot__list { display: flex; flex-direction: column; gap: 2px; }

.foot__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 15px;
  color: #CBD9DE;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.foot__link:hover {
  color: var(--turf-300);
  border-bottom-color: rgba(22, 193, 114, 0.55);
}

.foot__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 26px;
  border-top: 1px dashed var(--ink-600);
}
.foot__contact-line {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #C3D3D9;
}
.foot__copy {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-pill);
  color: var(--mute-400);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.foot__copy:hover { border-color: var(--signal-500); color: var(--signal-200); }
.foot__copy.is-done { border-color: var(--turf-500); color: var(--turf-300); }

.foot__note {
  flex-basis: 100%;
  max-width: 68ch;
  font-size: 13px;
  line-height: 1.75;
  color: var(--mute-400);
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-600);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mute-400);
}
.foot__legal-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot__legal-links .foot__link { min-height: auto; font-size: 13px; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1024px) {
  :root { --rail-w: 0px; --topbar-h: 64px; }

  body { padding-left: 0; padding-top: var(--topbar-h); }

  .site-head {
    height: var(--topbar-h);
    align-items: center;
    background: rgba(7, 19, 28, 0.94);
    border-bottom: 1px solid var(--ink-600);
    backdrop-filter: blur(12px);
    pointer-events: auto;
  }

  .rail {
    flex: 0 0 auto;
    width: auto;
    height: var(--topbar-h);
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 0 0 18px;
    border-right: 0;
    background-image: none;
  }
  .rail__brand { flex-direction: row; align-items: baseline; gap: 8px; padding: 0; }
  .rail__brand-cn {
    writing-mode: horizontal-tb;
    font-size: 17px;
    letter-spacing: 0.12em;
  }
  .rail__brand-en { display: none; }
  .rail__version {
    writing-mode: horizontal-tb;
    padding: 5px 11px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }
  .rail__ticks,
  .rail__track { display: none; }

  .topbar {
    height: var(--topbar-h);
    justify-content: flex-end;
    padding: 0 14px 0 8px;
    background: none;
  }

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

  .topbar__nav {
    position: fixed;
    top: var(--topbar-h);
    right: 0;
    width: min(330px, 86vw);
    height: calc(100dvh - var(--topbar-h));
    padding: 22px 20px 36px;
    background: var(--ink-800);
    border-left: 1px solid var(--ink-600);
    box-shadow: -30px 0 60px -30px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    transform: translateX(104%);
    transition: transform 0.34s var(--ease);
  }
  .topbar__nav[data-open] { transform: translateX(0); }

  .nav-list { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 6px; }
  .nav-link {
    height: 52px;
    justify-content: flex-start;
    padding: 0 18px;
    border-radius: 18px;
    background: rgba(7, 19, 28, 0.5);
    font-size: 17px;
  }

  .skip-link { left: 14px; }

  .to-top { right: 18px; bottom: 18px; }
}

@media (max-width: 900px) {
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-4, .col-6, .col-8, .col-12 { grid-column: span 6; }

  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .shell { padding-inline: 20px; }
  .section { padding-block: 56px; }
  .grid { gap: 18px; }
  .card { padding: 22px; }

  .topbar__cta { height: 40px; padding: 0 16px; font-size: 14px; }

  .index-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding-block: 15px;
  }
  .index-row__dots { display: none; }

  .foot__cols { grid-template-columns: minmax(0, 1fr); }
  .foot__legal { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .rail__version { display: none; }
  .topbar__cta { font-size: 13px; padding: 0 13px; }
}

/* ---------- motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .rail__fill { transition: none; }
}
