/* One visual size for header and footer shortcuts, independent of source artwork. */
:is(#masthead,#colophon) .social-icon-custom-svg:has(> .mvn-social-glyph) {
  display:inline-flex;
  flex:0 0 22px;
  align-items:center;
  justify-content:center;
}
#masthead #main-header .header-social-item svg.mvn-social-glyph,
:is(#masthead,#colophon) a svg.mvn-social-glyph {
  display:block;
  width:22px!important;
  height:22px!important;
  max-width:none!important;
  flex:0 0 22px;
  pointer-events:none;
}

/* Keep submenu labels left-aligned at all sizes. */
#mobile-drawer #mobile-menu .sub-menu > li > a,
#masthead #primary-menu .sub-menu > li > a {
  display:flex!important;
  align-items:center;
  justify-content:flex-start;
  gap:.42em;
  min-block-size:44px;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
}
:is(#mobile-menu,#primary-menu) .sub-menu > li > a > :is(svg,img) {
  flex-shrink:0;
  margin-inline:0!important;
}
@media (max-width:767px) {
  /* Header and scrolling links are two separate, non-overlapping rows. */
  #mobile-drawer.show-drawer .drawer-inner .drawer-header {
    position:relative;
    flex:0 0 auto;
    block-size:auto!important;
    padding-block-start:max(8px,env(safe-area-inset-top,0px));
    padding-block-end:8px;
  }
  #mobile-drawer.show-drawer .drawer-header .menu-toggle-close {
    box-sizing:border-box;
    width:44px!important;
    height:44px!important;
    padding:0!important;
  }
  #mobile-drawer.show-drawer .drawer-header .menu-toggle-close .toggle-close-bar {
    opacity:1!important;
    transition:none!important;
  }
  #mobile-drawer.show-drawer .drawer-inner .drawer-content {
    display:block;
    flex:0 1 auto;
    min-block-size:0!important;
    overflow:auto;
  }
  #mobile-drawer .drawer-content .site-header-item-mobile-navigation {
    width:100%;
    overflow:visible;
    margin:0;
  }
  /* Keep the block and its row dividers aligned with the parent.
     Only the contents of the full-width links get an inset. */
  #mobile-drawer #mobile-menu .sub-menu {
    margin-inline:0;
    padding-inline:0;
  }
  #mobile-drawer #mobile-menu .sub-menu > li > a {
    padding-inline-start:clamp(34px,10vw,50px);
    padding-inline-end:4px;
  }
  #mobile-drawer #mobile-menu > li:first-child > a:not(:has(> img:only-child)) {
    padding-block:12px;
  }
}

@media (min-width:768px) {
  #masthead #primary-menu { align-items:center; }
  #masthead #primary-menu > li > a {
    display:flex!important;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    min-block-size:46px;
    white-space:nowrap;
    line-height:1.35!important;
  }
  #masthead #primary-menu > li.menu-item-has-children { position:relative; }
  #masthead #primary-menu > li.menu-item-has-children > a {
    padding-inline-end:40px!important;
  }
  #masthead #primary-menu > li > a .dropdown-nav-toggle { display:none!important; }
  #masthead #primary-menu > li > button.dropdown-nav-special-toggle {
    position:absolute!important;
    inset:0 0 0 auto!important;
    display:grid!important;
    place-items:center;
    inline-size:36px!important;
    block-size:100%!important;
    padding:0!important;
    margin:0!important;
    border-radius:4px;
    color:#fff!important;
    pointer-events:auto!important;
    z-index:2;
  }
  #masthead #primary-menu > li > button.dropdown-nav-special-toggle::after {
    content:"";
    position:static!important;
    inline-size:7px;
    block-size:7px;
    border:solid currentColor;
    border-width:0 2px 2px 0;
    transform:translateY(-2px) rotate(45deg);
  }
  #masthead #primary-menu > li > button.dropdown-nav-special-toggle[aria-expanded="true"]::after {
    transform:translateY(2px) rotate(225deg);
  }
  #masthead #primary-menu > li > button.dropdown-nav-special-toggle:focus-visible {
    outline-offset:-3px;
  }
  #masthead #primary-menu > li > .sub-menu {
    box-sizing:border-box!important;
    inline-size:clamp(17rem,25vw,20rem)!important;
    max-inline-size:calc(100vw - 24px);
  }
  #masthead #primary-menu .sub-menu > li { width:100%!important; margin:0!important; }
  #masthead #primary-menu .sub-menu > li > a { width:100%!important; }
}
@media (min-width:768px) and (max-width:1099px) {
  #masthead #primary-menu > li.menu-item-has-children > a { padding-inline-end:29px!important; }
  #masthead #primary-menu > li > button.dropdown-nav-special-toggle { inline-size:28px!important; }
}
@media (min-width:1100px) {
  #masthead #primary-menu > li > a { gap:.4em; }
  #masthead #primary-menu > li > a :is(.nav-drop-title-wrap,.mvn-header-menu-icon),
  #masthead #primary-menu > li > a > span:has(> svg):has(> span) {
    display:inline-flex;
    flex-direction:row;
    margin:0;
  }
}
