
:root {
  --ink: #0f0d0a;
  --paper: #f7efe2;
  --muted: #bba982;
  --gold: #d8a24b;
  --cinnabar: #c95a3e;
  --jade: #2f7d6b;
  --teal: #47a7a0;
  --line: rgba(247,239,226,.22);
  --card: rgba(255,248,235,.08);
  --shadow: 0 28px 70px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  color: var(--paper);
  background: var(--ink);
  line-height: 1.75;
}
a { color: #ffe0a0; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 30; background: rgba(255,255,255,.08); }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--cinnabar), var(--jade)); }
.hero {
  min-height: 94vh;
  position: relative;
  display: grid;
  place-items: end start;
  overflow: hidden;
  isolation: isolate;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; filter: saturate(1.08) contrast(1.08); }
.shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(15,13,10,.92) 0%, rgba(15,13,10,.62) 45%, rgba(15,13,10,.18) 100%), linear-gradient(0deg, var(--ink), transparent 38%); }
.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(15,13,10,.62);
  backdrop-filter: blur(14px);
  border-radius: 999px;
}
.topbar a { color: var(--paper); font-size: 14px; padding: 8px 14px; border-radius: 999px; text-decoration: none; }
.topbar a:hover { background: rgba(255,255,255,.12); }
.hero-copy { width: min(1040px, calc(100% - 40px)); margin: 0 auto 8vh; }
.kicker { color: var(--gold); font-family: Arial, sans-serif; font-size: 14px; margin: 0 0 10px; }
h1 { font-size: clamp(42px, 6vw, 92px); line-height: 1.06; margin: 0; max-width: 1050px; }
.lead { font-size: clamp(18px, 2vw, 28px); max-width: 780px; color: #f1dcc0; margin: 26px 0 34px; }
.hero-metrics { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; max-width: 900px; }
.hero-metrics article { border-top: 1px solid rgba(255,255,255,.24); padding-top: 14px; }
.hero-metrics b { display: block; font-size: clamp(28px, 4vw, 54px); line-height: 1; color: #fff1bc; }
.hero-metrics span { display: block; margin-top: 8px; color: #d6c5a2; font-size: 14px; }
.note-strip {
  width: min(1160px, calc(100% - 34px));
  margin: -28px auto 84px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(247,239,226,.18);
  border: 1px solid rgba(247,239,226,.20);
  box-shadow: var(--shadow);
}
.note-strip div { background: #19130d; padding: 22px 24px; }
.note-strip b { display: block; color: var(--gold); font-size: 14px; }
.note-strip span { display: block; color: var(--paper); margin-top: 4px; }
.chapter { padding: 90px 0; background: var(--paper); color: #17130e; }
.chapter.dark { background: #14100c; color: var(--paper); }
.chapter-label {
  width: min(1160px, calc(100% - 34px));
  margin: 0 auto 26px;
  color: var(--cinnabar);
  font-weight: 700;
}
.dark .chapter-label { color: #ffd47f; }
.story-grid {
  width: min(1160px, calc(100% - 34px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(420px, 1.16fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
}
.story-grid.reverse { grid-template-columns: minmax(420px, 1.16fr) minmax(0, .84fr); }
.copy h2, .summary h2, .appendix h2 { font-size: clamp(30px, 4vw, 58px); line-height: 1.18; margin: 0 0 22px; }
.copy p { font-size: 18px; color: inherit; opacity: .86; margin: 0 0 16px; }
.chart-card, .wide-card {
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: rgba(20,16,12,.92);
  color: var(--paper);
  border: 1px solid rgba(247,239,226,.16);
  box-shadow: var(--shadow);
}
.chapter.dark .chart-card, .chapter.dark .wide-card { background: rgba(255,248,235,.06); }
figcaption { font-size: 21px; font-weight: 700; margin-bottom: 16px; line-height: 1.35; }
.chart { min-height: 360px; position: relative; }
.wide-card { width: min(1160px, calc(100% - 34px)); margin: 60px auto 0; }
.source { font-size: 13px; color: #d8c7a5; margin: 14px 0 0; line-height: 1.55; }
svg { width: 100%; height: auto; display: block; overflow: visible; }
.axis, .tick text { fill: #d6c5a2; font-size: 12px; font-family: Arial, sans-serif; }
.label { fill: #fff5d9; font-size: 13px; font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.value-label { fill: #fff2ba; font-weight: 700; font-size: 13px; font-family: Arial, sans-serif; }
.summary {
  padding: 120px 0;
  width: min(920px, calc(100% - 34px));
  margin: 0 auto;
  color: var(--paper);
}
.summary p { font-size: 20px; color: #ead9bb; }
.appendix { background: #f6ead7; color: #17130e; padding: 86px 0; }
.appendix-head, .source-table-wrap, .image-credit { width: min(1160px, calc(100% - 34px)); margin-left: auto; margin-right: auto; }
.appendix-head p { font-size: 18px; color: #584631; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fffaf0; }
th, td { padding: 12px 14px; border-bottom: 1px solid #ddcba8; vertical-align: top; }
th { text-align: left; background: #1b140e; color: #fff5db; }
td a { color: #8a3f25; word-break: break-all; }
.image-credit { margin-top: 22px; color: #594832; font-size: 13px; }
.tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(18,14,10,.94);
  color: #fff8e7;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.18);
  opacity: 0;
  transform: translate(-50%, -110%);
  font-size: 13px;
}
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric-cell { padding: 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: rgba(255,255,255,.05); }
.metric-cell b { display: block; color: #fff0b8; font-size: 30px; line-height: 1.1; }
.metric-cell span { color: #d7c7a8; font-size: 13px; }
@media (max-width: 860px) {
  .topbar { max-width: calc(100% - 16px); overflow-x: auto; }
  .hero-metrics, .note-strip, .story-grid, .story-grid.reverse { grid-template-columns: 1fr; }
  .story-grid, .story-grid.reverse { gap: 28px; }
  .chart-card, .wide-card { padding: 18px; }
  .chart { min-height: 310px; }
  h1 { font-size: clamp(36px, 12vw, 58px); }
}
@media print {
  .topbar, .progress, .tooltip { display: none; }
  body { background: white; color: black; }
  .hero { min-height: 760px; page-break-after: always; }
  .chapter, .chapter.dark, .appendix { background: white; color: black; page-break-inside: avoid; }
  .chart-card, .wide-card { box-shadow: none; background: #19130d; }
  a { color: #000; }
}
