#header .threep-header-branding[data-id="logo"] {
    width: clamp(290px, 25vw, 380px) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-self: start !important;
}

#header .threep-logo-pair {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none;
}

#header .threep-logo-pair img {
    display: block !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    transform: none !important;
}

#header .threep-logo-pair .threep-header-mark {
    width: 80px !important;
    flex: 0 0 80px !important;
}

#header .threep-logo-pair .threep-header-statement {
    width: calc(100% - 94px) !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
}

#header .threep-logo-pair:focus-visible {
    outline: 2px solid #079eb6;
    outline-offset: 5px;
    border-radius: 3px;
}

@media (min-width: 1000px) and (max-width: 1399px) {
    #header .threep-header-branding[data-id="logo"] {
        width: 290px !important;
    }

    #header .threep-logo-pair .threep-header-mark {
        width: 66px !important;
        flex-basis: 66px !important;
    }

    #header .threep-logo-pair .threep-header-statement {
        width: calc(100% - 80px) !important;
    }
}

/* Mobile keeps the paired artwork beside the menu button, aligned left. */
#header [data-device="mobile"] [data-row="middle"] > :is(.ct-container, .ct-container-fluid) {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

#header [data-device="mobile"] [data-row="middle"] > :is(.ct-container, .ct-container-fluid) > [data-column="start"]:not(:has(> *)) {
    display: none !important;
}

#header [data-device="mobile"] [data-row="middle"] > :is(.ct-container, .ct-container-fluid) > [data-column="middle"] {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-content: flex-start !important;
    justify-self: start !important;
    min-width: 0 !important;
}

#header [data-device="mobile"] [data-row="middle"] > :is(.ct-container, .ct-container-fluid) > [data-column="end"] {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

#header [data-device="mobile"] .threep-header-branding[data-id="logo"] {
    width: min(276px, calc(100vw - 100px)) !important;
}

#header [data-device="mobile"] .threep-logo-pair {
    gap: 10px !important;
}

#header [data-device="mobile"] .threep-logo-pair .threep-header-mark {
    width: 50px !important;
    flex-basis: 50px !important;
}

#header [data-device="mobile"] .threep-logo-pair .threep-header-statement {
    width: calc(100% - 60px) !important;
}

@media (max-width: 359px) {
    #header [data-device="mobile"] .threep-logo-pair .threep-header-mark {
        width: 44px !important;
        flex-basis: 44px !important;
    }

    #header [data-device="mobile"] .threep-logo-pair .threep-header-statement {
        width: calc(100% - 54px) !important;
    }
}

/* Keep the existing search and menu clear of each other on narrow desktops. */
@media (min-width: 1000px) and (max-width: 1199px) {
    #header [data-device="desktop"] [data-id="button"] {
        margin: 0 !important;
    }
    #header [data-device="desktop"] [data-id="text"] {
        width: 120px !important;
        max-width: 120px !important;
        min-width: 0 !important;
    }
    #header [data-device="desktop"] [data-id="text"] .ct-search-form {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* A single brand mark occupies the header logo slot. */
#header .threep-header-branding[data-id="logo"],
#header [data-device="mobile"] .threep-header-branding[data-id="logo"] {
    width: 80px !important;
}
#header .threep-logo-pair {
    gap: 0 !important;
}
@media (min-width: 1000px) and (max-width: 1399px) {
    #header .threep-header-branding[data-id="logo"] { width: 66px !important; }
}
@media (max-width: 999px) {
    #header [data-device="mobile"] .threep-header-branding[data-id="logo"] { width: 50px !important; }
}
@media (max-width: 359px) {
    #header [data-device="mobile"] .threep-header-branding[data-id="logo"] { width: 44px !important; }
}
