/* TrailBivvy website — the only stylesheet. No web fonts, no external resources.
   Brand tokens from ASSET_BRIEF.md: alpine green accent (light #176B2E, dark #5CC76B), route raspberry #DB1A5C.
   Status colours are always paired with a symbol and text. Contrast pairs are verified by tools/check.py. */

:root {
  color-scheme: light dark;
  --c-bg: #F7F8F5;
  --c-surface: #FFFFFF;
  --c-surface-alt: #EDF1EB;
  --c-text: #121A16;
  --c-text-muted: #4A5850;
  --c-border: #D3DBD2;
  --c-border-strong: #A9B5AB;
  --c-accent: #176B2E;
  --c-accent-hover: #0F5424;
  --c-on-accent: #FFFFFF;
  --c-accent-soft: #DCEEDF;
  --c-route: #DB1A5C;
  --c-focus: #176B2E;
  --c-contour: rgba(23, 107, 46, 0.16);
  --c-hero-top: #E6EFE5;
  --c-ok-fg: #17652F;
  --c-ok-bg: #E3F2E6;
  --c-caution-fg: #7A4A00;
  --c-caution-bg: #FFF1D6;
  --c-restricted-fg: #A1241B;
  --c-restricted-bg: #FBE6E3;
  --c-unknown-fg: #46515A;
  --c-unknown-bg: #E9EDEF;
  --c-demo-fg: #9A1245;
  --c-demo-bg: #FCE4EC;
  --c-pill-fg: #6B3F00;
  --c-pill-bg: #FCEBC7;
  --c-bezel: #0B0F0D;
  --shadow-lg: 0 28px 60px -24px rgba(18, 40, 28, 0.38), 0 0 0 1px rgba(18, 40, 28, 0.06);
  --shadow-sm: 0 1px 2px rgba(18, 40, 28, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, "Noto Sans",
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 1rem;
  --radius-sm: 0.625rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0D1411;
    --c-surface: #141D19;
    --c-surface-alt: #1A2520;
    --c-text: #E6EDE8;
    --c-text-muted: #A6B3AB;
    --c-border: #2B3831;
    --c-border-strong: #4A5A51;
    --c-accent: #5CC76B;
    --c-accent-hover: #7FD68B;
    --c-on-accent: #06140A;
    --c-accent-soft: #183A22;
    --c-route: #F0457E;
    --c-focus: #7FD68B;
    --c-contour: rgba(92, 199, 107, 0.13);
    --c-hero-top: #10201A;
    --c-ok-fg: #86DD97;
    --c-ok-bg: #15301F;
    --c-caution-fg: #F2BE6B;
    --c-caution-bg: #352710;
    --c-restricted-fg: #FF968C;
    --c-restricted-bg: #3A1714;
    --c-unknown-fg: #BCC6CC;
    --c-unknown-bg: #242C30;
    --c-demo-fg: #FF9BBD;
    --c-demo-bg: #3A1522;
    --c-pill-fg: #F2BE6B;
    --c-pill-bg: #2E2210;
    --c-bezel: #000000;
    --shadow-lg: 0 28px 60px -24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.005em; }

p, ul, ol, dl, table, figure, blockquote, address { margin: 0 0 1rem; }
ul, ol { padding-inline-start: 1.25rem; }
li + li { margin-top: 0.35rem; }
strong { font-weight: 650; }

a {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--c-accent-hover); text-decoration-thickness: 2px; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--c-surface-alt);
  border-radius: 0.3rem;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

::selection { background: var(--c-accent-soft); color: var(--c-text); }

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: calc(48rem + 2 * var(--gutter)); }

.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--c-on-accent); }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: 4rem;
  padding-block: 0.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  color: var(--c-text);
  font-weight: 750;
  font-size: 1.125rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--c-text); }
.brand-icon { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li + li { margin: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-weight: 550;
  font-size: 0.975rem;
  text-decoration: none;
}
.site-nav a:hover { background: var(--c-surface-alt); color: var(--c-text); }
.site-nav a[aria-current="page"] {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* ---------- Buttons, pills, notices ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.65rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn .icon { width: 1.25rem; height: 1.25rem; }
.btn-primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn-primary:hover { background: var(--c-accent-hover); color: var(--c-on-accent); }
.btn-secondary { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border-strong); }
.btn-secondary:hover { background: var(--c-surface-alt); color: var(--c-text); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--c-pill-bg);
  color: var(--c-pill-fg);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
}
.status-dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
}

.notice {
  padding: 0.9rem 1.1rem;
  border-inline-start: 4px solid var(--c-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--c-surface-alt);
}
[dir="rtl"] .notice { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

.note {
  margin-top: auto;
  padding-inline-start: 0.8rem;
  border-inline-start: 3px solid var(--c-border-strong);
  color: var(--c-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.fine { color: var(--c-text-muted); font-size: 0.9375rem; }
.meta { color: var(--c-text-muted); font-size: 0.9375rem; }
.lead { color: var(--c-text-muted); font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; max-width: 62ch; }

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--c-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 7vw, 6rem);
  background: linear-gradient(180deg, var(--c-hero-top) 0%, var(--c-bg) 100%);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--c-contour);
  -webkit-mask: url("contours.90cf5e4583.svg") center / cover no-repeat;
  mask: url("contours.90cf5e4583.svg") center / cover no-repeat;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
.hero-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.25rem;
  border-radius: 22.5%;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 599px) {
  .hero-icon { display: none; }
}
.hero-title { margin-bottom: 1.25rem; }
.hero-name {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--c-accent);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  font-weight: 750;
  letter-spacing: 0;
}
.hero-tagline {
  display: block;
  font-size: clamp(2.35rem, 1.6rem + 3.6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero-lead {
  max-width: 38rem;
  margin-bottom: 1.5rem;
  color: var(--c-text-muted);
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}
.hero-note { max-width: 38rem; color: var(--c-text-muted); font-size: 0.9375rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  margin-bottom: 0;
}
.hero-visual { display: flex; justify-content: center; }
.hero-appicon {
  width: min(20rem, 70vw);
  border-radius: 22.5%;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 899px) {
  .hero-appicon { width: min(12rem, 55vw); }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head h2 { margin-bottom: 0.5rem; }
.section-head .lead { margin-bottom: 0; }

.principle {
  background: var(--c-surface);
  border-block: 1px solid var(--c-border);
}
.split {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 700px) {
  .split { grid-template-columns: 1fr 1fr; }
}
.split-card {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
}
.split-card p { margin: 0; color: var(--c-text-muted); }
.split-card h3 { display: flex; align-items: center; gap: 0.6rem; }
.split-card h3::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--c-accent);
}
.split-card + .split-card h3::before { background: var(--c-route); }
.principle-precedence { max-width: var(--measure); font-weight: 550; }
.quote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-inline-start: 4px solid var(--c-route);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--c-surface-alt);
}
[dir="rtl"] .quote { border-radius: var(--radius) 0 0 var(--radius); }
.quote figcaption { margin-bottom: 0.4rem; color: var(--c-text-muted); font-size: 0.9375rem; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  margin: 0;
  font-size: clamp(1.1875rem, 1.05rem + 0.7vw, 1.5rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.principle-zones { max-width: var(--measure); color: var(--c-text-muted); }
.legend-title { margin-top: 2rem; font-size: 1rem; }
.status-legend {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .status-legend { grid-template-columns: 1fr 1fr; }
}
.status-legend li + li { margin: 0; }
.status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 550;
  line-height: 1.45;
}
.status .icon { flex: none; width: 1.4rem; height: 1.4rem; margin-top: 0.05rem; }
.status-ok { background: var(--c-ok-bg); color: var(--c-ok-fg); }
.status-caution { background: var(--c-caution-bg); color: var(--c-caution-fg); }
.status-restricted { background: var(--c-restricted-bg); color: var(--c-restricted-fg); }
.status-unknown { background: var(--c-unknown-bg); color: var(--c-unknown-fg); }

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-grid li + li { margin: 0; }
@media (min-width: 760px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}
.feature {
  display: flex;
  flex-direction: column;
  padding: clamp(1.15rem, 3vw, 1.5rem);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.feature > p:not(.note):not(.stat):not(.feature-link) { color: var(--c-text-muted); }
.feature-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.feature-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: var(--c-accent-soft);
  color: var(--c-accent);
}
.feature-icon .icon { width: 1.4rem; height: 1.4rem; }
.feature h3 { margin: 0; }
.feature-link { font-weight: 600; }
.feature .note { margin-top: auto; margin-bottom: 0; }
.feature .note + .feature-link { margin-top: 0.75rem; margin-bottom: 0; }
.feature .feature-link + .note,
.feature .stat + .feature-link { margin-top: 0; }

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--c-surface-alt);
}
.stat-label {
  color: var(--c-text-muted);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat-value { color: var(--c-text); font-size: 1.25rem; font-weight: 750; }

/* ---------- Gallery ---------- */

.gallery-scroller {
  margin-inline: -0.6rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.6rem;
  border-radius: var(--radius-sm);
}
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(68%, 15rem);
  gap: 1.25rem;
  margin: 0;
  padding: 0.6rem 0.6rem 1rem;
  list-style: none;
}
.gallery li { scroll-snap-align: start; }
.gallery li + li { margin: 0; }
@media (min-width: 900px) {
  .gallery-scroller { overflow: visible; }
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(0, 17rem));
    justify-content: center;
    gap: 3rem 2rem;
  }
  .gallery li { justify-self: center; width: min(100%, 17rem); }
}
.features + .gallery-section { padding-top: 0; }
.phone { margin: 0; }
.phone img {
  width: 100%;
  border: 0.45rem solid var(--c-bezel);
  border-radius: 2rem;
  background: var(--c-bezel);
  box-shadow: var(--shadow-lg);
}
.phone figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  margin-top: 0.85rem;
  font-size: 0.9375rem;
}
.shot-caption { font-weight: 650; }
.map-credit { flex-basis: 100%; color: var(--c-text-muted); font-size: 0.8125rem; }
.phone-hero .map-credit { text-align: center; }
.demo-flag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--c-demo-bg);
  color: var(--c-demo-fg);
  font-size: 0.8125rem;
  font-weight: 650;
}
.phone-hero { width: min(19rem, 80vw); }
.phone-hero figcaption { justify-content: center; }
.download-link {
  position: relative; /* contains its visually hidden caption inside the scrolling gallery */
  display: inline-flex;
  align-items: center;
  flex-basis: 100%;
  min-height: 2.75rem;
  font-size: 0.875rem;
}

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

.faq { border-top: 1px solid var(--c-border); margin-bottom: 1.5rem; }
.faq details { border-bottom: 1px solid var(--c-border); }
.faq summary {
  position: relative;
  padding: 1.05rem 2.25rem 1.05rem 0;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
[dir="rtl"] .faq summary { padding: 1.05rem 0 1.05rem 2.25rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  content: "+" / "";
  position: absolute;
  inset-inline-end: 0.25rem;
  top: 0.9rem;
  color: var(--c-accent);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; content: "\2212" / ""; }
.faq details p { max-width: var(--measure); color: var(--c-text-muted); }
.faq-teaser { background: var(--c-surface); border-top: 1px solid var(--c-border); }
.more-link { font-weight: 650; margin: 0; }
.feature-link a,
.more-link a,
.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* ---------- Inner pages ---------- */

.page { padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem); }
.page-head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { margin-bottom: 0.5rem; }
.page-head .lead { margin-bottom: 0.75rem; }
.page section { margin-bottom: 2.5rem; }

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.toc li + li { margin: 0; }
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 0.9rem;
  text-decoration: none;
}
.toc a:hover { border-color: var(--c-accent); color: var(--c-accent); }

.catalog-summary { margin-bottom: 1rem; }
.catalog-summary .stat { display: inline-flex; margin-bottom: 1.25rem; }

.trail-region h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); scroll-margin-top: 1rem; }
.trail-table { width: 100%; border-collapse: collapse; font-size: 0.975rem; }
.trail-table th,
.trail-table td {
  padding: 0.75rem 0.6rem;
  text-align: start;
  vertical-align: top;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.trail-table thead th {
  border-bottom: 2px solid var(--c-border-strong);
  color: var(--c-text-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
@media (min-width: 760px) {
  .trail-table { table-layout: fixed; }
  .trail-table thead th:nth-child(1) { width: 27%; }
  .trail-table thead th:nth-child(2) { width: 16%; }
  .trail-table thead th:nth-child(3) { width: 11%; }
  .trail-table thead th:nth-child(4) { width: 13%; }
  .trail-table thead th:nth-child(5) { width: 14%; }
  .trail-table thead th:nth-child(6) { width: 19%; }
}
.trail-table tbody tr { border-bottom: 1px solid var(--c-border); }
.trail-table .num { text-align: end; }
.trail-name { font-weight: 650; }
.alt-name, .unit-alt { display: block; color: var(--c-text-muted); font-size: 0.875rem; font-weight: 400; }
.row-note { display: block; margin-top: 0.2rem; color: var(--c-demo-fg); font-size: 0.875rem; font-weight: 550; }

@media (max-width: 759px) {
  .trail-table,
  .trail-table tbody,
  .trail-table tr,
  .trail-table th,
  .trail-table td { display: block; }
  .trail-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .trail-table tbody tr {
    margin-bottom: 0.9rem;
    padding: 0.4rem 1rem 0.7rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
  }
  .trail-table th.trail-name { padding: 0.6rem 0 0.5rem; font-size: 1.0625rem; }
  .trail-table td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-top: 1px solid var(--c-border);
  }
  .trail-table td.num { text-align: start; }
  .trail-table .val { justify-self: start; min-width: 0; max-width: 100%; }
  .trail-table td::before {
    content: attr(data-label);
    color: var(--c-text-muted);
    font-size: 0.875rem;
  }
  .unit-alt { display: inline; }
}

.badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.15rem 0.6rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: normal;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.badge-open { background: var(--c-ok-bg); color: var(--c-ok-fg); }
.badge-approx { background: var(--c-caution-bg); color: var(--c-caution-fg); }
.badge-demo { background: var(--c-demo-bg); color: var(--c-demo-fg); }
.badge-official, .badge-other { background: var(--c-unknown-bg); color: var(--c-unknown-fg); }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: clamp(2rem, 6vw, 3.5rem) 1.5rem;
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface);
  text-align: center;
}
.empty-state p { max-width: 46ch; margin: 0; color: var(--c-text-muted); }
.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  background: var(--c-accent-soft);
  color: var(--c-accent);
}
.empty-icon .icon { width: 1.75rem; height: 1.75rem; }

.trail-notes { margin-top: 3rem; }
.trail-notes h2 { font-size: 1.3rem; }
.quality-list { display: grid; gap: 0.75rem; margin-bottom: 1.5rem; }
.quality-list div { display: grid; gap: 0.35rem; }
@media (min-width: 700px) {
  .quality-list div { grid-template-columns: 12rem 1fr; align-items: baseline; }
}
.quality-list dd { margin: 0; color: var(--c-text-muted); }
.plain-list { padding: 0; list-style: none; }
.plain-list li { max-width: var(--measure); color: var(--c-text-muted); }
.plain-list li + li { margin-top: 0.6rem; }

/* Prose (privacy, legal, press descriptions) */
.prose > * { max-width: var(--measure); }
.prose h2 { margin-top: 2.5rem; font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem); scroll-margin-top: 1rem; }
.prose h3 { margin-top: 1.75rem; }
.prose .toc { max-width: none; }
.prose .table-wrap { max-width: none; margin-bottom: 1rem; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--c-border); text-align: start; vertical-align: top; }
.prose thead th { border-bottom: 2px solid var(--c-border-strong); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-text-muted); }
.prose tbody th { font-weight: 600; }
@media (max-width: 599px) {
  .prose .stack-table,
  .prose .stack-table tbody,
  .prose .stack-table tr,
  .prose .stack-table th,
  .prose .stack-table td { display: block; }
  .prose .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prose .stack-table tr { padding: 0.6rem 0; border-bottom: 1px solid var(--c-border); }
  .prose .stack-table th,
  .prose .stack-table td { padding: 0.15rem 0; border: 0; }
  .prose .stack-table td::before {
    content: attr(data-label) ": ";
    color: var(--c-text-muted);
    font-weight: 600;
  }
}
.credits { padding: 0; list-style: none; }
.credits li + li { margin-top: 0.85rem; }
.credits details { margin-top: 0.5rem; }
.credits details summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--c-accent);
  font-weight: 600;
}
.credits details ul { margin-top: 0.5rem; padding-inline-start: 1.25rem; list-style: disc; color: var(--c-text-muted); font-size: 0.9rem; }
.credits details li + li { margin-top: 0.25rem; }

/* Press */
.press-grid { display: grid; gap: 2rem; margin-bottom: 1rem; }
@media (min-width: 900px) {
  .press-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
}
.facts { margin: 0; border-top: 1px solid var(--c-border); }
.facts div {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--c-border);
}
@media (min-width: 600px) {
  .facts div { grid-template-columns: 11rem 1fr; }
}
.facts dt { color: var(--c-text-muted); font-weight: 600; }
.facts dd { margin: 0; }
.press-icon {
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}
.press-icon h2 { font-size: 1.25rem; }
.press-appicon { width: 10rem; margin-bottom: 1rem; border-radius: 22.5%; box-shadow: var(--shadow-lg); }
.press-icon .note { margin: 1rem 0 0; }
.gallery-press { margin-top: 1rem; }
.osm-credit { margin-top: 0.5rem; margin-bottom: 0; }

/* Contact */
.contact-card {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  font-style: normal;
}
.contact-name { font-weight: 700; }
.contact-label { color: var(--c-text-muted); }

.report ul { max-width: var(--measure); }

/* 404 */
.not-found { text-align: center; }
.not-found .empty-icon { margin-inline: auto; }
.not-found .lead { margin-inline: auto; }
.link-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5rem; font-weight: 600; }
.link-list li + li { margin: 0; }

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

.site-footer {
  padding-block: 3rem 2rem;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  font-size: 0.9375rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.footer-about { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .footer-about { grid-column: auto; }
  .footer-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
  font-size: 1.0625rem;
  font-weight: 750;
}
.footer-brand img { width: 1.75rem; height: 1.75rem; border-radius: 0.45rem; }
.footer-tagline { margin-bottom: 0.75rem; color: var(--c-text-muted); }
.footer-status { margin-bottom: 0.75rem; font-weight: 600; }
.footer-independence { max-width: 52ch; color: var(--c-text-muted); }
.footer-heading {
  margin-bottom: 0.25rem;
  color: var(--c-text-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 0; }
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--c-text);
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--c-accent); text-decoration: underline; }
.site-footer nav a[aria-current] { color: var(--c-accent); font-weight: 650; }
.footer-bottom {
  display: grid;
  gap: 0.25rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 0.875rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Motion ---------- */

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

@media print {
  .site-header nav, .site-footer nav, .skip-link, .hero::before { display: none; }
  .hero, .principle, .faq-teaser, .site-footer { background: none; }
}
