/*
 * PowerLand Design System — RDX-03 foundation candidate
 * Inert until explicitly enqueued behind the reviewed v2 feature flag.
 */

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) {
	color: var(--pl-color-text-primary);
	background-color: var(--pl-color-bg-canvas);
	font-family: var(--pl-font-family-sans);
	font-size: var(--pl-font-size-400);
	line-height: var(--pl-line-height-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]),
:where(.powerland-ui-v2, [data-powerland-ui="v2"]) *,
:where(.powerland-ui-v2, [data-powerland-ui="v2"]) *::before,
:where(.powerland-ui-v2, [data-powerland-ui="v2"]) *::after {
	box-sizing: border-box;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(h1, h2, h3, h4, h5, h6) {
	margin-block: 0 var(--pl-space-4);
	color: var(--pl-color-text-primary);
	font-weight: var(--pl-font-weight-extra-bold);
	line-height: var(--pl-line-height-heading);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) h1 {
	font-size: clamp(var(--pl-font-size-800), 4vw, var(--pl-font-size-display));
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) h2 {
	font-size: clamp(var(--pl-font-size-700), 3vw, var(--pl-font-size-900));
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) h3 {
	font-size: var(--pl-font-size-700);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) h4 {
	font-size: var(--pl-font-size-600);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(p, ul, ol, dl, figure, blockquote) {
	margin-block: 0 var(--pl-space-4);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(ul, ol) {
	padding-inline-start: var(--pl-space-6);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) a {
	color: var(--pl-color-link);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) a:hover {
	color: var(--pl-color-link-hover);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(button, input, select, textarea) {
	color: inherit;
	font: inherit;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(button, [type="button"], [type="submit"], [type="reset"]) {
	cursor: pointer;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(button, input, select, textarea, a):focus-visible {
	outline: 3px solid var(--pl-color-focus);
	outline-offset: 3px;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(img, svg, video, canvas) {
	display: block;
	max-inline-size: 100%;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) img {
	block-size: auto;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(table) {
	inline-size: 100%;
	border-collapse: collapse;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(code, kbd, samp, pre) {
	font-family: var(--pl-font-family-mono);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) :where(hr) {
	block-size: 1px;
	margin-block: var(--pl-space-8);
	border: 0;
	background: var(--pl-color-border-subtle);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) ::selection {
	color: var(--pl-color-text-on-brand);
	background: var(--pl-color-brand-primary);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) [hidden] {
	display: none !important;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) .pl-sr-only {
	position: absolute !important;
	inline-size: 1px !important;
	block-size: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) .pl-skip-link {
	position: fixed;
	inset-block-start: var(--pl-space-3);
	inset-inline-start: var(--pl-space-3);
	z-index: var(--pl-z-toast);
	padding: var(--pl-space-3) var(--pl-space-4);
	border-radius: var(--pl-radius-sm);
	color: var(--pl-color-text-on-brand);
	background: var(--pl-color-brand-primary);
	transform: translateY(-200%);
}

:where(.powerland-ui-v2, [data-powerland-ui="v2"]) .pl-skip-link:focus {
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	:where(.powerland-ui-v2, [data-powerland-ui="v2"]),
	:where(.powerland-ui-v2, [data-powerland-ui="v2"]) *,
	:where(.powerland-ui-v2, [data-powerland-ui="v2"]) *::before,
	:where(.powerland-ui-v2, [data-powerland-ui="v2"]) *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
