.journey-panel {
    display: grid;
    gap: clamp(25px, 4vw, 55px);
    padding: clamp(21px, 4.35vw, 60px);
    border: 1px solid #354780;
    border-radius: 28px;
    background: radial-gradient(ellipse at 95% 6%, #253b7a 0%, #171f40 48%, #10172e 78%);
    color: var(--white);
}
.journey-panel .hero-copy, .journey-stage, .journey-frame { min-width: 0; }
.journey-stage-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 3px 12px;
    margin-bottom: 12px;
}
.journey-stage-heading > p { font: 730 1.2rem/1.13 var(--display); letter-spacing: -.023em; }
.journey-stage-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: #c4d0ef;
    font-size: .8rem;
}
.journey-replay {
    min-height: 35px;
    padding: 4px 9px;
    border: 1px solid #758cbe;
    border-radius: 7px;
    background: #263b6c;
    color: #f1f6ff;
    font-weight: 660;
    cursor: pointer;
}
.journey-replay:hover { background: #354d84; }
.journey-replay:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.journey-replay span { color: var(--lime); }
.journey-frames {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.journey-frame {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border: 1px solid #5269a5;
    border-radius: 15px;
    background: #161f3c;
}
.journey-visual {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 208px;
    overflow: hidden;
    padding: clamp(10px, 2.2vw, 25px);
    border-bottom: 1px solid #435884;
    background:
        radial-gradient(ellipse at 52% 77%, #334f92b3, transparent 65%),
        linear-gradient(135deg, #192746, #1e315d);
}
.journey-visual::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .32;
    background-image:
        linear-gradient(#657aad55 1px, transparent 1px),
        linear-gradient(90deg, #657aad55 1px, transparent 1px);
    background-size: 25px 25px;
}
.journey-window {
    width: min(100%, 375px);
    min-width: 0;
    overflow: hidden;
    border: 1px solid #738cce;
    border-radius: 12px;
    background: #182749;
    box-shadow: 0 14px 24px #0711275e;
}
.journey-chrome {
    position: relative;
    padding: 7px 12px 7px 30px;
    border-bottom: 1px solid #5a70a0;
    background: #25385f;
    color: #e1eaff;
    font-size: .76rem;
    font-weight: 690;
    line-height: 1.27;
    text-align: center;
    overflow-wrap: anywhere;
}
.journey-chrome::before {
    content: "";
    position: absolute;
    inset: 50% auto auto 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c2cdeb;
    box-shadow: 6px 0 #9eafd6, 12px 0 #8498c8;
    transform: translateY(-50%);
}
.journey-candidates-heading, .journey-candidate {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    align-items: center;
    gap: 4px 9px;
    margin-inline: 9px;
    padding: 5px 8px;
    font-size: .82rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
}
.journey-candidates-heading {
    margin-block: 7px 2px;
    color: #bdcbed;
    font-size: .7rem;
}
.journey-candidate {
    min-height: 35px;
    margin-block: 3px;
    border: 1px solid #506799;
    border-radius: 6px;
    background: #263963;
}
.journey-candidate:last-child { margin-bottom: 10px; }
.journey-candidate > span, .journey-candidates-heading > span:last-child { text-align: right; }
.journey-candidate > span { color: #d3dff9; }
.journey-candidate--picked {
    border-color: #dfff75;
    background: #e3fa9a;
    color: #243019;
}
.journey-candidate--picked > span { color: #364a28; }

.journey-archive {
    width: min(82%, 345px);
    margin: 0 7% 15px 0;
}
.journey-archive-photo {
    min-height: 92px;
    background: #829475 url("archive-garden.webp") 63% center / cover;
}
.journey-archive-summary {
    display: flex;
    gap: 5px 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 7px 10px;
    font-size: .78rem;
    line-height: 1.26;
}
.journey-archive-summary strong { color: var(--lime); }
.journey-inspection-card {
    position: absolute;
    z-index: 1;
    display: grid;
    gap: 3px;
    max-width: min(70%, 209px);
    padding: 7px 10px;
    border: 1px solid #8298ce;
    border-radius: 8px;
    background: #243863;
    box-shadow: 0 9px 18px #0711265b;
    font-size: .78rem;
    line-height: 1.23;
}
.journey-inspection-card strong { color: #e8f0ff; font-size: .71rem; }
.journey-inspection-card span { color: #d7e2fb; }
.journey-inspection-card--links { inset: 19% 4% auto auto; }
.journey-inspection-card--history { inset: auto auto 8% 4%; border-color: #b5cc79; background: #253c42; }
.journey-inspection-card--history strong { color: #e7f8bc; }

.journey-built-site { background: #f5f1e6; color: #273a29; }
.journey-site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 2px 8px;
    padding: 6px 10px;
    font-size: .78rem;
    line-height: 1.22;
}
.journey-site-nav > span { color: #3c583e; font-size: .71rem; }
.journey-site-banner {
    display: grid;
    align-content: end;
    gap: 6px;
    min-height: 115px;
    padding: 12px;
    background: linear-gradient(90deg, #13271bea, #152c21b8 57%, #152c2129), url("archive-garden.webp") 64% center / cover;
    color: #fcfff4;
}
.journey-site-banner strong { max-width: 14ch; font: 700 clamp(1.16rem, 2.25vw, 2.1rem)/1.03 Georgia, serif; }
.journey-site-banner > span { max-width: 27ch; font-size: .77rem; line-height: 1.24; }

.journey-caption { padding: 12px 15px; }
.journey-caption h2 { margin-bottom: 5px; font-size: clamp(1.53rem, 2.3vw, 2.1rem); }
.journey-caption p { color: #d7e1fa; font-size: .94rem; line-height: 1.36; }
.journey-caption a { display: inline-block; margin-top: 7px; color: #e4f9a6; font-size: .88rem; font-weight: 690; }
.journey-caption a:hover { text-decoration-thickness: 2px; }
.journey-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 10px;
}
.journey-controls button {
    min-height: 40px;
    padding: 6px;
    border: 1px solid #586fa5;
    border-radius: 7px;
    background: #203355;
    color: #eef3ff;
    font-size: .89rem;
    font-weight: 690;
    cursor: pointer;
}
.journey-controls button:hover { background: #314879; }
.journey-controls button[aria-current="step"] { border-color: var(--lime); background: var(--lime); color: #172138; }
.journey-controls button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.journey-scroll-hint { display: none; }

@media (min-width: 900px) and (min-height: 600px) and (prefers-reduced-motion: no-preference) {
    .journey-shell[data-playback]::after {
        content: "";
        display: block;
        height: clamp(470px, 67vh, 650px);
    }
    .journey-shell[data-playback] .journey-panel {
        position: sticky;
        top: 12px;
        min-height: min(830px, calc(100svh - 118px));
        grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
        align-items: center;
    }
    .journey-shell[data-playback] .journey-scroll-hint {
        display: block;
        margin-top: 9px;
        color: #d0dbf9;
        font-size: .83rem;
        text-align: center;
    }
    .journey-shell[data-playback] h1 { font-size: clamp(3.45rem, 6.1vw, 6.75rem); }
    .journey-shell[data-playback] .journey-frames { grid-template-columns: minmax(0, 1fr); }
    .journey-shell[data-playback] .journey-frame {
        grid-area: 1 / 1;
        visibility: hidden;
        opacity: 0;
        transform: translateY(12px) scale(.97);
        transition: opacity 260ms ease, transform 400ms cubic-bezier(.21, .75, .25, 1), visibility 0s linear 400ms;
    }
    .journey-shell[data-playback] .journey-frame[data-active] {
        z-index: 1;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition-delay: 0s;
    }
    .journey-shell[data-playback] .journey-visual { min-height: clamp(217px, 20vw, 278px); }
    .journey-shell[data-playback] .journey-caption { min-height: 108px; }
}

@media (prefers-reduced-motion: no-preference) {
    .journey-panel #hero-heading { animation: journey-title-arrive 720ms ease-out both; }
    .journey-frame[data-animate] { --journey-ease: cubic-bezier(.21, .72, .25, 1); }
    .journey-frame[data-animate] .journey-window { animation: journey-window-arrive 690ms var(--journey-ease) both; }
    .journey-frame[data-animate] .journey-visual--find::after {
        content: "";
        position: absolute;
        z-index: 2;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(180deg, transparent 65%, #c8fa6c40 72%, #edff99b8 73%, transparent 75%);
        animation: journey-sweep 1230ms ease-out 175ms both;
    }
    .journey-frame[data-animate] .journey-candidate {
        animation: journey-line-arrive 520ms var(--journey-ease) 160ms both;
    }
    .journey-frame[data-animate] .journey-candidate:nth-of-type(4) { animation-delay: 245ms; }
    .journey-frame[data-animate] .journey-candidate:nth-of-type(5) { animation-delay: 330ms; }
    .journey-frame[data-animate] .journey-candidate--picked {
        animation:
            journey-line-arrive 520ms var(--journey-ease) 160ms both,
            journey-candidate-highlight 660ms ease-out 600ms both;
    }
    .journey-frame[data-animate] .journey-candidate--picked > span {
        animation: journey-candidate-text 660ms ease-out 600ms both;
    }
    .journey-frame[data-animate] .journey-inspection-card {
        animation: journey-card-arrive 720ms var(--journey-ease) 260ms both;
    }
    .journey-frame[data-animate] .journey-inspection-card--history { animation-delay: 465ms; }
    .journey-frame[data-animate] .journey-site-nav {
        animation: journey-line-arrive 640ms var(--journey-ease) 185ms both;
    }
    .journey-frame[data-animate] .journey-site-banner {
        animation: journey-site-reveal 760ms var(--journey-ease) 420ms both;
    }
    @keyframes journey-title-arrive {
        from { opacity: .73; transform: translateY(14px); }
        to { opacity: 1; transform: translateY(0); }
    }
    @keyframes journey-window-arrive {
        from { opacity: .38; transform: translateY(25px) scale(.9); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes journey-sweep {
        0% { opacity: 0; transform: translateY(-82%); }
        20% { opacity: .85; }
        75% { opacity: .9; }
        100% { opacity: 0; transform: translateY(32%); }
    }
    @keyframes journey-line-arrive {
        from { opacity: .38; transform: translateX(-20px); }
        to { opacity: 1; transform: translateX(0); }
    }
    @keyframes journey-candidate-highlight {
        0% { background: #263963; border-color: #6d86ba; color: #f5f7ff; }
        75% { background: #efffc5; border-color: #eaff91; color: #243019; }
        100% { background: #e3fa9a; border-color: var(--lime); color: #243019; }
    }
    @keyframes journey-candidate-text {
        0% { color: #d3dff9; }
        75%, 100% { color: #364a28; }
    }
    @keyframes journey-card-arrive {
        from { opacity: .12; transform: translate(22px, 15px) scale(.91); }
        to { opacity: 1; transform: translate(0, 0) scale(1); }
    }
    @keyframes journey-site-reveal {
        from { opacity: .25; clip-path: inset(0 0 85% 0); }
        to { opacity: 1; clip-path: inset(0); }
    }
}

@media (max-width: 880px) {
    .journey-frames { grid-template-columns: minmax(0, 1fr); }
    .journey-visual { min-height: 203px; }
}
@media (max-width: 520px) {
    .journey-panel { gap: 22px; padding: 18px; border-radius: 19px; }
    .journey-caption { padding: 10px 12px; }
    .journey-candidates-heading, .journey-candidate {
        grid-template-columns: minmax(0, 1.36fr) minmax(0, .64fr);
        gap: 5px;
        margin-inline: 6px;
        padding-inline: 5px;
    }
    .journey-candidate { font-size: .76rem; }
    .journey-visual--inspect { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 6px; }
    .journey-archive { grid-column: 1 / -1; width: 100%; margin: 0; }
    .journey-inspection-card {
        position: static;
        width: 100%;
        height: 100%;
        min-width: 0;
        max-width: none;
        padding: 6px 7px;
    }
}
