/* ============================================================
   天宝博赛场 · 全站共享样式 /assets/site.css
   深墨绿夜场底 + 熔铜金 / 荧光青 / 朱砂红强调
   ============================================================ */

:root {
  --ink-900: #08140F;
  --carbon-950: #0D1011;
  --green-800: #16302A;
  --paper-50: #F4EEE2;
  --paper-200: #E2D9C7;
  --gold-500: #C98A2E;
  --gold-300: #E7C070;
  --cyan-400: #35E0C8;
  --vermilion-500: #D4432F;
  --mist-300: #C3D2CB;
  --mist-500: #7E9189;
  --line-600: #2A4740;

  --font-display: "Archivo Narrow", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --font-body: "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shell-max: 1480px;
  --shell-pad: clamp(16px, 3vw, 40px);
  --radius: 2px;

  --header-h: 76px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

ul, ol { list-style: none; }

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

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

table { border-collapse: collapse; border-spacing: 0; }

/* ---------- 全局底色：扫描线 + 两处灯柱辉光 ---------- */
body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1200px 620px at 84% -12%, rgba(53, 224, 200, 0.075), rgba(0, 0, 0, 0) 70%),
    radial-gradient(900px 520px at 6% 2%, rgba(201, 138, 46, 0.085), rgba(0, 0, 0, 0) 70%),
    repeating-linear-gradient(0deg, rgba(195, 210, 203, 0.028) 0 1px, rgba(0, 0, 0, 0) 1px 4px);
  background-attachment: fixed;
  color: var(--mist-300);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

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

::selection {
  background: rgba(53, 224, 200, 0.28);
  color: var(--paper-50);
}

/* ---------- 排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.16;
  color: var(--paper-50);
}

h1 { font-size: clamp(30px, 5.4vw, 52px); }
h2 { font-size: clamp(23px, 3.4vw, 34px); }
h3 { font-size: clamp(18px, 2.2vw, 24px); }
h4 { font-size: 17px; }
h5 { font-size: 15px; }
h6 { font-size: 13px; letter-spacing: 0.12em; }

p { margin: 0; }

a { color: var(--gold-300); }

strong, b { font-weight: 700; color: var(--paper-50); }

small { font-size: 12.5px; }

hr {
  border: 0;
  border-top: 1px solid var(--line-600);
  margin: 32px 0;
}

/* ---------- 焦点态 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -70px;
  left: 14px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--gold-500);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 14px;
  outline-color: var(--paper-50);
}

/* ---------- 容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--shell-pad);
}

.shell--narrow { max-width: 1080px; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 20, 15, 0.93);
  border-bottom: 1px solid var(--line-600);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-inner {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--shell-pad);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--paper-50);
}

.brand-glyph {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--gold-500);
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  background: rgba(201, 138, 46, 0.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--paper-50);
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--mist-500);
  white-space: nowrap;
}

.round-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  background: rgba(53, 224, 200, 0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist-300);
  white-space: nowrap;
}

.round-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-400);
  box-shadow: 0 0 8px rgba(53, 224, 200, 0.8);
}

@media (prefers-reduced-motion: no-preference) {
  .round-dot { animation: roundPulse 2.6s ease-in-out infinite; }
  @keyframes roundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.32; }
  }
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  color: var(--paper-50);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.nav-toggle:hover { border-color: var(--gold-500); color: var(--gold-300); }

.nav-toggle-ico {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
  height: 12px;
}

.nav-toggle-ico i {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--gold-300);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle-ico i:nth-child(2) { width: 66%; }

.nav-toggle[aria-expanded="true"] .nav-toggle-ico i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-ico i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-ico i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-toggle-label { white-space: nowrap; }

/* ---------- 右侧栏目导航 ---------- */
.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 0;
}

.nav-anno {
  display: none;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--mist-500);
}

.nav-list {
  counter-reset: navidx;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
}

.nav-item {
  counter-increment: navidx;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.nav-item::before {
  content: counter(navidx, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  color: var(--mist-500);
  letter-spacing: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 4px 0;
  color: var(--mist-300);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  transition: color 0.18s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold-500);
  transition: width 0.22s ease;
}

.nav-link:hover { color: var(--paper-50); }
.nav-link:hover::after { width: 100%; }

.nav-link[aria-current="page"] { color: var(--gold-300); }
.nav-link[aria-current="page"]::after {
  width: 100%;
  background: var(--cyan-400);
}

.nav-source {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mist-500);
  white-space: nowrap;
}

.nav-close {
  display: none;
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-close::before,
.nav-close::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 1px;
  background: var(--gold-300);
}

.nav-close::before { transform: rotate(45deg); }
.nav-close::after { transform: rotate(-45deg); }
.nav-close:hover { border-color: var(--cyan-400); }

/* ---------- 遮罩 ---------- */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(4, 10, 8, 0.74);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-scrim[data-open] {
  opacity: 1;
  visibility: visible;
}

/* ---------- 移动端抽屉 ---------- */
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(340px, 88vw);
    padding: 84px 24px 32px;
    background: var(--carbon-950);
    border-left: 1px solid var(--line-600);
    align-items: flex-start;
    overflow-y: auto;
    transform: translateX(103%);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.45);
  }

  .site-nav[data-open] { transform: translateX(0); }

  .nav-close { display: inline-flex; }
  .nav-anno { display: none; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-item {
    width: 100%;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line-600);
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 15px 0;
    font-size: 17px;
  }

  .nav-source {
    margin-top: 20px;
    white-space: normal;
    line-height: 1.8;
  }
}

@media (max-width: 680px) {
  .brand-sub { display: none; }
  .round-badge { font-size: 10px; padding: 4px 8px; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 10px 12px; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 110px);
  background: var(--carbon-950);
  border-top: 1px solid var(--line-600);
  color: var(--mist-300);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500) 0%, var(--cyan-400) 44%, rgba(0, 0, 0, 0) 88%);
  opacity: 0.78;
}

.footer-inner {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--shell-pad) 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.55fr);
  gap: clamp(28px, 4vw, 72px);
  padding-bottom: clamp(26px, 3.4vw, 44px);
  border-bottom: 1px solid var(--line-600);
}

.footer-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--paper-50);
}

.footer-tagline {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cyan-400);
}

.footer-summary {
  margin-top: 14px;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--mist-300);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-content: start;
}

.footer-col-title {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--paper-50);
}

.footer-col-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20px;
  height: 1px;
  background: var(--gold-500);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  font-size: 14.5px;
  color: var(--mist-500);
  text-decoration: none;
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.footer-links a:hover {
  color: var(--gold-300);
  padding-left: 4px;
}

.footer-meta {
  display: grid;
  gap: 10px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-600);
}

.footer-contact {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--mist-300);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.footer-note {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--mist-500);
  max-width: 78ch;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist-500);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist-500);
}

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

@media (max-width: 640px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--paper-50);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn--gold {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--ink-900);
}

.btn--gold:hover {
  background: var(--gold-300);
  border-color: var(--gold-300);
}

.btn--outline {
  border-color: var(--line-600);
  color: var(--paper-50);
}

.btn--outline:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}

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

.btn--paper:hover { background: var(--paper-200); border-color: var(--paper-200); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--mist-500);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

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

.breadcrumb li + li::before {
  content: "/";
  margin: 0 9px;
  color: var(--line-600);
}

.breadcrumb a {
  color: var(--mist-300);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--gold-300); }

/* ---------- 章节 ---------- */
.section {
  padding-block: clamp(32px, 5vw, 72px);
}

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

.section--paper {
  background: var(--paper-50);
  background-image: repeating-linear-gradient(0deg, rgba(20, 32, 27, 0.02) 0 1px, rgba(0, 0, 0, 0) 1px 5px);
  color: #14201B;
  border-top: 1px solid var(--paper-200);
  border-bottom: 1px solid var(--paper-200);
}

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: #101915; }

.section--paper .lead { color: #1B2A24; }
.section--paper .eyebrow { color: #8A5A12; }
.section--paper .stat-figure { color: #8A5A12; }
.section--paper .stat-label,
.section--paper .stat-unit { color: #5C6B64; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  margin-bottom: clamp(18px, 2.6vw, 34px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.lead {
  margin-top: 14px;
  max-width: 62ch;
  font-size: 18px;
  line-height: 1.85;
  color: var(--paper-50);
}

.anno {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--mist-500);
  text-transform: uppercase;
}

/* ---------- Bento 栅格 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}

.bento > * { grid-column: span 12; }

@media (min-width: 720px) {
  .bento .b-3 { grid-column: span 6; }
  .bento .b-4 { grid-column: span 6; }
  .bento .b-6 { grid-column: span 12; }
  .bento .b-8 { grid-column: span 12; }
  .bento .b-9 { grid-column: span 12; }
  .bento .b-12 { grid-column: span 12; }
}

@media (min-width: 1080px) {
  .bento .b-3 { grid-column: span 3; }
  .bento .b-4 { grid-column: span 4; }
  .bento .b-6 { grid-column: span 6; }
  .bento .b-8 { grid-column: span 8; }
  .bento .b-9 { grid-column: span 9; }
  .bento .b-12 { grid-column: span 12; }
}

/* ---------- 面板 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2vw, 28px);
  background: var(--green-800);
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel--ink { background: var(--carbon-950); }

.panel--flat {
  background: transparent;
  box-shadow: none;
}

.panel--paper {
  background: var(--paper-50);
  border-color: var(--paper-200);
  color: #14201B;
  box-shadow: var(--shadow-soft);
}

.panel--paper h2,
.panel--paper h3,
.panel--paper h4 { color: #101915; }

.panel--paper a { color: #8A5A12; }
.panel--paper .eyebrow { color: #8A5A12; }
.panel--paper .stat-figure { color: #8A5A12; }
.panel--paper .stat-label,
.panel--paper .stat-unit { color: #5C6B64; }

.panel--accent { border-left: 2px solid var(--gold-500); }
.panel--risk { border-left: 2px solid var(--vermilion-500); }

/* ---------- 统计数字 ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(18px, 3vw, 44px);
}

.stat-figure {
  font-family: var(--font-mono);
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--gold-300);
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  margin-left: 5px;
  font-size: 0.4em;
  color: var(--mist-500);
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mist-500);
}

/* ---------- 胶囊 / 筛选 ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line-600);
  border-radius: 999px;
  background: transparent;
  color: var(--mist-300);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.chip:hover {
  border-color: var(--gold-300);
  color: var(--gold-300);
}

.chip[aria-pressed="true"] {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  background: rgba(53, 224, 200, 0.09);
}

/* ---------- 分段标签 ---------- */
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line-600);
}

.tab {
  appearance: none;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  background: transparent;
  color: var(--mist-500);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

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

.tab[aria-selected="true"] {
  color: var(--gold-300);
  border-bottom-color: var(--gold-500);
  background: rgba(201, 138, 46, 0.09);
}

.tabpanel { padding-top: 20px; }
.tabpanel[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .tabpanel.is-entering { animation: panelIn 160ms ease-out both; }
  @keyframes panelIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- 时间线 ---------- */
.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line-600);
}

.timeline-item {
  position: relative;
  padding-bottom: 22px;
  transition: color 0.2s ease;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-900);
  border: 1px solid var(--mist-500);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline[data-scroll-spy] .timeline-item { color: var(--mist-500); }

.timeline-item.is-active,
.timeline[data-scroll-spy] .timeline-item.is-active { color: var(--mist-300); }

.timeline-item.is-active::before {
  background: var(--gold-300);
  border-color: var(--gold-300);
  box-shadow: 0 0 0 3px rgba(231, 192, 112, 0.18);
}

.timeline-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--mist-500);
  margin-bottom: 4px;
}

.timeline-item.is-active .timeline-time { color: var(--cyan-400); }

.timeline-body { font-size: 15.5px; line-height: 1.85; }

/* ---------- 数据表 ---------- */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  background: var(--green-800);
}

.data-table {
  width: 100%;
  min-width: 620px;
  font-size: 15px;
}

.data-table caption {
  caption-side: top;
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--mist-500);
  border-bottom: 1px solid var(--line-600);
}

.data-table th,
.data-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(42, 71, 64, 0.72);
  vertical-align: top;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--carbon-950);
  color: var(--paper-50);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.data-table tbody tr:nth-child(even) { background: rgba(22, 48, 42, 0.55); }
.data-table tbody tr:hover { background: rgba(53, 224, 200, 0.07); }

.data-table th:first-child,
.data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ink-900);
}

.data-table thead th:first-child { background: var(--carbon-950); }

.data-table td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--paper-50);
  white-space: nowrap;
}

.data-table tfoot td {
  font-size: 12.5px;
  color: var(--mist-500);
  background: var(--carbon-950);
}

/* ---------- 图片容器基础规则 ---------- */
.figure {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: var(--green-800);
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
}

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

.figure__media,
.figure img,
.figure video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__blank {
  position: absolute;
  inset: 0;
  background-color: var(--green-800);
  background-image:
    repeating-linear-gradient(90deg, rgba(53, 224, 200, 0.07) 0 1px, rgba(0, 0, 0, 0) 1px 26px),
    repeating-linear-gradient(0deg, rgba(53, 224, 200, 0.07) 0 1px, rgba(0, 0, 0, 0) 1px 26px),
    linear-gradient(148deg, #16302A 0%, #0B1A15 62%, #08140F 100%);
}

.figure--scrim::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 20, 15, 0) 0%, rgba(8, 20, 15, 0.88) 100%);
}

.figure__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 9px;
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  background: rgba(8, 20, 15, 0.82);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cyan-400);
}

.figure__score {
  position: absolute;
  right: 16px;
  bottom: 8px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: clamp(40px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--paper-50);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.75);
}

.figure__caption {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--mist-500);
}

/* ---------- 左侧章节索引 ---------- */
.index-rail {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  align-self: start;
  padding-left: 14px;
  border-left: 1px solid var(--line-600);
}

.index-rail-title {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--mist-500);
  text-transform: uppercase;
}

.index-rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.index-rail-link {
  display: block;
  margin-left: -16px;
  padding: 6px 0 6px 15px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mist-500);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.index-rail-link:hover { color: var(--paper-50); }

.index-rail-link[aria-current="true"],
.index-rail-link.is-current {
  color: var(--cyan-400);
  border-left-color: var(--cyan-400);
}

@media (max-width: 1024px) {
  .index-rail {
    position: sticky;
    top: var(--header-h);
    z-index: 30;
    padding-left: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line-600);
    padding-block: 10px;
    background: rgba(8, 20, 15, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .index-rail-title { display: none; }

  .index-rail-list {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .index-rail-list::-webkit-scrollbar { display: none; }

  .index-rail-link {
    flex: none;
    margin-left: 0;
    padding: 6px 13px;
    border: 1px solid var(--line-600);
    border-radius: 999px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .index-rail-link.is-current {
    border-color: var(--cyan-400);
    color: var(--cyan-400);
  }
}

/* ---------- 正文阅读区 ---------- */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
  color: var(--mist-300);
}

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  margin-top: 1.9em;
  padding-top: 0.7em;
  border-top: 1px solid var(--line-600);
}

.prose h3 { margin-top: 1.6em; }

.prose a {
  color: var(--gold-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--cyan-400); }

.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.prose li {
  position: relative;
  padding-left: 20px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.86em;
  width: 9px;
  height: 1px;
  background: var(--gold-500);
}

.prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--gold-500);
  color: var(--paper-50);
}

.prose code,
.prose kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  border: 1px solid var(--line-600);
  border-radius: var(--radius);
  background: rgba(13, 16, 17, 0.6);
  color: var(--cyan-400);
}

.prose--paper { color: #1B2A24; }

.prose--paper h2,
.prose--paper h3 { color: #101915; border-color: var(--paper-200); }

.prose--paper a { color: #8A5A12; }
.prose--paper blockquote { color: #101915; }
.prose--paper code,
.prose--paper kbd {
  background: rgba(226, 217, 199, 0.7);
  border-color: #C9BEAA;
  color: #1B2A24;
}

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

/* ---------- 滚动显现 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html[data-reveal-ready] [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

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

/* ---------- 工具类 ---------- */
.text-mist { color: var(--mist-500); }
.text-paper { color: var(--paper-50); }
.text-gold { color: var(--gold-300); }
.text-cyan { color: var(--cyan-400); }
.text-risk { color: var(--vermilion-500); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-md { display: flex; flex-direction: column; gap: 18px; }
.flow-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 减少动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .site-nav { transform: none; }
  .site-nav[data-open] { transform: none; }
}
