:root {
  --paper: #eee9df;
  --ink: #202a26;
  --muted: #536058;
  --line: #c9c1b4;
  --ochre: #a24d24;
  --danube: #175c66;
  --soft: #faf7f0;
  --deep: #14201d;
  --deep-ink: #f2eadb;
  --story-bg: #e5dfd3;
  --story-ink: #202a26;
  --story-muted: #4e5b53;
  --col: 54rem;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --svg-sky-top: #d7ded5;
  --svg-sky-bottom: #e9e9dc;
  --svg-ridge: #a7aa9c;
  --svg-left: #b99d72;
  --svg-right: #aaa79e;
  --svg-contour: #786d5d;
  --svg-hatch: #786d5d;
  --svg-cliff-shadow: #594e40;
  --svg-fracture: #5d5142;
  --svg-road-cut: #493d31;
  --svg-water-note: #f1f4e8;
  --svg-road: #3b3026;
  --svg-road-edge: #e4d4b2;
  --svg-wood: #58402b;
  --svg-water-top: #277783;
  --svg-water-bottom: #145762;
  --svg-water-edge: #d7eeea;
  --svg-plaque: #e8dcc0;
  --svg-map-ink: #26312d;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #111815;
  --ink: #f0e8d9;
  --muted: #c3bdad;
  --line: #34413a;
  --ochre: #e0a16b;
  --danube: #99d2d6;
  --soft: #1b2420;
  --deep: #0d1412;
  --deep-ink: #f2eadb;
  --story-bg: #151d1a;
  --story-ink: #f0e8d9;
  --story-muted: #c3bdad;
  --svg-sky-top: #29312e;
  --svg-sky-bottom: #39413c;
  --svg-ridge: #565b53;
  --svg-left: #665d4e;
  --svg-right: #595b56;
  --svg-contour: #b8a98c;
  --svg-hatch: #c8b99d;
  --svg-cliff-shadow: #2d332e;
  --svg-fracture: #363930;
  --svg-road-cut: #252b27;
  --svg-water-note: #edf3e6;
  --svg-road: #1a211e;
  --svg-road-edge: #c1b292;
  --svg-wood: #c1a37a;
  --svg-water-top: #286d76;
  --svg-water-bottom: #12434d;
  --svg-water-edge: #c1e1dc;
  --svg-plaque: #c8b894;
  --svg-map-ink: #18201d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
svg[hidden] { display: none !important; }
html { scroll-padding-top: 4.3rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.67;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }
.skip {
  position: absolute;
  left: .6rem;
  top: -3rem;
  z-index: 90;
  padding: .45rem .7rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
}
.skip:focus { top: .5rem; }
.progress { position: fixed; inset: 0 0 auto; z-index: 70; height: 3px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--ochre); transform: scaleX(0); transform-origin: left; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 3.15rem;
  padding: .35rem clamp(.8rem, 2.4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(10px);
}
.home, .topnav a, .chip, .icon-btn {
  font-family: var(--sans);
  font-size: .83rem;
  text-decoration: none;
}
.home { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; white-space: nowrap; }
.mark { width: 14px; height: 18px; }
.topnav { display: flex; gap: clamp(.55rem, 1.2vw, 1rem); margin-left: clamp(.4rem, 2vw, 2rem); }
.topnav a { color: var(--muted); white-space: nowrap; }
.topnav a:hover, footer a:hover { color: var(--ochre); }
.spacer { flex: 1; }
.chip, .icon-btn {
  display: inline-grid;
  place-items: center;
  min-height: 2.4rem;
  padding: 0 .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
}
.icon-btn { width: 2.4rem; padding: 0; }
.hero {
  display: grid;
  grid-template-columns: minmax(21rem, .82fr) minmax(0, 1.18fr);
  align-items: center;
  min-height: calc(100svh - 3.15rem);
  padding-right: clamp(1rem, 4vw, 4rem);
  background: var(--deep);
  color: var(--deep-ink);
  overflow: hidden;
}
.hero-copy { max-width: 38rem; padding: clamp(2rem, 6vw, 6rem) clamp(1.5rem, 6vw, 6rem); }
.kicker {
  margin: 0 0 .75rem;
  color: var(--ochre);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3rem, 5.3vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .99;
  text-wrap: balance;
}
.deck { max-width: 35rem; margin: 1.15rem 0 0; font-size: clamp(1.03rem, 1.25vw, 1.2rem); line-height: 1.5; }
.archive-photo { position: relative; width: 100%; max-width: 64rem; margin: 0; justify-self: end; }
.archive-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 887; object-fit: contain; }
.archive-photo figcaption {
  position: absolute;
  right: clamp(.5rem, 1.2vw, 1rem);
  bottom: clamp(.5rem, 1.2vw, 1rem);
  width: min(27rem, calc(100% - 1rem));
  padding: .65rem .8rem;
  border: 1px solid rgb(255 255 255 / .22);
  background: rgb(12 18 16 / .91);
  color: #f4eddf;
  font-family: var(--sans);
  font-size: .72rem;
  line-height: 1.48;
  backdrop-filter: blur(6px);
}
.archive-photo figcaption a { color: #f6c28f; text-underline-offset: .12em; }
.scrolly {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(27rem, 1.05fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6.5rem) clamp(1.25rem, 5vw, 5rem) 5rem;
  background: var(--story-bg);
  color: var(--story-ink);
}
.scene-sidebar { position: sticky; top: 4rem; align-self: start; min-width: 0; }
.scene-heading { display: flex; align-items: baseline; gap: .8rem; margin: 0 0 .6rem; }
.scene-index { color: var(--ochre); font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.scene-heading p { margin: 0; color: var(--story-ink); font-family: var(--sans); font-size: .9rem; font-weight: 650; }
.river-figure { margin: 0; }
.gorge-svg { display: block; width: 100%; height: auto; overflow: hidden; border: 1px solid color-mix(in srgb, var(--story-ink) 24%, transparent); background: var(--svg-sky-bottom); box-shadow: 0 1.2rem 3rem rgb(10 18 15 / .12); }
.gorge-svg text { font-family: var(--sans); }
.gorge-svg .sky-field { fill: var(--svg-sky-bottom); }
.gorge-svg .sky-top { stop-color: var(--svg-sky-top); }
.gorge-svg .sky-bottom { stop-color: var(--svg-sky-bottom); }
.gorge-svg .water-top { stop-color: var(--svg-water-top); }
.gorge-svg .water-bottom { stop-color: var(--svg-water-bottom); }
.gorge-svg .far-ridge { fill: var(--svg-ridge); opacity: .73; }
.gorge-svg .left-cliff { fill: var(--svg-left); }
.gorge-svg .right-cliff { fill: var(--svg-right); }
.gorge-svg .left-strata, .gorge-svg .right-strata { fill: none; stroke: var(--svg-contour); stroke-width: 2.5; opacity: .76; }
.gorge-svg .cliff-rim-shadow { fill: none; stroke: var(--svg-cliff-shadow); stroke-width: 24; stroke-linecap: round; stroke-linejoin: round; opacity: .58; }
.gorge-svg .cliff-fractures { fill: none; stroke: var(--svg-fracture); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .68; }
.gorge-svg .stone-texture { fill: url(#stone-hatch); opacity: .14; }
.gorge-svg .hatch-line { fill: none; stroke: var(--svg-hatch); stroke-width: 1; opacity: .65; }
.gorge-svg .river-bed { fill: #494d47; opacity: .65; }
.gorge-svg .incision-shadow { fill: var(--svg-road-cut); opacity: .8; }
.gorge-svg .cliff-lip { fill: none; stroke: var(--svg-contour); stroke-width: 3; }
.gorge-svg .low-water { fill: var(--svg-water-bottom); opacity: 0; }
.gorge-svg .water-edge-low, .gorge-svg .water-edge-high { fill: none; stroke: var(--svg-water-edge); stroke-width: 5; }
.gorge-svg .water-edge-low { opacity: 0; }
.gorge-svg .road-ledge { fill: var(--svg-road); stroke: var(--svg-road-edge); stroke-width: 3; }
.gorge-svg .road-center { fill: none; stroke: var(--svg-road-edge); stroke-width: 4; stroke-dasharray: 16 14; opacity: .72; }
.gorge-svg .parapet-line { fill: none; stroke: var(--svg-road-edge); stroke-width: 8; }
.gorge-svg .retaining-joints { fill: none; stroke: var(--svg-road-edge); stroke-width: 2; opacity: .5; }
.gorge-svg .wood-beams, .gorge-svg .beam-brace { fill: none; stroke: var(--svg-wood); stroke-width: 9; stroke-linecap: square; }
.gorge-svg .beam-brace { stroke-width: 5; }
.gorge-svg .platform-front { fill: none; stroke: var(--svg-wood); stroke-width: 7; stroke-linecap: square; }
.gorge-svg .engraved-mark { fill: var(--svg-plaque); stroke: var(--svg-map-ink); stroke-width: 2; }
.gorge-svg .roman-stone, .gorge-svg .new-stone { fill: var(--svg-plaque); stroke: var(--svg-map-ink); stroke-width: 2; }
.gorge-svg .lifted-stone { fill: var(--svg-left); stroke: var(--svg-map-ink); stroke-width: 2; }
.gorge-svg .lifted-road-line { fill: none; stroke: var(--svg-road-edge); stroke-width: 5; }
.gorge-svg .lift-guide { fill: none; stroke: var(--svg-map-ink); stroke-width: 2; stroke-dasharray: 7 8; opacity: .75; }
.gorge-svg .leader { fill: none; stroke: var(--svg-map-ink); stroke-width: 2; }
.gorge-svg .note-box { fill: var(--svg-plaque); stroke: var(--svg-map-ink); stroke-width: 1.5; }
.gorge-svg .map-ink { fill: var(--svg-map-ink); }
.gorge-svg .map-date { font-family: var(--mono); font-size: 32px; font-weight: 750; }
.gorge-svg .map-small { font-size: 22px; font-weight: 650; }
.gorge-svg .bank-label { fill: var(--svg-map-ink); font-family: var(--mono); font-size: 22px; font-weight: 750; letter-spacing: 1px; }
.gorge-svg .direction-label { fill: var(--svg-map-ink); font-family: var(--mono); font-size: 20px; }
.gorge-svg .direction-arrow { fill: none; stroke: var(--svg-map-ink); stroke-width: 3; }
.gorge-svg .water-label { fill: #f4eee0; font-family: var(--serif); font-size: 32px; font-style: italic; }
.gorge-svg .water-before-label { fill: var(--svg-water-note); font-family: var(--sans); font-size: 22px; font-weight: 700; text-anchor: middle; letter-spacing: .04em; }
.gorge-svg .road-type-label { fill: var(--svg-map-ink); font-family: var(--sans); font-size: 18px; font-weight: 700; }
.gorge-svg .high-water { opacity: 1; transition: opacity .45s ease; }
.gorge-svg .old-inscription, .gorge-svg .new-plaque, .gorge-svg .lifted-road, .gorge-svg .left-road, .gorge-svg .right-road, .gorge-svg .low-water, .gorge-svg .water-edge-low { transition: opacity .45s ease; }
.gorge-svg .new-plaque, .gorge-svg .lifted-road { opacity: 1; }
.gorge-svg .old-inscription { opacity: .28; }
.river-figure[data-scene="stang"] .high-water,
.river-figure[data-scene="1885"] .high-water,
.river-figure[data-scene="drept"] .high-water { opacity: 0; }
.river-figure[data-scene="stang"] .low-water,
.river-figure[data-scene="1885"] .low-water,
.river-figure[data-scene="drept"] .low-water,
.river-figure[data-scene="stang"] .water-edge-low,
.river-figure[data-scene="1885"] .water-edge-low,
.river-figure[data-scene="drept"] .water-edge-low { opacity: 1; }
.river-figure[data-scene="stang"] .old-inscription,
.river-figure[data-scene="stang"] .new-plaque,
.river-figure[data-scene="stang"] .lifted-road,
.river-figure[data-scene="drept"] .new-plaque,
.river-figure[data-scene="drept"] .lifted-road,
.river-figure[data-scene="1885"] .new-plaque,
.river-figure[data-scene="1885"] .lifted-road { opacity: 0; }
.river-figure[data-scene="1885"] .old-inscription,
.river-figure[data-scene="drept"] .right-road { opacity: 1; }
.river-figure[data-scene="drept"] .left-road { opacity: .28; }
.river-figure[data-scene="stang"] .right-road { opacity: .48; }
.river-figure[data-scene="1885"] .right-road { opacity: .42; }
.river-figure figcaption { margin: .5rem 0 0; color: var(--story-muted); font-family: var(--sans); font-size: .77rem; line-height: 1.45; }
.scene-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: .7rem; border-top: 1px solid var(--line); }
.scene-steps a {
  display: flex;
  min-width: 0;
  min-height: 3.25rem;
  flex-direction: column;
  justify-content: center;
  padding: .35rem .5rem;
  border-bottom: 2px solid transparent;
  color: var(--story-muted);
  font-family: var(--sans);
  line-height: 1.25;
  text-decoration: none;
}
.scene-steps a:hover { color: var(--story-ink); background: color-mix(in srgb, var(--story-ink) 5%, transparent); }
.scene-steps a[aria-current="step"] { border-color: var(--ochre); color: var(--story-ink); }
.scene-steps a span { font-size: .79rem; font-weight: 700; }
.scene-steps a small { margin-top: .12rem; font-size: .69rem; }
.prose.story-copy { min-width: 0; max-width: none; margin: 0; padding: 0; }
.story-copy section { padding: 1rem 0 3.4rem; border-bottom: 1px solid var(--line); scroll-margin-top: 5rem; }
.story-copy section + section { padding-top: 3.25rem; }
.story-copy section.sources { border: 0; }
.chapter-index { margin: 0 0 .45rem !important; color: var(--ochre); font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .08em; }
.prose h2 { margin: 0 0 .85rem; font-size: clamp(1.8rem, 3.1vw, 2.65rem); font-weight: 560; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
.plink { text-decoration: none; }
.plink:hover { text-decoration: underline; text-underline-offset: .18em; }
.prose p { margin: 0 0 1rem; }
.prose a:not(.plink) { color: var(--danube); text-underline-offset: .16em; }
.prose a:not(.plink):hover { text-decoration-thickness: 2px; }
blockquote { margin: 1.5rem 0 1.25rem; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--ochre); color: var(--story-ink); font-size: clamp(1.15rem, 1.55vw, 1.38rem); line-height: 1.5; }
blockquote p { margin: 0; }
.who { margin-top: -.5rem !important; color: var(--story-muted); font-size: .96rem; }
.sources { padding-bottom: 1rem !important; }
.sources li { margin: 0 0 .7rem; }
.share { margin: 2.5rem 0 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.share-kicker { margin: 0 0 .55rem !important; color: var(--story-muted); font-family: var(--sans); font-size: .77rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.share-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.share-row a, .share-row button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  padding: .35rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--story-ink);
  font: 600 .82rem var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.share-row a:hover, .share-row button:hover { border-color: var(--ochre); }
.copy-field { width: min(100%, 28rem); margin-top: .5rem; padding: .4rem .6rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
.status { min-height: 1.4rem; margin: .3rem 0 0 !important; color: var(--story-muted); font-family: var(--sans); font-size: .84rem; }
.rail { display: none; }
footer {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.2rem clamp(1rem, 5vw, 4rem) 4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1.2rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .82rem;
}
footer a { color: inherit; }

@media (min-width: 1340px) {
  .rail {
    position: fixed;
    top: 50%;
    right: 1rem;
    z-index: 40;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: .4rem 0;
    transform: translateY(-50%);
  }
  .rail::before { content: ""; position: absolute; top: 1rem; bottom: 1rem; left: .85rem; width: 1px; background: var(--line); }
  .rail-dot { position: relative; display: flex; width: 1.7rem; height: 1.7rem; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; }
  .rail-dot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--paper); }
  .rail-dot[aria-current="true"] .dot { background: var(--ochre); transform: scale(1.4); }
  .rail-label { position: absolute; top: 50%; right: calc(100% + .35rem); padding: .2rem .5rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: .75rem; font-weight: 650; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-50%); }
  .rail-dot:hover .rail-label, .rail-dot:focus-visible .rail-label { opacity: 1; }
}
@media (max-width: 1040px) {
  .topnav { gap: .5rem; margin-left: .4rem; }
  .topnav a { font-size: .77rem; }
  .hero { grid-template-columns: minmax(18rem, .85fr) minmax(0, 1.15fr); padding-right: 1.25rem; }
  .hero-copy { padding: 2rem clamp(1.35rem, 4vw, 3rem); }
  h1 { font-size: clamp(2.7rem, 5.4vw, 4.7rem); }
  .scrolly { grid-template-columns: minmax(0, .9fr) minmax(24rem, 1.1fr); gap: 2.4rem; padding-inline: 2rem; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 3.7rem; }
  body { font-size: 1.02rem; line-height: 1.62; }
  .topbar { min-height: 3.05rem; gap: .45rem; padding: .3rem .65rem; }
  .home, .chip, .icon-btn { font-size: .78rem; }
  .home { gap: .32rem; }
  .topnav { display: none; }
  .chip { min-height: 2.25rem; padding-inline: .65rem; }
  .icon-btn { width: 2.25rem; min-height: 2.25rem; }
  .hero { display: flex; min-height: 0; flex-direction: column; align-items: stretch; padding: 0; }
  .hero-copy { width: 100%; max-width: none; padding: 2.05rem 1.2rem 1.4rem; }
  .kicker { margin-bottom: .5rem; font-size: .7rem; }
  h1 { max-width: 14ch; font-size: clamp(2.65rem, 10.7vw, 4rem); line-height: .98; }
  .deck { margin-top: .9rem; font-size: 1rem; line-height: 1.5; }
  .archive-photo { width: 100%; max-width: none; }
  .archive-photo img { width: 100%; height: auto; }
  .archive-photo figcaption { position: static; width: 100%; padding: .65rem 1rem .85rem; border: 0; border-top: 1px solid rgb(255 255 255 / .2); background: var(--deep); font-size: .71rem; }
  .scrolly { display: block; padding: 1.2rem 0 3rem; }
  .scene-sidebar { position: sticky; top: 3.05rem; z-index: 30; padding: .45rem .75rem .55rem; background: var(--story-bg); box-shadow: 0 .7rem 1rem color-mix(in srgb, var(--story-bg) 94%, transparent); }
  .scene-heading { gap: .55rem; margin: 0 0 .35rem; }
  .scene-index { font-size: .69rem; }
  .scene-heading p { font-size: .8rem; }
  .gorge-svg { width: 100%; max-height: min(31svh, 72vw); box-shadow: none; }
  .river-figure figcaption { margin-top: .28rem; font-size: .68rem; line-height: 1.32; }
  .scene-steps { margin-top: .3rem; }
  .scene-steps a { min-height: 2.5rem; padding: .2rem .3rem; }
  .scene-steps a span { font-size: .73rem; }
  .scene-steps a small { font-size: .64rem; }
  .prose.story-copy { padding: 0 1.15rem; }
  .story-copy section { padding: 2.1rem 0 2.6rem; scroll-margin-top: calc(40svh + 4.4rem); }
  .story-copy section + section { padding-top: 2.5rem; }
  .prose h2 { font-size: clamp(1.7rem, 7.2vw, 2.3rem); }
  blockquote { margin: 1.25rem 0 1rem; padding-left: .9rem; font-size: 1.14rem; }
  .who { font-size: .9rem; }
  .share { margin-top: 2rem; }
  footer { padding: 1rem 1.1rem 3rem; font-size: .78rem; }
}
@media (max-width: 370px) {
  .hero-copy { padding-inline: 1rem; }
  .scene-sidebar { padding-inline: .55rem; }
  .scene-steps a { padding-inline: .2rem; }
  .scene-steps a span { font-size: .68rem; }
  .scene-steps a small { font-size: .59rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media(max-width:760px){.scene-sidebar{height:40svh;display:flex;flex-direction:column}.scene-heading,.scene-steps{flex:none}.river-figure{flex:1;min-height:0;display:flex;flex-direction:column}.gorge-svg{flex:1;min-height:0;height:0;max-height:none}.river-figure figcaption{flex:none}}

@media(max-width:760px){.scene-steps a{min-height:44px}}

@media(max-width:760px){html{scroll-padding-top:0}}
