/* ============================================================
   易倍看台 · 共享样式 /assets/site.css
   夜场墨绿底 + 电光青强调 + 等宽数字 + 精密网格
   ============================================================ */

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #04120C; scroll-behavior: smooth; scroll-padding-top: 76px; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, hr { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }
input, textarea, select { font: inherit; }

/* ---------- 2. tokens ---------- */
:root {
  --bg-0: #04120C;
  --bg-1: #0B2418;
  --bg-2: #1C5136;
  --line: #1E4030;
  --accent: #00E5C8;
  --accent-soft: #7CF3E4;
  --lime: #CBF23C;
  --stoppage: #FF7A3D;
  --ink: #EEF3EF;
  --ink-2: #8FA99B;

  --rail-w: 88px;
  --rail-w-open: 240px;
  --gutter: 20px;

  --font-serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  --font-sans: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "DIN Next", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, .68, .28, 1);
  --dur: .28s;
}
@media (min-width: 861px) { :root { --gutter: 40px; } }

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: .01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 861px) { body { padding-left: var(--rail-w); } }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.02em;
  color: var(--ink);
}
h1 { font-size: clamp(30px, 4.6vw, 54px); }
h2 { font-size: clamp(23px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2vw, 22px); }
h4 { font-size: 16px; }

p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--bg-0); }

/* ---------- 4. 通用类 ---------- */
.num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  line-height: .9;
}
.micro {
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .12em;
  color: var(--ink-2);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--accent);
}
.slant { display: inline-block; transform: skewX(-4deg); transform-origin: left bottom; }

/* 版心与栅格 */
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; gap: var(--gutter); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }
@media (max-width: 1023px) {
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9 { grid-column: span 6; }
}
@media (max-width: 639px) {
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9 { grid-column: span 12; }
}

/* 区块 */
.section { padding: clamp(44px, 6.5vw, 100px) 0; }
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(24px, 3vw, 40px);
}
.divider { height: 1px; background: var(--line); border: 0; }

/* 正文 */
.prose { max-width: 66ch; font-size: 16px; line-height: 1.85; color: var(--ink); }
.prose p + p { margin-top: 1.05em; }
.prose h2 { font-size: 22px; margin: 2em 0 .55em; }
.prose h3 { font-size: 18px; margin: 1.6em 0 .45em; }
.prose ul, .prose ol { margin: 1em 0; padding-left: 1.15em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(0, 229, 200, .35); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose strong { font-weight: 700; }

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-2);
}
.breadcrumb__link { color: var(--ink-2); border-bottom: 1px solid transparent; }
.breadcrumb__link:hover { color: var(--accent); border-bottom-color: rgba(0, 229, 200, .5); }
.breadcrumb__sep { color: rgba(143, 169, 155, .5); }
.breadcrumb__item[aria-current="page"] { color: var(--accent); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .06em;
  line-height: 1.3;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--bg-0); font-weight: 700; }
.btn--primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--bg-0); }
.btn--ghost { color: var(--ink-2); }
.btn--ghost:hover { color: var(--accent); }
.btn--sm { padding: 9px 13px; font-size: 12px; }
.rail__actions .btn { width: 100%; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-2);
  line-height: 1.5;
}
.tag--accent { color: var(--accent); border-color: rgba(0, 229, 200, .4); }
.tag--lime { color: var(--lime); border-color: rgba(203, 242, 60, .4); }
.tag--stoppage { color: var(--stoppage); border-color: rgba(255, 122, 61, .45); }

/* 数据块 */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(44px, 8vw, 128px);
  line-height: .9;
  letter-spacing: -.03em;
  color: var(--accent);
}
.stat__value--lime { color: var(--lime); }
.stat__value--stoppage { color: var(--stoppage); }
.stat__label { font-size: 11px; letter-spacing: .14em; color: var(--ink-2); }
.stat__note { font-size: 11px; line-height: 1.7; letter-spacing: .06em; color: var(--ink-2); max-width: 34ch; }

/* 卡片 */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 22px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }

/* 图文容器（供页面阶段放图） */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 2px;
  aspect-ratio: 16 / 9;
}
.media-frame__img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.06); }
.media-frame::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 2px;
  background: var(--accent);
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--pitch {
  background-image:
    repeating-linear-gradient(115deg, rgba(28, 81, 54, .55) 0 2px, transparent 2px 26px),
    linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 72%);
}
.media-frame__cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 9px;
  background: rgba(4, 18, 12, .74);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink);
}

/* ---------- 5. 头部 · 侧边轨道 ---------- */
.skip-link {
  position: fixed;
  left: 8px;
  top: -120px;
  z-index: 120;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg-0);
  font-size: 13px;
  font-weight: 700;
  border-radius: 2px;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 8px; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  padding: 18px 12px 20px;
  background-color: var(--bg-1);
  background-image: repeating-linear-gradient(90deg, rgba(30, 64, 48, .55) 0 1px, transparent 1px 22px);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.rail::-webkit-scrollbar { width: 4px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); }

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--line);
}
.rail__mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(0, 229, 200, .12), transparent 62%);
  color: var(--accent);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
}
.rail__mark::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 7px;
  height: 7px;
  background: var(--lime);
}
.rail__name { display: none; min-width: 0; }
.rail__name-cn {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--ink);
}
.rail__name-sub {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-2);
}

.rail__toggle { display: none; }

.rail__nav { display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; }
.rail__list { display: flex; flex-direction: column; gap: 4px; }
.rail__item { display: flex; }
.rail__link {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 9px 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--ink-2);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.rail__idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  color: rgba(143, 169, 155, .58);
}
.rail__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1;
  color: inherit;
}
.rail__link:hover { color: var(--accent-soft); background: rgba(0, 229, 200, .07); border-color: rgba(0, 229, 200, .28); }
.rail__link:hover .rail__idx { color: var(--accent-soft); }
.rail__link[aria-current="page"] { color: var(--accent); background: rgba(0, 229, 200, .1); }
.rail__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--accent);
}
.rail__link[aria-current="page"] .rail__idx { color: var(--accent); }

.rail__panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.rail__note { font-size: 11px; line-height: 1.75; letter-spacing: .06em; color: var(--ink-2); }
.rail__actions { display: flex; flex-direction: column; gap: 8px; }

/* 桌面端展开态（悬停 / 键盘focus / 手动 data-open） */
@media (min-width: 861px) {
  .site-header { transition: width var(--dur) var(--ease); }
  .site-header:hover,
  .site-header:focus-within,
  .site-header[data-open="true"] { width: var(--rail-w-open); }

  .site-header:hover .rail__brand,
  .site-header:focus-within .rail__brand,
  .site-header[data-open="true"] .rail__brand { flex-direction: row; align-items: center; gap: 12px; }

  .site-header:hover .rail__name,
  .site-header:focus-within .rail__name,
  .site-header[data-open="true"] .rail__name { display: block; }

  .site-header:hover .rail__link,
  .site-header:focus-within .rail__link,
  .site-header[data-open="true"] .rail__link {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
  }
  .site-header:hover .rail__label,
  .site-header:focus-within .rail__label,
  .site-header[data-open="true"] .rail__label {
    writing-mode: horizontal-tb;
    font-size: 14px;
    letter-spacing: .03em;
    line-height: 1.5;
  }
  .site-header:hover .rail__panel,
  .site-header:focus-within .rail__panel,
  .site-header[data-open="true"] .rail__panel { display: flex; }
}

/* 移动端：顶部条 + 抽屉 */
@media (max-width: 860px) {
  .site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
  }
  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 64px;
    padding: 0 16px;
    background-image: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .rail__brand { flex-direction: row; align-items: center; gap: 10px; padding: 0; border-bottom: 0; }
  .rail__mark { width: 34px; height: 34px; font-size: 16px; }
  .rail__name { display: block; }
  .rail__name-sub { display: none; }

  .rail__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--ink);
    font-size: 12px;
    letter-spacing: .12em;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  }
  .rail__toggle[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
  .rail__bars {
    position: relative;
    display: block;
    width: 16px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }
  .rail__bars::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: currentColor;
    transform: translateY(-50%);
  }

  .rail__nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    gap: 22px;
    padding: 22px 20px 48px;
    background: var(--bg-0);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }
  .rail__nav[data-open="true"] { visibility: visible; transform: translateX(0); }

  .rail__list { gap: 0; }
  .rail__link {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .rail__link[aria-current="page"] { background: transparent; }
  .rail__link[aria-current="page"]::before { top: 0; bottom: 0; }
  .rail__idx { font-size: 11px; }
  .rail__label { writing-mode: horizontal-tb; font-size: 16px; letter-spacing: .04em; line-height: 1.5; }

  .rail__panel { display: flex; margin-top: 0; gap: 16px; }
  .rail__actions { flex-direction: row; flex-wrap: wrap; }
  .rail__actions .btn { width: auto; flex: 1 1 140px; }
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  padding: 52px 0 28px;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 82%);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.footer__arc {
  position: absolute;
  left: 0;
  top: 0;
  width: 260px;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(-54%, -54%);
  pointer-events: none;
}
.footer__arc::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(30, 64, 48, .7);
  border-radius: 50%;
}
.footer__top {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 44px 32px;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}
.footer__brand-col { display: flex; flex-direction: column; gap: 12px; }
.footer__brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.footer__brand:hover { color: var(--accent); }
.footer__tagline { font-size: 15px; line-height: 1.7; color: var(--ink); max-width: 22ch; }
.footer__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-2);
}
.footer__col { min-width: 0; }
.footer__title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.footer__list { display: flex; flex-direction: column; gap: 9px; }
.footer__link {
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer__link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer__line { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.footer__base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 40px;
  padding-top: 22px;
}
.footer__note { font-size: 11.5px; line-height: 1.8; letter-spacing: .04em; color: var(--ink-2); max-width: 62ch; }
.footer__legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }
.footer__icp, .footer__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-2);
}
@media (max-width: 1023px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .footer__brand-col { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .site-footer { padding-top: 44px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__base { flex-direction: column; }
}

/* ---------- 7. 动效与交互反馈 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

.scroll-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: 70;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--lime));
  transition: width .12s linear;
}
@media (min-width: 861px) { .scroll-progress { left: var(--rail-w); } }
@media (max-width: 860px) { .scroll-progress { top: 63px; } }

/* 焦点态 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.rail__link:focus-visible { outline-offset: -1px; }

/* ---------- 8. 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .scroll-progress { display: none; }
  .site-header { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
