/*
 * Frame: a box that keeps its proportions whatever size it is given.
 *
 * Photos, video embeds, maps, placeholders — anything that would otherwise letterbox, collapse, or
 * make one card in a row taller than its neighbours. Replaced content is cropped to fill the frame
 * rather than distorted.
 *
 * Knobs:
 * - `--sh-ratio` (default `1`) — the `aspect-ratio` of the frame, e.g. `16 / 9` or `9 / 16`.
 */

.frame {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--sh-ratio, 1);
	overflow: hidden;
}

.frame > :is(img, video, iframe, canvas, svg),
.frame > picture > img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}
