/*
 * Curt Scope accessibility and performance presentation foundation.
 *
 * This file owns browser-facing accessibility polish, reduced-motion handling,
 * print presentation, forced-colors support, and low-risk rendering defaults.
 * It does not own content, routing, analytics, SEO scoring, runtime state,
 * commerce behavior, social behavior, or builder behavior.
 */

:where(.curtscope-theme) :focus-visible {
	outline: 3px solid var(--cs-cyan);
	outline-offset: 4px;
	border-radius: 10px;
}

:where(.curtscope-theme) :target {
	scroll-margin-top: 112px;
}

:where(.curtscope-theme) .screen-reader-text,
:where(.curtscope-theme) .sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:where(.curtscope-theme) .screen-reader-text:focus,
:where(.curtscope-theme) .sr-only:focus {
	position: fixed !important;
	inset: 16px auto auto 16px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 16px;
	margin: 0;
	clip: auto;
	white-space: normal;
	background: var(--cs-blue);
	color: #fff;
	border-radius: 12px;
	box-shadow: var(--cs-shadow);
}

:where(.curtscope-theme) .curtscope-main :where(a:not(.curtscope-button):not(.curtscope-card__button)) {
	text-underline-offset: 0.18em;
}

:where(.curtscope-theme) .curtscope-main :where(p, li, dd) a:not(.curtscope-button):not(.curtscope-card__button) {
	text-decoration: underline;
	text-decoration-color: rgba(5, 199, 255, 0.45);
}

:where(.curtscope-theme) input,
:where(.curtscope-theme) select,
:where(.curtscope-theme) textarea,
:where(.curtscope-theme) button {
	font: inherit;
}

:where(.curtscope-theme) :where(input, select, textarea) {
	max-width: 100%;
}

:where(.curtscope-theme) :where(img, svg, video, canvas) {
	max-width: 100%;
}

:where(.curtscope-theme) img[width][height] {
	height: auto;
}

:where(.curtscope-theme) :where([hidden]) {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	:where(.curtscope-theme),
	:where(.curtscope-theme) *,
	:where(.curtscope-theme) *::before,
	:where(.curtscope-theme) *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media (prefers-contrast: more) {
	:where(.curtscope-theme) {
		--cs-border: rgba(190, 210, 255, 0.52);
		--cs-border-strong: rgba(210, 230, 255, 0.88);
		--cs-muted: #d6def5;
	}

	:where(.curtscope-theme) .curtscope-button,
	:where(.curtscope-theme) .curtscope-card__button,
	:where(.curtscope-theme) .curtscope-product-card,
	:where(.curtscope-theme) .curtscope-surface {
		border-color: var(--cs-border-strong);
	}
}

@media (forced-colors: active) {
	:where(.curtscope-theme) * {
		box-shadow: none !important;
		text-shadow: none !important;
	}

	:where(.curtscope-theme) :where(a, button, input, select, textarea) {
		forced-color-adjust: auto;
	}
}

@media print {
	:where(.curtscope-theme) {
		background: #fff !important;
		color: #000 !important;
	}

	:where(.curtscope-theme) .curtscope-header,
	:where(.curtscope-theme) .curtscope-footer,
	:where(.curtscope-theme) .curtscope-menu-toggle,
	:where(.curtscope-theme) .curtscope-header__actions,
	:where(.curtscope-theme) .curtscope-comments,
	:where(.curtscope-theme) .curtscope-final-cta {
		display: none !important;
	}

	:where(.curtscope-theme) .curtscope-shell,
	:where(.curtscope-theme) .curtscope-content-shell {
		width: 100% !important;
		max-width: none !important;
	}

	:where(.curtscope-theme) a[href]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
	}
}
