/* =====================================================================
   SL Trailblazer Atlas — public site
   Her brand (parchment, forest, bark; Fraunces + Lora), rebuilt properly.
   Phone first. Tokens are documented in DESIGN.md.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* colour */
  --parchment: #F5ECD6;
  --card: #FBF6E9;
  --muted: #EAE0C7;
  --line: #E2CF9D;          /* decorative hairlines only (1.3:1) */
  --edge: #8F7A45;          /* input + control borders (3.5:1 on parchment) */
  --ink: #0A0A0A;
  --ink-soft: #7E6320;      /* body text: 4.83 on parchment, 5.27 on card */
  --forest: #2D4A2B;
  --forest-deep: #1F351E;
  --moss: #2B4A39;
  --bark: #AB753B;          /* ornament: compass needle, rules, hover underlines */
  --bark-text: #8A5A26;     /* bark as TEXT: 5.00 on parchment (bark itself is 3.34) */
  --bark-light: #D9A86C;    /* bark on the ground footer: 8.3 */
  --ground: #101A0F;
  --on-dark: #F5ECD6;
  --rust: #9B2C1F;          /* errors: 6.44 on parchment */
  --wash-ok: #E3EAD5;
  --wash-bad: #F6E1D9;

  /* type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --step--1: 0.875rem;                                   /* 14 */
  --step-0: 1.0625rem;                                   /* 17 body */
  --step-1: 1.1875rem;                                   /* 19 */
  --step-2: clamp(1.375rem, 1.24rem + 0.6vw, 1.625rem);  /* 22 → 26 */
  --step-3: clamp(1.75rem, 1.45rem + 1.3vw, 2.375rem);   /* 28 → 38 */
  --step-4: clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem);    /* 34 → 52 */
  --step-5: clamp(2.625rem, 1.7rem + 4.4vw, 5rem);       /* 42 → 80 */

  /* space rungs */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* layout */
  --content: 72rem;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 0 rgba(16, 26, 15, .04), 0 10px 28px -16px rgba(16, 26, 15, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --focus: 0 0 0 3px var(--parchment), 0 0 0 6px var(--bark);
  --compass-needle: var(--bark);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  font-feature-settings: "kern", "liga", "onum";
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
p { margin: 0; }
p + p { margin-top: var(--s-4); }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--forest) 45%, transparent); }
a:hover { color: var(--forest-deep); text-decoration-color: var(--bark); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
::selection { background: var(--line); color: var(--ink); }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
main { display: block; outline: none; }
pre { margin: 0; }
.icon { width: 1em; height: 1em; flex: none; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--forest); color: var(--on-dark); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

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

.section { padding-block: clamp(var(--s-8), 9vw, 112px); }
.section--tight { padding-block: clamp(var(--s-6), 5vw, var(--s-8)); }
.section--card { background: var(--card); border-block: 1px solid var(--line); }

/* ---------- 3. Type pieces ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bark-text);
  margin-bottom: var(--s-3);
}
.section-head { max-width: 40rem; margin-bottom: var(--s-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-title { font-size: var(--step-4); }
.section-head .lede, .section-title + .lede { margin-top: var(--s-4); }
.lede { font-size: var(--step-1); line-height: 1.65; max-width: 40rem; }
.lede--lg { font-size: var(--step-2); line-height: 1.5; font-style: italic; }
.page-title { font-size: var(--step-5); line-height: 1.02; letter-spacing: -0.022em; font-weight: 700; }
.page-title + .lede { margin-top: var(--s-5); }
.block-title { font-size: var(--step-3); margin-bottom: var(--s-5); }
.block-title--sm { font-size: var(--step-2); margin: var(--s-7) 0 var(--s-4); }
.prose p + p { margin-top: var(--s-4); }
.prose--lead { font-size: var(--step-1); font-style: italic; margin-bottom: var(--s-7); }
.prose--note { border-left: 2px dashed var(--line); padding-left: var(--s-5); }
.prose-p { margin-block: var(--s-5); }
.page-note { font-size: var(--step--1); font-style: italic; margin-top: var(--s-7); max-width: 46rem; }
.page-note--center { text-align: center; margin: 0 auto var(--s-6); }
.empty-line { font-style: italic; }

/* ---------- 4. Buttons + links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border-radius: 10px; border: 1.5px solid transparent;
  font-family: var(--font-body); font-weight: 500; font-size: var(--step-0); line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: normal; text-align: center;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn__icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn__icon--lead { order: -1; }
.btn:hover .btn__icon:not(.btn__icon--lead) { transform: translateX(3px); }
.btn--primary { background: var(--forest); color: var(--on-dark); }
.btn--primary:hover { background: var(--forest-deep); color: var(--on-dark); }
.btn--ghost { background: transparent; color: var(--forest); border: 1.5px dashed var(--forest); }
.btn--ghost:hover { background: var(--muted); color: var(--forest-deep); border-style: solid; }
.btn--quiet { background: transparent; color: var(--forest); border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn--quiet:hover { color: var(--forest-deep); text-decoration-color: var(--bark); }
.btn--sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--step--1); }
.btn--lg { min-height: 54px; padding: 0 var(--s-6); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn-row--center { justify-content: center; }
.link-arrow { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 500; text-decoration: none; white-space: nowrap; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; border: 1.5px dashed var(--edge); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--muted); border-style: solid; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--parchment);
  border-bottom: 1px solid var(--line);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: var(--header-h); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark:hover { color: var(--ink); }
.wordmark__compass { width: 34px; height: 34px; color: var(--forest); transition: transform .6s var(--ease); }
.wordmark:hover .wordmark__compass { transform: rotate(-20deg); }
.wordmark__text { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; line-height: 1.1; }
.site-nav__list { list-style: none; display: flex; gap: var(--s-1); }
.site-nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  font-size: 0.9688rem; color: var(--ink); text-decoration: none; border-radius: var(--radius-sm); position: relative;
}
.site-nav__link::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 8px;
  border-bottom: 1.5px dashed var(--bark); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.site-nav__link:hover { color: var(--forest); }
.site-nav__link:hover::after, .site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--forest); font-weight: 500; }
.site-nav__link[aria-current="page"]::after { border-bottom-style: solid; border-color: var(--forest); }
.menu-toggle { display: none; }

/* her logo (a picture: forest + rust on see-through), sized by height */
.logo { width: auto; height: 44px; }
/* her mark is tall and the wordmark sits small beside it, so the logo runs taller than a plain
   wordmark would: 60 px on desktop (header 80), 46 px on phones (header stays 68) */
.logo--header { height: 46px; }
@media (min-width: 900px) {
  :root { --header-h: 80px; }
  .logo--header { height: 60px; }
}
.wordmark:has(.logo) { padding-block: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .logo--header { transition: transform .5s var(--ease); transform-origin: 20% 50%; }
  .wordmark:hover .logo--header { transform: rotate(-2deg); }
}

/* home: header floats over the hero */
.is-home .site-header { position: absolute; inset: 0 0 auto 0; background: transparent; border-color: transparent; }
.js .is-home .site-header { position: fixed; }
.js .is-home .site-header.is-scrolled { background: var(--parchment); border-color: var(--line); box-shadow: 0 8px 24px -20px rgba(16, 26, 15, .5); }
/* over a hero PHOTO the header keeps a soft parchment scrim: her forest-and-rust logo cannot turn light,
   and the links stay ink, so the bar reads on any picture */
.has-hero-photo .site-header {
  background: color-mix(in srgb, var(--parchment) 90%, transparent);
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.05); backdrop-filter: blur(10px) saturate(1.05);
}

/* phones + tablets: hamburger with a full-width panel (JS); a wrapped link row without JS */
@media (max-width: 899.98px) {
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: var(--s-2); }
  html:not(.js) .site-nav { width: 100%; }
  html:not(.js) .site-nav__list { flex-wrap: wrap; gap: 0 var(--s-1); margin-inline: calc(var(--s-3) * -1); }

  .js .menu-toggle {
    display: inline-grid; place-items: center; width: 48px; height: 48px;
    border: 1.5px dashed currentColor; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  }
  .js .menu-toggle .icon { width: 22px; height: 22px; }
  .js .menu-toggle__close { display: none; }
  .js .menu-open .menu-toggle__open { display: none; }
  .js .menu-open .menu-toggle__close { display: block; }
  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    background: var(--parchment); border-top: 1px solid var(--line);
    padding: var(--s-6) var(--gutter) var(--s-8);
    overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
  }
  .js .menu-open .site-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .js .site-nav__list { flex-direction: column; gap: 0; }
  .js .site-nav__link {
    display: flex; min-height: 64px; padding: 0; border-bottom: 1px dashed var(--line); border-radius: 0;
    font-family: var(--font-display); font-weight: 600; font-size: var(--step-3); color: var(--ink);
  }
  .js .site-nav__link::after { display: none; }
  .js .site-nav__link[aria-current="page"] { color: var(--forest); }
  .js .site-nav__link[aria-current="page"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bark); margin-right: var(--s-3); }
  .js .menu-open .site-header { background: var(--parchment) !important; border-color: var(--line) !important; }
  .js .menu-open .site-header .wordmark, .js .menu-open .site-header .menu-toggle { color: var(--ink) !important; }
  .js .menu-open .site-header .wordmark__compass { color: var(--forest) !important; }
}
body.menu-locked { overflow: hidden; }
html.is-frames.menu-locked, html.is-frames.menu-locked body { overflow: hidden; } /* snap pages scroll on <html>: lock both */

.announce { background: var(--forest); color: var(--on-dark); }
.announce__inner { display: flex; align-items: center; gap: var(--s-3); padding-block: var(--s-3); font-size: var(--step--1); }
.announce__icon { width: 20px; height: 20px; --compass-needle: var(--bark-light); }

/* ---------- 6. Home hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-top: calc(var(--header-h) + var(--s-7));
  padding-bottom: calc(var(--s-10) + var(--s-2));
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__inner { position: relative; }
.hero__eyebrow, .hero__announce {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 14px 6px 10px; border-radius: 999px; border: 1.5px dashed currentColor;
  font-size: var(--step--1); font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.hero__eyebrow .icon, .hero__announce .icon { width: 18px; height: 18px; }
.hero__announce { display: flex; width: fit-content; max-width: 100%; text-transform: none; letter-spacing: 0; margin-bottom: var(--s-3); background: var(--forest); color: var(--on-dark); border-style: solid; border-color: var(--forest); --compass-needle: var(--bark-light); }
.hero__title { margin-top: var(--s-5); font-size: var(--step-5); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; max-width: 15ch; }
.hero__sub { margin-top: var(--s-5); font-size: var(--step-1); line-height: 1.6; max-width: 36rem; }
.hero .btn-row { margin-top: var(--s-6); }

.hero--paper { color: var(--ink-soft); }
.hero--paper .hero__eyebrow { color: var(--bark-text); }
.hero--paper .hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 15% 85%, var(--parchment) 30%, color-mix(in srgb, var(--parchment) 40%, transparent) 70%, transparent 100%);
}
.hero--paper .ph--hero .ph__compass { opacity: .5; }

.hero--photo { color: var(--on-dark); }
.hero--photo .hero__title { color: var(--on-dark); }
.hero--photo .hero__sub { color: color-mix(in srgb, var(--on-dark) 90%, transparent); }
/* on short screens the eyebrow stamp rides up over the bright sky: give it its own ground */
.hero--photo .hero__eyebrow { background: rgba(16, 26, 15, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.hero--photo .hero__media::after {
  content: ""; position: absolute; inset: 0;
  /* tuned to her farm photo (bright sky, mid-tone field, a white greenhouse behind the headline):
     a bottom-up fade plus a left-hand wash under the words; measured in DESIGN.md */
  background:
    linear-gradient(to right, rgba(16, 26, 15, .5) 0%, rgba(16, 26, 15, .3) 45%, rgba(16, 26, 15, 0) 75%),
    linear-gradient(to top, rgba(16, 26, 15, .92) 0%, rgba(16, 26, 15, .62) 45%, rgba(16, 26, 15, .2) 85%);
}
.hero--photo .btn--ghost { color: var(--on-dark); border-color: color-mix(in srgb, var(--on-dark) 75%, transparent); }
.hero--photo .btn--ghost:hover { background: rgba(245, 236, 214, .12); color: var(--on-dark); }
.hero--photo .btn--primary { background: var(--parchment); color: var(--forest); }
.hero--photo .btn--primary:hover { background: var(--card); color: var(--forest-deep); }
.hero--photo :focus-visible { box-shadow: 0 0 0 3px var(--ground), 0 0 0 6px var(--bark-light); }

/* the round scroll-down arrow */
.scroll-arrow {
  position: absolute; left: 50%; bottom: var(--s-6); z-index: 2;
  display: grid; place-items: center; width: 56px; height: 56px; margin-left: -28px;
  border-radius: 50%; background: var(--forest); color: var(--on-dark);
  box-shadow: 0 10px 24px -12px rgba(16, 26, 15, .7);
  transition: background-color .2s var(--ease);
}
.scroll-arrow .icon { width: 26px; height: 26px; }
.scroll-arrow:hover { background: var(--forest-deep); color: var(--on-dark); }
.hero--photo .scroll-arrow { background: var(--parchment); color: var(--forest); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-arrow { animation: nudge 2.6s var(--ease) infinite; }
  .scroll-arrow:hover, .scroll-arrow:focus-visible { animation-play-state: paused; }
}
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(7px); } }

/* ---------- 7. Page heroes (inner pages) ---------- */
.page-hero { padding-block: clamp(var(--s-7), 8vw, var(--s-9)) clamp(var(--s-6), 5vw, var(--s-8)); border-bottom: 1px dashed var(--line); }
.page-hero__inner { max-width: 48rem; }
.page-hero__inner--count { display: grid; gap: var(--s-6); max-width: none; align-items: end; }
.page-hero .btn-row { margin-top: var(--s-6); }
.page-hero--media { border-bottom: 0; padding-bottom: 0; }
.page-hero--media .page-hero__inner { margin-bottom: var(--s-7); }
.page-hero__grid { display: grid; gap: var(--s-7); align-items: center; }
.page-hero__media { max-width: 28rem; }
.bleed-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 900px) {
  .page-hero__inner--count { grid-template-columns: 1fr auto; }
  .page-hero__grid { grid-template-columns: 1.3fr 1fr; }
  .page-hero__media { max-width: none; }
}
.tally { display: flex; align-items: baseline; gap: var(--s-3); color: var(--ink); }
.tally__n { font-family: var(--font-display); font-weight: 700; font-size: var(--step-5); line-height: 1; color: var(--forest); }
.tally__label { font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase; color: var(--bark-text); font-weight: 500; }

.jump ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.jump__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border-radius: 999px;
  border: 1.5px dashed var(--edge); background: var(--card); color: var(--forest); text-decoration: none; font-size: var(--step--1); line-height: 1.35;
}
.jump__link:hover { border-style: solid; border-color: var(--forest); background: var(--muted); }

/* ---------- 8. Placeholder + media ---------- */
.ph {
  position: relative; overflow: hidden; display: grid; place-items: center;
  background:
    radial-gradient(120% 100% at 30% 20%, var(--card) 0%, transparent 60%),
    linear-gradient(160deg, #F2E6CB 0%, var(--parchment) 55%, #EFE2C3 100%);
  color: color-mix(in srgb, var(--bark) 30%, transparent);
  aspect-ratio: 16 / 10;
}
.ph__topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph__topo .ph__index { stroke-width: 1.6; stroke: color-mix(in srgb, var(--bark) 42%, transparent); }
.ph__compass { position: absolute; right: 7%; bottom: 9%; width: 16%; max-width: 72px; min-width: 32px; color: color-mix(in srgb, var(--forest) 45%, transparent); --compass-needle: color-mix(in srgb, var(--bark) 70%, transparent); }
.ph__compass .icon { width: 100%; height: auto; aspect-ratio: 1; }
.ph__initials {
  position: relative; display: grid; place-items: center;
  width: 30%; max-width: 112px; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--forest) 55%, transparent);
  outline: 1.5px dashed color-mix(in srgb, var(--forest) 40%, transparent); outline-offset: 5px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 5vw, 2.1rem); letter-spacing: .04em;
  color: color-mix(in srgb, var(--forest) 80%, transparent);
  transform: rotate(-8deg);
}
.ph--hero { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; }
.ph--hero .ph__compass { width: 26vw; max-width: 360px; right: -4%; bottom: auto; top: 14%; opacity: .5; }
.ph--wide { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
.ph--banner { aspect-ratio: 21 / 9; }
.ph--portrait { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); border: 1px solid var(--line); }
@media (max-width: 599.98px) { .ph--banner { aspect-ratio: 4 / 3; } }
.media { overflow: hidden; background: var(--muted); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--card { aspect-ratio: 16 / 10; }
.media--wide { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
.media--banner { aspect-ratio: 21 / 9; }
.media--portrait { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); }
figcaption { font-size: var(--step--1); font-style: italic; margin-top: var(--s-3); }
/* her three photos are 4:3; the crops keep the rider (or the horse) in frame */
.hero__media img { object-position: 42% 60%; }
.how__figure .media img { object-position: 52% 60%; }
.page-hero--media .bleed-media .media img { object-position: 50% 62%; }

/* ---------- 9. Stamps, lozenges, hoofprints ---------- */
.stamps { list-style: none; display: flex; flex-wrap: wrap; }
.stamp { display: inline-flex; align-items: center; color: var(--forest); }
.stamp__mark { flex: none; overflow: visible; }
.stamp__ring { fill: none; stroke: currentColor; stroke-width: 1.5; }
.stamp__inner { fill: none; stroke: currentColor; stroke-width: .8; opacity: .55; }
.stamp__glyph { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stamp__strike { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.stamp--yes .stamp__ring { fill: var(--forest); stroke: var(--forest); }
.stamp--yes .stamp__inner { stroke: var(--card); opacity: .7; }
.stamp--yes .stamp__glyph { stroke: var(--card); }
.stamp--no { color: var(--forest); }
.stamp--no .stamp__inner { opacity: 0; }
.stamp--pending .stamp__ring, .stamp--unknown .stamp__ring { stroke-dasharray: 3.2 2.6; }
.stamp--pending .stamp__inner, .stamp--unknown .stamp__inner { opacity: 0; }
.stamp--pending, .stamp--unknown { color: var(--ink-soft); }

.stamps--sm { gap: var(--s-2) var(--s-3); }
.stamp--sm { gap: 6px; font-size: 0.8125rem; line-height: 1.2; }
.stamp--sm .stamp__mark { width: 26px; height: 26px; }
.stamp--sm .stamp__label { color: var(--ink-soft); }
.stamp--sm.stamp--yes .stamp__label { color: var(--forest); font-weight: 500; }
.stamp--sm.stamp--no .stamp__label { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-soft) 60%, transparent); }

.stamps--lg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
@media (min-width: 600px) { .stamps--lg { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stamp--lg { flex-direction: column; text-align: center; gap: var(--s-2); }
.stamp--lg .stamp__mark { width: 76px; height: 76px; margin-bottom: var(--s-1); transform: rotate(-6deg); }
.stamp--lg:nth-child(even) .stamp__mark { transform: rotate(5deg); }
.stamp--lg .stamp__ring { stroke-width: 1.2; }
.stamp--lg .stamp__glyph { stroke-width: 1.4; }
.stamp--lg .stamp__label { font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.25; color: var(--ink); }
.stamp--lg .stamp__value { font-size: var(--step--1); color: var(--ink-soft); }
.stamp--lg.stamp--yes .stamp__value { color: var(--forest); font-weight: 500; }
.stamp-key { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); font-size: var(--step--1); }
.stamp-key__item { display: inline-flex; align-items: center; gap: 6px; }
.stamp--key .stamp__mark { width: 20px; height: 20px; }
.stamp--tile .stamp__mark { width: 40px; height: 40px; }

.lozenge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px;
  border-radius: 999px; border: 1px solid var(--edge); background: var(--card);
  font-size: 0.8125rem; font-weight: 500; line-height: 1.3; color: var(--ink); white-space: nowrap;
}
.lozenge__dot { width: 8px; height: 8px; transform: rotate(45deg); border-radius: 1px; background: currentColor; }
.lozenge--general { color: var(--forest); border-color: color-mix(in srgb, var(--forest) 55%, transparent); }
.lozenge--moderate { color: var(--bark-text); border-color: color-mix(in srgb, var(--bark) 70%, transparent); }
.lozenge--adult { color: var(--rust); border-color: color-mix(in srgb, var(--rust) 55%, transparent); }
.lozenge--unknown { color: var(--ink-soft); border-style: dashed; }
.lozenge--tile { font-size: 0.75rem; white-space: nowrap; }
/* Seasonal trail: a filled bark-text pill with a round dot (shape differs from the region diamond);
   card on bark-text = 5.45:1 */
.lozenge--seasonal { background: var(--bark-text); border-color: var(--bark-text); color: var(--card); }
.lozenge--seasonal .lozenge__dot { transform: none; border-radius: 50%; width: 7px; height: 7px; }
.lozenge--sm { font-size: 0.75rem; padding: 2px 8px 2px 7px; }

.hoofs { display: inline-flex; gap: 2px; color: var(--forest); vertical-align: middle; }
.hoofs .hoof { width: 18px; height: 18px; }
.hoofs .is-off { color: color-mix(in srgb, var(--edge) 80%, transparent); }
.hoofs--md .hoof { width: 24px; height: 24px; }
.rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px var(--s-2); font-size: var(--step--1); }
.rating__avg { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.rating--empty .rating__count { font-style: italic; }
.crossing { display: inline-flex; align-items: center; gap: var(--s-2); }
.crossing__label { font-size: var(--step--1); }

.meta-time { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--ink-soft); }
.meta-time__icon { width: 16px; height: 16px; }

.route { display: flex; flex-direction: column; gap: 2px; position: relative; padding-left: 18px; font-size: 0.9375rem; color: var(--ink); line-height: 1.45; }
.route::before { content: ""; position: absolute; left: 4px; top: .7em; bottom: .7em; border-left: 1.5px dashed var(--bark); }
.route__end { position: relative; }
.route__end::before { content: ""; position: absolute; left: -18px; top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--parchment); border: 2px solid var(--forest); }
.route__end:last-child:not(:first-child)::before { background: var(--forest); }
.route__k { font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bark-text); margin-right: 4px; }
.route:has(.route__end:only-child)::before { display: none; }
.route--lg { font-size: var(--step-1); margin-top: var(--s-5); padding-left: 22px; }
.route--lg .route__end::before { left: -22px; width: 11px; height: 11px; }

/* ---------- 10. Home sections ---------- */
.split { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } .split__aside { position: sticky; top: calc(var(--header-h) + var(--s-6)); } }
.filter-tiles { list-style: none; display: grid; gap: var(--s-3); }
@media (min-width: 600px) { .filter-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); } }
.filter-tile {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: center; height: 100%;
  padding: var(--s-4) var(--s-5) var(--s-4) var(--s-4); background: var(--card);
  border: 1.5px dashed var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink-soft);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.filter-tile:hover { border-color: var(--bark); border-style: solid; color: var(--ink-soft); box-shadow: var(--shadow); }
.filter-tile__mark { display: grid; place-items: center; min-width: 44px; }
.filter-tile__icon { width: 34px; height: 34px; color: var(--forest); }
.filter-tile__text { display: grid; gap: 2px; }
.filter-tile__label { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--ink); line-height: 1.25; }
.filter-tile__note { font-size: 0.9375rem; line-height: 1.5; }
.filter-tile__arrow { width: 20px; height: 20px; color: var(--forest); transition: transform .2s var(--ease); }
.filter-tile:hover .filter-tile__arrow { transform: translateX(4px); }

.section-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4) var(--s-6); margin-bottom: var(--s-7); }
.section-head-row .section-head { margin-bottom: 0; }

.trail-rule { position: relative; border-top: 1.5px dashed var(--line); margin-block: 0; }
.trail-rule__mark { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); background: var(--parchment); padding: 0 var(--s-3); color: var(--bark); }
.trail-rule__hoof { width: 22px; height: 22px; }

.how { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .how { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--s-9); } }
.steps { list-style: none; display: grid; gap: var(--s-5); counter-reset: none; }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; }
.step__no {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px dashed var(--forest); color: var(--forest);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: .02em;
}
.step__title { font-size: var(--step-2); margin: 6px 0 var(--s-2); }
.step__body { line-height: 1.65; }
.steps--row { gap: var(--s-4); }
.steps--row .step__body { padding-top: 10px; }
@media (min-width: 900px) {
  .steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
  .steps--row .step { grid-template-columns: 1fr; gap: var(--s-3); padding-top: var(--s-4); border-top: 1.5px dashed var(--line); }
  .steps--row .step__body { padding-top: 0; }
}
.how__figure { margin: 0; }

.info-grid { list-style: none; display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); } }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-6) var(--s-5); position: relative; }
.info-card::before { content: ""; position: absolute; inset: 8px; border: 1px dashed var(--line); border-radius: calc(var(--radius-lg) - 6px); pointer-events: none; }
.info-card__mark { display: block; margin-bottom: var(--s-5); }
.info-card__icon { width: 40px; height: 40px; color: var(--forest); }
.info-card__title { font-size: var(--step-2); margin-bottom: var(--s-3); }
.info-card__body { font-size: 1rem; }

.cta-band { padding-top: 0; }
.cta-card {
  position: relative; overflow: hidden; text-align: center;
  background: var(--forest); color: color-mix(in srgb, var(--on-dark) 92%, transparent);
  border-radius: var(--radius-lg); padding: clamp(var(--s-7), 7vw, var(--s-9)) var(--s-5);
}
.cta-card::before { content: ""; position: absolute; inset: 10px; border: 1.5px dashed rgba(245, 236, 214, .35); border-radius: calc(var(--radius-lg) - 6px); pointer-events: none; }
.cta-card__mark { display: inline-block; color: var(--on-dark); --compass-needle: var(--bark-light); margin-bottom: var(--s-5); }
.cta-card__compass { width: 52px; height: 52px; }
.cta-card__title { color: var(--on-dark); font-size: var(--step-4); max-width: 22ch; margin-inline: auto; }
.cta-card__body { max-width: 36rem; margin: var(--s-4) auto var(--s-6); font-size: var(--step-1); line-height: 1.6; }
.cta-card .btn--primary { background: var(--parchment); color: var(--forest); }
.cta-card .btn--primary:hover { background: var(--card); color: var(--forest-deep); }
.cta-card .btn--ghost { color: var(--on-dark); border-color: rgba(245, 236, 214, .7); }
.cta-card .btn--ghost:hover { background: rgba(245, 236, 214, .1); color: var(--on-dark); }
.cta-card :focus-visible { box-shadow: 0 0 0 3px var(--forest), 0 0 0 6px var(--bark-light); }

/* ---------- 11. Trail cards ---------- */
.card-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card-grid--four { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.trail-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.trail-card:hover, .trail-card:focus-within { border-color: var(--bark); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .trail-card:hover { transform: translateY(-2px); } }
.trail-card__media { display: block; border-bottom: 1px solid var(--line); }
.trail-card__media .ph, .trail-card__media .media { border-radius: 0; }
.trail-card__body { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); flex: 1; }
.trail-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.trail-card__title { font-size: var(--step-2); line-height: 1.15; }
.trail-card__title a { color: var(--ink); text-decoration: none; }
.trail-card__title a:hover { color: var(--forest); text-decoration: underline; text-decoration-color: var(--bark); }
.trail-card__rating { padding-top: var(--s-1); }
.trail-card .stamps { padding-top: var(--s-3); border-top: 1px dashed var(--line); }
.trail-card__cta {
  margin-top: auto; padding-top: var(--s-2); display: inline-flex; align-items: center; gap: var(--s-2); align-self: flex-start;
  font-weight: 500; text-decoration: none; min-height: 40px;
}
.trail-card__arrow { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.trail-card__cta:hover .trail-card__arrow { transform: translateX(4px); }

/* ---------- 12. Directory ---------- */
.atlas-form { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); }
.search-row .field__label { display: block; margin-bottom: var(--s-2); }
.search-row__box { position: relative; display: flex; gap: var(--s-2); }
.search-row__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-soft); pointer-events: none; }
.input.input--search { padding-left: 44px; flex: 1; min-width: 0; } /* two classes: the later .input rule set the padding back to 14px */
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.filters__summary {
  display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: 0 var(--s-5);
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--ink); cursor: pointer; list-style: none;
}
.filters__summary::-webkit-details-marker { display: none; }
.filters__badge { font-family: var(--font-body); font-size: 0.8125rem; font-weight: 500; background: var(--forest); color: var(--on-dark); border-radius: 999px; padding: 2px 10px; }
.filters__chev { width: 20px; height: 20px; margin-left: auto; color: var(--forest); transition: transform .2s var(--ease); }
.filters[open] .filters__chev { transform: rotate(180deg); }
.filters__body { padding: 0 var(--s-5) var(--s-5); display: grid; gap: var(--s-5); border-top: 1px dashed var(--line); padding-top: var(--s-5); }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); min-width: 0; }
.chip { position: relative; display: inline-flex; }
.chip__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip__face {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 4px 16px 4px 8px;
  border-radius: 999px; background: var(--muted); border: 1.5px dashed var(--edge);
  color: var(--ink); font-size: 0.9375rem; line-height: 1.3; cursor: pointer; user-select: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.chip__face:hover { border-color: var(--forest); border-style: solid; }
.chip .stamp--chip .stamp__mark { width: 26px; height: 26px; }
.chip .stamp--chip { color: var(--forest); }
.chip__input:checked + .chip__face { background: var(--forest); border: 1.5px solid var(--forest); color: var(--on-dark); }
.chip__input:checked + .chip__face .stamp--chip { color: var(--on-dark); }
.chip__input:checked + .chip__face .stamp__inner { opacity: .6; }
.chip__input:focus-visible + .chip__face { box-shadow: var(--focus); }
.selects { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.js .filters__apply { display: none; }
.js .filters__actions:not(:has(a)) { display: none; }
.results__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-5); padding-bottom: var(--s-4); border-bottom: 1.5px dashed var(--line); }
.results__count { font-size: var(--step-3); }
.results__q { font-style: italic; }

.empty { text-align: center; padding: var(--s-8) var(--s-5); background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
.empty__mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1.5px dashed var(--forest); color: var(--forest); margin-bottom: var(--s-4); }
.empty__mark .icon { width: 30px; height: 30px; }
.empty__title { font-size: var(--step-2); margin-bottom: var(--s-3); }
.empty p { max-width: 32rem; margin-inline: auto; }
.empty .btn { margin-top: var(--s-5); }
.empty--inline { padding: var(--s-7) var(--s-5); }

/* ---------- 13. Trail page ---------- */
.crumbs { padding-top: var(--s-5); }
.crumbs a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-size: 0.9375rem; text-decoration: none; }
.crumbs a .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.crumbs a:hover .icon { transform: translateX(-3px); }
.trail-hero { padding-block: var(--s-4) var(--s-8); }
.trail-hero__grid { display: grid; gap: var(--s-6); }
.trail-hero__media { order: -1; }
@media (min-width: 900px) {
  .trail-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--s-8); }
  .trail-hero__media { order: 0; }
}
.trail-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.trail-title { font-size: var(--step-5); font-weight: 700; line-height: 1.02; letter-spacing: -0.024em; margin-top: var(--s-4); }
.trail-hero__rating { margin-top: var(--s-5); }
.trail-hero__rating .rating { font-size: 1rem; }
.inworld { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1.5px dashed var(--line); }
.inworld__title { font-family: var(--font-body); font-size: var(--step--1); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--bark-text); margin-bottom: var(--s-3); }

.trail-layout { display: grid; gap: var(--s-7); padding-bottom: var(--s-8); }
@media (min-width: 900px) {
  .trail-layout { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s-8); align-items: start; }
  .trail-aside { order: 2; position: sticky; top: calc(var(--header-h) + var(--s-5)); }
}
.ledger { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); position: relative; }
.ledger::before { content: ""; position: absolute; inset: 7px; border: 1px dashed var(--line); border-radius: calc(var(--radius-lg) - 5px); pointer-events: none; }
.ledger__title { font-size: var(--step-2); margin-bottom: var(--s-3); }
.ledger__list { margin: 0; }
.ledger__list > div { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: var(--s-3); padding-block: var(--s-3); border-top: 1px dashed var(--line); }
.ledger__list dt { font-size: 0.8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bark-text); font-weight: 500; line-height: 1.5; padding-top: 2px; }
.ledger__list dd { margin: 0; color: var(--ink); font-size: 0.9688rem; line-height: 1.5; overflow-wrap: anywhere; }
.ledger__raw { display: block; margin-top: var(--s-2); font-size: 0.8125rem; color: var(--ink-soft); }
.ledger__raw-k { font-style: italic; }
.ledger__print { margin-top: var(--s-3); position: relative; }
/* the trail map under the ledger: full aside width, tap for the full-size dialog */
.trail-map { margin: var(--s-5) 0 0; }
.trail-map__title { font-size: var(--step-2); margin-bottom: var(--s-3); }
.trail-map__open { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.trail-map__open img { width: 100%; height: auto; transition: transform .4s var(--ease); }
.trail-map__open:hover img { transform: scale(1.02); }
.trail-map__open:hover { border-color: var(--bark); }
.trail-map__hint {
  position: absolute; right: var(--s-3); bottom: var(--s-3); display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 10px; border-radius: 999px; background: var(--forest); color: var(--on-dark); font-size: 0.8125rem; font-weight: 500;
}
.trail-map__hint-icon { width: 14px; height: 14px; order: 2; }
@media (min-width: 900px) { .trail-aside--map { position: static; } } /* ledger + map is taller than a screen: no sticky */
.dialog--map { width: min(72rem, calc(100vw - 24px)); }
.dialog__map { display: block; margin-top: var(--s-4); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.dialog__map img { width: 100%; height: auto; max-height: calc(100dvh - 190px); object-fit: contain; }

.trail-block + .trail-block { margin-top: var(--s-8); }
.block-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.block-head .block-title { margin-bottom: 0; }
.avg-line { margin-top: var(--s-2); font-size: 0.9375rem; }
.avg-line strong { font-family: var(--font-display); color: var(--ink); font-size: 1.25rem; }

.notes { display: grid; gap: var(--s-4); }
.notes--wall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--s-5); align-items: start; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); display: grid; gap: var(--s-4); }
.note__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.note__trail { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.note__trail a { color: var(--ink); text-decoration: none; }
.note__trail a:hover { color: var(--forest); text-decoration: underline; }
.note__body { font-size: 1rem; overflow-wrap: anywhere; }
.note__photo { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.note__photo img { width: 100%; max-height: 360px; object-fit: cover; transition: transform .4s var(--ease); }
.note__photo:hover img { transform: scale(1.02); }
.note__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); padding-top: var(--s-3); border-top: 1px dashed var(--line); font-size: 0.875rem; }
.note__name { color: var(--ink); font-weight: 500; }
.note__when { font-style: italic; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); padding-block: var(--s-6) var(--s-8); border-top: 1.5px dashed var(--line); }
.pager__link { display: grid; gap: var(--s-1); padding: var(--s-4); border-radius: var(--radius); text-decoration: none; border: 1px solid transparent; }
.pager__link:hover { background: var(--card); border-color: var(--line); }
.pager__link--next { text-align: right; justify-items: end; grid-column: 2; }
.pager__k { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bark-text); }
.pager__k .icon { width: 16px; height: 16px; }
.pager__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--ink); line-height: 1.25; }

/* ---------- 14. Dialog ---------- */
.dialog {
  width: min(40rem, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--parchment); color: var(--ink-soft); box-shadow: 0 30px 80px -30px rgba(16, 26, 15, .6);
}
.dialog::backdrop { background: rgba(16, 26, 15, .55); backdrop-filter: blur(2px); }
.dialog[open]:not(:modal) { position: relative; margin: var(--s-6) auto var(--s-8); }
.dialog__panel { padding: var(--s-5); }
@media (min-width: 600px) { .dialog__panel { padding: var(--s-6); } }
.dialog__head { display: flex; justify-content: space-between; align-items: start; gap: var(--s-4); }
.dialog__head .eyebrow { margin-bottom: var(--s-2); }
.dialog__title { font-size: var(--step-3); }
.dialog__intro { margin: var(--s-3) 0 var(--s-5); }
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: rise .25s var(--ease); }
  .dialog[open]::backdrop { animation: fade .25s var(--ease); }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 15. Forms ---------- */
.form-split { display: grid; gap: var(--s-7); }
@media (min-width: 900px) {
  .form-split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-8); align-items: start; }
  .form-split__aside { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
}
.form-index { list-style: none; counter-reset: fi; margin-top: var(--s-6); display: grid; gap: var(--s-2); }
.form-index li { counter-increment: fi; display: flex; align-items: center; gap: var(--s-3); font-size: 0.9375rem; color: var(--ink); }
.form-index li::before { content: counter(fi); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px dashed var(--forest); color: var(--forest); font-family: var(--font-display); font-weight: 700; font-size: 0.8125rem; }
.form-card { background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); }
@media (min-width: 600px) { .form-card { padding: var(--s-6); } }
.form { display: grid; gap: var(--s-5); }
.form-section { border: 0; margin: 0; padding: 0 0 var(--s-5); display: grid; gap: var(--s-5); border-bottom: 1.5px dashed var(--line); min-width: 0; }
.form-section:last-of-type { border-bottom: 0; padding-bottom: 0; }
.form-section__title { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); color: var(--ink); padding: 0; margin-bottom: var(--s-1); float: left; width: 100%; }
.form-section__title + * { clear: both; }
.form-section__no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--forest); color: var(--on-dark); font-size: 0.875rem; font-weight: 700; flex: none; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field-pair { display: grid; gap: var(--s-5); }
@media (min-width: 600px) { .field-pair { grid-template-columns: 1fr 1fr; } }
.field__label { font-weight: 500; color: var(--ink); font-size: 1rem; line-height: 1.4; padding: 0; }
.req { color: var(--rust); }
.field__hint { font-size: 0.875rem; line-height: 1.5; margin: -2px 0 2px; }
.field__error { font-size: 0.875rem; color: var(--rust); font-weight: 500; display: flex; gap: 6px; align-items: baseline; }
.field__error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--rust); color: var(--card); font-size: 0.6875rem; font-weight: 700; flex: none; transform: translateY(2px); }
.input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--edge); border-radius: 10px;
  font-size: 1rem; line-height: 1.5; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder { color: color-mix(in srgb, var(--ink-soft) 80%, transparent); font-style: italic; }
.input:hover { border-color: var(--forest); }
.input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bark) 45%, transparent); }
.has-error .input, .input[aria-invalid="true"] { border-color: var(--rust); background: #FFF8F3; }
.input--area { min-height: 140px; resize: vertical; }
.select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%232D4A2B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.input--file { padding: 10px; font-size: 0.9375rem; cursor: pointer; }
.input--file::file-selector-button { margin-right: var(--s-3); border: 1.5px dashed var(--forest); background: transparent; color: var(--forest); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
.input--file::file-selector-button:hover { background: var(--muted); }
.photo-preview { display: flex; align-items: center; gap: var(--s-3); font-size: 0.875rem; }
.photo-preview img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); padding-top: var(--s-2); }
.form__note { display: flex; gap: var(--s-3); align-items: flex-start; font-size: 0.9375rem; font-style: italic; }
.form__note-icon { width: 24px; height: 24px; color: var(--forest); margin-top: 2px; }

/* hoofprint rating input */
.rate { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rate__hoof { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; color: color-mix(in srgb, var(--edge) 70%, transparent); transition: color .12s var(--ease), transform .12s var(--ease); }
.rate__hoof .icon { width: 30px; height: 30px; }
.rate__hoof:hover { transform: translateY(-2px); }
.rate__input:focus-visible + .rate__hoof { box-shadow: var(--focus); }
.rate__input:checked + .rate__hoof { color: var(--forest); }
.rate:has(.rate__input:nth-of-type(1):checked) .rate__hoof:nth-of-type(-n+1),
.rate:has(.rate__input:nth-of-type(2):checked) .rate__hoof:nth-of-type(-n+2),
.rate:has(.rate__input:nth-of-type(3):checked) .rate__hoof:nth-of-type(-n+3),
.rate:has(.rate__input:nth-of-type(4):checked) .rate__hoof:nth-of-type(-n+4),
.rate:has(.rate__input:nth-of-type(5):checked) .rate__hoof:nth-of-type(-n+5) { color: var(--forest); }
.rate:has(.rate__hoof:hover) .rate__hoof { color: color-mix(in srgb, var(--edge) 70%, transparent); }
.rate .rate__hoof:has(~ .rate__hoof:hover), .rate .rate__hoof:hover { color: var(--bark) !important; }
.rate__value { margin-left: var(--s-2); font-family: var(--font-display); font-weight: 600; color: var(--ink); }

/* segmented Yes / No / Pending / Unknown */
.segmented-field { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-2); min-width: 0; }
.segmented-field__label { display: flex; align-items: center; gap: var(--s-2); font-weight: 500; color: var(--ink); padding: 0; margin-bottom: var(--s-2); }
.segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--edge); border-radius: 10px; overflow: hidden; background: var(--card); }
.segmented__opt { display: grid; place-items: center; min-height: 44px; padding: 4px 6px; font-size: 0.9375rem; cursor: pointer; color: var(--ink); text-align: center; border-left: 1px solid var(--line); transition: background-color .15s var(--ease); }
.segmented__opt:first-of-type { border-left: 0; }
.segmented__opt:hover { background: var(--muted); }
.segmented__input:checked + .segmented__opt { background: var(--forest); color: var(--on-dark); font-weight: 500; }
.segmented__input:checked + .segmented__opt--no { background: var(--ink-soft); }
.segmented__input:checked + .segmented__opt--pending, .segmented__input:checked + .segmented__opt--unknown { background: var(--muted); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--forest); }
.segmented__input:focus-visible + .segmented__opt { box-shadow: inset 0 0 0 3px var(--bark); }

/* inline notices */
.notice { display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--radius); margin-bottom: var(--s-5); border: 1.5px solid; outline: none; }
.notice--success { background: var(--wash-ok); border-color: var(--forest); color: var(--forest-deep); }
.notice--error { background: var(--wash-bad); border-color: var(--rust); color: #6E1F15; }
.notice__mark .icon { width: 26px; height: 26px; }
.notice__title { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: inherit; }
.notice__text p + p { margin-top: var(--s-1); }
.notice__list { margin-top: var(--s-2); padding-left: 1.1em; font-size: 0.9375rem; }
.notice__list a { color: inherit; }

/* ---------- 16. About, FAQ, HUDs ---------- */
.story { display: grid; gap: var(--s-7); margin-top: var(--s-2); }
.story__part { position: relative; padding-left: 64px; }
.story__no { position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed var(--forest); color: var(--forest); font-family: var(--font-display); font-weight: 700; transform: rotate(-6deg); }
.story__title { font-size: var(--step-2); margin-bottom: var(--s-3); }
.folk { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .folk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "list fig" "join fig"; align-items: start; gap: var(--s-6) var(--s-8); } .folk__list { grid-area: list; } .join { grid-area: join; } .folk__figure { grid-area: fig; } }
.folk__list { list-style: none; display: grid; gap: var(--s-4); }
.person { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-4); background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.person__stamp { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--forest); color: var(--on-dark); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; outline: 1.5px dashed var(--forest); outline-offset: 4px; transform: rotate(-6deg); margin: 6px; }
.person__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--ink); line-height: 1.25; }
.person__handle { font-size: 0.875rem; font-style: italic; margin-top: 2px !important; }
.person__role { font-size: 0.875rem; color: var(--bark-text); letter-spacing: .06em; text-transform: uppercase; font-weight: 500; margin-top: 4px !important; }
.join { padding: var(--s-5); border: 1.5px dashed var(--forest); border-radius: var(--radius-lg); }
.join__title { font-size: var(--step-2); margin-bottom: var(--s-2); }
.join .btn-row { margin-top: var(--s-4); }
.folk__figure { margin: 0; }

.faq-group + .faq-group { margin-top: var(--s-8); }
.faq-group__title { font-size: var(--step-3); margin-bottom: var(--s-4); scroll-margin-top: calc(var(--header-h) + 16px); }
.accordion { border-top: 1.5px dashed var(--line); }
.qa { border-bottom: 1.5px dashed var(--line); }
.qa__q { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 60px; padding: var(--s-3) 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; color: var(--ink); }
.qa__q::-webkit-details-marker { display: none; }
.qa__q:hover { color: var(--forest); }
.qa__mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1.5px dashed var(--edge); color: var(--forest); transition: transform .25s var(--ease), background-color .2s var(--ease); }
.qa__mark .icon { width: 18px; height: 18px; }
.qa[open] .qa__mark { transform: rotate(180deg); background: var(--forest); color: var(--on-dark); border-color: var(--forest); }
.qa__a { padding: 0 0 var(--s-5); max-width: 42rem; }

.options { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .options { grid-template-columns: 1fr 1fr; } }
.option { background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-6) var(--s-5); }
.option__title { font-size: var(--step-2); }
.option__blurb { margin: var(--s-2) 0 var(--s-5); font-style: italic; }
.checklist { list-style: none; counter-reset: ck; display: grid; gap: var(--s-3); }
.checklist li { counter-increment: ck; position: relative; padding-left: 52px; min-height: 36px; line-height: 1.6; padding-top: 3px; }
/* numbered steps as stamped circles: a solid forest disc in a dashed ring, set slightly askew like a hand stamp */
.checklist li::before {
  content: counter(ck); position: absolute; left: 4px; top: 1px; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--forest); color: var(--on-dark); font-family: var(--font-display); font-weight: 700; font-size: 0.875rem;
  outline: 1.5px dashed var(--forest); outline-offset: 3px; transform: rotate(-8deg);
}
.checklist li:nth-child(even)::before { transform: rotate(6deg); }
.option { display: flex; flex-direction: column; }
.option__get { margin-top: auto; padding-top: var(--s-5); }
.option__get .link-arrow { padding-top: var(--s-4); border-top: 1px dashed var(--line); width: 100%; min-height: 44px; }

/* Navigation HUDs: each HUD section is the manual on the left and its product card on the right (sticky) */
.hud-layout { display: grid; gap: var(--s-6); grid-template-areas: "head" "aside" "main"; }
.hud-layout__head { grid-area: head; }
.hud-layout__aside { grid-area: aside; }
.hud-layout__main { grid-area: main; min-width: 0; max-width: 46rem; }
@media (min-width: 900px) {
  .hud-layout {
    grid-template-columns: minmax(0, 1fr) 21rem; grid-template-rows: auto 1fr;
    grid-template-areas: "head aside" "main aside"; gap: var(--s-5) var(--s-8); align-items: start;
  }
  .hud-layout__aside { position: sticky; top: calc(var(--header-h) + var(--s-5)); }
}
.hud-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-6) var(--s-5) var(--s-5); }
.hud-card::before { content: ""; position: absolute; inset: 7px; border: 1px dashed var(--line); border-radius: calc(var(--radius-lg) - 5px); pointer-events: none; }
.hud-card__mark {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--s-4);
  border-radius: 50%; border: 1.5px dashed var(--forest); color: var(--forest); transform: rotate(-6deg);
}
.hud-card__mark .icon { width: 32px; height: 32px; }
.hud-card__head { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.hud-card__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); line-height: 1.15; color: var(--ink); }
.hud-card__lead { position: relative; margin-top: var(--s-3) !important; font-style: italic; line-height: 1.6; }
.hud-card__btn { position: relative; width: 100%; margin-top: var(--s-5); }
.hud-intro { margin-top: var(--s-6); }
.hud-manual { margin-top: var(--s-7); }
.hud-manual .qa__a .keys { margin-top: 0; }
.hud-handoff { font-style: italic; color: var(--ink); }
.prose--lead-plain { font-size: var(--step-1); }
.recs-box { margin-top: var(--s-7); padding: var(--s-2) var(--s-5) var(--s-5); background: var(--card); border: 1.5px dashed var(--edge); border-radius: var(--radius-lg); }
.recs-box .block-title--sm { margin-top: var(--s-4); }
.callout { display: flex; gap: var(--s-3); align-items: flex-start; margin-top: var(--s-6); padding: var(--s-4) var(--s-5); border: 1.5px dashed var(--forest); border-radius: var(--radius); background: var(--card); color: var(--ink); }
.callout__icon { width: 26px; height: 26px; color: var(--forest); margin-top: 2px; }
.callout--quiet { border-color: var(--line); font-size: 0.9375rem; color: var(--ink-soft); }
.callout--strong { background: var(--forest); color: var(--on-dark); border-style: solid; font-weight: 500; letter-spacing: .02em; }
.callout--strong .callout__icon { color: var(--on-dark); --compass-needle: var(--bark-light); }
.keys { margin: 0; border-top: 1px dashed var(--line); }
.keys__row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-4); border-bottom: 1px dashed var(--line); }
.keys--wide .keys__row { grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); }
@media (max-width: 599.98px) { .keys__row, .keys--wide .keys__row { grid-template-columns: 1fr; gap: var(--s-2); } }
.keys dd { margin: 0; }
.keycap { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--parchment); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.8125rem; font-weight: 600; letter-spacing: .04em; box-shadow: 0 2px 0 var(--forest); white-space: nowrap; }
.keys--wide .keycap { background: var(--card); color: var(--forest); box-shadow: none; border: 1.5px solid var(--forest); font-family: var(--font-body); white-space: normal; }
.chatlog { background: var(--ground); color: #DCE8C9; padding: var(--s-5); border-radius: var(--radius); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.875rem; line-height: 1.8; overflow-x: auto; white-space: pre; }
.price-tag { display: inline-flex; align-items: center; padding: 4px 14px; border-radius: 999px; border: 1.5px dashed var(--bark); color: var(--bark-text); font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; transform: rotate(-3deg); }
.recs { list-style: none; display: grid; gap: var(--s-3); }
.recs li { padding-left: 28px; position: relative; }
.recs li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 10px; height: 10px; transform: rotate(45deg); background: var(--bark); }
.recs__warn { font-weight: 500; color: var(--rust); }

/* 404 */
.lost__inner { text-align: center; display: grid; justify-items: center; gap: var(--s-4); }
.lost__mark { color: var(--forest); }
.lost__mark .icon { width: 72px; height: 72px; }
.lost__code { font-family: var(--font-display); font-weight: 700; font-size: var(--step-4); color: var(--bark-text); letter-spacing: .1em; }
.lost .lede { margin-inline: auto; }

/* ---------- 17. Footer ---------- */
.site-footer { background: var(--ground); color: color-mix(in srgb, var(--on-dark) 82%, transparent); padding-block: var(--s-9) var(--s-6); font-size: 0.9688rem; }
.site-footer a { color: var(--on-dark); text-decoration-color: rgba(245, 236, 214, .35); }
.site-footer a:hover { color: var(--bark-light); text-decoration-color: var(--bark-light); }
.site-footer :focus-visible { box-shadow: 0 0 0 3px var(--ground), 0 0 0 6px var(--bark-light); }
.site-footer__grid { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); } }
.wordmark--light { color: var(--on-dark); text-decoration: none; }
.wordmark--light:hover { color: var(--on-dark); }
.wordmark--light .wordmark__compass { color: var(--on-dark); --compass-needle: var(--bark-light); }
/* her logo on the dark ground sits on a small parchment plate (the forest wordmark is 1.6:1 on the ground) */
.wordmark--plate:has(.logo) { background: var(--parchment); padding: 10px 18px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.logo--footer { height: 52px; }
.site-footer__mail { flex-wrap: wrap; column-gap: var(--s-2); }
.site-footer__email { font-size: 0.8125rem; color: var(--bark-light); overflow-wrap: anywhere; }
.site-footer__desc { margin-top: var(--s-5); max-width: 26rem; line-height: 1.7; }
.site-footer__note { margin-top: var(--s-5); max-width: 26rem; font-style: italic; font-size: 0.875rem; color: var(--bark-light); }
.site-footer__head { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; color: var(--on-dark); margin-bottom: var(--s-4); }
.site-footer__col ul { list-style: none; display: grid; gap: 2px; }
.site-footer__col li a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.site-footer__col li a:hover { text-decoration: underline; }
.site-footer__social { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px dashed rgba(245, 236, 214, .25); display: flex !important; flex-wrap: wrap; gap: var(--s-2) var(--s-4) !important; }
.site-footer__base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px dashed rgba(245, 236, 214, .25); font-size: 0.8125rem; }
.site-footer__stamp { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1.5px dashed rgba(245, 236, 214, .5); color: rgba(245, 236, 214, .8); --compass-needle: var(--bark-light); }
.site-footer__stamp .icon { width: 30px; height: 30px; }

/* ---------- 17b. Full-screen frames (home + Who we are only; ruled 08-11-2026) ----------
   House rule "Full-screen frame pages" (01-10-2026): one screen per frame, snap frame to frame,
   the round arrow (render_scroll_arrow) on every frame that has one below. Everything here is
   scoped to .is-frames (set on <html> and <body> by header.php when $page['frames'] is true). */
html.is-frames { scroll-snap-type: y mandatory; scroll-padding-top: 0; }
.is-frames {
  --frame-arrow-gap: max(var(--s-5), calc(env(safe-area-inset-bottom, 0px) + var(--s-4)));
  --frame-pt: calc(var(--header-h) + var(--s-5));
  --frame-pb: calc(56px + var(--frame-arrow-gap) + var(--s-5));
}
/* the header floats over every frame (fixed with JS; without JS it scrolls away with the first frame) */
.is-frames .site-header { position: absolute; inset: 0 0 auto 0; }
.js .is-frames .site-header { position: fixed; }

.is-frames .frame { position: relative; scroll-snap-align: start; min-height: 100vh; min-height: 100svh; }
.is-frames .frame--center {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: var(--frame-pt) var(--frame-pb);
}
.is-frames .frame .scroll-arrow { bottom: var(--frame-arrow-gap); }
.is-frames .hero.frame { padding-top: calc(var(--header-h) + var(--s-6)); padding-bottom: var(--frame-pb); }
.is-frames .frame .section-head { margin-bottom: var(--s-6); }
.is-frames .frame .section-head-row { margin-bottom: var(--s-6); }
.is-frames .frame .section-head-row .section-head { margin-bottom: 0; }
.is-frames .split__aside { position: static; }
/* without JS a phone header wraps its links and is taller: give the first frame room under it */
@media (max-width: 899.98px) { html.is-frames:not(.js) main > .frame:first-child { padding-top: calc(var(--header-h) + 140px); } }

/* phones: section heads one step smaller so a frame fits one screen */
@media (max-width: 599.98px) {
  .is-frames {
    --frame-pt: calc(var(--header-h) + var(--s-4));
    --frame-pb: calc(56px + var(--frame-arrow-gap) + var(--s-4));
  }
  .is-frames .frame .section-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.125rem); }
  .is-frames .frame .section-head .lede { font-size: var(--step-0); line-height: 1.6; }
  .is-frames .frame .section-head-row { display: block; }
  .is-frames .frame .section-head-row .link-arrow { display: none; } /* the same link sits in the hero */
  .is-frames .frame .section-head, .is-frames .frame .section-head-row { margin-bottom: var(--s-5); }
  .is-frames .frame .section-head-row .section-head { margin-bottom: 0; }
}

/* sideways rows: under the breakpoint a set of cards becomes one swipeable row with x-snap,
   so the frame stays one screen tall; the next card peeks in to show there is more */
.is-frames .card-row > * { scroll-snap-align: start; }
/* the sideways rows sit in single-column grids on phones: min-width 0 keeps them from widening the
   page, and position: relative makes them the box for the cards' screen-reader text (absolute),
   which would otherwise hang off the right edge and widen a phone's layout viewport */
.is-frames .card-row, .is-frames .filter-tiles, .is-frames .steps--frame, .is-frames .how__text, .is-frames .split > * { min-width: 0; }
.is-frames .card-row, .is-frames .filter-tiles, .is-frames .steps--frame { position: relative; }
@media (max-width: 1099.98px) {
  .is-frames .card-grid.card-row {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(80%, 300px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--s-4);
    scroll-padding-inline: var(--gutter);
  }
}
@media (min-width: 1100px) { .is-frames .card-grid.card-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* featured cards in a frame: a shorter picture band and a tighter body so the four fit one screen */
.is-frames .card-row .media--card, .is-frames .card-row .ph--card { aspect-ratio: 12 / 5; }
.is-frames .card-row .trail-card__body { padding: var(--s-4); gap: var(--s-2); }
.is-frames #featured .section-head { max-width: 52rem; flex: 1 1 30rem; }
@media (max-width: 599.98px) {
  .is-frames .card-row .media--card, .is-frames .card-row .ph--card { aspect-ratio: 4 / 1; }
  .is-frames .card-grid.card-row { padding-bottom: var(--s-2); }
}
@media (max-width: 899.98px) {
  .is-frames .info-grid.card-row {
    grid-auto-flow: column; grid-auto-columns: min(82%, 320px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--s-4);
    scroll-padding-inline: var(--gutter);
  }
}

/* Wander your way: phones get the six tiles as two rows that swipe sideways */
@media (max-width: 599.98px) {
  .is-frames .filter-tiles {
    grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: min(78%, 280px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--s-3);
    scroll-padding-inline: var(--gutter);
  }
  .is-frames .filter-tiles > li { scroll-snap-align: start; }
  .is-frames .filter-tile { padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3); gap: var(--s-3); }
  .is-frames .filter-tile__note { font-size: 0.875rem; line-height: 1.45; }
}
/* short phones (an SE, or a tall browser bar): the decorative picture bands step aside so the words fit */
@media (max-width: 899.98px) and (max-height: 760px) {
  .is-frames .how__figure, .is-frames .folk__figure { display: none; }
}
@media (min-width: 600px) and (max-width: 899.98px) {
  .is-frames .filter-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
  .is-frames .filter-tile { grid-template-columns: 1fr; align-content: start; }
  .is-frames .filter-tile__arrow { display: none; }
}

/* How the atlas works: a 2 x 2 grid of steps beside the picture on desktop; a sideways row of
   step cards over a short picture band under 900 px */
@media (min-width: 900px) {
  .is-frames .steps--frame { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); }
  .is-frames .how__figure .ph--portrait, .is-frames .how__figure .media--portrait { aspect-ratio: auto; height: min(58svh, 540px); }
}
@media (max-width: 899.98px) {
  .is-frames .how { gap: var(--s-5); }
  .is-frames .steps--frame {
    grid-auto-flow: column; grid-auto-columns: min(78%, 300px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--s-3);
    scroll-padding-inline: var(--gutter);
  }
  .is-frames .steps--frame .step {
    scroll-snap-align: start; grid-template-columns: 1fr; gap: var(--s-2);
    padding: var(--s-4); background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius-lg);
  }
  .is-frames .steps--frame .step__title { margin-top: 0; }
  .is-frames .how__figure .ph, .is-frames .how__figure .media { aspect-ratio: auto; height: clamp(96px, 16svh, 200px); }
}

/* Who we are: hero picture held to a band; story parts as chapters; the folk picture kept short */
.is-frames .page-hero--media .page-hero__inner { margin-bottom: var(--s-6); }
.is-frames .page-hero .bleed-media .ph, .is-frames .page-hero .bleed-media .media { aspect-ratio: auto; height: clamp(160px, 34svh, 440px); }
@media (min-width: 900px) {
  .is-frames .story-frame .story__title { font-size: var(--step-3); }
  .is-frames .story-frame .prose { font-size: var(--step-1); line-height: 1.7; }
  .is-frames .story-frame .story__no { width: 52px; height: 52px; font-size: 1.25rem; }
  .is-frames .folk__figure .ph, .is-frames .folk__figure .media { aspect-ratio: auto; height: min(52svh, 460px); }
}
@media (max-width: 599.98px) {
  .is-frames .story-frame .story__part { padding-left: 0; }
  .is-frames .story-frame .story__no { position: static; margin-bottom: var(--s-3); }
  .is-frames .folk { gap: var(--s-4); }
}
@media (max-width: 899.98px) {
  .is-frames .folk__figure .ph, .is-frames .folk__figure .media { aspect-ratio: auto; height: clamp(96px, 16svh, 200px); }
}
.note-frame .wrap { display: grid; justify-items: center; text-align: center; }
.note-frame__mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 1.5px dashed var(--forest); color: var(--forest); margin-bottom: var(--s-5); transform: rotate(-6deg); }
.note-frame__mark .icon { width: 40px; height: 40px; }
.is-frames .note-frame__text { margin: 0 auto; max-width: 36rem; font-size: var(--step-1); line-height: 1.7; }

/* the closing CTA frame, then the footer as the last frame (a full dark screen, no arrow) */
@media (max-width: 599.98px) { .is-frames .cta-band .cta-card { padding: var(--s-6) var(--s-4); } }
.is-frames .site-footer.frame {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--header-h) + var(--s-6)) max(var(--s-6), calc(env(safe-area-inset-bottom, 0px) + var(--s-4)));
}
@media (max-width: 899.98px) {
  .is-frames .site-footer.frame { padding-top: calc(var(--header-h) + var(--s-4)); }
  .is-frames .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
  .is-frames .site-footer__brand { grid-column: 1 / -1; }
  .is-frames .site-footer__desc, .is-frames .site-footer__note { margin-top: var(--s-4); }
  .is-frames .site-footer__base { margin-top: var(--s-5); }
}

/* ---------- 18. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 19. Print: a trail page a ride leader can hand round ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .announce, .skip-link, .crumbs, .pager, .dialog, .btn, .scroll-arrow, .block-head .btn, .trail-hero__media, .cta-band, .ledger__print, .trail-map__hint { display: none !important; }
  .trail-map { break-inside: avoid; max-width: 120mm; }
  .trail-layout, .trail-hero__grid { display: block; }
  .ledger, .note { border: 1px solid #999; break-inside: avoid; }
  .ledger::before { display: none; }
  .trail-title { font-size: 26pt; }
  a { color: #000; text-decoration: none; }
  .trail-block + .trail-block { margin-top: 10mm; }
}

/* page-level icon symbols (drawn once, reused with <use>) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
