.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) {
    /* Keep the three-line message, but reduce its visual weight so it does not dominate the whole mobile hero. */
    .home-hero h1 {
        font-size: clamp(1.55rem, 7.9vw, 2.2rem);
        line-height: 1.03;
    }

    /* Preserve one unmistakable primary CTA and turn joining into a quieter text-style secondary action. */
    .home-hero {
        row-gap: 22px;
    }

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

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

    .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;
    }
}
