@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #fdfefb;
  --ink: #151513;
  --ink-2: #45463f;
  --track: #c8231b;
  --track-deep: #9e1a13;
  --contour: #a6622a;
  --bush: #d3e8c2;
  --bush-ink: #29501b;
  --water: #cfe5f3;
  --water-ink: #1c5a91;
  --rule: #151513;
  --hair: rgba(21, 21, 19, 0.16);
  --gutter: clamp(16px, 3vw, 40px);
  --measure: 62ch;
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  --step-3: clamp(2.25rem, 1.4rem + 2.6vw, 3.6rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--contour) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-variation-settings: 'wdth' 100;
  caret-color: var(--track);
  text-rendering: optimizeLegibility;
}
::selection { background: var(--track); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:not(.btn):hover { color: var(--track-deep); }
:focus-visible { outline: 3px solid var(--track); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; text-wrap: balance; font-weight: 760; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; }

/* Wordmark: the sheet name, set wide like a Topo sheet title. */
.wordmark { font-stretch: 125%; font-weight: 720; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; font-size: 1rem; }

/* Buttons are map plates: square, solid, plainly clickable. */
.btn {
  text-align: center; line-height: 1.2; padding-block: 10px;
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  font-weight: 650; font-size: 1.0625rem; text-decoration: none; border: 2px solid var(--ink); border-radius: 2px;
  transition: background-color 160ms cubic-bezier(.16,1,.3,1), color 160ms cubic-bezier(.16,1,.3,1);
}
.btn-track { background: var(--track); border-color: var(--track); color: #fff; }
.btn-track:hover { background: var(--track-deep); border-color: var(--track-deep); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-paper { background: #fff; border-color: #fff; color: var(--track-deep); }
.btn-paper:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Sheet margins */
.margin-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 18px var(--gutter);
}
.margin-top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.margin-top ul { display: flex; flex-wrap: wrap; gap: 4px 24px; list-style: none; margin: 0; padding: 0; }
.margin-top ul a { text-decoration: none; font-weight: 560; display: inline-block; padding: 10px 0; }
.margin-top ul a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--track); text-decoration-thickness: 3px; }
.margin-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 28px var(--gutter) 40px; border-top: 2px solid var(--rule); margin-top: 0; font-size: var(--step--1); color: var(--ink-2);
}
.margin-bottom .wordmark { color: var(--ink); margin-right: 10px; font-size: var(--step--1); }

/* ===== The map sheet ===== */
.sheet { margin: 0 var(--gutter) 28px; position: relative; }
.sheet-grid { display: flex; justify-content: space-between; padding: 0 0 6px; font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.neatline { position: relative; border: 2px solid var(--rule); overflow: hidden; background: var(--paper); }
.map { position: relative; aspect-ratio: 16 / 9; min-height: 620px; max-height: 86vh; width: 100%; }
.map > img, .map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map > img { object-fit: cover; object-position: center bottom; }

.route-casing { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-opacity: 0.85; }
.route { fill: none; stroke: var(--track); stroke-width: 4.5; stroke-dasharray: 14 9; stroke-linecap: butt; }
.route-reveal { fill: none; stroke: #fff; stroke-width: 22; stroke-linecap: round; }
.leg { fill: none; stroke: var(--track); stroke-width: 9; stroke-linecap: round; opacity: 0; transition: opacity 220ms cubic-bezier(.16,1,.3,1); }
.wp { cursor: pointer; }
.wp .hut { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.wp text, .map-label {
  font-family: 'Archivo', sans-serif; font-stretch: 118%; font-weight: 720; letter-spacing: 0.08em;
  font-size: 19px; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round;
}
.wp .note { font-stretch: 100%; font-weight: 560; letter-spacing: 0; font-size: 17px; fill: var(--track-deep); opacity: 0; transition: opacity 200ms cubic-bezier(.16,1,.3,1); }
.wp .note.on { opacity: 1; }
.wp .mob-n, .wp .mob-only { display: none; }
.scale text { font-family: 'Archivo', sans-serif; font-size: 15px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 5px; font-variant-numeric: tabular-nums; }
.sheet-line { font-size: 0.8125rem; font-stretch: 112%; letter-spacing: 0.04em; color: var(--ink-2); padding: 8px 0 0; text-align: right; }
.sheet-grid.bottom { padding: 6px 0 0; }
.map-key { display: none; }
.wp .sub { font-stretch: 100%; font-weight: 520; letter-spacing: 0; font-size: 16px; fill: var(--ink-2); }
.wp:hover text, .wp:focus-visible text { fill: var(--track-deep); }
.wp:focus { outline: none; }
.wp:focus-visible .hut { stroke: var(--track); stroke-width: 5; }
.water-label { font-family: 'Archivo', sans-serif; font-style: italic; font-stretch: 100%; font-weight: 500; font-size: 20px; fill: var(--water-ink); letter-spacing: 0.02em; }
.trig { fill: none; stroke: var(--ink); stroke-width: 3; }
.trig-dot { fill: var(--ink); }

.title-block {
  position: absolute; z-index: 2; top: clamp(16px, 3vw, 40px); left: clamp(16px, 3vw, 40px);
  width: min(560px, calc(100% - 32px)); background: #fff; border: 2px solid var(--rule);
  padding: clamp(22px, 2.6vw, 36px); display: grid; gap: 18px;
}
.title-block h1 { font-size: var(--step-3); font-stretch: 86%; font-weight: 780; letter-spacing: -0.015em; line-height: 1.02; }
.title-block p { font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.legend {
  position: absolute; right: clamp(12px, 2vw, 28px); bottom: clamp(12px, 2vw, 28px);
  background: #fff; border: 2px solid var(--rule); padding: 14px 16px; font-size: 0.875rem; display: grid; gap: 8px; color: var(--ink);
}
.legend div { display: flex; align-items: center; gap: 10px; }
.legend svg { width: 34px; height: 14px; flex: none; }
.legend .note { color: var(--ink-2); font-style: italic; }

@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .route-reveal { stroke-dasharray: var(--len); animation: draw 1900ms cubic-bezier(.16,1,.3,1) 250ms both; }
}

/* ===== Sections below the sheet ===== */
.section { padding: clamp(72px, 9vw, 128px) var(--gutter); }
.wrap { max-width: 1240px; margin: 0 auto; }
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gutter); align-items: start; }
.split > .lead { grid-column: 1 / span 5; display: grid; gap: 20px; }
.split > .body { grid-column: 7 / span 6; display: grid; gap: 24px; }
.section h2 { font-size: var(--step-3); font-stretch: 86%; line-height: 1.02; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }

.hazards { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule); }
.hazards li { padding: 20px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 6px; }
.hazards h3 { font-size: var(--step-1); font-weight: 700; }
.hazards p { color: var(--ink-2); max-width: var(--measure); }

/* Route section: elevation profile + legs */
.section { position: relative; }
.section:not(.trailhead)::before {
  content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 9px;
  background: url('/ticks.svg') top left / 100% 9px no-repeat;
}
.route-section { background: #fff; }
.route-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: 48px; }
.profile { width: 100%; height: auto; overflow: visible; }
.profile .ground { fill: var(--bush); }
.profile .skyline { fill: none; stroke: var(--contour); stroke-width: 2; }
.profile .track { fill: none; stroke: var(--track); stroke-width: 3; stroke-dasharray: 10 7; }
.profile .stage { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 4; }
.profile .hut { fill: var(--ink); stroke: #fff; stroke-width: 2.5; }
.legs { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; counter-reset: leg; }
.legs li { display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2px solid var(--rule); scroll-margin-top: 24px; }
.legs li:target { border-top-color: var(--track); }
.legs h3 { font-size: var(--step-1); font-stretch: 100%; display: flex; gap: 10px; align-items: baseline; }
.legs .n { font-variant-numeric: tabular-nums; color: var(--track-deep); font-weight: 780; }
.legs p { color: var(--ink-2); font-size: 1.0625rem; }
.legs .keep { color: var(--ink); font-size: 1rem; padding-top: 10px; border-top: 1px solid var(--hair); }
.legs .keep b { font-weight: 700; }
.loop { margin-top: 48px; font-size: 1.0625rem; color: var(--ink-2); max-width: 860px; }
.loop b { color: var(--ink); font-weight: 680; }

/* Water field: workflows as recipes */
.water-field { background: var(--water); }
.water-field .lede { color: #23384a; }
.recipe { background: #fff; border: 2px solid var(--rule); padding: clamp(24px, 3vw, 40px); display: grid; gap: 22px; }
.copy-status:empty { display: none; }
.recipe h3 { font-size: var(--step-2); font-stretch: 90%; }
.recipe .tag { color: var(--water-ink); font-style: italic; }
.recipe dl { margin: 0; display: grid; gap: 16px; }
.recipe dt { font-weight: 720; }
.recipe dd { margin: 4px 0 0; color: var(--ink-2); }
.recipe ol { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 0; counter-reset: step; }
.recipe ol li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 4px 8px; padding: 12px 0; border-top: 1px solid var(--hair); }
.recipe ol li::before { content: counter(step); font-weight: 780; color: var(--track-deep); font-variant-numeric: tabular-nums; }
.recipe ol li span { grid-column: 2; color: var(--ink-2); font-size: 1rem; }
.recipe ol li b { grid-column: 2; font-weight: 680; color: var(--ink); }
.copy-status { font-size: 1rem; color: var(--bush-ink); min-height: 1.5em; }

.honest { border: 2px solid var(--rule); padding: 24px 26px; display: grid; gap: 8px; background: #fff; }
.honest h3 { font-size: var(--step-1); }
.honest p { color: var(--ink-2); }

.questions { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule); }
.questions li { border-bottom: 1px solid var(--hair); }
.thoughts-row { display: grid; gap: 40px; }
.thoughts-row .lead { max-width: 760px; display: grid; gap: 20px; }
.questions a { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 8px 32px; padding: 26px 0; text-decoration: none; align-items: baseline; }
.questions .topic { grid-row: 1; grid-column: 1; }
.questions .q { grid-column: 2; }
.questions .topic { font-stretch: 118%; font-weight: 720; letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--step--1); color: var(--contour); }
.questions .q { font-size: var(--step-2); font-stretch: 92%; font-weight: 640; line-height: 1.15; }
.questions a:hover .q { color: var(--track-deep); text-decoration: underline; text-decoration-thickness: 2px; }

/* Trailhead close: the one red field */
.trailhead { background: var(--track); color: #fff; }
.trailhead h2 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.75rem); font-stretch: 86%; max-width: 14ch; }
.trailhead p { font-size: var(--step-1); max-width: 40ch; color: #fff; }
.trailhead ::selection { background: #fff; color: var(--track-deep); }
.trailhead :focus-visible { outline-color: #fff; }
.trailhead .addr { font-size: 1rem; }
.trailhead a:not(.btn) { color: #fff; }


.page-head h1 { font-size: var(--step-3); font-stretch: 86%; font-weight: 780; letter-spacing: -0.015em; line-height: 1.02; }
.page-head .method { color: var(--ink-2); max-width: var(--measure); }

.crew { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule); }
.crew li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--hair); align-items: start; }
.crew .sym { width: 40px; height: 40px; }
.crew h3 { font-size: var(--step-1); font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.crew h3 span { font-size: var(--step--1); font-stretch: 118%; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--contour); }
.crew p { color: var(--ink-2); margin-top: 6px; max-width: var(--measure); }

.journey { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.journey li { position: relative; padding: 0 0 48px 64px; display: grid; gap: 8px; max-width: 760px; }
.journey li::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 0; border-left: 4px dashed var(--track); }
.journey li.last { padding-bottom: 0; }
.journey li.last::before { display: none; }
.journey .marker { position: absolute; left: 3px; top: 4px; width: 24px; height: 24px; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ink); }
.journey li.last .marker { background: var(--track); border-radius: 50%; }
.journey h3 { font-size: var(--step-2); font-stretch: 90%; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.journey h3 span { font-size: var(--step--1); font-stretch: 118%; font-weight: 720; letter-spacing: 0.06em; text-transform: uppercase; color: var(--contour); }
.journey .text { color: var(--ink-2); max-width: var(--measure); }
.journey .keep { padding-top: 10px; border-top: 1px solid var(--hair); max-width: var(--measure); }
.journey .keep b { font-weight: 700; }

.bush-field { background: var(--bush); }
.pull { margin: 0; }
.pull p { max-width: 22ch; }
.sticky { position: sticky; top: 32px; }
.pull p { font-size: clamp(2rem, 1.2rem + 2.8vw, 3.5rem); font-stretch: 86%; font-weight: 760; line-height: 1.08; letter-spacing: -0.015em; color: var(--bush-ink); text-wrap: balance; }

.gaz-h { font-size: var(--step-2) !important; font-stretch: 90% !important; margin-bottom: 28px; }
.gaz-old { font-size: var(--step--1) !important; font-stretch: 125% !important; font-weight: 720; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 18px; line-height: 1.2 !important; }
.gazetteer { width: 100%; border-collapse: collapse; border-top: 2px solid var(--rule); }
.gazetteer thead th { text-align: left; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); }
.gazetteer tbody th { text-align: left; vertical-align: top; padding: 26px 24px 26px 0; width: 22%; color: var(--contour); font-stretch: 118%; font-weight: 720; letter-spacing: 0.06em; text-transform: uppercase; font-size: 1rem; }
.gazetteer td { vertical-align: top; padding: 24px 24px 24px 0; border-bottom: 1px solid var(--hair); }
.gazetteer tbody th { border-bottom: 1px solid var(--hair); }
.gazetteer .q { font-size: var(--step-1); font-weight: 600; line-height: 1.3; max-width: 52ch; }
.gazetteer tr:target th { color: var(--track-deep); }

.prompt { margin: 8px 0 0; padding: 18px 20px; background: var(--paper); border: 0; font-family: 'Archivo', sans-serif; font-size: 1.125rem; line-height: 1.55; white-space: pre-wrap; color: var(--ink); }
.neatline.stacked .title-block { position: relative; inset: auto; width: auto; border-width: 0 0 2px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 40px; align-items: end; }
.neatline.stacked .title-block h1 { grid-row: 1 / span 2; max-width: 14ch; }
.neatline.stacked .title-block p { max-width: 40ch; }
.map.band { aspect-ratio: 1600 / 560; height: auto; min-height: 0; max-height: none; }
.map.band > img { object-position: center bottom; }
.anatomy { grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 1080px) {
  .legs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .neatline { overflow: visible; }
  .title-block { position: relative; inset: auto; width: auto; border-width: 0 0 2px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; padding: 22px 24px; align-items: start; }
  .title-block h1 { grid-row: 1 / span 2; font-size: clamp(2rem, 1.2rem + 2.4vw, 2.75rem); }
  .title-block p { font-size: 1.125rem; }
  .map { aspect-ratio: 9 / 4; min-height: 0; }
}
@media (max-width: 860px) {
  .title-block { grid-template-columns: 1fr; }
  .title-block h1 { grid-row: auto; font-size: var(--step-3); }
  .split > .lead, .split > .body { grid-column: 1 / -1; }
  .sticky { position: static; }
  .neatline.stacked .title-block { grid-template-columns: 1fr; }
  .neatline.stacked .title-block h1 { grid-row: auto; }
  .map.band { aspect-ratio: 1600 / 560; }
  .map.band .wp .mob-n { font-size: 64px; }
  .map.band .wp .hut { width: 84px; height: 84px; transform: translate(-33px, -33px); }
  .map { aspect-ratio: 3 / 2; height: auto; min-height: 0; max-height: none; }
  .map .wp text:not(.mob-n), .map .water-label, .map .map-label, .map .scale { display: none; }
  .map .wp .mob-n { display: block; font-size: 46px; font-stretch: 100%; letter-spacing: 0; fill: #fff; stroke: none; font-weight: 780; }
  .map .wp .hut { width: 64px; height: 64px; transform: translate(-23px, -23px); transform-box: fill-box; }
  .map .wp g { display: none; }
  .map .wp .mob-only { display: block; }
  .map-key { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; list-style: none; margin: 0; padding: 14px 16px 16px; border-top: 2px solid var(--rule); }
  .map-key .here { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 620; grid-column: 1 / -1; }
  .map-key .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--track); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ink); flex: none; margin: 0 4px; }
  .map-key a { display: flex; gap: 10px; align-items: center; min-height: 44px; text-decoration: none; font-weight: 620; }
  .map-key .n { display: inline-grid; place-items: center; width: 26px; height: 26px; background: var(--ink); color: #fff; font-size: 0.875rem; font-weight: 760; flex: none; }
  .neatline { overflow: visible; }
  .title-block { position: relative; inset: auto; width: auto; border-width: 0 0 2px; }
  .legend { display: none; }
  .sheet-grid { display: none; }
  .questions a { grid-template-columns: 1fr; }
  .questions .topic, .questions .q { grid-column: 1; grid-row: auto; }
  .gazetteer thead { display: none; }
  .gazetteer tr { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--hair); }
  .gazetteer tbody th, .gazetteer td { padding: 0; border: 0; width: auto; }
  .journey li { padding-left: 52px; }
}
@media (max-width: 560px) {
  .legs { grid-template-columns: 1fr; }
  .margin-top { padding-top: 12px; padding-bottom: 12px; }
  .margin-top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'brand btn' 'links links'; }
  .margin-top .wordmark { grid-area: brand; }
  .margin-top nav { display: contents; }
  .margin-top .btn { grid-area: btn; padding: 0 16px; }
  .margin-top ul { grid-area: links; gap: 0 18px; font-size: 1rem; }
  .margin-top ul a { min-height: 44px; display: inline-flex; align-items: center; padding: 0; }

}

/* Read pages (privacy): plain prose and ruled tables */
.prose { max-width: 820px; display: grid; gap: 18px; }
.prose h2 { font-size: var(--step-2); font-stretch: 90%; margin-top: 28px; }
.prose p, .prose li { color: var(--ink-2); max-width: var(--measure); text-wrap: pretty; }
.prose td, .prose th { text-wrap: pretty; }
.prose strong { color: var(--ink); font-weight: 680; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--rule); font-size: 1rem; }
.prose th { text-align: left; font-weight: 650; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); }
.prose td { vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--hair); color: var(--ink-2); }
