/* Whisper Council Underline — zero-JS; a11y-first; scoped via .whisper-council or [data-whisper-council]
   - No motion/animation. Forced-colors/HC safe.
   - Keyboard focus visible.
   - Print: subtle dotted underline preserved. */

:root { --wc-ink: currentColor; --wc-alpha: 0.33; }

.whisper-council, [data-whisper-council] {
  text-decoration: none;
  background-image: linear-gradient(
    to bottom,
    rgba(0,0,0,0) calc(100% - 2px),
    color-mix(in srgb, var(--wc-ink) 100%, transparent) 0
  );
  background-size: 100% 1.2em;
  background-repeat: no-repeat;
  background-position: 0 1px;
  text-underline-offset: 2px; /* safe noop if unsupported */
}

/* A soft whisper accent with gentle double-thread */
.whisper-council u, [data-whisper-council] u,
.whisper-council .whisper, [data-whisper-council] .whisper {
  text-decoration: none;
  background-image:
    linear-gradient(var(--wc-ink), var(--wc-ink)) ,
    linear-gradient(var(--wc-ink), var(--wc-ink));
  background-size: 100% 1px, 100% 1px;
  background-repeat: no-repeat, no-repeat;
  background-position: 0 95%, 0 calc(95% - 3px);
  opacity: 0.92;
}

/* High-contrast / forced-colors: rely on currentColor underlines */
@media (forced-colors: active) {
  .whisper-council, [data-whisper-council] {
    background: none !important;
    text-decoration: underline;
  }
}

/* Focus ring visible and offset */
.whisper-council:focus, [data-whisper-council]:focus,
.whisper-council a:focus, [data-whisper-council] a:focus {
  outline: 2px solid color-mix(in srgb, var(--wc-ink) 60%, white 40%);
  outline-offset: 2px;
}

/* Print: preserve the effect using border-bottom */
@media print {
  .whisper-council, [data-whisper-council] {
    background: none !important;
    border-bottom: 1px dotted var(--wc-ink);
  }
}
