/* ============================================================
   项目历程站 · 2026.10.29 — 12.02
   纯静态，无外部依赖（离线可用）
   ============================================================ */

:root {
  --bg: #0a0d12;
  --bg-soft: #0e131b;
  --surface: #121924;
  --surface-2: #17202d;
  --line: #232e3e;
  --line-soft: #1a2331;
  --text: #dce3ee;
  --muted: #8a97ab;
  --dim: #5f6b7c;
  --gold: #e3b25c;
  --gold-dim: rgba(227, 178, 92, .14);
  --blue: #6fa8dc;
  --green: #7fb069;
  --orange: #e08a4b;
  --purple: #a78bda;
  --red: #e06c6c;
  --cyan: #5fc0c8;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --w: 1160px;
  --nav-h: 60px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 背景：两团极淡的光 + 细网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(227, 178, 92, .07), transparent 60%),
    radial-gradient(760px 480px at 92% 4%, rgba(95, 192, 200, .05), transparent 62%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .25) 100%);
  z-index: -1;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(1200px 700px at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(1200px 700px at 50% 0%, #000 20%, transparent 78%);
  z-index: -1;
}

::selection { background: rgba(227, 178, 92, .28); color: #fff; }

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

.wrap { width: min(var(--w), calc(100% - 48px)); margin: 0 auto; }

/* ---------- 顶栏 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 13, 18, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.solid { border-bottom-color: var(--line-soft); background: rgba(10, 13, 18, .92); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: baseline; gap: 10px; font-family: var(--serif); font-size: 17px; letter-spacing: .04em; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 600; }
.brand span { color: var(--dim); font-size: 11px; font-family: var(--mono); letter-spacing: .12em; }
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .04); text-decoration: none; }
.nav-links a.active { color: var(--gold); background: var(--gold-dim); }
.nav-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, var(--gold), var(--cyan)); opacity: .8; }

/* ---------- 首屏 ---------- */
.hero { padding: calc(var(--nav-h) + 84px) 0 40px; position: relative; }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .22em;
  color: var(--dim); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--gold); opacity: .7; }
h1.display {
  font-family: var(--serif);
  font-size: clamp(54px, 10.5vw, 132px);
  line-height: .98;
  letter-spacing: -.02em;
  font-weight: 600;
  margin: 22px 0 0;
  color: #f4f0e6;
}
h1.display em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px rgba(227, 178, 92, .75);
  position: relative;
}
.hero-sub {
  max-width: 640px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.85;
}
.hero-sub b { color: var(--text); font-weight: 500; }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.hero-meta span { display: flex; align-items: center; gap: 7px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(127, 176, 105, .14); }

/* 数字条 */
.stat-strip {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line-soft);
}
.stat {
  padding: 22px 20px 20px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; left: 0; top: 0; width: 0; height: 2px;
  background: var(--gold); opacity: .55; transition: width .6s ease;
}
.stat.in::after { width: 100%; }
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  color: #f2ede2;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.stat b i { font-style: normal; font-size: .52em; color: var(--gold); margin-left: 2px; }
.stat span { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.stat small { display: block; margin-top: 3px; font-size: 11px; color: var(--dim); font-family: var(--mono); }

/* 一句话 */
.verdict {
  margin: 56px 0 0;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: linear-gradient(100deg, rgba(227, 178, 92, .05), transparent 55%);
  font-family: var(--serif);
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.75;
  color: #e9e3d6;
}
.verdict small { display: block; margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .08em; }

/* 总览三栏 */
.overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); margin: 64px 0 0; border: 1px solid var(--line-soft); }
.ov { background: var(--bg-soft); padding: 26px 26px 28px; }
.ov h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .16em; color: var(--gold); font-family: var(--mono); font-weight: 500; }
.ov p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.85; }
.ov p b { color: var(--text); font-weight: 500; }

/* ---------- 通用段落 ---------- */
.section { padding: 96px 0 8px; }
.section-head { display: flex; align-items: flex-end; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 40px; flex-wrap: wrap; }
.idx { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: .1em; padding-bottom: 6px; }
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: .01em;
  color: #f0ebdf;
  line-height: 1.2;
}
.section-head p { margin: 0 0 6px auto; color: var(--dim); font-size: 13px; max-width: 420px; text-align: right; line-height: 1.7; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s;
  font-family: var(--sans);
}
.chip:hover { color: var(--text); border-color: #34455c; }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1408; font-weight: 600; }
.search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 5px 14px;
  min-width: 230px;
  transition: border-color .2s;
}
.search:focus-within { border-color: var(--gold); }
.search svg { width: 14px; height: 14px; stroke: var(--dim); fill: none; stroke-width: 2; flex: none; }
.search input { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none; width: 100%; }
.search input::placeholder { color: var(--dim); }

/* ---------- 时间线 ---------- */
.phase-band {
  display: flex; align-items: baseline; gap: 16px;
  margin: 52px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  scroll-margin-top: 90px;
}
.phase-band:first-of-type { margin-top: 0; }
.phase-band .pn { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .14em; }
.phase-band h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; color: #efe9dc; }
.phase-band .pd { font-family: var(--mono); font-size: 11.5px; color: var(--gold); opacity: .8; }
.phase-band .ps { margin-left: auto; color: var(--dim); font-size: 12.5px; text-align: right; }

.tl { position: relative; }
.tl-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  padding: 0 0 26px;
  position: relative;
}
.tl-item::before {
  content: ""; position: absolute; left: 103px; top: 12px; bottom: -12px; width: 1px;
  background: linear-gradient(180deg, var(--line) 0%, var(--line-soft) 100%);
}
.tl-item:last-child::before { display: none; }
.tl-date {
  font-family: var(--mono); font-size: 12.5px; color: #78859a;
  padding-top: 15px; text-align: right; white-space: nowrap; letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.tl-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 20px 24px 18px;
  transition: border-color .25s, transform .25s, background .25s;
}
.tl-card::before {
  content: ""; position: absolute; left: -14.5px; top: 19px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--muted);
  transition: border-color .25s, box-shadow .25s;
}
.tl-item:hover .tl-card { border-color: #2f4157; transform: translateX(2px); }
.tl-item:hover .tl-card::before { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(227, 178, 92, .12); }
.tl-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.tag {
  font-size: 10.5px; letter-spacing: .12em; font-family: var(--mono);
  padding: 1px 8px; border-radius: 3px;
  color: var(--tone, var(--gold));
  background: color-mix(in srgb, var(--tone, var(--gold)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone, var(--gold)) 28%, transparent);
}
.tl-card h4 { margin: 0; font-size: 16.5px; font-weight: 600; line-height: 1.55; color: #eae5d9; letter-spacing: .01em; }
.tl-card ul { margin: 10px 0 0; padding: 0; list-style: none; }
.tl-card li { position: relative; padding-left: 15px; font-size: 13.5px; color: var(--muted); line-height: 1.8; margin-top: 3px; }
.tl-card li::before { content: ""; position: absolute; left: 0; top: .68em; width: 4px; height: 1px; background: var(--dim); }

/* ---------- 事故 ---------- */
.inc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.inc {
  border: 1px solid var(--line-soft);
  background: var(--surface);
  padding: 22px 24px 20px;
  position: relative;
  transition: border-color .25s, transform .25s;
  display: flex; flex-direction: column;
}
.inc::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--lv, var(--muted));
}
.inc:hover { border-color: #31435a; transform: translateY(-2px); }
.inc-top { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.lv {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  padding: 1px 7px; border-radius: 3px;
  color: var(--lv, var(--muted));
  border: 1px solid color-mix(in srgb, var(--lv, var(--muted)) 40%, transparent);
  background: color-mix(in srgb, var(--lv, var(--muted)) 10%, transparent);
}
.inc-top time { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.inc h4 { margin: 0 0 6px; font-size: 16px; color: #ece7db; font-weight: 600; line-height: 1.5; }
.inc .sum { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.inc .rows { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: auto; display: grid; gap: 8px; }
.inc .row { display: grid; grid-template-columns: 40px 1fr; gap: 10px; font-size: 12.8px; line-height: 1.75; }
.inc .row b { font-weight: 500; font-size: 10.5px; letter-spacing: .1em; color: var(--dim); font-family: var(--mono); padding-top: 3px; }
.inc .row span { color: #aab4c4; }
.inc .row.legacy span { color: var(--gold); opacity: .85; }

/* ---------- 难点 ---------- */
.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.diff { background: var(--bg-soft); padding: 26px 24px 24px; transition: background .25s; }
.diff:hover { background: var(--surface); }
.diff .tag2 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--cyan); }
.diff h4 { margin: 10px 0 10px; font-size: 17px; font-family: var(--serif); font-weight: 600; color: #ece6d9; line-height: 1.45; }
.diff p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
.diff p + p { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.diff p b { color: var(--gold); font-weight: 500; font-size: 11px; letter-spacing: .08em; margin-right: 6px; font-family: var(--mono); }

/* ---------- 成果 ---------- */
.res-wrap { display: grid; gap: 26px; }
.res-block { border: 1px solid var(--line-soft); background: var(--surface); }
.res-head { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line-soft); }
.res-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .06em; color: #ece7db; }
.res-head::before { content: ""; width: 8px; height: 8px; background: var(--tone, var(--gold)); border-radius: 2px; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.res-item { padding: 18px 24px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.res-item:nth-child(3n) { border-right: 0; }
.res-item:nth-last-child(-n+3) { border-bottom: 0; }
.res-item .k { font-size: 11.5px; color: var(--dim); letter-spacing: .06em; }
.res-item .v { margin-top: 5px; font-family: var(--mono); font-size: 16px; color: #f0ebdf; font-variant-numeric: tabular-nums; }
.res-item .n { margin-top: 4px; font-size: 11.5px; color: var(--dim); line-height: 1.6; }

/* ---------- 规则 ---------- */
.rule-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.rule { background: var(--bg-soft); padding: 22px 24px; display: grid; grid-template-columns: 46px 1fr; gap: 14px; transition: background .25s; }
.rule:hover { background: var(--surface); }
.rule .n { font-family: var(--mono); font-size: 12px; color: var(--gold); opacity: .65; padding-top: 2px; }
.rule h4 { margin: 0 0 4px; font-size: 14.5px; color: #e8e2d5; font-weight: 600; }
.rule p { margin: 0; font-size: 12.8px; color: var(--muted); line-height: 1.75; }

/* ---------- 来源 ---------- */
.sources { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.src-list { list-style: none; margin: 0; padding: 0; }
.src-list li { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; }
.src-list li b { color: var(--text); font-weight: 500; }
.src-list li span { color: var(--dim); font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.note-box { border: 1px solid var(--line); background: var(--bg-soft); padding: 22px 24px; }
.note-box h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; color: var(--gold); font-family: var(--mono); font-weight: 500; }
.note-box p { margin: 0; font-size: 12.8px; color: var(--muted); line-height: 1.85; }
.note-box p + p { margin-top: 10px; }

/* ---------- 页脚 ---------- */
footer { margin-top: 100px; border-top: 1px solid var(--line-soft); padding: 34px 0 46px; }
footer .wrap { display: flex; gap: 20px; align-items: baseline; flex-wrap: wrap; font-size: 12px; color: var(--dim); font-family: var(--mono); }
footer .wrap b { color: var(--muted); font-weight: 400; }
footer .sp { margin-left: auto; }

/* ---------- 回到顶部 ---------- */
.top-btn {
  position: fixed; right: 26px; bottom: 26px; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(18, 25, 36, .9);
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s, color .2s;
  backdrop-filter: blur(8px); z-index: 40;
}
.top-btn.show { opacity: 1; pointer-events: auto; }
.top-btn:hover { color: var(--gold); transform: translateY(-2px); }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 空态 ---------- */
.empty { padding: 40px 0; color: var(--dim); font-size: 13.5px; text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .overview { grid-template-columns: 1fr; }
  .inc-grid, .diff-grid, .rule-list { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: repeat(2, 1fr); }
  .res-item:nth-child(3n) { border-right: 1px solid var(--line-soft); }
  .res-item:nth-child(2n) { border-right: 0; }
  .sources { grid-template-columns: 1fr; gap: 26px; }
  .section-head p { text-align: left; margin: 0; }
  .phase-band .ps { display: none; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .brand span { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 52px); }
  .tl-item { grid-template-columns: 1fr; gap: 0; padding-left: 20px; }
  .tl-item::before { left: 4px; top: 26px; }
  .tl-date { text-align: left; padding: 0 0 6px 0; }
  .tl-card { padding: 16px 18px; }
  .tl-card::before { left: -20px; top: 21px; }
  .res-grid { grid-template-columns: 1fr; }
  .res-item { border-right: 0 !important; }
  .res-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .res-item:last-child { border-bottom: 0; }
  .search { margin-left: 0; width: 100%; }
  .src-list li { grid-template-columns: 1fr; gap: 2px; }
  .verdict { padding: 22px; }
}

/* ---------- 静态快照模式（?static=1，用于截图/打印） ---------- */
body.static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body.static .stat::after { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

@media print {
  body { background: #fff; color: #111; }
  body::before, body::after, .nav, .top-btn, .toolbar { display: none; }
  .hero { padding-top: 20px; }
  h1.display { color: #111; -webkit-text-stroke: 0; }
  h1.display em { color: #8a6a1f; -webkit-text-stroke: 0; }
  .tl-card, .inc, .res-block, .diff, .rule, .note-box, .verdict { background: #fff; border-color: #ccc; color: #111; }
  .tl-card h4, .inc h4, .diff h4, .rule h4, .res-item .v, .section-head h2 { color: #111; }
  .tl-card li, .inc .row span, .diff p, .rule p, .res-item .n { color: #444; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* 小屏导航：只留四个主入口，避免横向溢出 */
@media (max-width: 640px) {
  .nav .wrap { gap: 12px; }
  .brand { font-size: 15px; }
  .nav-links a { font-size: 12.5px; padding: 5px 8px; }
  .nav-links a[href="#rules-section"],
  .nav-links a[href="#sources-section"] { display: none; }
}
