/* ============================================================
   Journey page — one patient, two six-week recoveries.
   The usual way is drawn on paper (oat, ink, a photocopied sheet);
   ARtho Move is drawn on a screen (deep teal, the real knee render).
   Read top to bottom by default. journey.js turns the chapters into
   one pinned stage on large screens when motion is welcome.
   ============================================================ */

.jr{--navh:88px;--paper:var(--canvas);--paper-ink:var(--ink);--paper-soft:var(--ink-tertiary);
  --screen:var(--dk-canvas);--screen-ink:var(--dk-ink);--screen-soft:var(--dk-ink-secondary)}

/* ---------- the opening ---------- */
.jr-hero{position:relative;background:var(--paper);padding-top:clamp(56px,9vw,120px);overflow:hidden}
.jr-hero__inner{text-align:center;display:grid;justify-items:center}
.jr-hero__kicker{margin:0 0 18px;font-size:15px;font-weight:500;color:var(--accent-ink)}
.jr-hero__title{margin:0;max-width:12ch;font-size:clamp(46px,8.4vw,118px);line-height:.98;font-weight:600;color:var(--ink);text-wrap:balance}
/* SplitText masks each line; give the descenders room inside the mask */
.jr-hero__title>*{padding-bottom:.1em;margin-bottom:-.1em}
.jr-hero__lede{margin:clamp(20px,2.6vw,30px) 0 0;max-width:54ch;font-size:clamp(17px,1.6vw,20px);line-height:1.6;color:var(--ink-secondary)}

.jr-fork{display:block;width:100%;height:clamp(150px,20vw,260px);margin-top:clamp(36px,5vw,64px)}
.jr-fork path{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke}
.jr-fork__stem{stroke:var(--ink);stroke-width:3}
.jr-fork__road--paper{stroke:var(--ink-tertiary);stroke-width:3;stroke-dasharray:2 9}
.jr-fork__road--screen{stroke:var(--primary);stroke-width:5}
.jr-hero__roads{display:grid;grid-template-columns:1fr 1fr;padding-bottom:clamp(28px,4vw,48px)}
.jr-road-name{justify-self:center;font-family:var(--font-display);font-size:clamp(19px,2vw,26px);font-weight:600}
.jr-road-name--paper{color:var(--ink-tertiary)}
.jr-road-name--screen{color:var(--primary)}

/* ---------- the six weeks, read top to bottom ---------- */
.jr-story{background:var(--paper)}
.jr-stage{max-width:1240px;margin-inline:auto;padding:0 24px clamp(48px,6vw,80px)}
.jr-lane-bg,.jr-clock,.jr-stage>.jr-cal{display:none}
.jr-chapters{list-style:none;margin:0;padding:0;display:grid;gap:clamp(36px,5vw,56px)}
.jr-ch{display:grid;gap:14px}
.jr-ch__when{grid-column:1/-1;margin:0;font-family:var(--font-display);font-size:clamp(22px,2.4vw,30px);font-weight:600;line-height:1.2;color:var(--ink)}
.jr-ch__lane{border-radius:22px;padding:clamp(20px,2.6vw,30px)}
.jr-ch__lane h3{margin:0 0 8px;font-family:var(--font-display);font-size:clamp(20px,1.9vw,24px);font-weight:600;line-height:1.25}
.jr-ch__lane p{margin:0;font-size:16.5px;line-height:1.62;max-width:52ch}
.jr-ch__lane--paper{background:var(--surface);border:1px dashed var(--border-default);color:var(--ink-secondary)}
.jr-ch__lane--paper h3{color:var(--ink)}
.jr-ch__lane--screen{background:var(--dk-surface);color:var(--dk-ink-secondary)}
.jr-ch__lane--screen h3{color:var(--dk-ink)}
@media(min-width:760px){.jr-ch{grid-template-columns:1fr 1fr;gap:16px 20px}}

/* each road's scene for the chapter: pen sketches on paper, app screens on screen */
.jr-ch__lane{display:flex;flex-direction:column}
.jr-scene{display:block;width:100%;height:auto;max-height:300px;margin-top:18px;overflow:visible}

.jr-ref{display:inline-block;margin-left:2px;font-size:.72em;font-weight:600;vertical-align:super;line-height:0;color:var(--accent-ink);text-decoration:none}
.jr-ref:hover{text-decoration:underline}

/* ---------- the pinned stage (journey.js adds .is-pinned) ---------- */
.jr.is-pinned .jr-story{background:none}
.jr.is-pinned .jr-stage{position:relative;max-width:none;height:calc(100vh - var(--navh));height:calc(100svh - var(--navh));
  padding:0;display:grid;grid-template-columns:1fr 1fr;
  grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden}
.jr.is-pinned .jr-lane-bg{display:block;position:absolute;top:0;bottom:0;width:50%;z-index:0}
.jr-lane-bg--paper{left:0;background:var(--paper)}
.jr-lane-bg--screen{right:0;background:radial-gradient(90% 70% at 70% 60%,rgba(63,159,134,.16),transparent 70%),var(--screen)}
.jr.is-pinned .jr-stage>*{position:relative;z-index:1}
.jr.is-pinned .jr-lane-bg{position:absolute}

/* the clock spans the seam */
.jr.is-pinned .jr-clock{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;gap:16px;width:min(720px,70%);margin:clamp(18px,3vh,30px) auto 0;padding:10px 20px;
  border-radius:999px;background:var(--surface-raised);box-shadow:0 1px 0 var(--border-default),0 12px 30px -18px rgba(14,58,68,.45)}
.jr-clock__day{font-family:var(--font-display);font-size:19px;font-weight:600;color:var(--ink);min-width:4.6em}
.jr-clock__end{font-size:14px;color:var(--ink-tertiary)}
.jr-clock__track{position:relative;height:4px;border-radius:999px;
  background:linear-gradient(90deg,var(--ink-tertiary) 50%,transparent 0) 0 50%/8px 2px repeat-x}
.jr-clock__track i{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:inherit;background:var(--primary)}

/* chapters: both roads, one chapter at a time; text on top, the scene below */
.jr.is-pinned .jr-chapters{grid-column:1/-1;grid-row:2/4;display:block;position:relative;min-height:0}
.jr.is-pinned .jr-ch{position:absolute;inset:0;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr);gap:0}
.jr.is-pinned .jr-ch__when{justify-self:center;margin:clamp(12px,2vh,20px) 0 clamp(8px,1.6vh,16px);font-size:clamp(17px,1.5vw,20px);
  padding:6px 18px;border-radius:999px;background:var(--primary);color:var(--on-primary)}
.jr.is-pinned .jr-ch__lane{border:0;border-radius:0;background:none;padding:0 clamp(22px,3.2vw,56px);min-height:0}
.jr.is-pinned .jr-ch__lane h3{font-size:clamp(21px,2vw,28px)}
.jr.is-pinned .jr-ch__lane p{font-size:clamp(15px,1.15vw,16.5px)}
.jr.is-pinned .jr-scene{flex:1 1 0;min-height:0;max-height:none;height:100%;margin:clamp(6px,1.4vh,16px) -8px 0;width:calc(100% + 16px)}

/* six weeks of days */
.jr-cal{display:grid;grid-template-columns:repeat(7,12px);gap:7px;justify-content:start}
.jr.is-pinned .jr-stage>.jr-cal{display:grid;grid-row:4;grid-template-columns:repeat(42,minmax(0,10px));gap:4px;
  justify-content:center;padding:clamp(16px,3vh,28px) 24px clamp(22px,4vh,40px)}
.jr-stage>.jr-cal--paper{grid-column:1}
.jr-stage>.jr-cal--screen{grid-column:2}
.jr-dot{display:block;aspect-ratio:1;border-radius:50%}
.jr-cal .jr-dot:nth-child(7n){margin-right:0}
.jr.is-pinned .jr-stage>.jr-cal .jr-dot:nth-child(7n):not(:last-child){margin-right:8px}
.jr-cal--paper .jr-dot--d{background:var(--ink-secondary)}
.jr-cal--paper .jr-dot--c{background:var(--ink);border-radius:2px}
.jr-cal--paper .jr-dot--m{box-shadow:inset 0 0 0 1.6px var(--ink-tertiary)}
.jr-cal--paper .jr-dot--x{box-shadow:inset 0 0 0 1.4px var(--ink-tertiary);opacity:.3}
.jr-cal--screen .jr-dot--d{background:var(--dk-primary)}
.jr-cal--screen .jr-dot--m{box-shadow:inset 0 0 0 1.6px var(--dk-ink-secondary)}
.jr-cal--screen .jr-dot--f{background:var(--lime)}
.jr-dot--p{background:var(--dk-accent)}

/* ---------- the scene drawing kit ---------- */
/* paper: pen on oat */
.sc-page{fill:#fffdf7;stroke:var(--border-default)}
.sc-card{fill:#fffdf7;stroke:#d9cba8}
.sc-sticky{fill:#f5e3a6}
.sc-rule{fill:none;stroke:var(--border-default);stroke-width:1}
.sc-margin{fill:none;stroke:#e3b3a8;stroke-width:1}
.sc-line{fill:none;stroke:var(--ink);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.sc-line--soft{stroke:#6f7f80}
.sc-line--amber{stroke:var(--accent)}
.sc-dash{stroke-dasharray:3 4}
.sc-road{stroke-dasharray:2 8}
.sc-ink-fill{fill:var(--ink)}
.sc-auto{fill:rgba(232,179,106,.55);stroke:var(--ink);stroke-width:2;stroke-linejoin:round}
.sc-wheel{fill:#fffdf7;stroke:var(--ink);stroke-width:2;stroke-dasharray:4 2}
.sc-bubble{fill:#fffdf7;stroke:#6f7f80;stroke-width:1.5}
.sc-bolt{fill:var(--accent)}
.sc-track{fill:var(--surface-sunken)}
.sc-barfill{fill:var(--accent)}
.sc-stamp{fill:none;stroke:var(--error);stroke-width:2}
.sc-stamp-t{font-family:var(--font-body);font-size:12px;font-weight:700;fill:var(--error)}
.sc-label{font-family:var(--font-body);font-size:10.5px;font-weight:600;fill:var(--ink-secondary)}
.sc-small{font-family:var(--font-body);font-size:10px;fill:var(--ink-secondary)}
.sc-big{font-family:var(--font-display);font-size:17px;font-weight:600;fill:var(--ink)}
.sc-hand{font-family:var(--font-display);font-style:italic;font-size:16px;fill:#29447a}
.sc-hand--sm{font-size:14px}
.sc-hand--lg{font-size:26px}
.sc-amber{fill:var(--accent-ink)}
/* screen: the app */
.ph-frame{fill:#06100c;stroke:rgba(241,234,216,.2);stroke-width:1.5}
.ph-screen{fill:var(--dk-surface)}
.ph-screen--cam{fill:#0e2119}
.ui-t{font-family:var(--font-body);font-size:9.5px;fill:var(--dk-ink)}
.ui-sm{font-size:8.5px}
.ui-lg{font-size:12px}
.ui-xl{font-family:var(--font-display);font-size:16px;font-weight:600}
.ui-num{font-family:var(--font-display);font-size:30px;font-weight:600}
.ui-b{font-weight:700}
.ui-dim{fill:var(--dk-ink-secondary)}
.ui-lime{fill:var(--lime)}
.ui-amber{fill:var(--dk-accent)}
.ui-dark{fill:#08221b}
.ui-panel{fill:var(--dk-surface-2);stroke:rgba(241,234,216,.14)}
.ui-card{fill:rgba(255,255,255,.06)}
.ui-well{fill:#0c1c15}
.ui-chip{fill:rgba(255,255,255,.05);stroke:rgba(241,234,216,.2)}
.ui-chip--lime{stroke:var(--lime);fill:rgba(174,234,0,.08)}
.ui-alert{fill:rgba(232,179,106,.14);stroke:var(--dk-accent)}
.ui-fill-teal{fill:var(--dk-primary)}
.ui-fill-lime{fill:var(--lime)}
.ui-fill-amber{fill:var(--dk-accent)}
.ui-tick{fill:none;stroke:#08221b;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ui-arrow{fill:none;stroke:var(--lime);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ui-pin{fill:var(--dk-ink);stroke:var(--dk-ink);stroke-width:1.2}
.ui-stand{fill:none;stroke:rgba(241,234,216,.25);stroke-width:3;stroke-linejoin:round}
.ui-bone{fill:none;stroke:var(--dk-ink);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.ui-bone--soft{stroke:var(--dk-primary);stroke-width:3}
.ui-joint{fill:#0c1c15;stroke:var(--dk-primary);stroke-width:3}
.ui-joint--knee{stroke:var(--lime);stroke-width:4}
.ui-grid{fill:none;stroke:rgba(241,234,216,.1)}
.ui-line{fill:none;stroke:var(--lime);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.ui-bar{fill:var(--dk-primary)}
.ui-stall{fill:rgba(232,179,106,.1);stroke:var(--dk-accent);stroke-dasharray:3 3}
.ui-ring-track{fill:none;stroke:rgba(241,234,216,.12);stroke-width:8}
.ui-ring{fill:none;stroke:var(--lime);stroke-width:8;stroke-linecap:round}
.ui-off{fill:#000;opacity:.4}
.s4-ripple{fill:none;stroke:var(--dk-accent);stroke-width:2;opacity:0}
.s4-fly{opacity:0}
.s6-off{opacity:0}

/* ---------- where the roads come out ---------- */
.jr-end{background:var(--paper);padding-block:clamp(64px,9vw,120px);border-top:1px solid var(--border-default)}
.jr-end__title{margin:0;max-width:18ch;font-size:clamp(34px,5vw,64px);line-height:1.04;font-weight:600;color:var(--ink);text-wrap:balance}
.jr-end__lede{margin:18px 0 0;max-width:52ch;font-size:clamp(17px,1.6vw,20px);line-height:1.6;color:var(--ink-secondary)}
.jr-outcome{display:grid;gap:18px;margin-top:clamp(32px,4vw,48px)}
@media(min-width:820px){.jr-outcome{grid-template-columns:1fr 1fr}}
.jr-outcome__road{border-radius:24px;padding:clamp(22px,3vw,34px);display:grid;gap:22px;align-content:start}
.jr-outcome__road h3{margin:0;font-family:var(--font-display);font-size:24px;font-weight:600}
.jr-outcome__road dl{margin:0;display:grid;gap:12px}
.jr-outcome__road dl div{display:grid;grid-template-columns:minmax(0,9.5em) 1fr;gap:12px;padding-bottom:12px;border-bottom:1px solid}
.jr-outcome__road dt{font-size:14.5px}
.jr-outcome__road dd{margin:0;font-size:15.5px;font-weight:600}
.jr-outcome__road--paper{background:var(--surface);border:1px dashed var(--border-default);color:var(--ink-secondary)}
.jr-outcome__road--paper h3,.jr-outcome__road--paper dd{color:var(--ink)}
.jr-outcome__road--paper dl div{border-color:var(--border-subtle)}
.jr-outcome__road--screen{background:var(--dk-canvas);color:var(--dk-ink-secondary)}
.jr-outcome__road--screen h3,.jr-outcome__road--screen dd{color:var(--dk-ink)}
.jr-outcome__road--screen dl div{border-color:rgba(241,234,216,.12)}
@media(min-width:1100px){.jr-cal--static{grid-template-columns:repeat(42,minmax(0,9px));gap:3px}
  .jr-cal--static .jr-dot:nth-child(7n):not(:last-child){margin-right:6px}}

.jr-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;margin:18px 0 0;font-size:14px;color:var(--ink-secondary)}
.jr-legend span{display:inline-flex;align-items:center;gap:7px}
.jr-key{display:inline-block;width:11px;height:11px;border-radius:50%}
.jr-key--done{background:var(--ink-secondary)}
.jr-key--clinic{background:var(--ink);border-radius:2px}
.jr-key--pain{background:var(--dk-accent)}
.jr-key--miss{box-shadow:inset 0 0 0 1.6px var(--ink-tertiary)}

.jr-cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:clamp(36px,5vw,56px)}
.jr-btn-quiet{background:transparent;color:var(--primary);border-color:var(--primary)}
.jr-btn-quiet:hover{background:rgba(19,76,88,.06)}

.jr-notes{margin-top:clamp(40px,5vw,64px);padding-top:22px;border-top:1px solid var(--border-default);max-width:80ch;
  font-size:13.5px;line-height:1.6;color:var(--ink-secondary)}
.jr-notes p{margin:0 0 10px}
.jr-notes ol{margin:0;padding-left:18px}
.jr-notes a{color:var(--primary)}

/* Day 2: the finished scene is the session; the PIN screen only shows mid-animation */
.s2-login{opacity:0;visibility:hidden}

/* ---------- the home page teaser: one Wednesday, two roads ---------- */
.jr-teaser__pair{display:grid;gap:18px;margin-top:clamp(28px,4vw,44px)}
@media(min-width:820px){.jr-teaser__pair{grid-template-columns:1fr 1fr}}
.jr-teaser__road{margin:0;border-radius:24px;padding:clamp(20px,2.6vw,30px);display:flex;flex-direction:column;gap:6px}
.jr-teaser__road figcaption{font-size:15.5px;line-height:1.55;max-width:44ch}
.jr-teaser__road figcaption b{display:block;margin-bottom:4px;font-family:var(--font-display);font-size:21px;font-weight:600}
.jr-teaser__road .jr-scene{margin-top:auto;padding-top:14px;max-height:280px}
.jr-teaser__road--paper{background:var(--surface);border:1px dashed var(--border-default);color:var(--ink-secondary)}
.jr-teaser__road--paper b{color:var(--ink)}
.jr-teaser__road--screen{background:var(--dk-canvas);color:var(--dk-ink-secondary)}
.jr-teaser__road--screen b{color:var(--dk-ink)}
.jr-teaser__cta{display:flex;flex-wrap:wrap;align-items:center;gap:14px 26px;margin-top:clamp(24px,3vw,34px)}

/* the way on to the full comparison, under the two outcomes */
.jr-compare{margin:14px 0 0;font-size:15px}
.jr-compare a{color:var(--primary);font-weight:600;text-decoration:underline;text-underline-offset:3px}
