/* Only the glyph moves. The link, its text and its hit area stay in place. */
[data-arrow] {
  display: inline-block;
  flex: none;
  --arrow-x: 0px;
  --arrow-y: 0px;
}
[data-arrow="right"] { --arrow-x: 5px; }
[data-arrow="left"] { --arrow-x: -5px; }
[data-arrow="down"] { --arrow-y: 4px; }
[data-arrow="up"] { --arrow-y: -4px; }
[data-arrow="up-right"] { --arrow-x: 4px; --arrow-y: -4px; }
[data-arrow="down-right"] { --arrow-x: 4px; --arrow-y: 4px; }

@media (prefers-reduced-motion: no-preference) {
  [data-arrow] {
    transition: transform 300ms cubic-bezier(.22,.61,.36,1);
  }
  :is(a[href], button:enabled):is(:focus-visible, :active) [data-arrow] {
    transform: translate(var(--arrow-x), var(--arrow-y));
  }
  @media (hover: hover) {
    :is(a[href], button:enabled):hover [data-arrow] {
      transform: translate(var(--arrow-x), var(--arrow-y));
    }
  }
}
