/* ==========================================================================
   Summit Psychological Wellness
   A trail-map site: the header is a contour map with one trail marker per
   section, and the page climbs from the trailhead register to the summit.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Rufina';
  src: url('../fonts/rufina-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rufina';
  src: url('../fonts/rufina-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mukta Vaani';
  src: url('../fonts/mukta-vaani-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mukta Vaani';
  src: url('../fonts/mukta-vaani-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mukta Vaani';
  src: url('../fonts/mukta-vaani-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mukta Vaani';
  src: url('../fonts/mukta-vaani-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Paper and ink */
  --paper: #f5f0e4;
  --paper-2: #ebe3d1;
  --sheet: #fbf7ee;
  --ink: #1d2e2a;
  --ink-soft: #4a5c55;
  --rule: #cfc5ae;

  /* Forest and trail */
  --spruce: #24493f;
  --spruce-deep: #16302a;
  --on-dark: #f5f0e4;
  --on-dark-soft: #c9d3cb;
  --contour: #2d4a42;
  --blaze: #a8431b;
  --blaze-light: #f0a77e;

  /* Wood for the register box and signs */
  --wood: #7a4b2a;
  --wood-dark: #553220;
  --wood-deep: #3d2416;
  --wood-text: #f5e7cf;

  /* Type */
  --font-display: 'Rufina', Georgia, 'Times New Roman', serif;
  --font-body: 'Mukta Vaani', 'Segoe UI', system-ui, sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.94rem);
  --step-0: clamp(1.04rem, 1rem + 0.2vw, 1.15rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
  --step-3: clamp(1.8rem, 1.45rem + 1.6vw, 2.75rem);
  --step-4: clamp(2.05rem, 1.6rem + 2.4vw, 3.45rem);

  /* Space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: clamp(2rem, 1.6rem + 1.5vw, 3rem);
  --space-5: clamp(3rem, 2.2rem + 3vw, 5rem);
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 66ch;

  /* Shape */
  --radius: 6px;
  --shadow: 0 1px 2px rgb(22 48 42 / 0.12), 0 10px 28px -12px rgb(22 48 42 / 0.35);
  --stamp: 6px 6px 0 var(--spruce);

  /* Layout */
  --rail: 300px;
  --bar: 64px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

body.nav-open { overflow: hidden; }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }

a {
  color: var(--spruce);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--blaze); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--blaze);
  outline-offset: 3px;
  border-radius: 2px;
}
[tabindex="-1"]:focus { outline: none; }


img, svg { max-width: 100%; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--sheet);
  color: var(--ink);
  font-weight: 600;
  border: 2px solid var(--spruce);
}
.skip-link:focus { top: 12px; }

/* ---------- Components: buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.35rem;
  border: 2px solid var(--spruce);
  border-radius: var(--radius);
  font: 600 var(--step-0) / 1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--spruce); color: var(--sheet); }
.btn-primary:hover { background: var(--blaze); border-color: var(--blaze); color: var(--sheet); }
.btn-quiet { background: transparent; color: var(--spruce); }
.btn-quiet:hover { background: var(--spruce); color: var(--sheet); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Components: brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--on-dark);
  text-decoration: none;
}
.brand:hover { color: var(--on-dark); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.brand-line-1 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.brand-line-2 { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--on-dark-soft); }

/* ---------- Header: the trail map ----------
   Below 1180px it is a slim bar with a "Trail map" toggle that opens the map
   as a full-screen sheet. From 1180px the same map is a fixed left rail. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: var(--bar);
  padding: 0 var(--gutter);
  background: var(--spruce-deep);
  color: var(--on-dark);
}
.site-header .brand { margin-right: auto; }

.header-call,
.map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1.5px solid rgb(245 240 228 / 0.55);
  border-radius: var(--radius);
  background: transparent;
  color: var(--on-dark);
  font: 600 0.95rem / 1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.header-call:hover,
.map-toggle:hover,
.map-toggle[aria-expanded="true"] {
  background: var(--on-dark);
  border-color: var(--on-dark);
  color: var(--spruce-deep);
}
.header-call svg { width: 18px; height: 18px; fill: currentColor; }
.map-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.header-call-long { display: none; }

.trail-panel {
  position: fixed;
  inset: var(--bar) 0 0 0;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--gutter);
  overflow-y: auto;
  background: var(--spruce-deep);
}
.trail-panel.is-open { display: flex; }

.trail-nav { width: 100%; display: flex; flex-direction: column; align-items: center; }
.trail-caption {
  align-self: stretch;
  margin: 0 0 var(--space-1);
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--on-dark);
}
.trail-caption span { color: var(--on-dark-soft); font-family: var(--font-body); font-size: 0.85rem; }

.trail-box {
  position: relative;
  width: 150px;
  height: clamp(400px, calc(100dvh - var(--bar) - 170px), 600px);
  margin-right: 100px;
}
.trail-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trail-art path { vector-effect: non-scaling-stroke; }
.trail-contours { fill: none; stroke: var(--contour); stroke-width: 1.1; }
.trail-path { fill: none; stroke: var(--on-dark-soft); stroke-width: 2; stroke-dasharray: 5 6; stroke-linecap: round; opacity: 0.7; }
.trail-walked {
  fill: none;
  stroke: var(--blaze-light);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: calc(100 - var(--progress, 0));
  transition: stroke-dashoffset 0.25s linear;
}
.trail-peak { fill: var(--on-dark); }

.trail-markers { margin: 0; padding: 0; list-style: none; }
.marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-11px, -50%);
}
.marker a {
  display: grid;
  grid-template-columns: 22px auto;
  column-gap: 0.55rem;
  align-items: center;
  min-height: 44px;
  padding-right: 0.4rem;
  color: var(--on-dark);
  text-decoration: none;
  white-space: nowrap;
}
.marker-blaze {
  grid-row: span 2;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  background: var(--spruce-deep);
  border: 2.5px solid var(--on-dark-soft);
  transform: rotate(45deg);
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.marker.is-summit .marker-blaze { background: var(--on-dark); border-color: var(--on-dark); }
.marker-label { font-weight: 600; font-size: 0.98rem; line-height: 1.1; }
.marker-elev { font-size: 0.78rem; line-height: 1.1; color: var(--on-dark-soft); }
.marker a:hover .marker-label { text-decoration: underline; text-underline-offset: 3px; }
.marker a:hover .marker-blaze,
.marker a[aria-current] .marker-blaze {
  background: var(--blaze-light);
  border-color: var(--blaze-light);
  transform: rotate(45deg) scale(1.2);
}
.marker a[aria-current] .marker-label { color: var(--blaze-light); }

.trail-crisis {
  max-width: 260px;
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--blaze-light);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--on-dark);
}
.trail-crisis a { color: var(--blaze-light); font-weight: 600; }

/* ---------- Sections: shared ---------- */
main > section {
  padding: var(--space-5) var(--gutter);
}
main > section > * {
  max-width: 1040px;
  margin-inline: auto;
}

.section-sign { margin-bottom: var(--space-4); }
.section-sign h2 { font-size: var(--step-3); max-width: 22ch; }
.section-elev {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--blaze);
}
.section-elev::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--blaze);
  transform: rotate(45deg);
}
.section-elev::after {
  content: '';
  flex: 0 1 120px;
  border-top: 2px dashed currentColor;
  opacity: 0.6;
}
.section-lede { max-width: 58ch; font-size: var(--step-1); color: var(--ink-soft); }

/* ---------- Section: trailhead (hero) ---------- */
.trailhead {
  position: relative;
  overflow: hidden;
  padding-top: var(--space-4);
  padding-bottom: 0;
  background:
    radial-gradient(120% 70% at 80% 0%, #e4e9e2 0%, transparent 60%),
    var(--paper);
}
.trailhead-ridge {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 46%;
  max-width: none;
}

.register {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding-right: clamp(20px, 6vw, 70px);
}
.register-roof { display: block; width: 100%; height: clamp(44px, 7vw, 70px); }
.register-box {
  position: relative;
  padding: clamp(12px, 2.5vw, 22px);
  padding-top: 0;
  background:
    repeating-linear-gradient(90deg, rgb(61 36 22 / 0.18) 0 2px, transparent 2px 23px),
    linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.register-plate {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.55rem 0.4rem 0.7rem;
  color: var(--wood-text);
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.25rem);
  letter-spacing: 0.06em;
}
.register-plate span:last-child { font-family: var(--font-body); letter-spacing: 0.02em; font-size: 0.9em; }

.register-sheet {
  position: relative;
  padding: clamp(18px, 3.5vw, 40px);
  background:
    linear-gradient(90deg, transparent calc(2.2rem - 1px), rgb(168 67 27 / 0.35) calc(2.2rem - 1px) calc(2.2rem + 1px), transparent calc(2.2rem + 1px)),
    var(--sheet);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgb(85 50 32 / 0.25);
}
.sheet-head {
  margin: 0 0 var(--space-2) 1.6rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-soft);
}
.register-sheet h1 {
  margin-left: 1.6rem;
  font-size: var(--step-4);
  color: var(--spruce-deep);
}
.sheet-lede { margin-left: 1.6rem; max-width: 50ch; font-size: var(--step-1); line-height: 1.5; }

.sheet-rows { margin: var(--space-3) 0 var(--space-3) 1.6rem; }
.sheet-rows div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
.sheet-rows dt { font-weight: 600; font-size: var(--step--1); color: var(--ink-soft); padding-top: 0.15rem; }
.sheet-rows dd { margin: 0; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.35; }

.sheet-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-left: 1.6rem; }

.pencil {
  position: absolute;
  top: clamp(40px, 7vw, 70px);
  right: clamp(-10px, 0vw, 0px);
  width: clamp(48px, 8vw, 84px);
  height: auto;
  transform-origin: 50% 0;
  animation: pencil-sway 6s ease-in-out infinite;
}
.pencil-string { fill: none; stroke: #8a7a60; stroke-width: 2; }

.register-post {
  width: 64px;
  height: clamp(60px, 9vw, 110px);
  margin: 0 auto;
  background: linear-gradient(90deg, var(--wood-deep), var(--wood) 45%, var(--wood-dark));
  position: relative;
  z-index: 1;
}

.trailhead-crisis {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 0.9rem 0 1.1rem;
  text-align: center;
  font-size: var(--step--1);
  color: var(--ink);
}
.trailhead-crisis a { font-weight: 600; }

@keyframes pencil-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ---------- Section: terrain (conditions board) ---------- */
.terrain { background: var(--paper-2); }
.conditions { margin: 0 auto; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.condition {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 2fr minmax(9rem, 0.8fr);
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--ink-soft);
}
.condition-name { margin: 0; font-size: var(--step-1); }
.condition-text { margin: 0; }
.condition-tag {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--spruce);
  text-align: right;
}

/* ---------- Section: routes (signpost) ---------- */
.signpost { position: relative; padding-block: var(--space-2); }
.signpost-pole {
  position: absolute;
  top: 0;
  bottom: -2rem;
  left: 50%;
  width: 40px;
  height: calc(100% + 2rem);
  transform: translateX(-50%);
}
.blade {
  position: relative;
  width: calc(50% + 14px);
  margin-bottom: var(--space-4);
}
.blade:last-child { margin-bottom: 0; }
.blade-right { margin-left: calc(50% - 14px); }
.blade-sign {
  margin: 0 0 var(--space-2);
  padding: 0.8rem 3rem 0.8rem 1.6rem;
  background:
    repeating-linear-gradient(180deg, rgb(61 36 22 / 0.2) 0 1px, transparent 1px 9px),
    var(--wood-dark);
  color: var(--wood-text);
  font-size: var(--step-1);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%);
}
.blade-left .blade-sign {
  padding: 0.8rem 1.6rem 0.8rem 3rem;
  text-align: right;
  clip-path: polygon(26px 0, 100% 0, 100% 100%, 26px 100%, 0 50%);
}
.blade-text {
  padding: var(--space-3);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.blade-right .blade-text { margin-left: 34px; }
.blade-left .blade-text { margin-right: 34px; }
.blade-text p:last-child { margin-bottom: 0; }
.blade-meta { font-weight: 600; font-size: var(--step--1); color: var(--spruce); }

/* ---------- Section: the climb (switchbacks) ---------- */
.climb { background: var(--paper-2); }
.switchbacks {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.switchback {
  position: relative;
  padding: var(--space-3) 30% var(--space-4) 3.5rem;
  border-bottom: 3px dashed var(--spruce);
}
.switchback:nth-child(odd) {
  border-right: 3px dashed var(--spruce);
  border-bottom-right-radius: 48px;
}
.switchback:nth-child(even) {
  padding: var(--space-3) 3.5rem var(--space-4) 30%;
  border-left: 3px dashed var(--spruce);
  border-bottom-left-radius: 48px;
}
.switchback:last-child { border-bottom-color: transparent; }
.switchback:last-child:nth-child(odd) { border-bottom-right-radius: 0; }
.switchback h3 { font-size: var(--step-1); }
.switchback p { margin: 0; }
.switchback-num {
  position: absolute;
  top: var(--space-3);
  left: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--blaze);
  color: var(--sheet);
  font: 700 1.1rem / 1 var(--font-display);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.switchback:nth-child(even) .switchback-num { left: auto; right: 0; }

/* ---------- Section: pack list ---------- */
.pack-sheet {
  padding: clamp(20px, 4vw, 44px);
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--stamp);
}
.fees { width: 100%; border-collapse: collapse; }
.fees caption {
  margin-bottom: 0.6rem;
  text-align: left;
  font: 700 var(--step-1) / 1.2 var(--font-display);
}
.fees th,
.fees td {
  padding: 0.7rem 0.75rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.fees thead th { font-size: var(--step--1); color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
.fees tbody th { font-weight: 600; }
.fees td:last-child { font-family: var(--font-display); font-size: 1.1rem; }
.pack-small { margin: 0.8rem 0 var(--space-4); font-size: var(--step--1); color: var(--ink-soft); }

.pack-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}
.pack-items li { position: relative; padding-left: 2.1rem; }
.pack-items li::before {
  content: '';
  position: absolute;
  top: 0.3rem;
  left: 0;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--spruce);
  border-radius: 3px;
}
.pack-items h3 { margin-bottom: 0.25rem; font-size: var(--step-1); }
.pack-items p { margin: 0; }

.gfe {
  padding: var(--space-3);
  background: var(--paper);
  border-left: 4px solid var(--blaze);
}
.gfe h3 { font-size: var(--step-1); }
.gfe p { margin: 0; font-size: var(--step--1); line-height: 1.6; }

/* ---------- Section: field notes (FAQ as a guidebook page) ---------- */
.notes {
  margin: 0 auto;
  padding: var(--space-2) 0;
  background: linear-gradient(90deg, transparent 9.4rem, rgb(168 67 27 / 0.4) 9.4rem calc(9.4rem + 2px), transparent calc(9.4rem + 2px));
}
.note {
  display: grid;
  grid-template-columns: 9.4rem 1fr;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}
.note:last-child { border-bottom: 0; }
.note dt {
  display: contents;
  font: 700 var(--step-1) / 1.3 var(--font-display);
  color: var(--spruce-deep);
}
.note-num {
  grid-row: span 2;
  padding-right: 1rem;
  padding-top: 0.2rem;
  font: 600 var(--step--1) / 1.6 var(--font-body);
  color: var(--blaze);
}
.note-q { grid-column: 2; padding-left: 1.5rem; }
.note dd {
  grid-column: 2;
  margin: 0.4rem 0 0;
  padding-left: 1.5rem;
  max-width: var(--measure);
}

/* ---------- Section: about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-4);
  align-items: center;
}
.about-lead { font: 400 var(--step-2) / 1.3 var(--font-display); color: var(--spruce-deep); }
.about-text p { max-width: var(--measure); }
.about-fig { margin: 0; }
.about-fig svg { display: block; width: 100%; max-width: 320px; height: auto; margin-inline: auto; }

/* ---------- Section: summit (contact) ---------- */
.summit { background: var(--paper-2); }
.summit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.summit-card {
  position: relative;
  padding: clamp(28px, 4vw, 44px) clamp(18px, 3.5vw, 40px) clamp(20px, 3.5vw, 36px);
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--stamp);
}
.summit-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 24px;
  right: 24px;
  height: 18px;
  background: radial-gradient(circle at 9px 9px, var(--paper-2) 0 4px, var(--ink) 4.5px 6.5px, transparent 7px) 0 0 / 30px 18px space no-repeat;
}
.form-warning {
  padding: 0.8rem 1rem;
  background: #f7e6db;
  border-left: 4px solid var(--blaze);
  font-size: var(--step--1);
}
.form-intro { font-size: var(--step--1); color: var(--ink-soft); }

.field { margin: 0 0 var(--space-3); padding: 0; border: 0; min-width: 0; }
.field label,
.field legend { display: block; margin-bottom: 0.3rem; padding: 0; font-weight: 600; }
.field-optional { font-weight: 400; color: var(--ink-soft); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-bottom: 2px solid var(--ink-soft);
  border-radius: 4px 4px 0 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.field input:focus-visible,
.field select:focus-visible { outline-offset: 1px; border-bottom-color: var(--spruce); }
.field [aria-invalid="true"] { border-bottom-color: var(--blaze); }
.field-error { margin: 0.3rem 0 0; font-size: var(--step--1); font-weight: 600; color: var(--blaze); }
.field-error:empty { display: none; }

.field-choice { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.field-choice legend { width: 100%; }
.field-choice .field-error { width: 100%; }
.choice {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 44px;
  padding-top: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}
.field .choice { font-weight: 400; }
.choice input { width: 22px; height: 22px; margin: 0.1rem 0 0; flex: none; accent-color: var(--spruce); }

.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-submit { width: 100%; }
.form-legal { margin: 0.9rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.form-status { margin-top: var(--space-2); }
.form-status:empty { display: none; }
.form-status.is-success,
.form-status.is-error {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.form-status.is-success { background: #dfe9e2; color: var(--spruce-deep); }
.form-status.is-error { background: #f7e6db; color: #7a2f12; }

.summit-aside { display: grid; gap: var(--space-3); }
.aside-block { padding-left: 1.2rem; border-left: 3px dashed var(--spruce); }
.aside-block h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.aside-block p { margin-bottom: 0.4rem; }
.aside-big { font: 700 var(--step-2) / 1.2 var(--font-display); text-decoration: none; white-space: nowrap; }
.aside-crisis { border-left: 4px solid var(--blaze); }
.aside-crisis a { font-weight: 600; }

/* ---------- Footer: map legend ---------- */
.site-footer {
  padding: var(--space-5) var(--gutter) var(--space-4);
  background: var(--spruce-deep);
  color: var(--on-dark);
}
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--blaze-light); }
.legend {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  max-width: 1040px;
  margin: 0 auto;
  border: 2px solid var(--on-dark-soft);
}
.legend > div { padding: var(--space-3); }
.legend-title {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  border-bottom: 2px solid var(--on-dark-soft);
}
.legend-sub { margin: 0; font-size: var(--step--1); color: var(--on-dark-soft); }
.legend-key { border-right: 1px solid var(--contour); }
.legend-contact { border-right: 1px solid var(--contour); }
.legend-heading {
  margin-bottom: 0.8rem;
  font-size: var(--step-1);
  color: var(--on-dark);
}
.legend-list { margin: 0; padding: 0; list-style: none; }
.legend-list li { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; }
.legend-list a,
.legend-list .link-button { display: inline-flex; align-items: center; min-height: 44px; }
.key { flex: none; width: 28px; height: 12px; }
.key-trail { border-top: 2px dashed var(--on-dark); margin-top: 6px; }
.key-npp { border-top: 3px solid var(--blaze-light); margin-top: 6px; }
.key-disclosure { width: 12px; height: 12px; margin-inline: 8px; background: var(--blaze-light); transform: rotate(45deg); }
.key-terms { border-top: 2px dotted var(--on-dark); border-bottom: 2px dotted var(--on-dark); }
.key-access { width: 14px; height: 14px; margin-inline: 7px; border: 2px solid var(--on-dark); border-radius: 50%; }
.key-cookie { width: 0; height: 0; margin-inline: 7px; border: 7px solid transparent; border-bottom: 12px solid var(--on-dark-soft); border-top: 0; }
.legend-contact p,
.legend-crisis p { font-size: var(--step--1); color: var(--on-dark); }
.legend-crisis a { color: var(--blaze-light); font-weight: 600; }
.legend-base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  border-top: 2px solid var(--on-dark-soft);
}
.legend-base p { margin: 0; flex: 1 1 320px; font-size: var(--step--1); color: var(--on-dark-soft); }
.scale-bar { width: 160px; height: 18px; flex: none; fill: none; stroke: var(--on-dark-soft); stroke-width: 1.5; }
.scale-fill { fill: var(--on-dark-soft); stroke: none; }
.brand-footer .brand-mark { width: 44px; height: 44px; }

/* ---------- Pages: legal ---------- */
.legal { padding: var(--space-4) var(--gutter) var(--space-5); }
.legal-article { max-width: 800px; margin: 0 auto; }
.legal-head {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 3px dashed var(--spruce);
}
.legal-kicker { margin-bottom: 0.4rem; font-weight: 600; color: var(--blaze); }
.legal-head h1 { font-size: var(--step-4); color: var(--spruce-deep); }
.legal-updated { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.legal-toc {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--stamp);
}
.legal-toc-title { font-size: var(--step-1); }
.legal-toc ol { margin: 0; padding-left: 1.4rem; columns: 2 16rem; column-gap: var(--space-4); }
.legal-toc li { padding: 0.2rem 0; break-inside: avoid; }
.legal-toc a { display: inline-block; padding: 0.3rem 0; }
.legal-body h2 {
  margin-top: var(--space-4);
  font-size: var(--step-2);
  color: var(--spruce-deep);
}
.legal-body h3 { margin-top: var(--space-3); font-size: var(--step-1); }
.legal-body p,
.legal-body li { max-width: var(--measure); overflow-wrap: break-word; }
.legal-body ul,
.legal-body ol { padding-left: 1.3rem; }
.legal-body li { margin-bottom: 0.4rem; }
.legal-body address {
  margin-bottom: 1em;
  padding: 0.8rem 1rem;
  background: var(--sheet);
  border-left: 4px solid var(--spruce);
  font-style: normal;
}
.legal-callout {
  padding: var(--space-2) var(--space-3);
  background: #f7e6db;
  border-left: 4px solid var(--blaze);
}
.legal-callout p:last-child { margin-bottom: 0; }

.data-table { width: 100%; margin: var(--space-2) 0 var(--space-3); border-collapse: collapse; font-size: var(--step--1); }
.data-table caption { text-align: left; font-weight: 600; margin-bottom: 0.4rem; }
.data-table th,
.data-table td { padding: 0.6rem 0.7rem; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.data-table thead th { background: var(--spruce); color: var(--sheet); border-color: var(--spruce); }
.data-table tbody th { background: var(--sheet); font-weight: 600; }
.data-table code { font-size: 0.95em; overflow-wrap: anywhere; }

/* ---------- Pages: 404 ---------- */
.lost { padding: var(--space-5) var(--gutter); text-align: center; }
.lost > * { max-width: 640px; margin-inline: auto; }
.lost svg { display: block; width: 220px; height: auto; margin: 0 auto var(--space-3); }
.lost h1 { font-size: var(--step-4); color: var(--spruce-deep); }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* ---------- Consent banner and dialog ---------- */
.consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: var(--space-3);
  background: var(--sheet);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--stamp);
}
.consent-title { font-size: var(--step-1); }
.consent-text { font-size: var(--step--1); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.consent-btn {
  flex: 1 1 8rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--spruce);
  border-radius: var(--radius);
  background: var(--spruce);
  color: var(--sheet);
  font: 600 0.98rem / 1.2 var(--font-body);
  cursor: pointer;
}
.consent-btn:hover { background: var(--blaze); border-color: var(--blaze); }
.consent-link {
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--spruce);
  font: 600 0.98rem / 1.2 var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.consent-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
}
.consent-dialog::backdrop { background: rgb(22 48 42 / 0.6); }
.consent-dialog-inner { padding: var(--space-3); }
.consent-categories { margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.consent-category { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.consent-category p { margin: 0.3rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.consent-category h3 { margin: 0; font-size: 1.1rem; }
.consent-category-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consent-always { font-size: var(--step--1); font-weight: 600; color: var(--spruce); }
.consent-switch { position: relative; display: inline-flex; width: 52px; height: 44px; align-items: center; cursor: pointer; }
.consent-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.consent-switch-track {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: var(--ink-soft);
  transition: background-color 0.2s;
}
.consent-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sheet);
  transition: transform 0.2s;
}
.consent-switch input:checked + .consent-switch-track { background: var(--spruce); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(24px); }
.consent-switch input:focus-visible + .consent-switch-track { outline: 3px solid var(--blaze); outline-offset: 2px; }

/* ---------- Layout: tablet and up ---------- */
@media (min-width: 600px) {
  .header-call-short { display: none; }
  .header-call-long { display: inline; }
}

/* ---------- Layout: the fixed trail-map rail ---------- */
@media (min-width: 1180px) {
  html { scroll-padding-top: 12px; }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-3) 20px;
    overflow-y: auto;
  }
  .site-header .brand { margin-right: 0; }
  .map-toggle { display: none; }
  .header-call { order: 3; justify-content: center; }

  .trail-panel {
    position: static;
    display: flex;
    flex: 1 0 auto;
    padding: 0;
    overflow: visible;
    background: none;
  }
  .trail-box {
    height: clamp(400px, calc(100dvh - 290px), 620px);
    margin: 0 auto 0 12px;
  }

  main,
  .site-footer { margin-left: var(--rail); }
}

/* ---------- Layout: below the rail ---------- */
@media (max-width: 900px) {
  .condition { grid-template-columns: 1fr; gap: 0.4rem; }
  .condition-tag { text-align: left; }
  .about-grid,
  .summit-grid { grid-template-columns: 1fr; }
  .about-fig svg { max-width: 240px; }
  .legend { grid-template-columns: 1fr 1fr; }
  .legend-contact { border-right: 0; }
  .legend-crisis { grid-column: 1 / -1; border-top: 1px solid var(--contour); }
}

@media (max-width: 720px) {
  .signpost-pole { left: 20px; }
  .blade,
  .blade-right { width: auto; margin-left: 8px; }
  .blade-left .blade-sign {
    padding: 0.8rem 3rem 0.8rem 1.6rem;
    text-align: left;
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%);
  }
  .blade-right .blade-text,
  .blade-left .blade-text { margin: 0 0 0 34px; }

  .switchback,
  .switchback:nth-child(even) { padding: var(--space-3) 1.5rem var(--space-4) 3.5rem; }
  .switchback:nth-child(even) .switchback-num { right: auto; left: 0; }

  .pack-items { grid-template-columns: 1fr; }

  .notes { background: none; }
  .note { grid-template-columns: 1fr; }
  .note-num { grid-row: auto; }
  .note dd,
  .note-q { grid-column: 1; padding-left: 0; }
}

@media (max-width: 600px) {
  .sheet-rows div { grid-template-columns: 1fr; gap: 0.1rem; }
  .register-sheet { background: var(--sheet); }
  .sheet-head,
  .register-sheet h1,
  .sheet-lede,
  .sheet-rows,
  .sheet-actions { margin-left: 0; }
  .sheet-actions .btn { width: 100%; }
  .register-plate span:last-child { display: none; }
  .pencil { right: -6px; }

  .legend { grid-template-columns: 1fr; }
  .legend-key { border-right: 0; border-bottom: 1px solid var(--contour); }

  /* Tables stack into label/value blocks. */
  .fees thead,
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fees tr,
  .data-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
  .fees th,
  .fees td,
  .data-table th,
  .data-table td { display: block; border: 0; padding: 0.2rem 0; }
  .data-table tbody th { background: none; }
  .fees td::before,
  .data-table td::before {
    content: attr(data-label) ': ';
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--ink-soft);
  }
}

@media (max-width: 379px) {
  .brand-line-2 { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .header-call,
  .map-toggle { padding: 0 0.65rem; }
}

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .consent,
  .skip-link,
  .pencil,
  .trailhead-ridge { display: none; }
  main,
  .site-footer { margin-left: 0; }
  body { background: #fff; }
}
