/* Caveat masks: a waiting stroke must not leave its round end caps on the page.
 * The gap is slightly longer than the normalized path, so neither endpoint is
 * painted while waiting. Per-stroke opacity also covers zero-length diacritics.
 */
.handwriting .ink {
  opacity: 1;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  animation: none;
}

.motion-ready .handwriting .ink {
  opacity: 0;
  stroke-dasharray: 1 1.05;
  stroke-dashoffset: 1.025;
}

.motion-ready .handwriting.is-visible .ink {
  animation: ink-write-clean var(--ink-duration, .14s) ease-out var(--ink-delay, 0s) both;
}

@keyframes ink-write-clean {
  0% {
    opacity: 0;
    stroke-dashoffset: 1.025;
  }
  2.5% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .handwriting .ink,
  .motion-ready .handwriting .ink {
    opacity: 1 !important;
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
}
