/* Decorative route accents stay outside the layout flow and never receive input. */
.pfa-draft-guide[data-route-scroll="contact"],
.pfa-recovery-note[data-route-scroll="recovery"],
.reading-guide__section[data-route-scroll="reading-section"] {
  position: relative;
}

.pfa-brand-group[data-route-scroll="brand-section"]::before {
  /* This sheet takes over the previous CSS-only accent on these sections. */
  animation: none !important;
}

.pfa-brand-hero-mark[data-route-scroll="brand-mark"] {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.pfa-brand-hero-mark[data-route-scroll="brand-mark"] img {
  position: relative;
  z-index: 1;
}

.pfa-brand-hero-mark[data-route-scroll="brand-mark"]::before,
.pfa-brand-hero-mark[data-route-scroll="brand-mark"]::after {
  position: absolute;
  z-index: 0;
  inline-size: 28%;
  block-size: clamp(6px, 1.4vw, 14px);
  border: 0 solid currentColor;
  content: "";
  pointer-events: none;
}

.pfa-brand-hero-mark[data-route-scroll="brand-mark"]::before {
  inset-block-start: 6px;
  inset-inline-start: 6px;
  border-block-start-width: 2px;
  border-inline-start-width: 2px;
  color: var(--crimson);
  transform-origin: left top;
}

.pfa-brand-hero-mark[data-route-scroll="brand-mark"]::after {
  inset-block-end: 6px;
  inset-inline-end: 6px;
  border-block-end-width: 2px;
  border-inline-end-width: 2px;
  color: var(--blue);
  transform-origin: right bottom;
}

.pfa-draft-guide[data-route-scroll="contact"]::before,
.pfa-recovery-note[data-route-scroll="recovery"]::before,
.reading-guide__section[data-route-scroll="reading-section"]::before {
  position: absolute;
  block-size: 3px;
  inset-inline: 0;
  inset-block-start: -1px;
  background: var(--crimson);
  content: "";
  pointer-events: none;
  transform-origin: left center;
}

.pfa-draft-guide[data-route-scroll="contact"]::before {
  inset-block-start: -3px;
  background: var(--blue);
}

.pfa-recovery-note[data-route-scroll="recovery"]::before {
  inset-block-start: 0;
}

.reading-guide__section[data-route-scroll="reading-section"]::before {
  block-size: 2px;
  opacity: .65;
}

@media (prefers-reduced-motion: no-preference) {
  html[data-pfa-route-motion] .pfa-brand-hero-mark[data-route-scroll="brand-mark"]::before {
    transform: scaleX(calc(.16 + var(--pfa-route-progress) * .84));
  }

  html[data-pfa-route-motion] .pfa-brand-hero-mark[data-route-scroll="brand-mark"]::after {
    transform: scaleX(calc(.34 + var(--pfa-route-progress) * .66));
  }

  html[data-pfa-route-motion] .pfa-brand-group[data-route-scroll="brand-section"]::before {
    transform: scaleX(calc(.16 + var(--pfa-route-progress) * .84));
    transform-origin: left center;
  }

  html[data-pfa-route-motion] .pfa-draft-guide[data-route-scroll="contact"]::before,
  html[data-pfa-route-motion] .pfa-recovery-note[data-route-scroll="recovery"]::before,
  html[data-pfa-route-motion] .reading-guide__section[data-route-scroll="reading-section"]::before {
    transform: scaleX(calc(.08 + var(--pfa-route-progress) * .92));
  }
}

@media print {
  [data-route-scroll]::before,
  [data-route-scroll]::after {
    display: none !important;
  }
}
