/* A white veil avoids moving or resizing the page and header during navigation. */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: var(--brand-white, #fff);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease-in-out !important;
}

html.page-entering::after {
  opacity: 1;
  pointer-events: auto;
  transition: none !important;
}

html.page-leaving::after {
  opacity: 1;
  pointer-events: auto;
}

/* Keep the loading ring independent of page layout and the white veil. */
html::before {
  content: '';
  position: fixed;
  top: 50vh;
  top: 50dvh;
  left: 50vw;
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  margin: -28px 0 0 -28px;
  z-index: 2147483647;
  background: var(--brand-accent, #08ab65);
  -webkit-mask: url("../loading-ring.f3c506474372c3c5.svg") center / contain no-repeat;
  mask: url("../loading-ring.f3c506474372c3c5.svg") center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
  animation: page-loading-spin 800ms linear infinite paused;
  transition: opacity 120ms ease-out !important;
}

html.page-loading::before {
  opacity: 1;
  animation-play-state: running;
  transition: opacity 160ms ease-out !important;
}

@keyframes page-loading-spin {
  to { transform: rotate(360deg); }
}
