/* Shared text-link states; button and menu controls keep their own styling. */
body :is(.swk-homepage-wrapper, .swk-article-wrapper, .swk-legal-wrapper, .swk-archive-wrapper) :is(
	.swk-home-guide-links a, .swk-home-text-link, .swk-ratgeber-topic-name a,
	.swk-post-title a, .swk-breadcrumb-item a, .swk-article-category,
	.swk-article-author a, .swk-toc a, .wp-block-table-of-contents a,
	.swk-toc-accordion-list a, .swk-toc-sidebar a, .swk-404-back a
) {
	text-decoration: var(--swk-link-decoration, none);
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
	transition: color var(--duration-fast) var(--ease-default);
}

.swk-post-title a:visited {
	color: inherit;
}

.swk-navbar a:is(.swk-navbar-link, .swk-navbar-dropdown-item, .swk-navbar-mobile-link):is(:focus, :active) {
	color: var(--swk-color-link-hover) !important;
}

/* Keep link feedback on card titles, rather than underlining the entire excerpt. */
:is(.swk-archive-card-link, .swk-related-card):is(:focus, :active) :is(.swk-archive-card-title, .swk-related-title) {
	color: var(--swk-color-link-hover);
	text-decoration: underline;
	text-underline-offset: 4px;
}

body :is(.swk-homepage-wrapper, .swk-article-wrapper, .swk-legal-wrapper, .swk-archive-wrapper) a:where(:not(
	.swk-btn, .swk-btn-primary, .swk-article-cta-button, .swk-faq-cta-button
)):is(:focus, :active),
.swk-home-guidance .swk-home-guide-links a:is(:focus, :active),
.swk-home-guidance .swk-home-text-link:is(:focus, :active),
.swk-home-guidance .swk-home-topics .swk-ratgeber-topic-name a:is(:focus, :active) {
	--swk-link-decoration: underline;
	color: var(--swk-color-link-hover);
}

body :is(.swk-homepage-wrapper, .swk-article-wrapper, .swk-legal-wrapper, .swk-archive-wrapper) a:where(:not(
	.swk-btn, .swk-btn-primary, .swk-article-cta-button, .swk-faq-cta-button
)):focus-visible {
	outline: 3px solid var(--swk-color-text-dark);
	outline-offset: 3px;
}

.swk-footer .swk-footer-link,
.swk-article-footer .swk-article-footer-links a {
	text-decoration: var(--swk-link-decoration, none);
	text-underline-offset: 4px;
}

.swk-footer .swk-footer-link:visited {
	color: var(--swk-color-border);
}

.swk-article-footer .swk-article-footer-links a:visited {
	color: #E8DDD0;
}

.swk-footer .swk-footer-link:is(:focus, :active),
.swk-article-footer .swk-article-footer-links a:is(:focus, :active) {
	--swk-link-decoration: underline;
	color: #FFFFFF;
}

.swk-footer .swk-footer-link:focus-visible,
.swk-article-footer .swk-article-footer-links a:focus-visible {
	outline: 3px solid #FFFFFF;
	outline-offset: 3px;
}

/* Replace the legacy animated underline and its important declarations. */
.swk-link-arrow::after {
	content: none;
}

.swk-link-arrow:is(:focus, :active) {
	color: var(--swk-color-link-hover) !important;
	text-decoration: underline !important;
}

@media (hover: hover) {
	.swk-navbar a:is(.swk-navbar-link, .swk-navbar-dropdown-item, .swk-navbar-mobile-link):hover {
		color: var(--swk-color-link-hover) !important;
	}

	body :is(.swk-homepage-wrapper, .swk-article-wrapper, .swk-legal-wrapper, .swk-archive-wrapper) a:where(:not(
		.swk-btn, .swk-btn-primary, .swk-article-cta-button, .swk-faq-cta-button
	)):hover,
	.swk-home-guidance .swk-home-guide-links a:hover,
	.swk-home-guidance .swk-home-text-link:hover,
	.swk-home-guidance .swk-home-topics .swk-ratgeber-topic-name a:hover {
		--swk-link-decoration: underline;
		color: var(--swk-color-link-hover);
	}

	:is(.swk-archive-card-link, .swk-related-card):hover :is(.swk-archive-card-title, .swk-related-title) {
		color: var(--swk-color-link-hover);
		text-decoration: underline;
		text-underline-offset: 4px;
	}

	.swk-footer .swk-footer-link:hover,
	.swk-article-footer .swk-article-footer-links a:hover {
		--swk-link-decoration: underline;
		color: #FFFFFF;
	}

	.swk-link-arrow:hover {
		color: var(--swk-color-link-hover) !important;
		text-decoration: underline !important;
	}
}
