/* ================================================================
   ATLAS.CSS - "Water Atlas" design. Loaded last on every public page,
   on top of riverina.css / ptsa.css / trail.css, which keep the base layout.
   Brand colours unchanged; new type: Archivo (display), Archivo Narrow
   (labels, small headings), Source Sans 3 (text), IBM Plex Mono (data).
   ================================================================ */
:root {
  --f-disp: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --f-head: 'Archivo Narrow', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --f-label: 'Archivo Narrow', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --deep: #002f3e;
  --sea: #003E51;
  --route: #e8630a;
  --wrap: 1280px;
  --gut: clamp(16px, 3.5vw, 40px);
}
body { font-family: var(--f-body); font-size: 16px; background: #fff; }
.atl-wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gut), env(safe-area-inset-left, 0px)); padding-right: max(var(--gut), env(safe-area-inset-right, 0px)); }

/* Big condensed display type */
.atl-h1, .atl-sech h2, .chap h3, .feat-card h3, .trail-hero-h1, .tg-hero .trail-hero-h1,
.gallery-section-head h2, .nearby-header h2, .search-hero h1, .page-hero .trail-hero-h1, .notfound h1 {
  font-family: var(--f-disp); font-stretch: 66%; font-weight: 800; text-transform: uppercase; letter-spacing: -0.005em; line-height: 0.9;
}
.gallery-section-head h2 span, .nearby-header h2 span { color: inherit; font-style: normal; }

/* ---------------- Header ---------------- */
.util-bar { background: var(--deep); height: 32px; }
.util-bar-inner { height: 32px; }
.util-bar a { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); }
.util-bar a:hover { color: #fff; }
.main-nav { background: var(--sea); border-bottom: 0; box-shadow: none; color: #fff; top: env(safe-area-inset-top, 0px); }
.nav-inner { max-width: var(--wrap); height: 66px; padding: 0 var(--gut); }
.nav-logo { color: #fff; gap: 0.7rem; }
.site-mark { color: #fff; flex: 0 0 auto; }
.logo-name { font-family: var(--f-disp); font-stretch: 78%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.02rem; color: #fff; -webkit-text-stroke: 0; }
.logo-tagline { font-family: var(--f-mono); font-weight: 400; font-size: 0.56rem; letter-spacing: 0.2em; color: var(--water-3); margin-top: 4px; }
.nav-trigger { font-family: var(--f-label); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: rgba(255,255,255,0.86); border-top-width: 3px; border-bottom-width: 3px; }
.nav-trigger:hover, .nav-item.open .nav-trigger { color: #fff; border-bottom-color: var(--water-3); }
.nav-trigger.active { color: #fff; border-bottom-color: var(--region-colour); }
.nav-trigger .rdot { width: 9px; height: 9px; box-shadow: 0 0 0 2px rgba(255,255,255,0.25); }
.nav-cta { background: transparent; border: 1.5px solid rgba(255,255,255,0.55); color: #fff; border-radius: 99px; font-family: var(--f-label); font-weight: 600; letter-spacing: 0.04em; text-transform: none; font-size: 0.92rem; padding: 0.45rem 1rem; white-space: nowrap; }
.nav-cta:hover { background: #fff; color: var(--sea); }

/* Breadcrumbs (Safety, Info, Search pages) */
.breadcrumb { background: var(--sea); border-bottom: 0; padding: 0.6rem var(--gut) 0; }
.breadcrumb-inner { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .current { color: rgba(255,255,255,0.55); }
.breadcrumb .sep { color: rgba(255,255,255,0.35); }

/* ---------------- Atlas banner (Home and regions) ---------------- */
.atlas-hero { background: var(--sea); color: #fff; position: relative; overflow: hidden; }
.atl-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: clamp(16px, 3vw, 40px); align-items: start; padding-top: clamp(18px, 3vw, 34px); padding-bottom: clamp(28px, 4vw, 48px); }
.atl-eyebrow, .atl-count { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--water-3); }
.atl-count { margin-top: 1.4rem; }
.atl-h1 { font-size: clamp(2.8rem, 6.2vw, 5.6rem); margin: 0.75rem 0 1.1rem; color: #fff; text-wrap: balance; }
.atl-h1 span { display: block; color: var(--water-3); }
.atl-lede { font-size: 1.15rem; line-height: 1.55; color: rgba(255,255,255,0.84); max-width: 42ch; }
.atl-crumb { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 0.9rem; }
.atl-crumb a { color: rgba(255,255,255,0.8); text-decoration: none; }
.atl-crumb a:hover { color: #fff; }
.atl-all { display: inline-block; margin-top: 1.2rem; color: #fff; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--water-3); padding-bottom: 2px; }
.atl-all:hover { border-color: #fff; }

.atl-regions { margin-top: 0.8rem; border-top: 1px solid rgba(255,255,255,0.18); }
.atl-row { border-bottom: 1px solid rgba(255,255,255,0.18); }
.atl-rbtn { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 18px; gap: 14px; align-items: center; padding: 12px 0; }
.atl-rbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.atl-rbtn i { width: 14px; height: 14px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }
.atl-rbtn b { font-family: var(--f-disp); font-stretch: 72%; font-weight: 800; text-transform: uppercase; font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1; }
.atl-rbtn span { font-family: var(--f-mono); font-size: 0.78rem; color: rgba(255,255,255,0.7); white-space: nowrap; }
.atl-rbtn em { font-style: normal; opacity: 0.7; transition: transform 0.3s; font-size: 1.2rem; }
.atl-rbtn:hover b { color: var(--water-3); }
.atl-row.on .atl-rbtn em { transform: rotate(90deg); }
.atl-row.on .atl-rbtn b { color: #fff; text-decoration: underline; text-decoration-color: var(--rc); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.atl-rx { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s ease; }
.atl-row.on .atl-rx { grid-template-rows: 1fr; }
.atl-rx > div { overflow: hidden; }
.atl-rin { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 2px 0 16px; }
.atl-rimg { display: block; aspect-ratio: 1; border-radius: 10px; background-size: cover; background-position: center; background-color: rgba(255,255,255,0.1); }
.atl-rin p { font-size: 0.98rem; color: rgba(255,255,255,0.88); }
.atl-rin ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 0.86rem; }
.atl-rin li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 0 1.5px rgba(255,255,255,0.6); margin-right: 6px; vertical-align: middle; }
.atl-rin li a { color: rgba(255,255,255,0.75); text-decoration: none; }
.atl-rin li a:hover { color: #fff; text-decoration: underline; }
.atl-rin li.more { color: rgba(255,255,255,0.55); }
.atl-go { display: inline-block; margin-top: 10px; font-weight: 700; color: #fff; text-decoration: none; border-bottom: 2px solid var(--rc); }

/* The map itself */
.atlas-map { position: relative; border-radius: 16px; overflow: hidden; background: var(--deep); aspect-ratio: 1084 / 1210; max-width: 100%; }
.atlas-map.atl-region { aspect-ratio: 5 / 4; }
.atlas-map svg { display: block; width: 100%; height: 100%; }
.atl-tick { font-family: var(--f-mono); font-size: 16px; fill: #003E51; fill-opacity: 0.45; }
.atl-name, .atl-sea, .atl-river { font-family: var(--f-body); font-style: italic; font-size: 19px; }
.atl-name { fill: #003E51; fill-opacity: 0.55; }
.atl-sea { fill: #89B2C4; fill-opacity: 0.9; }
.atl-sea.big { font-size: 24px; letter-spacing: 3px; fill-opacity: 0.7; }
.atl-river { fill: #4986A0; }
.atl-ticks, .atl-labels, .atl-routes, .atl-towns { transition: opacity 0.45s; }
.atl-town { font-family: var(--f-body); font-size: 12.5px; font-weight: 600; fill: #36474c; stroke: #f0ebe3; stroke-width: 3px; paint-order: stroke; }
.atl-town.cap { font-size: 14px; font-weight: 700; fill: #003E51; }
.atl-labt { font-family: var(--f-disp); font-stretch: 80%; font-weight: 800; font-size: 14px; letter-spacing: 0.8px; }
.atl-lab { cursor: pointer; }
.atl-lab:focus { outline: none; }
.atl-lab:focus-visible rect { stroke-width: 3px; }
.atl-dot { cursor: pointer; transition: opacity 0.3s; }
.atl-dot:focus { outline: none; }
.atl-dot:focus-visible circle:last-of-type, .atl-dot.atl-hover circle:last-of-type { stroke: #e8630a; stroke-width: 3px; }
.atl-num { font-family: var(--f-mono); font-weight: 500; fill: #fff; pointer-events: none; }
.atl-zoomed .atl-dot:not(.atl-on) { opacity: 0.25; }
.atl-pulse { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .atl-pulse { animation: atlPulse 3.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes atlPulse { 0% { opacity: 0.55; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(3.2); } }
}
.atl-compass { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; pointer-events: none; }
.atl-ui { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; pointer-events: none; }
.atl-ui > * { pointer-events: auto; }
.atl-scale { font-family: var(--f-mono); font-size: 11px; color: #fff; display: grid; gap: 3px; background: rgba(0,47,62,0.78); padding: 5px 9px 7px; border-radius: 6px; }
.atl-scale i { display: block; height: 6px; border: 1.5px solid #fff; border-top: 0; width: 80px; }
.atl-back { all: unset; cursor: pointer; background: #fff; color: var(--sea); font-weight: 700; font-size: 0.85rem; padding: 7px 14px; border-radius: 99px; box-shadow: 0 4px 14px -6px rgba(0,0,0,0.5); }
.atl-back:focus-visible { outline: 2px solid var(--water-3); outline-offset: 2px; }
.atl-back[hidden] { display: none !important; }
.atl-tip { position: absolute; z-index: 6; pointer-events: none; background: #fff; color: var(--ink); font-size: 0.85rem; font-weight: 600; padding: 5px 10px; border-radius: 6px; box-shadow: 0 6px 18px -8px rgba(0,0,0,0.5); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.atl-tip small { display: block; font-weight: 400; color: var(--muted); font-size: 0.74rem; }
.atl-tip[hidden] { display: none; }

/* ---------------- Sections under the banner ---------------- */
.atl-sec { padding: clamp(40px, 6vw, 80px) 0; }
.atl-sech { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 28px; margin-bottom: 24px; flex-wrap: wrap; }
.atl-sech h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--sea); }
.atl-sech p { max-width: 46ch; color: #3b4b50; font-size: 1.05rem; }
.atl-link { font-weight: 700; color: var(--sea); text-decoration: none; border-bottom: 2px solid var(--water-3); }
.atl-dark { background: var(--sea); color: #fff; }
.atl-dark .atl-sech h2 { color: #fff; }
.atl-dark .atl-link { color: #fff; }

/* Region chapters */
.chap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border-radius: 16px; overflow: hidden; background: var(--paper); margin-bottom: 14px; }
.chap:nth-child(odd of .chap) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.chap:nth-child(odd of .chap) .chap-img { order: 2; }
.chap-img { display: block; min-height: 300px; background-size: cover; background-position: center; background-color: var(--rc); }
.chap-tx { padding: clamp(20px, 3.5vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px 22px; align-content: center; }
.chap-eb { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.chap-eb::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--rc); }
.chap h3 { grid-column: 1; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.chap h3 a { color: var(--sea); text-decoration: none; }
.chap p { grid-column: 1; color: #2f3f44; font-size: 1.05rem; }
.chap .atlas-loc { grid-column: 2; grid-row: 2 / 4; align-self: start; }
.chap-go { grid-column: 1 / -1; justify-self: start; font-weight: 700; color: var(--sea); text-decoration: none; border-bottom: 2px solid var(--rc); margin-top: 6px; }

/* Featured trails */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.feat-card { position: relative; border-radius: 14px; overflow: hidden; min-height: 380px; display: flex; align-items: flex-end; color: #fff; text-decoration: none; }
.feat-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.6s ease; }
.feat-card:hover .feat-img { transform: scale(1.04); }
.feat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,25,35,0.9)); }
.feat-tx { position: relative; z-index: 2; padding: 18px; }
.feat-k { display: inline-block; background: var(--rc); font-family: var(--f-mono); font-size: 0.7rem; padding: 2px 9px; border-radius: 99px; margin-bottom: 8px; }
.feat-card h3 { font-size: 2rem; }
.feat-f { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-family: var(--f-mono); font-size: 0.78rem; opacity: 0.88; }

/* Plan your paddle */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.plan-item { border-top: 4px solid var(--water-2); padding-top: 14px; }
.plan-item:nth-child(4n+2) { border-color: var(--foliage-2); }
.plan-item:nth-child(4n+3) { border-color: var(--earth-2); }
.plan-item:nth-child(4n+4) { border-color: var(--water-3); }
.plan-ic { font-size: 1.6rem; margin-bottom: 6px; }
.plan-item h3 { font-family: var(--f-disp); font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: 1.35rem; color: var(--sea); line-height: 1; }
.plan-item p { color: #3b4b50; margin-top: 6px; }

/* Partners */
.partners-section { background: var(--paper); }
.partners-header h2 { font-family: var(--f-disp); font-stretch: 66%; font-weight: 800; text-transform: uppercase; color: var(--sea); }
.partners-header h2 span { color: inherit; font-style: normal; }
.partners-eyebrow { font-family: var(--f-mono); letter-spacing: 0.16em; }

/* ---------------- Cards (regions, search, more trails) ---------------- */
.tc { border-radius: 14px; border: 0; box-shadow: none; background: var(--paper); transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.tc:hover, .tc.atl-hot { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(0,62,81,0.6); background: var(--water-pale); }
.tc-img { height: 200px; }
.tc-name { font-family: var(--f-disp); font-stretch: 78%; font-weight: 800; text-transform: uppercase; font-size: 1.3rem; line-height: 1; color: var(--sea); }
.tc-meta span { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 400; letter-spacing: 0; background: #fff; }
.tc-desc { font-size: 0.95rem; }
.tc-footer { border-top: 0; padding-top: 0; }
.tc-map-link { font-family: var(--f-label); text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--sea); border-bottom: 2px solid var(--region-colour); }
.tc-region-chip, .tc-diff, .tc-duration { font-family: var(--f-mono); letter-spacing: 0.04em; border-radius: 99px; }
.tc-num { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-family: var(--f-mono); font-weight: 500; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3); z-index: 2; }
.trails-grid { max-width: none; padding: 0; }
.filter-bar { background: none; border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: static; }
.filter-btn { font-family: var(--f-label); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 0.92rem; border-radius: 99px; }
.trail-count-label { font-family: var(--f-mono); font-size: 0.75rem; color: var(--muted); margin-left: 6px; }

/* ---------------- Region page ---------------- */
.rg-h1 span { color: var(--rc); filter: brightness(1.35) saturate(0.9); }
.rg-stats { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 1.3rem 0 0; }
.rg-stat { display: flex; gap: 8px; align-items: center; }
.rg-stat dt { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--water-3); }
.rg-stat dd { margin: 0; font-weight: 600; }
.rg-intro { padding: clamp(36px, 5vw, 64px) 0 0; }
.rg-intro-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.rg-photo { aspect-ratio: 21 / 9; border-radius: 16px; background-size: cover; background-position: center; margin-bottom: 26px; }
.region-intro-text p { font-size: 1.12rem; line-height: 1.7; color: #22343a; }
.region-intro-text p:first-child { font-size: 1.3rem; line-height: 1.5; color: var(--sea); }
.region-warning { border-radius: 12px; }
.rg-intro-side { display: grid; gap: 16px; }
.region-info-card { border-radius: 14px; border: 0; background: var(--paper); box-shadow: none; overflow: hidden; }
.region-info-head { background: var(--sea); box-shadow: none; font-family: var(--f-mono); letter-spacing: 0.14em; font-size: 0.72rem; }
.region-info-body { display: block; padding: 4px 16px; }
.region-info-body .ri-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; padding: 10px 0; border-right: 0; border-bottom: 1px solid var(--border); text-align: left; }
.region-info-body .ri-row:last-child { border-bottom: 0; }
.ri-icon { grid-row: 1 / 3; }
.ri-label { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sea); }
.ri-detail { font-size: 0.95rem; color: #3b4b50; }
.paddlesa-box { border-radius: 14px; overflow: hidden; }
.rg-trails .atl-sech { align-items: center; }
.rg-leaflet { padding-top: 0; }
.rg-leaflet .region-map { height: 460px; border-radius: 16px; }
.map-layer-btn, .map-btn { border-radius: 99px; font-family: var(--f-label); }

/* ---------------- Trail page ---------------- */
.tg-hero { height: auto; min-height: clamp(460px, 62vh, 640px); justify-content: flex-end; }
.tg-hero .hero-slides, .tg-hero .trail-hero-video-wrap { position: absolute; inset: 0; background-size: cover; background-position: center; }
.tg-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,30,40,0.5) 0%, rgba(0,30,40,0) 28%, rgba(0,30,40,0.12) 52%, rgba(0,40,52,0.9) 100%); }
.tg-content { position: relative; z-index: 2; max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 22px var(--gut) 28px; }
.tg-crumb { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 14px; }
.tg-crumb a { color: rgba(255,255,255,0.9); text-decoration: none; }
.tg-hero .trail-region-chip { font-family: var(--f-mono); font-weight: 500; letter-spacing: 0.12em; border-radius: 99px; text-decoration: none; opacity: 1; animation: none; margin-bottom: 0.6rem; }
.tg-hero .trail-hero-h1 { font-size: clamp(2.8rem, 8.4vw, 7rem); max-width: none; text-shadow: 0 2px 22px rgba(0,0,0,0.35); opacity: 1; animation: none; text-wrap: balance; }
.tg-hero .trail-hero-sub { font-family: var(--f-body); font-style: normal; font-size: 1.15rem; line-height: 1.45; margin-top: 0.6rem; max-width: 60ch; color: rgba(255,255,255,0.9); opacity: 1; animation: none; }
.tg-coords { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: rgba(255,255,255,0.8); margin-top: 10px; }
.tg-stats { margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: rgba(0,30,40,0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.18); border-radius: 12px; overflow: hidden; }
.tg-stat { padding: 12px 16px; border-right: 1px solid rgba(255,255,255,0.15); }
.tg-stat:last-child { border-right: 0; }
.tg-stat dt { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.72); }
.tg-stat dd { margin: 3px 0 0; font-family: var(--f-disp); font-stretch: 72%; font-weight: 800; text-transform: uppercase; font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1; color: #fff; }
.tg-stat dd em { font-style: normal; font-size: 0.65em; opacity: 0.8; }
.tg-stat dd.diff-easy { color: #b9e3a8; } .tg-stat dd.diff-moderate { color: #ffd08a; } .tg-stat dd.diff-hard { color: #ffb3a6; }
.trail-body { max-width: var(--wrap); padding: clamp(32px, 5vw, 56px) var(--gut); gap: clamp(24px, 4vw, 56px); }
.trail-intro, .trail-intro p { font-family: var(--f-body); font-size: 1.3rem; line-height: 1.5; color: var(--sea); font-style: normal; border: 0; padding: 0; }
.trail-section h2 { font-family: var(--f-disp); font-stretch: 70%; font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 0.95; color: var(--sea); border: 0; }
.trail-section h3, .route-h { font-family: var(--f-disp); font-stretch: 80%; font-weight: 800; text-transform: uppercase; color: var(--sea); }
.trail-section p { font-size: 1.04rem; line-height: 1.75; }
.launch-table th { font-family: var(--f-mono); font-weight: 500; letter-spacing: 0.1em; background: var(--sea); color: #fff; }
.launch-table { border-radius: 12px; overflow: hidden; }
.route-step { border-left-color: var(--route); }
.route-step-label { font-family: var(--f-disp); font-stretch: 85%; font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--sea); }
.trail-map { border-radius: 14px; }
.sidebar-card { border-radius: 14px; border: 0; background: var(--paper); box-shadow: none; }
.sidebar-card-head { background: var(--sea); font-family: var(--f-mono); font-weight: 500; letter-spacing: 0.14em; font-size: 0.7rem; }
.qf-label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; }
.qf-value { font-weight: 600; }
.btn-primary, .btn-secondary { border-radius: 99px; font-family: var(--f-label); text-transform: none; letter-spacing: 0.01em; font-weight: 700; }
.tg-where-body { padding: 14px 16px 16px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.tg-where-body .atlas-loc { grid-row: 1 / 3; }
.tg-where-body p { font-size: 0.95rem; line-height: 1.4; margin: 0; }
.tg-dir { font-weight: 700; color: var(--sea); text-decoration: none; border-bottom: 2px solid var(--route); justify-self: start; }
.emergency-card { border-top: 0; background: #fff; border: 2px solid var(--earth-1); }
.emg-head { background: var(--earth-1); font-family: var(--f-mono); letter-spacing: 0.12em; }
.emg-badge { background: var(--sea); font-family: var(--f-mono); }
.emg-badge.red { background: #b3261e; }
.emg-foot button { border-radius: 99px; }
.gallery-section-head { max-width: var(--wrap); margin: 0 auto 1.5rem; padding: 0 var(--gut); }
.gallery-section-head h2 { font-size: clamp(2rem, 4vw, 3rem); color: var(--sea); }
.gallery-count { font-family: var(--f-mono); }
.gallery-masonry { max-width: var(--wrap); padding: 0 var(--gut); }
.gallery-item, .gallery-item img { border-radius: 10px; }
.nearby-section { background: var(--sea); padding: clamp(40px, 6vw, 72px) var(--gut); border: 0; }
.nearby-inner { max-width: var(--wrap); }
.nearby-header h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); }
.nearby-header .view-all { color: #fff; font-weight: 700; border-bottom: 2px solid var(--water-3); text-decoration: none; }
#trail-alert-banner { font-family: var(--f-body); }
#trail-alert-banner .trail-alert-status { font-family: var(--f-disp); font-stretch: 85%; font-weight: 800; }

/* ---------------- Safety / Info / Search pages ---------------- */
.page-hero { min-height: 300px; height: auto; display: flex; flex-direction: column; justify-content: flex-end; }
.page-hero .trail-hero-h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); opacity: 1; animation: none; }
.page-hero .trail-hero-sub { font-family: var(--f-body); font-style: normal; opacity: 1; animation: none; }
.page-hero .trail-hero-content { max-width: var(--wrap); width: 100%; margin: 0 auto; padding-left: var(--gut) !important; padding-right: var(--gut) !important; }
.search-hero { background: var(--sea); }
.search-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.search-box input { border-radius: 99px; font-family: var(--f-body); }
.page-search .filter-bar { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gut) 0; display: grid; gap: 10px; }
.page-search .filter-bar-inner { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0; }
.filter-label { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.14em; }
.page-search .trails-grid-section, .page-search .region-map-section { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--sea); }

/* ---------------- Footer ---------------- */
.ft-band { background: var(--paper); font-family: var(--f-body); border-top: 0; }
.band-card h3 { font-family: var(--f-disp); font-stretch: 72%; font-weight: 800; text-transform: uppercase; font-size: 1.9rem; color: var(--sea); }
.band-card .band-ic { color: var(--sea); }
.band-btn { border: 2px solid var(--sea); border-radius: 99px; color: var(--sea); font-weight: 700; background: transparent; }
.band-btn:hover { background: var(--sea); color: #fff; }
.share-btn { border-radius: 99px; }
footer.ft-about { font-family: var(--f-body); }
.ft-about h2 { font-family: var(--f-disp); font-stretch: 72%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.6rem; }
.ft-bottom { font-family: var(--f-mono); font-size: 0.72rem; }


/* ---------------- Phone header and tab bar ---------------- */
@media (max-width: 768px) {
  .nav-inner { height: 56px; }
  .nav-logo .logo-text { display: block !important; min-width: 0; }
  .logo-name { white-space: nowrap; max-width: none; font-size: clamp(0.82rem, 4.1vw, 1.02rem); line-height: 1; -webkit-text-stroke: 0; overflow: hidden; text-overflow: ellipsis; }
  .logo-tagline { display: none; }
  .site-mark { width: 32px; height: 32px; }
  .nav-logo img { width: 34px !important; height: 34px !important; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
.mob-tabbar { background: #fff; border-top: 1px solid #dbe3e5; box-shadow: 0 -6px 24px rgba(0,47,62,0.14); height: calc(64px + env(safe-area-inset-bottom, 0px)); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.mob-tabbar-inner { height: 64px; padding: 6px 6px 0; gap: 4px; }
.mob-tab { border-top: 0; gap: 4px; color: #4b6066; border-radius: 12px; justify-content: flex-start; padding-top: 4px; }
.mob-tab .mob-tab-ic { width: 46px; height: 28px; padding: 3px 12px; border-radius: 99px; box-sizing: border-box; transition: background 0.15s, color 0.15s; }
.mob-tab-label { font-family: var(--f-label); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; text-transform: none; color: #3d5257; }
.mob-tab.active .mob-tab-ic, .mob-tab.current .mob-tab-ic, .mob-tab-more.active .mob-tab-ic { background: var(--sea); color: #fff; }
.mob-tab.active .mob-tab-label, .mob-tab.current .mob-tab-label, .mob-tab-more.active .mob-tab-label { color: var(--sea); font-weight: 700; }
.mob-tab:focus-visible { outline: 2px solid var(--sea); outline-offset: -2px; }
.mob-tab-more { border: 0; }
.mob-sheet { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); background: #fff; }
.mob-sheet-title { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 0 12px 6px; }
.mob-sheet-row { font-family: var(--f-disp); font-stretch: 80%; font-weight: 800; text-transform: uppercase; font-size: 1.15rem; color: var(--sea); }
.mob-sheet-dot { width: 14px; height: 14px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,47,62,0.2); }

/* Phones: title first, then the map, then the region list */
@media (max-width: 900px) {
  .atl-grid { row-gap: 0; }
  .atl-intro { display: contents; }
  .atl-grid > .atlas-map { order: 2; margin: 6px 0 18px; }
  .atl-count, .atl-regions, .atl-all, .rg-stats { order: 3; }
  .atl-count { margin-top: 0; }
}

/* ---------------- Narrow screens ---------------- */
@media (max-width: 1240px) {
  .logo-tagline { display: none; }
  .logo-name { font-size: 0.9rem; white-space: normal; max-width: 12em; line-height: 1.05; }
  .nav-trigger { padding: 0 0.5rem; font-size: 0.9rem; }
  .nav-search-link { display: none; }
}
@media (max-width: 900px) {
  .atl-grid, .rg-intro-grid { grid-template-columns: 1fr; }
  .chap, .chap:nth-child(odd of .chap) { grid-template-columns: 1fr; }
  .chap:nth-child(odd of .chap) .chap-img { order: 0; }
  .chap-img { min-height: 220px; }
  .tg-stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
}
@media (max-width: 520px) {
  .chap-tx { grid-template-columns: minmax(0, 1fr) 72px; }
  .atl-rin { grid-template-columns: 84px minmax(0, 1fr); }
  .tg-stats { grid-template-columns: 1fr 1fr; }
  .rg-leaflet .region-map { height: 340px; }
}
.mob-sheet-row > span:last-child { font-family: var(--f-mono); font-stretch: 100%; text-transform: none; font-weight: 400; white-space: nowrap; }

/* ---------------- Skip link, map hint, card art ---------------- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: #fff; color: var(--sea); font-weight: 700; padding: 10px 16px; border-radius: 0 0 10px 10px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.skip-link:focus { top: 0; outline: 2px solid var(--route); }
#main:focus { outline: none; }
.map-hint { position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(0,47,62,0.55); color: #fff; font-family: var(--f-body); font-weight: 700; font-size: 1.05rem; text-align: center; padding: 20px; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.map-hint.show { opacity: 1; }
.tc-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tc-img-fill { background-image: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(0,0,0,0.12)); }

/* ---------------- Find a Trail: atlas map beside the results ---------------- */
.search-split { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.4fr); gap: clamp(16px, 3vw, 32px); align-items: start; padding-top: 22px; padding-bottom: clamp(40px, 6vw, 72px); }
.search-map-col { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); }
.search-results .trails-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.atl-dot.atl-off { opacity: 0.15; pointer-events: none; }
.page-search .filter-btn .rs-dot { width: 10px; height: 10px; }
@media (max-width: 900px) {
  .search-split { grid-template-columns: 1fr; }
  .search-map-col { position: relative; top: 0; }
}

/* ---------------- Launch sites: Directions button + GPS ---------------- */
.launch-go { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; }
.dir-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--sea) !important; text-decoration: none; font-family: var(--f-label); font-weight: 700; font-size: 0.9rem; padding: 4px 11px 4px 9px; border: 1.5px solid var(--sea); border-radius: 99px; white-space: nowrap; line-height: 1.2; }
.dir-btn:hover { background: var(--sea); color: #fff !important; }
.gps-copy { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); background: none; border: 0; padding: 2px 0; cursor: pointer; white-space: nowrap; }
.gps-copy:hover { color: var(--sea); }
.gps-copy.done { color: var(--foliage-1); }
.gps-copy:focus-visible, .dir-btn:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
@media (max-width: 640px) {
  .launch-table, .launch-table tbody, .launch-table tr, .launch-table td { display: block; width: 100%; }
  .launch-table thead { display: none; }
  .launch-table tr { background: var(--paper); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
  .launch-table tr:nth-child(even) td { background: none; }
  .launch-table td { border: 0; padding: 4px 0; }
  .launch-table td[data-label="Notes"]::before { content: "Notes"; display: block; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
  .launch-table td[data-label="Site"] strong { font-family: var(--f-disp); font-stretch: 80%; font-weight: 800; text-transform: uppercase; font-size: 1.15rem; color: var(--sea); }
}
.launch-table a:not(.dir-btn), .trail-section p a, .route-step-body a { color: var(--sea); font-weight: 600; text-decoration-color: var(--water-3); text-underline-offset: 3px; }

/* ---------------- Accessibility (Oct 2026 PageSpeed review) ---------------- */
/* Small grey text was 3.8:1 on the sand background; this is 5.4:1 (WCAG AA needs 4.5:1). */
:root { --muted: #55625a; }
.partners-eyebrow { color: #4a6b42; }
/* Share buttons: white text needs a darker background to be readable. */
.share-reddit { background: #c53800; }
.share-email { background: #c5221f; }
.share-whatsapp { background: #075e54; }
/* Operator website / phone links: at least 24px tall so they are easy to tap on a phone. */
.op-links { gap: 0.25rem; }
.op-link { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 0; }
