/* Place guides (/guides/), generated by scripts/build-website.mjs from
   landing/guides-src/. Loaded after styles.css and help.css: same tokens,
   the .doc type styles, crumbs, callouts and the homepage's waitlist card.
   The header band's contours are traced from real terrain around each town
   (img/guides/topo-*.svg, scripts/generate-topo.mjs). */

.guides { padding-block: 48px 0; }
.guides > h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.05; margin-top: 10px; max-width: 18ch; }
.guide-lead { font-size: 19px; line-height: 1.5; color: var(--ink-muted); margin-top: 14px; max-width: 60ch; }

.guide-region { margin-top: 48px; }
.guide-region h2 { font-size: 22px; }
.guide-region > p { color: var(--ink-muted); margin-top: 6px; max-width: 60ch; }

.guide-cards {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px;
}
.guide-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: border-color 160ms ease, transform 160ms ease;
}
.guide-card:hover { border-color: var(--clay-light); transform: translateY(-2px); }
.guide-card-topo { display: block; height: 96px; background: var(--cream-2); border-bottom: 1px solid var(--hair); overflow: hidden; }
.guide-card-topo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guide-card-body { display: grid; gap: 6px; padding: 18px 20px 20px; }
.guide-card-body strong { font-size: 18px; line-height: 1.25; }
.guide-card-body > span:last-child { color: var(--ink-muted); font-size: 15px; line-height: 1.45; }

/* One guide */
.guide-head { position: relative; overflow: hidden; background: var(--cream-2); border-bottom: 1px solid var(--hair); }
.guide-topo { position: absolute; inset: 0; }
.guide-topo img { width: 100%; height: 100%; object-fit: cover; }
.guide-head-text { position: relative; padding-block: 40px 36px; }
.guide-head h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.05; margin-top: 14px; max-width: 20ch; }
.guide-head .guide-lead { color: var(--ink); }
.guide-checked { font-size: 14px; color: var(--ink-muted); margin-top: 14px; }
/* Lift the text off the contours where they cross it */
.guide-head h1, .guide-head .guide-lead, .guide-checked, .guide-head .help-crumbs { text-shadow: 0 0 12px var(--cream-2), 0 0 4px var(--cream-2); }

.guide-article { padding-block: 8px 0; }
.guide-article > h2:first-child { margin-top: 36px; }
.guide-article ol { padding-left: 22px; margin: 12px 0 0; }
.guide-article ol li { margin-top: 8px; padding-left: 4px; }
.guide-article h2, .guide-article h3 { scroll-margin-top: 24px; }
.guide-article a { overflow-wrap: anywhere; }

/* "At a glance" (the ```facts block) */
.facts {
  display: flex; flex-wrap: wrap; gap: 1px; margin: 28px 0 0;
  border-radius: 14px; overflow: hidden; background: var(--hair); border: 1px solid var(--hair);
}
.facts > div { flex: 1 1 200px; padding: 12px 16px; background: var(--paper); }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.facts dd { margin: 4px 0 0; font-size: 15.5px; font-weight: 600; line-height: 1.4; }

/* The map and its slider of places (the ```explore block, guides.js).
   Wider than the reading column: it's the centerpiece of the page. */
.explore { margin: 36px 0 0; }
/* The article runs the full container so the map can; text keeps the
   reading measure. */
.guide-article { max-width: none; }
.guide-article > :not(.explore) { max-width: 760px; }
.explore-map {
  position: relative; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--hair); background: var(--cream-2);
  height: clamp(340px, 52vw, 540px);
}
/* Mapbox sets its container to position: relative, so size it directly. */
.explore-canvas { width: 100%; height: 100%; }
.explore-legend {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: calc(100% - 72px);
  padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 252, 245, 0.92); border: 1px solid var(--hair);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.explore-legend span { display: inline-flex; align-items: center; gap: 6px; }
.explore-legend i { display: inline-block; flex: none; }
.lg-site, .lg-camp { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--paper); box-shadow: 0 0 0 1px var(--hair); }
.lg-site { background: #1E201A; }
.lg-camp { background: var(--clay-text); }
.lg-road { width: 18px; height: 4px; border-radius: 2px; background: var(--clay); }
.lg-usfs { width: 14px; height: 10px; border-radius: 3px; background: rgba(47, 143, 58, 0.28); }

.explore-rail { position: relative; margin-top: 16px; }
.explore-nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.explore-nav button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--hair); background: var(--paper); color: var(--ink);
  font: 600 22px/1 var(--sans, inherit); cursor: pointer;
}
.explore-nav button:hover { border-color: var(--clay-light); }
.guide-article .explore-cards {
  list-style: none; margin: 0; padding: 4px 4px 14px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.guide-article .explore-card {
  margin: 0;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--hair); border-radius: 16px;
  padding: 18px 18px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.explore-card.is-active { border-color: var(--clay); box-shadow: 0 0 0 1px var(--clay), 0 6px 18px rgba(42, 44, 36, 0.08); }
.explore-pick {
  all: unset; cursor: pointer; display: grid; gap: 6px;
  border-radius: 6px;
}
.explore-pick:focus-visible { outline: 2px solid var(--clay-text); outline-offset: 4px; }
.explore-name { font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.explore-card > p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.guide-article .explore-facts { list-style: none; padding: 0; margin: auto 0 0; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.guide-article .explore-facts li {
  margin: 0; padding: 4px 9px; border-radius: 999px;
  background: var(--cream-2); font-size: 12.5px; font-weight: 600; color: var(--ink);
}
/* Without the map (no JS or no token) the cards are a plain grid. */
.guide-article .explore-map[hidden] + .explore-rail .explore-cards { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; }
/* A site's details: a popup on wider maps, a sheet along the bottom of
   the map on phones (guides.js sitePopup). */
.site-sheet {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3;
  max-height: 55%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 2px 4px rgba(42, 44, 36, 0.08), 0 10px 28px rgba(42, 44, 36, 0.22);
}
.site-sheet[hidden] { display: none; }
.site-sheet-close {
  position: absolute; top: 6px; right: 6px; width: 36px; height: 36px;
  border: 0; border-radius: 10px; background: transparent;
  font-size: 22px; line-height: 1; color: var(--ink-muted); cursor: pointer;
}
/* A site's popup on the map (guides.js sitePopup). */
.site-pop .mapboxgl-popup-content {
  font-family: var(--sans); color: var(--ink); text-align: left;
  background: var(--paper); border-radius: 14px; padding: 14px 16px 14px;
  box-shadow: 0 2px 4px rgba(42, 44, 36, 0.08), 0 10px 28px rgba(42, 44, 36, 0.18);
}
.site-pop .mapboxgl-popup-tip { border-top-color: var(--paper); border-bottom-color: var(--paper); }
.site-pop .mapboxgl-popup-close-button { font-size: 20px; width: 32px; height: 32px; right: 2px; top: 2px; color: var(--ink-muted); border-radius: 8px; }
.guide-article .site-pop-kind { margin: 0; padding-right: 22px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--clay-text); }
.guide-article .site-pop-name { margin: 4px 0 0; padding-right: 22px; font-size: 17px; line-height: 1.25; font-weight: 700; }
.guide-article .site-pop-facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.guide-article .site-pop-facts li { margin: 0; padding: 3px 8px; border-radius: 999px; background: var(--cream-2); font-size: 12px; font-weight: 600; }
.site-pop-label { margin: 12px 0 0 !important; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.site-pop-coords {
  all: unset; cursor: pointer; display: inline-block; margin-top: 10px;
  font: 500 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-muted);
  border-bottom: 1px dashed var(--hair);
}
.site-pop-coords:hover { color: var(--ink); }
.site-pop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.site-pop-btn {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--hair); background: var(--paper);
  font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.site-pop-btn.primary { background: var(--clay); border-color: var(--clay); color: #1E201A; }
.site-pop-btn:hover { border-color: var(--clay-light); }
.site-pop-area { all: unset; cursor: pointer; display: block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--clay-text); }
.site-pop-area:hover { text-decoration: underline; }
.site-pop :focus-visible { outline: 2px solid var(--clay-text); outline-offset: 2px; }

.guide-join { padding-block: 64px 0; }
.guide-join h2 { max-width: 16ch; }
.guide-more { padding-block: 64px 96px; }
.guide-more h2 { font-size: 22px; }
.guides .guide-join { padding-bottom: 96px; }

@media (max-width: 560px) {
  .guide-article .explore-cards { grid-auto-columns: 84%; }
  .explore-map { height: 380px; border-radius: 14px; }
  .explore-legend { font-size: 11.5px; gap: 4px 10px; }
  .guide-head-text { padding-block: 28px 28px; }
  .guide-lead { font-size: 17px; }
}
