/* IDM program-page host rules.
 *
 * Runtime injects: #dc-root, #dc-root > .sc-host { min-height: 100vh }
 * That makes the header island fill the viewport and leaves a huge blank
 * under the bars. Contain every root/host node inside the mount.
 */

#itm-idm-header-mount {
  display: block !important;
  position: relative;
  z-index: 100;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

#itm-idm-header-mount #dc-root,
#itm-idm-header-mount #dc-root > .sc-host,
#itm-idm-header-mount .sc-host[data-sc-name="Root"],
#itm-idm-header-mount .sc-host[data-sc-name="IDMHeader"] {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Never let the stock "fill the window" rule win inside the header island. */
#itm-idm-header-mount #dc-root[style],
#itm-idm-header-mount .sc-host[style] {
  height: auto !important;
  min-height: 0 !important;
}

:where(#itm-idm-header-mount),
:where(.idm-hdr) {
  color: #0E0D18;
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[data-itheme="dark"] :where(#itm-idm-header-mount),
html[data-itheme="dark"] :where(.idm-hdr) { color: #F8F3EC; }

:where(#itm-idm-header-mount) *,
:where(#itm-idm-header-mount) *::before,
:where(#itm-idm-header-mount) *::after,
:where(.idm-hdr) *,
:where(.idm-hdr) *::before,
:where(.idm-hdr) *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Collapse hidden "On this page" subnav so it cannot leave a white strip. */
#itm-idm-header-mount .ba-subnav[style*="visibility: hidden"],
#itm-idm-header-mount .ba-subnav[style*="visibility:hidden"] {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hero used to sit under an in-page header; tighten top padding under common header. */
#itm-idm-header-mount ~ #dc-root #top > div[style*="z-index: 1"],
#itm-idm-header-mount ~ #dc-root #top > div[style*="z-index:1"] {
  padding-top: clamp(16px, 2.5vw, 28px) !important;
}

/* Announcement pager dots must stay tiny (page form.css used to force 44px). */
.ann-dots button { min-height: 0 !important; height: 6px !important; padding: 0 !important; }
@media (max-width: 720px) { .ann-dots { display: none !important; } }

/* Keep the crest visible on narrow screens. */
@media (max-width: 640px) {
  .itm-hbar > a[aria-label*="home"] {
    flex: 1 1 auto !important;
    min-width: 132px !important;
    max-width: calc(100% - 120px);
  }
  .itm-hbar > a[aria-label*="home"] img,
  .itm-hbar img {
    height: 36px !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 110px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }
}
