/* South Plains Region, Trail Life USA.
   Colours and fonts follow the 2024 Trail Life USA Brand Standards & Style Guide. */

html { scroll-behavior: smooth; }
body { margin: 0; background: #010101; }
.page {
  container-type: inline-size;
  background: #010101;
  color: #d8ccb7;
  font-family: 'Open Sans', system-ui, sans-serif;
  width: 100%;
}
a { color: #d8ccb7; }
a:hover { color: #ffffff; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid #4fa7c5; outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 0; background: #ffffff; color: #010101; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* Hero stats */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-n { font-size: 40px; font-weight: 800; line-height: 1; color: #ffffff; }
.stat-l { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.25; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }

/* Buttons */
.btn-red, .btn-line, .btn-dark {
  min-height: 48px; padding: 0 22px; box-sizing: border-box; border-radius: 6px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
}
.btn-red { border: 0; background: #ba262d; color: #ffffff; }
.btn-red:hover { background: #6c162b; color: #ffffff; }
.btn-line { border: 2px solid #d8ccb7; color: #ffffff; background: transparent; }
.btn-dark { min-height: 44px; padding: 0 16px; border: 1px solid #77787b; background: #010101; color: #ffffff; font-size: 14px; }

/* Map */
.map { touch-action: pan-y; position: relative; border-radius: 20px; overflow: hidden; background: #010101; border: 1px solid #4d4d4f; }
.layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pin {
  pointer-events: auto; touch-action: pan-y; position: absolute; padding: 0; border: 0; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pin-area { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.pin-area .glow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: #f49322; pointer-events: none; transition: width 500ms, height 500ms, opacity 500ms; }
.pin-area .core { position: relative; box-sizing: border-box; border-radius: 50%; background: #f49322; border: 1px solid #010101; transition: width 500ms, height 500ms, opacity 500ms; }
.pin-troop { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.pin-troop .core { box-sizing: border-box; border-radius: 50%; background: #f49322; border: 1px solid #010101; width: 12px; height: 12px; transition: width 300ms, height 300ms; }
.pin-troop.sel .core { width: 18px; height: 18px; border: 3px solid #ffffff; }
.label {
  position: absolute; white-space: nowrap; text-align: center; color: #ffffff; line-height: 1.15;
  text-shadow: 0 0 3px #010101, 0 0 3px #010101, 0 0 6px #010101;
}
.label .sub { font-family: 'PT Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; font-size: 0.8em; color: #d8ccb7; }

.levels { position: absolute; top: 12px; left: 12px; display: flex; border-radius: 8px; overflow: hidden; border: 1px solid #77787b; background: #010101; }
.levels button { min-height: 44px; padding: 0 14px; border: 0; background: #010101; color: #ffffff; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; }
.levels button[aria-pressed="true"] { background: #f49322; color: #010101; }
.zoom { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 44px; height: 44px; border: 1px solid #77787b; border-radius: 8px; background: #010101; color: #ffffff; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.card-wrap { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; pointer-events: none; }
.card { pointer-events: auto; max-width: 380px; width: 100%; box-sizing: border-box; background: #010101; border: 1px solid #77787b; border-radius: 12px; padding: 14px 16px; }
.card-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: #f49322; margin-bottom: 2px; }
.chip {
  flex: none; min-height: 44px; padding: 0 14px; border: 1px solid #77787b; border-radius: 22px; background: #010101; color: #ffffff;
  font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.chip[aria-pressed="true"] { background: #f49322; color: #010101; border-color: #f49322; }
.chip .dot { width: 9px; height: 9px; background: #f49322; }
.chips { display: flex; overflow-x: auto; padding-bottom: 6px; }
.chips-row { flex: none; display: flex; gap: 8px; padding-right: 8px; }

/* Year-so-far counters */
.counter { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }
.digits { display: flex; align-items: flex-end; gap: 4px; font-size: clamp(40px, 5.2cqw, 68px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.digits span { display: inline-flex; justify-content: center; min-width: 0.72em; padding: 0.12em 0.06em; border-radius: 8px; background: #010101; }
.digits span.sep { min-width: 0.2em; padding: 0.12em 0; background: transparent; }
.counter-label { font-size: 15px; font-weight: 700; letter-spacing: 0.1em; }
.counter-note { font-size: 14px; line-height: 1.45; color: #d8ccb7; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Leader resource pages */
.wrap { max-width: 860px; margin: 0 auto; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 24px; }
.bar-id { display: flex; align-items: center; gap: 14px; }
.logo-box { border: 1px dashed #9b7a54; color: #d8ccb7; font-size: 11px; line-height: 1.3; padding: 8px 10px; border-radius: 4px; max-width: 120px; }
.bar-name { font-weight: 800; font-size: 14px; letter-spacing: 0.14em; color: #ffffff; text-decoration: none; }
.bar-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; font-weight: 600; }
.bar-nav a { padding: 12px 0; text-decoration: none; }
.bar-nav a[aria-current="page"] { color: #f49322; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: #f49322; }
.res-hero { padding: 32px 24px 48px; }
.res-hero h1 { margin: 10px 0; font-weight: 800; text-transform: uppercase; color: #ffffff; font-size: clamp(34px, 5cqw, 56px); line-height: 1; }
.lede { margin: 0; font-family: 'PT Serif', Georgia, serif; font-style: italic; font-size: 19px; line-height: 1.5; }
.res-body { background: #d8ccb7; color: #010101; padding: 40px 24px 64px; font-size: 16px; line-height: 1.6; }
.res-body h2 { margin: 32px 0 8px; font-size: 24px; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.res-body h2:first-child { margin-top: 0; }
.res-body p { margin: 0 0 14px; }
.res-body a { color: #6c162b; font-weight: 700; }
.res-body a:hover { color: #010101; }
.res-body a.btn-red, .res-body a.btn-red:hover { color: #ffffff; }
.doc-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.res-body a.doc { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; background: #ffffff; color: #010101; border-radius: 10px; padding: 14px 16px; text-decoration: none; min-height: 44px; box-sizing: border-box; }
.res-body a.doc:hover { background: #010101; color: #ffffff; }
.doc-title { font-weight: 700; }
.doc-meta { font-size: 13px; font-weight: 600; color: #3e2e18; }
a.doc:hover .doc-meta { color: #d8ccb7; }
.verse { margin: 0 0 8px; padding: 18px 20px; background: #010101; color: #ffffff; border-radius: 10px; font-family: 'PT Serif', Georgia, serif; font-style: italic; font-size: 18px; line-height: 1.5; }
.verse span { display: block; margin-top: 8px; font-family: 'Open Sans', system-ui, sans-serif; font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: #f49322; }
.steps { margin: 12px 0 20px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.plain { margin: 8px 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.note { font-size: 14px; color: #3e2e18; }
.res-foot { padding: 32px 24px 48px; font-size: 14px; line-height: 1.6; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; font-weight: 600; }
.foot-nav a { padding: 10px 0; text-decoration: none; }

/* Year of events: tiles that unfold in place */
.year-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tile { position: relative; flex: 1 1 300px; border: 1px solid #77787b; border-radius: 14px; box-sizing: border-box; }
.tile:has(details[open]) { flex-basis: 100%; border-color: #f49322; }
.tile summary { list-style: none; cursor: pointer; padding: 24px; display: flex; flex-direction: column; gap: 12px; border-radius: 14px; }
.tile summary::-webkit-details-marker { display: none; }
.tile-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 96px; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; padding: 5px 10px; border-radius: 4px; }
.tag-b { background: #005c85; color: #ffffff; }
.tag-o { background: #f49322; color: #010101; }
.tag-g { background: #728e38; color: #010101; }
.tag-line { border: 1px solid #d8ccb7; color: #d8ccb7; padding: 4px 10px; }
.tile-month { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; color: #f49322; }
.tile-title { font-size: 24px; font-weight: 800; text-transform: uppercase; line-height: 1.1; color: #ffffff; }
.tile-blurb { font-size: 15px; line-height: 1.55; }
.tile-more { font-size: 14px; font-weight: 700; color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.tile-more::after { content: " +"; }
details[open] .tile-more::after { content: " −"; }
.when-open, details[open] .when-closed { display: none; }
details[open] .when-open { display: inline; }
.tile-cal { position: absolute; top: 14px; right: 14px; z-index: 1; min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; text-decoration: none; color: #d8ccb7; border-radius: 6px; }
.tile-cal:hover { color: #ffffff; background: #3e2e18; }
.tile-body { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 18px; max-width: 860px; font-size: 15px; line-height: 1.6; }
.tile-body p { margin: 0; }
.tile-body .plain { margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 18px 32px; }
.fact { flex: 1 1 120px; max-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.fact-n { font-size: 40px; font-weight: 800; line-height: 1; color: #f49322; }
.fact-l { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3; }
.chart { display: flex; flex-direction: column; gap: 8px; }
.chart-title { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #f49322; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.bar-label { color: #ffffff; }
.bar-label .muted { color: #d8ccb7; font-size: 13px; white-space: nowrap; }
.bar-track { display: block; height: 14px; border-radius: 7px; background: #3e2e18; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 7px; }
.bar-val { font-weight: 800; color: #ffffff; text-align: right; }
.photo-slot { aspect-ratio: 16 / 7; max-width: 520px; border: 2px dashed #d8ccb7; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; text-align: center; font-size: 14px; font-weight: 600; }

/* Unfold transition for the month tiles */
:root { interpolate-size: allow-keywords; }
.tile details::details-content { block-size: 0; overflow: clip; transition: block-size 1100ms cubic-bezier(0.3, 0.7, 0.2, 1), content-visibility 1100ms allow-discrete; }
.tile details[open]::details-content { block-size: auto; }
/* Without motion.js (or with reduced motion) the tile simply fades open. */
html:not(.motion) .tile details[open] .tile-body { animation: unfold 450ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* Tri-fold: three panels drop open one after another, like a folded letter. */
.tile details { position: relative; }
.fold-wrap { position: absolute; left: 0; right: 0; perspective: 900px; perspective-origin: 50% 0; pointer-events: none; z-index: 2; }
.fold-panel { position: absolute; left: 0; right: 0; overflow: hidden; background: #010101; transform-origin: 50% 0; backface-visibility: hidden; will-change: transform; border-bottom: 1px solid rgba(216, 204, 183, 0.16); box-sizing: border-box; }
/* A shadow across each panel that lifts as it swings flat, like light catching the paper. */
.fold-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(1, 1, 1, 0) 0%, rgba(1, 1, 1, 0.85) 100%); opacity: 0; pointer-events: none; }
.fold-panel.down { animation: fold-down 900ms cubic-bezier(0.3, 0.7, 0.2, 1) both; }
.fold-panel.down::after { animation: fold-shade 900ms ease-out both; animation-delay: inherit; }
.fold-panel.up { animation: fold-up 520ms cubic-bezier(0.55, 0, 0.85, 0.35) both; }
@keyframes fold-down {
  0% { transform: rotateX(-112deg); filter: brightness(0.15); opacity: 0; box-shadow: 0 40px 60px rgba(0, 0, 0, 0.8); }
  10% { opacity: 1; }
  62% { transform: rotateX(9deg); filter: brightness(1.12); box-shadow: 0 18px 30px rgba(0, 0, 0, 0.5); }
  82% { transform: rotateX(-4deg); filter: brightness(0.96); }
  100% { transform: rotateX(0deg); filter: brightness(1); opacity: 1; box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
}
@keyframes fold-shade { 0% { opacity: 1; } 62% { opacity: 0.15; } 100% { opacity: 0; } }
@keyframes fold-up {
  0% { transform: rotateX(0deg); filter: brightness(1); opacity: 1; }
  25% { transform: rotateX(7deg); }
  100% { transform: rotateX(-112deg); filter: brightness(0.15); opacity: 0; }
}

/* Sections stack: each one pins when you reach its end, and the next slides up over it
   behind a diagonal edge while the one underneath dims and shrinks back. */
html.stack main > section { position: sticky; transform-origin: 50% 100%; transform: scale(calc(1 - 0.08 * var(--out, 0))); }
html.stack main > section::after { content: ""; position: absolute; inset: 0; z-index: 60; background: #010101; opacity: calc(var(--out, 0) * 0.7); pointer-events: none; }
html.stack main > section[id] { box-shadow: 0 -30px 60px rgba(1, 1, 1, calc(0.55 * (1 - var(--p, 1)))); }
html.stack main > section[id]::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: calc((1 - var(--p, 1)) * min(26vw, 240px)); background: inherit; clip-path: polygon(0 100%, 100% 0, 100% 100%); pointer-events: none; }
html.stack main > section[id] > * { opacity: calc(var(--p, 1) * 1.6 - 0.3); transform: translateY(calc((1 - var(--p, 1)) * 140px)); }
/* Room at the end of each section, so the next one's diagonal edge and shadow pass over
   empty space and never cover text that has not been read yet. */
html.stack main > section:not(:last-child) { padding-bottom: calc(56px + min(26vw, 240px)) !important; }
/* On phones that room is a fifth of the screen, so use a shallower edge and less of it. */
@media (max-width: 600px) {
  html.stack main > section[id]::before { height: calc((1 - var(--p, 1)) * 18vw); }
  html.stack main > section:not(:last-child) { padding-bottom: calc(20px + 18vw) !important; }
}

/* Back to top. Sits outside .page so it stays fixed to the screen. */
.to-top {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 200;
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px 0 12px;
  border: 2px solid #ffffff; border-radius: 24px; background: #010101; color: #ffffff;
  font-family: 'Open Sans', system-ui, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  cursor: pointer; box-shadow: 0 6px 18px rgba(1, 1, 1, 0.45);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: #ba262d; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .to-top { display: none !important; } }

/* Official logo. The file carries its own clear space, so nothing is cropped. */
/* Never stretch a logo: fixed height, width from the file's own proportions, and no
   flex stretching. aspect-ratio and object-fit are a second guard. */
.logo { display: block; flex: none; align-self: center; height: 76px; width: auto; max-width: none; aspect-ratio: 640 / 235; object-fit: contain; margin-left: -20px; }
.logo-foot { align-self: flex-start; height: 88px; margin-left: -24px; }

/* Shoutouts */
.shout-grid { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.shout { flex: 1 1 300px; }
.shout .chart-title { color: #6c162b; }
.shout .bar-label, .shout .bar-val { color: #010101; }
.shout .bar-label .muted { color: #3e2e18; }
.shout .bar-track { background: #d8ccb7; }
.shout .bar-row { grid-template-columns: minmax(110px, 44%) 1fr 48px; }
.tile { transition: border-color 300ms; }

/* Trail Report places */
.places { display: flex; flex-wrap: wrap; gap: 8px; }
.place { background: #ffffff; color: #010101; border-radius: 16px; padding: 6px 12px; font-size: 14px; font-weight: 600; }

/* Shooting sports */
.range-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.range-card { box-sizing: border-box; flex: 1 1 240px; background: #010101; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.range-when { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: #f49322; }
.range-card h3 { margin: 0; font-size: 22px; font-weight: 800; text-transform: uppercase; line-height: 1.1; color: #ffffff; }
.range-card p { margin: 0; font-size: 15px; line-height: 1.55; }
.range-card a { color: #ffffff; font-weight: 700; }
#rockets .bar-label .muted { margin-left: 6px; }
#rockets .bar-row { grid-template-columns: minmax(110px, 40%) 1fr 32px; }

/* Next steps */
.step-card { box-sizing: border-box; flex: 1 1 240px; background: #010101; color: #ffffff; border-radius: 14px; padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.step-card:hover { color: #ffffff; outline: 3px solid #010101; outline-offset: 3px; }
.step-n { font-size: 40px; font-weight: 800; line-height: 1; color: #f49322; }
.step-card h3 { margin: 0; font-size: 20px; font-weight: 800; text-transform: uppercase; line-height: 1.15; }
.step-card p { margin: 0; font-size: 15px; line-height: 1.55; color: #d8ccb7; }
.tile-body .ask { min-height: 44px; font-size: 14px; }
/* First-campout guide */
.timeline { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
.timeline th, .timeline td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #9b7a54; }
.timeline th { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.timeline td:first-child { white-space: nowrap; font-weight: 700; }
.table-scroll { overflow-x: auto; }
.check { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check li { position: relative; padding-left: 30px; }
.check li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border: 2px solid #010101; border-radius: 3px; }
.cols { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.cols > div { flex: 1 1 240px; }
.cols h3 { margin: 12px 0 4px; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Photos */
.tile-photo { display: block; width: 100%; max-width: 620px; height: auto; border-radius: 10px; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.head-photo { flex: 1 1 300px; min-width: 0; max-width: 400px; height: auto; border-radius: 14px; }
.head-photo.tall { flex: 0 1 250px; max-width: 250px; }
.side-photo { flex: 0 1 190px; width: 190px; max-width: 100%; height: auto; border-radius: 14px; }
.range-card.has-photo { overflow: hidden; }
.card-photo { display: block; width: calc(100% + 48px); max-width: none; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: -24px -24px 8px; }
.start-photo { display: block; width: calc(100% + 64px); max-width: none; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 30%; margin: -32px -32px 8px; border-radius: 14px 14px 0 0; }
.page-photo { display: block; width: 100%; max-width: 520px; height: auto; border-radius: 12px; margin: 16px 0; }

/* Terrain view of the map */
.mode { position: absolute; top: 64px; left: 12px; display: flex; border-radius: 8px; overflow: hidden; border: 1px solid #77787b; background: #010101; }
.mode[hidden] { display: none; }
.mode button { min-height: 44px; padding: 0 14px; border: 0; background: #010101; color: #ffffff; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; }
.mode button[aria-pressed="true"] { background: #4fa7c5; color: #010101; }
.terrain-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; touch-action: pan-y; cursor: grab; }
.terrain-canvas:active { cursor: grabbing; }
.terrain-ui, .t-only { display: none; }
.map.terrain .terrain-canvas { display: block; }
.map.terrain #map-svg { visibility: hidden; }
.map.terrain #pins, .map.terrain #labels, .map.terrain .levels, .map.terrain .card-wrap { display: none; }
.map.terrain .mode { top: 12px; }
.map.terrain .t-only { display: flex; }
.map.terrain .terrain-ui { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; position: absolute; left: 12px; right: 12px; bottom: 12px; pointer-events: none; }
.t-switch { pointer-events: auto; min-height: 44px; padding: 0 14px 0 8px; border: 1px solid #77787b; border-radius: 22px; background: #010101; color: #ffffff; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.t-knob { position: relative; width: 40px; height: 24px; border-radius: 12px; background: #4d4d4f; transition: background 200ms; }
.t-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; transition: transform 200ms; }
.t-switch[aria-checked="true"] .t-knob { background: #f49322; }
.t-switch[aria-checked="true"] .t-knob::after { transform: translateX(16px); }
.t-card { pointer-events: auto; max-width: 290px; box-sizing: border-box; background: rgba(1, 1, 1, 0.86); border: 1px solid #77787b; border-radius: 12px; padding: 9px 12px; }
.t-hint { display: none; position: absolute; top: 68px; left: 12px; padding: 6px 12px; border-radius: 16px; background: rgba(1, 1, 1, 0.8); color: #d8ccb7; font-size: 12px; font-weight: 600; pointer-events: none; transition: opacity 400ms; }
.map.terrain .t-hint { display: block; }
.t-hint.gone { opacity: 0; }

/* Packing lists */
.pack-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pack-jump .chip { text-decoration: none; }
.pack { margin-top: 28px; padding-top: 8px; border-top: 2px solid #9b7a54; scroll-margin-top: 16px; }
.pack-sub { margin: 0 0 8px; font-family: 'PT Serif', Georgia, serif; font-style: italic; font-size: 17px; }
@media print {
  .no-print, header, footer, .skip, .res-hero { display: none !important; }
  body, .page, .res-body { background: #ffffff !important; color: #010101 !important; }
  .pack { break-before: page; border-top: 0; margin-top: 0; }
  .pack:first-of-type { break-before: auto; }
  .cols > div { break-inside: avoid; }
  a { color: #010101 !important; text-decoration: none !important; }
}
.res-body a.chip, .res-body a.chip:hover { color: #ffffff; }

header:focus { outline: none; }

/* Trail Log (trail.html): past area and region events drawn as stops along a backpacking trail. */
.wrap-wide { max-width: 1000px; margin: 0 auto; }
.tl-controls { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.tl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tl-label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: #3e2e18; }
.seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid #010101; background: #010101; }
.seg button { min-height: 44px; padding: 0 14px; border: 0; background: #010101; color: #ffffff; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #f49322; color: #010101; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chips .chip .n { font-weight: 600; opacity: 0.75; }
.tl-count { margin: 0; font-size: 14px; font-weight: 600; color: #3e2e18; }

.trail { position: relative; list-style: none; margin: 0; padding: 8px 0 0; display: flex; flex-direction: column; gap: 14px; --gut: 56px; }
.trail-line { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.trail-line path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trail-line .behind { stroke: #ba262d; stroke-width: 3.5; stroke-dasharray: 10 9; }
.trail-line .ahead { stroke: #9b7a54; stroke-width: 3.5; stroke-dasharray: 1 9; }
.trail > li { position: relative; z-index: 1; }

.tr-stop { display: grid; grid-template-columns: var(--gut) minmax(0, 1fr); align-items: center; }
.tr-node { grid-column: 1; grid-row: 1; justify-self: center; width: 44px; height: 44px; border-radius: 50%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; background: #876237; color: #ffffff; border: 3px solid #d8ccb7; transform: translateX(var(--dx, 0px)); }
.tr-node svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tr-stop.now .tr-node { background: #f49322; color: #010101; }
.tr-stop.ahead .tr-node { background: #d8ccb7; color: #3e2e18; border: 2px dashed #876237; }
.res-body a.tr-card { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 6px; background: #ffffff; color: #010101; border-radius: 12px; padding: 14px 16px; text-decoration: none; font-weight: 400; box-sizing: border-box; border: 2px solid transparent; }
.res-body a.tr-card:hover { border-color: #010101; }
.res-body .tr-stop.ahead a.tr-card { background: transparent; border: 2px dashed #876237; }
.res-body .tr-stop.ahead a.tr-card:hover { border-style: solid; border-color: #010101; }
.tr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tr-tags .tag { font-size: 11px; padding: 4px 8px; }
.tag-now { background: #010101; color: #f49322; }
.tr-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #3e2e18; }
.tr-title { font-size: 19px; font-weight: 800; text-transform: uppercase; line-height: 1.15; }
.tr-blurb { font-size: 15px; line-height: 1.5; color: #3e2e18; }
.tr-link { font-size: 13px; font-weight: 700; color: #6c162b; }

.tr-sign { display: flex; padding: 10px 0 2px; }
.tr-sign h3, .tr-here span, .tr-head span { margin: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 6px; background: #3e2e18; color: #d8ccb7; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1; }
.tr-sign h3 small { font-size: 13px; font-weight: 600; color: #9b7a54; }
.tr-here, .tr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0 4px; }
.tr-here span { background: #f49322; color: #010101; min-height: 40px; }
.tr-here svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tr-head span { background: #010101; color: #ffffff; }
.tr-here em, .tr-head em { font-family: 'PT Serif', Georgia, serif; font-size: 15px; color: #3e2e18; }

/* Wide screens: the trail runs down the middle and stops alternate sides. */
@container (min-width: 820px) {
  .trail { --gut: 110px; --wide: 1; gap: 6px; }
  .tr-stop { grid-template-columns: minmax(0, 1fr) var(--gut) minmax(0, 1fr); }
  .tr-node { grid-column: 2; }
  .res-body a.tr-card { grid-column: 3; }
  .res-body .side-l a.tr-card { grid-column: 1; }
  .tr-sign, .tr-here, .tr-head { justify-content: center; text-align: center; }
  .tr-here, .tr-head { flex-direction: column; }
}

.grp { margin-top: 28px; }
.grp:first-child { margin-top: 0; }
.res-body .grp h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; text-transform: uppercase; line-height: 1.15; display: flex; align-items: baseline; gap: 10px; }
.grp h3 span { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: #6c162b; }
.tl-empty { background: #ffffff; border-radius: 12px; padding: 18px 20px; font-weight: 600; }

/* Trail Log: filter button, card footer, and scroll animations */
.tl-row[hidden] { display: none; }
.tl-filter { min-height: 44px; padding: 0 12px 0 14px; border: 1px solid #010101; border-radius: 22px; background: transparent; color: #010101; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tl-filter:hover, .tl-filter[aria-expanded="true"] { background: #010101; color: #ffffff; }
.tl-filter.on { background: #f49322; border-color: #f49322; color: #010101; }
.tl-filter svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tl-filter .caret { transition: transform 200ms; }
.tl-filter[aria-expanded="true"] .caret { transform: rotate(180deg); }
#tl-filter-row:not([hidden]) { animation: tl-drop 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes tl-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.tr-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 4px; }
.tr-date { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6c162b; }
.tr-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 16px; background: #010101; color: #ffffff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; transition: background 200ms, transform 200ms; }
a.tr-card:hover .tr-pill { background: #ba262d; transform: translateX(3px); }

.trail.anim { --from: 1; }
.trail.anim .tr-stop .tr-card { opacity: 0; transform: translateX(calc(var(--from) * 90px)) rotate(calc(var(--from) * 2.5deg)); transition: opacity 500ms ease-out, transform 800ms cubic-bezier(0.2, 1.25, 0.35, 1), border-color 200ms; }
.trail.anim .tr-stop .tr-node { transform: translateX(var(--dx, 0px)) scale(0) rotate(-120deg); transition: transform 650ms cubic-bezier(0.3, 1.7, 0.45, 1); }
.trail.anim .tr-stop.in .tr-card { opacity: 1; transform: none; transition-delay: 120ms, 120ms, 0s; }
.trail.anim .tr-stop.in .tr-node { transform: translateX(var(--dx, 0px)) scale(1) rotate(0deg); }
.trail.anim .tr-sign > *, .trail.anim .tr-head > * { opacity: 0; transform: translateY(-18px) scale(0.8); transition: opacity 400ms, transform 600ms cubic-bezier(0.3, 1.6, 0.45, 1); }
.trail.anim .tr-sign.in > *, .trail.anim .tr-head.in > * { opacity: 1; transform: none; }
.trail.anim .tr-here span { animation: tl-here 2.4s ease-in-out infinite; }
@keyframes tl-here { 0%, 100% { box-shadow: 0 0 0 0 rgba(244, 147, 34, 0.55); } 50% { box-shadow: 0 0 0 14px rgba(244, 147, 34, 0); } }
.trail.anim .tr-here svg { animation: tl-pin 2.4s ease-in-out infinite; }
@keyframes tl-pin { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); } }
@container (min-width: 820px) {
  .trail.anim .side-l { --from: -1; }
}
@media print { .trail.anim .tr-card, .trail.anim .tr-node, .trail.anim li > * { opacity: 1 !important; transform: none !important; } .trail-line { clip-path: none !important; } }
#tl-out { overflow-x: clip; }
