/* Use the former events-list width as the outer edge of the introductory cards. */
:root {
    --smb-page-width: var(--breakpoint-xl, 80rem);
    --smb-page-gutter: calc(var(--spacing, 0.25rem) * 4);
    --smb-content-width: 72rem;
    --smb-page-inset: clamp(0px, calc(25vw - 12rem),
        calc((var(--smb-page-width) - var(--smb-content-width)) / 2));
}

@media (min-width: 80rem) {
    :root {
        --smb-page-gutter: 0px;
    }
}

.c-container,
.smb-page-content,
.smb-page-layout .site-page-heading__inner {
    width: calc(100% - 2 * (var(--smb-page-gutter) + var(--smb-page-inset)));
    max-width: calc(var(--smb-page-width) - 2 * var(--smb-page-inset));
    margin-inline: auto;
}

.c-container {
    padding-inline: 0;
}

.smb-page-content {
    display: block;
}

.smb-page-layout > #tartalom {
    padding-block-end: 1.5rem;
}

/* The parent layout now provides the space before the footer. */
.smb-page-layout > #tartalom > .smb-inner-grid,
.smb-page-layout .smb-page-content > .smb-home,
.smb-page-layout .smb-page-content > .smb-directory {
    padding-block-end: 0;
}

.smb-page-content .c-container,
.smb-page-content .site-page-heading__inner {
    width: 100%;
}

/* Shared app templates already have a page container. Use the outer frame once. */
.smb-page-content :is(.max-w-screen-xl, .max-w-screen-2xl, .block-container),
.smb-page-content :is(.mx-4.xl\:mx-auto, [class~="2xl:mx-16"]) {
    margin-inline: auto;
}

/* Menus, notices and the rest of the heading stay aligned to the page content. */
.smb-page-content .site-intro-card {
    width: calc(100% + 2 * var(--smb-page-inset));
    max-width: none;
    margin-inline: calc(-1 * var(--smb-page-inset));
}

.profile-finance-card-frame {
    display: contents;
}

.profile-finance-card-frame > .site-card {
    grid-column: inherit;
}

.smb-page-content aside > .w-80 {
    max-width: 100%;
}

.smb-inner-grid.has-aside:not(:has(> aside > *)) {
    grid-template-columns: minmax(0, 1fr);
}

.smb-inner-grid > aside:not(:has(> *)) {
    display: none;
}
