/* Both products share one navigation position, item order and current-page state. */
:is([data-home], [data-support]) .topbar {
  border-bottom: 1px solid #dedfd2;
}
:is([data-home], [data-support]) .topbar .brand {
  min-height: 44px;
  font-size: 26px;
}
:is([data-home], [data-support]) .topbar .menu-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
}
.wrap.product-navigation {
  padding-top: 32px;
}
body .product-navigation .product-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 440px;
  max-width: 100%;
  gap: 4px;
  margin: 0;
  padding: 5px;
  border: 1px solid #dedfd2;
  border-radius: 100px;
  background: #f3eddf;
}
.product-navigation .product-switch > .ps-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 100px;
  color: #173b30;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}
.product-navigation .product-switch > [aria-current="page"] {
  background: #16382b;
  border-color: #16382b;
  color: #fffaf3;
}
.product-navigation .product-switch > a:hover {
  background: #e3efcf;
  color: #173b30;
}
.product-navigation .product-switch > a:focus-visible {
  outline: 3px solid #397bc1;
  outline-offset: 3px;
}
.product-navigation .ps-word {
  display: block;
}
body[data-for]:not([data-for=""]) .product-navigation,
body[data-kind="stay"]:not([data-home]) .product-navigation {
  display: none;
}
@media (max-width: 760px) {
  :is([data-home], [data-support]) .topbar .brand { font-size: 23px; }
  .wrap.product-navigation { padding-top: 20px; }
  .product-navigation .product-switch { width: 400px; }
  .product-navigation .product-switch > .ps-item {
    padding: 10px 6px;
    font-size: 12px;
  }
}

/* Touch navigation keeps the shared header in place. Composite two pictures instead of repainting a full-page mask. */
@media (hover: none) and (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  :is([data-home], [data-support]) .product-switch > .ps-item,
  :is([data-home], [data-support]) .product-switch > .ps-item :is(.ps-word, .ps-arrow) {
    view-transition-name: none;
  }
  ::view-transition-group(root),
  ::view-transition-group(product-switch) {
    animation-duration: 0.18s;
  }
  ::view-transition-old(root) {
    -webkit-mask-image: none;
    mask-image: none;
    animation: product-touch-leave 0.18s ease-out both;
    z-index: 1;
  }
  ::view-transition-new(root) {
    animation: none;
    opacity: 1;
    transform: none;
    z-index: 0;
  }
  ::view-transition-old(product-switch) {
    animation: product-touch-leave 0.18s ease-out both;
  }
  ::view-transition-new(product-switch) {
    animation: product-touch-enter 0.18s ease-out both;
  }
  /* The native fallback has no old screenshot: keep the page readable, without clipping the header or moving it. */
  html.ns-fill-in,
  html.forest.ns-fill-in {
    background: #fffaf3;
  }
  html.ns-fill-in body {
    animation: product-touch-arrive 0.18s ease-out both;
  }
  html.ns-fill-in main {
    animation: none;
  }
}
@keyframes product-touch-leave {
  to { opacity: 0; }
}
@keyframes product-touch-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes product-touch-arrive {
  from { opacity: 0.86; }
  to { opacity: 1; }
}
/* End touch product transitions. */
