/* Expanded navigation: layout only; visual tokens come from the original dropdown. */
.main-nav > .container { position: relative; }
.site-mega-dropdown { position: static; }
.site-mega-dropdown > summary { cursor: pointer; list-style: none; }
.site-mega-dropdown > summary::-webkit-details-marker { display: none; }
.site-mega-menu {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 960px);
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  top: 100%;
}
.site-mega-dropdown:not([open]) > .site-mega-menu { display: none; }
.site-mega-dropdown[open] > .site-mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%);
}
.site-menu-group { display: flex; flex-direction: column; min-width: 0; }
.site-menu-overview { grid-column: 1 / -1; }
.site-mobile-group > summary { cursor: pointer; }
.site-mobile-group > ul { display: flex; }
.site-mobile-group:not([open]) > ul { display: none; }
.content-page section[id] { scroll-margin-top: 100px; }

.site-single-menu { grid-template-columns: minmax(0, 1fr); width: min(100%, 360px); }
.site-menu-group a { display: block; }
.site-menu-group > div { display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .header-compact .main-nav .d-lg-flex { display: none !important; }
  .header-compact .main-nav .navbar-toggler { display: block !important; }
}
.brand-logo .managed-header-logo {
  width: auto;
  height: var(--header-logo-height, 56px);
  max-width: min(280px, 32vw);
  object-fit: contain;
  flex-shrink: 0;
}
@media (max-width: 991.98px) {
  .main-nav > .container > .brand-logo { max-width: calc(100% - 56px); min-width: 0; }
  .brand-logo .Logo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .brand-logo .managed-header-logo {
    height: var(--header-logo-mobile-height, 40px);
    max-width: min(180px, 42vw);
  }
}

/* Opt-in monochrome logo; explicit site theme takes priority over device theme. */
.managed-header-logo[data-logo-color="light"],
.managed-header-logo[data-logo-color="auto"] { filter: brightness(0); }
.managed-header-logo[data-logo-color="dark"] { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .managed-header-logo[data-logo-color="auto"] { filter: brightness(0) invert(1); }
}
:root[data-theme="dark"] .managed-header-logo[data-logo-color="auto"] { filter: brightness(0) invert(1); }
