:root {
  --bg: #fbfaf7;
  --fg: #1d1d1b;
  --muted: #6b6a64;
  --accent: #b4491f;
  --rule: #e2dfd6;
  --card: #f2efe6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16150f;
    --fg: #ecebe4;
    --muted: #9b9a90;
    --accent: #f0875a;
    --rule: #2e2d25;
    --card: #1f1e17;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.125rem/1.7 Georgia, "Iowan Old Style", serif;
}
main { max-width: 42rem; margin: 0 auto; padding: 2rem 1rem 5rem; }
nav a, .meta { font: 0.9rem system-ui, sans-serif; color: var(--muted); }
nav a { text-decoration: none; }
nav a:hover { color: var(--accent); }
h1 { font-size: 2.4rem; line-height: 1.15; margin: 1.5rem 0 0.5rem; }
.subtitle { font-size: 1.3rem; font-style: italic; color: var(--muted); margin: 0 0 0.75rem; }
h2 { font-size: 1.6rem; margin: 3rem 0 0.5rem; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
figure { margin: 2rem 0; }
figure img { width: 100%; height: auto; border-radius: 8px; }
figcaption { font: 0.85rem system-ui, sans-serif; color: var(--muted); margin-top: 0.5rem; }
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; font: 0.95rem/1.5 system-ui, sans-serif; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-weight: 600; }
blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: var(--card);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 1.2rem;
}
figure.pair .pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
figure.pair .pair-grid img { aspect-ratio: 4 / 3; object-fit: cover; }
figure.pair p { margin: 0; font: 0.85rem system-ui, sans-serif; color: var(--muted); }
figure.pair p.label { margin-top: 0.5rem; color: var(--fg); font-weight: 600; }
figure.pair p.credit { font-size: 0.75rem; margin-top: 0.15rem; }
@media (max-width: 34rem) { figure.pair .pair-grid { grid-template-columns: 1fr; } }
figure.portrait img { max-width: 24rem; display: block; margin: 0 auto; }
figure.portrait figcaption { text-align: center; }
figcaption .credit { font-size: 0.75rem; }
.quote { margin: 1.75rem 0; padding: 0.1rem 1.25rem; border-left: 3px solid var(--rule); }
.quote p { margin: 0.5rem 0; }
.quote p[lang] { font-size: 0.9rem; line-height: 1.7; color: var(--muted); }
.quote p.tr { font-size: 1.15rem; }
.quote p.cite { font: 0.85rem system-ui, sans-serif; color: var(--muted); }
ul.sources li { margin-bottom: 0.6rem; }
.quote .unit { margin: 0.85rem 0; }
.quote .unit p { margin: 0; }
nav { display: flex; justify-content: space-between; align-items: center; }
#lang-toggle {
  font: 0.9rem system-ui, sans-serif;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.9rem;
  cursor: pointer;
}
#lang-toggle:hover { background: var(--accent); color: var(--bg); }
#article-zh { display: none; }
html[data-lang="zh"] #article-en { display: none; }
html[data-lang="zh"] #article-zh { display: block; }
#article-zh { font-family: Georgia, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif; line-height: 1.85; }
#article-zh { font-size: 1.5rem; }
#article-zh .quote p.tr { font-size: 1.5rem; }
#article-zh .quote p[lang]:not(.tr) { font-size: 1.2rem; }
#article-zh blockquote { font-size: 1.6rem; }
#article-zh h1 { font-size: 3.2rem; }
#article-zh h2 { font-size: 2.15rem; }
#article-zh h3 { font-size: 1.65rem; }
#article-zh figcaption, #article-zh .quote p.cite, #article-zh figure.pair p, #article-zh .meta { font-size: 1.05rem; }
#article-zh figcaption .credit, #article-zh figure.pair p.credit { font-size: 0.9rem; }
#article-zh .name { text-decoration: underline; text-underline-offset: 0.2em; }
