/* Initial Vue-page feedback must paint before any runtime or page bundle.
   Keep this framework-free loader aligned with the kit BrandSpinner. Vue
   removes the placeholder when it mounts; boot failures replace it as well. */
/* The page sheets that zero the body margin arrive with the bundles, so the page first
   painted with the browser's 8px margin and then shifted (replay a4037728). */
body {
  margin: 0;
}

.page-boot-loading {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--pl-space-12, 12px);
  min-height: 100dvh;
  margin: 0;
  padding: var(--pl-space-24, 24px);
  color: var(--pl-ink);
  background: var(--pl-paper-ground);
  font-family: var(--font-ui, Sora, sans-serif);
  font-size: var(--pl-type-body-size, 13.5px);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.page-boot-loading__spinner {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.page-boot-loading__spinner::before,
.page-boot-loading__spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  box-sizing: border-box;
}

.page-boot-loading__spinner::before {
  background: url('/assets/branding/planlined-mark.svg') center / 70% 70% no-repeat;
}

.page-boot-loading__spinner::after {
  border: 2px solid var(--cmf-visual-rule-strong, rgb(0 0 0 / 18%));
  border-top-color: var(--pl-ink);
  border-radius: 50%;
  animation: page-boot-brand-spin 800ms linear infinite;
}

/* Arriving from another Planlined page, keep that page's picture on screen
   until this one has drawn itself: page-boot.js adds .page-shown once the page
   has mounted. Without this the placeholder above flashed over the report the
   user was already looking at (11-11). After 1.2 s the placeholder shows
   anyway, so a slow page still says it is loading. Both pages must opt in;
   browsers without cross-document view transitions skip all of it. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  animation: page-boot-reveal 150ms ease-out 1.2s both;
  mix-blend-mode: normal;
}

:root.page-shown::view-transition-new(root) {
  animation: page-boot-reveal-now 150ms ease-out both;
}

@keyframes page-boot-reveal {
  from {
    opacity: 0;
  }
}

@keyframes page-boot-reveal-now {
  from {
    opacity: 0;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .page-boot-loading__spinner::after {
    animation: none;
  }

  :root.page-shown::view-transition-new(root) {
    animation-duration: 1ms;
  }
}
