/* Shared content edges and type scales for the English site. */
html[lang^="en"] body {
    --stm-en-content: min(92%, 92.5rem);
    --stm-en-font: Arial, "Helvetica Neue", sans-serif;
    --stm-en-page-title: clamp(2.3rem, 4.5vw, 4.65rem);
    --stm-en-section-title: clamp(1.85rem, 3.25vw, 3.5rem);
}

html[lang^="en"] body :is(
    .stm-hero-main, .stm-hero-feature-strip, .stm-product-center__inner, .stm-solv9-container,
    .stm-aboutv10-container, .stm-contactg-container,
    .stm-abouthero-container, .stm-abprofile-container, .stm-corecap-container,
    .stm-mfgtest-container, .stm-mission-container,
    .stm-pchero-container, .stm-pcdyn-container, .stm-pdhero-container, .stm-pdnav-inner,
    .stm-pdfeat-container, .stm-pdspec-container, .stm-pdapp-container, .stm-pdres-container,
    .stm-pdrel-container, .stm-en-extra-results, .stm-solv5-container, .stm-solv5-hero-inner,
    .stm-soldetail7-hero-inner, .stm-soldetail7-container, .stm-soldetail7-deliverable-container,
    .stm-soldetail7-product-container, .stm-rgauto-container, .stm-en-resource-wrap,
    .stm-contactpage-hero-inner, .stm-contactpage-main-inner,
    .stm-footer-cta, .stm-footer-main, .stm-footer-bottom
) {
    width: var(--stm-en-content);
    margin-inline: auto;
}

html[lang^="en"] body :is(.stm-abouthero-container, .stm-pdhero-container) > *,
html[lang^="en"] body :is(.stm-pcdyn-container, .stm-contactpage-main-inner) > * {
    min-width: 0;
}

html[lang^="en"] body :is(
    .stm-hero-title, .stm-abouthero-head-text h1, .stm-pchero-section h1, .stm-pdhero-title-unit h1,
    .stm-solv5-hero h1, .stm-rgauto-hero h1, .stm-en-resource h1, .stm-contactpage-hero h1
) {
    min-width: 0;
    font: 800 var(--stm-en-page-title)/1.06 var(--stm-en-font);
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

html[lang^="en"] body :is(
    .stm-product-center__header h2, .stm-solv9-section h2, .stm-aboutv10-heading h2,
    .stm-contactg-section h2, .stm-abprofile-section h2, .stm-corecap-section h2,
    .stm-mfgtest-section h2, .stm-mission-section h2, .stm-pdfeat-head h2, .stm-pdspec-head h2,
    .stm-pdapp-head h2, .stm-pdres-head h2, .stm-pdrel-head h2, .stm-footer-cta-copy h2
) {
    font: 800 var(--stm-en-section-title)/1.12 var(--stm-en-font);
    letter-spacing: -.032em;
    text-wrap: balance;
}

html[lang^="en"] body :is(
    .stm-pdhero-section, .stm-pdnav, .stm-pdfeat-section, .stm-pdspec-section, .stm-pdapp-section,
    .stm-pdres-section, .stm-pdrel-section, .stm-en-resource
),
html[lang^="en"] body :is(.stm-pdfeat-item, .stm-pdapp-item, .stm-pdrel-card) h3 {
    font-family: var(--stm-en-font);
}

html[lang^="en"] body .stm-abouthero-copy h2,
html[lang^="en"] body .stm-abprofile-section h3 {
    font-size: clamp(1.45rem, 2.35vw, 2.55rem);
    line-height: 1.17;
}

/* Product imagery keeps its original shape and uses shade only behind the copy. */
html[lang^="en"] .stm-product-center .stm-product-card__image {
    object-fit: cover !important;
    filter: brightness(1.14) contrast(1.02);
}

html[lang^="en"] .stm-product-center .stm-product-card--result .stm-product-card__image {
    object-fit: contain !important;
}

html[lang^="en"] .stm-product-center .stm-product-card__shade {
    background: linear-gradient(105deg, rgba(3, 16, 30, .68), rgba(3, 16, 30, .34) 35%, transparent 70%);
}

html[lang^="en"] body .stm-pdres-slide img {
    object-fit: contain;
}

html[lang^="en"] body :is(.stm-aboutv10-intro > p, .stm-aboutv10-mission p, .stm-contactg-info-main > p, .stm-contactg-form-head p) {
    font-size: clamp(1rem, 1.1vw, 1.16rem);
    line-height: 1.55;
}

html[lang^="en"] body :is(.stm-aboutv10-capability h4, .stm-contactg-contact-copy strong, .stm-contactg-support-item strong) {
    font-size: clamp(1rem, 1.18vw, 1.18rem);
    line-height: 1.25;
}

html[lang^="en"] body :is(.stm-aboutv10-stat span, .stm-aboutv10-capability p, .stm-contactg-support-item p, .stm-contactg-form-bottom > p),
html[lang^="en"] body .stm-contactg-field > span {
    font-size: clamp(.875rem, .97vw, 1rem);
    line-height: 1.45;
}

html[lang^="en"] body :is(.stm-contactg-contact-copy, .stm-contactg-trust-copy),
html[lang^="en"] body .stm-contactg-field :is(input, select, textarea) {
    font-size: 1rem;
    overflow-wrap: anywhere;
    min-width: 0;
}

html[lang^="en"] body :is(.stm-aboutv10-photo figcaption strong, .stm-aboutv10-gallery-grid .stm-aboutv10-photo figcaption strong) {
    font-size: clamp(.7rem, .8vw, .875rem);
    white-space: normal;
    line-height: 1.2;
}

@media (max-width: 1100px) {
    html[lang^="en"] body .stm-pdhero-container {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }
}

@media (max-width: 1024px) {
    html[lang^="en"] body .stm-hero-index {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        overflow: visible;
    }

    html[lang^="en"] body .stm-hero-index-item {
        min-width: 0;
        gap: .6rem;
        padding-inline: .5rem;
    }

    html[lang^="en"] body .stm-pdnav-inner {
        flex-wrap: wrap;
        gap: .25rem 1.1rem;
        align-content: center;
        min-height: 0;
        padding-block: .5rem;
    }

    html[lang^="en"] body .stm-pdnav-inner a {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
    }
}

@media (max-width: 680px) {
    html[lang^="en"] body {
        --stm-en-content: calc(100% - 2rem);
    }

    html[lang^="en"] body .stm-header-manual-bar {
        gap: .5rem;
        width: var(--stm-en-content);
    }

    html[lang^="en"] body .stm-header-manual-logo {
        flex: 0 1 10rem;
        width: auto;
        min-width: 0;
    }

    html[lang^="en"] body .stm-header-manual-logo img {
        width: 100%;
        height: auto;
        max-height: 2.75rem;
        object-position: left center;
    }

    html[lang^="en"] body .stm-hero-index {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[lang^="en"] body .stm-hero-index-item {
        min-height: 44px;
    }

    html[lang^="en"] body .stm-product-slider {
        min-height: 0;
        aspect-ratio: 5 / 4;
    }

    html[lang^="en"] body .stm-product-center__side {
        grid-template-rows: none;
    }

    html[lang^="en"] body .stm-product-center__side .stm-product-card {
        aspect-ratio: 3 / 2;
    }

    html[lang^="en"] body .stm-product-center .stm-product-card__content {
        inset: 0 auto auto 0;
        width: min(85%, 20rem);
        padding: 1rem;
        border-left: 0;
    }

    html[lang^="en"] body .stm-product-center .stm-product-card__action {
        margin-top: .9rem;
    }

    html[lang^="en"] body .stm-product-slider__dots {
        bottom: .9rem;
        width: max-content;
        max-width: 100%;
        gap: .34rem;
    }

    html[lang^="en"] body :is(.stm-pdhero-subtitle, .stm-pdhero-desc, .stm-en-configurations, .stm-pdhero-actions) {
        margin-inline-start: 0;
    }

    html[lang^="en"] body .stm-pdhero-title-unit {
        gap: .55rem;
    }

    html[lang^="en"] body .stm-pdhero-title-unit h1 {
        font-size: clamp(2rem, 8vw, 2.55rem);
    }

    html[lang^="en"] body .stm-pdnav {
        position: static;
    }
}

/* These sections must grow with their copy, including at short desktop heights. */
html[lang^="en"] body .stm-aboutv10-section {
    height: auto;
    min-height: 0;
    max-height: none;
    padding-block: clamp(2.5rem, 5vw, 5rem);
    overflow: clip;
}

html[lang^="en"] body :is(.stm-aboutv10-container, .stm-aboutv10-body, .stm-aboutv10-left, .stm-aboutv10-gallery) {
    height: auto;
}

html[lang^="en"] body :is(.stm-aboutv10-left, .stm-aboutv10-capabilities) {
    grid-template-rows: none;
}

html[lang^="en"] body .stm-contactg-layout {
    --stm-contactg-card-h: auto;
}

html[lang^="en"] body .stm-contactg-form {
    grid-template-rows: auto;
}

html[lang^="en"] body :is(.stm-contactg-contact-copy small, .stm-contactg-trust-copy p) {
    font-size: .85rem;
    line-height: 1.4;
}

html[lang^="en"] body .stm-contactg-field > span:first-child {
    font-size: .875rem;
    letter-spacing: .055em;
}

@media (max-width: 760px) {
    html[lang^="en"] body .stm-aboutv10-gallery .stm-aboutv10-photo {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
}

@media (min-width: 761px) {
    html[lang^="en"] body .stm-aboutv10-left {
        align-content: start;
    }

    html[lang^="en"] body :is(.stm-aboutv10-gallery, .stm-aboutv10-gallery-grid) {
        grid-template-rows: auto auto;
        align-content: start;
    }

    html[lang^="en"] body .stm-aboutv10-gallery .stm-aboutv10-photo {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    html[lang^="en"] body .stm-aboutv10-gallery .stm-aboutv10-photo-main {
        aspect-ratio: 2 / 1;
    }
}

/* Match the desktop content edges used on the Chinese site. */
@media (min-width: 768px) {
    html[lang^="en"] body {
        --stm-en-content: 92%;
    }

    html[lang^="en"] body .stm-header-manual-bar {
        width: var(--stm-en-content);
        max-width: none;
    }
}

/* Preserve the edges and color scales of result images in the gallery cards. */
html[lang^="en"] body .stm-rgauto-image > img {
    object-fit: contain;
}

/* The preview button contains long survey names and technical metadata. */
html[lang^="en"] body .stm-rgauto-info :is(h3, p) {
    white-space: normal;
    overflow-wrap: anywhere;
}
