/* Keep the header wordmark fully revealed once the reveal starts.
   On some mobile browsers the scroll-driven clip-path stopped partway,
   which cut the wordmark off (e.g. "tracod"). While the header is in its
   wordmark state, show the whole mark; when it leaves that state the
   script's clip-path applies again. */
#site-nav[data-wordmark] .nav-mark {
  clip-path: none !important;
}

/* Mobile menu: a main screen, with Products and Resources opening their
   own full-screen panels. Each panel shows everything, with no scrolling. */
#mobile-menu {
  overflow: hidden;
}
/* Full screen while open: the header grows to cover the viewport, and the
   menu panels fill the space under the header bar. */
#site-nav:has(#mobile-menu:not([hidden])) {
  height: 100dvh;
  /* Above the cookie banner (z-60), so it can't cover the menu buttons. */
  z-index: 70;
  /* Show the page background behind the menu, but much darker. */
  background-color: rgb(0 0 0 / 0.3) !important;
  backdrop-filter: brightness(0.35) !important;
  -webkit-backdrop-filter: brightness(0.35) !important;
}
/* While the menu is open, hide the page content and keep only the
   background behind the menu. */
body.mm-lock main,
body.mm-lock footer {
  visibility: hidden;
}
/* Hide the cookie banner while the menu is open. It reappears on close. */
body.mm-lock #cookie-banner {
  display: none !important;
}
#mobile-menu:not([hidden]) {
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* Lock page scrolling while the menu is open. mobile-menu.js sets the
   body's top offset to keep the current scroll position. */
body.mm-lock {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
}
#mobile-menu .mm-stack {
  position: relative;
  height: calc(100dvh - 4rem);
  overflow: hidden;
}
#mobile-menu .mm-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom));
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Quick fade out when leaving, then fade in once the old screen is gone. */
  transition: opacity 120ms ease-out, visibility 0s linear 120ms;
}
#mobile-menu .mm-view[data-mm-view="main"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 220ms ease-in 120ms, visibility 0s;
}
#mobile-menu[data-view="products"] .mm-view[data-mm-view="main"],
#mobile-menu[data-view="resources"] .mm-view[data-mm-view="main"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease-out, visibility 0s linear 120ms;
}
#mobile-menu[data-view="products"] .mm-view[data-mm-view="products"],
#mobile-menu[data-view="resources"] .mm-view[data-mm-view="resources"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 220ms ease-in 120ms, visibility 0s;
}
#mobile-menu .mm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.75rem;
}
#mobile-menu .mm-back {
  padding: 0.25rem 0;
  font-size: 0.9375rem;
  color: rgb(161 161 170);
}
#mobile-menu .mm-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(161 161 170);
}
#mobile-menu .mm-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  padding: 0.625rem 1rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.025);
  border: 1px solid rgb(255 255 255 / 0.06);
}
#mobile-menu .mm-go {
  width: 100%;
  text-align: left;
}
#mobile-menu .mm-chev {
  color: rgb(113 113 122);
}
#mobile-menu .mm-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#mobile-menu .mm-tiles,
#mobile-menu .mm-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
}
#mobile-menu .mm-tiles > li > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.025);
  border: 1px solid rgb(255 255 255 / 0.06);
}
#mobile-menu .mm-tiles > li > a > span.text-13 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1.3;
}
#mobile-menu .mm-list > li > a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}
#mobile-menu .mm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
#mobile-menu .mm-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}
/* Short phones: product names only, so the Products panel still fits. */
@media (max-height: 700px) {
  #mobile-menu .mm-tiles > li > a > span.text-13 {
    display: none;
  }
  #mobile-menu .mm-main {
    gap: 0.375rem;
  }
  #mobile-menu .mm-main .mm-box {
    min-height: 2.625rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  #mobile-menu .mm-view {
    transition: none;
  }
}
