/* popsci shared styles — warm lecture hall */
:root {
  --bg: #f8f4e9;
  --ink: #333;
  --accent: #8B4513;
  --card: #fffdf6;
  --border: #e6d9c2;
  --muted: #666;
  --link: #6b3e12;
}
* { box-sizing: border-box; }
body {
  font-family: "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  line-height: 1.85;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 18px 48px;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--link); }
h1, h2, h3, h4 { color: var(--accent); line-height: 1.35; }
img, svg { max-width: 100%; height: auto; }
img.hero, .figure img {
  border-radius: 8px;
  margin: 16px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
}
.site-header { text-align: center; margin-bottom: 1.2rem; }
.site-header img { width: min(280px, 70vw); border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,.1); }
.disclaimer {
  background: #fff8e7;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #554;
  margin: 1rem 0 1.5rem;
}
.nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin: 0.5rem 0 1.2rem;
}
.nav a {
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.92rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 1.2rem 0 2rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.chapter { margin-bottom: 2.2rem; }
.figure {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin: 1.2rem 0;
}
.figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 6px;
}
.sources {
  background: #fff;
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  margin-top: 2rem;
}
.sources ol { padding-left: 1.2rem; }
.pager {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pager a { text-decoration: none; }
footer {
  text-align: center;
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
code { background: #f0ebe0; padding: 1px 5px; border-radius: 4px; }
pre {
  background: #2d2d2d; color: #f8f8f2;
  padding: 14px; border-radius: 8px; overflow-x: auto;
  font-size: 0.88rem;
}
.note { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 600px) {
  body { padding: 12px 12px 36px; }
  h1 { font-size: 1.45rem; }
}
