/* Kingy accessibility and third-party hygiene — deliberately selector-scoped. */

/* WCAG AA repair for the failures reproduced on the homepage. */
.home-v2 .home-v2-youtube-proof__label,
.home-v2 #track .home-v2-band__cta,
.home-v2 #track .lrow .d {
	color: #b7310d !important;
}

.home-v2 #track .tagchip {
	background-color: #b7310d !important;
	color: #fff !important;
}

.home-v2 #catalogue .home-v2-band__cta {
	color: #08766c !important;
}

.home-v2 #catalogue .tagchip {
	background-color: #08766c !important;
	color: #fff !important;
}

/* Commercial template: blue eyebrow on the dark evidence section was 2.88:1. */
body.page-id-914998 .ks-section-dark .ks-eyebrow {
	color: #7fa2ff !important;
}

/*
 * The tall commercial form was skipped off-screen using a 620px intrinsic
 * placeholder, letting the footer overlap it on mobile. Keep this one form
 * in normal flow; all other commercial sections retain their optimization.
 */
@media (max-width: 680px) {
	body.page-id-914998 #sponsor-fit-form.kf-section {
		contain-intrinsic-size: auto !important;
		content-visibility: visible !important;
	}
}

/* Consistent, high-visibility keyboard focus without changing pointer states. */
:where(a, button, input, select, textarea, summary, iframe, [tabindex]):focus-visible {
	outline: 3px solid #0b63ce !important;
	outline-offset: 3px !important;
}

.ks-section-dark :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.ks-hero :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: #fff !important;
}

/* Preserve the existing layout while preventing document-level media overflow. */
:where(.entry-content, .kingy-ali-single, .ks-page) :where(img, video, iframe, embed, object, table) {
	max-width: 100%;
}

:where(.entry-content, .kingy-ali-single, .ks-page) :where(pre, code) {
	max-width: 100%;
}

:where(.entry-content, .kingy-ali-single, .ks-page) pre {
	overflow-x: auto;
	overscroll-behavior-inline: contain;
}

/* Consent-to-load controls inherit the form/card geometry instead of redesigning it. */
.kingy-third-party-activate {
	align-items: center;
	background: #16181a;
	border: 2px solid #16181a;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	min-height: 48px;
	padding: 11px 18px;
	text-align: center;
}

.kingy-brief-signup__form > .kingy-third-party-activate {
	margin: auto;
}

.kingy-brief-signup__form:has(> .kingy-third-party-activate) {
	display: grid;
	place-items: center;
}

.kingy-third-party-activate[aria-busy="true"] {
	cursor: wait;
	opacity: .72;
}

.studio-youtube-frame .kingy-third-party-activate--video {
	border-radius: 0;
	height: 100%;
	min-height: 220px;
	width: 100%;
}

/* The provider may expand height; Kingy owns width, focus and a usable minimum. */
.kingy-brief-signup__form iframe {
	max-width: 100% !important;
}

.kingy-brief-signup__form > .kingy-beehiiv-frame-host {
	width: 100%;
}

.kingy-brief-signup__form > .kingy-beehiiv-frame-host iframe {
	border: 0;
	min-height: 320px;
	width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html:focus-within {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		transition-delay: 0s !important;
	}
}
