/* Shared, centered public canvas. Width is capped even when zoomed out. */
body.sc-wide-site,
body.sc-wide-profile,
body.sc-public-course {
    --sc-public-max-width: 1220px;
    --sc-public-nav-max-width: 1312px;
    --sc-public-gutter: 24px;
    --sc-public-content-width: min(calc(100% - var(--sc-public-gutter) * 2), var(--sc-public-max-width));
    --sc-public-nav-width: min(calc(100% - var(--sc-public-gutter) * 2), var(--sc-public-nav-max-width));
}
@media (max-width: 767px) {
    body.sc-wide-site,
    body.sc-wide-profile,
    body.sc-public-course { --sc-public-gutter: 16px; }
}

/* Only page shells, never nested grids or ordinary dashboard containers. */
body.sc-wide-site .sc-public-container,
body.sc-wide-site .footer > .container,
body.sc-wide-site .footer .footer-copyright-card > .container,
body.sc-wide-site .sc-classes-page > .container,
body.sc-wide-site .sc-classes-page .site-top-banner > .container,
body.sc-wide-site .sc-finder-content,
body.sc-wide-site .sc-account-type-page,
body.sc-wide-site .sc-account-choice-page,
body.sc-wide-site .sc-account-login-page,
body.sc-wide-site .sc-forgot-page,
body.sc-wide-site .sc-contact-page > .container,
body.sc-wide-site .sc-contact-page .site-top-banner > .container,
body.sc-wide-site .sc-how-page .sc-how-hero-inner,
body.sc-wide-site .sc-how-page .sc-how-content-wrap,
body.sc-wide-site .sc-about-hero-inner,
body.sc-wide-site .sc-about-content-wrap,
body.sc-wide-site .sc-terms-page .sc-terms-hero-inner,
body.sc-wide-site .sc-terms-page .sc-terms-content-wrap,
body.sc-wide-site .sc-privacy-page .sc-privacy-hero-inner,
body.sc-wide-site .sc-privacy-page .sc-privacy-content-wrap,
body.sc-wide-site .sc-payment-page .sc-payment-hero-inner,
body.sc-wide-site .sc-payment-page .sc-payment-content-wrap {
    box-sizing: border-box;
    width: var(--sc-public-content-width) !important;
    max-width: var(--sc-public-max-width) !important;
    margin-inline: auto;
}
/* Navigation is intentionally wider than the page content (46px per side at full width). */
body.sc-wide-site .sc-at-header__inner,
body.sc-wide-site .sc-public-nav-container {
    box-sizing: border-box;
    width: var(--sc-public-nav-width) !important;
    max-width: var(--sc-public-nav-max-width) !important;
    margin-inline: auto;
    padding-inline: 0;
}
body.sc-wide-site .footer > .container,
body.sc-wide-site .footer .footer-copyright-card > .container { padding-inline: 0; }

/* Preserve the full-bleed background, but align the actual homepage content. */
body.sc-wide-site .sc-v2-home > .container:not(.sc-v2-difference):not(.sc-v2-stats-wrap),
body.sc-wide-site .sc-v2-home .sc-v2-hero > .container,
body.sc-wide-site .sc-v2-home .sc-v2-featured > .container,
body.sc-wide-site .sc-v2-home .sc-v2-testimonials > .container {
    width: var(--sc-public-content-width);
    max-width: var(--sc-public-max-width);
    margin-inline: auto;
}
body.sc-wide-site .sc-v2-home > .sc-v2-difference,
body.sc-wide-site .sc-v2-home > .sc-v2-stats-wrap {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
    overflow: hidden;
}
body.sc-wide-site .sc-v2-difference > .sc-v2-benefit-grid,
body.sc-wide-site .sc-v2-stats-wrap > .sc-v2-stats-heading,
body.sc-wide-site .sc-v2-stats-wrap > .sc-v2-stats {
    width: var(--sc-public-content-width);
    max-width: var(--sc-public-max-width);
    margin-inline: auto;
}
body.sc-wide-site .sc-v2-difference-heading { width: var(--sc-public-content-width); }
body.sc-wide-site .sc-v2-stats-heading h2 { white-space: normal; }
body.sc-wide-site main.sc-v2-home > .sc-v2-cta { padding-inline: clamp(24px, 4vw, 44px); }
body.sc-wide-site .sc-v2-home .sc-v2-hero-grid,
body.sc-wide-site .sc-v2-home .sc-v2-course-grid { min-width: 0; }
body.sc-wide-site .sc-v2-hero-media { max-width: 100%; }
@media (min-width: 1200px) {
    body.sc-wide-site .sc-v2-home .sc-v2-hero-grid { gap: clamp(32px, 3vw, 56px); }
}
@media (min-width: 992px) and (max-width: 1499px) {
    body.sc-wide-site .sc-v2-home .sc-v2-course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Fit navigation to the narrower desktop content rather than the entire viewport. */
@media (min-width: 1280px) {
    body.sc-wide-site .sc-at-header__inner { gap: 16px; flex-wrap: wrap; }
    body.sc-wide-site .sc-at-header__links { gap: 14px; }
    body.sc-wide-site .sc-at-header__actions { gap: 10px; }
    body.sc-wide-site .sc-at-header__brand { width: 154px; }
    body.sc-wide-site .sc-at-header__brand img { transform: translateX(-20px) scale(1.1); }
}
@media (max-width: 1279px) {
    body.sc-wide-site .sc-at-header { min-height: 0; padding: 8px 0 !important; }
    body.sc-wide-site .sc-at-header__inner { min-height: 56px; }
    body.sc-wide-site .sc-at-header__brand { width: auto; }
    body.sc-wide-site .sc-at-header__brand img {
        width: 138px !important;
        height: 44px !important;
        transform: none;
    }
}

/* Public details share panel chrome. Keep the sidebar and panel dimensions intact. */
body.sc-wide-profile .panel-content > .container,
body.sc-public-course .course-content-section,
body.sc-public-course .course-cover-container,
body.sc-public-course .sc-course-offer-banner {
    box-sizing: border-box;
    width: var(--sc-public-content-width) !important;
    max-width: var(--sc-public-max-width) !important;
    margin-inline: auto;
}
body.sc-public-course .course-cover-container .cover-content .container {
    width: 100%;
    max-width: 100%;
}
@media (max-width: 991px) {
    /* Profile panel already supplies side padding. Avoid doubling the gutter. */
    body.sc-wide-profile .panel-content > .container { width: 100% !important; }
}
