/* Text scramble: text-scramble.js wraps each character in .mw-scramble__c.
   While a character decodes it carries data-mw-g (the random glyph): the real
   character keeps its place with a transparent fill, so the line never changes
   width, and ::after paints the glyph centred over it. Without JavaScript and
   under reduced motion nothing here applies.
   --mw-scramble-color: glyph colour while decoding (default: the text colour;
     keep it at 4.5:1 on the background like any text).
   --mw-scramble-font: glyph font (default: the text's own). */

.mw-scramble__c[data-mw-g] {
  position: relative;
  -webkit-text-fill-color: transparent;
}

.mw-scramble__c[data-mw-g]::after {
  content: attr(data-mw-g);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--mw-scramble-color, currentColor);
  -webkit-text-fill-color: var(--mw-scramble-color, currentColor);
  font-family: var(--mw-scramble-font, inherit);
  line-height: normal;
  white-space: pre;
  pointer-events: none;
}
