[hidden] { display: none !important; }

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-normal-latin.48282a415ec2.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-normal-latin-ext.f120089b9440.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-latin.056e4e2459f5.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-latin-ext.ae1d854fefa1.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --canal-night: #10272C;
  --deep-water: #164B52;
  --silt: #E8D9BC;
  --dredge-brass: #C99A58;
  --signal: #C9573F;
  --chalk: #F7F3E9;
  --accent-ink: #8C3E2C;
  --page: var(--chalk);
  --page-soft: #EEE6D6;
  --ink: #15282A;
  --ink-soft: #45585A;
  --line: #BDB49F;
  --water: var(--canal-night);
  --water-light: #2B6368;
  --bar-height: 3.35rem;
  --content-max: 78rem;
  --reading-width: 42rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-height) + 1rem);
}

:root[data-theme="night"] {
  color-scheme: dark;
  --page: #10272C;
  --page-soft: #17363B;
  --ink: #F1E9D9;
  --ink-soft: #B7C4BF;
  --line: #476267;
  --water: #0B1C20;
  --water-light: #27636A;
  --accent-ink: #E4896A;
}

* { box-sizing: border-box; }
html { min-width: 20rem; }
body {
  margin: 0;
  min-width: 20rem;
  background: var(--page);
  color: var(--ink);
  font-size: 1.125rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; }
::selection { color: var(--chalk); background: var(--deep-water); }

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.5rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  color: var(--chalk);
  background: var(--canal-night);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar-height);
  color: var(--chalk);
  background: var(--canal-night);
  box-shadow: 0 1px 0 rgb(247 243 233 / 15%);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: min(100% - 2rem, var(--content-max));
  height: 100%;
  margin-inline: auto;
}
.home-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 2.6rem;
  color: var(--chalk);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark { width: 2.15rem; height: 1.65rem; color: var(--dredge-brass); }
.home-name { max-width: 9rem; overflow: hidden; font-size: 0.76rem; font-weight: 650; letter-spacing: 0.055em; text-overflow: ellipsis; }
.top-chapters {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 0.9rem;
  min-width: 0;
  overflow: hidden;
}
.top-chapters a {
  color: #D7E0DA;
  font-size: 0.73rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.top-chapters a[aria-current="location"] { color: #F0C889; }
.language-list {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.language-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  min-height: 2.2rem;
  padding: 0.2rem;
  color: #D7E0DA;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.language-list a[aria-current="page"] { color: #F0C889; box-shadow: inset 0 -2px #F0C889; }
.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid rgb(247 243 233 / 25%);
  border-radius: 50%;
  color: var(--chalk);
  background: transparent;
  cursor: pointer;
}
.icon-button svg { width: 1.15rem; height: 1.15rem; }
.js-only-slot { position: relative; display: inline-grid; flex: 0 0 auto; place-items: center; }
.js-only-slot > [data-js-only] { position: absolute; inset: 0; margin: 0; }
.js-only-slot--theme { width: 2.45rem; height: 2.45rem; }
.reading-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--dredge-brass);
  transform: scaleX(0);
  transform-origin: left center;
}

.rail {
  position: fixed;
  z-index: 30;
  top: 50%;
  right: max(0.85rem, calc((100vw - var(--content-max)) / 2 - 2rem));
  display: grid;
  gap: 0.44rem;
  transform: translateY(-50%);
}
.rail a {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  color: var(--ink);
  text-decoration: none;
}
.rail-dot {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
  background: var(--page);
  transition: transform 150ms ease, background-color 150ms ease;
}
.rail a[aria-current="location"] .rail-dot {
  border-color: var(--signal);
  background: var(--signal);
  transform: scale(1.3);
}
.rail-label {
  position: absolute;
  right: calc(100% + 0.65rem);
  width: max-content;
  max-width: 14rem;
  padding: 0.28rem 0.52rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--page);
  font-size: 0.74rem;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0.25rem);
  transition: none;
}
.rail a:hover .rail-label,
.rail a:focus .rail-label,
.rail:focus-within a[aria-current="location"] .rail-label {
  opacity: 1;
  transform: translateX(0);
}

main { overflow: clip; }
.hero {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(26rem, 1.15fr);
  align-items: center;
  gap: clamp(2rem, 4rem, 5rem);
  width: min(100% - 3rem, var(--content-max));
  min-height: min(56rem, calc(100svh - var(--bar-height)));
  margin: 0 auto;
  padding-block: 4.5rem 5rem;
}
.hero-copy { position: relative; z-index: 2; max-width: 37rem; }
.eyebrow, .kicker {
  margin: 0 0 0.9rem;
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 470;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 {
  max-width: 11ch;
  margin-bottom: 1.2rem;
  font-size: 5.2rem;
  line-height: 0.98;
}
.hero-deck {
  max-width: 18ch;
  margin-bottom: 1.9rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.1rem;
  line-height: 1.13;
}
.hero-open {
  max-width: 35rem;
  margin-bottom: 0.85rem;
  font-size: 1.12rem;
  line-height: 1.65;
}
.hero-note {
  max-width: 36rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
  line-height: 1.45;
}
.hero-art {
  position: relative;
  z-index: 3;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(16 39 44 / 14%);
  background: #D2C09D;
  box-shadow: 1.15rem 1.15rem 0 var(--dredge-brass);
}
.hero-art svg { display: block; width: 100%; height: auto; }
.hero-art .map-label { font-size: 20px; }
.hero-art .route-caption {
  position: absolute;
  right: 0.85rem;
  bottom: 0.65rem;
  max-width: 18ch;
  padding: 0.25rem 0.45rem;
  color: var(--chalk);
  background: var(--canal-night);
  font-size: 0.68rem;
  line-height: 1.3;
}
.hero-rule {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.55rem;
  background: linear-gradient(90deg, var(--deep-water) 0 60%, var(--signal) 60% 61%, var(--silt) 61%);
}

.story-section {
  position: relative;
  padding: 7.2rem max(1.5rem, calc((100vw - var(--content-max)) / 2)) 7.6rem;
  scroll-margin-top: calc(var(--bar-height) + 1rem);
}
.story-section:nth-of-type(even) { background: var(--page-soft); }
.section-inner { width: min(100%, var(--content-max)); margin-inline: auto; }
.section-head { max-width: var(--reading-width); margin: 0 0 2rem; }
.section-head h2 {
  max-width: 20ch;
  margin-bottom: 1.4rem;
  font-size: 3.65rem;
  line-height: 1.06;
}
.section-copy { max-width: var(--reading-width); }
.section-copy p, .journey-step p {
  margin: 0 0 1.35rem;
  font-size: 1.08rem;
  line-height: 1.78;
}
.citations {
  display: inline-flex;
  gap: 0.35rem;
  margin-left: 0.5rem;
  font-size: 0.69rem;
  line-height: 1.5;
  vertical-align: baseline;
}
.citations a {
  display: inline-block;
  padding-inline: 0.24rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
}
.citations a:hover { border-color: var(--signal); color: var(--accent-ink); }

.figure-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vw, 1.4rem);
  width: min(100%, 74rem);
  margin: 2.7rem 0 0;
}
.figure-gallery[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 56rem; }
.figure-gallery[data-visual="V01"] .commons-figure:first-child { grid-column: 1 / -1; }
.commons-figure {
  min-width: 0;
  margin: 0;
  padding: clamp(0.55rem, 1.2vw, 0.9rem);
  border: 1px solid var(--line);
  background: var(--page);
}
.commons-photo {
  display: block;
  width: 100%;
  max-height: 38rem;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  background: var(--page-soft);
}
.commons-photo--modest {
  width: auto;
  max-width: min(100%, 56.25rem);
  max-height: none;
}
.figure-caption { display: block; margin: 0.75rem 0 0; color: var(--ink-soft); font-size: 0.83rem; line-height: 1.5; }
.image-credit { margin: 0.55rem 0 0; color: var(--ink-soft); font-size: 0.73rem; line-height: 1.45; overflow-wrap: anywhere; }
.image-credit a { font-weight: 650; }

.ancient-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(17rem, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 6rem, 7rem);
}
.ancient-figure {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--page);
}
.ancient-figure svg { display: block; width: 100%; height: auto; }
.ancient-figure figcaption, .figure-caption {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}
.ancient-water { fill: none; stroke: var(--deep-water); stroke-width: 13; stroke-linecap: round; }
.ancient-water--soft { stroke: var(--dredge-brass); stroke-width: 8; stroke-dasharray: 7 10; }
.ancient-land { fill: var(--page-soft); stroke: var(--line); stroke-width: 2; }
.ancient-label { fill: var(--ink); font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 21px; }
.ancient-label--small { fill: var(--ink-soft); font-size: 17px; }

.build-callout {
  position: relative;
  max-width: 51rem;
  margin: 2.5rem 0 2.8rem;
  padding: 1.6rem 1.75rem 1.7rem;
  border-left: 4px solid var(--signal);
  background: var(--page);
}
.build-callout h3 {
  margin: 0 0 0.75rem;
  font-family: "IBM Plex Sans", "PingFang SC", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}
.build-callout p { margin: 0; max-width: 48rem; }
.timeline-figure { margin: 3rem 0 0; }
.timeline-figure h3 {
  margin-bottom: 1.3rem;
  font-size: 1.55rem;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  min-height: 12rem;
  padding: 1.15rem 1rem 0 1.2rem;
  border-top: 2px solid var(--deep-water);
}
.timeline li::before {
  position: absolute;
  top: -0.43rem;
  left: 0;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--signal);
  content: "";
}
.timeline time { display: block; margin-bottom: 0.45rem; color: var(--accent-ink); font-size: 0.77rem; font-weight: 700; }
.timeline h4 { margin: 0 0 0.45rem; font-size: 0.99rem; line-height: 1.35; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.48; }

.journey-section { padding-block: 5rem 6.5rem; }
.journey-section .section-head { max-width: 38rem; }
.journey-intro { max-width: 36rem; color: var(--ink-soft); }
.journey-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.88fr);
  align-items: stretch;
  gap: clamp(1.6rem, 4rem, 5rem);
  width: min(100%, var(--content-max));
  margin-inline: auto;
}
.journey-visual-column { min-width: 0; }
.journey-figure {
  position: sticky;
  top: calc(var(--bar-height) + 1rem);
  z-index: 8;
  margin: 0;
  height: min(72svh, 48rem);
  min-height: 25rem;
  overflow: hidden;
  border: 1px solid #466166;
  background: var(--canal-night);
}
.journey-figure svg { display: block; width: 100%; height: 100%; }
.journey-figure .map-label { font-size: 21px; }
.journey-figure .water-label, .hero-art .water-label { fill: #D8E2D8; }
.journey-figure .land-label, .hero-art .land-label { fill: #D6C19B; }
.journey-figure .route-label, .hero-art .route-label { fill: #FFFFFF; }
.journey-figure .stop-dot, .hero-art .stop-dot { fill: var(--dredge-brass); stroke: var(--canal-night); stroke-width: 5; }
.journey-figure .stop-ring, .hero-art .stop-ring { fill: none; stroke: var(--dredge-brass); stroke-width: 2; }
.journey-figure[data-state="port"] .stop--port .stop-dot,
.journey-figure[data-state="lake"] .stop--lake .stop-dot,
.journey-figure[data-state="suez"] .stop--suez .stop-dot { fill: var(--signal); }
.journey-figure[data-state="port"] .stop--port .stop-ring,
.journey-figure[data-state="lake"] .stop--lake .stop-ring,
.journey-figure[data-state="suez"] .stop--suez .stop-ring { stroke: var(--signal); stroke-width: 4; }
.journey-figure .ship-marker, .hero-art .ship-marker { transition: transform 400ms cubic-bezier(.2,.7,.25,1); }
.journey-figure .ship-hull, .hero-art .ship-hull { fill: var(--chalk); stroke: var(--canal-night); stroke-width: 3; }
.journey-figure .ship-deck, .hero-art .ship-deck { fill: var(--signal); }
.journey-figure .channel, .hero-art .channel { fill: none; stroke: #64A9A5; stroke-width: 17; stroke-linecap: round; }
.journey-figure .route-dash, .hero-art .route-dash { fill: none; stroke: #C99A58; stroke-width: 2; stroke-dasharray: 4 12; }
.journey-figure figcaption {
  position: absolute;
  right: 0.6rem;
  bottom: 0.55rem;
  left: 0.6rem;
  max-width: 27rem;
  padding: 0.25rem 0.4rem;
  color: var(--chalk);
  background: rgb(16 39 44 / 92%);
  font-size: 0.75rem;
  line-height: 1.35;
}
.journey-readline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.25rem;
  margin-top: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-left: 3px solid var(--signal);
  background: var(--page);
}
.journey-current-place { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; line-height: 1.2; }
.journey-current-date { color: var(--ink-soft); font-size: 0.77rem; text-align: right; }
.journey-steps { min-width: 0; }
.journey-step {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78svh;
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--bar-height) + 2rem);
  outline: none;
}
.journey-step:first-child { border-top: 0; }
.journey-step:focus-visible { outline: 2px solid var(--signal); outline-offset: 0.6rem; }
.journey-step.on { border-color: var(--signal); }
.journey-step .step-date {
  margin-bottom: 0.6rem;
  color: var(--accent-ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.journey-step h3 { margin-bottom: 0.85rem; font-size: 2.5rem; line-height: 1.05; }
.step-citations { margin: 0.4rem 0 1.4rem; }
.journey-control-slot { display: flex; flex: 0 0 3.15rem; align-items: center; margin-top: 0.4rem; }
.journey-controls {
  display: flex;
  gap: 0.7rem;
}
.journey-controls button {
  min-height: 2.75rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--ink);
  background: var(--page);
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}
.journey-controls button:hover { color: var(--chalk); background: var(--canal-night); }

.measure-panel { margin-top: 2.6rem; }
.measure-panel h3, .traffic-panel h3 {
  margin: 0 0 0.8rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.85rem;
}
.measure-caption { max-width: 52rem; color: var(--ink-soft); font-size: 0.83rem; }
.measure-rows { margin: 1.35rem 0 0; border-top: 1px solid var(--line); }
.measure-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1.1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.measure-row h4 { margin: 0; font-size: 0.88rem; font-weight: 700; }
.measure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.measure-pair div { min-width: 0; }
.measure-pair dt {
  margin-bottom: 0.3rem;
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.measure-pair dd { margin: 0; font-size: 0.96rem; line-height: 1.5; }
.measure-note {
  max-width: 52rem;
  margin: 1.1rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--dredge-brass);
  color: var(--ink-soft);
  font-size: 0.87rem;
}
.measure-visual-pair {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: clamp(0.9rem, 2.3vw, 1.6rem);
  width: min(100%, 74rem);
  margin-top: 2rem;
}
.measure-visual-pair .figure-gallery { display: block; width: 100%; max-width: none; margin: 0; }
.measure-visual-pair .commons-figure { height: 100%; }
.cross-section-figure {
  min-width: 0;
  margin: 0;
  padding: clamp(0.55rem, 1.2vw, 0.9rem);
  border: 1px solid var(--line);
  background: var(--page);
}
.cross-section-figure svg { display: block; width: 100%; height: auto; }
.cross-section-label { fill: var(--ink); font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 24px; font-weight: 700; }

.money-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 2.4rem 0;
  background: var(--line);
  border: 1px solid var(--line);
}
.money-rows div { min-height: 10rem; padding: 1.1rem; background: var(--page); }
.money-rows dt { margin-bottom: 0.8rem; color: var(--ink-soft); font-size: 0.8rem; }
.money-rows dd { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.55rem; line-height: 1.2; }

.traffic-panel { margin-top: 2.8rem; }
.traffic-panel > p { max-width: 50rem; }
.traffic-bars { display: grid; gap: 0.65rem; max-width: 45rem; margin: 1.4rem 0 2rem; }
.traffic-bar-row {
  display: grid;
  grid-template-columns: 4.25rem minmax(6rem, 1fr) 6rem;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.88rem;
}
.traffic-bar-row time { font-weight: 700; }
.traffic-track { display: block; height: 0.86rem; overflow: hidden; background: var(--line); }
.traffic-track span { display: block; height: 100%; background: var(--deep-water); }
.traffic-bar-row:last-child .traffic-track span { background: var(--signal); }
.traffic-bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.monthly-callout {
  max-width: 51rem;
  margin: 2rem 0;
  padding: 1.25rem 1.4rem;
  border-top: 2px solid var(--dredge-brass);
  background: var(--page);
}
.monthly-callout h3 { margin: 0 0 0.65rem; font-size: 1.2rem; }
.monthly-callout p { margin: 0; }

.source-section { padding-bottom: 5rem; }
.source-section .section-head { margin-bottom: 1.1rem; }
.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 2rem;
  max-width: 70rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: sources;
}
.source-list li {
  position: relative;
  padding: 0.8rem 0 0.8rem 2.4rem;
  border-top: 1px solid var(--line);
  counter-increment: sources;
  font-size: 0.9rem;
}
.source-list li::before {
  position: absolute;
  top: 0.8rem;
  left: 0;
  color: var(--accent-ink);
  content: counter(sources, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 700;
}
.source-list a { font-weight: 650; text-decoration: none; }
.source-list p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.79rem; line-height: 1.45; }

.share-block { padding: 2rem max(1.5rem, calc((100vw - var(--content-max)) / 2)); border-top: 1px solid var(--line); }
.share-inner { display: flex; align-items: center; gap: 1.2rem; width: min(100%, var(--content-max)); margin: auto; }
.share-heading { flex: 0 0 auto; margin: 0; font-size: 0.82rem; font-weight: 700; }
.share-row { display: flex; align-items: center; gap: 0.5rem; }
.js-only-slot--share { width: 2.5rem; height: 2.5rem; }
.share-row a, .share-row button {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.share-row a:hover, .share-row button:hover { border-color: var(--deep-water); color: var(--chalk); background: var(--deep-water); }
.share-row svg { width: 1.15rem; height: 1.15rem; }
.share-status { min-height: 1.4rem; margin: 0; color: var(--ink-soft); font-size: 0.77rem; }
@media (pointer: coarse) {
  .js-only-slot--share, .share-row a, .share-row button { width: 2.75rem; height: 2.75rem; }
}

.site-footer {
  padding: 2rem max(1.5rem, calc((100vw - var(--content-max)) / 2)) 2.5rem;
  color: var(--chalk);
  background: var(--canal-night);
}
.footer-inner { display: flex; align-items: start; justify-content: space-between; gap: 2rem; width: min(100%, var(--content-max)); margin: auto; }
.site-footer p { max-width: 34rem; margin: 0; color: #D1DCD7; font-size: 0.81rem; }
.site-footer a { color: #F2CA8E; font-size: 0.81rem; }
.to-top {
  position: fixed;
  z-index: 50;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 0.25rem);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.6rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  color: var(--chalk);
  background: var(--canal-night);
  box-shadow: 0 3px 12px rgb(0 0 0 / 20%);
  font-size: 0.82rem;
  cursor: pointer;
}
.to-top svg { width: 1rem; height: 1rem; }

:root[lang^="zh"] body { line-height: 1.88; }
:root[lang^="zh"] h1, :root[lang^="zh"] h2, :root[lang^="zh"] h3,
:root[lang^="zh"] .hero-deck, :root[lang^="zh"] .journey-current-place {
  font-family: "Fraunces", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", serif;
  letter-spacing: 0;
}
:root[lang^="zh"] .section-copy p, :root[lang^="zh"] .journey-step p { line-height: 1.9; }

@media (max-width: 72rem) {
  .rail { display: none; }
  .top-chapters { justify-content: flex-start; }
  .top-chapters a:nth-of-type(n+4) { display: none; }
}

@media (max-width: 58rem) {
  :root { --bar-height: 3.1rem; }
  body { font-size: 1.05rem; }
  .topbar-inner { gap: 0.4rem; width: calc(100% - 1rem); }
  .home-name { display: none; }
  .top-chapters { display: none; }
  .language-list { margin-left: auto; gap: 0.2rem; }
  .language-list a { min-width: 2rem; min-height: 2.2rem; }
  .hero {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    width: calc(100% - 2.25rem);
    min-height: auto;
    padding-block: 3.5rem 4rem;
  }
  .hero-copy { max-width: 40rem; }
  h1 { max-width: 12ch; font-size: 3.8rem; }
  .hero-deck { font-size: 1.8rem; }
  .hero-art { width: min(100%, 42rem); margin-left: auto; box-shadow: 0.55rem 0.55rem 0 var(--dredge-brass); }
  .story-section { padding: 5rem 1.15rem 5.5rem; }
  .section-head h2 { font-size: 2.75rem; }
  .ancient-layout { grid-template-columns: 1fr; gap: 2.2rem; }
  .ancient-figure { max-width: 36rem; }
  .journey-body { grid-template-columns: 1fr; gap: 0.1rem; }
  .journey-visual-column { display: contents; }
  .journey-figure {
    top: calc(var(--bar-height) + env(safe-area-inset-top));
    height: min(30svh, 15rem);
    min-height: 0;
    max-height: 32svh;
  }
  .journey-figure svg { object-fit: contain; }
  .journey-figure .map-label { font-size: 24px; }
  .journey-readline {
    position: sticky;
    top: calc(var(--bar-height) + env(safe-area-inset-top) + min(30svh, 15rem) + 0.4rem);
    z-index: 9;
    margin-top: 0.4rem;
    box-shadow: 0 2px 0 var(--page);
  }
  .journey-step {
    min-height: 74svh;
    padding-block: 2.8rem;
    scroll-margin-top: calc(var(--bar-height) + env(safe-area-inset-top) + min(30svh, 15rem) + 4.3rem);
  }
  .journey-step h3 { font-size: 2.1rem; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 1rem; }
  .timeline li { min-height: 11rem; }
  .money-rows { grid-template-columns: 1fr; }
  .money-rows div { min-height: auto; }
  .source-list { grid-template-columns: 1fr; }
  .figure-gallery { grid-template-columns: 1fr; }
  .figure-gallery[data-visual="V01"] .commons-figure:first-child { grid-column: auto; }
  .measure-visual-pair { grid-template-columns: 1fr; }
  .share-inner { flex-wrap: wrap; gap: 0.55rem 1rem; }
  .share-status { flex-basis: 100%; }
}

@media (max-width: 37rem) {
  h1 { max-width: 12ch; font-size: 3.2rem; line-height: 1.03; }
  .hero-deck { max-width: 20ch; font-size: 1.6rem; }
  .hero { padding-top: 2.5rem; }
  .hero-art .route-caption { right: 0.35rem; bottom: 0.3rem; max-width: 18ch; font-size: 0.75rem; }
  .section-head h2 { font-size: 2.35rem; }
  .measure-row { grid-template-columns: 1fr; gap: 0.65rem; }
  .measure-pair { grid-template-columns: 1fr; gap: 0.65rem; }
  .measure-pair div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: start; gap: 0.45rem; }
  .measure-pair dt { margin: 0; }
  .measure-pair dd { font-size: 0.9rem; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline li { min-height: auto; padding: 0.85rem 0.75rem 1.3rem 1.35rem; border-top: 0; border-left: 2px solid var(--deep-water); }
  .timeline li::before { top: 1rem; left: -0.44rem; }
  .timeline time { margin-bottom: 0.3rem; }
  .traffic-bar-row { grid-template-columns: 3.4rem minmax(4rem, 1fr) 5.3rem; gap: 0.45rem; font-size: 0.78rem; }
  .journey-readline { min-height: 3rem; }
  .journey-current-place { font-size: 1.08rem; }
  .journey-current-date { font-size: 0.69rem; }
  .journey-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .journey-controls button { padding-inline: 0.45rem; font-size: 0.74rem; }
  .share-block { padding-inline: 1rem; }
  .share-heading { flex-basis: 100%; }
  .site-footer { padding-inline: 1.15rem; }
  .footer-inner { flex-direction: column; gap: 0.9rem; }
  .to-top { right: max(0.55rem, env(safe-area-inset-right)); }
}

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

@media print {
  .site-topbar, .rail, .journey-controls, .share-block, .to-top { display: none !important; }
  body { color: #111; background: #fff; }
  .story-section { padding: 1.5rem 0; break-inside: avoid; }
  .journey-figure { position: static; height: auto; min-height: 0; }
  .journey-step { min-height: 0; break-inside: avoid; }
}
