/* Click effect belongs only to the old, live page. Incoming pages are untouched. */

.s13-route-vhs,
.s13-route-vhs > i {
  position: fixed;
  inset: 0;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}
.s13-route-vhs { z-index: 2147483646; }
.s13-route-vhs-mono {
  -webkit-backdrop-filter: grayscale(1);
  backdrop-filter: grayscale(1);
  animation: s13-route-mono 900ms ease-in-out both;
}
.s13-route-vhs-grain {
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.28) 2px 3px, transparent 3px 4px);
  animation: s13-route-grain 900ms ease-in-out both;
}
.s13-route-vhs > .s13-route-vhs-scan {
  inset: -8vh 0 auto;
  height: 8vh;
  -webkit-backdrop-filter: grayscale(1) invert(.88) contrast(.9) brightness(.86);
  backdrop-filter: grayscale(1) invert(.88) contrast(.9) brightness(.86);
  -webkit-mask-image: linear-gradient(transparent, #000 40%, #000 60%, transparent);
  mask-image: linear-gradient(transparent, #000 40%, #000 60%, transparent);
  background: linear-gradient(transparent 47%, rgba(220,220,220,.18) 49%, rgba(0,0,0,.2) 51%, transparent 54%);
  animation: s13-route-scan 900ms linear both;
}
@keyframes s13-route-mono {
  0% { opacity: 0; }
  /* Scan/grain finish once; monochrome holds until document replacement. */
  14%, 100% { opacity: 1; }
}
@keyframes s13-route-grain {
  0%, 100% { opacity: 0; }
  18%, 72% { opacity: .18; }
}
@keyframes s13-route-scan {
  0% { transform: translateY(0); opacity: 0; }
  10%, 82% { opacity: .46; }
  100% { transform: translateY(108vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .s13-route-vhs { display: none; }
}
