/* UX package "text". Owned by its package; see docs/superpowers/specs/2026-10-20-ux-komponenten-design.md. */

/* Word mask (assets/js/ux/text-mask.js). The boxes exist only until the rise ends. Negative margins cancel the
   padding, so each box takes the same room as its word, while the clip reaches past the ink on every side. */
.ux-mask__w { display: inline-block; vertical-align: top; overflow: hidden; margin: -.2em -.1em -.14em; }
.ux-mask__i { display: block; padding: .2em .1em .14em; }
.ux-mask--armed .ux-mask__i { transform: translateY(105%); }

/* Scramble (assets/js/ux/scramble.js): the hidden final label holds the width, the running letters lie on top. */
.ux-scramble { position: relative; display: inline-block; }
.ux-scramble__ghost { visibility: hidden; user-select: none; }
.ux-scramble__run { position: absolute; inset: 0; }

/* Keep the look of the wrapped text; two classes outrank the page's `.lines li span`. */
[data-mask] .ux-mask, [data-mask] .ux-mask span,
[data-scramble] .ux-scramble, [data-scramble] .ux-scramble span { font-size: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) { .ux-mask--armed .ux-mask__i { transform: none; } }
@media print {
  .ux-mask__w { overflow: visible; }
  .ux-mask--armed .ux-mask__i { transform: none; }
}
