/* Honor both the current and stable system insets as a window opens or rotates. */
@media (display-mode: standalone) and (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 120ms; }
  ::view-transition-old(root) { animation: none; }
  ::view-transition-new(root) {
    mix-blend-mode: normal;
    animation: wt-show-page 120ms ease-out both;
  }
}
@keyframes wt-show-page { from { opacity: 0; } to { opacity: 1; } }

html.wt-in-pwa .wt-page-progress:not(:empty) {
  position: fixed;
  top: calc(var(--wt-safe-top, 0px) + .6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483646;
  max-width: calc(100% - 2rem);
  padding: .45rem .8rem;
  border: 1px solid #6e867b;
  border-radius: .35rem;
  color: #172520;
  background: #f9faf7;
  font: 600 .9rem/1.45 system-ui, sans-serif;
  pointer-events: none;
}
html.wt-in-pwa [data-wt-opening],
html.wt-in-pwa :where(main, article) a[href]:active {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}
html.wt-in-pwa .bottom[data-wt-leaving] [aria-current='page']:not([data-wt-opening]) {
  box-shadow: none;
  color: var(--muted);
}
html.wt-in-pwa .bottom [data-wt-opening] {
  outline: none;
  box-shadow: inset 0 -3px var(--accent);
  color: var(--accent);
  background: var(--tint);
}
html.wt-in-pwa .bottom [data-wt-opening]:focus-visible {
  outline: 3px solid var(--focus);
}
:root {
  --wt-safe-top: max(env(safe-area-inset-top, 0px), env(safe-area-max-inset-top, 0px));
  --wt-safe-right: max(env(safe-area-inset-right, 0px), env(safe-area-max-inset-right, 0px));
  --wt-safe-bottom: max(env(safe-area-inset-bottom, 0px), env(safe-area-max-inset-bottom, 0px));
  --wt-safe-left: max(env(safe-area-inset-left, 0px), env(safe-area-max-inset-left, 0px));
}
html.wt-in-pwa {
  scroll-padding-top: var(--wt-safe-top);
}
html.wt-in-pwa body {
  padding-top: var(--wt-safe-top);
}
html.wt-in-pwa #header-mobile .header-mobile-wrap {
  padding-left: var(--wt-safe-left);
  padding-right: var(--wt-safe-right);
}
/* Foxiz fixes these headers to the window when they become sticky. */
html.wt-in-pwa .sticky-on.is-mstick .sticky-holder,
html.wt-in-pwa .sticky-on .e-section-sticky,
html.wt-in-pwa #wpadminbar {
  top: var(--wt-safe-top);
}
