:root {
  color-scheme: dark;
  --ink: #071314;
  --ink-soft: #0c2021;
  --panel: #102728;
  --panel-2: #153031;
  --paper: #f0eddf;
  --paper-dim: #c8c7b9;
  --muted: #8fa29d;
  --line: rgba(219, 231, 220, .18);
  --line-strong: rgba(219, 231, 220, .32);
  --natural: #69d4dc;
  --natural-deep: #2e949d;
  --engineered: #ffb45e;
  --engineered-deep: #b86a27;
  --ice: #a9b9ff;
  --electricity: #f8e86d;
  --journey: #ff7b63;
  --erratum: #f2898b;
  --history: #c4a7f7;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Baskerville, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Courier New", monospace;
  --radius: 1.15rem;
  --shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% -20%, rgba(38, 92, 79, .24), transparent 38rem),
    var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

::selection {
  color: var(--ink);
  background: var(--natural);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .8rem;
  left: .8rem;
  padding: .7rem 1rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-150%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.35rem clamp(1rem, 3.8vw, 4rem);
  border-bottom: 1px solid rgba(240, 237, 223, .16);
}

.wordmark {
  display: flex;
  gap: .42rem;
  align-items: center;
  color: var(--paper);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-decoration: none;
}

.wordmark-slash {
  color: var(--journey);
}

.header-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.research-stamp {
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.text-button {
  min-height: 2.75rem;
  padding: .4rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
  min-height: 100svh;
  padding: clamp(8.5rem, 16vh, 12rem) clamp(1.2rem, 7vw, 7.5rem) 4.5rem;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(7, 19, 20, .86) 14%, rgba(7, 19, 20, .58) 57%, rgba(7, 19, 20, .1)),
    linear-gradient(180deg, #173a36 0%, #0b1d1e 64%, #071314 100%);
  isolation: isolate;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: -10vw;
  bottom: -19vw;
  width: 78vw;
  height: 62vw;
  border-radius: 43% 50% 0 0;
  background:
    repeating-radial-gradient(ellipse at 55% 77%, transparent 0 28px, rgba(164, 203, 187, .11) 29px 30px),
    linear-gradient(132deg, #2f5145 0%, #173934 37%, #0c2527 69%);
  box-shadow: inset 0 50px 100px rgba(103, 145, 119, .11);
  transform: rotate(-8deg);
  content: "";
}

.hero::before {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 58%;
  width: 1px;
  background: linear-gradient(transparent, rgba(240, 237, 223, .2) 20%, rgba(240, 237, 223, .08) 75%, transparent);
  content: "";
}

.hero-contours {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: .55;
  pointer-events: none;
}

.hero-contours svg {
  width: 100%;
  height: 100%;
}

.hero-contours path {
  fill: none;
  stroke: rgba(190, 222, 201, .18);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.hero-index {
  position: absolute;
  z-index: 1;
  top: 28%;
  right: 3vw;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  align-items: flex-end;
  color: rgba(240, 237, 223, .42);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .12em;
  transform: rotate(90deg);
  transform-origin: right top;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 62rem;
}

.eyebrow,
.scene-number,
.section-index,
.map-kicker,
.console-eyebrow {
  margin: 0 0 1.15rem;
  color: var(--natural);
  font-family: var(--mono);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(4rem, 8.5vw, 9.4rem);
  font-weight: 400;
  letter-spacing: -.068em;
  line-height: .84;
}

.hero h1 em {
  color: var(--natural);
  font-weight: 400;
}

.hero-deck {
  max-width: 39rem;
  margin: 2.35rem 0 0;
  color: var(--paper-dim);
  font-size: clamp(1.06rem, 1.45vw, 1.35rem);
  line-height: 1.62;
}

.hero-actions,
.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  min-height: 3.2rem;
  padding: .85rem 1.3rem;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--ink);
  border-color: var(--natural);
  background: var(--natural);
}

.button-primary:hover {
  background: #9be7e6;
}

.button-secondary {
  color: var(--paper);
  background: rgba(7, 19, 20, .22);
  backdrop-filter: blur(10px);
}

.button-secondary:hover {
  border-color: var(--paper-dim);
  background: rgba(240, 237, 223, .08);
}

.hero-facts {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-self: end;
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--line-strong);
}

.hero-facts div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  padding: 1.2rem 0;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}

.hero-facts dt {
  color: var(--paper);
  font-family: var(--display);
  font-size: 2.45rem;
  line-height: 1;
}

.hero-facts dd {
  margin: 0;
  color: var(--paper-dim);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-caption {
  position: absolute;
  z-index: 2;
  bottom: 1.4rem;
  left: clamp(1.2rem, 7vw, 7.5rem);
  margin: 0;
  color: rgba(240, 237, 223, .46);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.orientation {
  display: grid;
  grid-template-columns: 10rem minmax(16rem, .9fr) minmax(24rem, 1.1fr);
  gap: 3rem;
  align-items: start;
  padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 5vw, 5.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #09191a;
}

.section-index {
  color: var(--muted);
}

.orientation h2,
.closing h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .98;
}

.orientation p:not(.section-index) {
  max-width: 44rem;
  margin: 1.5rem 0 0;
  color: var(--paper-dim);
  font-size: 1.05rem;
}

.orientation strong {
  color: var(--paper);
}

.grammar {
  display: grid;
  grid-template-columns: minmax(4rem, 1fr) auto minmax(7rem, 1.4fr) auto minmax(4rem, 1fr);
  gap: .55rem;
  align-items: center;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(240, 237, 223, .025);
}

.grammar-token {
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.grammar-token.payload {
  color: var(--natural);
  border-color: rgba(105, 212, 220, .35);
}

.grammar-arrow {
  color: var(--muted);
}

.experience {
  position: relative;
  display: grid;
  grid-template-columns: minmax(19rem, 34vw) minmax(0, 1fr);
  background:
    linear-gradient(90deg, #081718 0, #081718 34vw, #071314 34vw);
}

.story-rail {
  position: relative;
  z-index: 2;
  border-right: 1px solid var(--line);
}

.story-step {
  display: flex;
  flex-direction: column;
  min-height: 94vh;
  padding: clamp(5rem, 12vh, 9rem) clamp(1.4rem, 4vw, 4rem);
  justify-content: center;
  border-bottom: 1px solid var(--line);
  opacity: .34;
  transition: opacity .45s ease;
}

.story-step.is-current {
  opacity: 1;
}

.story-step h2 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 4.8vw, 5.15rem);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .96;
}

.story-step > p:not(.scene-number) {
  max-width: 37rem;
  margin: 1.65rem 0 0;
  color: var(--paper-dim);
  font-size: clamp(.98rem, 1.2vw, 1.12rem);
  line-height: 1.7;
}

.scene-number {
  color: var(--muted);
}

.is-current .scene-number {
  color: var(--natural);
}

.inline-action {
  width: fit-content;
  min-height: 2.75rem;
  margin-top: 1.75rem;
  padding: .35rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  cursor: pointer;
  color: var(--natural);
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.micro-note,
.erratum-card,
.payload-pair {
  max-width: 34rem;
  margin-top: 1.7rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--journey);
  background: rgba(240, 237, 223, .025);
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: .69rem;
  letter-spacing: .025em;
}

.micro-note > span {
  display: inline-block;
  margin-right: .7rem;
  color: var(--journey);
  font-size: 1rem;
}

.micro-note.warning {
  border-left-color: var(--engineered);
}

.micro-note.warning > span {
  color: var(--engineered);
}

.erratum-card {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .7rem;
  align-items: center;
  border-left-color: var(--erratum);
}

.erratum-mark {
  color: var(--erratum);
  font-family: var(--display);
  font-size: 2.3rem;
  line-height: 1;
}

.compare-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.8rem;
}

.compare-buttons button {
  min-height: 2.75rem;
  padding: .6rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  color: var(--paper-dim);
  font-size: .71rem;
  letter-spacing: .05em;
}

.compare-buttons button:hover {
  color: var(--paper);
  border-color: var(--natural);
}

.payload-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  border-left-color: var(--electricity);
}

.payload-pair span {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}

.payload-icon {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
}

.payload-icon.electricity {
  color: var(--ink);
  background: var(--electricity);
}

.payload-icon.water {
  color: var(--natural);
  border: 1px solid var(--natural);
}

.map-shell {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  grid-template-rows: auto auto minmax(21rem, 1fr) auto auto auto;
  height: 100svh;
  max-height: 100svh;
  padding: .9rem clamp(.8rem, 1.8vw, 1.7rem) .7rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 4%, rgba(37, 88, 77, .13), transparent 28rem),
    var(--ink);
}

.map-topline {
  display: flex;
  min-height: 3.5rem;
  align-items: start;
  justify-content: space-between;
  padding: .1rem .25rem .65rem;
}

.map-kicker {
  margin: 0 0 .2rem;
  color: var(--muted);
  font-size: .56rem;
}

.map-state {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.08rem, 1.5vw, 1.45rem);
}

.schematic-badge {
  display: flex;
  gap: .38rem;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .53rem;
  letter-spacing: .1em;
}

.schematic-badge span {
  color: var(--engineered);
}

.layer-tabs {
  display: flex;
  gap: .34rem;
  min-width: 0;
  padding: .15rem 0 .75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.layer-tabs::-webkit-scrollbar,
.trace-picker::-webkit-scrollbar {
  display: none;
}

.layer-tabs button {
  display: inline-flex;
  min-height: 2.5rem;
  padding: .55rem .75rem;
  align-items: center;
  gap: .43rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(240, 237, 223, .02);
  cursor: pointer;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.layer-tabs button:hover,
.layer-tabs button[aria-pressed="true"] {
  color: var(--paper);
  border-color: var(--line-strong);
  background: rgba(240, 237, 223, .08);
}

.layer-swatch {
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: currentColor;
}

.layer-swatch.ice { color: var(--ice); }
.layer-swatch.natural { color: var(--natural); }
.layer-swatch.engineered { color: var(--engineered); }
.layer-swatch.history { color: var(--history); }
.layer-swatch.journey { color: var(--journey); }

.map-frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 52, 51, .78), rgba(8, 27, 28, .9)),
    var(--ink-soft);
  box-shadow: var(--shadow);
}

.map-frame::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .03);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

#routing-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 21rem;
}

.terrain .contour {
  fill: none;
  stroke: rgba(184, 216, 197, .12);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}

.terrain .contour.east {
  stroke: rgba(103, 189, 179, .1);
}

.ridge-highlight {
  stroke: rgba(218, 229, 210, .38);
  stroke-width: 2;
  filter: url(#node-glow);
}

.basin-boundary,
.sub-boundary {
  fill: none;
  stroke: rgba(240, 237, 223, .32);
  stroke-width: 1.5;
  stroke-dasharray: 5 7;
  vector-effect: non-scaling-stroke;
}

.sub-boundary {
  stroke: rgba(240, 237, 223, .18);
}

.salt-line {
  stroke: rgba(225, 247, 231, .2);
  stroke-width: 2;
}

.lake-halo {
  fill: none;
  stroke: rgba(116, 209, 200, .12);
  stroke-width: 12;
}

.map-labels text {
  fill: rgba(240, 237, 223, .32);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}

.map-labels .crest-label {
  fill: rgba(240, 237, 223, .45);
  font-size: 9px;
}

.map-labels .lake-label {
  fill: rgba(240, 248, 236, .88);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
}

.map-labels .lake-label-sub {
  fill: rgba(240, 248, 236, .62);
  font-size: 8px;
}

.edge {
  --edge-color: var(--muted);
  fill: none;
  stroke: var(--edge-color);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .15;
  transition: opacity .28s ease, stroke-width .28s ease, filter .28s ease;
  vector-effect: non-scaling-stroke;
}

.edge.is-layer {
  opacity: .34;
}

.edge.is-trace {
  opacity: 1;
  stroke-width: 3.8;
  filter: url(#node-glow);
}

.edge.edge-natural {
  --edge-color: var(--natural);
  marker-end: url(#arrow-natural);
}

.edge.edge-diversion {
  --edge-color: var(--engineered);
  marker-end: url(#arrow-diversion);
  stroke-dasharray: 12 5 2 5;
}

.edge.edge-electricity {
  --edge-color: var(--electricity);
  marker-end: url(#arrow-electricity);
  stroke-dasharray: 3 6;
}

.edge.edge-ice {
  --edge-color: var(--ice);
  marker-end: url(#arrow-ice);
  stroke-width: 8;
  opacity: .08;
}

.edge.edge-ice.is-layer {
  opacity: .23;
}

.edge.edge-ice.is-trace {
  stroke-width: 11;
  opacity: .72;
}

.edge.edge-travel {
  --edge-color: var(--journey);
  marker-end: url(#arrow-travel);
  stroke-dasharray: 2 8;
}

.edge.edge-erratum {
  --edge-color: var(--erratum);
  stroke-width: 2.5;
  stroke-dasharray: 7 7;
}

.edge.edge-erratum.is-trace {
  filter: none;
}

.edge.timeline-inactive {
  opacity: .06 !important;
}

.edge.timeline-historical {
  opacity: .5;
}

.edge.timeline-capped {
  stroke-dasharray: 8 5 1 5;
}

.edge.timeline-bypass {
  opacity: .16 !important;
}

.edge.timeline-review {
  animation: reviewPulse 2.5s ease-in-out infinite;
}

.flow-particle {
  pointer-events: none;
}

.flow-particle circle {
  fill: var(--paper);
  filter: url(#node-glow);
}

.flow-particle.ice circle {
  fill: var(--ice);
}

.flow-particle.diversion circle {
  fill: var(--engineered);
}

.flow-particle.travel circle {
  fill: var(--journey);
}

.flow-particle.electricity circle {
  fill: var(--electricity);
}

.node {
  opacity: .22;
  cursor: pointer;
  transition: opacity .22s ease;
}

.node.is-layer {
  opacity: .66;
}

.node.is-trace {
  opacity: 1;
}

.node-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 22;
}

.node-dot {
  fill: var(--ink);
  stroke: var(--muted);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.node.is-trace .node-dot {
  fill: var(--paper);
  stroke: var(--paper);
  filter: url(#node-glow);
}

.node.node-natural .node-dot,
.node.node-river .node-dot,
.node.node-creek .node-dot,
.node.node-lake .node-dot {
  stroke: var(--natural);
}

.node.node-ice .node-dot {
  stroke: var(--ice);
}

.node.node-facility .node-dot {
  stroke: var(--engineered);
}

.node.node-place .node-dot {
  stroke: var(--journey);
}

.node.node-terminal-lake .node-dot {
  fill: var(--natural-deep);
  stroke: var(--paper);
}

.node-label {
  fill: var(--paper-dim);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 650;
  paint-order: stroke;
  stroke: rgba(7, 19, 20, .9);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}

.node.is-trace .node-label {
  fill: var(--paper);
}

.node-confidence {
  fill: var(--engineered);
  font-family: var(--mono);
  font-size: 8px;
}

.annotation-cross line {
  stroke: var(--erratum);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.annotation-cross circle {
  fill: var(--ink);
  stroke: var(--erratum);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.map-tooltip {
  position: absolute;
  z-index: 8;
  width: min(17rem, calc(100% - 2rem));
  padding: .8rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: .65rem;
  color: var(--paper-dim);
  background: rgba(4, 15, 16, .94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .42);
  pointer-events: none;
  font-size: .68rem;
  line-height: 1.45;
  backdrop-filter: blur(12px);
}

.map-tooltip strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 400;
}

.map-tooltip small {
  display: block;
  margin-top: .38rem;
  color: var(--engineered);
  font-family: var(--mono);
  text-transform: uppercase;
}

.map-compass {
  position: absolute;
  top: .8rem;
  right: .8rem;
  display: grid;
  width: 1.7rem;
  height: 2.7rem;
  justify-items: center;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .06em;
}

.map-compass i {
  display: block;
  width: 1px;
  height: 1.5rem;
  background: linear-gradient(var(--paper-dim) 0 65%, var(--journey) 65%);
  transform: rotate(8deg);
}

.map-scale {
  position: absolute;
  right: .8rem;
  bottom: .75rem;
  display: flex;
  gap: .5rem;
  align-items: center;
  color: rgba(240, 237, 223, .45);
  font-family: var(--mono);
  font-size: .48rem;
  letter-spacing: .08em;
}

.map-scale i {
  width: 2.4rem;
  height: .25rem;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  border-left: 1px solid var(--muted);
}

.trace-console {
  display: grid;
  grid-template-columns: minmax(14rem, .76fr) minmax(18rem, 1.2fr) minmax(16rem, 1fr);
  grid-template-areas:
    "head trace profile"
    "summary trace profile"
    "sources trace profile";
  column-gap: 1.2rem;
  min-height: 11rem;
  padding: 1rem .25rem .85rem;
  border-bottom: 1px solid var(--line);
}

.console-header {
  grid-area: head;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .5rem;
}

.console-eyebrow {
  margin: 0 0 .2rem;
  font-size: .56rem;
}

.console-header h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  font-weight: 400;
  line-height: 1.1;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 2.5rem;
  min-height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  color: var(--paper-dim);
}

.trace-summary {
  grid-area: summary;
  margin: .6rem 0 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.5;
}

.typed-trace {
  grid-area: trace;
  max-height: 9.1rem;
  margin: 0;
  padding: .1rem .1rem 0 1.3rem;
  overflow-y: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.typed-trace li {
  position: relative;
  margin: 0 0 .5rem;
  padding-left: .15rem;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: .62rem;
  line-height: 1.38;
}

.typed-trace li::marker {
  color: var(--muted);
}

.typed-trace strong {
  color: var(--paper);
  font-weight: 700;
}

.typed-trace .verb {
  color: var(--natural);
}

.typed-trace .edge-type-diversion .verb {
  color: var(--engineered);
}

.typed-trace .edge-type-ice .verb {
  color: var(--ice);
}

.typed-trace .edge-type-travel .verb {
  color: var(--journey);
}

.typed-trace .edge-type-electricity .verb {
  color: var(--electricity);
}

.typed-trace .edge-type-erratum .verb {
  color: var(--erratum);
  text-decoration: line-through;
}

.typed-trace .confidence-flag {
  display: inline-block;
  margin-left: .35rem;
  color: var(--engineered);
  font-size: .52rem;
  text-transform: uppercase;
}

.profile-panel {
  grid-area: profile;
  display: grid;
  grid-template-columns: minmax(7rem, .62fr) minmax(11rem, 1.38fr);
  grid-template-areas:
    "meta chart"
    "key chart";
  gap: .25rem .7rem;
  min-width: 0;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.profile-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.profile-meta strong {
  font-family: var(--display);
  font-size: 1.04rem;
  font-weight: 400;
}

.profile-meta span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .55rem;
  line-height: 1.45;
}

#profile-svg {
  grid-area: chart;
  align-self: center;
  width: 100%;
  overflow: visible;
}

.profile-grid {
  fill: none;
  stroke: rgba(240, 237, 223, .1);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.profile-path {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.human-profile {
  stroke: var(--journey);
}

.water-profile {
  stroke: var(--natural);
  stroke-dasharray: 4 5;
}

#profile-dot {
  fill: var(--paper);
  filter: url(#node-glow);
}

.profile-key {
  grid-area: key;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  align-self: end;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .51rem;
}

.profile-key span {
  display: flex;
  gap: .35rem;
  align-items: center;
}

.profile-key i {
  width: .9rem;
  height: 2px;
  background: var(--journey);
}

.profile-key i.water {
  background: repeating-linear-gradient(90deg, var(--natural) 0 3px, transparent 3px 5px);
}

.trace-sources {
  grid-area: sources;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-self: end;
  margin-top: .5rem;
}

.source-chip {
  display: inline-flex;
  min-height: 1.65rem;
  padding: .3rem .5rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .48rem;
  letter-spacing: .03em;
  text-decoration: none;
}

.source-chip:hover {
  color: var(--paper);
  border-color: var(--natural);
}

.trace-picker-wrap {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: .4rem;
  align-items: center;
  padding: .48rem .25rem;
  border-bottom: 1px solid var(--line);
}

.trace-picker-wrap > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .52rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.trace-picker {
  display: flex;
  gap: .35rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.trace-picker button {
  min-height: 2.15rem;
  padding: .45rem .65rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: .58rem;
  white-space: nowrap;
}

.trace-picker button:hover,
.trace-picker button[aria-pressed="true"] {
  color: var(--paper);
  border-color: var(--natural);
  background: rgba(105, 212, 220, .07);
}

.legend {
  display: flex;
  gap: .8rem;
  min-width: 0;
  padding: .5rem .25rem 0;
  overflow-x: auto;
  color: rgba(240, 237, 223, .5);
  font-family: var(--mono);
  font-size: .46rem;
  letter-spacing: .035em;
  scrollbar-width: none;
  white-space: nowrap;
}

.legend span {
  display: flex;
  gap: .35rem;
  align-items: center;
}

.legend-line {
  display: block;
  width: 1.35rem;
  height: 0;
  border-top: 2px solid var(--muted);
}

.legend-line.natural { border-color: var(--natural); }
.legend-line.diversion { border-color: var(--engineered); border-top-style: dashed; }
.legend-line.ice { border-width: 5px; border-color: var(--ice); border-radius: 2px; }
.legend-line.electricity { border-color: var(--electricity); border-top-style: dotted; }
.legend-line.travel { border-color: var(--journey); border-top-style: dotted; }
.legend-line.erratum { border-color: var(--erratum); text-decoration: line-through; }

.timeline-controls {
  display: flex;
  gap: .35rem;
  max-width: 36rem;
  margin-top: 1.8rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.timeline-controls button {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: .6rem .75rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .61rem;
}

.timeline-controls button:hover,
.timeline-controls button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--engineered);
  background: var(--engineered);
}

.timeline-readout {
  max-width: 36rem;
  min-height: 9rem;
  margin-top: .65rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: rgba(240, 237, 223, .025);
}

.timeline-readout strong {
  display: block;
  margin-bottom: .45rem;
  font-family: var(--display);
  font-size: 1.24rem;
  font-weight: 400;
}

.timeline-readout p {
  margin: 0;
  color: var(--paper-dim);
  font-size: .74rem;
}

.rule-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .65rem;
}

.rule-badges span {
  padding: .26rem .42rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .49rem;
  text-transform: uppercase;
}

.hike-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  max-width: 38rem;
  margin-top: 1.8rem;
}

.hike-card {
  display: flex;
  flex-direction: column;
  min-height: 9rem;
  padding: .85rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: rgba(240, 237, 223, .02);
  cursor: pointer;
  text-align: left;
}

.hike-card:hover,
.hike-card[aria-pressed="true"] {
  border-color: var(--journey);
  background: rgba(255, 123, 99, .06);
}

.hike-card strong {
  margin-bottom: auto;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.1;
}

.hike-card span,
.hike-card small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .54rem;
}

.hike-card span {
  color: var(--journey);
}

.closing {
  position: relative;
  min-height: 86vh;
  padding: clamp(6rem, 13vw, 12rem) clamp(1.2rem, 8vw, 9rem);
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(7, 19, 20, .94), rgba(7, 19, 20, .47)),
    radial-gradient(ellipse at 76% 48%, #2b5f55, #0c2425 42%, #071314 70%);
}

.closing::after {
  position: absolute;
  right: -10%;
  bottom: -40%;
  width: 63vw;
  height: 63vw;
  border: 1px solid rgba(105, 212, 220, .2);
  border-radius: 50%;
  box-shadow:
    0 0 0 3vw rgba(105, 212, 220, .03),
    0 0 0 6vw rgba(105, 212, 220, .025),
    0 0 0 9vw rgba(105, 212, 220, .02);
  content: "";
}

.closing h2,
.closing > p,
.closing-actions,
.closing .section-index {
  position: relative;
  z-index: 1;
}

.closing h2 {
  max-width: 14ch;
}

.closing > p:not(.section-index) {
  max-width: 38rem;
  margin: 2rem 0 0;
  color: var(--paper-dim);
  font-size: 1.06rem;
}

footer {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr;
  gap: 2rem;
  padding: 2rem clamp(1.2rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #050f10;
  font-family: var(--mono);
  font-size: .56rem;
  line-height: 1.55;
}

footer p {
  margin: 0;
}

.footer-mark {
  color: var(--paper);
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.sources-dialog {
  width: min(62rem, calc(100vw - 2rem));
  max-height: min(88vh, 58rem);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 1.1rem;
  color: var(--paper);
  background: #0b1d1e;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .7);
}

.sources-dialog::backdrop {
  background: rgba(0, 8, 9, .76);
  backdrop-filter: blur(8px);
}

.dialog-topline {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  padding: 1.4rem 1.5rem 1.1rem;
  align-items: start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 29, 30, .94);
  backdrop-filter: blur(16px);
}

.dialog-topline .eyebrow {
  margin-bottom: .3rem;
}

.dialog-topline h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}

.dialog-close {
  display: grid;
  width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.7rem;
}

.dialog-intro {
  max-width: 48rem;
  margin: 0;
  padding: 1.4rem 1.5rem;
  color: var(--paper-dim);
  font-size: .82rem;
}

.active-source-panel {
  margin: 0 1.5rem 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(105, 212, 220, .25);
  border-radius: .7rem;
  background: rgba(105, 212, 220, .035);
}

.active-source-panel > p {
  margin: 0 0 .65rem;
  color: var(--natural);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#active-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.source-entry {
  min-width: 0;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.source-entry:nth-child(even) {
  border-right: 0;
}

.source-entry a {
  text-decoration: none;
}

.source-entry a:hover h3 {
  color: var(--natural);
}

.source-entry .source-agency {
  margin: 0 0 .35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .52rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.source-entry h3 {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.18;
  transition: color .2s ease;
}

.source-entry p {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes reviewPulse {
  0%, 100% { opacity: .28; }
  50% { opacity: .72; }
}

@keyframes dashFlow {
  to { stroke-dashoffset: -34; }
}

.edge.is-trace.edge-natural,
.edge.is-trace.edge-diversion,
.edge.is-trace.edge-travel,
.edge.is-trace.edge-electricity {
  animation: dashFlow 2.8s linear infinite;
}

@media (max-width: 1180px) {
  .trace-console {
    grid-template-columns: minmax(12rem, .72fr) minmax(15rem, 1.15fr) minmax(13rem, 1fr);
    column-gap: .7rem;
  }

  .profile-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "chart";
  }

  .profile-key {
    display: none;
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 9rem;
  }

  .hero::before {
    left: 76%;
  }

  .hero-copy {
    align-self: center;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-self: end;
    margin: 4rem 0 1rem;
  }

  .hero-facts div {
    grid-template-columns: 1fr;
    padding: .9rem .65rem;
    border-right: 1px solid var(--line);
  }

  .hero-facts div:last-child {
    border-right: 0;
  }

  .orientation {
    grid-template-columns: 1fr 1.4fr;
  }

  .orientation .grammar {
    grid-column: 1 / -1;
  }

  .experience {
    display: block;
    background: var(--ink);
  }

  .story-rail {
    z-index: 2;
    margin-top: -10vh;
    padding-top: 0;
    border-right: 0;
  }

  .story-step {
    position: relative;
    z-index: 2;
    width: calc(100% - 1.2rem);
    min-height: auto;
    margin: 0 .6rem 60vh;
    padding: 2rem 1.35rem;
    border: 1px solid var(--line-strong);
    border-radius: 1rem;
    opacity: .55;
    background: rgba(8, 23, 24, .93);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
    backdrop-filter: blur(16px);
  }

  .story-step.is-current {
    opacity: 1;
  }

  .story-step.final-step {
    margin-bottom: 10rem;
  }

  .story-step h2 {
    font-size: clamp(2.25rem, 9vw, 4rem);
  }

  .map-shell {
    position: sticky;
    z-index: 1;
    top: 0;
    flex: 0 0 auto;
    height: min(68svh, 37rem);
    max-height: none;
    margin-top: 0;
    padding: .55rem;
    grid-template-rows: auto auto minmax(16rem, 1fr) auto;
  }

  .map-topline {
    min-height: 2.8rem;
  }

  .map-kicker,
  .schematic-badge,
  .trace-picker-wrap,
  .legend {
    display: none;
  }

  .map-frame {
    min-height: 0;
  }

  #routing-map {
    min-height: 16rem;
  }

  .trace-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "head head"
      "summary summary"
      "sources sources";
    min-height: 8rem;
    padding: .65rem .15rem .1rem;
  }

  .console-header h3 {
    font-size: 1.15rem;
  }

  .trace-summary {
    display: -webkit-box;
    margin-top: .3rem;
    overflow: hidden;
    font-size: .63rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .typed-trace,
  .profile-panel {
    display: none;
  }

  .trace-sources {
    margin-top: .35rem;
    overflow: hidden;
    flex-wrap: nowrap;
  }

  .source-chip {
    white-space: nowrap;
  }

  .hike-grid {
    grid-template-columns: 1fr;
  }

  .hike-card {
    min-height: 5.6rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 1rem;
  }

  .wordmark {
    font-size: .64rem;
  }

  .research-stamp {
    display: none;
  }

  .text-button {
    font-size: .65rem;
  }

  .hero {
    min-height: 100svh;
    padding: 8rem 1rem 3.6rem;
  }

  .hero::after {
    right: -50vw;
    bottom: -8vw;
    width: 140vw;
    height: 94vw;
  }

  .hero h1 {
    font-size: clamp(3.65rem, 18vw, 6.4rem);
  }

  .hero-deck {
    margin-top: 1.7rem;
    font-size: .98rem;
  }

  .hero-actions .button {
    flex: 1 1 9rem;
  }

  .hero-facts {
    margin-top: 3rem;
  }

  .hero-facts dt {
    font-size: 1.8rem;
  }

  .hero-facts dd {
    font-size: .55rem;
  }

  .hero-caption {
    right: 1rem;
    bottom: .8rem;
    left: 1rem;
    font-size: .5rem;
  }

  .orientation {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 4.5rem 1rem;
  }

  .orientation h2 {
    font-size: 2.8rem;
  }

  .grammar {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .grammar-arrow {
    text-align: center;
    transform: rotate(90deg);
  }

  .story-rail {
    padding-top: 0;
  }

  .story-step {
    margin-bottom: 54vh;
  }

  .map-shell {
    height: 64svh;
    margin-top: -64svh;
  }

  .layer-tabs {
    gap: .25rem;
  }

  .layer-tabs button {
    min-height: 2.3rem;
    padding: .45rem .58rem;
    font-size: .57rem;
  }

  .schematic-badge {
    display: none;
  }

  .map-state {
    max-width: 20rem;
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .source-list {
    grid-template-columns: 1fr;
  }

  .source-entry,
  .source-entry:nth-child(even) {
    border-right: 0;
  }

  .closing {
    min-height: 74vh;
    padding: 6rem 1rem;
  }

  .closing h2 {
    font-size: 3rem;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
