/* =====================================================================================================
   v2 - the map is the front door. Signature: the "ridge line", the elevation profile of each trail drawn
   as a line (list rows, cards) and as the lower edge of its hero photograph.
   Loaded after site.css.
   ===================================================================================================== */
.mono { font-family: var(--f-mono); letter-spacing: .02em; }
.nav li a { padding: 10px 12px; }

/* ---------- atlas (home) */
.atlas { position: relative; height: 100svh; min-height: 620px; padding-top: 68px; }
.at-stage { position: absolute; inset: 68px 0 0 0; }
.at-stage .map { position: absolute; inset: 0; }
.at-panel { position: absolute; z-index: 6; left: 16px; top: 84px; bottom: 16px; width: min(430px, 34vw); min-width: 360px; display: flex; flex-direction: column;
  background: rgba(14, 8, 1, .9); backdrop-filter: blur(16px) saturate(1.1); border: 1px solid var(--hair-2); border-radius: 10px; overflow: hidden; }
.at-head { padding: 22px 22px 12px; border-bottom: 1px solid var(--hair); flex: none; }
.at-title { font: 300 clamp(40px, 3.6vw, 58px)/.92 var(--f-display); letter-spacing: -.01em; margin: 12px 0 0; text-transform: uppercase; }
.at-lede { font: 400 14.5px/1.5 var(--f-body); color: var(--linen-2); margin: 14px 0 16px; text-wrap: pretty; }
.at-search { position: relative; z-index: 3; }
.at-search input { width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--hair-2); background: rgba(255, 241, 224, .05); color: var(--linen); padding: 0 18px; font: 400 15px/1 var(--f-body); }
.at-search input::placeholder { color: var(--ash); }
.at-search input:focus { outline: none; border-color: var(--amber); }
.at-filters { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.at-filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -22px; padding: 0 22px; }
.at-filters .chips::-webkit-scrollbar { display: none; }
.at-filters .chip { flex: none; height: 30px; padding: 0 12px; font-size: 12.5px; }
.at-count { margin: 12px 0 0; display: flex; justify-content: space-between; align-items: center; }
.at-count span { color: var(--linen); }
.at-reset { background: none; border: 0; color: var(--amber); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 0; }
.at-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--fossil) transparent; }
.at-list li[hidden] { display: none; }
.at-list a { position: relative; display: grid; grid-template-columns: 1fr 96px; column-gap: 14px; row-gap: 5px; align-items: center; padding: 13px 22px; border-bottom: 1px solid var(--hair); }
.at-list .at-name { font: 500 15.5px/1.25 var(--f-body); letter-spacing: -.005em; grid-column: 1; }
.at-list .label { grid-column: 1; font-size: 10.5px; letter-spacing: .07em; }
.at-spark { grid-column: 2; grid-row: 1 / span 2; width: 96px; height: 28px; overflow: visible; }
.at-spark path { fill: none; stroke: var(--ash); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.at-list a:hover, .at-list li.on a { background: rgba(255, 241, 224, .055); }
.at-list a:hover .at-spark path, .at-list li.on .at-spark path { stroke: var(--amber); }
.at-list li.on a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--amber); }
.at-list li.on .at-name { color: var(--amber); }
.at-empty { padding: 28px 22px; margin: 0; }
.at-layers { position: absolute; z-index: 5; top: 16px; right: 16px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 52vw; }
.at-layers .chip { background: rgba(14, 8, 1, .86); backdrop-filter: blur(10px); height: 34px; }
.at-layers .chip[aria-pressed="true"] { background: rgba(60, 40, 10, .92); }
.page-atlas .maplibregl-ctrl-top-left { top: 12px; left: max(388px, calc(min(430px, 34vw) + 28px)); }
.at-card { position: absolute; z-index: 6; right: 16px; bottom: 44px; width: min(370px, calc(100% - 32px)); background: rgba(14, 8, 1, .93); backdrop-filter: blur(16px);
  border: 1px solid var(--hair-2); border-radius: 10px; overflow: hidden; display: none; max-height: calc(100% - 120px); overflow-y: auto; }
.at-card.show { display: block; animation: cardin .45s var(--ease); }
@keyframes cardin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.at-card-ph img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.at-card .in { padding: 16px 18px 18px; }
.at-card h3 { font: 300 32px/1 var(--f-display); margin: 8px 40px 10px 0; text-wrap: balance; }
.at-card .facts { display: flex; gap: 14px; font: 400 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--linen-2); margin: 12px 0 16px; }
.at-card .facts span + span::before { content: "·"; margin-right: 14px; color: var(--fossil); }
.at-card .btn { width: 100%; justify-content: center; }
.at-card .in > .label + .fm-hikes { margin: 8px 0 14px; }
.at-spark.big { display: block; width: 100%; height: 44px; margin: 4px 0 0; }
.at-spark.big path { stroke: var(--amber); stroke-width: 1.6; }
.at-more { position: absolute; z-index: 5; left: max(388px, calc(min(430px, 34vw) + 28px)); bottom: 14px; color: var(--linen-2); background: rgba(14, 8, 1, .7); padding: 6px 12px; border-radius: 999px; }
.at-more:hover { color: var(--linen); }
.her-marker { width: 15px; height: 15px; padding: 0; rotate: 45deg; background: var(--linen); border: 2px solid var(--abyss); outline: 1px solid rgba(255, 241, 224, .55); outline-offset: 2px; cursor: pointer; border-radius: 2px; }
.her-marker:hover { background: var(--amber); }

/* ---------- safety strip + heritage teaser (home) */
.safe-grid, .her-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.safe-list { list-style: none; counter-reset: s; margin: 0; padding: 0; border-top: 1px solid var(--hair-2); }
.safe-list li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; padding: 20px 0; border-bottom: 1px solid var(--hair); font: 400 17px/1.5 var(--f-body); color: var(--linen-2); }
.safe-list li::before { content: "0" counter(s); font: 400 12px/1.9 var(--f-mono); color: var(--amber); letter-spacing: .1em; }
.safe-list li b { color: var(--linen); font-weight: 500; }
.her-picks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-2); }
.her-picks a { display: block; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.her-picks b { display: block; font: 300 clamp(24px, 2.2vw, 32px)/1.05 var(--f-display); margin-top: 6px; }
.her-picks a:hover b { color: var(--amber); }

/* ---------- hike hero: the ridge line */
.hk-hero .in { padding-bottom: clamp(120px, 17vh, 170px); }
.hk-ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(96px, 15vh, 150px); z-index: 0; display: block; }
.hk-ridge .fill { fill: var(--abyss); }
.hk-ridge .line { fill: none; stroke: var(--amber); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hk-ridge-cap { position: absolute; left: var(--pad); right: var(--pad); bottom: 8px; z-index: 1; display: flex; justify-content: space-between; gap: 16px; font-size: 10.5px; margin: 0; }
.hk-hero .hk-ridge-cap, .hk-hero .hk-ridge-cap span { color: var(--ash); text-shadow: none; }
.hk-hero::after { background: linear-gradient(180deg, rgba(11, 6, 0, .5) 0%, rgba(11, 6, 0, 0) 18%, rgba(11, 6, 0, .1) 36%, rgba(11, 6, 0, .6) 60%, rgba(11, 6, 0, .82) 100%); }
.for-whom { margin: 22px 0 0; font: 400 16px/1.55 var(--f-body); color: var(--linen-2); max-width: 60ch; }
.for-whom .label { display: block; margin-bottom: 6px; }
.flypos { position: absolute; z-index: 4; left: 16px; bottom: 16px; background: rgba(11, 6, 0, .78); backdrop-filter: blur(10px); border: 1px solid var(--hair); border-radius: 999px; padding: 9px 14px; color: var(--linen); }

/* ---------- plan this walk */
.plan-sec { padding-bottom: clamp(48px, 7vw, 88px); }
.plan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hair-2); border-left: 1px solid var(--hair); }
.plan-cell { padding: 26px 26px 28px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; align-items: flex-start; }
.plan-cell > b { font: 500 clamp(18px, 1.5vw, 21px)/1.3 var(--f-body); letter-spacing: -.01em; margin: 12px 0 10px; }
.plan-cell > b.mono { font: 400 clamp(15px, 1.25vw, 17px)/1.4 var(--f-mono); letter-spacing: .01em; color: var(--amber); }
.plan-cell p { margin: 0 0 16px; font: 400 15px/1.6 var(--f-body); color: var(--linen-2); }
.plan-cell .btn-text { margin-top: auto; font-size: 14.5px; padding-bottom: 4px; }
.plan-safe { background: rgba(255, 180, 66, .06); }
.route-sec { padding-top: 0; }

/* ---------- history on the way */
.her-sec { padding-top: 0; }
.her-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.her-tx p { font: 400 clamp(17px, 1.35vw, 19px)/1.7 var(--f-body); color: var(--linen-2); margin: 0 0 1.1em; max-width: 62ch; text-wrap: pretty; }
.her-tx p:first-child::first-letter { font: 300 3.4em/.8 var(--f-display); float: left; padding: 6px 10px 0 0; color: var(--linen); }
.her-cards { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-2); }
.her-cards a { display: block; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.her-cards b { display: block; font: 500 18px/1.3 var(--f-body); margin: 6px 0 4px; }
.her-cards .muted { font-size: 13.5px; }
.her-cards a:hover b { color: var(--amber); }
.her-note { margin: 28px 0 0; font-size: 14px; }

/* ---------- long-form pages: safety, history */
.page-head { padding: 150px 0 48px; }
.page-head .lede { margin-top: 22px; }
.doc { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.doc-nav { position: sticky; top: 96px; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-2); }
.doc-nav a { display: block; padding: 11px 0; border-bottom: 1px solid var(--hair); font: 400 11.5px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--linen-2); }
.doc-nav a:hover { color: var(--amber); }
.doc-sec { padding: 0 0 clamp(48px, 6vw, 80px); scroll-margin-top: 96px; }
.doc-sec + .doc-sec { border-top: 1px solid var(--hair); padding-top: clamp(40px, 5vw, 64px); }
.doc-sec h2 { font: 300 clamp(34px, 3.8vw, 54px)/1 var(--f-display); margin: 12px 0 20px; text-wrap: balance; }
.doc-sec p, .doc-sec li { font: 400 clamp(16.5px, 1.3vw, 18.5px)/1.7 var(--f-body); color: var(--linen-2); max-width: 66ch; text-wrap: pretty; }
.doc-sec p { margin: 0 0 1.05em; }
.doc-sec ul { margin: 0 0 1.2em; padding: 0; list-style: none; }
.doc-sec ul li { padding: 10px 0 10px 26px; position: relative; border-bottom: 1px solid var(--hair); }
.doc-sec ul li::before { content: ""; position: absolute; left: 2px; top: 1.25em; width: 9px; height: 2px; background: var(--amber); }
.doc-sec strong, .doc-sec b { color: var(--linen); font-weight: 500; }
.doc-sec a, .foot .note a, .src a { color: var(--linen); border-bottom: 1px solid var(--hair-2); }
.doc-sec a:hover, .foot .note a:hover, .src a:hover { border-color: var(--amber); }
.callout { border: 1px solid var(--hair-2); border-left: 3px solid var(--amber); border-radius: var(--r); padding: 20px 24px; margin: 0 0 1.4em; max-width: 70ch; background: rgba(255, 180, 66, .05); }
.callout p:last-child { margin-bottom: 0; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--hair-2); border-left: 1px solid var(--hair); margin: 0 0 1.6em; max-width: 760px; }
.numbers div { padding: 18px 20px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.numbers b { display: block; font: 300 52px/1 var(--f-display); color: var(--linen); }
.numbers span { display: block; margin-top: 8px; }
.src { margin: 18px 0 0; font: 400 12.5px/1.6 var(--f-mono); color: var(--ash); max-width: 78ch; }
.src a { color: var(--linen-2); }
.her-entry { padding: clamp(32px, 4vw, 52px) 0; border-top: 1px solid var(--hair); scroll-margin-top: 96px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.her-entry:target h3 { color: var(--amber); }
.her-entry h3 { font: 300 clamp(32px, 3.4vw, 50px)/1 var(--f-display); margin: 10px 0 16px; text-wrap: balance; }
.her-entry p { font: 400 clamp(16.5px, 1.3vw, 18px)/1.7 var(--f-body); color: var(--linen-2); margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }
.her-entry .tale { border-left: 2px solid var(--amber); padding-left: 20px; color: var(--linen); }
.her-entry .fm-hikes { margin-top: 10px; }
.her-entry aside .label { display: block; }
.her-entry .visit { font-size: 15px; color: var(--ash); }
.area-h { font: 300 clamp(44px, 6vw, 92px)/.9 var(--f-display); margin: clamp(56px, 8vw, 110px) 0 18px; text-transform: uppercase; letter-spacing: -.01em; }
.area-notes p { font: 400 clamp(17px, 1.4vw, 19.5px)/1.7 var(--f-body); color: var(--linen-2); max-width: 70ch; margin: 0 0 1em; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 760px; }
.foot .note { font: 400 13px/1.6 var(--f-body); color: var(--ash); margin: 0; text-align: left !important; }
.foot .note b { color: var(--linen-2); font-weight: 500; }
#plan, #history { scroll-margin-top: 116px; }

@media (max-width: 980px) {
  .safe-grid, .her-grid, .her-body, .doc, .her-entry { grid-template-columns: 1fr; }
  .doc-nav { position: static; display: flex; flex-wrap: wrap; gap: 0 18px; }
  .plan { grid-template-columns: 1fr 1fr; }
  .foot-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .atlas { height: auto; min-height: 0; padding-top: 60px; }
  .at-stage { position: sticky; top: 60px; inset: auto; height: 50svh; z-index: 4; border-bottom: 1px solid var(--hair-2); }
  .at-panel { position: static; width: auto; min-width: 0; border: 0; border-radius: 0; background: var(--abyss); backdrop-filter: none; overflow: visible; }
  .at-list { overflow: visible; }
  .at-title { font-size: 44px; }
  .at-layers { top: 8px; right: 8px; left: 8px; max-width: none; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .at-layers .chip { flex: none; }
  .at-card { right: 8px; left: 8px; bottom: 8px; width: auto; max-height: calc(100% - 60px); }
  .at-card-ph { display: none; } .at-card h3 { font-size: 25px; margin-top: 4px; } .at-card .fm-tl, .at-spark.big { display: none; } .at-card .facts { margin: 8px 0 12px; }
  .at-more, .page-atlas .maplibregl-ctrl-top-left { display: none; }
  .page-atlas .maplibregl-ctrl-bottom-right { right: 0; }
}
@media (max-width: 700px) {
  .plan { grid-template-columns: 1fr; }
  .hk-hero .in { padding-bottom: 110px; }
  .hk-ridge { height: 84px; }
  .hk-ridge-cap .mid { display: none; }
  .page-head { padding: 110px 0 32px; }
  .flypos { left: 12px; bottom: 60px; }
}

/* ---------- every trail has its own colour (--c, set per list row and on the card) */
.at-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--amber)); margin-right: 9px; vertical-align: 1px; }
.at-list a:hover .at-spark path, .at-list li.on .at-spark path { stroke: var(--c, var(--amber)); }
.at-list li.on a::before { background: var(--c, var(--amber)); }
.at-list li.on .at-name { color: var(--linen); }
.at-spark.big path { stroke: var(--c, var(--amber)); }
.at-card.show { border-top: 3px solid var(--c, var(--hair-2)); }
