/* Araya Health: the department journeys (js/journey-core.js), shown in a popup on every
   department page. One question per card, big tap targets, a slim progress bar, and a plan
   that books into Jane. Loads after premium-base.css and uses its colours and type. */

/* ---------- popup ---------- */
.jr-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: clamp(0px, 3vw, 32px); }
.jr-modal[hidden] { display: none; }
.jr-scrim { position: absolute; inset: 0; background: rgba(33, 30, 25, .48); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--ease); }
.jr-sheet { position: relative; width: min(760px, 100%); max-height: min(920px, 100%); overflow-y: auto; overscroll-behavior: contain; border-radius: var(--r-lg); background: var(--canvas); box-shadow: 0 40px 100px -30px rgba(33, 30, 25, .55); opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .35s var(--ease), transform .5s var(--ease); outline: none; }
.jr-modal.on .jr-scrim { opacity: 1; }
.jr-modal.on .jr-sheet { opacity: 1; transform: none; }
html.jr-open, html.jr-open body { overflow: hidden; }

/* ---------- top bar ---------- */
.jr-top { position: sticky; top: 0; z-index: 10; background: rgba(253, 251, 247, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.jr-top-in { padding: 12px clamp(18px, 4vw, 36px); display: flex; align-items: center; gap: 16px; }
.jr-top .logo svg { width: 30px; height: 30px; }
.jr-top .logo-text { font-size: 1.3rem; }
.jr-top .logo-img { height: 13px; }
.jr-top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.jr-call { padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.jr-call:hover { background: var(--paper); }
.jr-close { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; color: var(--ink); background: var(--paper); border: 0; box-shadow: inset 0 0 0 1.5px var(--line-strong); cursor: pointer; }
.jr-close:hover { background: var(--sand); }
.jr-locked .jr-close { font-size: 0; cursor: default; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); }
.jr-locked .jr-close::after { content: attr(data-count); font-size: .95rem; font-weight: 600; color: var(--ink-soft); }
.jr-locked .jr-close:hover { background: var(--paper); }
.jr-keep[hidden] { display: none; }
.jr-progress { height: 4px; background: var(--line); }
.jr-progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .6s var(--ease); }

/* ---------- card stage ---------- */
.jr-main { padding: clamp(18px, 3vw, 32px) clamp(18px, 4vw, 36px) 36px; }
.jr-meta { display: flex; align-items: center; gap: 12px; min-height: 40px; margin-bottom: 14px; }
.jr-count { margin-right: auto; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.jr-back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; margin-left: -10px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink); background: none; border: 0; cursor: pointer; }
.jr-back:hover { background: var(--paper); }
.jr-back svg { width: 14px; height: 14px; transform: rotate(-135deg); }
.jr-back[hidden], .jr-startover[hidden] { display: none; }
.jr-back:not([hidden]) + .jr-count { margin-left: 4px; }
.jr-startover { background: none; border: 0; padding: 6px 0; font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.jr-card { animation: jrIn .5s var(--ease) both; }
.jr-card.in-back { animation-name: jrBackIn; }
@keyframes jrIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes jrBackIn { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

.jr-eyebrow { font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.jr-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.7rem); line-height: 1.08; letter-spacing: -0.04em; outline: none; }
.jr-title em { color: var(--muted); }
.jr-sub { margin-top: 14px; max-width: 560px; font-size: 1.04rem; color: var(--ink-soft); }
.jr-small { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }
.jr-bring { margin-top: 12px; display: grid; gap: 8px; }
.jr-bring li { position: relative; padding-left: 20px; }
.jr-bring li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--eucalyptus); }

/* ---------- options ---------- */
.jr-opts { margin-top: 28px; display: grid; gap: 10px; }
.jr-opts.many { grid-template-columns: 1fr 1fr; }
.jr-opt { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-align: left; border-radius: 18px; background: var(--paper); border: 1.5px solid transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .25s, background-color .25s; }
.jr-opt:hover { border-color: var(--line-strong); }
.jr-opt:focus-visible { outline: 2px solid var(--eucalyptus); outline-offset: 2px; }
.jr-opt.on { border-color: var(--accent); background: #fff; }
.jr-opt .k { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }
.jr-opt.on .k { background: var(--accent); color: var(--paper); box-shadow: none; }
.jr-opt .t { flex: 1; min-width: 0; }
.jr-opt strong { display: block; font-size: 1.04rem; font-weight: 600; line-height: 1.25; }
.jr-opt small { display: block; margin-top: 2px; font-size: .86rem; color: var(--ink-soft); }
.jr-opt .box { flex: none; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.jr-opt.on .box { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbf7f1' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: none; }

.jr-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.jr-actions .btn[disabled] { opacity: .45; pointer-events: none; }
.jr-skip { background: none; border: 0; padding: 8px 0; font: inherit; font-weight: 600; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.jr-skip:hover { color: var(--ink); }

/* ---------- insights ---------- */
.jr-chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.jr-chips li { padding: 8px 14px; border-radius: 999px; background: var(--mist-2); color: var(--eucalyptus-deep); font-weight: 600; font-size: .9rem; }
.jr-chips li::first-letter { text-transform: uppercase; }
.jr-alert, .jr-tip { margin-top: 22px; padding: 16px 18px; border-radius: 16px; font-size: .96rem; line-height: 1.5; }
.jr-alert { background: var(--sand); }
.jr-alert a, .jr-tip a, .jr-alt a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.jr-tip { background: var(--mist-2); }
.jr-src { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-soft); }
.jr-src span { display: block; margin-bottom: 4px; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--eucalyptus); }
.jr-calc { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.jr-calc i { width: 34px; height: 34px; border-radius: 50%; background: var(--eucalyptus); box-shadow: inset 0 0 0 6px var(--mist); animation: jrPop .5s var(--ease) both; }
.jr-calc i:nth-child(n) { animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes jrPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- contact ---------- */
.jr-form { margin-top: 26px; display: grid; gap: 14px; max-width: 520px; }
.jr-field span { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 600; }
.jr-field input { width: 100%; height: 54px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--paper); font: inherit; font-size: 1.02rem; color: var(--ink); }
.jr-field input:focus { outline: none; border-color: var(--eucalyptus); background: #fff; }
.jr-field.err input { border-color: #b3261e; }
.jr-times { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jr-times legend { width: 100%; margin-bottom: 8px; font-size: .86rem; font-weight: 600; }
.jr-times label { cursor: pointer; }
.jr-times input { position: absolute; opacity: 0; pointer-events: none; }
.jr-times span { display: inline-block; padding: 9px 14px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: .9rem; font-weight: 600; }
.jr-times input:checked + span { background: var(--ink); color: var(--paper); box-shadow: none; }
.jr-times input:focus-visible + span { outline: 2px solid var(--eucalyptus); outline-offset: 2px; }
.jr-check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); }
.jr-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.jr-check a { text-decoration: underline; }
.jr-msg { min-height: 1.2em; font-size: .9rem; color: #b3261e; }
.jr-msg a { text-decoration: underline; }
.jr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ---------- plan ---------- */
.jr-build p { font-family: var(--display); font-weight: 400; font-size: 1.9rem; letter-spacing: -0.04em; }
.jr-build ul { margin-top: 18px; display: grid; gap: 12px; }
.jr-build li { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.jr-build li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong); transition: background-color .3s, box-shadow .3s; }
.jr-build li.done { color: var(--ink); }
.jr-build li.done::before { background: var(--eucalyptus) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbf7f1' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: none; }
.jr-plan-body.wait { display: none; }
.jr-plan-body.in { animation: jrIn .6s var(--ease) both; }
.jr-plan { margin-top: 26px; padding: clamp(22px, 4vw, 32px); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.jr-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.jr-price strong { font-family: var(--display); font-weight: 400; font-size: 2.5rem; letter-spacing: -0.04em; line-height: 1; }
.jr-price span { color: var(--ink-soft); font-size: .92rem; }
.jr-credit { margin-top: 16px; font-size: .92rem; color: var(--ink-soft); }
.jr-credit b { display: inline-block; margin-right: 8px; padding: 3px 9px; border-radius: 999px; background: var(--eucalyptus); color: var(--paper); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.jr-cov { margin-top: 12px; font-size: .96rem; }
/* anchored options on the plan: same visit, different lengths or types, recommended first */
.jr-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; margin: 6px 0 18px; padding-top: 4px; }
.jr-choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 14px 12px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--canvas); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .25s, background-color .25s; }
.jr-choice strong { font-weight: 600; line-height: 1.2; }
.jr-choice span { font-family: var(--display); font-weight: 400; font-size: 1.3rem; letter-spacing: -0.03em; line-height: 1.1; }
.jr-choice small { font-size: .78rem; color: var(--ink-soft); }
.jr-choice small.tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: var(--eucalyptus); color: var(--paper); font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.jr-choice.on { border-color: var(--accent); background: #fff; box-shadow: 0 10px 24px -16px rgba(33, 30, 25, .48); }
.jr-choice:focus-visible { outline: 2px solid var(--eucalyptus); outline-offset: 2px; }
/* the offer on the plan */
.jr-offer { margin-top: 16px; display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--mist-2); }
.jr-offer b { justify-self: start; padding: 3px 9px; border-radius: 999px; background: var(--eucalyptus); color: var(--paper); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.jr-offer strong { margin-top: 6px; font-size: 1.05rem; }
.jr-offer small { font-size: .82rem; color: var(--ink-soft); }
.jr-book { margin-top: 22px; width: 100%; justify-content: space-between; font-size: 1.05rem; padding-block: 18px; }
.jr-fine { margin-top: 10px; font-size: .82rem; color: var(--ink-soft); }
.jr-h3 { margin-top: 32px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.jr-rmts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.jr-rmts a { display: inline-flex; flex-direction: column; padding: 10px 16px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; line-height: 1.2; }
.jr-rmts a:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.jr-rmts small { font-weight: 500; font-size: .78rem; color: var(--ink-soft); }
.jr-expect { margin-top: 12px; display: grid; gap: 10px; counter-reset: x; }
.jr-expect li { counter-increment: x; display: flex; gap: 12px; }
.jr-expect li::before { content: counter(x, decimal-leading-zero); flex: none; font-family: var(--italic); font-style: italic; color: var(--accent); }
.jr-alt { margin-top: 22px; font-size: .96rem; }
.jr-plan-links { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; }


/* ---------- one-time reminder (saved plan, not booked) ---------- */
.jr-nudge { position: fixed; right: 20px; bottom: 20px; z-index: 150; width: min(360px, calc(100vw - 28px)); display: grid; gap: 10px; padding: 22px; border-radius: var(--r); background: var(--paper); box-shadow: 0 30px 70px -24px rgba(33, 30, 25, .5), inset 0 0 0 1px var(--line); opacity: 0; transform: translateY(16px); transition: opacity .35s var(--ease), transform .5s var(--ease); }
.jr-nudge.on { opacity: 1; transform: none; }
.jr-nudge .jr-eyebrow { margin: 0; }
.jr-nudge strong { font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: -0.03em; line-height: 1.2; }
.jr-nudge-offer { font-size: .9rem; }
.jr-nudge-offer b { margin-right: 6px; padding: 2px 8px; border-radius: 999px; background: var(--eucalyptus); color: var(--paper); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.jr-nudge .btn { justify-content: space-between; }
.jr-nudge .jr-skip { justify-self: start; }
.jr-nudge-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; font-size: 1.3rem; color: var(--ink-soft); cursor: pointer; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .jr-nudge { right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  .jr-modal { padding: 0; }
  .jr-sheet { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .jr-top .logo-text { display: none; }
  .jr-opts.many { grid-template-columns: 1fr; }
  .jr-opt { min-height: 58px; padding: 12px 14px; }
  .jr-opt .k { display: none; }
  .jr-actions .btn { width: 100%; justify-content: space-between; }
  .jr-k-multi .jr-actions, .jr-k-insight .jr-actions {
    position: sticky; bottom: 0; margin-inline: -18px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(rgba(253, 251, 247, 0), var(--canvas) 30%);
  }
  .jr-price strong { font-size: 2.2rem; }
  .jr-choice { padding: 12px 10px 10px; }
  .jr-choice strong { font-size: .86rem; }
  .jr-choice span { font-size: 1.25rem; }
  .jr-choice small.tag { font-size: .58rem; padding: 2px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .jr-card, .jr-plan-body.in, .jr-calc i { animation: none; }
  .jr-sheet, .jr-scrim { transition: none; }
  .jr-progress i { transition: none; }
}
