/**
 * Variant CSS: pricing--scalable-index-numbered-rows
 * Layer 2 — Path B pricing role (brief-bound, Element Count 6 / renders 5+, 2026-06-10).
 *
 * A longer price list presented as a numbered editorial INDEX: each row is led by
 * an oversized ordinal ("01"…"06") on the left, then the service name + a one-line
 * tagline, then the price on the right. A hairline rule between rows and the big
 * contents-page numerals give it a magazine "table of contents" feel — distinct
 * from rate-sheet-leaders (a dry stat sheet with dotted leaders) and from the
 * card-based pricing variants.
 *
 * Layout: the tier container is a stack; each row is an internal flex line
 * (index | body | price). The index is flex:none with a fixed width so it never
 * pushes the price off; the body takes the remaining space (flex:1, min-width:0)
 * so a long name wraps instead of overflowing; the price is flex:none. On narrow
 * screens the price drops below the body while the ordinal shrinks and stays put.
 *
 * KI-020: the index numeral is a foreground colour (accent / accent-into-ink mix),
 * never a bg-token used as text. A8/A9: the centred intro children get
 * margin-inline:auto so they cannot left-shift inside the full-width section.
 */

body.aibt-universal .universal-pricing--scalable-index-numbered-rows {
	background: var(--background);
	color: var(--text-primary);
}

/* ── Intro ─────────────────────────────────────────────────────── */
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__intro {
	margin: 0 auto var(--space-6) auto;
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-wide, 0.16em) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 auto var(--space-3) auto !important;
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows h2.universal-pricing__headline,
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 auto !important;
	max-width: 20ch;
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-lg) !important;
	line-height: var(--leading-relaxed, 1.6) !important;
	color: var(--text-secondary) !important;
	margin: var(--space-4) auto 0 auto !important;
	max-width: 56ch;
}

/* ── The index: a stack of hairline-separated rows ─────────────── */
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tiers {
	display: flex;
	flex-direction: column;
	/* Top hairline closes the list as a framed index. */
	border-block-start: 1px solid var(--divider-primary);
}

/* One row = index | body | price on a single nowrap flex line. */
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier {
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--space-4);
	padding: var(--space-4) 0;
	/* Hairline between rows. */
	border-block-end: 1px solid var(--divider-primary);
	transition: background-color var(--duration-fast) var(--ease-standard);
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier:hover {
	/* Subtle wash on the whole row — accent tinted into the page, not a bg-token. */
	background-color: color-mix(in srgb, var(--accent) 7%, transparent);
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier:focus-within {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* Oversized contents-page ordinal. Foreground colour (accent biased toward ink
   so it stays legible as a marker, never a bg-token → KI-020). flex:none with a
   fixed min-width so it never compresses or pushes the price off the line. */
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-index {
	flex: none;
	width: 3.2ch;
	margin: 0 !important;
	font-family: var(--font-display) !important;
	font-size: clamp(2rem, 4vw, 3rem) !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: -0.02em !important;
	color: color-mix(in srgb, var(--accent) 45%, var(--text-primary)) !important;
	font-variant-numeric: tabular-nums;
	text-align: left;
}

/* Body takes the slack; min-width:0 lets a long name wrap instead of overflowing. */
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows h3.universal-pricing__tier-name,
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-name {
	font-family: var(--font-display) !important;
	font-size: var(--text-lg) !important;
	font-weight: 600 !important;
	line-height: var(--leading-snug, 1.2) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-tagline {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	line-height: var(--leading-normal, 1.5) !important;
	color: var(--text-secondary) !important;
	margin: 0 !important;
}

/* Price — pinned right, flex:none so it owns its width. keep-all + normal wrap so
   a text price ("wycena indywidualna") breaks at the space, not mid-word against
   the base.css overflow-wrap floor. */
body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-price {
	flex: none;
	margin: 0 !important;
	font-family: var(--font-display) !important;
	font-size: clamp(1.2rem, 2.2vw, 1.6rem) !important;
	font-weight: 700 !important;
	line-height: 1.1 !important;
	letter-spacing: -0.01em !important;
	color: var(--text-primary) !important;
	text-align: right;
	font-variant-numeric: tabular-nums;
	overflow-wrap: normal;
	word-break: keep-all;
	max-width: 42%;
}

body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-price span {
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: 400;
	letter-spacing: 0;
	color: var(--text-muted);
}

/* ── Mobile: ordinal shrinks, price drops below the body ───────── */
@media (max-width: 560px) {
	body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier {
		/* Let the price wrap to its own line under the body. Keep the index inline. */
		flex-wrap: wrap;
		gap: var(--space-2) var(--space-3);
		align-items: baseline;
	}
	body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-index {
		/* Smaller marker so name + ordinal share the first line comfortably. */
		width: 2.4ch;
		font-size: var(--text-2xl, 1.6rem) !important;
	}
	body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-body {
		/* Force the price onto the next row: body fills the remainder of line 1. */
		flex: 1 1 60%;
	}
	body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier-price {
		/* Full-width line under the body, indented past the index. Use padding (inside a
		   border-box 100% basis) NOT a left margin — a 100%-wide element plus a left
		   margin overflows the row horizontally at 375px. */
		flex: 1 0 100%;
		max-width: 100%;
		box-sizing: border-box;
		padding-inline-start: calc(2.4ch + var(--space-3));
		margin: var(--space-1) 0 0 0 !important;
		text-align: left;
	}
	/* A5: drop the wide tracking on the uppercase kicker at narrow widths. */
	body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__kicker {
		letter-spacing: 0 !important;
	}
}

/* Respect reduced-motion. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-pricing--scalable-index-numbered-rows .universal-pricing__tier {
		transition: none;
	}
}
