/* Investment Path – guide shell
   Guided planner frame: header, step tabs, progress, cards and choices.
   ========================================================================== */

.guided-flow {
    min-height: 100vh;
    padding: 38px 20px 48px;
}

body[data-experience="guide"] > .landing-footer {
    display: none;
}

.guide-shell,
.result-shell {
    width: min(100%, 1120px);
    margin-inline: auto;
}

.guide-header,
.guided-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.guide-header h1,
.guided-result-head h1 {
    margin-top: 10px;
    font-size: clamp(31px, 5vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.guide-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--text-dim) !important;
    background: var(--surface);
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
    transition: color 0.18s ease, transform 0.18s ease,
        border-color 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    .guide-close:hover {
        color: var(--text) !important;
        border-color: var(--border-strong);
        transform: rotate(4deg);
    }
}

.guide-close > span {
    display: block;
    transform: translateY(-2px);
}

.guide-progress-tabs {
    margin-top: 30px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
}

.guide-step-tabs {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    margin: 0;
    padding: 6px 6px 0;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.guide-step-tabs::-webkit-scrollbar {
    display: none;
}

.guide-step-tabs li {
    min-width: 0;
}

.guide-step-tabs button {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    color: var(--text-faint);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease,
        background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.guide-step-tabs button > span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: inherit;
    font-size: 8px;
    font-weight: 820;
    font-variant-numeric: tabular-nums;
}

.guide-step-tabs button strong {
    overflow: hidden;
    font-size: 9.5px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
    .guide-step-tabs button:not(:disabled):hover {
        color: var(--text);
        background: var(--surface-hover);
        transform: translateY(-1px);
    }
}

.guide-step-tabs button[aria-current="step"] {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface-solid);
    box-shadow: 0 -8px 24px rgba(99, 102, 241, 0.07);
}

.guide-step-tabs button[aria-current="step"] > span {
    color: #fff;
    border-color: transparent;
    background: var(--gradient);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.guide-step-tabs button.is-complete > span {
    color: var(--green);
    border-color: color-mix(in srgb, var(--green) 35%, var(--border));
    background: var(--green-soft);
}

.guide-step-tabs button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.guide-progress-status {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 8px 11px 10px;
    border-top: 1px solid var(--border);
}

.guide-progress-status > span {
    color: var(--text-faint);
    font-size: 9.5px;
    font-weight: 780;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.guide-progress-status progress {
    width: 100%;
    height: 4px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    color: var(--accent-2-text);
    background: var(--surface-alt);
    appearance: none;
}

.guide-progress-status progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--surface-alt);
}

.guide-progress-status progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.guide-progress-status progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--gradient);
}

.guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.6fr);
    align-items: start;
    gap: 17px;
    margin-top: 22px;
}

.guide-card,
.guide-recap {
    border-radius: 23px;
    /* Border, fill and backdrop-filter come from the shared glass in
       01-shell.css. Only the corner glow is local – and it is a background
       layer for the same reason as .path-preview's: a background layer clips
       to the radius, a positioned child under a backdrop-filter does not. */
    background-image:
        radial-gradient(240px circle at calc(100% + 25px) -45px,
            rgba(99, 102, 241, 0.18), transparent 68%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 55%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.guide-card {
    min-width: 0;
    padding: clamp(24px, 4vw, 45px);
}

.guide-step {
    min-width: 0;
    border: 0;
}

.guide-step.step-enter {
    animation: stepIn 0.28s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateX(9px); }
    to { opacity: 1; transform: translateX(0); }
}

.guide-step legend {
    max-width: 670px;
    color: var(--text);
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 760;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.guide-step legend:focus {
    outline: none;
}

.guide-question-help {
    max-width: 650px;
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.65;
}

.guide-choices {
    display: grid;
    gap: 9px;
    margin-top: 27px;
}

.guide-choice {
    position: relative;
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-alt);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease,
        transform 0.18s ease, box-shadow 0.18s ease;
}

.guide-choice::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--gradient);
    opacity: 0;
    transform: scaleY(0.45);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* 22 of these render in the planner, the most touch-heavy surface in the app,
   and an ungated :hover left the last tapped card stuck in its hover skin. */
@media (hover: hover) and (pointer: fine) {
    .guide-choice:hover {
        border-color: var(--border-strong);
        background: var(--surface-hover);
        transform: translateY(-1px);
    }

    /* The accent rail already animates on select; previewing it on hover
       makes the whole card feel responsive rather than just the border. */
    .guide-choice:hover::before {
        opacity: 0.5;
        transform: scaleY(0.75);
    }
}

.guide-choice:has(input[type="radio"]:checked) {
    border-color: color-mix(in srgb, var(--accent-2) 48%, var(--border));
    background: color-mix(in srgb, var(--accent) 10%, var(--surface-alt));
    box-shadow: 0 8px 26px rgba(99, 102, 241, 0.1);
}

.guide-choice:has(input[type="radio"]:checked)::before {
    opacity: 1;
    transform: scaleY(1);
}

.guide-choice > input[type="radio"] {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    accent-color: var(--accent);
}

.choice-main {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 4px;
}

.choice-main strong {
    font-size: 12.5px;
    line-height: 1.35;
}

.choice-main small {
    color: var(--text-dim);
    font-size: 10.5px;
    line-height: 1.5;
}

.guide-choice-custom {
    flex-wrap: wrap;
}

.guide-choice-select {
    min-width: 0;
    flex: 1;
    display: flex;
    cursor: pointer;
}
