:root {
  --paper: #f1f0ea;
  --white: #fff;
  --ink: #11110f;
  --muted: #68645e;
  --line: #c9c3b8;
  --red: #11110f;
  --waste: #d8c08b;
  --context: #9d9d9d;
  --map-black: #0c0c0b;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
button { font: inherit; }
[hidden] { display: none !important; }

.process-shell {
  display: grid;
  grid-template-columns: minmax(480px, 46%) minmax(0, 54%);
  min-height: 100dvh;
  background: var(--paper);
}

.story-panel {
  position: relative;
  z-index: 10;
  display: flex;
  min-width: 0;
  height: 100dvh;
  flex-direction: column;
  border-right: 0;
  background: var(--paper);
}

.story-header { padding: 32px clamp(30px, 3.4vw, 56px) 28px; border-bottom: 1px solid var(--line); }
.project-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.story-header h1 {
  max-width: 440px;
  margin: 0;
  font: 400 clamp(38px, 3.75vw, 58px)/.91 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
}

.dek {
  max-width: 470px;
  margin: 9px 0 0;
  color: #36332f;
  font: 400 clamp(13px, 1.02vw, 15px)/1.4 Georgia, "Times New Roman", serif;
}

.linear-stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  padding: 24px clamp(30px, 3.4vw, 56px) 22px;
  border-bottom: 1px solid var(--line);
  background: #ece9e2;
  scroll-behavior: smooth;
  scroll-snap-type: none;
  scrollbar-width: none;
}
.linear-stepper::-webkit-scrollbar { display: none; }

.linear-stepper button {
  position: relative;
  display: grid;
  min-width: 0;
  width: 100%;
  grid-template-rows: 28px auto;
  gap: 7px;
  align-items: start;
  justify-items: center;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: #5c5750;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  scroll-snap-align: none;
}
.linear-stepper button b {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  overflow: visible;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}
.linear-stepper button::before {
  position: absolute;
  top: 13px;
  left: calc(50% + 19px);
  z-index: 1;
  width: calc(100% - 38px);
  height: 1px;
  background: #bdb8af;
  content: "";
}
.linear-stepper button:last-child::before { display: none; }

.linear-stepper button:hover,
.linear-stepper button:focus-visible,
.linear-stepper button.is-active { color: var(--ink); }
.linear-stepper button.is-past::before { background: #8d8982; }
.linear-stepper button.is-past span { border-color: #68645e; color: var(--ink); }

.linear-stepper button span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #68645e;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 10px;
}

.linear-stepper button.is-active span { border: 2px solid var(--ink); background: var(--white); color: var(--ink); box-shadow: 0 0 0 2px var(--white); }

.story-scroll {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 34px clamp(30px, 3.4vw, 56px) 30px;
}

.network-card, .discovery-card { animation: card-in 420ms ease both; }
.network-kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 7px;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.network-kicker time { color: var(--muted); font-weight: 400; text-align: right; }
.network-card h2, .discovery-card h2 {
  max-width: 500px;
  margin: 0;
  font: 500 clamp(27px, 2.35vw, 37px)/.97 Georgia, "Times New Roman", serif;
  letter-spacing: -.043em;
}

.network-location {
  max-width: 500px;
  margin: 8px 0 0;
  color: #4e4b46;
  font-size: 14px;
  line-height: 1.4;
}
.network-process {
  max-width: 500px;
  margin: 15px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #292724;
  font: 400 clamp(16px, 1.18vw, 18px)/1.42 Georgia, "Times New Roman", serif;
}
.field-label, .route-eyebrow {
  color: var(--red);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.route-eyebrow { margin: 0 0 17px; }

.discovery-card { max-width: 620px; margin: auto 0; }
.discovery-card > p:not(.route-eyebrow) {
  max-width: 580px;
  margin: 22px 0 0;
  color: #3f3b36;
  font: 400 14px/1.58 Georgia, "Times New Roman", serif;
}
.discovery-card .discovery-note {
  margin-top: 16px;
  padding: 13px 15px;
  border-left: 3px solid var(--red);
  background: rgba(255,255,255,.6);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
}

.story-controls {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: clamp(30px, 3vw, 48px);
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 32px auto 0;
  padding-top: 0;
}
.story-controls button {
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
}
.story-controls button:last-child { text-align: right; }
.story-controls button:hover { color: var(--muted); }
.story-controls > span { color: var(--muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }

.map-panel { position: relative; min-width: 0; height: 100dvh; overflow: hidden; border: 2px solid var(--ink); background: var(--map-black); }
.leaflet-map { position: absolute; inset: 0; background: var(--map-black); }
.leaflet-tile-pane { filter: grayscale(1) contrast(1.08) brightness(.91); }
.leaflet-container { background: var(--map-black); font-family: Arial, Helvetica, sans-serif; }
.map-heading, .basemap-toggle { position: absolute; z-index: 700; }

.map-heading {
  top: 20px;
  left: 20px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(7,7,7,.82);
  color: #fff;
  backdrop-filter: blur(7px);
}
.map-heading span, .map-heading strong { display: block; }
.map-heading span { margin-bottom: 4px; color: #c8c4bc; font-size: 8px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.map-heading strong { font: 600 16px/1.2 Georgia, "Times New Roman", serif; }

.basemap-toggle { top: 20px; right: 20px; display: flex; border: 1px solid rgba(255,255,255,.4); background: rgba(7,7,7,.82); }
.basemap-toggle button {
  padding: 9px 10px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.3);
  background: transparent;
  color: #b9b6af;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.basemap-toggle button:last-child { border-right: 0; }
.basemap-toggle button.is-active { background: var(--paper); color: var(--ink); }

.facility-marker-wrap { overflow: visible !important; border: 0 !important; background: transparent !important; }
.facility-marker {
  position: relative;
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 2px solid #111;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 7px rgba(0,0,0,.52);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.is-secondary-marker .facility-marker { width: 30px; height: 30px; border-width: 1px; font-size: 8px; }
.facility-marker i { position: absolute; top: 32px; left: 15px; width: 2px; height: 13px; background: #111; }
.is-secondary-marker .facility-marker i { top: 29px; left: 13px; height: 10px; }
.facility-marker i::after {
  position: absolute;
  bottom: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
  content: "";
}
.is-active-marker .facility-marker, .facility-marker:hover { border-color: var(--ink); background: var(--white); color: var(--ink); transform: translateY(-5px); }
.leaflet-control-zoom { border: 1px solid rgba(255,255,255,.42) !important; border-radius: 0 !important; box-shadow: none !important; }
.leaflet-control-zoom a { border-bottom-color: #333 !important; border-radius: 0 !important; background: #0b0b0b !important; color: #fff !important; }

@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 980px) {
  .process-shell { display: flex; flex-direction: column; }
  .story-panel { order: 2; height: auto; min-height: 58dvh; border-top: 0; border-right: 0; }
  .map-panel { order: 1; height: 46dvh; min-height: 370px; }
  .story-header { padding: 23px 24px 19px; }
  .project-line { margin-bottom: 20px; }
  .linear-stepper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 17px 24px 16px;
  }
  .linear-stepper button {
    min-width: 90px;
    width: auto;
    flex: 1 0 90px;
    justify-items: start;
    padding: 0;
    text-align: left;
  }
  .linear-stepper button b { padding-right: 5px; text-align: left; }
  .linear-stepper button::before { top: 13px; left: 25px; width: calc(100% + 6px); }
  .story-scroll { justify-content:flex-start; overflow:visible; padding:21px 24px 23px; }
  .story-header h1 { font-size: clamp(45px,12vw,66px); }
  .network-card h2, .discovery-card h2 { font-size: clamp(34px,8vw,49px); }
}

@media (max-width: 620px) {
  .map-panel { min-height: 335px; }
  .map-heading { top: 12px; left: 12px; }
  .basemap-toggle { top: 12px; right: 12px; }
  .map-heading strong { font-size: 13px; }
  .project-line { align-items: flex-start; flex-direction: column; gap: 5px; }
  .linear-stepper { padding-right: 12px; padding-left: 12px; }
  .network-kicker { align-items: flex-start; flex-direction: column; gap: 5px; }
  .network-kicker time { text-align: left; }
}

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