/* The block style Numbered (`is-style-aieo-indexed`) on WooCommerce's Product Template and on Rooster One's category
 * chips (the multi-look demo, 22 Nov 2026; includes/class-aieo-list-index.php): one counter on the list's root, each
 * card or chip its place in the printed order. Its tokens are custom properties a look's sheet sets on the list or an
 * ancestor: the prefix, the numeral style, the suffix, the place (a kicker above the title, `block`, or before it on its
 * line, `inline`), the places before the first, the list's total (printed by the server as --aieo-index-total) with its
 * words and style, and the number's type, the title's own by default. No colour of its own. Loaded only where the style
 * renders. */
.is-style-aieo-indexed {
	counter-reset: aieo-index var(--aieo-index-offset, 0) aieo-index-total var(--aieo-index-total, 0);
}
.is-style-aieo-indexed > .wc-block-product,
.is-style-aieo-indexed .aieo-chip-fields__item {
	counter-increment: aieo-index;
}

/* Where the number sits: before a card's title, or on the part of the card that carries `aieo-index-here`; before a
 * chip's name, and first on a row's, a tag's and a key's line (before its colour). */
.is-style-aieo-indexed > .wc-block-product .wp-block-post-title::before,
.is-style-aieo-indexed > .wc-block-product .aieo-index-here::before,
.is-style-aieo-indexed .aieo-chip-fields__name::before,
.is-style-aieo-indexed:is(.aieo-chip-fields--rows, .aieo-chip-fields--tags, .aieo-chip-fields--keys) .aieo-chip-fields__item::before {
	content: var(--aieo-index-prefix, "") counter(aieo-index, var(--aieo-index-style, decimal-leading-zero)) var(--aieo-index-of, "") counter(aieo-index-total, var(--aieo-index-of-style, none)) var(--aieo-index-suffix, "");
	display: var(--aieo-index-place, block);
	margin-block-end: var(--aieo-index-gap, 0);
	color: var(--aieo-index-colour, inherit);
	font-family: var(--aieo-index-family, inherit);
	font-size: var(--aieo-index-size, 1em);
	font-weight: var(--aieo-index-weight, inherit);
	font-variant-numeric: tabular-nums;
	font-style: var(--aieo-index-slant, inherit);
	letter-spacing: var(--aieo-index-tracking, inherit);
	text-transform: var(--aieo-index-case, inherit);
}
/* Before the title on its line: the title's link flows as words (Rooster Zero draws it inline-block), so a long name
 * wraps after the number instead of leaving the number alone on its line. Where the browser reads a custom property in
 * a style query; elsewhere the link keeps its box. */
@container style(--aieo-index-place: inline) {
	.is-style-aieo-indexed > .wc-block-product .wp-block-post-title > a {
		display: inline;
	}
}
/* A card with a part that carries the number: none on its title. */
.is-style-aieo-indexed > .wc-block-product:has(.aieo-index-here) .wp-block-post-title::before {
	content: none;
}
/* A row's, a tag's and a key's number is its line's first part: none before its name. */
.is-style-aieo-indexed:is(.aieo-chip-fields--rows, .aieo-chip-fields--tags, .aieo-chip-fields--keys) .aieo-chip-fields__name::before {
	content: none;
}
/* Its own column, so the colours after it line up (Manfred's 36 px for i–viii; --aieo-index-width). */
.is-style-aieo-indexed:is(.aieo-chip-fields--rows, .aieo-chip-fields--tags, .aieo-chip-fields--keys) .aieo-chip-fields__item::before {
	flex: none;
	min-inline-size: var(--aieo-index-width, 1.75em);
	margin-block-end: 0;
}
