/* =========================================================
   Homepage assessment choice
   ========================================================= */

.home-page main > .home-entry {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - var(--home-header-height, 101px));
    padding: clamp(24px, 4vh, 45px) 0 clamp(24px, 4vh, 45px);
}

.home-intro {
    margin-block: auto;
    text-align: center;
}

.home-intro .eyebrow {
    margin-bottom: 13px;
}

.home-intro h1 {
    max-width: 950px;
    margin: 0 auto 17px;
    color: var(--color-text-primary);
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.09;
    letter-spacing: -0.035em;
}

.home-intro p {
    max-width: 790px;
    margin: 0 auto;
    color: var(--color-text-secondary);
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.55;
}

.choice-guide {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    gap: clamp(24px, 5svh, 56px);
    min-width: 116px;
    margin-bottom: clamp(50px, 8svh, 92px);
    color: var(--color-accent);
    text-decoration: none;
}

.home-page main > .home-choice-stage {
    display: flex;
    align-items: center;
    min-height: calc(100svh - var(--home-header-height, 101px));
    padding: 36px 0 52px;
}

.choice-guide-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.choice-guide svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: choice-guide-nudge 1.9s ease-in-out infinite;
}

.choice-guide:hover svg,
.choice-guide:focus-visible svg {
    animation: none;
    transform: translateY(6px);
}

@keyframes choice-guide-nudge {
    0%, 100% { transform: translateY(0); opacity: 0.75; }
    50% { transform: translateY(7px); opacity: 1; }
}

.choice-guide:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 5px;
}

.assessment-choice {
    scroll-margin-top: 98px;
    padding: 8px;
    background: var(--color-surface);
    border: 1px solid rgba(var(--color-accent-rgb), 0.24);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.13);
}

.choice-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.choice-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 65px;
    padding: 12px 16px;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font: 700 clamp(15px, 1.6vw, 18px) "Roboto", Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    scroll-margin-top: 100px;
}

.choice-tab svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.choice-tab:hover,
.choice-tab:focus-visible {
    color: var(--color-accent);
    background: rgba(var(--color-accent-rgb), 0.08);
}

.choice-tab:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.choice-tab[aria-selected="true"] {
    color: var(--color-text-primary);
    background: rgba(var(--color-accent-rgb), 0.12);
    border-color: rgba(var(--color-accent-rgb), 0.38);
}

.choice-tab[aria-selected="true"] svg {
    color: var(--color-accent);
}

.choice-panel {
    min-height: 435px;
    padding: clamp(26px, 4vw, 50px);
    background:
        radial-gradient(circle at 92% 10%, rgba(var(--color-accent-rgb), 0.12), transparent 36%),
        var(--color-background);
    border: 1px solid rgba(var(--color-accent-rgb), 0.11);
    border-radius: 9px;
}

.choice-panel[hidden],
.assessment-detail[hidden],
.business-detail[hidden] {
    display: none;
}

.choice-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.8fr);
    gap: clamp(30px, 5vw, 82px);
    align-items: center;
}

.choice-copy .eyebrow {
    margin-bottom: 14px;
}

.choice-copy h2 {
    max-width: 650px;
    margin-bottom: 18px;
    color: var(--color-text-primary);
    font-size: clamp(29px, 3.1vw, 43px);
    line-height: 1.13;
    letter-spacing: -0.02em;
}

.choice-copy p {
    max-width: 660px;
    margin-bottom: 21px;
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.65;
}

.choice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 13px;
    margin-top: 30px;
}

.choice-actions .primary-button,
.choice-actions .secondary-button {
    white-space: normal;
}

#business-choice .choice-actions,
#personal-choice .choice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#business-choice .choice-actions a,
#personal-choice .choice-actions a {
    width: 100%;
    min-height: 54px;
}

.choice-coming-soon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 23px;
    color: var(--color-text-primary);
    background: rgba(var(--color-accent-rgb), 0.09);
    border: 1px solid rgba(var(--color-accent-rgb), 0.4);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.choice-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 360px;
    padding: clamp(22px, 3vw, 34px);
    background: var(--color-surface);
    border: 1px solid rgba(var(--color-accent-rgb), 0.24);
    border-radius: 10px;
}

.choice-side-label {
    margin: 0 0 15px;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.choice-side h3 {
    margin-bottom: 10px;
    color: var(--color-text-primary);
    font-size: 23px;
}

.choice-side p {
    margin-bottom: 18px;
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.choice-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.choice-list li {
    display: flex;
    align-items: center;
    min-height: 39px;
    padding: 8px 10px;
    color: var(--color-text-primary);
    background: rgba(var(--color-accent-rgb), 0.07);
    border: 1px solid rgba(var(--color-accent-rgb), 0.11);
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.25;
}

.personal-area-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.personal-area-grid > .assessment-card {
    grid-column: span 2;
}

.personal-area-grid > .assessment-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.personal-area-grid > .assessment-card:nth-child(5) {
    grid-column: 4 / span 2;
}

#personal-areas .section-heading {
    margin-bottom: 26px;
}

#personal-areas .assessment-source-note {
    margin-top: 12px;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

#personal-areas .assessment-source-note a {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#personal-plan .next-step-actions a {
    max-width: 100%;
    white-space: normal;
}

/* The homepage already reserves header space with scroll-padding-top.
   Avoid adding the shared next-step scroll margin a second time. */
html.home-page .next-step-section {
    scroll-margin-top: 0;
}

.personal-report-preview .report-preview-image-link img {
    object-fit: cover;
    object-position: center top;
}

.home-page .business-detail > .how-it-works-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - var(--home-header-height, 101px));
    padding-block: clamp(42px, 5vw, 64px);
}

.how-it-works-heading {
    margin-bottom: 26px;
}

.how-it-works-heading h2 {
    margin-bottom: 8px;
    color: var(--color-text-primary);
    font-size: clamp(30px, 2.8vw, 42px);
    line-height: 1.15;
}

.how-it-works-heading p {
    margin-bottom: 0;
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

.how-it-works-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 2.4vw, 34px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.how-it-works-steps li {
    min-width: 0;
    padding-top: 15px;
    border-top: 2px solid rgba(var(--color-accent-rgb), 0.4);
}

.how-it-works-number {
    display: block;
    margin-bottom: 9px;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.how-it-works-steps h3 {
    margin-bottom: 8px;
    color: var(--color-text-primary);
    font-size: 19px;
}

.how-it-works-steps p {
    margin-bottom: 0;
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.55;
}

.home-page .assessment-detail > section,
.home-page .business-detail > section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

@media (min-width: 801px) and (max-height: 1100px) {
    .home-page .assessment-detail > section,
    .home-page .business-detail > section {
        min-height: calc(100svh - 101px);
    }
}

@media (max-width: 800px) {
    .how-it-works-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .choice-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .choice-panel {
        min-height: 0;
    }

    .choice-side {
        height: auto;
        min-height: 390px;
    }

    .personal-area-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .personal-area-grid > .assessment-card,
    .personal-area-grid > .assessment-card:nth-child(4) {
        grid-column: auto;
    }

    .personal-area-grid > .assessment-card:nth-child(5) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .home-page .business-detail > .how-it-works-section {
        display: block;
        min-height: 0;
        padding-block: 42px;
        scroll-snap-align: none;
    }

    .how-it-works-steps {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .home-page main > .home-entry {
        padding: 26px 0;
    }

    .home-page main > .home-choice-stage {
        padding: 24px 0 44px;
    }

    .choice-guide {
        margin-bottom: clamp(24px, 6svh, 55px);
    }

    .choice-tab {
        min-height: 64px;
        gap: 8px;
        padding-inline: 8px;
        font-size: 14px;
    }

    .choice-tab svg {
        width: 19px;
        height: 19px;
    }

    .choice-panel {
        padding: 24px 18px;
    }

    .choice-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #business-choice .choice-actions,
    #personal-choice .choice-actions {
        grid-template-columns: 1fr;
    }

    .personal-area-grid {
        grid-template-columns: 1fr;
    }

    .personal-area-grid > .assessment-card:nth-child(5) {
        grid-column: auto;
    }

    .choice-actions a,
    .choice-coming-soon {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .choice-tab {
        transition: none;
    }

    .choice-guide svg {
        animation: none;
    }
}
