.ahl-twl { text-align:var(--twl-align,left); font-size:var(--twl-size,inherit); line-height:1.3; }
.ahl-twl__stage { display:grid; }
.ahl-twl__measure,.ahl-twl__active { grid-area:1/1; min-width:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.ahl-twl__measure { visibility:hidden; pointer-events:none; padding-inline-end:.6em; }
.ahl-twl__active { opacity:1; transition:opacity var(--twl-fade,700ms) ease; }
.ahl-twl__active.is-fading { opacity:0; }
.ahl-twl__cursor { display:none; }
.ahl-twl.is-ready .ahl-twl__cursor { display:inline; animation:ahl-twl-blink 1s steps(1) infinite; }
.ahl-twl.is-paused .ahl-twl__cursor { animation-play-state:paused; }
.ahl-twl .ahl-twl__toggle { display:inline-block; margin-top:16px; padding:5px 0; border:0; border-radius:0; background:transparent; color:inherit; font-family:inherit; font-size:12px; line-height:1.4; text-decoration:underline; cursor:pointer; box-shadow:none; }
.ahl-twl .ahl-twl__toggle[hidden] { display:none; }
.ahl-twl__toggle:focus-visible { outline:2px solid currentColor; outline-offset:5px; }
.ahl-twl__accessible { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@keyframes ahl-twl-blink { 50% { opacity:0; } }
@media(max-width:600px) { .ahl-twl { font-size:var(--twl-mobile-size,var(--twl-size,inherit)); } }
@media(prefers-reduced-motion:reduce) {
  .ahl-twl__stage { display:block; }
  .ahl-twl__measure { display:block; visibility:visible; padding:0; margin-bottom:.5em; }
  .ahl-twl__active,.ahl-twl .ahl-twl__toggle { display:none; }
}

/* Fade reveal: the full text stays in place beneath a soft moving mask. */
.ahl-twl.has-fade-effect .ahl-twl__text { display:inline-block; max-width:100%; }
.ahl-twl__active.is-revealing .ahl-twl__text {
  animation:ahl-twl-reveal-fallback var(--twl-reveal,1400ms) linear both;
}
@supports ((mask-image:linear-gradient(to right,#000,transparent)) or (-webkit-mask-image:linear-gradient(to right,#000,transparent))) {
  .ahl-twl__active.is-revealing .ahl-twl__text {
    -webkit-mask-image:linear-gradient(to right,#000 40%,transparent 60%);
    mask-image:linear-gradient(to right,#000 40%,transparent 60%);
    -webkit-mask-size:250% 100%;
    mask-size:250% 100%;
    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
    animation-name:ahl-twl-reveal;
  }
}
.ahl-twl.is-suspended .ahl-twl__text,
.ahl-twl.is-suspended .ahl-twl__cursor { animation-play-state:paused; }
@keyframes ahl-twl-reveal {
  from { -webkit-mask-position:100% 0; mask-position:100% 0; }
  to { -webkit-mask-position:0% 0; mask-position:0% 0; }
}
@keyframes ahl-twl-reveal-fallback { from { opacity:0; } to { opacity:1; } }
