/* ═══════════════════════════════════════════════════════════
   Interactive Research Report · base theme (copy verbatim as css/style.css)
   White surface / deep-navy ink / electric-blue accent.
   Editorial quote/note system (no left-border cards), magazine
   term columns, borderless right rail, tightened per-chart palette.
   ═══════════════════════════════════════════════════════════ */
:root {
  --paper: #ffffff;
  --paper-hi: #EFFAFD;      /* panel — 淡蓝 */
  --ink: #051c2c;           /* deep navy */
  --ink-md: #42566a;
  --ink-lo: #8595a6;
  --line: #dbe2ea;
  --line-lo: #eef1f6;
  --red: #4A8BDF;           /* LEGACY ACCENT SLOT → 宝蓝 */
  --red-hi: #3568b8;
  --blue: #3568b8;          /* deep royal blue (links, secondary emphasis) */
  --blue-soft: #9cc3f0;     /* light blue (tertiary series) */
  --copper: #b07a10;
  --green: #008a6d;
  --gold: #b07a10;
  --neg: #A0006D;           /* 茄子红紫 — highlights, risk, contrast */
  --serif: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Segoe UI", "Microsoft YaHei", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: Menlo, Consolas, "SF Mono", "Liberation Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  --shadow: 0 1px 2px rgba(5,28,44,.05), 0 8px 28px rgba(5,28,44,.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  --railw: 460px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.78;
  letter-spacing: 0.001em;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(74,139,223,.18); }
b, strong { font-weight: 700; }
em { font-style: normal; color: var(--red); font-weight: 700; }
a { color: var(--blue); }

/* ── Era progress rail (top) ── */
#era-rail {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
  visibility: hidden; transform: translateY(-110%);
  transition: transform .4s ease, visibility 0s linear .4s;
}
#era-rail.on { visibility: visible; transform: none; transition: transform .4s ease; }
.rail-year {
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 2px 10px; background: var(--paper);
  font-variant-numeric: tabular-nums;
}
.rail-track { flex: 1; height: 18px; position: relative; }
.rail-track .seg {
  position: absolute; top: 8px; height: 2px; background: var(--line);
  pointer-events: auto; cursor: pointer;
}
.rail-track .seg.active { background: var(--red); height: 4px; top: 7px; }
.rail-track .seg .seg-label {
  position: absolute; top: -14px; left: 0; font-family: var(--mono);
  font-size: 9px; color: var(--ink-lo); white-space: nowrap; letter-spacing: .04em;
}
.rail-track .seg.active .seg-label { color: var(--red); font-weight: 700; }

/* ── Cover ── */
#cover { position: relative; min-height: 100vh; overflow: hidden; }
#cover-canvas, #cover-canvas-x, #cover-canvas-w { position: absolute; inset: 0; width: 100%; height: 100%; }

/* cover artwork variant switch */
.cover-mode { margin-top: 22px; display: flex; gap: 8px; align-items: center; }
.cover-mode::before {
  content: "COVER"; font-family: var(--mono); font-size: 9px;
  letter-spacing: .22em; color: var(--ink-lo); margin-right: 4px;
}
.cover-mode button {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em;
  color: var(--ink-md); background: rgba(255,255,255,.7);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.cover-mode button.on { border-color: var(--red); color: var(--red); }
.cover-mode button:hover { border-color: var(--ink); color: var(--ink); }
.cover-inner {
  position: relative; z-index: 2; max-width: 1120px;
  margin: 0 auto; padding: 11vh 24px 60px;
}
.cover-kicker {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .28em;
  color: var(--red); margin-bottom: 26px; text-transform: uppercase;
}
.cover-title {
  font-size: clamp(44px, 6.6vw, 78px); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.008em;
}
.cover-title .cover-num { color: var(--red); }
.cover-sub {
  font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; color: var(--ink-md);
  margin: 20px 0 26px; letter-spacing: 0;
}
.cover-lede { max-width: 620px; font-size: 16.5px; color: var(--ink-md); line-height: 1.75; }
.chain {
  font-family: var(--mono); font-size: 13.5px; font-weight: 700; color: var(--ink);
  background: var(--paper-hi); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 8px; white-space: nowrap;
}
.cover-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 26px; }
.chip {
  font-family: var(--sans); font-size: 13.5px; font-weight: 700;
  color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink); border-radius: 6px; padding: 8px 18px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { background: var(--red); border-color: var(--red); color: #fff; }
.cover-anchor { font-size: 12.5px; color: var(--ink-lo); font-family: var(--mono); letter-spacing: .01em; display: block; max-width: 660px; }
.scroll-hint {
  margin-top: 7vh; font-family: var(--mono); font-size: 11px; color: var(--ink-lo);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; letter-spacing: .3em;
  width: max-content;
}
.scroll-hint span { margin-left: 22px; }
.scroll-hint span {
  display: block; width: 1px; height: 44px;
  background: linear-gradient(var(--red), transparent);
}

/* ── Section band ── */
.band { padding: 72px 0 64px; border-top: 1px solid var(--line-lo); }
.prose {
  max-width: 692px;
  margin: 0 auto;
  padding: 0 28px;
}
.wide {
  /* symmetric figure bleed around the 692px prose column (V3 pattern) */
  max-width: 800px;
  margin: 36px auto;
  padding: 0 28px;
}
.wide.xl { max-width: 924px; }
.sec-no {
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em;
  color: var(--red); margin-bottom: 14px; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.sec-no::before {
  content: ""; flex: 0 0 26px; height: 3px;
  background: var(--red);
}
h2 { font-family: var(--sans); font-size: clamp(27px, 3.1vw, 38px); font-weight: 700; line-height: 1.22; letter-spacing: -0.005em; margin-bottom: 22px; max-width: 20em; }
h3 { font-family: var(--sans); font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 14px; }
.sub-h { margin-top: 26px; }
.prose p { margin-bottom: 18px; }
.muted { color: var(--ink-lo); font-size: 14px; }
.hint-click { font-size: 13px; color: var(--blue); border-bottom: 1px dashed var(--blue); white-space: nowrap; }
.era-tag {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  color: var(--red); margin-bottom: 8px; font-weight: 400; text-transform: uppercase;
  padding-left: 14px; position: relative;
}
.era-tag::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--red);
}
.laws { list-style: none; margin: 8px 0 16px; }
.laws li {
  padding: 11px 0; border-bottom: 1px solid var(--line-lo);
  margin: 0;
}
.laws li:first-child { border-top: 1px solid var(--line-lo); }

/* ── Analyst note · editorial rules, no card chrome ── */
.note-box {
  border: 0; background: transparent; box-shadow: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 30px 0 26px;
  padding: 14px 0 16px;
  font-size: 13.5px; color: var(--ink-md); line-height: 1.8;
}
.note-box::before {
  content: "Analyst note";
  display: block;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-lo); margin-bottom: 8px;
}
.note-box p { margin-bottom: 10px; }
.note-box p:last-child { margin-bottom: 0; }
.degrade-note {
  font-family: var(--mono); font-size: 12px; color: var(--neg);
  border: 1px dashed var(--neg); border-radius: 4px; padding: 8px 12px; background: rgba(194,47,78,.04);
}

/* ── Rail cross-reference note (hidden when the rail is hidden) ── */
.rail-note {
  font-family: var(--mono); font-size: 11px; color: var(--ink-lo);
  line-height: 1.7; letter-spacing: .02em;
  margin: 22px 0 18px; padding-left: 16px; position: relative;
}
.rail-note::before { content: "→"; position: absolute; left: 0; color: var(--red); }
@media (max-width: 1180px) { .rail-note { display: none; } }

/* Chart containers */
.chart-frame {
  background: transparent; border: 0; box-shadow: none;
  padding: 8px 0 4px; position: relative;
}
.chart-title { font-weight: 700; font-size: 17.5px; letter-spacing: -0.01em; margin: 0 0 3px 0; }
.chart-sub { font-family: var(--mono); font-size: 10.5px; color: var(--ink-lo); margin: 0 0 14px 0; letter-spacing: .04em; padding-bottom: 8px; border-bottom: 1px solid var(--line-lo); }
.chart-src { font-family: var(--mono); font-size: 10px; color: var(--ink-lo); margin: 10px 0 4px; }
.chart-frame svg text { font-family: var(--mono); }

/* metric strip */
.metric-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  margin-top: 14px; box-shadow: var(--shadow);
}
.metric-strip .m {
  background: var(--paper); padding: 14px 16px; cursor: pointer; transition: background .15s;
}
.metric-strip .m:hover { background: var(--paper-hi); }
.metric-strip .m .v { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.metric-strip .m .k { font-size: 12px; color: var(--ink-md); margin-top: 3px; line-height: 1.5; }

/* source button ◆ */
.src {
  border: 0; background: none; color: var(--red); cursor: pointer;
  font-size: 10px; vertical-align: super; padding: 0 2px; font-family: var(--mono);
}
.src:hover { color: var(--red-hi); }

/* ── Chronicle sticky layout ── */
#chronicle { position: relative; border-top: 1px solid var(--line-lo); }
.chron-grid {
  display: grid; grid-template-columns: minmax(380px, 44%) 1fr;
  max-width: 1440px; margin: 0 auto; gap: 0;
}
.chron-text { padding: 40px 20px 40px 40px; }
.step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding: 44px 24px 44px 0; max-width: 620px; }
.step.active-step h3 { color: var(--ink); }
.chron-dash { position: relative; }
.dash-inner {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px;
}

/* Chronicle inline mini-charts */
.inline-chart {
  margin: 20px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); padding: 14px 12px 8px;
}
.inline-chart svg text { font-family: var(--mono); }
.inline-chart .ic-title { font-weight: 700; font-size: 13.5px; margin: 0 0 2px 4px; font-family: var(--sans); }
.inline-chart .ic-src { font-family: var(--mono); font-size: 9.5px; color: var(--ink-lo); margin: 6px 4px 2px; }

/* ── Pull-quote · editorial (heavy top rule, hairline bottom — no tinted card) ── */
.quote-card {
  margin: 46px 0 40px; position: relative;
  background: transparent;
  border: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 24px 2px 20px;
  transform: none;
}
.quote-card::after { content: none; }
.quote-card::before {
  content: "From the record";
  display: block;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-lo); margin-bottom: 14px;
}
.quote-card:nth-of-type(even) { transform: none; }
.quote-card .q-mark { display: none; }
.quote-card .q-badges { display: none; }
.quote-card .q-zh { display: none; }
.quote-card .q-text {
  font-size: 22px; font-style: italic;
  font-family: var(--serif); color: var(--ink);
  line-height: 1.52; margin-bottom: 14px; letter-spacing: -0.005em;
  text-wrap: balance;
}
.quote-card .q-who {
  font-family: var(--sans); font-size: 12px; color: var(--ink-md);
  text-transform: uppercase; letter-spacing: .08em;
}
.quote-card .q-who b { color: var(--ink); font-weight: 700; }
.quote-card .q-why {
  margin-top: 14px; padding-top: 12px; border-top: 1px dotted var(--line);
  font-size: 13px; color: var(--ink-md); line-height: 1.7; display: block;
}
.quote-card .q-lab {
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-lo);
  margin-right: 6px; letter-spacing: .12em; text-transform: uppercase;
}
.quote-card .q-lab.why { color: var(--red); margin-left: 10px; }
.quote-card .q-src { font-family: var(--mono); font-size: 10px; color: var(--ink-lo); margin-left: 8px; }

/* drill card */
#drill-card {
  position: fixed; z-index: 200; min-width: 240px; max-width: 340px;
  background: var(--ink); color: #eef2f6; padding: 14px 18px; border-radius: 6px;
  box-shadow: 0 12px 40px rgba(5,28,44,.4); font-size: 13px; line-height: 1.65;
  border-top: 3px solid var(--red);
}
#drill-card .d-title { font-family: var(--mono); font-size: 10.5px; color: #9fb0c0; letter-spacing: .08em; text-transform: uppercase; }
#drill-card .d-val { font-family: var(--mono); font-size: 25px; font-weight: 700; color: #fff; margin: 2px 0; font-variant-numeric: tabular-nums; }
#drill-card .d-val .pos { color: #6fd0b2; } #drill-card .d-val .neg { color: #ef9aae; }
#drill-card .d-sub { color: #c6d1db; font-size: 12.5px; }
#drill-card .d-src { font-family: var(--mono); font-size: 10px; color: #8595a6; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); }
#drill-card .d-close { position: absolute; top: 6px; right: 10px; color: #8595a6; cursor: pointer; background: none; border: 0; font-size: 14px; }

/* appendix */
#sec-sources { padding: 100px 0 80px; border-top: 1px solid var(--line-lo); }
#source-list { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; }
@media (max-width: 1420px) { #source-list { grid-template-columns: 1fr; } }
.src-row { display: block; padding: 10px 0 11px; border-bottom: 1px solid var(--line-lo); font-size: 13px; }
.src-row .s-fact { display: block; color: var(--ink); line-height: 1.55; }
.src-row .s-cite { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-md); margin-top: 4px; line-height: 1.6; }
.colophon { margin-top: 40px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-lo); line-height: 2; }
@media (max-width: 900px) { #source-list { column-count: 1; } }

/* source-category badge (four-source rule) */
.src-cat {
  display: inline-block; font-family: var(--mono); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 3px;
  padding: 0 5px; margin-right: 6px; color: var(--ink-md); vertical-align: 1px;
}
.src-cat.kimi { border-color: var(--red); color: var(--red); }
.src-cat.broker { border-color: var(--copper); color: var(--copper); }
.src-cat.company { border-color: var(--green); color: var(--green); }
.src-cat.industry { border-color: var(--blue); color: var(--blue); }

/* data tables (lineage, comparisons) */
table.dt {
  border-collapse: collapse; width: 100%;
  font-family: var(--sans); font-size: 13px; line-height: 1.55;
}
table.dt th {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-md); text-align: left; padding: 7px 12px 7px 0;
  border-bottom: 1.5px solid var(--ink); white-space: nowrap;
}
table.dt td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-lo); vertical-align: top; }
table.dt td.num { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dt tr:hover td { background: var(--paper-hi); }
table.dt tr.hl td { background: rgba(34,81,255,.05); }

/* ── §0.5 three terms · magazine columns (no cards, hover to unfold) ── */
.term-mag {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.term-mag .term {
  padding: 6px 26px 14px;
  cursor: default; outline: none;
}
.term-mag .term + .term { border-left: 1px solid var(--line-lo); }
.term-mag .term:first-child { padding-left: 2px; }
.term-mag .t-abbr {
  font-family: var(--serif); font-weight: 700; font-size: 34px;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.1;
  transition: color .2s ease;
}
.term-mag .term:hover .t-abbr, .term-mag .term:focus-within .t-abbr { color: var(--red); }
.term-mag .t-full {
  font-family: var(--mono); font-size: 10px; color: var(--ink-lo);
  text-transform: uppercase; letter-spacing: .1em; margin: 6px 0 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line-lo);
}
.term-mag .t-gist { font-size: 14px; color: var(--ink); line-height: 1.65; margin: 0; }
.term-mag .term { position: relative; }
.term-mag .t-more {
  /* Desktop: overlay expansion, never pushes content below (QA: hover once made the whole section twitch +217px) */
  position: absolute; left: 26px; right: 26px; top: 100%; z-index: 6;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 16px;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .4s cubic-bezier(.25,.7,.3,1), opacity .3s ease .05s;
  pointer-events: none;
}
.term-mag .term:first-child .t-more { left: 2px; }
.term-mag .term:hover .t-more, .term-mag .term:focus-within .t-more,
.term-mag .term.open .t-more { max-height: 340px; opacity: 1; pointer-events: auto; }
.term-mag .t-more p { font-size: 13px; color: var(--ink-md); line-height: 1.72; margin: 0; }
.term-mag .t-hint {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-lo); margin-top: 12px; transition: opacity .25s ease;
}
.term-mag .term:hover .t-hint, .term-mag .term:focus-within .t-hint, .term-mag .term.open .t-hint { opacity: 0; }
@media (max-width: 760px) {
  .term-mag { grid-template-columns: 1fr; }
  .term-mag .term { padding: 18px 2px; border-left: 0 !important; border-top: 1px solid var(--line-lo); }
  .term-mag .term:first-child { border-top: 0; }
  .term-mag .t-more { position: static; max-height: none; opacity: 1; margin-top: 10px; padding: 0; border-bottom: 0; pointer-events: auto; }
  .term-mag .t-hint { display: none; }
}

/* tooltip */
.tip {
  position: fixed; z-index: 150; pointer-events: none;
  background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11px;
  padding: 5px 10px; border-radius: 4px; opacity: 0; transition: opacity .12s; white-space: nowrap;
}

@media (max-width: 980px) {
  .chron-grid { grid-template-columns: 1fr; }
  .chron-dash { display: none; }
  .step { min-height: 0; }
}

/* ── Narrative column yields to right rail ── */
main, footer#sec-sources { margin-right: var(--railw); }
#cover { margin-right: 0; }
.cover-inner { max-width: 1180px; margin: 0 auto; }
#era-rail { right: var(--railw); }

/* ── Persistent dashboard rail · borderless, part of the page surface ── */
#dash-rail {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--railw);
  border: 0;
  background: transparent;
  z-index: 60;
  /* fully hidden on the cover; slides in after the reader enters the chapters */
  opacity: 0; visibility: hidden; transform: translateX(24px);
  transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s;
}
#dash-rail.on { opacity: 1; visibility: visible; transform: none; transition: opacity .55s ease, transform .55s ease; }
#dash-rail canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
#dash-rail #dash-canvas {
  max-height: none; border: 0; border-radius: 0; box-shadow: none;
  background: transparent;
}

/* ── dek · italic serif deck, no border chrome ── */
.dek {
  font-family: var(--serif); font-style: italic;
  font-size: 19px; line-height: 1.62; color: var(--ink-md);
  margin: -2px 0 28px; max-width: 600px;
  border: 0; padding: 0;
}
.dek strong, .dek b { color: var(--ink); font-style: normal; }

/* chronicle single-column */
.chron-text { max-width: 760px; margin: 0 auto; padding: 40px 24px; }
.step { min-height: 78vh; }

@media (max-width: 1180px) {
  body { --railw: 0px; }
  #dash-rail { display: none; }
}

/* section hairline */
hr.sep { border: 0; height: 1px; background: var(--line); margin: 0 auto; max-width: 860px; }
