/* ==========================================================================
   必一体育 BSPORTS · 共享外壳样式 /assets/site.css
   纵向叙事长卷 · 非对称网格 · 深蓝赛场科技感
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--txt-on-dark);
  background: var(--c-ink-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { display: block; }

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

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

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

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

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩 */
  --c-ink-deep: #060B1A;
  --c-ink: #0B1633;
  --c-pitch: #12245C;
  --c-paper: #F4F7F5;
  --c-neon: #00E676;
  --c-neon-deep: #06813F;
  --c-orange: #FF8A1F;
  --c-lime: #B8FF5C;
  --c-mist: #7C8BB0;
  --c-aqua: #1DE9B6;

  --c-glass: rgba(255, 255, 255, 0.08);
  --c-glass-line: rgba(255, 255, 255, 0.14);
  --line-dark: rgba(124, 139, 176, 0.28);
  --line-light: rgba(11, 22, 51, 0.14);

  --txt-on-dark: #EEF3F6;
  --txt-on-dark-dim: #A8B6D4;
  --txt-on-light: #0B1633;
  --txt-on-light-dim: #4A5878;

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

  /* 尺度 */
  --w-max: 1320px;
  --pad-x: clamp(18px, 4vw, 56px);
  --radius: 2px;
  --header-h: 76px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--c-neon);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  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;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 11px 20px;
  background: var(--c-neon);
  color: #04160C;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.22s var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 4. 排版辅助 ---------- */
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-neon);
}

.lead {
  max-width: 62ch;
  margin: 0 0 24px;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.85;
  color: var(--txt-on-dark-dim);
}

.muted { color: var(--c-mist); }

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

/* ---------- 5. 容器与章节分区 ---------- */
.wrap {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section {
  position: relative;
  padding: clamp(64px, 9vw, 140px) 0;
}

.section--deep { background: var(--c-ink-deep); color: var(--txt-on-dark); }
.section--ink { background: var(--c-ink); color: var(--txt-on-dark); }
.section--pitch { background: var(--c-pitch); color: var(--txt-on-dark); }

.section--paper {
  background: var(--c-paper);
  color: var(--txt-on-light);
}

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 {
  color: var(--txt-on-light);
}

.section--paper p,
.section--paper li,
.section--paper .lead {
  color: var(--txt-on-light-dim);
}

.section--paper .eyebrow { color: var(--c-neon-deep); }
.section--paper .chapter__index { color: var(--c-neon-deep); }
.section--paper .muted { color: #6B7695; }

.edge-slash {
  display: block;
  height: clamp(36px, 6vw, 96px);
  background: var(--c-ink);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

/* ---------- 6. 非对称网格与栅格 ---------- */
.layout-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
}

.layout-rail__aside { min-width: 0; }
.layout-rail__main { min-width: 0; }

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 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)); }

/* ---------- 7. 章节目录 ---------- */
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 28px);
  align-items: start;
  margin: 0 0 clamp(24px, 4vw, 46px);
}

.chapter__index {
  margin: 0;
  padding-top: 0.45em;
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-neon);
}

.chapter__title {
  margin: 0;
  font-size: clamp(1.85rem, 4.6vw, 4.2rem);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--txt-on-dark);
}

/* ---------- 8. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(6, 11, 26, 0.86);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--txt-on-dark);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--c-neon) 0 12%, transparent 12% 100%);
  opacity: 0.55;
  pointer-events: none;
}

.header-frame {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 40px);
  width: 100%;
  max-width: var(--w-max);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  transition: min-height 0.3s var(--ease-out);
}

.site-header[data-scrolled] .header-frame { min-height: 58px; }

.header-zone--brand {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  min-width: 0;
}

.header-zone--nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  margin-left: auto;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  padding: 3px 9px;
  background: var(--c-pitch);
  border-left: 2px solid var(--c-neon);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--txt-on-dark);
}

.brand__name {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-mist);
}

.brand--footer .brand__name { color: var(--c-mist); }

.header-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--c-mist);
  white-space: nowrap;
  transition: opacity 0.25s var(--ease-out);
}

.header-meta__num {
  color: var(--c-neon);
  font-weight: 600;
}

.site-header[data-scrolled] .header-meta {
  opacity: 0;
  pointer-events: none;
}

.header-ruler {
  flex: 1 1 auto;
  min-width: 24px;
  height: 16px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--c-mist) 0 1px,
    transparent 1px 14px
  );
  background-repeat: repeat-x;
  background-size: 14px 5px;
  background-position: 0 50%;
  opacity: 0.45;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.7vw, 24px);
}

.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--txt-on-dark-dim);
  text-decoration: none;
  transition: color 0.22s var(--ease-out);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--c-neon);
  transition: right 0.28s var(--ease-out);
}

.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--txt-on-dark); }

.site-nav__link:hover::after { right: 0; }

.site-nav__link[aria-current="page"] {
  color: var(--c-neon);
  font-weight: 500;
}

.site-nav__link[aria-current="page"]::after { right: 0; }

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--c-mist);
  white-space: nowrap;
}

.live-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.55);
  animation: bs-pulse 2.8s ease-out infinite;
}

@keyframes bs-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--c-glass);
  border: 1px solid var(--c-glass-line);
  border-radius: var(--radius);
  color: var(--txt-on-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: border-color 0.22s var(--ease-out), color 0.22s var(--ease-out);
}

.nav-toggle::after {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 -4px 0 currentColor, 0 4px 0 currentColor;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--c-neon);
  color: var(--c-neon);
}

.site-header[data-open] .nav-toggle {
  border-color: var(--c-neon);
  color: var(--c-neon);
}

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

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  padding: clamp(52px, 7vw, 100px) 0 0;
  background: var(--c-ink-deep);
  color: var(--txt-on-dark-dim);
  border-top: 1px solid var(--line-dark);
}

.footer-frame {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr) minmax(0, 1.2fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
}

.footer-brand { min-width: 0; }

.footer-tagline {
  max-width: 24ch;
  margin: 18px 0 22px;
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--txt-on-dark-dim);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
}

.footer-col { min-width: 0; }

.footer-col__title,
.footer-contact__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-neon);
}

.footer-col__list {
  display: grid;
  gap: 9px;
}

.footer-col__link {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--txt-on-dark-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.footer-col__link:hover,
.footer-col__link:focus-visible {
  color: var(--txt-on-dark);
  border-bottom-color: var(--c-neon);
}

.footer-contact { min-width: 0; }

.footer-contact__item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 10px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--txt-on-dark-dim);
}

.footer-contact__key {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--c-mist);
}

.footer-rule {
  height: 12px;
  margin-top: clamp(34px, 5vw, 64px);
  background-image: repeating-linear-gradient(
    90deg,
    var(--line-dark) 0 1px,
    transparent 1px 20px
  );
  background-repeat: repeat-x;
  background-size: 20px 6px;
  background-position: 0 0;
  border-bottom: 1px solid var(--line-dark);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding: 22px 0 40px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--c-mist);
}

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal__link {
  color: var(--txt-on-dark-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line-dark);
  transition: color 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.footer-legal__link:hover,
.footer-legal__link:focus-visible {
  color: var(--c-neon);
  border-bottom-color: var(--c-neon);
}

.footer-legal__icp { margin: 0; }

.footer-legal__copy {
  margin: 0 0 0 auto;
  color: var(--c-mist);
}

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease-out), color 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.btn--primary {
  background: var(--c-neon);
  border-color: var(--c-neon);
  color: #04160C;
  font-weight: 700;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #4CFFA6;
  border-color: #4CFFA6;
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--c-glass);
  border-color: var(--c-glass-line);
  color: var(--txt-on-dark);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--c-neon);
  color: var(--c-neon);
}

.btn--ink {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: var(--c-paper);
}

.btn--ink:hover,
.btn--ink:focus-visible {
  background: var(--c-pitch);
  border-color: var(--c-pitch);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 10px 16px;
  font-size: 0.68rem;
}

/* ---------- 11. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--c-mist);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--c-mist);
  opacity: 0.7;
}

.breadcrumb__link {
  color: var(--c-mist);
  text-decoration: none;
  transition: color 0.22s var(--ease-out);
}

.breadcrumb__link:hover,
.breadcrumb__link:focus-visible { color: var(--c-neon); }

.breadcrumb__current { color: var(--txt-on-dark); }

.breadcrumb--paper .breadcrumb__link { color: #6B7695; }
.breadcrumb--paper .breadcrumb__current { color: var(--txt-on-light); }
.breadcrumb--paper .breadcrumb__item:not(:last-child)::after { color: #98A2BC; }

/* ---------- 12. 内容层 / 数据卡 ---------- */
.panel {
  padding: clamp(20px, 2.6vw, 32px);
  background: var(--c-pitch);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.glass {
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--c-glass);
  border: 1px solid var(--c-glass-line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.section--paper .panel {
  background: #FFFFFF;
  border-color: var(--line-light);
}

.stat { display: block; }

.stat__value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--c-neon);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-mist);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-mist);
}

.tag--neon {
  color: var(--c-neon);
  border-color: rgba(0, 230, 118, 0.4);
  background: rgba(0, 230, 118, 0.08);
}

.tag--orange {
  color: var(--c-orange);
  border-color: rgba(255, 138, 31, 0.4);
  background: rgba(255, 138, 31, 0.08);
}

.tag--lime {
  color: var(--c-lime);
  border-color: rgba(184, 255, 92, 0.4);
  background: rgba(184, 255, 92, 0.08);
}

/* ---------- 13. 数据表 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.data-table {
  min-width: 560px;
  font-size: 0.86rem;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 16px;
  background: var(--c-pitch);
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: var(--c-mist);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-dark);
  line-height: 1.5;
  color: var(--txt-on-dark-dim);
}

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table tbody tr:hover { background: rgba(0, 230, 118, 0.06); }

.data-table .num {
  font-family: var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--txt-on-dark);
}

.section--paper .table-wrap {
  background: #FFFFFF;
  border-color: var(--line-light);
}

.section--paper .data-table th {
  background: #E7EDEA;
  border-color: var(--line-light);
  color: var(--txt-on-light-dim);
}

.section--paper .data-table td {
  border-color: var(--line-light);
  color: var(--txt-on-light-dim);
}

.section--paper .data-table .num { color: var(--txt-on-light); }

.section--paper .data-table tbody tr:hover { background: rgba(0, 230, 118, 0.1); }

/* ---------- 14. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--c-pitch);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.media::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-left: 2px solid var(--c-neon);
  border-top: 2px solid var(--c-neon);
  opacity: 0.85;
  pointer-events: none;
}

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

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }

.media-frame {
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.media-frame .media { border: 0; }

.media__caption {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--c-mist);
}

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

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

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  font-size: 0.98rem;
  color: var(--txt-on-dark);
  cursor: pointer;
  list-style: none;
}

.accordion__summary::-webkit-details-marker { display: none; }

.accordion__summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--c-neon);
}

.accordion__item[open] .accordion__summary::after { content: "\2013"; }

.accordion__body {
  padding: 0 0 20px;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--txt-on-dark-dim);
}

.section--paper .accordion,
.section--paper .accordion__item { border-color: var(--line-light); }

.section--paper .accordion__summary { color: var(--txt-on-light); }

.section--paper .accordion__body { color: var(--txt-on-light-dim); }

.section--paper .accordion__summary::after { color: var(--c-neon-deep); }

/* ---------- 16. 标签页与筛选 ---------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.tabs__btn {
  padding: 9px 16px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--c-mist);
  cursor: pointer;
  transition: color 0.22s var(--ease-out), border-color 0.22s var(--ease-out),
    background-color 0.22s var(--ease-out);
}

.tabs__btn:hover { color: var(--txt-on-dark); border-color: var(--c-mist); }

.tabs__btn[aria-selected="true"] {
  background: var(--c-neon);
  border-color: var(--c-neon);
  color: #04160C;
  font-weight: 700;
}

.tabs__panel { display: none; }

.tabs__panel[data-active] { display: block; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--c-mist);
  cursor: pointer;
  transition: color 0.22s var(--ease-out), border-color 0.22s var(--ease-out),
    background-color 0.22s var(--ease-out);
}

.chip:hover { color: var(--txt-on-dark); }

.chip[aria-pressed="true"] {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.5);
  color: var(--c-neon);
}

/* ---------- 17. 章节跟随轨道 ---------- */
.rail {
  position: sticky;
  top: clamp(88px, 14vh, 132px);
  display: grid;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line-dark);
}

.rail__title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-mist);
}

.rail__link {
  display: block;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--c-mist);
  text-decoration: none;
  transition: color 0.22s var(--ease-out), padding-left 0.22s var(--ease-out);
}

.rail__link:hover,
.rail__link:focus-visible { color: var(--txt-on-dark); }

.rail__link[aria-current="true"] {
  color: var(--c-neon);
  padding-left: 8px;
}

.section--paper .rail { border-left-color: var(--line-light); }
.section--paper .rail__link[aria-current="true"] { color: var(--c-neon-deep); }

[data-section] { scroll-margin-top: 100px; }

/* ---------- 18. 滚动进度与返回顶部 ---------- */
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-neon), var(--c-lime));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: rgba(6, 11, 26, 0.88);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  color: var(--c-neon);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity 0.26s var(--ease-out), transform 0.26s var(--ease-out),
    visibility 0.26s linear, border-color 0.22s var(--ease-out);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover,
.to-top:focus-visible { border-color: var(--c-neon); }

/* ---------- 19. 显现 ---------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.42s var(--ease-out), transform 0.42s var(--ease-out);
}

html.has-js [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1180px) {
  .live-status { display: none; }
}

@media (max-width: 1080px) {
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    grid-template-areas:
      "brand cols"
      "contact contact";
  }

  .footer-brand { grid-area: brand; }
  .footer-cols { grid-area: cols; }
  .footer-contact { grid-area: contact; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }

  .header-ruler { display: none; }

  .header-zone--nav { position: static; }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: 6px var(--pad-x) 24px;
    background: rgba(6, 11, 26, 0.97);
    border-bottom: 1px solid var(--line-dark);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }

  .site-header[data-open] .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__item { border-bottom: 1px solid var(--line-dark); }

  .site-nav__item:last-child { border-bottom: 0; }

  .site-nav__link {
    display: block;
    padding: 15px 0;
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"] {
    padding-left: 14px;
    border-left: 2px solid var(--c-neon);
    background: rgba(0, 230, 118, 0.06);
  }
}

@media (max-width: 900px) {
  .layout-rail { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-bottom: 28px;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line-dark);
    padding-top: 14px;
  }

  .rail__title { width: 100%; margin-bottom: 4px; }

  .rail__link { padding: 3px 0; }
  .rail__link[aria-current="true"] { padding-left: 0; }
}

@media (max-width: 760px) {
  .chapter { grid-template-columns: minmax(0, 1fr); }

  .chapter__index { padding-top: 0; }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "cols"
      "contact";
  }

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

  .footer-legal__copy { margin-left: 0; }
}

@media (max-width: 700px) {
  .header-meta { display: none; }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }

  .footer-cols { grid-template-columns: minmax(0, 1fr); }

  .btn { width: 100%; }

  .footer-brand .btn { width: auto; }
}

/* ---------- 21. 动效降级 ---------- */
@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;
  }

  html.has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .scroll-progress { display: none; }

  .live-status__dot { animation: none; }

  .btn--primary:hover,
  .btn--ink:hover { transform: none; }
}
