/** Professional Standards — layout. */

/* Keeps the footer at the bottom on short pages without fixed heights. */
body {
	display: flex;
	flex-direction: column;
	min-block-size: 100vh;
	min-block-size: 100dvh;
}

.ps-main {
	flex: 1 0 auto;
	padding-block: var(--ps-space-xl);
}

/* Centered container: full width minus gutters, capped at the max width. */
.ps-container {
	inline-size: min(100% - (var(--ps-gutter) * 2), var(--ps-container));
	margin-inline: auto;
}

.ps-container--wide {
	inline-size: min(100% - (var(--ps-gutter) * 2), var(--ps-container-wide));
}

.ps-container--prose {
	inline-size: min(100% - (var(--ps-gutter) * 2), var(--ps-container-prose));
}

/* Vertical rhythm between siblings, independent of what the children are. */
.ps-flow > * + * {
	margin-block-start: var(--ps-flow-space, var(--ps-space-s));
}

/* Horizontal group that wraps naturally (nav items, buttons, tags). */
.ps-cluster {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ps-cluster-gap, var(--ps-space-s));
}

/* Responsive grid with no breakpoints: columns appear as space allows. */
.ps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ps-grid-min, 18rem)), 1fr));
	gap: var(--ps-grid-gap, var(--ps-space-m));
}

/* Long-form content keeps a readable measure. */
.ps-entry__content {
	max-inline-size: var(--ps-container-prose);
}
