/* ==========================================================================
   亚星赛场 · 共享样式 /assets/site.css
   深空蓝底色 + 荧光绿/活力橙双强调 · 编辑部目录 × 电子记分牌
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 132px;
}

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

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

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

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

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }

/* ---------- 2. 变量 ---------- */
:root {
  --bg: #070B1E;
  --bg-deep: #05081A;
  --panel: #111A35;
  --panel-2: #1E2A5E;
  --green: #3DF08A;
  --orange: #FF8A3D;
  --ice: #9FB4D9;
  --paper: #F2F5FA;
  --line: #2C3550;
  --clay: #5A2E22;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --pill: 999px;

  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 48px);

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-cond: "Oswald", "Barlow Condensed", "Arial Narrow", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas,
    "Courier New", monospace;

  --shadow-panel: 0 30px 70px -40px rgba(0, 0, 0, .95);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 基底与中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 球场夜空：灯柱光晕 + 像素栅格 + 蓝紫纵深 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -10%, rgba(61, 240, 138, .11), transparent 62%),
    radial-gradient(880px 540px at 6% 14%, rgba(255, 138, 61, .09), transparent 60%),
    linear-gradient(180deg, rgba(30, 42, 94, .55) 0%, rgba(7, 11, 30, 0) 44%),
    repeating-linear-gradient(0deg, rgba(159, 180, 217, .045) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(90deg, rgba(159, 180, 217, .045) 0 1px, transparent 1px 88px);
}

::selection { background: var(--green); color: #04160C; }

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

p { max-width: 76ch; }

/* ---------- 4. 容器与栅格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-main {
  position: relative;
  z-index: 1;
  padding-top: clamp(100px, 12vw, 140px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}
.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--main-aside { grid-template-columns: minmax(0, 2.1fr) minmax(240px, 1fr); }
.grid--aside-main { grid-template-columns: minmax(240px, 1fr) minmax(0, 2.1fr); }

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(32px, 5vw, 64px);
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

.band {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 38px);
  background: linear-gradient(90deg, rgba(30, 42, 94, .85), rgba(17, 26, 53, .6) 55%, rgba(17, 26, 53, .22));
}
.band--clay { background: linear-gradient(90deg, rgba(90, 46, 34, .78), rgba(17, 26, 53, .5)); }
.band--green { background: linear-gradient(90deg, rgba(61, 240, 138, .17), rgba(17, 26, 53, .42)); }

/* ---------- 5. 字体层级 ---------- */
.display-1 {
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: clamp(52px, 8vw, 132px);
  line-height: .92;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--paper);
}

.display-2 {
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.h-section {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .01em;
}

.h-sub {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  line-height: 1.42;
}

.lede {
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.8;
  color: var(--ice);
  max-width: 62ch;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .75;
}

.index-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ice);
}

.stat {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--paper);
}
.stat--green { color: var(--green); }
.stat--orange { color: var(--orange); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.u-green { color: var(--green); }
.u-orange { color: var(--orange); }
.u-ice { color: var(--ice); }
.u-clay { color: #E8B9A6; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 22px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--green);
  color: #04160C;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- 7. 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 120;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--green), var(--orange));
  pointer-events: none;
}

/* ---------- 8. 刊头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(7, 11, 30, .96) 0%, rgba(7, 11, 30, .82) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 240, 138, .55), rgba(255, 138, 61, .5), transparent);
  opacity: .55;
}
.site-header[data-scrolled] {
  background: rgba(7, 11, 30, .975);
  box-shadow: 0 22px 50px -30px rgba(0, 0, 0, .98);
}

.header-shell {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  padding-block: 18px;
  transition: padding .25s var(--ease);
}
.site-header[data-scrolled] .header-shell { padding-block: 10px; }

/* 报头 */
.masthead {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  justify-self: start;
}
.masthead__mark {
  font-family: var(--font-cond);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 0 24px rgba(61, 240, 138, .28);
}
.masthead__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ice);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .2s var(--ease), max-height .25s var(--ease);
}
.site-header[data-scrolled] .masthead__sub {
  opacity: 0;
  max-height: 0;
}

/* 居中栏目导航 */
.nav-primary { justify-self: center; }
.nav-primary__list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.1vw, 18px);
}
.nav-primary__link {
  position: relative;
  display: block;
  padding: 8px 10px;
  border-radius: var(--pill);
  font-size: 15px;
  letter-spacing: .06em;
  color: var(--ice);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-primary__link::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease);
}
.nav-primary__link:hover { color: var(--paper); }
.nav-primary__link:hover::after { transform: scaleX(1); }
.nav-primary__link[aria-current="page"] {
  color: var(--paper);
  background: rgba(61, 240, 138, .1);
}
.nav-primary__link[aria-current="page"]::after { transform: scaleX(1); }

/* 右侧动作区 */
.header-aside {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 18px);
  min-width: 0;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(17, 26, 53, .85);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: .08em;
  white-space: nowrap;
  transition: transform .18s var(--ease), border-color .18s var(--ease),
    background .18s var(--ease), color .18s var(--ease);
}
.action-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 180, 217, .55);
}
.action-chip--green {
  border-color: rgba(61, 240, 138, .5);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(61, 240, 138, .08);
}
.action-chip--green:hover { background: rgba(61, 240, 138, .14); }
.action-chip--orange {
  border-color: rgba(255, 138, 61, .5);
  color: var(--orange);
}
.action-chip--orange:hover { background: rgba(255, 138, 61, .14); }

/* 实时状态条 */
.live-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ice);
  white-space: nowrap;
  max-width: 100%;
}
.live-strip__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 240, 138, .16);
  animation: yx-pulse 2.4s ease-in-out infinite;
}
.live-strip__text { overflow: hidden; text-overflow: ellipsis; }

@keyframes yx-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(61, 240, 138, .16); }
  50% { opacity: .55; box-shadow: 0 0 0 9px rgba(61, 240, 138, .04); }
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(17, 26, 53, .9);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: .1em;
  cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.nav-toggle:hover { border-color: rgba(61, 240, 138, .5); }
.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  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); }
.nav-toggle__label { font-family: var(--font-mono); letter-spacing: .16em; }

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(64px, 9vw, 120px);
  padding-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 26, 53, .38) 0%, rgba(7, 11, 30, .98) 55%, var(--bg-deep) 100%);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 240px;
  pointer-events: none;
  background:
    radial-gradient(720px 220px at 18% 0%, rgba(61, 240, 138, .11), transparent 70%),
    radial-gradient(620px 200px at 86% 0%, rgba(255, 138, 61, .1), transparent 70%);
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: clamp(24px, 3vw, 48px);
}
.footer-col { min-width: 0; }
.footer-col--brand {
  display: grid;
  gap: 2px;
  align-content: start;
}

.footer-brand {
  font-family: var(--font-cond);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-note {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ice);
}
.footer-index {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(159, 180, 217, .72);
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
}

.footer-links {
  display: grid;
  gap: 8px;
}
.footer-links a {
  display: inline-block;
  font-size: 15px;
  color: var(--ice);
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.footer-links a:hover {
  color: var(--paper);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  gap: 12px;
}
.footer-contact__item { display: grid; gap: 2px; }
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(159, 180, 217, .7);
}
.footer-contact__val {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(36px, 4vw, 56px);
  padding-block: 20px 28px;
  border-top: 1px solid var(--line);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(159, 180, 217, .75);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-legal a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(159, 180, 217, .75);
  transition: color .18s var(--ease);
}
.footer-legal a:hover { color: var(--green); }

/* ---------- 10. 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
    color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .24) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .45s var(--ease);
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(120%); }
.btn--primary {
  background: var(--green);
  color: #04160C;
  box-shadow: 0 18px 36px -20px rgba(61, 240, 138, .95);
}
.btn--orange {
  background: var(--orange);
  color: #1B0C02;
  box-shadow: 0 18px 36px -20px rgba(255, 138, 61, .95);
}
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}
.btn--ghost:hover {
  border-color: rgba(61, 240, 138, .6);
  color: var(--green);
}

/* ---------- 11. 徽章 / 面板 / 卡片 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(17, 26, 53, .7);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ice);
}
.tag--live {
  color: var(--green);
  border-color: rgba(61, 240, 138, .45);
  background: rgba(61, 240, 138, .09);
}
.tag--soon {
  color: var(--orange);
  border-color: rgba(255, 138, 61, .45);
  background: rgba(255, 138, 61, .09);
}
.tag--clay {
  color: #F0C7B6;
  border-color: rgba(90, 46, 34, .95);
  background: rgba(90, 46, 34, .58);
}

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 26, 53, .92), rgba(17, 26, 53, .52));
  box-shadow: var(--shadow-panel);
}
.panel--flush { padding: 0; overflow: hidden; }

.card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(17, 26, 53, .72);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 180, 217, .45);
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumbs { margin-bottom: clamp(18px, 2.4vw, 28px); }
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ice);
}
.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: var(--line);
}
.breadcrumbs__link {
  color: rgba(159, 180, 217, .88);
  transition: color .18s var(--ease);
}
.breadcrumbs__link:hover { color: var(--green); }
.breadcrumbs__item [aria-current="page"] { color: var(--paper); }

/* ---------- 13. 图片容器（响应式占位） ---------- */
.figure { position: relative; margin: 0; }
.figure__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 18% 8%, rgba(61, 240, 138, .16), transparent 60%),
    radial-gradient(120% 90% at 86% 88%, rgba(255, 138, 61, .15), transparent 60%),
    linear-gradient(160deg, #16224B 0%, #0A1029 100%);
}
.figure__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(0deg, rgba(242, 245, 250, .06) 0 1px, transparent 1px 6px);
}
.figure__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(159, 180, 217, .8);
}
.figure--square .figure__media { aspect-ratio: 1 / 1; }
.figure--tall .figure__media { aspect-ratio: 3 / 4; }
.figure--wide .figure__media { aspect-ratio: 21 / 9; }
.figure--blur .figure__media { filter: saturate(118%) contrast(104%); }

/* ---------- 14. 章节目录 ---------- */
.toc {
  position: sticky;
  top: 132px;
  align-self: start;
}
.toc__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
}
.toc__list {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.toc__link {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ice);
  cursor: pointer;
  transition: color .18s var(--ease), padding-left .18s var(--ease);
}
.toc__link:hover { color: var(--paper); }
.toc__link[aria-current="true"] {
  padding-left: 6px;
  color: var(--green);
}

/* ---------- 15. 入场动效与返回顶部 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(16px, 3vw, 36px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(61, 240, 138, .45);
  border-radius: var(--pill);
  background: rgba(7, 11, 30, .94);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s var(--ease), transform .22s var(--ease),
    visibility .22s linear, background .22s var(--ease);
}
.back-to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.back-to-top:hover { background: rgba(61, 240, 138, .15); }

/* ---------- 16. 响应式：平板 ---------- */
@media (max-width: 1180px) {
  .masthead__sub { display: none; }
  .live-strip { display: none; }
  .header-shell { grid-template-columns: minmax(120px, 1fr) auto minmax(200px, 1fr); }
  .nav-primary__link { font-size: 14px; padding: 8px 8px; }
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc { position: static; }
}

@media (max-width: 900px) {
  .site-main { padding-top: 96px; }

  .header-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "actions actions";
    row-gap: 10px;
    column-gap: 12px;
    padding-block: 12px 10px;
  }
  .site-header[data-scrolled] .header-shell { padding-block: 10px 8px; }

  .masthead { grid-area: brand; }
  .masthead__mark { letter-spacing: .22em; }
  .header-aside {
    grid-area: actions;
    justify-self: stretch;
    display: block;
  }
  .header-actions {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .header-actions::-webkit-scrollbar { display: none; }
  .nav-toggle {
    grid-area: toggle;
    justify-self: end;
    display: inline-flex;
  }

  .nav-primary {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin: 0 var(--gutter);
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(17, 26, 53, .985), rgba(7, 11, 30, .985));
    box-shadow: 0 34px 66px -32px rgba(0, 0, 0, .98);
  }
  .nav-primary[data-open] {
    display: block;
    animation: yx-nav-in .22s var(--ease);
  }
  .nav-primary__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav-primary__link {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 16px;
  }
  .nav-primary__link::after {
    right: auto;
    left: 14px;
    bottom: 6px;
    width: 18px;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .grid--main-aside,
  .grid--aside-main { grid-template-columns: minmax(0, 1fr); }

  .display-1 { letter-spacing: -.01em; }
}

@keyframes yx-nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 17. 响应式：手机 ---------- */
@media (max-width: 620px) {
  body { font-size: 16px; line-height: 1.75; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-brand { letter-spacing: .2em; }
  .action-chip { padding: 7px 12px; font-size: 12px; }
  .nav-toggle__label { display: none; }
  .back-to-top { padding: 10px 14px; }
}

/* ---------- 18. 降低动效 / 无障碍 ---------- */
@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] { opacity: 1; transform: none; }
  .scroll-progress { display: none; }
  .btn:hover { transform: none; }
}
