/* Trace the same strokes as the title wave without changing a link's advance width. */
:where(.chapter-nav, .lifecycle-nav, .sg-navigation) a > [data-en][data-zh] {
  position: relative;
  display: inline-block;
}
:where(.chapter-nav, .lifecycle-nav, .sg-navigation) a > [data-en][data-zh]::after {
  content: attr(data-en) / "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  white-space: inherit;
  -webkit-text-stroke: .042em currentColor;
  mask-image: linear-gradient(90deg, #000 43%, transparent 57%);
  mask-size: 245% 100%;
  mask-repeat: no-repeat;
  mask-position: 100% 0;
  transition: mask-position .42s cubic-bezier(.22,.61,.36,1);
}
html:lang(zh) :where(.chapter-nav, .lifecycle-nav, .sg-navigation) a > [data-en][data-zh]::after {
  content: attr(data-zh) / "";
}
@media (hover: hover) and (pointer: fine) {
  :where(.chapter-nav, .lifecycle-nav, .sg-navigation) a:hover > [data-en][data-zh]::after {
    mask-position: 0% 0;
  }
}
:where(.chapter-nav, .lifecycle-nav, .sg-navigation) a:focus-visible > [data-en][data-zh]::after {
  mask-position: 0% 0;
}
@media (prefers-reduced-motion: reduce) {
  :where(.chapter-nav, .lifecycle-nav, .sg-navigation) a > [data-en][data-zh]::after {
    transition: none;
  }
}
