/* 沃伦·巴菲特的一生 · 深色年报 / 账本
   范围：tokens → 基础排版 → 页头 → 首屏 → 按钮 */

:root {
  --bg: #070b14;
  --bg-deep: #050810;
  --surface: #0c1322;
  --surface-2: #101a2b;
  --text: #e7e1d4;
  --muted: #a9a394;
  --accent: #d6b36a;
  --accent-soft: #e3c98d;
  --sage: #8fb0a0;
  --rule: rgba(214, 179, 106, 0.2);
  --rule-strong: rgba(214, 179, 106, 0.42);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);

  --font-serif: "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;

  --fs-h1: clamp(2.75rem, 13vw, 5.5rem);
  --fs-h2: clamp(2rem, 8vw, 3.5rem);
  --fs-h3: clamp(1.5rem, 6vw, 2rem);
  --fs-lead: clamp(1.25rem, 5.5vw, 1.75rem);
  --fs-body: clamp(1.125rem, 4.8vw, 1.5rem);
  --fs-small: clamp(1rem, 4.2vw, 1.125rem);
  --fs-button: clamp(1.125rem, 4.6vw, 1.375rem);
  --lh-head: 1.12;
  --lh-body: 1.72;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --d-press: 100ms;
  --d-ui: 200ms;
  --d-enter: 520ms;
  --d-scene: 720ms;

  --header-h: 64px;
  --wrap: min(1120px, calc(100% - 40px));
  --chart-h: clamp(240px, 28vw, 360px);
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 84% -12%, rgba(214, 179, 106, 0.09), transparent 62%),
    radial-gradient(860px 520px at -12% 18%, rgba(143, 176, 160, 0.055), transparent 64%);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--lh-head);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--bg);
  font-size: var(--fs-small);
  font-weight: 700;
  border-radius: 2px;
}

.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 页头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-h);
  background: rgba(7, 11, 20, 0.9);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
  width: var(--wrap);
  min-height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px 0;
  color: var(--text);
  flex: 0 0 auto;
}

.site-brand__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.site-brand__domain {
  color: var(--muted);
  font-size: var(--fs-small);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-chapters {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 0 4px;
  color: var(--text);
  font-size: var(--fs-small);
  white-space: nowrap;
}

.chapter-hud {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.chapter-hud__now {
  color: var(--accent);
  font-weight: 700;
}

.chapter-hud__all {
  color: var(--muted);
}

.chapter-hud__track {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--rule);
  overflow: hidden;
}

.chapter-hud__track i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--progress, 0.1667));
  transform-origin: left center;
  transition: transform var(--d-ui) var(--ease-out);
}

.chapter-hud__name {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 56rem) {
  .chapter-hud__name {
    display: none;
  }
}

@media (max-width: 22.5rem) {
  .site-brand__domain {
    display: none;
  }

  .chapter-hud__track {
    width: 28px;
  }
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 112px);
  background:
    linear-gradient(180deg, rgba(12, 19, 34, 0.72), rgba(7, 11, 20, 0) 68%);
  scroll-margin-top: 0;
}

.hero__grid {
  display: grid;
  gap: clamp(36px, 7vw, 64px);
  align-items: center;
}

.hero__copy {
  max-width: 42rem;
}

.hero__dateline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.hero__dateline .dot {
  width: 4px;
  height: 4px;
  background: var(--accent);
  transform: rotate(45deg);
}

.hero__dates {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.hero__title {
  margin-bottom: 10px;
  font-size: var(--fs-h1);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero__en {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: var(--fs-small);
  letter-spacing: 0.24em;
  line-height: 1.4;
}

.hero__sub {
  margin-bottom: 24px;
  color: var(--accent-soft);
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  line-height: 1.35;
}

.hero__lead {
  max-width: 34em;
  margin-bottom: 18px;
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--text);
}

.hero__memorial {
  max-width: 34em;
  margin-bottom: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--rule-strong);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: var(--fs-button);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--d-press) var(--ease-out),
    background-color var(--d-ui) var(--ease-out),
    border-color var(--d-ui) var(--ease-out),
    color var(--d-ui) var(--ease-out);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn--ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--text);
}

.btn:active {
  transform: translateY(2px) scale(0.99);
}

.hero__hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.hero__hint-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  flex: 0 0 auto;
}

/* ---------- 复利账本卡 ---------- */

.compound-card {
  position: relative;
  margin: 0;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(16, 26, 43, 0.96), rgba(9, 15, 27, 0.98));
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.compound-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.compound-card__head span:first-child {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

.compound-card__body {
  display: grid;
}

.compound-card__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 12px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--rule);
}

.compound-card__label {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.compound-card__meta {
  color: var(--accent);
  font-size: var(--fs-small);
  line-height: 1.4;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.compound-card__value {
  grid-column: 1 / -1;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}

.compound-card__value small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 0.48em;
  font-weight: 400;
  vertical-align: 0.32em;
}

.compound-card__row--sp .compound-card__value,
.compound-card__row--sp .compound-card__meta {
  color: var(--muted);
}

.compound-card__chart-label {
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.compound-card__spark {
  display: block;
  width: 100%;
  height: 112px;
}

.compound-card__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.compound-card__legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--accent);
}

.swatch--sp {
  background: var(--sage);
}

.compound-card figcaption {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.55;
}

@media (min-width: 48rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  }

  .compound-card {
    padding: 26px;
  }

  .compound-card__spark {
    height: 132px;
  }
}

@media (max-width: 22.5rem) {
  .compound-card {
    padding: 18px;
  }

  .compound-card__head {
    font-size: 0.95rem;
  }

  .compound-card__head span:first-child {
    font-size: 1rem;
  }

  .compound-card__spark {
    height: 96px;
  }
}

/* ---------- 章节骨架 ---------- */

.chapter {
  position: relative;
  padding: clamp(64px, 9vw, 112px) 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.chapter + .chapter,
.chapter-index,
.sources {
  border-top: 1px solid var(--rule);
}

.chapter-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.chapter-head__index {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.chapter-head__no {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.chapter-head__rule {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.75;
}

.chapter-head__kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: var(--fs-small);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.chapter-head h2 {
  font-size: var(--fs-h2);
  margin-bottom: 16px;
}

.chapter-head__lead {
  max-width: 38em;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

@media (min-width: 48rem) {
  .chapter-head {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 28px;
  }

  .chapter-head__no {
    font-size: 3rem;
  }

  .chapter-head__rule {
    height: 80px;
  }
}

/* ---------- 时间线 ---------- */

.timeline {
  position: relative;
  margin-left: 4px;
  border-left: 1px solid var(--rule);
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 26px 0 26px 24px;
  border-bottom: 1px solid rgba(214, 179, 106, 0.12);
}

.timeline__item:last-child {
  border-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 34px;
  left: -5px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  transform: rotate(45deg);
}

.timeline__year {
  padding-top: 4px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.timeline__body h3 {
  margin-bottom: 8px;
  font-size: var(--fs-h3);
}

.timeline__body p {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.timeline__aside {
  margin-top: 12px !important;
  padding-left: 12px;
  border-left: 2px solid var(--rule-strong);
  color: var(--muted) !important;
  font-size: var(--fs-small) !important;
  line-height: 1.6 !important;
}

@media (min-width: 48rem) {
  .timeline__item {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 32px;
    padding: 32px 0 32px 36px;
  }

  .timeline__year {
    font-size: 1.5rem;
  }
}

@media (max-width: 22.5rem) {
  .timeline__item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    padding-left: 20px;
  }

  .timeline__year {
    font-size: 1.125rem;
  }
}

/* ---------- 下一章 ---------- */

.next-chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 16px;
  min-height: 64px;
  margin-top: clamp(36px, 6vw, 56px);
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  background: rgba(12, 19, 34, 0.55);
  color: var(--text);
  transition:
    background-color var(--d-ui) var(--ease-out),
    border-color var(--d-ui) var(--ease-out),
    transform var(--d-press) var(--ease-out);
}

.next-chapter:active {
  transform: translateY(2px);
}

.next-chapter__kicker {
  color: var(--accent);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.next-chapter__title {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.3;
}

.next-chapter__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .next-chapter:hover .next-chapter__arrow {
    transform: translateY(4px);
  }
}

/* ---------- 数据条 ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: clamp(36px, 6vw, 56px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat-strip__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px;
  border-left: 1px solid var(--rule);
}

.stat-strip__item:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat-strip strong {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-strip span {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.45;
}

@media (max-width: 22.5rem) {
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .stat-strip__item {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 14px 0;
    border-left: 0;
    border-top: 1px solid rgba(214, 179, 106, 0.12);
  }

  .stat-strip__item:first-child {
    border-top: 0;
  }
}

/* ---------- 复利曲线 ---------- */

.chart {
  margin: 0 0 24px;
  padding: 20px 18px 18px;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  background: linear-gradient(180deg, rgba(16, 26, 43, 0.8), rgba(9, 15, 27, 0.9));
  border-radius: 2px;
}

.chart__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 12px;
}

.chart__head h3 {
  font-size: var(--fs-h3);
}

.chart__scale {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
  white-space: nowrap;
}

.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.chart__legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart__plot {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
}

.chart__y {
  position: relative;
  height: var(--chart-h);
}

.chart__y-label {
  position: absolute;
  right: 10px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
}

.chart__y-label--top {
  top: 21.5%;
}

.chart__y-label--mid {
  top: 52.4%;
}

.chart__y-label--bottom {
  top: 83.3%;
}

.chart__svg {
  display: block;
  width: 100%;
  height: var(--chart-h);
  overflow: visible;
}

.chart__grid {
  stroke: var(--rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart__line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart__line--sp {
  stroke: var(--sage);
  stroke-width: 2;
  opacity: 0.82;
}

.chart__line--brk {
  stroke: var(--accent);
  stroke-width: 2.8;
}

.chart__years {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 0 64px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.chart__note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}

html.js .chart__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

html.js [data-chart].is-drawn .chart__line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1400ms var(--ease-out);
}

html.js [data-chart].is-drawn .chart__line--brk {
  transition-delay: 200ms;
}

@media (min-width: 48rem) {
  .chart {
    padding: 24px;
  }

  .chart__plot {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .chart__years {
    margin-left: 72px;
  }
}

@media (max-width: 22.5rem) {
  .chart {
    padding: 16px 14px;
  }

  .chart__plot {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}

/* ---------- 账本表 + 读法 ---------- */

.money-grid {
  display: grid;
  gap: 24px;
}

.ledger {
  padding: 18px;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 2px;
}

.ledger table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ledger caption {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.45;
  text-align: left;
  caption-side: top;
}

.ledger th {
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.ledger th:first-child {
  text-align: left;
}

.ledger td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(214, 179, 106, 0.12);
  color: var(--text);
  font-size: var(--fs-body);
  text-align: right;
  white-space: nowrap;
}

.ledger td:first-child {
  color: var(--muted);
  text-align: left;
}

.ledger tr.is-final td {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 0;
}

.ledger__note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}

.money-aside {
  padding-left: 20px;
  border-left: 2px solid var(--rule-strong);
}

.money-aside__kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: var(--fs-small);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.money-aside h3 {
  margin-bottom: 12px;
  font-size: var(--fs-h3);
}

.money-aside p {
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.money-aside p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .chart {
    padding: 26px;
  }

  .money-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 32px;
    align-items: start;
  }

  .ledger {
    padding: 22px;
  }

  .money-aside {
    padding-top: 4px;
  }
}

@media (max-width: 22.5rem) {
  .ledger {
    padding: 14px;
  }

  .ledger td,
  .ledger th {
    padding-inline: 5px;
  }
}

/* ---------- 投资原则 ---------- */

.rules-quote {
  margin: 0 0 clamp(32px, 5vw, 48px);
  padding: 20px 0 20px 20px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(214, 179, 106, 0.05), transparent 70%);
}

.rules-quote p {
  margin: 0 0 10px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.45;
}

.rules-quote cite {
  color: var(--muted);
  font-size: var(--fs-small);
  font-style: normal;
  line-height: 1.5;
}

.rules {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.rule:last-child {
  border-bottom: 1px solid var(--rule);
}

.rule__no {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.rule__copy h3 {
  margin-bottom: 8px;
  font-size: var(--fs-h3);
}

.rule__copy p {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

@media (min-width: 48rem) {
  .rule {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 24px;
    padding: 28px 0;
  }

  .rule__no {
    font-size: 1.5rem;
  }
}

/* ---------- 语录 ---------- */

.quote-lead {
  margin: 0 0 clamp(28px, 5vw, 44px);
  padding: 24px;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  background: var(--surface);
}

.quote-lead p {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.35;
}

.quote-lead cite {
  color: var(--muted);
  font-size: var(--fs-small);
  font-style: normal;
  line-height: 1.5;
}

.quotes {
  display: grid;
  gap: 16px;
}

.quote {
  position: relative;
  margin: 0;
  padding: 20px 20px 18px;
  border: 1px solid var(--rule);
  background: rgba(12, 19, 34, 0.6);
}

.quote__mark {
  display: block;
  margin-bottom: -6px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
}

.quote blockquote {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.6;
}

.quote figcaption {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.5;
  border-top: 1px solid rgba(214, 179, 106, 0.12);
  padding-top: 10px;
}

.quotes-note {
  max-width: 42em;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}

@media (min-width: 48rem) {
  .quotes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .quote {
    padding: 24px;
  }
}

/* ---------- 一生启示 ---------- */

.lessons {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lesson {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}

.lesson:last-child {
  border-bottom: 1px solid var(--rule);
}

.lesson__no {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.lesson h3 {
  margin-bottom: 8px;
  font-size: var(--fs-h3);
}

.lesson p {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

@media (min-width: 48rem) {
  .lesson {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 24px;
    padding: 30px 0;
  }

  .lesson__no {
    font-size: 1.5rem;
  }
}

/* ---------- 交接与悼念 ---------- */

.ending {
  display: grid;
  gap: 28px;
  margin-top: clamp(40px, 7vw, 64px);
}

.succession {
  padding: 20px;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.succession__kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.succession h3 {
  margin-bottom: 16px;
  font-size: var(--fs-h3);
}

.succession dl {
  margin: 0;
}

.succession dl > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(214, 179, 106, 0.12);
}

.succession dt {
  color: var(--accent);
  font-size: var(--fs-small);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.succession dd {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.55;
}

.memorial {
  padding: 24px;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  background:
    linear-gradient(180deg, rgba(16, 26, 43, 0.96), rgba(8, 13, 24, 1));
}

.memorial__date {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.memorial h3 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
}

.memorial__lead {
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.memorial__quote {
  margin: 22px 0 12px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.memorial__quote p {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 4.8vw, 1.75rem);
  line-height: 1.55;
}

.memorial__quote cite {
  color: var(--muted);
  font-size: var(--fs-small);
  font-style: normal;
  line-height: 1.5;
}

.memorial__original {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.55;
}

.memorial__abel {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.65;
}

.memorial__abel span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .ending {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 32px;
    align-items: start;
  }

  .succession,
  .memorial {
    padding: 24px;
  }
}

@media (max-width: 22.5rem) {
  .succession dl > div {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
  }
}

/* ---------- 章节索引 ---------- */

.chapter-index {
  padding: clamp(64px, 9vw, 112px) 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
  background: linear-gradient(180deg, rgba(12, 19, 34, 0.5), rgba(7, 11, 20, 0));
}

.index-head {
  margin-bottom: clamp(28px, 5vw, 40px);
}

.index-head__kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: var(--fs-small);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.index-head h2 {
  margin-bottom: 12px;
  font-size: var(--fs-h2);
}

.index-head p {
  max-width: 38em;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.index-list {
  display: grid;
  border-top: 1px solid var(--rule-strong);
}

.index-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  transition:
    background-color var(--d-ui) var(--ease-out),
    border-color var(--d-ui) var(--ease-out);
}

.index-row__no {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.index-row__text strong {
  display: block;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.375rem;
  line-height: 1.25;
}

.index-row__text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.index-row__arrow {
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 160ms var(--ease-out);
}

.index-cta {
  margin-top: clamp(32px, 5vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.index-cta p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

@media (min-width: 48rem) {
  .index-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 24px;
    padding: 16px 0;
  }

  .index-row__no {
    font-size: 1.375rem;
  }

  .index-row__text strong {
    font-size: 1.5rem;
  }
}

/* ---------- 资料与说明 ---------- */

.sources {
  padding: clamp(48px, 7vw, 72px) 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
} 

.sources h2 {
  margin-bottom: 18px;
  font-size: var(--fs-h2);
}

.sources ul {
  max-width: 42em;
  margin: 0 0 20px;
  padding-left: 1.1em;
}

.sources li {
  margin-bottom: 12px;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.65;
}

.sources a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sources__note {
  max-width: 42em;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}

/* ---------- 页脚 ---------- */

.site-footer {
  padding: 48px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  background: var(--bg-deep);
}

.site-footer__kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.site-footer__domain {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.site-footer__line {
  margin-bottom: 24px;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.55;
}

.site-footer__meta {
  max-width: 42em;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}

/* ---------- 进入与揭示 ---------- */

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spark-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

html.js .hero__dateline,
html.js .hero__dates,
html.js .hero__title,
html.js .hero__en,
html.js .hero__sub {
  animation: hero-rise 700ms var(--ease-out) 80ms both;
}

html.js .hero__lead,
html.js .hero__memorial,
html.js .hero__actions,
html.js .hero__hint {
  animation: hero-rise 700ms var(--ease-out) 200ms both;
}

html.js .compound-card {
  animation: hero-rise 800ms var(--ease-out) 300ms both;
}

html.js .spark__sp {
  stroke-dasharray: 1;
  animation: spark-draw 1100ms var(--ease-out) 520ms both;
}

html.js .spark__brk {
  stroke-dasharray: 1;
  animation: spark-draw 1250ms var(--ease-out) 680ms both;
}

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--d-enter) var(--ease-out),
    transform var(--d-scene) var(--ease-out);
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--accent-soft);
  }

  .site-chapters:hover {
    color: var(--accent);
  }

  .btn--primary:hover {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
    color: var(--bg);
  }

  .btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent-soft);
  }

  .next-chapter:hover {
    background: rgba(214, 179, 106, 0.06);
    border-color: var(--rule-strong);
    color: var(--text);
  }

  .index-row:hover {
    background: rgba(214, 179, 106, 0.05);
    border-color: var(--rule-strong);
    color: var(--text);
  }

  .index-row:hover .index-row__arrow {
    transform: translateX(3px);
  }

  .sources a:hover {
    color: var(--accent-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html.js [data-reveal],
  [data-reveal],
  [data-enter],
  .hero__dateline,
  .hero__dates,
  .hero__title,
  .hero__en,
  .hero__sub,
  .hero__lead,
  .hero__memorial,
  .hero__actions,
  .hero__hint,
  .compound-card {
    opacity: 1 !important;
    transform: none !important;
  }

  html.js .chart__line,
  .chart__line,
  .spark__sp,
  .spark__brk {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }

  .chapter-hud__track i {
    transition: none !important;
  }
}
