/* XGene Stage 8 — additive production hardening. No page-family redesigns. */

:root {
	--xg-focus-ring: #7ad300;
	--xg-hardening-border: #b8c9dc;
}

/* Defensive sizing: media/graphics may scale down, never force page overflow. */
.xg-stage8-hardening :where(img, svg, video, canvas) {
	max-width: 100%;
}

.xg-stage8-hardening :where(img, video) {
	height: auto;
}

.xg-stage8-hardening :where(.xg-shell, .xg-mega-panel, .xg120-faq-hero__visual, .xg190-knowledge-hero__visual, .xg-media-hero__visual, .xg-editorial-cover__visual) {
	min-width: 0;
}

/* High-visibility keyboard focus without changing pointer presentation. */
.xg-stage8-hardening :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--xg-focus-ring) !important;
	outline-offset: 3px !important;
}

.xg-stage8-hardening :where(input, select, textarea):focus-visible {
	box-shadow: 0 0 0 4px rgba(10, 166, 166, 0.16);
}

/* Prevent long regulated-industry identifiers and URLs from escaping cards. */
.xg-stage8-hardening :where(.xg-prose-surface, .xg190-knowledge-body, .xg120-faq-answer__content, .xg-card, .xg-content-card, .xg-mega-card, .xg-site-footer) {
	overflow-wrap: anywhere;
	word-break: normal;
}

/* Minimum comfortable pointer targets for principal XGene controls only. */
.xg-stage8-hardening :where(.xg-button, .xg-reading-tools button, .xg190-save, [data-xg-navigator-open], [data-xg-navigator-close]) {
	min-height: 44px;
}

/* Keep dialogs/panels within the visual viewport on short laptop screens. */
.xg-stage8-hardening :where(.xg-navigator__dialog, .xg-library-panel) {
	max-height: min(88vh, 52rem);
	max-height: min(88dvh, 52rem);
}

/* Contrast hardening for secondary text over light surfaces. */
.xg-stage8-hardening :where(.xg-muted, small, .xg-card p, .xg-content-card p) {
	text-wrap: pretty;
}

@media (max-width: 1024px) {
	.xg-stage8-hardening :where(.xg120-faq-hero__grid, .xg190-knowledge-hero__grid, .xg-media-hero__grid, .xg-editorial-cover__grid) {
		min-width: 0;
	}

	.xg-stage8-hardening :where(.xg120-faq-hero__visual, .xg190-knowledge-hero__visual, .xg-media-hero__visual) {
		justify-self: stretch;
		width: 100%;
	}
}

@media (max-width: 767px) {
	.xg-stage8-hardening h1 {
		overflow-wrap: anywhere;
	}

	.xg-stage8-hardening :where(.xg-button-row, .xg-reading-tools) {
		max-width: 100%;
	}

	.xg-stage8-hardening :where(.xg-button, .xg-reading-tools button) {
		white-space: normal;
	}

	.xg-stage8-hardening table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

@media (prefers-contrast: more) {
	.xg-stage8-hardening :where(.xg-card, .xg-content-card, .xg-mega-card, .xg190-context-card, .xg120-faq-answer__rail, .xg120-faq-answer__content) {
		border-color: #6d8299 !important;
	}

	.xg-stage8-hardening :where(p, small, .xg-muted) {
		color: #24394f;
	}
}

@media (prefers-reduced-motion: reduce) {
	/* Decorative/semantic visuals retain their final information state. */
	.xg-stage8-hardening :where([data-xg-motion-section], [data-xg-animate-diagram], [data-xg-semantic-motion], .xg111-media-motion, .xg121-topic-motion) {
		transform: none !important;
		opacity: 1 !important;
	}
}

@media print {
	.xg-stage8-hardening :where(.xg-site-header, .xg-site-footer, .xg-reading-progress, .xg-editorial-reading-rail, .xg-reading-tools, .xg190-cta, [data-xg-navigator-open], .xg-stage-badge) {
		display: none !important;
	}

	.xg-stage8-hardening :where(.xg-shell, .xg-editorial-reading-layout, .xg-prose-surface) {
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		box-shadow: none !important;
	}
}
