/* Overrides load after the homepage/system styles. Header Builder stays native. */
#masthead.icy-is-sticky {
    position: fixed; inset: var(--icy-adminbar-offset, 0px) 0 auto;
    width: 100%; z-index: 9990; background: #fff;
    box-shadow: 0 3px 16px #00383b24;
}
.icy-header-spacer[hidden] { display: none; }
html.icy-has-sticky-header { scroll-padding-top: calc(var(--icy-sticky-height, 80px) + var(--icy-adminbar-offset, 0px) + 16px); }
#masthead.icy-is-sticky :is(.ast-primary-header-bar, .ast-below-header-bar, .ast-mobile-header-wrap) { background: #fff; }
#masthead.icy-is-sticky .ast-primary-header-bar { padding-block: 7.2px; }
#masthead.icy-is-sticky .ast-builder-grid-row { min-height: 43.2px; }
#masthead.icy-is-sticky .site-branding img { width: auto; max-width: 180px; max-height: 39.6px; object-fit: contain; }
#masthead.icy-is-sticky:not(.icy-sticky-has-logo) .site-branding img { filter: brightness(0); }
#masthead.icy-is-sticky .site-logo-img { max-height: 39.6px; }
#masthead.icy-is-sticky :is(.site-title a, .site-description, .menu-link, .ast-header-html-1, .ast-header-html-1 a, .menu-toggle) { color: var(--ast-global-color-0); }
#masthead.icy-is-sticky .ast-custom-button { background: #164f50; color: #fff; border-color: #164f50; }
#masthead.icy-is-sticky .ast-custom-button:hover { background: var(--ast-global-color-0); color: #fff; }
#masthead.icy-is-sticky a:focus-visible, #masthead.icy-is-sticky button:focus-visible { outline: 3px solid var(--ast-global-color-0); outline-offset: 3px; }
#masthead.icy-is-sticky .ast-mobile-header-content { max-height: calc(100dvh - var(--icy-adminbar-offset, 0px) - 64px); overflow-y: auto; background: #fff; }

/* Combine the original logo row and lower menu row into one white bar. */
body:not(.ast-header-break-point) #masthead.icy-is-sticky #ast-desktop-header {
    display: flex; align-items: center; gap: 12px;
    width: min(var(--icy-width, 1400px), calc(100% - var(--icy-gutter, 20px) * 2));
    margin-inline: auto;
}
body:not(.ast-header-break-point) #masthead.icy-is-sticky .ast-above-header-wrap { display: none; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky :is(.ast-main-header-wrap, .ast-below-header-wrap) { flex: 1; min-width: 0; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky #ast-desktop-header:has(.ast-below-header-wrap) > .ast-main-header-wrap { flex: 0 1 auto; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky :is(.ast-primary-header-bar, .ast-below-header-bar) .ast-builder-grid-row-container {
    width: 100%; max-width: none; margin: 0; padding-inline: 0;
    background: transparent; box-shadow: none; border-radius: 0;
}
body:not(.ast-header-break-point) #masthead.icy-is-sticky .ast-below-header-bar { padding-block: 7.2px; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .ast-builder-grid-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .main-header-menu { flex-wrap: nowrap; width: max-content; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .icy-sticky-login { flex: 0 0 auto; margin-left: auto; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .menu-item:focus-within > .sub-menu { visibility: visible; opacity: 1; left: 0; }

/* Keep the utility controls together; collapse the menu before it wraps. */
.icy-sticky-menu-toggle { display: none; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky #ast-desktop-header { position: relative; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .ast-main-header-wrap { order: 0; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .ast-below-header-wrap { order: 1; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .icy-sticky-language { order: 3; flex: 0 0 auto; margin: 0 4px 0 auto; padding: 0; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .icy-sticky-login { order: 4; margin-left: 0; padding: 0; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .ast-custom-button { min-width: 0; padding: 10px 18px; white-space: nowrap; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .main-header-menu > .menu-item { flex-shrink: 0; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .main-header-menu > .menu-item > .menu-link,
body:not(.ast-header-break-point) #masthead.icy-is-sticky .main-header-menu > .menu-item > details > summary.menu-link { white-space: nowrap; padding-inline: 11px; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .icy-sticky-menu-toggle { display: inline-flex; order: 2; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #d4e6e4; border-radius: 8px; background: #fff; color: var(--ast-global-color-0); font: inherit; cursor: pointer; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .ast-below-header-wrap { display: none; position: absolute; inset: 100% 0 auto; max-height: calc(100dvh - 120px); overflow-y: auto; background: #fff; box-shadow: 0 8px 16px #00383b24; border-radius: 0 0 10px 10px; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact.icy-sticky-menu-open .ast-below-header-wrap { display: block; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .main-header-menu { width: 100%; flex-wrap: wrap; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .main-header-menu > .menu-item { width: 100%; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .ast-builder-grid-row { display: block; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .ast-primary-header-bar .ast-builder-grid-row { display: flex; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .main-header-menu .sub-menu { position: static; display: none; width: 100%; min-width: 0; max-width: none; box-shadow: none; padding-left: 16px; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky.icy-sticky-compact .main-header-menu .menu-item:is(:hover, :focus-within) > .sub-menu { display: block; visibility: visible; opacity: 1; }

/* A permanent home destination in the floating desktop bar, independent of the logo. */
body:not(.ast-header-break-point) #masthead.icy-is-sticky .icy-sticky-home { display: inline-flex; align-items: center; justify-content: center; order: -1; flex: 0 0 42px; width: 42px; height: 42px; color: var(--ast-global-color-0); border: 1px solid #d4e6e4; border-radius: 50%; text-decoration: none; }
body:not(.ast-header-break-point) #masthead.icy-is-sticky .icy-sticky-home:hover { background: #e7f6f5; }
.icy-sticky-home svg { display: block; }
