/* One text-underline rule for the public site and the editor. */
:where(
  nav > a, .language summary, .language a,
  main a:not(.project-image), .contact a, .contact-copy,
  .theme-toggle span, .archive-filters button,
  .admin-shell a,
  .admin-shell button:not(.admin-cover-select, .admin-cover-pin, .admin-cover-close, .admin-media-item, .admin-theme-toggle, .admin-mail-list button),
  .admin-theme-toggle span, .admin-mail-list button strong,
  .admin-media-item span, .admin-upload > span
) {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0 1px;
  text-decoration: none;
}
:where(
  nav > a, .language summary, .language a,
  main a:not(.project-image), .contact a, .contact-copy,
  .theme-toggle span, .archive-filters button,
  .admin-shell a,
  .admin-shell button:not(.admin-cover-select, .admin-cover-pin, .admin-cover-close, .admin-media-item, .admin-theme-toggle, .admin-mail-list button),
  .admin-theme-toggle span, .admin-mail-list button strong,
  .admin-media-item span, .admin-upload > span
):is(:hover, :focus-visible),
:is(nav > a, .language a, .admin-section-nav a)[aria-current="page"],
:is(.archive-filters, .admin-cover-presets, .admin-mail-addresses, .admin-media-folders) button:is([aria-pressed="true"], [aria-current="page"], .selected),
.admin-mail-list button:is(:hover, :focus-visible) strong,
.admin-media-item:is(:hover, :focus-visible) span,
.admin-upload:is(:hover, :focus-within) > span,
:is(.theme-toggle, .admin-theme-toggle):is(:hover, :focus-visible) span {
  background-size: 100% 1px;
}
@media (prefers-reduced-motion: no-preference) {
  :where(nav > a, .language summary, .language a,
    main a:not(.project-image), .contact a, .contact-copy,
    .theme-toggle span, .archive-filters button,
    .admin-shell a, .admin-shell button, .admin-theme-toggle span,
    .admin-mail-list button strong, .admin-media-item span, .admin-upload > span) {
    transition: background-size var(--underline-duration, 160ms) ease;
  }
}
