/* Hike pages (/randonnees/…), generated by scripts/build-hikes.mjs, after the « Fiche randonnée ·
   nouvelle ossature » board of the design project. A reading page, not the landing's parallax:
   light by default, dark with the system, calm, no continuous animation. The closed-trails pages
   share the chrome (header, footer, download block, cards) and add closures.css. The hikes hub
   adds randonnees-liste.css for the filter bar, the cards and the map. */
:root {
  color-scheme: light dark;
  --canvas: #f6f8fc;
  --surface: #ffffff;
  --soft: #eef2f8;
  --ink: #0b1730;
  --ink-2: #40506b;
  --muted: #6b7a93;
  --border: #dfe5ef;
  --navy: #07132e;
  --action: #1a62f0;
  --trail: #1a62f0;
  --trail-halo: #ffffff;
  --area: rgba(26, 98, 240, 0.14);
  --depart: #16a34a;
  --easy: #16a34a;
  --medium: #f59e0b;
  --hard: #ea580c;
  --very-hard: #ef4444;
  --ok: #16a34a;
  --ok-bg: #eef9f2;
  --ok-line: rgba(22, 163, 74, 0.35);
  --err: #ef4444;
  --err-bg: #fdf0f0;
  --err-line: rgba(239, 68, 68, 0.45);
  --todo-bg: #fff7e0;
  --todo-border: #f0c14b;
  --map: #e8edf4;
  --map-grid: rgba(11, 23, 48, 0.055);
  --max: 820px;
  --wide: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #050b1a;
    --surface: #0c1730;
    --soft: #12203f;
    --ink: #eef2fa;
    --ink-2: #b9c4d8;
    --muted: #8794ad;
    --border: #1c2a48;
    --action: #5b8def;
    --trail: #6f9cf5;
    --trail-halo: #050b1a;
    --area: rgba(111, 156, 245, 0.16);
    --ok-bg: rgba(22, 163, 74, 0.1);
    --ok-line: rgba(22, 163, 74, 0.4);
    --err-bg: rgba(239, 68, 68, 0.1);
    --err-line: rgba(239, 68, 68, 0.5);
    --todo-bg: #2a2410;
    --todo-border: #8a6d1d;
    --map: #0a1429;
    --map-grid: rgba(255, 255, 255, 0.045);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.65 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

a {
  color: var(--action);
}

a:hover {
  color: var(--ink);
}

.draft-banner {
  background: var(--todo-border);
  color: #1d1600;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 8px 16px;
}

/* --- Chrome -------------------------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 18px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-weight: 600;
  font-size: 15px;
}

.top nav a {
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.top nav a:hover {
  color: var(--ink);
}

.top .lang-link {
  font-weight: 700;
}

.top nav .cta-mini {
  color: #fff;
  background: var(--action);
  padding: 8px 14px;
  border-radius: 999px;
}

.top nav .cta-mini:hover {
  color: #fff;
  background: var(--ink);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* The hike page lays its own columns: the reading column, and a wider one for the map. */
main.hike-main {
  max-width: none;
  padding: 0 0 48px;
}

.w {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.w.wide {
  max-width: var(--wide);
}

.sec {
  margin-top: 44px;
}

.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crumbs a {
  color: var(--muted);
}

.kicker {
  margin: 0;
  color: var(--depart);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2,
.h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.h2-sub {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.lead {
  margin: 24px 0 0;
  font-size: 19px;
  color: var(--ink-2);
}

/* --- Head: difficulty, three numbers, chips ---------------------------------------------- */

.leg-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.leg-switch[hidden] {
  display: none;
}

.leg-switch button {
  font: 700 15px Manrope, system-ui, sans-serif;
  color: var(--ink-2);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
}

.leg-switch button[aria-pressed="true"] {
  color: #fff;
  background: var(--action);
}

.leg-switch button:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

.diffrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diff {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.diff-easy {
  background: var(--easy);
}

.diff-medium {
  background: var(--medium);
  color: #2b1d00;
}

.diff-hard {
  background: var(--hard);
}

.diff-veryHard {
  background: var(--very-hard);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  padding: 16px 0 14px;
  min-width: 0;
}

.stat + .stat {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.stat span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stat b {
  display: block;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat b small {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-left: 3px;
}

.sub {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
}

.sub span:not(:last-child)::after {
  content: "·";
  margin: 0 8px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.4;
}

/* Open the route in the app: for a phone that has it, so a computer with a mouse never sees it. */
.open-app-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 20px 0 0;
}

.open-app {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font: 700 15px Manrope, system-ui, sans-serif;
  text-decoration: none;
}

.open-app:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

.open-app-hint {
  font-size: 14px;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .open-app-row {
    display: none;
  }
}

/* --- Map and profile, one card -------------------------------------------------------------- */

.mp-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

/* MapLibre base map (randonnees-map.js) over the SVG fallback, revealed once it has loaded. */
.map {
  position: relative;
  aspect-ratio: 1080 / 560;
  background: var(--map);
}

.map-fallback {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--map-grid) 1px, transparent 1px), linear-gradient(90deg, var(--map-grid) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: 40px 40px;
}

.map-fallback svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.map-canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* MapLibre's own CSS makes its container `position: relative`, so it gets a wrapper. */
.map-gl {
  width: 100%;
  height: 100%;
}

.map-ready .map-canvas {
  opacity: 1;
  pointer-events: auto;
}

.map-ready .map-fallback {
  visibility: hidden;
}

.maplibregl-map {
  font: inherit;
}

.map-stop {
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.map-stop::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0b1730;
  box-sizing: border-box;
}

.map-stop.is-ilet::before {
  background: #0b1730;
  border-color: #fff;
}

.map-stop span,
.map-start span {
  font: 700 12px Manrope, system-ui, sans-serif;
  color: #0b1730;
  background: rgba(255, 255, 255, 0.88);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.map-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.map-start::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #16a34a;
  border: 3px solid #fff;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.map-start span {
  color: #16a34a;
}

/* The hover marker on the base map: the same dot as on the SVG trace. */
.map-cursor {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(26, 98, 240, 0.22);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.map-cursor::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1a62f0;
  box-sizing: border-box;
}

.trace .line {
  fill: none;
  stroke: var(--trail);
  stroke-width: 3.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.trace .line-halo {
  fill: none;
  stroke: var(--trail-halo);
  stroke-width: 8;
  stroke-linejoin: round;
}

.trace .stop circle {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 2;
}

.trace .stop-ilet circle {
  fill: var(--ink);
}

.trace text {
  font: 700 13px Manrope, system-ui, sans-serif;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--map);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.trace .start circle {
  fill: var(--depart);
  stroke: var(--surface);
  stroke-width: 3;
}

.trace .start text {
  fill: var(--depart);
}

.trace .scale line {
  stroke: var(--muted);
  stroke-width: 2;
}

.trace .scale text {
  font-size: 11px;
  fill: var(--muted);
}

/* `hidden` means nothing to an SVG group: said here. */
svg .cursor[hidden] {
  display: none;
}

.trace .cursor-halo {
  fill: var(--trail);
  opacity: 0.22;
}

.trace .cursor-dot {
  fill: var(--surface);
  stroke: var(--trail);
  stroke-width: 3;
}

.mp-prof {
  border-top: 1px solid var(--border);
  padding: 6px 4px 0;
}

.profile {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}

.profile .area {
  fill: var(--area);
}

.profile .line {
  fill: none;
  stroke: var(--trail);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.profile .grid {
  stroke: var(--border);
  stroke-dasharray: 3 4;
}

.profile .axis {
  font: 600 11px Manrope, system-ui, sans-serif;
  fill: var(--muted);
}

.profile .pstop line {
  stroke: var(--ink-2);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.7;
}

.profile .pstop text {
  font: 700 11px Manrope, system-ui, sans-serif;
  fill: var(--ink-2);
}

.profile .cursor-line {
  stroke: var(--ink);
  stroke-width: 1.2;
}

.profile .cursor-dot {
  fill: var(--surface);
  stroke: var(--trail);
  stroke-width: 2.5;
}

.profile .tip rect {
  fill: var(--ink);
}

.profile .tip text {
  font: 700 12px Manrope, system-ui, sans-serif;
  fill: var(--canvas);
}

.profile-narrow {
  display: none;
}

.mp-cap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 16px 12px;
}

/* --- Stops ---------------------------------------------------------------------------------- */

.steps {
  position: relative;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.steps::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 26px;
  bottom: 26px;
  width: 2px;
  background: var(--border);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 84px;
  align-items: center;
  gap: 0 14px;
  padding: 10px 8px;
  border-radius: 12px;
  scroll-margin-top: 16px;
}

.step.on,
.step:target {
  background: var(--soft);
}

.sdot {
  justify-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 4px var(--canvas);
}

.step.on .sdot,
.step:target .sdot {
  box-shadow: 0 0 0 4px var(--soft);
}

.sdot.parking {
  background: var(--depart);
  border-color: var(--depart);
}

.sdot.ilet {
  background: var(--ink);
}

.sdot.lieu-dit,
.sdot.cascade,
.sdot.belvedere,
.sdot.patrimoine {
  width: 10px;
  height: 10px;
}

.smain {
  display: grid;
  min-width: 0;
}

.sname {
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}

.smeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.smeta .lodg-sm {
  display: none;
}

.lodg {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--soft);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.step.on .lodg,
.step:target .lodg {
  background: var(--surface);
}

.salt {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- Photos --------------------------------------------------------------------------------- */

.gal {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: 200px;
  gap: 10px;
}

.ph {
  margin: 0;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
}

.ph:first-child {
  grid-row: span 2;
}

.ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph figcaption {
  position: relative;
  margin: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.ph figcaption small {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
}

.ph figcaption a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ph figcaption a:hover {
  color: var(--action);
}

/* The gallery shrinks with what it has: one wide picture, or a wide one and a few small. */
.gal:has(.ph:only-child) {
  grid-template-columns: minmax(0, 1fr);
}

.gal:has(.ph:nth-child(2):last-child) {
  grid-template-columns: 2fr 1fr;
}

.ph-open {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  position: absolute;
  inset: 0;
  cursor: zoom-in;
}

.ph-open:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: -3px;
}

/* --- Lightbox: one picture at a time, the arrows walk the gallery ---------------------------- */

.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: transparent;
  color: #eef2fa;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(5, 11, 26, 0.92);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
}

.lb-figure {
  grid-column: 2;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  height: 100vh;
  padding: 56px 0 24px;
  box-sizing: border-box;
}

.lb-figure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.lb-figure figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
}

.lb-title {
  display: block;
  font-weight: 800;
  color: #fff;
}

.lb-credit {
  display: block;
  font-size: 13px;
  color: #b9c4d8;
}

.lb-credit a {
  color: #b9c4d8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lb-credit a:hover {
  color: #fff;
}

.lb-nav,
.lb-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font: 400 30px/1 Manrope, system-ui, sans-serif;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lb-nav:hover,
.lb-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lb-nav:focus-visible,
.lb-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lb-prev {
  grid-column: 1;
  justify-self: center;
}

.lb-next {
  grid-column: 3;
  justify-self: center;
}

.lb-close {
  position: fixed;
  top: 14px;
  right: 14px;
}

.lb-counter {
  position: fixed;
  top: 24px;
  left: 20px;
  font-size: 14px;
  font-weight: 700;
  color: #b9c4d8;
  font-variant-numeric: tabular-nums;
}

/* The page behind the lightbox does not scroll. */
html.lb-open {
  overflow: hidden;
}

/* --- Trail status --------------------------------------------------------------------------- */

.cl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 14px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--ok-line);
  background: var(--ok-bg);
}

.cl > :not(i) {
  grid-column: 2;
}

.cl > i {
  grid-column: 1;
  grid-row: 1 / span 4;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ok);
  margin-top: 7px;
  box-shadow: 0 0 0 4px var(--ok-line);
}

.cl b {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.cl p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}

.cl .src {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
}

.cl .k {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cl.closed {
  border-color: var(--err-line);
  background: var(--err-bg);
}

.cl.closed > i {
  background: var(--err);
  box-shadow: 0 0 0 4px var(--err-line);
}

.cl.closed .k {
  color: var(--err);
}

.cl.near {
  border-color: var(--todo-border);
  background: var(--todo-bg);
}

.cl.near > i {
  background: var(--medium);
  box-shadow: 0 0 0 4px var(--todo-border);
}

/* --- Prose ---------------------------------------------------------------------------------- */

.prose {
  margin-top: 44px;
}

.prose h2 {
  margin: 40px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  max-width: 66ch;
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
}

.prose ul {
  padding-left: 22px;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.prose a.anc {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--action);
  text-underline-offset: 3px;
}

.prose a.anc:hover {
  color: var(--action);
}

.leg-text h3 {
  margin: 20px 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.todo {
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--todo-bg);
  border: 1px dashed var(--todo-border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink);
}

.todo b {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

mark.verify {
  background: var(--todo-bg);
  color: var(--ink);
  border-bottom: 2px dotted var(--todo-border);
  padding: 0 4px;
  font-size: 0.8em;
  font-weight: 700;
  border-radius: 3px;
  white-space: nowrap;
}

/* --- Download block, the one strong call of the page ---------------------------------------- */

.app-cta {
  margin: 24px 0 0;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(158deg, #07132e 0%, #0f2a63 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef2fa;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 28px;
}

.app-cta h2,
.app-cta h3 {
  grid-column: 1;
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  letter-spacing: 0;
}

.app-cta p {
  grid-column: 1;
  margin: 0;
  font-size: 15px;
  color: #b9c4d8;
}

.app-cta .stores {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.prose .app-cta {
  margin-top: 20px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.stores img {
  display: block;
  height: 48px;
  width: auto;
}

/* Google's PNG ships with its own transparent margin, Apple's SVG has none: the Play badge is
   drawn taller and pulled in so the two read the same size (same ratio as landing.css). */
.stores .store-play img {
  height: 62px;
  margin: -7px 0;
}

/* --- FAQ ------------------------------------------------------------------------------------ */

.faq {
  margin-top: 12px;
  display: grid;
}

.faq details {
  border-top: 1px solid var(--border);
}

.faq details:last-child {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 2px;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0;
  padding: 0 2px 18px;
  color: var(--ink-2);
  max-width: 66ch;
  font-size: 16px;
}

/* --- Cards: other hikes, the hub ------------------------------------------------------------ */

.hub .lead {
  margin: 0 0 8px;
}

.hub h2 {
  margin: 36px 0 0;
  font-size: 22px;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s;
}

.card a:hover {
  border-color: var(--action);
  color: var(--ink);
}

.card-title {
  font-weight: 800;
  line-height: 1.3;
}

.card-facts {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
}

.card-facts span:not(:last-child)::after {
  content: "·";
  margin: 0 6px;
}

.card-d {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.card-d i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-easy {
  background: var(--easy);
}

.dot-medium {
  background: var(--medium);
}

.dot-hard {
  background: var(--hard);
}

.dot-veryHard {
  background: var(--very-hard);
}

/* --- Footer --------------------------------------------------------------------------------- */

.bottom {
  max-width: var(--max);
  margin: 32px auto 0;
  padding: 20px 20px 40px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.bottom a {
  color: var(--ink-2);
}

.bottom .fine {
  font-size: 13px;
}

/* --- Phones --------------------------------------------------------------------------------- */

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .top {
    padding: 14px 16px;
  }

  .top nav {
    gap: 6px 14px;
    font-size: 14px;
  }

  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  main.hike-main {
    padding-left: 0;
    padding-right: 0;
  }

  .w {
    padding: 0 16px;
  }

  .crumbs {
    margin: 4px 0 16px;
    font-size: 13px;
  }

  .stat {
    padding: 12px 0 10px;
  }

  .stat + .stat {
    padding-left: 12px;
  }

  .stat b {
    font-size: 27px;
  }

  .stat b small {
    font-size: 15px;
    margin-left: 2px;
  }

  .stat span {
    font-size: 12px;
  }

  .sub {
    font-size: 14px;
  }

  .lead {
    font-size: 17px;
    margin-top: 20px;
  }

  .sec,
  .prose {
    margin-top: 36px;
  }

  h2,
  .h2 {
    font-size: 22px;
  }

  .mp {
    padding: 0;
  }

  .mp .h2,
  .mp .h2-sub {
    padding: 0 16px;
  }

  .mp-card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .map {
    aspect-ratio: 390 / 430;
  }

  .profile-wide {
    display: none;
  }

  .profile-narrow {
    display: block;
  }

  .step {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 10px 6px;
  }

  .step > .lodg,
  .step > .lodg-x {
    display: none;
  }

  .smeta .lodg-sm {
    display: inline;
  }

  .gal {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px 6px;
    scroll-padding: 16px;
  }

  .ph {
    flex: none;
    width: 270px;
    height: 200px;
    scroll-snap-align: start;
  }

  .ph:first-child {
    width: 300px;
  }

  .lightbox[open] {
    grid-template-columns: minmax(0, 1fr);
  }

  .lb-figure {
    grid-column: 1;
    padding: 64px 12px 72px;
  }

  .lb-nav {
    position: fixed;
    bottom: 16px;
  }

  .lb-prev {
    left: 16px;
  }

  .lb-next {
    right: 16px;
  }

  .cl {
    padding: 16px;
  }

  .prose p,
  .prose li {
    font-size: 17px;
  }

  .app-cta {
    padding: 20px;
    grid-template-columns: minmax(0, 1fr);
  }

  .app-cta .stores {
    grid-column: 1;
    grid-row: auto;
    margin-top: 14px;
  }

  .stores img {
    height: 44px;
  }

  .stores .store-play img {
    height: 57px;
    margin: -6.5px 0;
  }

  .faq summary {
    font-size: 16px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
