/**
 * OSHIDA — utilities.
 *
 * A short, fixed list. New utilities go through work package A1; sections use
 * their own BEM classes rather than growing this file.
 *
 * The screen-reader-only helper and the skip link live in `base/a11y.css`,
 * which `assets/asset-map.json` enqueues on every route.
 *
 * NOTE for A2: this file is NOT yet listed in `assets/asset-map.json`
 * `shared.css`. Add it after `assets/css/base/layout.css` or `.o-flow` will
 * never reach the browser.
 *
 * Owner: work package A1.
 */

/* --------------------------------------------------------------------------
 * Flow — vertical rhythm between siblings, owned by the parent so children
 * carry no margins of their own.
 * -------------------------------------------------------------------------- */

.o-flow > * + * {
	margin-block-start: var(--o-flow-space, var(--o-space-md));
}

.o-flow--tight {
	--o-flow-space: var(--o-space-2xs);
}

.o-flow--loose {
	--o-flow-space: var(--o-space-lg);
}

/* --------------------------------------------------------------------------
 * Small helpers
 * -------------------------------------------------------------------------- */

/* Decorative art: no pointer target, no text selection. Pair with
 * `aria-hidden="true"` in the markup — CSS cannot do that part. */
.o-decorative {
	pointer-events: none;
	user-select: none;
}

/* Text that must stay on one line even in a narrow RTL column. */
.o-nowrap {
	white-space: nowrap;
}

/* Wide content (tables, code, diagrams) scrolls inside itself so the page body
 * never scrolls along the inline axis. */
.o-scroll-x {
	overflow-x: auto;
	overscroll-behavior-inline: contain;
}

/* Trim the block-start margin the flow would otherwise put on a first child
 * that a template inserts conditionally. */
.o-flush-start {
	margin-block-start: 0;
}
