:root {
  --ink: #253647; --cream: #f4f5f2; --gold: #667d75;
  --up: #b33a2b; --down: #2d6a4f; --line: #cbd2d4; --muted: #62727a;
  --card: #fffdf8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body { margin:0; background:var(--cream); color:var(--ink);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  font-size: 18px; line-height: 1.85; }
.serif { font-family: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif; }
.sans { font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: #f5f6f3; padding: clamp(48px, 7vw, 90px) 24px clamp(40px, 5vw, 70px); }
.hero-inner { max-width: 1120px; margin: auto; }
.kicker { font: 700 12px/1.5 system-ui; letter-spacing: .23em; color: #a9b9ad; text-transform: uppercase; }
.hero h1 { max-width: 900px; font-size: clamp(34px, 6vw, 72px); line-height: 1.22; letter-spacing: -.02em; margin: 20px 0 24px; font-weight: 600; }
.hero .deck { font-size: clamp(17px, 2.2vw, 24px); max-width: 780px; line-height: 1.65; color: #d6dce0; }
.hero-meta { margin-top: 34px; border-top: 1px solid #697985; padding-top: 16px;
  display: flex; gap: 18px; flex-wrap: wrap;
  font: 13px/1.7 system-ui; color: #bdc5cb; }

/* ---------- layout ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 24px 80px; }
section { margin: 0; }

/* ---------- stat row ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 48px 0 8px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat { padding: 24px 16px 24px 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 20px; }
.stat .label { font: 700 11px/1.5 system-ui; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.stat .value { font: 600 clamp(26px, 3.4vw, 40px)/1.15 Georgia, serif; margin: 10px 0 6px; letter-spacing: -.01em; }
.stat .delta { display: inline-block; font: 700 12px/1.4 system-ui; padding: 3px 8px; border-radius: 3px; }
.stat .delta.up { background: #f6e5e2; color: var(--up); }
.stat .delta.down { background: #e0ece4; color: var(--down); }
.stat .delta.flat { background: #ecece6; color: var(--muted); }
.stat .src { font: 11px/1.55 system-ui; color: var(--muted); margin-top: 10px; }

/* ---------- timeline ---------- */
.timeline { margin: 56px 0 8px; padding: 28px 0 12px; border-top: 1px solid var(--line); }
.timeline h2, .section-kicker { font: 700 12px system-ui; letter-spacing: .2em; color: var(--gold); }
.timeline h2 { margin: 0 0 6px; }
.timeline .note { color: var(--muted); font-size: 13px; }
#timeline svg { display: block; width: 100%; height: auto; }

/* ---------- map ---------- */
.map-section { margin: 48px 0; border-top: 1px solid var(--line); padding-top: 32px; }
.map-wrap { margin-bottom: 28px; display: flex; flex-direction: column; align-items: center; }
#map svg { display: block; width: 100%; height: auto; max-width: 760px; margin: 0 auto; }
.scatter-wrap { margin-top: 16px; }
.scatter-wrap svg { display: block; width: 100%; height: auto; max-width: 780px; }
.scatter-legend { font: 12px/1.7 system-ui; color: var(--muted); margin-top: 8px; }


/* ---------- debt panels ---------- */
.debt { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 40px 0; }
.debt-card { border: 1px solid var(--line); background: var(--card); padding: 22px; }
.debt-card h3 { font: 700 13px/1.5 system-ui; letter-spacing: .14em; color: var(--ink); text-transform: uppercase; margin: 0 0 14px; }
.debt-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #e5e8e4; font: 14px/1.5 system-ui; }
.debt-row:last-child { border-bottom: 0; }
.debt-row .name { color: var(--muted); }
.debt-row .val { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- analysis ---------- */
.analysis { margin: 56px 0 0; padding-top: 32px; border-top: 2px solid var(--ink); }
.analysis h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.35; letter-spacing: -.02em; margin: 0 0 26px; font-weight: 600; }
.analysis p { font-size: 17px; line-height: 1.9; margin: 0 0 22px; }
.analysis p strong { color: var(--ink); }
.analysis blockquote { border-left: 4px solid var(--gold); padding: 4px 0 4px 22px; font-size: 22px; line-height: 1.6; color: #736880; margin: 28px 0; }

/* ---------- footer ---------- */
#footer { background: var(--ink); color: #c8d0d4; text-align: center; padding: 32px 24px; font: 13px/1.7 system-ui; margin-top: 60px; }
#footer .sources { max-width: 760px; margin: 16px auto 0; font-size: 12px; color: #8b979d; }
#footer .not-advice { font-style: italic; margin-top: 14px; color: #7a868d; }

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .debt { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* SVG animation: proper transform origin for dots */
.tl-dot, .state-dot, .scatter-dot {
  transform-box: fill-box;
  transform-origin: center;
}
EOF
cat >> assets/styles.css <<'CSSEOF'

/* noscript fallback */
noscript .hero h1 { letter-spacing: 0; }
