/* Shared FLEURY link treatment, matching the Menu App's fixed colour reveal.
   The separate decoration leaves theme/card pseudo-elements and link layout intact. */
:root {
  --fa-link-gradient: linear-gradient(90deg, #ff8900, #ffd332, #1fa463, #5a3f93);
  --fa-link-fill-duration: 560ms;
}

.fa-link-hover-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.fa-link-hover-line {
  position: absolute;
  height: 4px;
  border-radius: 0;
  background: var(--fa-link-gradient);
  opacity: 1;
  clip-path: inset(0);
  animation: fa-link-colour-reveal var(--fa-link-fill-duration) linear both;
}

:is(a, button)[data-fa-link-hover-active],
:is(a, button)[data-fa-link-hover-active] :where(span, strong, em, b, i, u, h1, h2, h3, h4, h5, h6) {
  text-decoration-line: none !important;
}

/* Minimal Menu App slots hand their underline to this shared treatment.
   Their own underline remains available when this script is not active. */
.fm-menu[data-preset="minimal"] .fm-link[data-fa-link-hover-active]::after {
  content: none;
}

@keyframes fa-link-colour-reveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  18% { opacity: 1; }
  to { clip-path: inset(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .fa-link-hover-line { animation: none; }
}

@media (forced-colors: active) {
  .fa-link-hover-line { background: LinkText; forced-color-adjust: none; }
}

@media print {
  .fa-link-hover-layer { display: none; }
}
