/* Shared public controls. Portal tokens stay authoritative; page layers own layout only. */
.mw-public {
  --mw-motion-fast: 180ms;
  --mw-motion-base: 240ms;
  --mw-motion-ease: ease-in-out;
}
.mw-button {
  --mw-button-height: var(--control-height--compact);
  --mw-button-padding: .75rem;
  --mw-button-icon-size: 1.125rem;
  --mw-button-gap: .5rem;
  --mw-button-bg: var(--_theme---button-primary--background);
  --mw-button-border: var(--_theme---button-primary--border);
  --mw-button-text: var(--_theme---button-primary--text);
  --mw-button-hover-bg: var(--_theme---button-primary--background-hover);
  --mw-button-hover-border: var(--_theme---button-primary--border-hover);
  --mw-button-hover-text: var(--_theme---button-primary--text-hover);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: var(--mw-button-gap);
  min-width: 0;
  height: var(--mw-button-height);
  padding: 0 var(--mw-button-padding);
  border: var(--border-width--main) solid var(--mw-button-border);
  border-radius: var(--radius--round);
  background: var(--mw-button-bg);
  color: var(--mw-button-text);
  font-family: var(--_typography---font--secondary-family);
  font-size: .875rem;
  font-weight: var(--_typography---font--secondary-regular);
  line-height: 1;
  text-align: center;
  text-decoration-line: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--mw-motion-fast) var(--mw-motion-ease), border-color var(--mw-motion-fast) var(--mw-motion-ease), color var(--mw-motion-fast) var(--mw-motion-ease);
}
.mw-button[data-size="regular"] { --mw-button-height: 44px; --mw-button-padding: 1.25rem; font-size: 1rem; }
.mw-button[data-tone="secondary"] {
  --mw-button-bg: var(--swatch--transparent);
  --mw-button-border: var(--field-rest-border);
  --mw-button-text: var(--swatch--brand);
  --mw-button-hover-bg: var(--_theme---background-secondary);
  --mw-button-hover-border: var(--field-hover-border);
  --mw-button-hover-text: var(--swatch--brand);
}
.mw-button[data-tone="inverse"] {
  --mw-button-bg: var(--swatch--light);
  --mw-button-border: var(--swatch--light);
  --mw-button-text: var(--swatch--brand);
  --mw-button-hover-bg: var(--swatch--accent);
  --mw-button-hover-border: var(--swatch--accent);
  --mw-button-hover-text: var(--swatch--brand);
}
.mw-button[data-tone="text"] {
  --mw-button-bg: var(--swatch--transparent);
  --mw-button-border: var(--swatch--transparent);
  --mw-button-text: var(--swatch--brand);
  --mw-button-hover-bg: var(--swatch--transparent);
  --mw-button-hover-border: var(--swatch--transparent);
  --mw-button-hover-text: var(--swatch--brand-faded);
  --mw-button-padding: .5rem;
}
.mw-button[data-shape="round"] { width: var(--mw-button-height); padding: 0; }
.mw-button:not(:disabled):not([aria-disabled="true"]):is(:hover, :active) { border-color: var(--mw-button-hover-border); background: var(--mw-button-hover-bg); color: var(--mw-button-hover-text); }
.mw-button:focus-visible { outline: 3px solid var(--field-focus-border); outline-offset: 3px; border-color: var(--mw-button-hover-border); }
.mw-button[data-tone="inverse"]:focus-visible { outline-color: var(--swatch--accent); }
.mw-button:is(:disabled, [aria-disabled="true"]) { opacity: .4; cursor: default; }
.mw-button[hidden] { display: none; }
.mw-button-label { display: block; transition: transform var(--mw-motion-fast) var(--mw-motion-ease); }
.mw-button-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--mw-button-icon-size); height: var(--mw-button-icon-size); line-height: 0; pointer-events: none; }
.mw-public .mw-button-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Symmetric padding centres the idle label; the decorative icon is outside text flow. */
.mw-button[data-reveal-icon] { padding-inline: calc(var(--mw-button-padding) + (var(--mw-button-icon-size) + var(--mw-button-gap)) / 2); }
.mw-button[data-reveal-icon] .mw-button-icon { position: absolute; right: var(--mw-button-padding); opacity: 0; transition: opacity var(--mw-motion-fast) var(--mw-motion-ease); }
.mw-button[data-reveal-icon]:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible, :active) .mw-button-label { transform: translateX(calc((var(--mw-button-icon-size) + var(--mw-button-gap)) / -2)); }
.mw-button[data-reveal-icon]:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible, :active) .mw-button-icon { opacity: 1; }
.mw-view-all { display: inline-flex; align-items: center; gap: .4rem; }
.mw-related .mw-view-all:is(:hover, :focus-visible, :active) { text-decoration-line: none; }
.mw-view-all:is(:hover, :focus-visible, :active) .mw-view-all-label { text-decoration-line: underline; text-decoration-thickness: var(--border-width--main); text-underline-offset: .2em; }
.mw-view-all-arrow { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1em; height: 1em; line-height: 0; opacity: 0; transition: opacity var(--mw-motion-fast) var(--mw-motion-ease); }
.mw-public .mw-view-all-arrow svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mw-view-all:is(:hover, :focus-visible, :active) .mw-view-all-arrow { opacity: 1; }
@media (hover: none) { .mw-view-all-arrow { opacity: 1; } }
.mw-menu-chevron { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1rem; height: 1rem; margin-left: .4rem; line-height: 0; }
.mw-public .mw-menu-chevron svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(0deg); transform-origin: 50% 50%; transition: transform var(--mw-motion-base) var(--mw-motion-ease); }
:is(.mw-nav-group, .article-mobile-toc)[data-expanded="true"] > summary .mw-menu-chevron svg,
:is(.mw-nav-group, .article-mobile-toc)[open]:not([data-expanded]) > summary .mw-menu-chevron svg { transform: rotate(-180deg); }
.mw-nav-reveal, .mw-nav-links { display: contents; }
.mw-nav-links > a { text-decoration-line: none; white-space: nowrap; }
@media (max-width: 1119px) {
  .mw-public-nav[data-mw-navigation], .mw-public-nav[data-mw-navigation].is-open { display: block; padding: 0; }
  .mw-nav-reveal { display: block; overflow: hidden; overflow-anchor: none; }
  .mw-nav-reveal[hidden] { display: none; }
  .mw-nav-links { display: flex; flex-direction: column; gap: .2rem; padding: .75rem 0 1rem; max-height: calc(100svh - 8rem); overflow-y: auto; overscroll-behavior: contain; }
  .mw-nav-links > a { padding-block: .65rem; }
}
@media (prefers-reduced-motion: reduce) { .mw-button, .mw-button-label, .mw-button-icon, .mw-view-all-arrow, .mw-menu-chevron svg { transition: none; } }

/* DS-001 / DS-018 / DS-025 / DS-035. Shared collapsed-navigation preview.
   Keep the established breakpoint, disclosure and closed header geometry. */
:is([data-mw-shell-part="header"], #nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-sticky-header] {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
}

html:has([data-mw-sticky-header]) {
  /* Keep anchor destinations and scrolled keyboard focus below the header. */
  scroll-padding-block-start: calc(var(--mw-sticky-header-height, 0px) + 1rem);
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-group] {
  display: none;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is([data-mw-phone-menu-primary], [data-mw-phone-menu-footer]) {
  display: none;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-dismissible-topbar][hidden] {
  display: none;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mw-banner_utility_wrap, .mws-banner_utility_wrap, .banner_utility_wrap) {
  gap: 12px;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mws-search_compnt_expand_btn, .search_compnt_expand_btn) {
  inset: -6px;
  width: auto;
  height: auto;
  min-width: 44px;
  min-height: 44px;
  border: 0;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mws-search_compnt_wrap, .search_compnt_wrap):is(.mws-is-collapsed, .is-collapsed)::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--_theme---border, #e6e3ec);
  border-radius: 50%;
  pointer-events: none;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-topbar-dismiss] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-block: -6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-topbar-fallback] {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-topbar-active] [data-mw-topbar-fallback] {
  display: none;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is([data-mw-topbar-dismiss], .mws-search_compnt_expand_btn[data-topbar-control="search"], .search_compnt_expand_btn[data-topbar-control="search"]):focus-visible {
  outline: 2px solid var(--swatch--brand, #160042);
  outline-offset: 3px;
}

@media (max-width: 389px) {
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mws-banner_link_list, .banner_link_list) > li:has([aria-current]) {
    display: none;
  }
}

@media (max-width: 1119px) {
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-topbar-fallback] {
    display: none;
  }
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-menu-icon] {
  position: relative;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-menu-line] {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 20px;
  height: 1px;
  margin-block-start: -.5px;
  margin-inline-start: -10px;
  background: currentColor;
  transform-origin: center;
  pointer-events: none;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-menu-line="top"] {
  margin-block-start: -7.5px;
}

:is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-menu-line="bottom"] {
  margin-block-start: 6.5px;
}

@media (max-width: 1119px) {
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)
    :is(.mw-public-header-inner, .mws-mw-public-header-inner) {
    position: relative;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)
    :is(.mw-public-nav, .mws-mw-public-nav)[data-mw-navigation] {
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 0;
    z-index: 20;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)
    :is(.mw-public-nav.is-open, .mws-mw-public-nav.mws-is-open) {
    background: #fff;
    box-shadow: 0 .875rem 1.75rem rgb(22 0 66 / .12);
  }

}

/* One full-screen design for every collapsed width, including small tablets.
   The established desktop-navigation breakpoint remains unchanged. */
@media (max-width: 1119px) {
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mw-nav-actions, .mws-mw-nav-actions),
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mw-nav-links, .mws-mw-nav-links) > a:is([href="/contact"], [href="/search"]) {
    display: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-primary] {
    display: flex;
    flex: none;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    padding: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-primary] > a {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    padding: .125rem .625rem;
    font-size: .875rem;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    border-radius: .5rem;
    background: transparent;
    color: #fff;
    text-decoration: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-primary] > a::before {
    content: '';
    position: absolute;
    inset: 6px 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--swatch--brand, #160042);
    pointer-events: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-footer] {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: .25rem 0 calc(.25rem + env(safe-area-inset-bottom, 0px));
    border-block-start: 1px solid var(--_theme---border, #e6e3ec);
    background: #fff;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-footer] a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: .25rem;
    gap: .375rem;
    font-size: .875rem;
    color: inherit;
    text-align: center;
    text-decoration: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-utilities] {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-utilities] [data-mw-static-action-icon] {
    order: -1;
    align-items: center;
    justify-content: center;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-utilities] [data-mw-static-action-icon] svg {
    inline-size: 16px;
    block-size: 16px;
    min-width: 0;
    min-height: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-utilities] [data-mw-action-label] {
    overflow-wrap: anywhere;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-static-action-icon] {
    display: inline-flex;
    flex: none;
    width: 16px;
    height: 16px;
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-primary] [data-mw-static-action-icon] {
    position: static;
    align-self: center;
    align-items: center;
    justify-content: center;
    margin-block-start: 0;
    width: 16px;
    height: 16px;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-primary-content] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-primary] [data-mw-static-action-icon] svg {
    inline-size: 16px;
    block-size: 16px;
    max-inline-size: none;
    min-width: 0;
    min-height: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-action-label] {
    min-width: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-static-action-icon] svg {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-static-action-icon] svg[data-icon="mail"],
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-static-action-icon] svg[data-icon="mail"] :is(rect, path) {
    fill: none;
    stroke: currentColor;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mw-public-header-inner, .mws-mw-public-header-inner) {
    grid-template-columns: 100px minmax(0, 1fr) 44px;
    grid-template-rows: minmax(4rem, max-content) auto;
    column-gap: .375rem;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mw-menu-toggle, .mws-mw-menu-toggle) {
    grid-column: 3;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    gap: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) :is(.mw-menu-toggle, .mws-mw-menu-toggle)
    :is(.mw-button-label, .mws-mw-button-label) {
    display: none;
  }
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-topbar-active]
    a[data-mw-phone-search-utility] {
    display: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-source] {
    display: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-group] {
    display: flex;
    flex: none;
    flex-direction: column;
    margin-block: 0;
    padding-block: 1rem;
    border: 0;
    border-block-end: 1px solid var(--_theme---border, #e6e3ec);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-heading] {
    margin: 0 0 .5rem;
    font: inherit;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--swatch--brand-faded, #5e5679);
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-group="0-0"] {
    border-block-start: 1px solid var(--_theme---border, #e6e3ec);
    margin-block-start: 1rem;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-group="1-0"] {
    /* The fixed utility bar supplies the final separator; no second FAQ rule. */
    border-block-end: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-links] {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header) [data-mw-phone-menu-links] > a,
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)
    :is(.mw-nav-links, .mws-mw-nav-links) > a {
    display: flex;
    flex: none;
    align-items: center;
    min-height: 32px;
    padding-block: .25rem;
    font-size: 1rem;
    line-height: 1.4;
    white-space: normal;
    text-decoration-line: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)
    :is(.mw-public-nav, .mws-mw-public-nav) a[href]:not(.mw-button):not(.mws-mw-button):is(:hover, :focus-visible, :active) {
    text-decoration-line: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)
    :is(.mw-nav-links, .mws-mw-nav-links) {
    gap: 0;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen] {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    z-index: 1000;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen]
    :is(.mw-public-header-inner, .mws-mw-public-header-inner) {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(4rem, max-content) minmax(0, 1fr);
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen]
    :is(.mw-public-nav, .mws-mw-public-nav)[data-mw-navigation] {
    position: static;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    box-shadow: none;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen]
    :is(.mw-nav-reveal, .mws-mw-nav-reveal) {
    /* The shared disclosure writes a measured animation height. The phone
       dialog uses its viewport-sized grid instead, never that stale height. */
    flex: 1;
    min-height: 0;
    height: auto !important;
    overflow: hidden;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen]
    :is(.mw-nav-links, .mws-mw-nav-links) {
    height: 100%;
    max-height: none;
    min-height: 0;
    padding-top: .25rem;
    padding-bottom: 1rem;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen]
    :is(.mw-nav-actions, .mws-mw-nav-actions) {
    margin-top: auto;
    flex-shrink: 0;
    flex-wrap: wrap;
    padding-top: 1rem;
  }

  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)
    :is(.mw-public-nav, .mws-mw-public-nav)[data-mw-navigation]:not(.is-open):not(.mws-is-open) {
    visibility: hidden;
  }
}

/* Keep standard-height phones compact without shrinking text or hit targets.
   Smaller viewports/enlarged text retain the independent menu scroller. */
@media (max-width: 1119px) and (max-height: 900px) {
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen] [data-mw-phone-menu-group] {
    padding-block: .75rem;
  }
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen] [data-mw-phone-menu-heading] {
    margin-bottom: .375rem;
  }
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen] [data-mw-phone-menu-group="0-0"] {
    margin-block-start: .5rem;
  }
  :is(#nav.mw-public-header, #mws-nav.mws-mw-public-header)[data-mw-menu-fullscreen] :is(.mw-nav-links, .mws-mw-nav-links) {
    padding-bottom: .625rem;
  }
}
