/*
 * Cache-busted final hero restoration.
 *
 * Keep this layer small and last. The filename is intentionally new so a
 * browser that cached an earlier compact hero contract cannot reuse it.
 * No helper copy is rendered or styled here.
 */

:root {
    --copp-hero-restored-home-height: 392px;
    --copp-hero-restored-page-height: 360px;
    --copp-hero-restored-ink: #123e56;
    --copp-hero-restored-red: var(--copp-red);
}

@media (min-width: 768px) {
    html body :is(
        .copp-hero,
        .copp-hero__slides,
        .copp-hero__track,
        .copp-hero__slide,
        .copp-hero__inner
    ) {
        box-sizing: border-box !important;
        height: var(--copp-hero-restored-home-height) !important;
        max-height: var(--copp-hero-restored-home-height) !important;
        min-height: var(--copp-hero-restored-home-height) !important;
    }

    html body .copp-hero {
        overflow: hidden !important;
    }

    html body .copp-hero__inner {
        align-items: center !important;
        padding: 20px clamp(28px, 7vw, 108px) 24px !important;
    }

    html body .copp-hero__copy {
        align-self: center !important;
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        justify-content: center !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
    }

    html body .copp-hero__copy h1,
    html body .copp-hero__copy > p {
        color: var(--copp-hero-restored-ink) !important;
        -webkit-text-fill-color: var(--copp-hero-restored-ink) !important;
        mix-blend-mode: normal !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    html body .copp-hero__copy h1 {
        font-size: clamp(36px, 3.1vw, 42px) !important;
        line-height: 1.05 !important;
        margin: 0 0 12px !important;
        max-width: 560px !important;
    }

    html body .copp-hero__copy h1 span {
        color: var(--copp-hero-restored-red) !important;
        -webkit-text-fill-color: var(--copp-hero-restored-red) !important;
    }

    html body .copp-hero__copy > p {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin: 0 0 16px !important;
        max-width: 520px !important;
    }

    html body .copp-hero__actions {
        display: flex !important;
        flex: 0 0 auto !important;
        gap: 12px !important;
        height: 44px !important;
        margin: 0 !important;
        max-width: 520px !important;
    }

    html body .copp-hero__btn {
        box-sizing: border-box !important;
        height: 44px !important;
        min-height: 44px !important;
    }

    html body .copp-hero__people {
        bottom: -8px !important;
        height: calc(100% + 8px) !important;
        right: -8px !important;
        transform: none !important;
        width: min(72%, 440px) !important;
    }

    html body :is(
        .copp-news-hero,
        .copp-gallery-hero,
        .copp-knowledge-hero,
        .copp-opportunity-hero,
        .copp-about-subpage-hero,
        .copp-programs-page-hero,
        .copp-partners-hero,
        .copp-resume-bank-hero,
        .copp-school-hero,
        .copp-students-hero,
        .copp-stories-hero,
        .copp-edu-orgs-hero,
        .copp-events-hero,
        .copp-contacts-hero,
        .copp-contests-hero,
        .copp-projects-hero
    ) {
        box-sizing: border-box !important;
        height: var(--copp-hero-restored-page-height) !important;
        max-height: var(--copp-hero-restored-page-height) !important;
        min-height: var(--copp-hero-restored-page-height) !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    html body :is(
        .copp-news-hero__title,
        .copp-gallery-hero__title,
        .copp-knowledge-hero__title,
        .copp-news-hero__subtitle,
        .copp-news-hero__lead,
        .copp-gallery-hero__subtitle,
        .copp-knowledge-hero__subtitle,
        .copp-knowledge-hero__lead,
        [class$="__lead-copy"]
    ) {
        color: var(--copp-hero-restored-ink) !important;
        -webkit-text-fill-color: var(--copp-hero-restored-ink) !important;
        mix-blend-mode: normal !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    html body :is(
        .copp-news-hero__title,
        .copp-gallery-hero__title,
        .copp-knowledge-hero__title
    ) {
        font-size: clamp(30px, 3vw, 42px) !important;
        line-height: 1.05 !important;
        margin: 0 0 12px !important;
    }

    html body :is(
        .copp-news-hero__subtitle,
        .copp-news-hero__lead,
        .copp-gallery-hero__subtitle,
        .copp-knowledge-hero__subtitle,
        .copp-knowledge-hero__lead,
        [class$="__lead-copy"]
    ) {
        font-size: 15px !important;
        line-height: 1.4 !important;
        margin: 0 0 12px !important;
    }
}

/* Keep article/catalog cards content-sized so long titles cannot be clipped. */
html body :is(
    .copp-programs-archive__hero,
    .copp-program-article__hero,
    .copp-news-article__hero,
    .copp-project-article__hero,
    .copp-equipment-article__hero,
    .copp-contest-article__hero,
    .copp-knowledge-item__hero,
    .copp-resources-archive__hero,
    .copp-resource-article__hero
) {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
}

@media (max-width: 767.98px) {
    html body :is(
        .copp-hero,
        .copp-hero__slides,
        .copp-hero__track,
        .copp-hero__slide,
        .copp-hero__inner,
        .copp-news-hero,
        .copp-gallery-hero,
        .copp-knowledge-hero,
        .copp-opportunity-hero,
        .copp-about-subpage-hero,
        .copp-programs-page-hero,
        .copp-partners-hero,
        .copp-resume-bank-hero,
        .copp-school-hero,
        .copp-students-hero,
        .copp-stories-hero,
        .copp-edu-orgs-hero,
        .copp-events-hero,
        .copp-contacts-hero,
        .copp-contests-hero,
        .copp-projects-hero
    ) {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    html body .copp-hero__inner {
        height: auto !important;
        padding: 20px 18px 24px !important;
    }

    html body .copp-hero__copy h1 {
        font-size: 34px !important;
    }

    html body .copp-hero__copy > p {
        font-size: 14px !important;
        line-height: 1.45 !important;
    }
}
