/* Shared Nuvex text-link treatment: brand color, then a thin growing underline.
   A background underline lets long editorial links wrap naturally on mobile. */
body.sw-site :is(.entry-content, .sw-guide-faq__answer, .key-points, .fact-grid, .sw-article-author p) a[href]:not(:where(.button, .wp-element-button, .wp-block-button__link, .page-numbers, .post-page-numbers, .sw-photo-source, .sw-image-source, [role="button"])):not(:has(img, picture, svg, video)),
body.sw-site :is(a.text-link, a.sw-correction-link) {
    color: var(--sw-deep);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: left bottom;
    background-repeat: no-repeat;
    background-size: 0 1px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size .4s ease, color .4s ease;
}

body.sw-site :is(.entry-content, .sw-guide-faq__answer, .key-points, .fact-grid, .sw-article-author p) a[href]:not(:where(.button, .wp-element-button, .wp-block-button__link, .page-numbers, .post-page-numbers, .sw-photo-source, .sw-image-source, [role="button"])):not(:has(img, picture, svg, video)):is(:hover, :focus-visible),
body.sw-site :is(a.text-link, a.sw-correction-link):is(:hover, :focus-visible) {
    background-size: 100% 1px;
}

/* Controls and image credits do not receive prose underlines. */
body.sw-site .entry-content a:is(.button, .wp-element-button, .wp-block-button__link, .page-numbers, .post-page-numbers, .sw-photo-source, .sw-image-source, [role="button"]),
body.sw-site .entry-content a:has(img, picture, svg, video) {
    text-decoration: none;
}

/* Author links keep their established text color until interaction. */
body.sw-site :is(.byline, .sw-related-card__meta, .sw-guide-latest__byline) a:not(:where(.sw-article-spotlight a)) {
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: left bottom;
    background-repeat: no-repeat;
    background-size: 0 1px;
    transition: background-size .4s ease, color .4s ease;
}

body.sw-site :is(.byline, .sw-related-card__meta, .sw-guide-latest__byline) a:not(:where(.sw-article-spotlight a)):is(:hover, :focus-visible) {
    color: var(--sw-deep);
    background-size: 100% 1px;
}

/* Collection and story titles use the shared brand-gradient hover. */
body.sw-site :is(.section-title, .story-title, .brief-item h3, .mini-story h3, .sw-sidebar-copy h3, .sw-related-card h3, .related-callout, .sw-guide-latest h3) > a:is(:hover, :focus-visible) {
    background-image: var(--sw-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    body.sw-site :is(.entry-content, .sw-guide-faq__answer, .key-points, .fact-grid, .sw-article-author p, .byline, .sw-related-card__meta, .sw-guide-latest__byline) a,
    body.sw-site :is(a.text-link, a.sw-correction-link) {
        transition: none;
    }
}

@media print {
    body.sw-site :is(.entry-content, .sw-guide-faq__answer) a[href] {
        color: #000;
        background: none;
        text-decoration: underline;
    }
}
