.how-it-works[aria-labelledby="how-it-works-title"] .step-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    align-content: start;
}

.how-it-works[aria-labelledby="how-it-works-title"] .step-number {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}

.how-it-works[aria-labelledby="how-it-works-title"] .step-card h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.how-it-works[aria-labelledby="how-it-works-title"] .step-card p {
    grid-column: 1 / -1;
    margin: 16px 0 0;
}

/* Keep the hero's three intentional phrases on three lines at every viewport size. */
.hero-headline-line {
    display: block;
    white-space: nowrap;
}

/* Keep Quick Starts actions aligned along the bottom edge of cards in the same row. */
.how-it-works[aria-labelledby="quick-start-title"] .step-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.how-it-works[aria-labelledby="quick-start-title"] .step-card > a {
    margin-top: auto;
}

/* Popular-decision cards should fit their content instead of inheriting the generic card minimum height. */
.how-it-works[aria-labelledby="popular-decisions-title"] .step-card {
    min-height: 0;
}

@media (min-width: 701px) {
    /* Rebalance desktop spacing now that the hero headline uses only three lines. */
    .site-header {
        margin-bottom: clamp(18px, 3vw, 40px);
    }

    .home-hero {
        grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
        gap: clamp(24px, 4vw, 46px);
        min-height: min(470px, 54vh);
        padding-bottom: 24px;
    }

    /* Give the headline a little more width and a slightly tighter scale so the three phrases fit cleanly. */
    .home-hero h1 {
        font-size: clamp(2.4rem, 5.25vw, 3.9rem);
    }

    .home-hero .hero-lede {
        font-size: clamp(1.1rem, 2vw, 1.35rem);
    }

    /* Let the CTA group carry the same horizontal weight as the headline instead of hugging the left edge. */
    .home-hero .home-actions {
        display: grid;
        grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
        width: min(100%, 650px);
        gap: 12px;
    }

    .home-hero .home-action-button {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        font-size: 1.1rem;
        line-height: 1.15;
    }

    .how-it-works[aria-labelledby="how-it-works-title"] {
        margin-top: 8px;
    }
}

@media (min-width: 900px) {
    .hero-headline-line {
        white-space: nowrap;
    }
}

@media (max-width: 700px) {
    /* Pull the hero up under the mobile header; the global mobile header gap is too large for this landing page. */
    .site-header {
        margin-bottom: 24px;
    }

    /* Keep the headline bold, but preserve the more balanced three-line break instead of orphaning "on.". */
    .home-hero.home-hero-conversion h1 {
        margin-bottom: 16px;
        font-size: clamp(2.45rem, 12vw, 3.55rem);
        line-height: 0.98;
    }

    /* Keep the hero eyebrow together and give it a deliberate gap before the headline. */
    .home-hero-conversion .home-hero-copy > .eyebrow {
        margin-bottom: 14px;
        white-space: nowrap;
        font-size: clamp(0.6rem, 2.45vw, 0.76rem);
        letter-spacing: 0.035em;
    }

    .home-hero.home-hero-conversion .hero-lede {
        margin-bottom: 0;
        line-height: 1.4;
    }

    /* Preserve one unmistakable primary CTA and use consistent spacing through the action stack. */
    .home-hero {
        row-gap: 22px;
    }

    .home-hero.home-hero-conversion .home-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 10px;
        margin-top: 20px;
    }

    .home-hero .home-action-button {
        width: 100%;
        margin: 0;
    }

    .home-hero.home-hero-conversion .home-join-link {
        min-height: 40px;
        padding: 4px;
        line-height: 1.15;
    }

    .home-hero.home-hero-conversion .hero-friction-note {
        margin: 4px 0 0;
        line-height: 1.35;
        font-weight: 600;
    }

    .home-hero .home-action-button.secondary-button {
        width: auto;
        min-height: 44px;
        padding: 8px 4px;
        color: var(--primary-dark);
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        font-size: 0.95rem;
        font-weight: 900;
    }

    .home-hero .home-action-button.secondary-button::before {
        content: "Already have a room?";
        margin-right: 6px;
        color: var(--muted);
        font-weight: 650;
    }

    .home-hero .home-action-button.secondary-button:hover,
    .home-hero .home-action-button.secondary-button:active {
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    /* Keep the product example visible, but make it read as supporting proof instead of a second hero. */
    .home-hero .home-preview-card {
        width: 82%;
        justify-self: center;
        margin-top: 10px;
        padding: 20px;
        border-radius: 26px;
        box-shadow: 0 12px 30px rgba(11, 27, 63, 0.08);
    }

    .home-hero .home-preview-card::after {
        right: -30px;
        top: -30px;
        width: 96px;
        height: 96px;
    }

    .home-hero .home-preview-card h2 {
        margin-bottom: 10px;
        font-size: 1.22rem;
    }

    .home-hero .home-preview-card .status-pill,
    .home-hero .home-preview-card .preview-chip {
        min-height: 29px;
        padding: 5px 9px;
        font-size: 0.78rem;
    }

    .home-hero .home-preview-card .small {
        font-size: 0.8rem;
    }

    .home-hero .home-preview-card .mini-room-header {
        gap: 10px;
    }

    .home-hero .home-preview-card .preview-chip-row {
        gap: 7px;
        margin: 15px 0;
    }

    .home-hero .home-preview-card .preview-result {
        padding: 13px 14px;
        border-radius: 18px;
    }

    .home-hero .home-preview-card .preview-result span {
        font-size: 0.84rem;
    }

    .home-hero .home-preview-card .preview-result strong {
        font-size: 1.65rem;
    }

    /* Homepage cards should size to their content once the grid becomes one column. */
    .step-card {
        min-height: 0;
    }

    /*
     * Mobile conversion sequence: establish the product, explain why the voting
     * model is different, then ask the visitor what they want to decide.
     * home-mobile.css is homepage-only, so making page-shell a flex column here
     * does not affect other public pages.
     */
    .page-shell {
        display: flex;
        flex-direction: column;
    }

    .page-shell > .home-hero.home-hero-conversion {
        order: 1;
    }

    .page-shell > .home-section.overlap-section {
        order: 2;
        margin-top: 28px;
        margin-bottom: 36px;
    }

    .page-shell > .home-section.decision-chooser {
        order: 3;
        margin-top: 28px;
    }

    .page-shell > section[aria-labelledby="simple-steps-title"] {
        order: 4;
    }

    .page-shell > .home-final-cta {
        order: 5;
    }

    .page-shell > .home-explore-links {
        order: 6;
    }

    .page-shell > .modal-backdrop,
    .page-shell > .modal {
        order: 7;
    }

    /* Tighten the use-case chooser so the stacked cards do not dominate mobile scroll depth. */
    .decision-chooser .home-section-heading {
        margin-bottom: 18px;
    }

    .decision-chooser .decision-choice-grid {
        gap: 14px;
    }

    .decision-chooser .decision-choice-card {
        min-height: 0;
        padding: 18px 18px 20px;
        border-radius: 22px;
    }

    .decision-chooser .decision-card-kicker {
        margin-bottom: 8px;
        font-size: 0.68rem;
    }

    .decision-chooser .decision-choice-card h3 {
        margin-bottom: 6px;
        font-size: 1.45rem;
    }

    .decision-chooser .decision-choice-card > p:not(.decision-card-kicker) {
        margin-bottom: 0;
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .decision-chooser .decision-choice-card.has-curated-start .decision-curated-start {
        margin-top: 12px;
        padding: 13px 14px;
        border-radius: 16px;
    }

    /* The curated paragraph repeats the card's promise on mobile; keep the badge, title and action instead. */
    .decision-chooser .decision-choice-card.has-curated-start .decision-curated-start > p {
        display: none;
    }

    .decision-chooser .decision-curated-heading {
        gap: 3px;
    }

    .decision-chooser .decision-curated-badge {
        font-size: 0.63rem;
    }

    .decision-chooser .decision-curated-heading strong {
        font-size: 1.08rem;
    }

    .decision-chooser .decision-curated-action {
        width: 100%;
        min-height: 40px;
        margin-top: 12px;
        padding: 8px 12px;
        font-size: 0.84rem;
    }

    .decision-chooser .decision-card-actions {
        padding-top: 14px;
    }

    .decision-chooser .decision-card-actions-secondary {
        padding-top: 10px;
    }
}