/*
 * Cache-busted public hero lock.
 *
 * The legacy hero layers contain large min-heights and a light-on-light
 * helper copy. Keep the final public heroes compact and readable with a
 * deliberately high-specificity layer loaded after every shared stylesheet.
 */

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

    html body .copp-hero__inner {
        align-items: center !important;
        padding: 14px clamp(28px, 7vw, 108px) 18px !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;
        padding: 0 !important;
    }

    html body .copp-hero__copy h1 {
        color: #263746 !important;
        -webkit-text-fill-color: #263746 !important;
        font-size: 42px !important;
        line-height: 1.05 !important;
        margin: 0 0 8px !important;
        min-height: 0 !important;
    }

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

    html body .copp-hero__copy > p {
        color: #263746 !important;
        -webkit-text-fill-color: #263746 !important;
        font-size: 16px !important;
        line-height: 1.35 !important;
        margin: 0 0 10px !important;
        min-height: 0 !important;
    }

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

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

    html body .copp-hero__visual,
    html body .copp-visual {
        min-height: 0 !important;
    }

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

    /* The same compact frame applies to full-width landing heroes. */
    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: 320px !important;
        max-height: 320px !important;
        min-height: 320px !important;
        overflow: hidden !important;
        padding: 0 !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
    ) > :is(.copp-news-hero__inner, .copp-gallery-hero__inner) {
        align-items: center !important;
        box-sizing: border-box !important;
        height: 100% !important;
        min-height: 0 !important;
        padding: 14px clamp(28px, 7vw, 108px) 18px !important;
    }

    html body :is(.copp-news-hero__media, .copp-gallery-hero__media, .copp-gallery-hero__frame) {
        height: 250px !important;
        max-height: 250px !important;
        min-height: 250px !important;
        overflow: hidden !important;
    }

    html body :is(.copp-news-hero__media, .copp-gallery-hero__media) img {
        height: 250px !important;
        max-height: 250px !important;
        min-height: 0 !important;
    }

    html body :is(.copp-news-hero__title, .copp-gallery-hero__title, .copp-knowledge-hero__title) {
        color: #263746 !important;
        -webkit-text-fill-color: #263746 !important;
        font-size: clamp(32px, 3.3vw, 46px) !important;
        line-height: 1.05 !important;
        margin: 0 0 8px !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"]
    ) {
        color: #263746 !important;
        -webkit-text-fill-color: #263746 !important;
        font-size: 15px !important;
        line-height: 1.35 !important;
        margin: 0 0 8px !important;
    }
}

/* Article/catalog heroes should shrink to their content rather than inherit
 * the old 445px minimum, without clipping a long heading. */
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
) {
    box-sizing: border-box !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 20px 28px 22px !important;
}

@media (max-width: 767.98px) {
    html body .copp-hero,
    html body .copp-hero__slides,
    html body .copp-hero__track,
    html body .copp-hero__slide,
    html body .copp-hero__inner,
    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
    ) {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    html body .copp-hero__inner,
    html body :is(.copp-news-hero, .copp-gallery-hero) > :is(.copp-news-hero__inner, .copp-gallery-hero__inner) {
        padding: 16px 18px 20px !important;
    }

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

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

    html body :is(.copp-news-hero__media, .copp-gallery-hero__media, .copp-gallery-hero__frame) {
        height: 180px !important;
        max-height: 180px !important;
        min-height: 180px !important;
    }

    html body :is(.copp-news-hero__media, .copp-gallery-hero__media) img {
        height: 180px !important;
        max-height: 180px !important;
    }
}
