/* Keep controls visible on light and dark surfaces, including nested theme rules. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #101820 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 3px #fff !important;
    scroll-margin-block: 140px 60px;
}

.screen-reader-text,
.apmm-visually-hidden {
    display: block !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.apmm-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    transform: translateY(-200%);
    z-index: 2147483647;
    padding: 12px 20px;
    background: #fff;
    color: #101820;
    font-size: 18px;
    font-weight: 700;
    text-decoration: underline;
}
.apmm-skip-link:focus {
    transform: none;
    color: #101820;
}
body.admin-bar .apmm-skip-link:focus { top: 56px; }
#pxl-content-main { scroll-margin-top: 140px; }
.apmm-form-label { display: block; margin-block-end: .375rem; }

/* One state owns visibility for hover, click, and keyboard interaction. */
.pxl-menu-primary [data-apmm-submenu][data-apmm-open="false"] > .sub-menu {
    display: none !important;
}
.pxl-menu-primary [data-apmm-submenu][data-apmm-open="true"] > .sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    margin-top: 0 !important;
}
.pxl-menu-primary [data-apmm-submenu] > .pxl-menu-toggle[aria-hidden="true"] {
    pointer-events: none;
}
.apmm-submenu-button ~ .pxl-menu-toggle[aria-hidden="true"] { display: none; }
.apmm-submenu-button {
    padding: 0;
    border: 1px solid currentColor;
}
.pxl-pagination-wrap a.page-numbers,
.pxl-swiper-arrow {
    min-width: 24px;
    min-height: 24px;
}
.pxl-menu-primary .sub-menu li a { white-space: normal; }

@media (max-width: 1200px) {
    .pxl-header-menu {
        width: min(300px, calc(100vw - 20px));
        height: 100dvh;
    }
    .pxl-header-menu .pxl-menu-close:focus-visible {
        outline-offset: -6px !important;
    }
    .pxl-header-menu .pxl-menu-close { min-width: 44px; min-height: 44px; }
    .pxl-menu-primary [data-apmm-submenu] > a[role="button"] { padding-inline-end: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    .pxl-header-menu, .pxl-menu-primary .sub-menu { transition: none !important; }
}
@media (forced-colors: active) {
    :focus-visible { outline-color: Highlight !important; }
}

/* Error text must remain legible on both contact and career form surfaces. */
.wpcf7 .wpcf7-not-valid-tip {
    color: #fff !important;
    background-color: #b42318 !important;
    position: static;
    display: block;
    margin-block-start: 8px;
    padding: 4px 8px;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}
.wpcf7 .wpcf7-not-valid-tip::before { display: none; }

/* The restored text replaces a square poster and must fit the article column. */
#post-20078 .post-content > .content-inner > h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.4;
}

/* Consent controls take priority; the chat returns when the consent UI closes. */
body:has(.cky-modal.cky-modal-open) #tidio-chat,
body:has(.cky-consent-container:not(.cky-hide)) #tidio-chat {
    display: none !important;
}

/* Long words and addresses remain visible with larger text spacing. */
#pxl-main h1,
#pxl-main h2,
#pxl-main h3,
#pxl-main .pxl-text-editor {
    overflow-wrap: anywhere;
}

footer a[href^="mailto:"],
footer a[href^="tel:"] {
    display: inline-block;
    min-height: 24px;
}

/* The footer credit's desktop offset exceeds its column at tablet widths. */
@media (min-width: 768px) and (max-width: 1024px) {
    footer .elementor-16370 .elementor-element.elementor-element-8fbcaae > .elementor-widget-wrap {
        margin-left: 0;
    }
}

/* APMM homepage: the eight informational cards in these two Elementor rows. */
body.page-id-6791 :is(.elementor-element-9bab800, .elementor-element-0d2af36) .pxl-icon-box7 {
    overflow-wrap: anywhere;
}

body.page-id-6791 :is(.elementor-element-9bab800, .elementor-element-0d2af36) .pxl-icon-box7 > .pxl-item--inner {
    overflow: visible;
    transform: none;
    transition: none;
}

body.page-id-6791 :is(.elementor-element-9bab800, .elementor-element-0d2af36) .pxl-icon-box7 > .pxl-item--inner > .pxl-item--holder > .pxl-item--description {
    /* Override the negative inline margin reapplied by Herrington on load/resize/AJAX. */
    margin-bottom: 0 !important;
    transition: none;
}

@media (min-width: 1025px) {
    /* Preserve the original visible icon dimensions when the pointer enters a card. */
    body.page-id-6791 :is(.elementor-element-9bab800, .elementor-element-0d2af36) .pxl-icon-box7 > .pxl-item--inner:hover .pxl-item--icon :is(svg, img) {
        max-width: 67px;
        min-height: 75px;
    }

    /* The old overlapping rows assumed that their descriptions were collapsed. */
    body.page-id-6791 .elementor-element.elementor-element-0d2af36 {
        margin-top: 0;
    }
}

/* Search in the shared footer. */
.apmm-search-header {
    margin-block: 2rem 3rem;
}

.apmm-search-header h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

body.search .no-results h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.apmm-site-search {
    display: grid;
    gap: .5rem;
    max-width: 28rem;
    margin-block-start: 1.25rem;
}

.apmm-site-search label {
    display: block;
}

.apmm-site-search input,
.apmm-site-search button {
    min-height: 44px;
}

.apmm-site-search input {
    width: 100%;
    min-width: 0;
    color: #0a1119;
    background: #fff;
    border-color: #4b535d;
}

.apmm-site-search button {
    justify-self: start;
    padding: .65em 1em;
    line-height: 1.5;
    color: #fff;
    background: #0a1119;
    border: 1px solid #0a1119;
}

/* Keep the announcement available to assistive technology without adding visible text. */
.pxl-swiper-container > .swiper-notification {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* These pages use service, news and logo controls over white content. */
body:is(.page-id-6791, .page-id-18957, .page-id-17172) .pxl-swiper-arrow-wrap:is(.style-1, .style-2) {
    position: static;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 8px;
    padding: 6px;
}
body:is(.page-id-6791, .page-id-18957, .page-id-17172) .pxl-swiper-arrow-wrap:is(.style-1, .style-2) .pxl-swiper-arrow {
    position: static;
    transform: none !important;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    color: #171b24;
    background: #fff !important;
    border: 2px solid currentColor;
    border-radius: 50%;
    opacity: 1 !important;
    visibility: visible;
    cursor: pointer;
}
body:is(.page-id-6791, .page-id-18957, .page-id-17172) .pxl-swiper-arrow-wrap:is(.style-1, .style-2) .pxl-swiper-arrow svg path {
    stroke: currentColor;
}
body:is(.page-id-6791, .page-id-18957, .page-id-17172) .pxl-swiper-arrow-wrap:is(.style-1, .style-2) .pxl-swiper-arrow-next svg {
    transform: scaleX(-1);
}
body:is(.page-id-6791, .page-id-18957, .page-id-17172) .pxl-swiper-arrow-wrap:is(.style-1, .style-2) .pxl-swiper-arrow[aria-disabled="true"] {
    opacity: .45 !important;
    cursor: default;
}
body:is(.page-id-6791, .page-id-18957, .page-id-17172) .pxl-swiper-arrow-wrap:is(.style-1, .style-2) .swiper-button-lock {
    display: none !important;
}
