@charset "UTF-8";

/**
 * columns.css 1.8.0
 * Author: hybrid.
 * Type: core
 *
 * One-line responsive flex layout.
 * Columns share available space equally by default (flex-grow: 1).
 * Stacks vertically on mobile (< 760px) — breakpoint responds to the
 * .columns container's own width (@container), not the viewport.
 * Extends alignment.css utilities in .columns context.
 * Container modifiers are wrapped in :where() — specificity stays at 0 for the .columns part.
 *
 * Classes
 * .columns                     — flex row, wraps, aligns top, full width
 * .columns.reversed            — flex-direction row-reverse
 * .columns > .reversed        — child swaps side compared to the DOM order, from 760px (first → last, other → first)
 * .columns.fit                 — gap: 0 (wins over .small / .large)
 * .columns.small               — smaller gap
 * .columns.large               — larger gap
 * .columns.items-middle        — align-items center (alignment.css)
 * .columns.items-bottom        — align-items flex-end (alignment.css)
 * .columns.items-stretch       — align-items stretch (alignment.css) + nested centering (see below)
 * .columns.has-gutter          — border on all children except last
 * .columns > *.has-gutter      — border on a single child, separating it from the previous sibling
 *
 * Child sizes
 * .min    — flex-grow: 0 (shrink to content)
 * .short  — flex-grow: 0.5 (half growth)
 * .large  — flex-grow: 2 (double growth)
 *
 * Column count
 * .columns[data-columns="2|3|4|5|6"] — caps columns per row on desktop
 * .columns.has-items-2|3|4|5|6       — class-based alternative to data-columns (--items-target from alignment.css)
 *
 * Limited width
 * .columns.is-limited > *           — limits ALL children width (no extra markup needed)
 * .columns.is-limited > .short      — short proportion
 * .columns.is-limited > .large      — large proportion
 * .columns > .is-limited-content > *          — caps a SINGLE child's inner content width, right-aligned by default
 * .columns > .is-limited-content.short > *
 * .columns > .is-limited-content.large > *
 *
 * Columnizer (independent multi-column text layout)
 * .columnizer                  — CSS multi-column text layout, data-columns="2" (default) / "3" / "4"
 * .columnizer .break           — forces a column break
 *
 * Sections
 * CONFIG     — sizes and gutters tokens
 * ANIMATIONS — none
 * COLUMNS    — base, sizes, modifiers, child sizes, alignment, responsive, limited, gutter, rows
 * COLUMNIZER — multi-column text layout
 *
 * Tokens
 * --column-min-width               flex-grow for .min children (default: 0)
 * --column-short-width             flex-grow for .short children (default: 0.5)
 * --column-large-width             flex-grow for .large children (default: 2)
 * --columns-min-width              min-width on desktop children (default: 15rem)
 * --columns-limited-default-width  max-width for default limited children (50%)
 * --columns-limited-short-width    derived from --column-short-width
 * --columns-limited-large-width    derived from --column-large-width
 * --columns-gap                    gap between columns
 * --columns-item-width             item width for data-columns / has-items-N
 * --columnizer-gap                 gap between text columns
 *
 * Dependencies
 * alignment.css                    — .is-stretch, .items-middle, .items-bottom, .items-stretch, --items-target (class → target)
 * --gutter-gap                     defined in layout.css
 * --stroke-width                   defined in reset.css
 * --content-spacing                defined in spacing.css
 *
 * Note
 * 760px is the module contract (stacked below, row above), kept in the core on purpose:
 * it follows the container width, so it already adapts to the context.
 * The stacked query uses the range syntax (width < 760px) so no fractional width falls
 * between the two queries.
 *
 * TODO
 * — @container for .columnizer — postponed: an element cannot query its own size
 *   with @container (column-count is set on .columnizer itself); would need a
 *   dedicated inner wrapper
 * — breakpoints as variables (needs SCSS or PostCSS — out of core scope)
 */



/* ================================================================================================== */
/* ============================================= CONFIG ============================================= */
/* ================================================================================================== */

/**
 * Global variables expected from the theme (not defined here):
 * --gutter-gap      — column gap and gutter padding
 * --stroke-width    — gutter border width
 * --content-spacing — columnizer gap
 *
 * Column-specific variables — override per project or per context selector.
 */


/* ============================== SIZES ============================== */

:root {
	--column-min-width: 0;
	--column-short-width: .5;
	--column-large-width: 2;

	--columns-min-width: 15rem;

	--columns-limited-default-width: 50%;
	--columns-limited-short-width: calc(var(--column-short-width) / (var(--column-short-width) + 1) * 100%);
	--columns-limited-large-width: calc(var(--column-large-width) / (var(--column-large-width) + 1) * 100%);
}

/* item width for N columns: --items-per-row and --columns-gap resolve on .columns itself */

.columns:where([data-columns], [class*='has-items-']) {
	--columns-item-width: calc((100% - (var(--items-per-row) - 1) * var(--columns-gap)) / var(--items-per-row));
}


/* ============================== GUTTERS ============================== */

:root {
	--columns-gap: var(--gutter-gap);
	--columnizer-gap: var(--content-spacing);
}



/* ====================================================================================================== */
/* ============================================= ANIMATIONS ============================================= */
/* ====================================================================================================== */



/* =================================================================================================== */
/* ============================================= COLUMNS ============================================= */
/* =================================================================================================== */


/* ============================== DEFAULT ============================== */

:where(.columns) {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	max-width: none;
	gap: var(--columns-gap);
	container-type: inline-size;
	container-name: columns;
}
.columns > * {
	margin: 0;
	list-style-type: none;
}


/* ============================== SIZES ============================== */

/* gap presets — declared before MODIFIERS so .fit wins */

:where(.columns).small { --columns-gap: calc(var(--gutter-gap) / 2); }
:where(.columns).large { --columns-gap: calc(var(--gutter-gap) * 2); }


/* ============================== MODIFIERS ============================== */

:where(.columns).reversed { flex-direction: row-reverse; }
:where(.columns).fit { --columns-gap: 0; }

/* child .reversed: swaps side compared to the DOM order, only when the columns are side by side */

@container columns (min-width: 760px) {
	.columns > .reversed:first-child { order: 1; }
	.columns > .reversed:not(:first-child) { order: -1; }
}


/* ============================== CHILD SIZES ============================== */

.columns > .min { flex-grow: var(--column-min-width); }
.columns > .short { flex-grow: var(--column-short-width); }
.columns > .large { flex-grow: var(--column-large-width); }


/* ============================== ALIGNMENT ============================== */

/* .is-stretch — stretch a single child regardless of the group's own alignment */
.columns > .is-stretch { align-self: stretch; }

/* Nested centering — centers a column's own content once that column is stretched */
.columns.items-middle.items-stretch > *,
.columns.items-stretch > .is-middle {
	display: flex;
	align-items: center;
}
.columns.items-stretch > .is-bottom {
	display: flex;
	align-items: flex-end;
}


/* ============================== RESPONSIVE ============================== */

@container columns (width < 760px) {
	.columns > * {
		flex-grow: 1;
		width: 100%;
	}
}

@container columns (min-width: 760px) {
	.columns > * {
		flex-grow: 1;
		flex-basis: 0;
		min-width: var(--columns-min-width);
	}
}


/* ============================== LIMITED ============================== */

@container columns (min-width: 760px) {
	.columns.is-limited > * { max-width: var(--columns-limited-default-width); }
	.columns.is-limited > .short { max-width: var(--columns-limited-short-width); }
	.columns.is-limited > .large { max-width: var(--columns-limited-large-width); }

	.columns > .is-limited-content > * {
		max-width: var(--columns-limited-default-width);
		margin-right: auto;
	}
	.columns > .is-limited-content.short > * { max-width: var(--columns-limited-short-width); }
	.columns > .is-limited-content.large > * { max-width: var(--columns-limited-large-width); }
	.columns > * + .is-limited-content > * {
		margin-left: auto;
		margin-right: 0;
	}
}


/* ============================== GUTTER ============================== */

@container columns (width < 760px) {
	.columns.has-gutter > *:not(:last-child) {
		border-bottom: solid var(--stroke-width);
		padding-bottom: var(--columns-gap);
	}
	.columns > *.has-gutter {
		border-top: solid var(--stroke-width);
		padding-top: var(--columns-gap);
	}
}
@container columns (min-width: 760px) {
	.columns.has-gutter > *:not(:last-child) {
		border-right: solid var(--stroke-width);
		padding-right: var(--columns-gap);
	}
	.columns.reversed.has-gutter > *:not(:last-child) {
		border-right: none;
		padding-right: 0;
		border-left: solid var(--stroke-width);
		padding-left: var(--columns-gap);
	}
	.columns > *.has-gutter {
		border-left: solid var(--stroke-width);
		padding-left: var(--columns-gap);
	}
	.columns.reversed > *.has-gutter {
		border-left: none;
		padding-left: 0;
		border-right: solid var(--stroke-width);
		padding-right: var(--columns-gap);
	}
}


/* ============================== ROWS ============================== */

/* Outside @container: a container query cannot style its own container,
   so --items-per-row must be set on .columns itself, unconditionally. */
.columns[data-columns='2'] { --items-per-row: 2; }
.columns[data-columns='3'] { --items-per-row: 3; }
.columns[data-columns='4'] { --items-per-row: 4; }
.columns[data-columns='5'] { --items-per-row: 5; }
.columns[data-columns='6'] { --items-per-row: 6; }
.columns[class*='has-items-'] { --items-per-row: var(--items-target, 1); }

@container columns (min-width: 760px) {
	.columns[data-columns] > *,
	.columns[class*='has-items-'] > * {
		flex-basis: var(--columns-item-width);
		max-width: var(--columns-item-width);
		min-width: 0;
	}
}



/* ====================================================================================================== */
/* ============================================= COLUMNIZER ============================================= */
/* ====================================================================================================== */

/* CSS multi-column text layout — data-columns="2" (default) / "3" / "4" */

/* ============================== DEFAULT ============================== */

.columnizer .break { break-before: always; }

@media (min-width: 760px) {
	.columnizer { --columnizer-columns: 2; }
	.columnizer {
		column-count: var(--columnizer-columns);
		column-gap: var(--columnizer-gap);
	}
}


/* ============================== ROWS ============================== */

@media (min-width: 1000px) {
	.columnizer[data-columns='3'] { --columnizer-columns: 3; }
	.columnizer[data-columns='4'] { --columnizer-columns: 4; }
}