/* ============================================================
   买球官网 · 共享 Site Kit  /assets/site.css
   深海青底 + 珊瑚橙信号 + 荧光绿状态 + 1px 精密网格
   ============================================================ */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; }
button { font: inherit; color: inherit; }
hr { border: 0; }
main { display: block; }

html[data-nav-locked],
html[data-nav-locked] body { overflow: hidden; }

/* ---------- 2. 变量 ---------- */
:root {
  --deep: #05303A;
  --tide: #0B5A5F;
  --shoal: #7FC9C2;
  --mist: #6E8A8C;
  --coral: #FF6A3D;
  --coral-soft: #FFB39C;
  --sand: #F6F0E4;
  --lime: #B8FF3C;
  --ink: #08110F;
  --line: #C3D6D3;

  --bg: var(--deep);
  --fg: var(--sand);

  --shell: 1240px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 74px;
  --measure: 34em;
  --radius: 4px;

  --font-head: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: var(--font-head);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK SC", "Courier New", monospace;

  --fs-display: clamp(30px, 5vw, 44px);
  --fs-h2: clamp(24px, 3.4vw, 32px);
  --fs-h3: clamp(19px, 2.4vw, 24px);
  --fs-h4: 18px;
  --fs-body: 17px;
  --fs-sm: 15px;
  --fs-note: 13px;

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

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: var(--sand);
}
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 800; }

p { line-height: 1.85; }
strong, b { font-weight: 800; color: var(--sand); }
small { font-size: var(--fs-note); }

a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.mono, code, kbd, samp { font-family: var(--font-mono); letter-spacing: .02em; }

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

::selection { background: var(--coral); color: var(--ink); }

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

.section { padding-block: clamp(48px, 7vw, 88px); }
.section--sand { background: var(--sand); color: var(--ink); }
.section--sand h1, .section--sand h2, .section--sand h3, .section--sand h4 { color: var(--ink); }
.section--sand p, .section--sand li { color: rgba(8, 17, 15, .78); }
.section--sand .eyebrow { color: var(--tide); }
.section--tide { background: var(--tide); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(20px, 3vw, 34px);
}
.section-title { font-size: var(--fs-h2); font-weight: 900; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--lime);
}
.lede {
  font-size: var(--fs-body);
  line-height: 1.9;
  color: rgba(246, 240, 228, .8);
  max-width: var(--measure);
}
.rule {
  height: 1px;
  background: rgba(127, 201, 194, .3);
  margin-block: clamp(26px, 4vw, 46px);
}

/* ---------- 5. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--sand);
  background: transparent;
  border: 1px solid rgba(127, 201, 194, .5);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover {
  text-decoration: none;
  border-color: var(--shoal);
  box-shadow: 0 0 0 2px rgba(127, 201, 194, .2);
}
.btn--ghost { color: var(--sand); }
.btn--coral {
  background: var(--coral);
  border-color: var(--coral);
  color: #200A02;
}
.btn--coral:hover {
  background: var(--coral-soft);
  border-color: var(--coral-soft);
  box-shadow: 0 0 0 2px rgba(255, 106, 61, .25);
}
.btn--block { width: 100%; justify-content: center; }

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 800;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ---------- 7. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: transparent;
  border-bottom: 1px solid transparent;
  color: var(--sand);
  transition: background .24s var(--ease), border-color .24s var(--ease);
}
.site-header[data-scrolled] {
  background: rgba(5, 48, 58, .97);
  border-bottom-color: rgba(127, 201, 194, .28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: rgba(184, 255, 60, .14);
  z-index: 3;
}
.progress-rail__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}
.progress-rail__tick {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 8px;
  background: rgba(246, 240, 228, .34);
  transition: background .2s var(--ease), height .2s var(--ease), top .2s var(--ease);
}
.progress-rail__tick.is-current {
  top: -5px;
  height: 12px;
  background: var(--coral);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
  height: var(--header-h);
  transition: height .24s var(--ease);
}
.site-header[data-scrolled] .header-inner { height: 62px; }

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sand);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, .18);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.18; }
.brand__name { font-size: 19px; font-weight: 900; letter-spacing: .04em; }
.brand__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--shoal);
}

/* 主导航 */
.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.site-nav__item { position: relative; }
.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 9px 12px;
  font-size: var(--fs-sm);
  letter-spacing: .02em;
  color: rgba(246, 240, 228, .76);
  text-decoration: none;
  transition: color .18s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .2s var(--ease);
}
.site-nav__link:hover { color: var(--sand); text-decoration: none; }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--lime); font-weight: 700; }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__foot { display: none; }
.site-nav__note {
  font-family: var(--font-mono);
  font-size: var(--fs-note);
  color: var(--shoal);
}

/* 工具区 */
.header-tools { display: flex; align-items: center; gap: 10px; }

.index-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid rgba(127, 201, 194, .45);
  border-radius: var(--radius);
  color: var(--sand);
  font-size: var(--fs-note);
  letter-spacing: .16em;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.index-toggle:hover { border-color: var(--lime); box-shadow: 0 0 0 2px rgba(184, 255, 60, .16); }
.index-toggle[aria-expanded="true"] { border-color: var(--lime); color: var(--lime); }
.index-toggle__glyph {
  position: relative;
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
}
.index-toggle__glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 40px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid rgba(127, 201, 194, .45);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--lime); }
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--sand);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) 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(-6px) rotate(-45deg); }

/* 快速索引面板 */
.quick-index {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: rgba(4, 32, 39, .98);
  border-top: 1px solid rgba(127, 201, 194, .28);
  border-bottom: 1px solid rgba(127, 201, 194, .28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
}
.quick-index[hidden] { display: none; }
.quick-index__inner { padding-block: 22px 26px; }
.quick-index__head {
  font-family: var(--font-mono);
  font-size: var(--fs-note);
  letter-spacing: .24em;
  color: var(--shoal);
  margin-bottom: 14px;
}
.quick-index__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(127, 201, 194, .22);
  border: 1px solid rgba(127, 201, 194, .22);
}
.quick-index__cell { background: var(--deep); }
.quick-index__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  color: var(--sand);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.quick-index__link:hover { background: var(--tide); color: #fff; text-decoration: none; }
.quick-index__no { font-family: var(--font-mono); font-size: 11px; color: var(--lime); }
.quick-index__name { font-weight: 600; }
.quick-index__route {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mist);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  background-color: var(--deep);
  background-image: linear-gradient(rgba(127, 201, 194, .07) 1px, transparent 1px);
  background-size: 100% 56px;
  border-top: 1px solid rgba(127, 201, 194, .25);
  color: var(--sand);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 48px);
  padding-block: clamp(40px, 6vw, 72px);
}

.footer-brand__name { font-size: var(--fs-h3); font-weight: 900; letter-spacing: .03em; }
.footer-brand__tag { font-size: var(--fs-sm); color: var(--shoal); margin-top: 6px; }
.footer-brand__meta { font-size: var(--fs-note); color: var(--mist); margin-top: 16px; }
.footer-brand__access { font-size: var(--fs-sm); color: var(--coral-soft); margin-top: 6px; }

.footer-col__title {
  position: relative;
  padding-left: 13px;
  font-size: var(--fs-note);
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--sand);
  margin-bottom: 16px;
}
.footer-col__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  background: var(--coral);
}
.footer-col__list { display: grid; gap: 10px; }
.footer-link {
  display: inline-block;
  font-size: var(--fs-sm);
  color: rgba(246, 240, 228, .74);
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-link:hover { color: var(--sand); border-bottom-color: var(--lime); text-decoration: none; }

.footer-contact {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  padding-top: clamp(22px, 3vw, 34px);
  border-top: 1px solid rgba(127, 201, 194, .22);
}
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.contact-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 14px;
  background: rgba(11, 90, 95, .42);
  border: 1px solid rgba(127, 201, 194, .26);
  border-radius: var(--radius);
}
.contact-chip__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 200px;
}
.contact-chip__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--shoal);
}
.contact-chip__value {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--sand);
  word-break: break-all;
}
.copy-btn {
  flex: none;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--sand);
  background: transparent;
  border: 1px solid rgba(127, 201, 194, .5);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
.copy-btn:hover { border-color: var(--lime); color: var(--lime); }
.copy-btn[data-copied] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.contact-note { font-size: var(--fs-note); color: var(--mist); max-width: 62ch; }

.footer-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--ink);
  border-top: 1px solid rgba(184, 255, 60, .25);
}
.footer-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 10px var(--gutter);
  font-size: var(--fs-note);
  color: var(--mist);
}
.footer-bar__icp { font-family: var(--font-mono); color: var(--sand); }
.footer-bar__note { display: inline-flex; align-items: center; gap: 8px; }
.footer-bar__dot {
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(184, 255, 60, .8);
}
.footer-bar__year { font-family: var(--font-mono); }

/* ---------- 9. 基础组件 ---------- */
.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--asym { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}
.bento__cell {
  grid-column: span 4;
  padding: clamp(16px, 2vw, 24px);
  background: rgba(11, 90, 95, .22);
  border: 1px solid rgba(127, 201, 194, .26);
  border-radius: var(--radius);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.bento__cell:hover { border-color: var(--shoal); box-shadow: 0 0 0 2px rgba(127, 201, 194, .16); }
.bento__cell--wide { grid-column: span 8; }
.bento__cell--full { grid-column: span 12; }
.bento__cell--tall { grid-row: span 2; }
.bento__cell--focus {
  background: linear-gradient(150deg, var(--tide), var(--deep) 78%);
  border-color: rgba(255, 106, 61, .45);
}

.panel {
  padding: clamp(18px, 2.4vw, 26px);
  background: rgba(11, 90, 95, .26);
  border: 1px solid rgba(127, 201, 194, .28);
  border-radius: var(--radius);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.panel:hover { border-color: var(--shoal); box-shadow: 0 0 0 2px rgba(127, 201, 194, .16); }
.panel__title { font-size: var(--fs-h4); font-weight: 800; }
.panel__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-note);
  color: var(--mist);
}

.index-band {
  display: flex;
  gap: 1px;
  overflow-x: auto;
  background: rgba(127, 201, 194, .24);
  border: 1px solid rgba(127, 201, 194, .24);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
.index-band__item {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--deep);
  color: var(--sand);
  font-size: var(--fs-sm);
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.index-band__item:hover { background: var(--tide); text-decoration: none; }
.index-band__item.is-current,
.index-band__item[aria-current="page"] { background: var(--tide); color: var(--lime); }
.index-band__no { font-family: var(--font-mono); font-size: 11px; color: var(--coral); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--shoal);
  border: 1px solid rgba(127, 201, 194, .4);
  border-radius: 3px;
}
.tag--lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.tag--coral {
  background: rgba(255, 106, 61, .16);
  border-color: var(--coral);
  color: var(--coral-soft);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-note);
  color: var(--mist);
}
.crumb a { color: var(--shoal); text-decoration: none; }
.crumb a:hover { color: var(--lime); text-decoration: none; }
.crumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(110, 138, 140, .8);
}

.prose { max-width: var(--shell); }
.prose h2 { font-size: var(--fs-h2); margin-block: clamp(26px, 4vw, 44px) 14px; }
.prose h3 { font-size: var(--fs-h3); margin-block: 26px 10px; }
.prose h4 { font-size: var(--fs-h4); margin-block: 20px 8px; }
.prose p, .prose li { max-width: var(--measure); line-height: 1.95; color: rgba(246, 240, 228, .82); }
.prose p { margin-bottom: 1.05em; }
.prose ul, .prose ol { display: grid; gap: 8px; margin-bottom: 1.2em; }
.prose ul li { position: relative; padding-left: 18px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .74em;
  width: 7px;
  height: 1px;
  background: var(--coral);
}
.prose ol { counter-reset: prose-ol; }
.prose ol li { position: relative; padding-left: 26px; counter-increment: prose-ol; }
.prose ol li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-note);
  color: var(--lime);
}
.prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.prose code {
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: .92em;
  color: var(--lime);
  background: rgba(184, 255, 60, .12);
  border: 1px solid rgba(184, 255, 60, .3);
  border-radius: 3px;
}
.section--sand .prose p,
.section--sand .prose li { color: rgba(8, 17, 15, .78); }
.section--sand .prose strong { color: var(--ink); }

/* 响应式图片容器（页面阶段放置图片） */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(155deg, var(--tide), var(--deep) 72%);
  border: 1px solid rgba(127, 201, 194, .3);
  border-radius: var(--radius);
}
.media-frame__ph {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(127, 201, 194, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 201, 194, .12) 1px, transparent 1px);
  background-size: 28px 28px;
}
.media-frame > img,
.media-frame > video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }
.media-frame--21x9 { aspect-ratio: 21 / 9; }
.media-frame__caption {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-note);
  color: var(--mist);
}

/* ---------- 10. 动效与状态钩子 ---------- */
[data-section] { scroll-margin-top: calc(var(--header-h) + 16px); }

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(54px, 7vw, 76px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--sand);
  background: var(--deep);
  border: 1px solid rgba(127, 201, 194, .5);
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s var(--ease), visibility .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-index__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--asym { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .site-header { --header-h: 64px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .site-header[data-scrolled] .header-inner { height: 58px; }
  .header-tools__cta { display: none; }
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    z-index: 2;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    background: rgba(4, 32, 39, .99);
    border-top: 1px solid rgba(127, 201, 194, .28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
  }
  .site-nav[data-open] { opacity: 1; visibility: visible; transform: none; }

  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__item { border-bottom: 1px solid rgba(127, 201, 194, .18); }
  .site-nav__link {
    display: block;
    padding: 16px 2px;
    font-size: 20px;
    font-weight: 800;
    color: var(--sand);
  }
  .site-nav__link::after { display: none; }
  .site-nav__link[aria-current="page"] { color: var(--lime); }
  .site-nav__link[aria-current="page"]::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    vertical-align: middle;
    background: var(--lime);
  }
  .site-nav__foot {
    display: grid;
    gap: 12px;
    padding-top: 20px;
  }

  .quick-index { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .quick-index__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .bento__cell, .bento__cell--wide { grid-column: span 12; }
  .bento__cell--tall { grid-row: auto; }
  .quick-index__grid { grid-template-columns: minmax(0, 1fr); }
  .quick-index__route { display: none; }
  .brand__tag { display: none; }
  .footer-bar__inner { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .progress-rail__fill { transform: scaleX(0); }
}
