/* Full text is present before enhancement. This layer never hides its layout. */
.typewriter-enhanced .type-word {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  white-space: nowrap;
}

.typewriter-enhanced .type-original {
  opacity: 1;
}

.typewriter-enhanced .type-ink {
  position: absolute;
  top: 0;
  left: 0;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
  white-space: pre;
  pointer-events: none;
  user-select: none;
  clip-path: inset(0 100% 0 0);
}

.typewriter-enhanced[data-type-state="playing"] .type-original {
  opacity: .36;
}

@media (prefers-reduced-motion: reduce) {
  .typewriter-enhanced[data-type-state] .type-original {
    opacity: 1;
  }

  .typewriter-enhanced .type-ink {
    visibility: hidden;
  }
}
