/* Every rule is scoped to the optional companion; disabling its assets restores
   the original calculator. The persistent scene never owns form navigation. */
.solar-journey[hidden] { display: none !important; }
.wizard.journey-active {
  display: grid;
  grid-template-columns: minmax(300px, 470px) minmax(0, 680px);
  align-items: start;
  gap: clamp(28px, 4vw, 68px);
  padding: 48px clamp(20px, 4vw, 64px) 72px;
}
.journey-active > .step { grid-column: 2; min-width: 0; }
.solar-journey {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  position: sticky;
  top: 36px;
  padding-top: 12px;
}
.sj-eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .16em;
  line-height: 1.5;
  color: var(--orange-dark);
}
.sj-title {
  max-width: 420px;
  margin: 0;
  font-size: clamp(26px, 2.55vw, 38px);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.sj-description {
  margin: 14px 0 0;
  max-width: 360px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--dark);
  min-height: 50px;
}
.sj-stage { position: relative; width: 100%; height: clamp(280px, 29vw, 390px); }
.sj-halo {
  position: absolute;
  inset: 12% 3% 4%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #f5d9a752 0%, #f5d9a718 45%, transparent 70%);
  pointer-events: none;
}
.sj-canvas { display: block; position: relative; width: 100%; height: 100%; outline: none; }
.sj-legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; }
.sj-illustration { color: #76716c; font-size: 11px; letter-spacing: .015em; }
.sj-pause {
  border: 0; background: transparent; color: #68635d;
  padding: 10px 0 10px 10px; font: inherit; font-size: 11px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  min-height: 40px;
}
.sj-pause[hidden] { display: none; }
.sj-pause:hover { color: var(--orange-dark); }
.sj-pause:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.sj-pause-icon { width: 13px; text-align: center; }
.sj-milestones { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 0; padding: 0; }
.sj-milestones li { position: relative; padding-top: 15px; color: #85817c; font-size: 11px; line-height: 1.4; }
.sj-milestones li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: #d9d6d1; transition: background .45s; }
.sj-milestones .is-current { color: var(--orange-dark); font-weight: 650; }
.sj-milestones .is-current::before, .sj-milestones .is-done::before { background: var(--orange); }
.sj-milestones .is-done { color: #5e655d; }
.journey-active #step-generating .spinner { display: none; }
.journey-active #step-generating .step-card { margin-top: 68px; }
.wizard.journey-result { grid-template-columns: minmax(240px, 330px) minmax(0, 920px); gap: 36px; }
.journey-result .sj-title { font-size: 30px; }
.journey-result .sj-stage { height: 290px; }
.journey-result .sj-milestones { display: none; }
@media (min-width: 981px) {
  .journey-active > .step.active { animation: sj-arrive .4s ease both; }
  @keyframes sj-arrive { from { opacity: .25; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 1100px) and (min-width: 981px) {
  .wizard.journey-active { grid-template-columns: minmax(260px, 340px) minmax(0, 680px); gap: 28px; padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 980px) {
  .wizard.journey-active, .wizard.journey-result {
    grid-template-columns: minmax(0, 680px);
    gap: 16px;
    padding: 20px 16px 56px;
  }
  .journey-active > .step { grid-column: 1; grid-row: 2; }
  .solar-journey { position: relative; top: auto; padding: 0 8px; }
  .sj-heading { width: 51%; position: relative; z-index: 1; padding: 18px 0 0; min-height: 154px; }
  .sj-eyebrow { font-size: 10px; letter-spacing: .12em; margin-bottom: 10px; }
  .sj-title, .journey-result .sj-title { font-size: clamp(20px, 3.4vw, 27px); line-height: 1.18; }
  .sj-description { font-size: 12px; line-height: 1.5; margin-top: 9px; min-height: 0; }
  .sj-stage, .journey-result .sj-stage { position: absolute; top: -8px; right: -8px; width: 53%; height: 190px; }
  .sj-legend { padding: 0; margin-top: 5px; }
  .sj-illustration { font-size: 11px; }
  .sj-pause { font-size: 12px; }
  .sj-milestones { margin-top: 5px; gap: 6px; }
  .sj-milestones li { font-size: 11px; padding-top: 9px; }
  .journey-active #step-generating .step-card { margin-top: 0; }
  .journey-result .sj-description { display: none; }
  .journey-result .sj-heading { min-height: 138px; }
  .journey-result .sj-stage { height: 166px; }
}
@media (max-width: 480px) {
  .wizard.journey-active { padding: 10px 12px 48px; gap: 14px; }
  .sj-heading { width: 51%; min-height: 158px; padding-top: 15px; }
  .sj-title, .journey-result .sj-title { font-size: 21px; }
  .sj-eyebrow { font-size: 10px; letter-spacing: .04em; }
  .sj-description { font-size: 12px; }
  .sj-stage { top: 0; height: 176px; width: 54%; right: -9px; }
  .sj-milestones li { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .journey-active > .step.active { animation: none; }
  .sj-milestones li::before { transition: none; }
}

/* Immersive presentation. ?journey=side keeps the original companion layout. */
.sj-backdrop { display: none; }
.wizard.journey-background {
  display: block;
  position: relative;
  padding: clamp(42px, 7vh, 90px) 6vw 100px;
  min-height: calc(100dvh - 100px);
}
.journey-background .solar-journey {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
  background: #a6bdc1;
}
.journey-background .sj-backdrop {
  display: block;
  position: absolute;
  inset: -2%;
  background: linear-gradient(110deg, #1334464d, #607d850d 48%, #ebcca824), url('/static/assets/solar-journey-germany.webp') center / cover;
}
.journey-background .sj-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0d293f3d, transparent 50%), linear-gradient(0deg, #162c3d52, transparent 30%);
}
.journey-background .sj-heading { display: none; }
.journey-background .sj-stage,
.journey-background.journey-result .sj-stage {
  position: absolute;
  top: 4vh;
  right: -9vw;
  width: 76vw;
  height: 90vh;
  height: 90dvh;
  z-index: 1;
}
.journey-background .sj-halo {
  inset: 18% 8% 8%;
  background: radial-gradient(ellipse, #ffdc9f20, transparent 65%);
}
.journey-background .sj-canvas { pointer-events: auto; }
.journey-background > .step {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
}
.journey-background .step-card {
  background: rgba(255, 253, 248, .92);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: 0 18px 65px #122d3c24, 0 2px 8px #142a3312;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  padding: clamp(26px, 3vw, 42px);
  border-radius: 22px;
}
.journey-background #step-generating .step-card { margin-top: 80px; }
.journey-background .sj-legend {
  position: absolute;
  z-index: 2;
  bottom: 86px;
  right: 5vw;
  width: min(390px, 40vw);
  padding: 0;
  pointer-events: auto;
  margin: 0;
}
.journey-background .sj-illustration,
.journey-background .sj-pause { color: #fff; text-shadow: 0 1px 8px #173d49; font-size: 12px; }
.journey-background .sj-pause:hover { color: #ffdaae; }
.journey-background .sj-milestones {
  position: absolute;
  z-index: 2;
  right: 5vw;
  bottom: 146px;
  width: min(430px, 40vw);
  margin: 0;
}
.journey-background .sj-milestones li { color: #f5f8f9; text-shadow: 0 1px 8px #173d49; font-size: 12px; }
.journey-background .sj-milestones .is-current { color: #ffe0b7; }
.journey-background .sj-milestones li::before { background: #ffffff63; }
.journey-background .sj-milestones .is-current::before,
.journey-background .sj-milestones .is-done::before { background: #ffc887; }
.solar-journey-background .progress-wrap,
.solar-journey-background .page-footer {
  position: relative;
  z-index: 3;
}
.solar-journey-background .progress-wrap {
  background: rgba(249, 250, 247, .9);
  border-bottom: 1px solid #ffffff80;
}
.solar-journey-background .page-footer a,
.solar-journey-background .page-footer span { color: #fff; text-shadow: 0 1px 7px #16303a; }
.solar-journey-background .page-footer { background: #16303a40; }
.journey-background.journey-result > .step { max-width: 920px; margin-inline: auto; }
.journey-background.journey-result .sj-stage { opacity: .7; }
.journey-background.journey-result .sj-legend { bottom: 86px; }
.is-embedded .wizard.journey-background { min-height: 0; }
@media (max-width: 1200px) and (min-width: 981px) {
  .wizard.journey-background { padding-left: 4vw; }
  .journey-background > .step { max-width: 510px; }
  .journey-background .sj-stage { right: -16vw; }
}
@media (max-width: 980px) {
  .wizard.journey-background {
    padding: 252px 20px 82px;
    min-height: calc(100dvh - 100px);
  }
  .journey-background > .step { max-width: 680px; margin-inline: auto; }
  .journey-background .solar-journey { height: 100%; }
  .journey-background .sj-backdrop { background-position: 67% center; }
  .journey-background .sj-stage,
  .journey-background.journey-result .sj-stage {
    top: 76px;
    right: 0;
    width: 100%;
    height: 305px;
    opacity: 1;
  }
  .journey-background .sj-legend,
  .journey-background.journey-result .sj-legend {
    top: 331px;
    bottom: auto;
    right: 26px;
    left: 26px;
    width: auto;
    height: 36px;
  }
  .journey-background .sj-illustration,
  .journey-background .sj-pause { font-size: 11px; }
  .journey-background .sj-milestones { display: none; }
  .journey-background #step-generating .step-card { margin-top: 0; }
  .journey-background .step-card { background: rgba(255, 253, 249, .95); padding: 30px 24px; }
}
@media (max-width: 480px) {
  .wizard.journey-background { padding: 246px 12px 72px; }
  .journey-background .step-card { padding: 26px 20px; border-radius: 20px; }
  .journey-background .sj-stage,
  .journey-background.journey-result .sj-stage { top: 75px; height: 290px; }
  .journey-background .sj-legend,
  .journey-background.journey-result .sj-legend { top: 325px; left: 24px; right: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .journey-background .sj-backdrop { animation: sj-landscape-drift 38s ease-in-out infinite alternate; }
  .journey-background .sj-motion-paused .sj-backdrop { animation-play-state: paused; }
  @keyframes sj-landscape-drift { from { transform: scale(1) translateX(-.4%); } to { transform: scale(1.025) translateX(.4%); } }
}
/* On a phone the model scrolls away above the card; the landscape stays behind.
   This also avoids covering inputs when browser chrome changes viewport height. */
@media (max-width: 980px) {
  .wizard.journey-background { padding-top: 268px; }
  .journey-background .solar-journey { position: absolute; top: 0; overflow: visible; }
  .journey-background .sj-backdrop { position: fixed; }
  .journey-background .sj-stage,
  .journey-background.journey-result .sj-stage { top: -18px; height: 282px; }
  .journey-background .sj-legend,
  .journey-background.journey-result .sj-legend { top: 218px; }
}

/* Still mode (phones/small tablets, solar-journey.js): only the countryside backdrop
   behind the card — no canvas, no legend, no pause button. The card starts near
   the top instead of below a 280px model. */
.journey-still .sj-stage,
.journey-still .sj-legend,
.journey-still .sj-milestones,
.journey-still .sj-heading { display: none; }
.wizard.journey-background.journey-still {
  padding-top: clamp(28px, 6vh, 56px);
  min-height: calc(100dvh - 100px);
}
.journey-background.journey-still .solar-journey {
  position: fixed;
  inset: 0;
  height: 100%;
  overflow: hidden;
}
.journey-background.journey-still .sj-backdrop { position: absolute; }
.journey-background.journey-still .step-card { background: rgba(255, 253, 249, .95); }
.is-embedded .wizard.journey-background.journey-still { min-height: 0; }
