/* Inline links grow vertically so the words beside them retain their space. */
@media (hover:hover) and (pointer:fine) {
  :where(a[href]) { display:inline-block; max-width:100%; vertical-align:baseline; }
  :where(a[href]:hover) { text-decoration:underline; text-underline-offset:.18em; }
}

@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  :where(a[href], .pv-routes button:not(:disabled)) {
    --hover-scale:1 1.04;
    scale:1;
    transition:scale 160ms ease;
  }

  /* Keep new hover options out of guides and standalone IRS articles. */
  :where(:root:not(:has(meta[property="og:type"][content="article"]))) {
    :where(main .button[href], main .hm-button[href], main .ai-service[href]) {
      --hover-scale:1.02;
    }

    :where(main .intake-choices > a, main .rb-library-card, main .notice-grid .notice-tile[href]) {
      --hover-scale:1.012;
    }

    /* Cards that share borders use their existing hover color instead. */
    :where(main .service-grid .service-card[href], main .four-services .service-card[href]) {
      --hover-scale:1;
    }

    :where(main button:is(.finder-more, .finder-view-all, .library-search-go, .library-more-toggle):not(:disabled)) {
      scale:1;
      transition:scale 160ms ease;
    }

    :where(main button:is(.finder-more, .finder-view-all, .library-search-go, .library-more-toggle):not(:disabled)):hover {
      scale:1.02;
    }
  }

  :where(.hm-intro-actions .hm-button, .hm-intro-learn .hm-button, .pv-routes button:not(:disabled)) {
    --hover-scale:1.025;
  }
  :where(.hm-service-grid .hm-service, .hm-question-grid .hm-question) {
    --hover-scale:1.015;
  }

  :where(a[href], .pv-routes button:not(:disabled)):hover {
    scale:var(--hover-scale);
  }
}
