:root {
  color-scheme: light;
  --paper: #f4f2ed;
  --ink: #17252d;
  --muted: #485761;
  --deep: #152932;
  --accent: #ebcc8d;
  --rule: #b6bbb8;
  font: 100%/1.6 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: .22em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #a44f19; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 2.5rem, 76rem); margin-inline: auto; }
header { border-bottom: 1px solid var(--rule); }
header .shell, footer .shell {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  flex-wrap: wrap;
}
.brand { font: 600 1.45rem Georgia, serif; text-decoration: none; }
.language { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; font-size: .9rem; }
.language [aria-current] { font-weight: 700; }
.hero { background: var(--deep); color: var(--paper); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3rem, 8vw, 7rem);
}
.kicker {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.hero .kicker { color: var(--accent); }
h1, h2, h3 { margin: 0; font-family: Georgia, 'Songti SC', SimSun, serif; font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(2.65rem, 7vw, 6rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.45rem; }
:lang(zh-Hans) h1 { letter-spacing: normal; }
.hero p.lede { max-width: 31rem; color: #d4dfe0; }
.cta { display: inline-block; margin-top: .75rem; padding: .65rem 1rem; background: var(--accent); color: var(--deep); font-weight: 700; text-decoration: none; }
.cta:hover { background: #f6dda9; }
.cover { margin: 0; min-width: 0; }
.cover img { width: 100%; height: auto; display: block; }
.empty-map {
  min-height: clamp(12rem, 27vw, 21rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.25rem;
  border: 1px dashed var(--rule);
  color: var(--muted);
  background-size: 2.5rem 2.5rem;
  background-image: linear-gradient(to right, #51656b18 1px, transparent 1px), linear-gradient(to bottom, #51656b18 1px, transparent 1px);
}
.hero .empty-map { color: #e2eaea; border-color: #829498; background-color: #1c343e; }
.empty-map span { padding: .55rem .75rem; background: var(--paper); }
.hero .empty-map span { background: var(--deep); }
.project, .case-intro { padding-block: clamp(2rem, 5.5vw, 4.5rem); }
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem 2rem; }
.project-copy p, .case-intro p { max-width: 65ch; }
.project .kicker { margin-top: .35rem; }
.project h2 { margin-bottom: .7rem; }
.project .meta, .case-intro .meta, figcaption { color: var(--muted); }
.back { display: inline-block; margin-bottom: 1.5rem; }
.case-intro h1 { font-size: clamp(2.2rem, 5.4vw, 4.5rem); }
.case-intro p { margin-bottom: 0; }
.map-section { padding-bottom: 3rem; }
.map-section > h2 { margin-bottom: 1rem; }
.period-index { margin-block: .75rem; }
.period-index summary { cursor: pointer; }
.period-index nav { margin-block: .5rem; gap: .35rem .9rem; }
.transcript { max-width: 68ch; margin-block: 1.75rem; }
.transcript h2 { margin-bottom: 1rem; }
.transcript h3 { margin-top: 1.25rem; }
.transcript .meta { color: var(--muted); font-size: .9rem; }
.timeline-scrubber {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem 1rem;
  padding: .85rem 1rem;
  background: #e7ece5;
  border: 1px solid var(--rule);
  border-left: 3px solid #456556;
}
.timeline-scrubber label, .timeline-scrubber output { font-weight: 650; }
.timeline-scrubber output { text-align: right; }
.timeline-scrubber input { width: 100%; accent-color: #456556; }
.timeline-scrubber small { color: var(--muted); grid-column: 1 / -1; }
.atlas-spread { margin-block: .85rem 1.6rem; }
.atlas-spread .transcript {
  margin: 0;
  max-width: none;
  padding: clamp(1rem, 2.5vw, 1.7rem);
  background: #fdfbf6;
  border: 1px solid var(--rule);
  border-top: 3px solid #456556;
}
@media (min-width: 51rem) {
  .map-grid.atlas-spread { grid-template-columns: minmax(0, 1.9fr) minmax(17rem, 1fr); }
}
.map-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-labels text {
  text-anchor: middle;
  dominant-baseline: central;
  font-family: Georgia, serif;
  fill: #132b2e;
}
.map-figure:has([data-original-map]:checked) .map-labels { visibility: hidden; }
.map-label-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .9rem;
  padding-block: .6rem;
  color: var(--muted);
  font-size: .9rem;
}
.map-label-control label { cursor: pointer; }
.chapter-art { margin-block: 1.6rem; }
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.art-grid figure {
  display: grid;
  grid-template-columns: minmax(5rem, 7.5rem) minmax(0, 1fr);
  align-items: start;
  gap: .85rem;
  margin: 0;
  padding: .75rem;
  border: 1px solid var(--rule);
}
.art-grid figure img { display: block; width: 100%; height: auto; }
.art-grid figcaption { margin: 0; }
.art-grid figcaption p { margin: .25rem 0; }
.map-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.map-grid.has-note { grid-template-columns: minmax(0, 2.25fr) minmax(16rem, 1fr); }
.map-figure { margin: 0; min-width: 0; }
.map-viewport { overflow: auto; max-height: 72vh; border: 1px solid var(--rule); background: #e1e6e5; }
.map-stage { position: relative; width: min(100%, var(--image-width)); max-width: none; }
.map-stage img { display: block; width: 100%; height: auto; }
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--deep);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  filter: drop-shadow(0 1px 3px #0009);
}
.pin[aria-expanded="true"] { color: var(--ink); background: var(--accent); }
.pin:focus-visible { outline-offset: -2px; outline-color: var(--accent); }
.map-tools { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .8rem 0; }
.map-tools button, .note button { min-width: 44px; min-height: 44px; background: #fff; border: 1px solid var(--rule); color: var(--ink); padding-inline: .65rem; }
.map-tools button:disabled { color: #667278; background: #e4e7e5; cursor: default; }
.map-tools output { min-width: 4rem; text-align: center; font-variant-numeric: tabular-nums; }
figcaption { margin-top: .8rem; overflow-wrap: anywhere; }
.note { border-top: 3px solid var(--deep); background: #e7ecea; padding: 1.2rem; overflow-wrap: anywhere; }
.note button { margin-top: .5rem; }
.copy { white-space: pre-line; overflow-wrap: anywhere; }
.missing { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1.2rem; }
.missing li { padding-block: .22rem; }
footer { border-top: 1px solid var(--rule); font-size: .9rem; color: var(--muted); }
@media (max-width: 50rem) {
  .map-grid.has-note { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 42rem) {
  .hero-inner, .project { grid-template-columns: 1fr; }
  .shell { width: calc(100% - 2rem); }
  .map-viewport { max-height: 62vh; }
}

