/* ==========================================================================
   CURB VIBES - LAYOUT UTILITIES & SAFEGUARDS
   Width helpers for the approved column system, motion safeguards and
   small accessibility helpers.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLUMN SYSTEM (Doc 09 sections 12.2, 19.2; Handoff section 1)
   Backgrounds may span the viewport; content sits in these measures.
   Apply these classes to GenerateBlocks containers in later stages -
   they are the canonical widths, so patterns never hardcode pixel values.
   -------------------------------------------------------------------------- */

.cv-container {
	max-width: var(--cv-container);
	margin-inline: auto;
	padding-inline: var(--cv-gutter);
}

.cv-reading {
	max-width: var(--cv-reading-col);
	margin-inline: auto;
	padding-inline: var(--cv-gutter);
}

.cv-focused {
	max-width: var(--cv-focused-col);
	margin-inline: auto;
	padding-inline: var(--cv-gutter);
}

.cv-breakout {
	max-width: var(--cv-breakout);
	margin-inline: auto;
	padding-inline: var(--cv-gutter);
}

/* Media inside any column never overflows; aspect ratios are preserved. */
.cv-container img,
.cv-reading img,
.cv-focused img,
.cv-breakout img {
	max-width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
   2. REDUCED MOTION (Handoff section 6; Doc 09 section 21)
   No essential motion anywhere in the system; when the user asks for
   reduced motion, effectively disable all animation and smooth scrolling.
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   3. ACCESSIBILITY HELPERS
   GeneratePress supplies .screen-reader-text and the skip link; these
   helpers cover cases inside custom patterns.
   -------------------------------------------------------------------------- */

.cv-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Minimum touch target guard for small inline controls (Handoff section 6). */
.cv-touch-target {
	min-width: 44px;
	min-height: 44px;
}

/* --------------------------------------------------------------------------
   4. HORIZONTAL-SCROLL GUARD (Doc 09 sections 12.2, 21)
   Ordinary content must never scroll sideways. Wide elements that
   legitimately overflow on small screens (e.g. future chip rows) get an
   explicit scroll wrapper instead.
   -------------------------------------------------------------------------- */

.cv-scroll-x {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
