/* journey.css — the First Home Journey (Phase 1a scaffold)
   Design locked from the approved v3 mockup (PRODUCT_JOURNEY.md):
   stepping stones with NO drawn path, house rebrand styling —
   small-caps labels, sentence-case headings, thin line icons. */

.journey-page { background: var(--warm-white); }

.jwrap { max-width: 920px; margin: 0 auto; padding: 26px 20px 90px; }

/* ── Type helpers (house style) ─────────────────────────── */
.jsc {
  font-family: var(--font-body);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--slate);
}
.jsc-gold { color: var(--gold-dark); font-size: 16px; }
.jsc-sage { color: var(--sage-dark); }
.jblock { display: block; margin-bottom: 6px; }
.jwrap h1, .jwrap h2, .jwrap h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--charcoal);
  text-wrap: balance;
}

/* ── Greeting + progress ────────────────────────────────── */
.jgreet { margin: 14px 0 4px; }
.jgreet h1 { font-size: clamp(27px, 4.6vw, 38px); line-height: 1.12; margin-top: 4px; }
.jgreet p { color: var(--slate); margin-top: 8px; max-width: 58ch; font-size: 15.5px; line-height: 1.6; }
.jprogress { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; font-size: 13.5px; color: var(--slate); }
.jprog-rail { flex: 1; max-width: 220px; height: 6px; border-radius: 3px; background: rgba(28,28,30,0.08); overflow: hidden; }
.jprog-fill { display: block; width: 0%; height: 100%; background: var(--gold); border-radius: 3px; transition: width .4s; }
.jprog-pct { font-family: var(--font-mono); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .jprog-fill { transition: none; } }

/* ── The trail: stepping stones, no drawn path ──────────── */
.jtrail { margin-top: 26px; display: flex; flex-direction: column; gap: 26px; }
.jstop { display: grid; align-items: center; gap: 18px; }
.jstop.left  { grid-template-columns: 64px minmax(0, 460px); justify-content: start; }
.jstop.right { grid-template-columns: minmax(0, 460px) 64px; justify-content: end; }
.jstop.right .jnode { order: 2; }
.jstop.right .jstopcard { order: 1; }

.jnode {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  border: 2px solid var(--border); background: var(--card); color: var(--slate);
}
.jnode svg { width: 24px; height: 24px; }
.jstop.done    .jnode { background: var(--sage); border-color: var(--sage); color: #fff; }
.jstop.current .jnode { background: var(--gold); border-color: var(--gold); color: var(--charcoal); box-shadow: 0 0 0 6px rgba(201,168,76,0.22); }

.jstopcard {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 16px 18px; width: 100%;
  text-align: left; font: inherit; color: inherit;
}
button.jstopcard { cursor: pointer; }
button.jstopcard:hover { border-color: var(--gold); }
button.jstopcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.jstate { display: block; margin-bottom: 2px; font-size: 14px; }
.jstate.here { color: var(--gold-dark); }
.jstate.done-t { color: var(--sage-dark); }
.jstopcard h2 { font-size: 17px; }
.jstopcard p { font-size: 13.5px; color: var(--slate); margin-top: 4px; line-height: 1.55; }
.jstop.ahead .jstopcard { box-shadow: none; background: transparent; }
.jstop.ahead .jstopcard h2 { color: var(--slate); }

.jstop.current .jstopcard { border-color: var(--gold); padding: 20px 22px; }
.jstop.current .jstopcard h2 { font-size: 20px; }
.jbody { margin-top: 8px; font-size: 14.5px; color: var(--slate); line-height: 1.6; }
.jbody strong { color: var(--charcoal); }
.jcta-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.jmins { font-size: 12.5px; color: var(--slate); }
.jmilestone { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--sage-dark); font-size: 13.5px; font-weight: 600; }
.jmilestone svg { width: 16px; height: 16px; flex: none; }

.jsaved { display: flex; align-items: center; gap: 8px; margin-top: 30px; font-size: 13px; color: var(--slate); justify-content: center; }
.jpip { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex: none; }

/* ── Buttons (house: mono, small, gold primary) ─────────── */
.jbtn {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.5px; font-weight: 500;
  border: none; cursor: pointer; padding: 12px 22px; border-radius: var(--radius-sm);
  background: var(--gold); color: var(--charcoal);
}
.jbtn.quiet { background: transparent; color: var(--charcoal); border: 1px solid var(--border); }
.jbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.jbtn[disabled] { opacity: 0.55; cursor: default; }

/* ── Detail views ───────────────────────────────────────── */
.jview { display: none; }
.jview.active { display: block; }
.jback { background: none; border: none; cursor: pointer; color: var(--slate); font: inherit; font-size: 13.5px; padding: 0; margin: 14px 0 16px; }
.jback:hover { color: var(--charcoal); }
.jstephead h2 { font-size: clamp(23px, 3.8vw, 31px); margin-top: 4px; }
.jstephead .jsc { color: var(--gold-dark); font-size: 15px; }
.jstephead p { color: var(--slate); margin-top: 6px; max-width: 60ch; font-size: 15px; line-height: 1.6; }
.jcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.jpad { padding: 20px 22px; }
.jgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.jview section + section { margin-top: 18px; }

/* Your numbers */
.jnumbers { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 16px 0 6px; }
.jnumbers label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--slate); font-variant-caps: all-small-caps; letter-spacing: 0.4px; font-weight: 600; }
.jnumbers input, .jnumbers select {
  font-family: var(--font-mono); font-size: 13.5px; color: var(--charcoal);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 11px; width: 122px;
}
.jnumbers select { width: 96px; }
.jnumbers input:focus-visible, .jnumbers select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.jduty-note { font-size: 13px; color: var(--slate); margin: 4px 0 18px; }
.jduty-note b { color: var(--sage); font-family: var(--font-mono); font-size: 12.5px; }

/* Pathway cards */
.jpaths { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 14px; }
.jpath { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 18px; }
.jpath.best { border-color: var(--gold); border-width: 2px; }
.jflag { display: block; color: var(--gold-dark); font-size: 14px; margin-bottom: 2px; }
.jpath h3 { font-size: 16px; }
.jwhy { font-size: 12.5px; color: var(--slate); margin: 4px 0 12px; min-height: 34px; line-height: 1.5; }
.jbuyby { font-family: var(--font-mono); font-size: 20px; font-weight: 600; margin: 1px 0 10px; color: var(--charcoal); }
.jbuyby.now { color: var(--sage); }
.jstat { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.jstat .k { color: var(--slate); }
.jstat .v { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.jstat .v.good { color: var(--sage); }
.jstat .v.warn { color: var(--terracotta); }

/* When-could-you-buy timeline (rows are .jtl-*, defined in the v3 block below) */
.jbars { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }

/* Our read + caveat */
.jread { background: rgba(28,28,30,0.045); border-radius: var(--radius-md); padding: 16px 20px; font-size: 14.5px; line-height: 1.6; color: var(--charcoal); }
.jread .jsc { color: var(--gold-dark); display: block; margin-bottom: 4px; }
.jcaveat { font-size: 12px; color: var(--slate); margin-top: 12px; line-height: 1.6; }
.jdone-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.jdone-t { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--charcoal); }

/* Checklist + deadlines */
.jcheck { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--border); cursor: pointer; background: none; width: 100%; text-align: left; font: inherit; color: inherit; border-left: none; border-right: none; border-bottom: none; }
.jcheck:first-child { border-top: none; }
.jbox { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--border); flex: none; margin-top: 2px; display: grid; place-items: center; }
.jbox svg { width: 12px; height: 12px; color: #fff; display: none; }
.jcheck.on .jbox { background: var(--sage); border-color: var(--sage); }
.jcheck.on .jbox svg { display: block; }
.jcheck.on .t { text-decoration: line-through; color: var(--slate); }
.jcheck .t { font-size: 14.5px; color: var(--charcoal); }
.jcheck .d { font-size: 12.5px; color: var(--slate); margin-top: 1px; }
.jcheck:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.jdl { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--charcoal); }
.jdl:first-of-type { border-top: none; }
.jwhen { font-family: var(--font-mono); font-size: 12px; color: var(--slate); }
.jdays { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 12px; flex: none; }
.jdays.ok { background: rgba(123,158,135,0.16); color: var(--sage); }
.jdays.soon { background: rgba(201,168,76,0.2); color: var(--gold-dark); }
.jdays.urgent { background: rgba(196,112,74,0.18); color: var(--terracotta); }
.jhint { font-size: 12.5px; color: var(--slate); margin-top: 12px; }

/* ── Stop 1 wizard (native, one question at a time) ─────── */
.jwizard { max-width: 560px; margin: 10px auto 0; }
.jwiz-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 34px 34px 30px; }
.jwiz-dots { display: flex; gap: 7px; margin-bottom: 22px; }
.jwiz-dot { width: 26px; height: 5px; border-radius: 3px; background: rgba(28,28,30,0.1); }
.jwiz-dot.on { background: var(--gold); }
.jwiz-q { font-family: var(--font-display); font-weight: 700; font-size: clamp(21px, 3.4vw, 26px); color: var(--charcoal); letter-spacing: -0.3px; text-wrap: balance; }
.jwiz-help { font-size: 13.5px; color: var(--slate); margin-top: 6px; line-height: 1.55; }
.jwiz-input-row { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.jwiz-cur { font-family: var(--font-mono); font-size: 22px; color: var(--slate); }
.jwiz-input {
  font-family: var(--font-mono); font-size: 26px; font-weight: 500; color: var(--charcoal);
  background: transparent; border: none; border-bottom: 2px solid var(--border);
  padding: 6px 2px; width: 100%; max-width: 260px; font-variant-numeric: tabular-nums;
}
.jwiz-input:focus-visible { outline: none; border-bottom-color: var(--gold); }
.jwiz-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 22px; }
.jwiz-state {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: 0.5px;
  padding: 14px 0; border-radius: var(--radius-md); border: 1.5px solid var(--border);
  background: var(--card); color: var(--charcoal); cursor: pointer;
}
.jwiz-state:hover { border-color: var(--gold); }
.jwiz-state.sel { background: var(--gold); border-color: var(--gold); color: var(--charcoal); font-weight: 700; }
.jwiz-state:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.jwiz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.jwiz-skip { background: none; border: none; cursor: pointer; color: var(--slate); font: inherit; font-size: 13px; padding: 0; }
.jwiz-skip:hover { color: var(--charcoal); }
.jwiz-done-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }
.jwiz-done-icon svg { width: 26px; height: 26px; }
.jwiz-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }

@media (max-width: 640px) {
  .jwiz-card { padding: 26px 20px 24px; }
  .jwiz-states { grid-template-columns: repeat(4, 1fr); gap: 7px; }
}

html.dark-mode .jwiz-card { background: #1F1F22; border-color: rgba(245,240,232,0.13); }
html.dark-mode .jwiz-q { color: var(--cream); }
html.dark-mode .jwiz-help, html.dark-mode .jwiz-cur, html.dark-mode .jwiz-skip { color: rgba(245,240,232,0.62); }
html.dark-mode .jwiz-dot { background: rgba(245,240,232,0.12); }
html.dark-mode .jwiz-dot.on { background: var(--gold); }
html.dark-mode .jwiz-input { color: var(--cream); border-bottom-color: rgba(245,240,232,0.2); }
html.dark-mode .jwiz-input:focus-visible { border-bottom-color: var(--gold); }
html.dark-mode .jwiz-state { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: var(--cream); }
html.dark-mode .jwiz-state.sel { background: var(--gold); border-color: var(--gold); color: var(--charcoal); }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .jstop.left, .jstop.right { grid-template-columns: 52px 1fr; justify-content: start; }
  .jstop.right .jnode { order: 0; }
  .jstop.right .jstopcard { order: 1; }
  .jnode { width: 48px; height: 48px; }
  .jnode svg { width: 21px; height: 21px; }
  .jtrail { gap: 18px; }
  .jgrid2 { grid-template-columns: 1fr; }
  .jnumbers input { width: 104px; }
}

/* ── Dark mode (site convention: html.dark-mode) ────────── */
html.dark-mode .journey-page { background: #171719; }
html.dark-mode .jwrap h1, html.dark-mode .jwrap h2, html.dark-mode .jwrap h3 { color: var(--cream); }
html.dark-mode .jgreet p, html.dark-mode .jstephead p { color: rgba(245,240,232,0.7); }
html.dark-mode .jsc { color: rgba(245,240,232,0.6); }
html.dark-mode .jsc-gold, html.dark-mode .jstephead .jsc, html.dark-mode .jflag, html.dark-mode .jread .jsc { color: var(--gold); }
html.dark-mode .jsc-sage, html.dark-mode .jstate.done-t, html.dark-mode .jmilestone { color: var(--sage-light); }
html.dark-mode .jstate.here { color: var(--gold); }
html.dark-mode .jstopcard, html.dark-mode .jcard, html.dark-mode .jpath { background: #1F1F22; border-color: rgba(245,240,232,0.13); box-shadow: 0 8px 26px rgba(0,0,0,0.4); }
html.dark-mode .jstop.ahead .jstopcard { background: transparent; box-shadow: none; }
html.dark-mode .jstopcard h2, html.dark-mode .jpath h3, html.dark-mode .jdone-t, html.dark-mode .jbuyby, html.dark-mode .jcheck .t, html.dark-mode .jdl, html.dark-mode .jread, html.dark-mode .jstat .v { color: var(--cream); }
html.dark-mode .jstopcard p, html.dark-mode .jbody, html.dark-mode .jwhy, html.dark-mode .jstat .k, html.dark-mode .jtl-row .nm, html.dark-mode .jcheck .d, html.dark-mode .jmins, html.dark-mode .jsaved, html.dark-mode .jcaveat, html.dark-mode .jduty-note, html.dark-mode .jhint, html.dark-mode .jwhen, html.dark-mode .jback, html.dark-mode .jprogress { color: rgba(245,240,232,0.62); }
html.dark-mode .jbody strong { color: var(--cream); }
html.dark-mode .jstop.ahead .jstopcard h2 { color: rgba(245,240,232,0.55); }
html.dark-mode .jnode { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: rgba(245,240,232,0.6); }
html.dark-mode .jstop.done .jnode { background: var(--sage); border-color: var(--sage); color: #14251a; }
html.dark-mode .jstop.current .jnode { background: var(--gold); border-color: var(--gold); color: var(--charcoal); }
html.dark-mode .jread { background: rgba(245,240,232,0.05); }
html.dark-mode .jprog-rail { background: rgba(245,240,232,0.1); }
html.dark-mode .jnumbers input, html.dark-mode .jnumbers select { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: var(--cream); }
html.dark-mode .jnumbers label { color: rgba(245,240,232,0.6); }
html.dark-mode .jbtn.quiet { color: var(--cream); border-color: rgba(245,240,232,0.2); }
html.dark-mode .jstat, html.dark-mode .jdl, html.dark-mode .jcheck { border-color: rgba(245,240,232,0.1); }
html.dark-mode .jstat .v.good { color: var(--sage-light); }
html.dark-mode .jstat .v.warn { color: var(--terracotta-light); }
html.dark-mode .jbuyby.now { color: var(--sage-light); }
html.dark-mode .jdays.ok { background: rgba(123,158,135,0.2); color: var(--sage-light); }
html.dark-mode .jdays.soon { background: rgba(201,168,76,0.22); color: var(--gold); }
html.dark-mode .jdays.urgent { background: rgba(196,112,74,0.24); color: var(--terracotta-light); }

/* Chips (wizard summary + projector numbers context) */
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 18px; border: 1px solid var(--border); background: var(--card); font-size: 13px; color: var(--charcoal); }
.chip b { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; }
html.dark-mode .chip { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: var(--cream); }

/* ── v2 additions: eligibility, inspections, signup moment ── */
.jelig { font-size: 12px; color: var(--terracotta); margin-top: 10px; line-height: 1.5; }
.jpath.inelig { opacity: 0.75; }
.mono-strong { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }

.jsignup { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 22px 0 4px; border-color: var(--gold); }
.jsignup p { font-size: 13.5px; color: var(--slate); line-height: 1.6; max-width: 52ch; }
.jsignup-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.jsignup-actions .jbtn { text-decoration: none; display: inline-block; }

.jinsp-form { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 8px; margin-top: 4px; }
.jinsp-form input { font-family: var(--font-body); font-size: 13.5px; color: var(--charcoal); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 11px; min-width: 0; }
.jinsp-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.jinsp-list { margin-top: 14px; }
.jinsp { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--border); }
.jinsp-main { flex: 1; min-width: 0; }
.jinsp-addr { font-size: 14.5px; color: var(--charcoal); font-weight: 600; }
.jinsp-meta { font-size: 12.5px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; }
.jverdict { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; border: none; cursor: pointer; padding: 6px 12px; border-radius: 12px; flex: none; }
.jverdict.v0 { background: rgba(28,28,30,0.07); color: var(--slate); }
.jverdict.v1 { background: rgba(123,158,135,0.18); color: var(--sage); }
.jverdict.v2 { background: rgba(196,112,74,0.16); color: var(--terracotta); }
.jinsp-del { background: none; border: none; cursor: pointer; color: var(--slate); font-size: 17px; padding: 2px 6px; flex: none; }
.jinsp-del:hover { color: var(--terracotta); }

@media (max-width: 640px) { .jinsp-form { grid-template-columns: 1fr 1fr; } .jinsp-form input:first-child { grid-column: 1 / -1; } }

html.dark-mode .jelig { color: var(--terracotta-light); }
html.dark-mode .jsignup p { color: rgba(245,240,232,0.62); }
html.dark-mode .jinsp-form input { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: var(--cream); }
html.dark-mode .jinsp { border-color: rgba(245,240,232,0.1); }
html.dark-mode .jinsp-addr { color: var(--cream); }
html.dark-mode .jinsp-meta, html.dark-mode .jinsp-del { color: rgba(245,240,232,0.6); }
html.dark-mode .jverdict.v0 { background: rgba(245,240,232,0.1); color: rgba(245,240,232,0.65); }
html.dark-mode .jverdict.v1 { background: rgba(123,158,135,0.22); color: var(--sage-light); }
html.dark-mode .jverdict.v2 { background: rgba(196,112,74,0.22); color: var(--terracotta-light); }


/* ── v3: modal (confirm + milestone), timeline, reset ───── */
.jreset-row { text-align: center; margin-top: 10px; }
.jmodal-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(28,28,30,0.55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
/* The author display:grid above beats the hidden attribute's UA display:none —
   without these two rules the empty overlay renders permanently and eats every
   click on the page (shipped broken in v3; keep them). */
.jmodal-overlay[hidden] { display: none !important; }
.jmodal-icon[hidden] { display: none !important; }
.jmodal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 430px; width: 100%; padding: 30px 30px 26px; text-align: center; }
.jmodal h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--charcoal); letter-spacing: -0.3px; text-wrap: balance; }
.jmodal p { font-size: 14.5px; color: var(--slate); line-height: 1.6; margin-top: 8px; }
.jmodal-btns { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.jmodal-btns .jbtn.danger { background: var(--terracotta); color: #fff; }
.jmodal-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--gold); color: var(--charcoal); }
.jmodal-icon svg { width: 30px; height: 30px; }
.jmodal-icon.sage { background: var(--sage); color: #fff; }
.jmodal .jsc-line { display: block; margin-bottom: 6px; color: var(--gold-dark); }
@media (prefers-reduced-motion: no-preference) {
  .jmodal { animation: jmodal-in .22s ease-out; }
  @keyframes jmodal-in { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* Timeline: position on a shared time axis = when you could buy */
.jtl-axis { display: grid; grid-template-columns: 158px 1fr 92px; gap: 12px; align-items: center; font-size: 11px; color: var(--slate); margin-bottom: 4px; }
.jtl-axis .jtl-ticks { position: relative; height: 16px; font-family: var(--font-mono); }
.jtl-axis .jtl-tick { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.jtl-axis .jtl-tick:first-child { transform: none; }
.jtl-axis .jtl-tick[style*="left:100%"] { transform: translateX(-100%); }
.jtl-tick.jtl-goal { color: var(--gold-dark); font-weight: 600; font-variant-caps: all-small-caps; letter-spacing: 0.4px; }
.jtl-row { display: grid; grid-template-columns: 158px 1fr 92px; gap: 12px; align-items: center; font-size: 13px; padding: 7px 0; }
.jtl-row .nm { color: var(--slate); text-align: right; }
.jtl-rail { position: relative; height: 18px; }
.jtl-rail::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(28,28,30,0.09); border-radius: 1px; }
.jtl-dot { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--gold); }
.jtl-dot.now { background: var(--sage); }
.jtl-dot.best { box-shadow: 0 0 0 4px rgba(201,168,76,0.25); }
.jtl-dot.inelig { background: rgba(28,28,30,0.25); }
.jtl-date { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; color: var(--charcoal); }
.jtl-date.now { color: var(--sage); }
@media (max-width: 560px) { .jtl-axis, .jtl-row { grid-template-columns: 104px 1fr 80px; } }

html.dark-mode .jmodal { background: #1F1F22; border-color: rgba(245,240,232,0.13); }
html.dark-mode .jmodal h2 { color: var(--cream); }
html.dark-mode .jmodal p { color: rgba(245,240,232,0.65); }
html.dark-mode .jtl-rail::before { background: rgba(245,240,232,0.12); }
html.dark-mode .jtl-date { color: var(--cream); }
html.dark-mode .jtl-date.now { color: var(--sage-light); }
html.dark-mode .jtl-dot.inelig { background: rgba(245,240,232,0.25); }
html.dark-mode .jtl-axis { color: rgba(245,240,232,0.55); }

/* ── v4: budget cap hero + date inputs ───────────────────────── */
.jcap { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5.4vw, 42px); letter-spacing: -0.8px; color: var(--charcoal); font-variant-numeric: tabular-nums; margin-top: 4px; }
.jwiz-input.jdate { font-size: 19px; max-width: 230px; }
.jb-dep { width: 100%; }
html.dark-mode .jcap { color: var(--cream); }
.jwiz-states.cols2 .jwiz-state { font-family: var(--font-body); font-size: 13.5px; letter-spacing: 0; line-height: 1.35; padding: 13px 12px; }

/* ── v5: shared / collaborative journeys ─────────────────────── */
#jmode-banner .jsignup { margin: 14px 0 4px; }
#jshare-slot .jsignup { margin-top: 26px; }
body.jro [data-jmark], body.jro #jreset-btn, body.jro .jreset-row, body.jro #jshare-slot, body.jro #jsignup-slot { display: none !important; }

/* ── v6: places library (stop 5) ─────────────────────────────── */
.jplace-filters { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.jplace-filter { font-family: var(--font-body); font-size: 12px; padding: 6px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--slate); cursor: pointer; }
.jplace-filter b { font-family: var(--font-mono); font-weight: 600; font-size: 11px; }
.jplace-filter.sel { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.jplace-st { font-family: var(--font-body); font-variant-caps: all-small-caps; letter-spacing: 0.4px; font-weight: 600; font-size: 13px; padding: 6px 11px; border-radius: 13px; border: 1px solid var(--border); background: var(--card); color: var(--slate); cursor: pointer; flex: none; }
.jplace-st.st-shortlist { border-color: var(--gold); color: var(--gold-dark); background: rgba(201,168,76,0.1); }
.jplace-st.st-offer { border-color: var(--gold-dark); color: var(--charcoal); background: rgba(201,168,76,0.22); }
.jplace-st.st-lost { border-color: rgba(196,112,74,0.4); color: var(--terracotta); background: rgba(196,112,74,0.08); }
.jplace-st.st-won { border-color: var(--sage); color: #fff; background: var(--sage); }
.jplace-st.st-passed { color: var(--slate); }
.jinsp.muted .jinsp-addr { color: var(--slate); text-decoration: line-through; text-decoration-thickness: 1px; }
.jplace-pick { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0 12px; border-bottom: 1px solid var(--border); }
.jplace-pick-chip { font-family: var(--font-body); font-size: 12px; padding: 6px 11px; border-radius: 13px; border: 1px solid var(--border); background: var(--card); color: var(--charcoal); cursor: pointer; }
.jplace-pick-chip:hover { border-color: var(--gold); }
.jplace-pick-chip.sel { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.jplace-pick-chip.st-won:hover { border-color: var(--sage); }
.jcapdelta { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.jcapdelta.over { background: rgba(196,112,74,0.12); color: var(--terracotta); }
.jcapdelta.under { background: rgba(123,158,135,0.14); color: var(--sage); }
#jplaces-slot .jsignup { margin-top: 22px; }
html.dark-mode .jplace-filter, html.dark-mode .jplace-st, html.dark-mode .jplace-pick-chip { background: #1F1F22; border-color: rgba(245,240,232,0.16); }
html.dark-mode .jplace-filter { color: rgba(245,240,232,0.62); }
html.dark-mode .jplace-pick-chip { color: var(--cream); }
html.dark-mode .jplace-filter.sel, html.dark-mode .jplace-pick-chip.sel { background: var(--gold); border-color: var(--gold); color: var(--charcoal); }
html.dark-mode .jplace-st.st-shortlist { color: var(--gold); }
html.dark-mode .jplace-st.st-offer { color: var(--gold); background: rgba(201,168,76,0.16); }
html.dark-mode .jplace-st.st-lost { color: var(--terracotta-light); }
html.dark-mode .jplace-st.st-won { background: var(--sage); color: #14251a; }
html.dark-mode .jcapdelta.under { color: var(--sage-light); }
html.dark-mode .jcapdelta.over { color: var(--terracotta-light); }
html.dark-mode .jplace-pick { border-color: rgba(245,240,232,0.1); }

/* ── v7: worked scenarios ────────────────────────────────────── */
.jscen-list { display: flex; flex-direction: column; }
.jscen-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.jscen-row:first-child { border-top: none; }
.jscen-main { flex: 1; min-width: 0; }
.jscen-name { font-weight: 600; font-size: 14px; color: var(--charcoal); }
.jscen-meta { font-size: 12px; color: var(--slate); margin-top: 2px; line-height: 1.5; }
.jscen-btn { padding: 8px 14px; flex: none; }
#jscen-slot .jsignup { margin-top: 14px; }
html.dark-mode .jscen-name { color: var(--cream); }
html.dark-mode .jscen-meta { color: rgba(245,240,232,0.62); }
html.dark-mode .jscen-row { border-color: rgba(245,240,232,0.1); }

/* ── v8: stop-4 suburb suggester ─────────────────────────────── */
.jsub-list { display: flex; flex-direction: column; }
.jsub-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
.jsub-row:first-child { border-top: none; }
.jsub-row:hover .jsub-name { color: var(--gold-dark); }
.jsub-name { font-weight: 600; font-size: 14px; color: var(--charcoal); }
.jsub-st { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--slate); letter-spacing: 0.5px; margin-left: 4px; }
.jsub-fig { font-family: var(--font-mono); font-size: 12.5px; color: var(--charcoal); white-space: nowrap; font-variant-numeric: tabular-nums; }
.jsub-fig b { font-weight: 600; }
.jsub-kind { font-family: var(--font-body); color: var(--slate); font-size: 11.5px; }
.jsub-input { width: 100%; font: inherit; font-size: 14px; color: var(--charcoal); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; }
.jsub-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
html.dark-mode .jsub-name, html.dark-mode .jsub-fig { color: var(--cream); }
html.dark-mode .jsub-row { border-color: rgba(245,240,232,0.1); }
html.dark-mode .jsub-input { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: var(--cream); }

/* ── audit: CLS + a11y ───────────────────────────────────────── */
/* The trail renders after journey.js runs — reserve approximate space so the
   saved-note / reset / share rows below it don't jump on first paint. */
#jtrail:empty { min-height: 660px; }
/* Always-visible page content below the app (tool-page pattern) */
.jseo { max-width: 720px; margin: 80px auto 0; padding-top: 34px; border-top: 1px solid var(--border); }
.jseo h2 { font-size: 24px; }
.jseo h3 { font-size: 18px; margin-top: 28px; }
.jseo p, .jseo li, .jseo dd { font-size: 14.5px; line-height: 1.7; color: var(--slate); }
.jseo p { margin-top: 10px; }
.jseo ol { margin: 12px 0 0 20px; display: flex; flex-direction: column; gap: 9px; }
.jseo li strong, .jseo dt { color: var(--charcoal); }
.jseo dl { margin-top: 12px; }
.jseo dt { font-weight: 600; font-size: 14.5px; margin-top: 16px; }
.jseo dd { margin: 4px 0 0; }
.jseo a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }
.jseo-links { margin-top: 24px; font-size: 13px; }
html.dark-mode .jseo { border-color: rgba(245,240,232,0.12); }
html.dark-mode .jseo p, html.dark-mode .jseo li, html.dark-mode .jseo dd { color: rgba(245,240,232,0.65); }
html.dark-mode .jseo li strong, html.dark-mode .jseo dt { color: var(--cream); }
html.dark-mode .jseo a { color: var(--gold); }

/* ── stake-at-flat-value table (projector) ───────────────────── */
.jnet { margin-top: 12px; }
.jnet-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) 1fr 1fr 1fr; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.jnet-row:first-child { border-top: none; }
.jnet-row .nm { color: var(--slate); }
.jnet-row .v { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--charcoal); font-variant-numeric: tabular-nums; text-align: right; }
.jnet-head span { font-family: var(--font-body); font-variant-caps: all-small-caps; letter-spacing: 0.4px; font-weight: 600; color: var(--slate); font-size: 13px; text-align: right; }
.jnet-row.best .nm { color: var(--gold-dark); font-weight: 600; }
.jnet-row.inelig .v, .jnet-row.inelig .nm { color: rgba(28,28,30,0.35); }
html.dark-mode .jnet-row { border-color: rgba(245,240,232,0.1); }
html.dark-mode .jnet-row .v { color: var(--cream); }
html.dark-mode .jnet-row.best .nm { color: var(--gold); }
html.dark-mode .jnet-row.inelig .v, html.dark-mode .jnet-row.inelig .nm { color: rgba(245,240,232,0.3); }

.jfhss p { font-size: 14.5px; line-height: 1.65; color: var(--slate); }
.jfhss strong, .jfhss .mono-strong { color: var(--charcoal); }
.jfhss a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }
html.dark-mode .jfhss p { color: rgba(245,240,232,0.65); }
html.dark-mode .jfhss strong, html.dark-mode .jfhss .mono-strong { color: var(--cream); }
html.dark-mode .jfhss a { color: var(--gold); }

/* ── stop-7 final-costs reconciliation ───────────────────────── */
.jrec-price { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; }
.jrec-price label { font-family: var(--font-body); font-variant-caps: all-small-caps; letter-spacing: 0.4px; font-weight: 600; color: var(--slate); font-size: 13.5px; }
.jrec-price input { font-family: var(--font-mono); font-size: 14px; color: var(--charcoal); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; width: 140px; }
.jrec-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.jrec-row .k { color: var(--slate); }
.jrec-row .est { font-family: var(--font-mono); font-size: 12.5px; color: var(--slate); text-align: right; font-variant-numeric: tabular-nums; }
.jrec-row .act { text-align: right; }
.jrec-row .act input { font-family: var(--font-mono); font-size: 13px; color: var(--charcoal); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; width: 110px; text-align: right; }
.jrec-row .act input:focus-visible, .jrec-price input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.jrec-head { border-top: none; padding-bottom: 2px; }
.jrec-head .est, .jrec-head .act { font-family: var(--font-body); font-variant-caps: all-small-caps; letter-spacing: 0.4px; font-weight: 600; font-size: 13px; }
.jrec-total .est, .jrec-total .act { font-weight: 700; color: var(--charcoal); font-size: 13.5px; }
.jrec-verdict { margin-top: 12px; font-size: 14px; font-weight: 600; }
.jrec-verdict.over { color: var(--terracotta); }
.jrec-verdict.under { color: var(--sage-dark); }
html.dark-mode .jrec-row { border-color: rgba(245,240,232,0.1); }
html.dark-mode .jrec-row .act input, html.dark-mode .jrec-price input { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: var(--cream); }
html.dark-mode .jrec-total .est, html.dark-mode .jrec-total .act { color: var(--cream); }
html.dark-mode .jrec-verdict.under { color: var(--sage-light); }

/* stop-5 offer strategy */
.joffer-cap { font-size: 14.5px; line-height: 1.6; color: var(--slate); margin-bottom: 12px; }
.joffer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.joffer-h { font-size: 15px; margin-bottom: 4px; }
.joffer-grid p { font-size: 13.5px; line-height: 1.6; color: var(--slate); }
@media (max-width: 640px) { .joffer-grid { grid-template-columns: 1fr; } }
html.dark-mode .joffer-cap, html.dark-mode .joffer-grid p { color: rgba(245,240,232,0.65); }

.jplace-proj { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4px; padding: 6px 11px; border-radius: 13px; border: 1px solid var(--border); background: transparent; color: var(--gold-dark); cursor: pointer; flex: none; }
.jplace-proj:hover { border-color: var(--gold); }
html.dark-mode .jplace-proj { color: var(--gold); border-color: rgba(245,240,232,0.16); }

/* dark-sweep fixes (overnight item 8) */
html.dark-mode .jtl-tick.jtl-goal { color: var(--gold); }
html.dark-mode .jplace-st { color: rgba(245,240,232,0.6); }
html.dark-mode .jrec-row .k, html.dark-mode .jrec-price label { color: rgba(245,240,232,0.62); }
html.dark-mode .jrec-row .est { color: rgba(245,240,232,0.45); }
html.dark-mode .jrec-head .est, html.dark-mode .jrec-head .act { color: rgba(245,240,232,0.55); }

/* wizard-done grouped summary (replaces the chip cloud) */
.jsum { margin-top: 20px; display: flex; flex-direction: column; gap: 18px; text-align: left; }
.jsum-group .jsc { margin-bottom: 2px; }
.jsum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.jsum-row:last-child { border-bottom: none; }
.jsum-row .k { color: var(--slate); }
.jsum-row .v { color: var(--charcoal); font-weight: 600; text-align: right; }
.jsum-row .v.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
html.dark-mode .jsum-row { border-color: rgba(245,240,232,0.1); }
html.dark-mode .jsum-row .k { color: rgba(245,240,232,0.55); }
html.dark-mode .jsum-row .v { color: var(--cream); }

/* stop-2 decision layer: priority re-ranker + questions */
.jprio-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.jprio-chip { font-family: var(--font-body); font-size: 13px; padding: 9px 14px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--card); color: var(--charcoal); cursor: pointer; }
.jprio-chip:hover { border-color: var(--gold); }
.jprio-chip.sel { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); font-weight: 600; }
.jfaq-item { border-top: 1px solid var(--border); }
.jfaq-item:first-of-type { border-top: none; }
.jfaq-item summary { cursor: pointer; padding: 12px 0; font-size: 14.5px; font-weight: 600; color: var(--charcoal); list-style-position: outside; }
.jfaq-item summary:hover { color: var(--gold-dark); }
.jfaq-item p { font-size: 13.5px; line-height: 1.65; color: var(--slate); padding: 0 0 14px 18px; }
.jfaq-item a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }
html.dark-mode .jprio-chip { background: #1F1F22; border-color: rgba(245,240,232,0.16); color: var(--cream); }
html.dark-mode .jprio-chip.sel { background: var(--gold); border-color: var(--gold); color: var(--charcoal); }
html.dark-mode .jfaq-item { border-color: rgba(245,240,232,0.1); }
html.dark-mode .jfaq-item summary { color: var(--cream); }
html.dark-mode .jfaq-item summary:hover { color: var(--gold); }
html.dark-mode .jfaq-item p { color: rgba(245,240,232,0.65); }
html.dark-mode .jfaq-item a { color: var(--gold); }
