.trail-viewport { position: absolute; inset: 0; overflow: hidden; }
.wordmark--replay { display: inline-flex; align-items: center; flex-shrink: 0; gap: 7px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font-family: var(--serif); cursor: pointer; }
.wordmark__replay { font-size: 18px; color: var(--forest); }
@media (max-width: 819px) { .topbar .wordmark--replay { padding-top: 0; } }
.mascot-entrance { position: absolute; top: 0; left: 0; width: 240px; height: 148px; transform-origin: 120px 118px; pointer-events: none; z-index: 7; will-change: transform; }
.mascot-entrance svg { display: block; overflow: visible; pointer-events: none; }
.ferret-sprite #f-eye { transform-box: fill-box; transform-origin: center; animation: ferret-blink 6.6s ease-in-out infinite; }
.ferret-sprite #f-ear { transform-box: fill-box; transform-origin: 50% 100%; animation: ferret-ear-listen 10s ease-in-out infinite; }
@keyframes ferret-blink { 0%, 91%, 95%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.08); } }
@keyframes ferret-ear-listen { 0%, 83%, 94%, 100% { transform: rotate(0); } 87% { transform: rotate(-4deg); } 90% { transform: rotate(2deg); } }
:root[data-theme=dark] .mascot-entrance { filter: brightness(1.06); }
:root[data-theme=evening] .mascot-entrance { filter: saturate(1.04); }
@media (prefers-reduced-motion: reduce) {
  .ferret-sprite #f-eye, .ferret-sprite #f-ear { animation: none; }
  .mascot-entrance { display: none; }
  .stage .ferret { visibility: visible !important; }
}
.stage--tour .trail-viewport { right: min(490px, 43vw); }
.facorn { width: 160px; margin-left: -32px; gap: 3px; min-height: 110px; transform-origin: 80px 70px; z-index: 5; opacity: 1; }
.facorn__art { min-height: 72px; }
.facorn .facorn__label { display: block; opacity: 1; width: 160px; max-width: none; padding: 9px 12px; font-size: 15px; line-height: 1.3; color: var(--ink); background: var(--paper-warm); border: 1.5px solid var(--forest); border-radius: 3px 8px 4px 7px; box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 16%, transparent); }
.facorn__label::before { display: none; }
.facorn__label > span { display: block; }
.facorn__number { font-size: 13px; margin-bottom: 3px; }
.facorn--current .facorn__label { background: var(--forest); color: var(--paper); border-width: 2px; }
.facorn--read .facorn__label { border-style: dashed; }
.facorn:hover .facorn__label { box-shadow: 0 4px 0 color-mix(in srgb, var(--ink) 25%, transparent); }
.facorn:focus-visible { outline: 3px solid var(--forest); outline-offset: 5px; border-radius: 6px; }
.facorn:active .facorn__label { box-shadow: none; }
.facorn--next .facorn__art { animation: none; }
.trail-start { min-height: 48px; padding: 12px 18px; font: inherit; font-size: 17px; background: var(--paper-warm); border: 2px solid var(--forest); color: var(--forest); border-radius: 3px 7px 4px 6px; cursor: pointer; }
.trail-start:hover { background: var(--paper); }
.hero-exact { display: inline-block; background: none; color: var(--ink-soft); border: 0; border-bottom: 1px solid currentColor; padding: 10px 0 4px; margin-top: 4px; min-height: 44px; font: inherit; font-size: 16px; cursor: pointer; }
.trail-panel { position: absolute; z-index: 6; top: 104px; right: 28px; bottom: 60px; width: min(440px, 39vw); padding: 28px; display: flex; flex-direction: column; overflow-y: auto; background: var(--paper-warm); border: 1px solid color-mix(in srgb, var(--forest) 45%, transparent); border-radius: 5px 12px 6px 10px; box-shadow: 0 8px 28px #21190d0f; }
.trail-progress-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.trail-progress-heading .eyebrow { margin: 0; }
.trail-position { margin: 0; font-size: 14px; color: var(--ink-soft); }
.trail-progress { display: flex; gap: 12px; margin: 18px 0 24px; }
.trail-step { position: relative; width: 46px; height: 46px; flex-shrink: 0; background: var(--paper); border: 1.5px solid var(--forest); color: var(--forest); border-radius: 50%; font: inherit; font-size: 18px; cursor: pointer; }
.trail-step.is-current { background: var(--forest); color: var(--paper); outline: 2px solid var(--forest); outline-offset: 3px; }
.trail-step.is-visited { border-style: dashed; }
.trail-check { position: absolute; right: -5px; top: -5px; width: 20px; height: 20px; display: grid; place-items: center; background: var(--forest); color: var(--paper); border-radius: 50%; font-size: 13px; }
.trail-copy { flex: 1; }
.trail-copy h2 { margin: 0 0 14px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 400; line-height: 1.15; text-wrap: balance; }
.trail-copy h2:focus { outline: none; }
.trail-benefit { font-size: 18px; line-height: 1.5; margin: 0 0 20px; color: var(--ink); }
.trail-example { padding: 18px; margin: 0 0 28px; border-left: 3px solid var(--forest); background: var(--paper); }
.trail-example p { margin: 0; font-size: 17px; line-height: 1.5; }
.trail-example { font-style: italic; }
.trail-example .trail-example-label { margin-bottom: 8px; color: var(--ink-soft); font-size: 14px; }
.trail-actions { display: flex; align-items: stretch; gap: 12px; margin-top: 16px; }
.trail-back, .trail-intro { background: none; color: var(--ink-soft); border: 0; font: inherit; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 48px; }
.trail-back { padding: 10px 4px; }
.trail-back:disabled { opacity: .45; cursor: default; text-decoration: none; }
.trail-next { flex: 1; display: flex; justify-content: center; align-items: center; min-height: 52px; padding: 13px 16px; color: var(--paper); background: var(--forest); border: 2px solid var(--forest); border-radius: 3px 7px 4px 6px; font: inherit; font-size: 17px; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; }
.trail-next:hover { box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 18%, transparent); }
.trail-next:active { box-shadow: none; transform: translateY(1px); }
.trail-intro { align-self: flex-start; padding: 10px 0 0; margin-top: 12px; }
.stage--tour .scroll-cue { left: calc((100% - min(490px, 43vw)) / 2); }
@media (min-width: 820px) and (max-height: 760px) { .stage--tour { min-height: 780px; } }
@media (max-width: 819px) {
  .hero .hero__actions { align-items: stretch; gap: 10px; }
  .hero__reassure { max-width: 34ch; }
  .hero { top: 90px; }
  .stage:not(.stage--tour) { min-height: 760px; }
  .stage--tour { height: auto; min-height: 0; overflow: visible; padding-top: 76px; }
  .stage--tour .trail-viewport { position: relative; inset: auto; width: 100%; height: clamp(270px, 42svh, 340px); }
  .stage--tour .trail-panel { position: relative; inset: auto; width: auto; max-height: none; margin: 0 16px; padding: 24px 20px; }
  .stage--tour .hero { display: none; }
  .stage--tour .scroll-cue { position: relative; display: table; inset: auto; transform: none; margin: 20px auto 28px; padding: 10px 4px; }
  .trail-progress { gap: 14px; margin: 16px 0 24px; }
  .trail-copy h2 { font-size: 28px; }
  .trail-benefit { font-size: 17px; }
  .trail-example { padding: 15px; margin-bottom: 16px; }
  .trail-actions { gap: 14px; }
  .trail-intro { margin-top: 8px; }
  .facorn .facorn__label { display: block; opacity: 1; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .facorn, .facorn__art, .facorn__label { transition: none; } }

/* Added by scripts/import-site.mjs: restored trail copy scrolls inside the panel so Back and Next stay in view. */
@media (min-width: 820px) { .trail-copy { min-height: 0; overflow-y: auto; overscroll-behavior: contain; } }
/* Added by scripts/import-site.mjs: on phones the tour zooms the trail to ~46% and parks the ferret on the current stop, over its label. The panel below already names the stop. */
@media (max-width: 819px) { .stage--tour .facorn--current .facorn__label { visibility: hidden; } }
