/* Shared styles for TMB supporting pages (refuges, stages, guide).
   The palette is the planner's own :root, copied across so the site and the app it advertises
   look like the same product — see tools/recolour.js for the GR20→TMB mapping. */
:root{
  --accent:#1f5f8b; --accent2:#d08a2c; --ink:#1e2430; --muted:#5f6b7a;
  --bg:#f2f4f7; --panel:#fff; --line:#d6dde6; --warn:#b3261e;
}
*{box-sizing:border-box}
body{margin:0;font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg)}
a{color:var(--accent)}
.pg-nav{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);z-index:50}
.pg-nav-inner{max-width:960px;margin:0 auto;display:flex;align-items:center;gap:18px;padding:10px 16px;flex-wrap:wrap}
.pg-nav a{text-decoration:none;color:var(--ink);font-weight:600;font-size:14px}
.pg-nav a.brand{display:flex;align-items:center;gap:8px;font-size:15px}
.pg-nav a.brand img{width:26px;height:26px;border-radius:6px}
.pg-nav a.pg-lang{margin-left:auto;border:1px solid var(--line);padding:5px 11px;border-radius:999px;font-size:13px;font-weight:700;letter-spacing:.03em;color:var(--muted)}
.pg-nav a.pg-lang:hover{color:var(--ink);border-color:var(--muted)}
.pg-nav a.cta{background:var(--accent);color:#fff;padding:8px 16px;border-radius:999px}
.pg-wrap{max-width:960px;margin:0 auto;padding:24px 16px 60px}
.crumbs{font-size:13px;color:var(--muted);margin:0 0 18px}
.crumbs a{color:var(--muted)}
h1{font-size:30px;line-height:1.2;margin:0 0 8px}
.lead{font-size:18px;color:var(--muted);margin:0 0 24px}
h2{font-size:21px;margin:34px 0 10px}
.facts{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}
.fact{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 16px;text-align:center;min-width:104px}
.fact b{display:block;font-size:20px;color:var(--accent)}
.fact span{font-size:12px;color:var(--muted)}
table.data{border-collapse:collapse;width:100%;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;font-size:14.5px}
table.data th,table.data td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--line)}
table.data th{background:#f7f9fb;font-size:12px;text-transform:uppercase;letter-spacing:.4px;color:var(--muted)}
table.data tr:last-child td{border-bottom:0}
.card-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin:18px 0}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;text-decoration:none;color:var(--ink);display:block}
.card:hover{border-color:var(--accent)}
.card .c-name{font-weight:700;margin:0 0 4px}
.card .c-meta{font-size:13px;color:var(--muted)}
.cta-block{background:linear-gradient(135deg,#1f5f8b,#2c7cb0);color:#fff;border-radius:14px;padding:24px;margin:36px 0;text-align:center}
.cta-block h2{margin:0 0 6px;color:#fff}
.cta-block p{margin:0 0 16px;color:#e4eef6}
.cta-block a{display:inline-block;background:#fff;color:var(--accent);font-weight:700;text-decoration:none;padding:12px 26px;border-radius:999px}
.prevnext{display:flex;justify-content:space-between;gap:12px;margin:30px 0 0}
.prevnext a{flex:1;background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 14px;text-decoration:none;color:var(--ink);font-size:14px}
.prevnext a small{display:block;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.4px}
.badges{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 0}
.badge{font-size:12.5px;background:#e6eff6;color:var(--accent);border-radius:999px;padding:4px 12px}
.badge.warn{background:#fbeaea;color:var(--warn)}
.note-box{background:#fff;border-left:4px solid var(--accent);border-radius:0 10px 10px 0;padding:14px 16px;margin:18px 0}
.pg-footer{border-top:1px solid var(--line);margin-top:48px;background:#f7f9fb}
.pg-footer-inner{max-width:960px;margin:0 auto;padding:34px 16px 26px;font-size:13.5px;color:var(--muted)}
.pg-footer-inner a{color:var(--muted);text-decoration:none}
.pg-footer-inner a:hover{color:var(--ink);text-decoration:underline}
.pg-foot-cols{display:flex;gap:40px;flex-wrap:wrap}
.pg-foot-col{display:flex;flex-direction:column;gap:7px;min-width:150px}
.pg-foot-col h3{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--ink);opacity:.55;margin:0 0 4px}
.pg-foot-base{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:26px;padding-top:18px;border-top:1px solid var(--line)}
.pg-foot-base .brand{display:flex;align-items:center;gap:8px;font-weight:600;color:var(--ink)}
.pg-foot-base .brand img{width:24px;height:24px;border-radius:6px}
@media(max-width:600px){.pg-foot-cols{gap:26px}.pg-foot-col{min-width:44%}}
@media(max-width:600px){h1{font-size:24px}.pg-nav-inner{gap:12px}}

/* Hero photos on refuge pages (Wikimedia Commons, hotlinked) */
.hero-photo{margin:18px 0}
.hero-photo img{width:100%;height:auto;border-radius:12px;display:block}
.hero-photo figcaption{font-size:12px;color:#5f6b7a;margin-top:6px}

/* numbered altitude profile on the refuges hub */
.refuge-profile{margin:22px 0 8px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 14px 6px}
.refuge-profile svg{width:100%;height:auto;display:block;overflow:visible}
.refuge-profile figcaption{font-size:12.5px;color:var(--muted);margin:8px 2px 4px;line-height:1.5}
.card h3{display:flex;align-items:center;gap:8px;margin:0 0 4px;font-size:16px}
.card-n{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.profile-legend{display:flex;flex-wrap:wrap;gap:12px;margin:10px 2px 2px;font-size:12.5px;color:var(--muted)}
.profile-legend span{display:inline-flex;align-items:center;gap:5px}
.profile-legend i{width:10px;height:10px;border-radius:50%;display:inline-block}
.alt-list{list-style:none;padding:0;margin:8px 0 6px;display:grid;gap:12px}
.alt-list li{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;line-height:1.5}
.alt-list .alt-type{display:inline-block;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--accent);background:#eaf2f8;border-radius:20px;padding:2px 9px;margin-left:4px;vertical-align:middle}
.alt-note{font-size:12.5px;color:var(--muted);font-style:italic;margin:6px 2px 0}

/* ---------- testimonials (shared block, tools/testimonials.js) ---------- */
/* ---------- endorsement stream ----------
   A seamless horizontal loop, same markup and geometry as randonav.app. The track holds the
   quotes twice and translates by exactly -50%, so the duplicate arrives where the original began
   at the moment the animation resets. Duration comes from --stream-duration, set per page from
   the card count, so adding a quote lengthens the loop instead of speeding it up.

   Pauses on hover and on keyboard focus, and prefers-reduced-motion drops it to a plain
   scrollable row — an animation nobody can stop is an accessibility problem. */
.stream{margin:56px 0 8px;overflow:hidden}
.stream h2{font-size:clamp(22px,3vw,28px);margin:0 0 24px}

.stream-viewport{position:relative;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}

/* Spacing is a per-card margin, not a flex gap: n cards have n-1 gaps, so a gap makes one full
   period 20px shorter than half the track and the loop jumps by that much every cycle. No
   horizontal padding on the track either — translateX(-50%) resolves against the border box. */
.stream-track{display:flex;width:max-content;padding:4px 0;
  animation:stream-slide var(--stream-duration,40s) linear infinite}
.stream-track:hover,.stream-track:focus-within{animation-play-state:paused}
@keyframes stream-slide{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}

.tq{flex:0 0 320px;margin:0 20px 0 0;background:var(--panel-alt,#f5f7f9);border-radius:15px;padding:24px 22px 20px;
  display:flex;flex-direction:column}
.tq blockquote{margin:0 0 14px;font-size:16.5px;line-height:1.6;position:relative;flex:1}
.tq blockquote::before{content:"\201C";position:absolute;left:-4px;top:-18px;
  font-size:48px;line-height:1;color:var(--line,#dde5ec)}
.tq figcaption{font-size:13.5px;font-weight:700}
.tq figcaption span{display:block;font-weight:400;color:var(--muted,#5b6b7c);margin-top:2px}

/* too few cards to loop convincingly — centre them and stand still */
.stream-static .stream-viewport{-webkit-mask-image:none;mask-image:none}
.stream-static .stream-track{animation:none;width:auto;flex-wrap:wrap;justify-content:center;gap:20px}
.stream-static .tq{flex:1 1 280px;max-width:360px;margin:0}

@media(prefers-reduced-motion:reduce){
  .stream-track{animation:none;overflow-x:auto;scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch}
  .stream-track>[aria-hidden="true"]{display:none}
  .tq{scroll-snap-align:start}
  .stream-viewport{-webkit-mask-image:none;mask-image:none}
}
