@layer components {

    /* A page's calls to action, right-aligned under the top bar, rendered
       by <app-page-actions> first in the page body. Above 900px the row has no height and its buttons sit, centred, in
       the first section's top padding (--section-space), so nothing below
       moves. At 900px and under that padding drops to 24px, too short for
       a button, so the row takes a line of its own. */
    .c-page-cta {
        max-width: 80rem;
        margin-inline: auto;
        padding: var(--space-4) var(--space-5) 0;
    }

    .c-page-cta__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: var(--space-2);
    }

    @media (min-width: 901px) {
        .c-page-cta {
            position: relative;
            height: 0;
            padding: 0;
        }

        /* z-index: the hero after it is position: relative, so it would
           otherwise stack above the buttons and take their clicks. */
        .c-page-cta__actions {
            position: absolute;
            z-index: 1;
            top: 0;
            right: var(--space-7);
            height: var(--section-space);
        }
    }

    @media (max-width: 767.98px) { /* --bp-sm */
        .c-page-cta__actions {
            justify-content: flex-start;
        }
    }
}
