/*
 * The journey map (src/journey.ts): /journey, the strip on /app and the
 * "What you'll have" section. Every color is a site token, so the map wears
 * the light and dark themes and every Settings > Appearance palette. Motion
 * (public/static/journey.js): the road draws itself in once, the pin pulses
 * a few times and stops, landmark cards fade up. With less motion asked for,
 * the map is simply drawn.
 */
.jr-head { margin-bottom: 8px; }
.jr-lede { max-width: var(--measure); margin: 0; font-size: 17px; line-height: 1.65; color: var(--text-body); }
.jr { position: relative; }
.jr-h2 { font-size: var(--h2); letter-spacing: -0.025em; color: var(--text); margin: 0 0 16px; }

/* ---- the map ---- */
.jr-map { margin: 20px 0 0; }
.jr-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.jr-narrow { display: none; }
@media (max-width: 699px) {
  .jr-wide { display: none; }
  .jr-narrow { display: block; max-width: 420px; margin: 0 auto; }
}
.jr-road { fill: none; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.jr-road-a { stroke: var(--line); }
.jr-road-b { stroke: var(--line-strong); }
.jr-lit { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.jr-narrow .jr-road, .jr-narrow .jr-lit { stroke-width: 8; }

.jr-hit { fill: transparent; transition: fill 0.15s; }
.jr-lm { cursor: pointer; outline: none; }
.jr-lm:hover .jr-hit, .jr-lm.is-active .jr-hit { fill: color-mix(in srgb, var(--primary) 14%, transparent); }
.jr-lm:focus-visible .jr-hit { stroke: var(--primary); stroke-width: 2; fill: color-mix(in srgb, var(--primary) 10%, transparent); }
.jr-gate { stroke: var(--text-dim); stroke-width: 2.5; stroke-linecap: round; }
.jr-label { fill: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.jr-lm-phase .jr-label { fill: var(--text-body); }
.jr-cp { fill: var(--bg); stroke: var(--text-body); stroke-width: 2.5; }
.jr-lm-checkpoint.is-passed .jr-cp { fill: var(--ok-fg); stroke: var(--ok-fg); }
.jr-stem { stroke: var(--warn-fg); stroke-width: 1.5; }
.jr-game { fill: var(--bg); stroke: var(--warn-fg); stroke-width: 2.5; }
.jr-finish { fill: var(--primary); }
.jr-finish-mark { fill: none; stroke: var(--primary-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.jr-here-dot { fill: var(--primary); stroke: var(--bg); stroke-width: 3; }
.jr-here-pulse { fill: var(--primary); opacity: 0; transform-box: fill-box; transform-origin: center; animation: jr-pulse 2.4s ease-out 0.6s infinite; }
@keyframes jr-pulse { from { transform: scale(1); opacity: 0.35; } to { transform: scale(2.8); opacity: 0; } }
.jr-here-label { fill: var(--link); font-weight: 700; }
.jr-scrub { pointer-events: none; transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.jr-scrub circle { fill: color-mix(in srgb, var(--text) 8%, transparent); stroke: var(--text); stroke-width: 2; }
.jr-scrub .jr-scrub-hit { fill: transparent; stroke: none; }
/* Live: the ring and the dot can be picked up and slid along the road (journey.js). */
.jr.is-live :is(.jr-scrub, .jr-here) { pointer-events: auto; cursor: grab; touch-action: none; }
.jr.is-dragging, .jr.is-dragging * { cursor: grabbing !important; user-select: none; }
.jr.is-dragging .jr-scrub { transition: none; }
.jr.is-dragging .jr-scrub circle:not(.jr-scrub-hit) { fill: var(--primary); stroke: var(--bg); stroke-width: 3; }

/* Drawn in once: the phases in order, then the part already walked, then the landmarks. */
.jr.is-armed .jr-road, .jr.is-armed .jr-lit { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.jr.is-armed .jr-marks, .jr.is-armed .jr-here { opacity: 0; }
.jr.is-armed.is-in .jr-road { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1); transition-delay: calc(var(--i, 0) * 0.32s); }
.jr.is-armed.is-in .jr-lit { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(0.4, 0, 0.2, 1) 1.2s; }
.jr.is-armed.is-in .jr-marks, .jr.is-armed.is-in .jr-here { opacity: 1; transition: opacity 0.6s ease 1.3s; }

.jr-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-top: 18px; font-size: 14px; color: var(--text-dim); }
.jr-legend span { display: inline-flex; align-items: center; gap: 8px; }
.jr-key { display: inline-block; width: 12px; height: 12px; }
.jr-key-phase { width: 3px; height: 14px; border-radius: 2px; background: var(--text-dim); }
.jr-key-cp { width: 10px; height: 10px; border: 2px solid var(--text-body); border-radius: 2px; transform: rotate(45deg); }
.jr-key-game { border: 2px solid var(--warn-fg); border-radius: 50%; }
.jr-key-here { border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }

/* The card a landmark opens (journey.js). */
.jr-pop {
  position: absolute; left: 0; top: 0; z-index: 20; width: min(300px, calc(100% - 16px)); padding: 14px 40px 12px 16px;
  border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--bg); box-shadow: var(--shadow);
  animation: jr-pop-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* journey.js puts the card beside its landmark (the side with room), never over the labels; --dx says which side it came from. */
@keyframes jr-pop-in { from { opacity: 0; translate: var(--dx, 0) 0; scale: 0.98; } }
/* Phones: the card is a sheet along the bottom of the screen, full width, over nothing on the map. */
@media (max-width: 699px) {
  .jr-pop { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; transform: none !important; padding: 18px 56px calc(18px + env(safe-area-inset-bottom)) 20px; border-width: 1px 0 0; border-radius: 16px 16px 0 0; animation-name: jr-sheet-in; animation-duration: 0.24s; }
  .jr-pop-x { top: 10px; right: 10px; width: 44px; height: 44px; }
  .jr-pop-a { min-height: 44px; }
}
@keyframes jr-sheet-in { from { translate: 0 100%; } }
.jr-pop.is-peek { pointer-events: none; }
.jr-pop.is-peek .jr-pop-x { display: none; }
.jr-pop-kind { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--link); }
.jr-pop-t { margin-top: 2px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--text); }
.jr-pop-b { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--text-body); }
.jr-pop-a { min-height: 36px; margin-top: 2px; font-size: 14px; }
.jr-pop-x { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; }

/* "See week N": a slider, and the week under it. Without script, Show reloads with ?week=N. */
.jr-scrubber { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; margin: 28px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px 12px 0 0; background: var(--bg-soft); }
.jr-scrub-label { grid-column: 1 / -1; font-size: 15px; font-weight: 500; color: var(--text-body); }
.jr-scrub-n { display: inline-block; vertical-align: baseline; margin: 0; padding: 0; font-size: inherit; line-height: inherit; text-align: center; min-width: 2.4ch; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.jr-range { width: 100%; height: 44px; margin: 0; padding: 0; border: 0; box-shadow: none; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
/* Drawn the same in every browser: a filled track to the week, a round thumb. */
.jr-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--primary) var(--p, 0%), var(--line-strong) var(--p, 0%)); }
.jr-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line-strong); }
.jr-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--primary); }
.jr-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border: 3px solid var(--bg); border-radius: 50%; background: var(--primary); box-shadow: 0 1px 4px rgba(3, 7, 18, 0.25); }
.jr-range::-moz-range-thumb { width: 16px; height: 16px; border: 3px solid var(--bg); border-radius: 50%; background: var(--primary); box-shadow: 0 1px 4px rgba(3, 7, 18, 0.25); }
.jr-range:focus-visible { outline: none; }
.jr-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent); }
.jr-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent); }
.jr.is-live .jr-scrub-go { display: none; }
.jr.is-live .jr-scrubber { grid-template-columns: 1fr; }
.jr-week { padding: 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; min-height: 13rem; }
.jr-week.is-swap > * { animation: jr-swap 0.2s ease-out; }
@keyframes jr-swap { from { opacity: 0.4; } }
.jr-week-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.jr-week-title { margin: 4px 0 10px; font-size: 19px; font-weight: 600; color: var(--text); }
.jr-week-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.jr-week-tasks li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; font-size: 15px; line-height: 1.45; color: var(--text-body); }
.jr-kind { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); padding-top: 3px; }
.jr-week-marks { margin-top: 10px; font-size: 14px; color: var(--warn-fg); font-weight: 500; }
@media (max-width: 520px) { .jr-week-tasks li { grid-template-columns: 1fr; gap: 0; } }

/* Every landmark in words: what the map says, for reading and for screen readers. */
.jr-landmarks { margin-top: var(--section); }
.jr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 32px; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .jr-list { grid-template-columns: 1fr 1fr; } }
.jr-li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.jr-li-wk { font: 600 13px/1.6 var(--mono); color: var(--text-dim); }
.jr-li-body { display: grid; gap: 2px; min-width: 0; }
.jr-li-body a { font-weight: 600; color: var(--text); text-decoration: none; }
.jr-li-body a:hover { color: var(--link); }
.jr-li-kind { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.jr-li-checkpoint .jr-li-kind { color: var(--text-body); }
.jr-li-game .jr-li-kind { color: var(--warn-fg); }
.jr-li.is-passed .jr-li-kind { color: var(--ok-fg); }
.jr-li-blurb { font-size: 14px; line-height: 1.5; color: var(--text-body); }
.jr-li.is-flash { animation: jr-flash 1.2s ease-out; }
@keyframes jr-flash { from { background: color-mix(in srgb, var(--primary) 12%, transparent); } }

/* ---- what you'll have ---- */
.jr-finish { margin-top: var(--section); padding-top: var(--section); border-top: 1px solid var(--line); }
.jr-haves { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--card-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Four numbers across, then the certificate and the quote filling the next row: no gaps, no orphans. */
@media (min-width: 900px) { .jr-haves { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.jr-have { display: grid; align-content: start; gap: 2px; padding: var(--card-pad); border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--bg); }
.jr-have-n { font-size: clamp(30px, 5vw, 38px); line-height: 1.1; font-weight: 600; letter-spacing: -0.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.jr-have-label { font-size: var(--card-title); font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.jr-have-note { margin-top: 6px; font-size: var(--card-body); line-height: 1.6; color: var(--text-body); }
.jr-have-icon { display: inline-flex; color: var(--primary); margin-bottom: 6px; }
.jr-have-cert { border-color: var(--primary); background: var(--primary-soft); }
.jr-have-cert .jr-have-note { color: var(--text-body); }
.jr-have-cert, .jr-have-chair, .jr-have-quote { grid-column: 1 / -1; }
/* Wide: the certificate and "Twelve hours" side by side, then the quotes side by side across the whole row. */
@media (min-width: 900px) { .jr-have-cert, .jr-have-chair { grid-column: span 2; } }
.jr-have-quote { gap: 22px; }
.jr-q { display: grid; align-content: start; gap: 2px; }
@media (min-width: 900px) { .jr-have-quote { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
.jr-quote { margin: 8px 0 0; padding-left: 14px; border-left: 3px solid var(--primary); }
.jr-quote p { font-size: 16px; line-height: 1.6; color: var(--text); }
.jr-quote footer { margin-top: 6px; font-size: 13px; color: var(--text-dim); }
.jr-quote a { color: var(--link); }
.jr-have-chair .jr-have-note a { color: var(--link); }
.jr-cta { margin-top: 28px; }

/* ---- the strip on /app ---- */
.jr-card-line { font-size: 15px; color: var(--text-body); margin-bottom: 6px; }
.jr-card-line strong { color: var(--text); font-weight: 600; }
.jr-strip { display: block; overflow: visible; margin: 4px 0 2px; font-family: var(--font); }
.jr-c-phase { fill: var(--text-dim); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.jr-seg-a { fill: var(--line); }
.jr-seg-b { fill: var(--line-strong); }
.jr-seg-lit { fill: var(--primary); transform-box: fill-box; transform-origin: left center; }
.jr-c-cp rect { fill: var(--bg); stroke: var(--text-body); stroke-width: 2; }
.jr-c-cp.is-passed rect { fill: var(--ok-fg); stroke: var(--ok-fg); }
.jr-c-game circle { fill: var(--warn-fg); }
.jr-c-finish circle { fill: var(--primary); }
.jr-c-finish path { fill: none; stroke: var(--primary-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jr-c-here .jr-here-dot { stroke-width: 2.5; }
.jr-card.is-armed .jr-seg-lit { transform: scaleX(0); }
.jr-card.is-armed .jr-c-here, .jr-card.is-armed .jr-c-cp.is-passed { opacity: 0; }
.jr-card.is-armed.is-in .jr-seg-lit { transform: none; transition: transform 1.1s cubic-bezier(0.3, 0.7, 0.3, 1) 0.15s; }
.jr-card.is-armed.is-in .jr-c-here, .jr-card.is-armed.is-in .jr-c-cp.is-passed { opacity: 1; transition: opacity 0.4s ease 1.1s; }
.jr-card-foot { margin-top: 6px; }
.jr-card-haves { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.jr-card-h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.jr-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.jr-chips li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--text-body); background: var(--bg-soft); }
.jr-chips strong { color: var(--text); font-weight: 600; }
.jr-chips svg { color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  .jr-here-pulse { animation: none; }
  .jr-scrub, .jr-pop, .jr-week.is-swap > *, .jr-li.is-flash { transition: none; animation: none; }
}

/* "Drag me" (journey.js): beside the ring until the first drag or key move. */
.jr-hint { position: absolute; left: 0; top: 0; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(3, 7, 18, 0.18); animation: jr-hint-in 0.35s ease-out both; }
.jr-hint::after { content: ''; position: absolute; top: 100%; left: var(--ax, 50%); margin-left: -5px; border: 5px solid transparent; border-top-color: var(--text); }
.jr-hint.is-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--text); }
.jr-hint.is-right::after, .jr-hint.is-left::after { top: 50%; margin: -5px 0 0; border-top-color: transparent; }
.jr-hint.is-right::after { left: auto; right: 100%; border-right-color: var(--text); }
.jr-hint.is-left::after { left: 100%; border-left-color: var(--text); }
.jr-hint svg { color: currentColor; opacity: 0.8; }
@keyframes jr-hint-in { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
/* Until the first move, a soft ring grows from the ball and fades, every 1.5s. */
.jr-scrub-beckon { fill: none; stroke: var(--primary); stroke-width: 2; opacity: 0; pointer-events: none; transform-box: fill-box; transform-origin: center; }
.jr.is-beckoning .jr-scrub-beckon { animation: jr-beckon 1.5s ease-out infinite; }
.jr:not(.is-beckoning) .jr-scrub-beckon { display: none; }
@keyframes jr-beckon { 0% { opacity: 0.55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.2); } }
@media (prefers-reduced-motion: reduce) { .jr-hint, .jr-hint * { animation: none !important; } .jr.is-beckoning .jr-scrub-beckon { animation: none; } }
.jr-hint[hidden], .jr.is-dragging .jr-hint { display: none; }
.jr-confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.jr-more { margin: 4px 0 0; text-align: center; }
.jr-compact .jr-scrub { display: none; }
