/* Global layout primitives — container, grid, section rhythm, utilities. */

.rrt-container {
	width: 100%;
	max-width: var(--rrt-container-max);
	margin-inline: auto;
	padding-inline: var(--rrt-container-pad-x);
}

.rrt-container--narrow {
	max-width: var(--rrt-container-narrow);
}

.rrt-section {
	padding-block: var(--rrt-section-pad-y);
}

.rrt-stack > * + * {
	margin-top: var(--rrt-space-lg);
}

.rrt-grid {
	display: grid;
	gap: var(--rrt-grid-gutter);
}

/* Auto-fit grids — min column widths are project defaults; tune per template if needed. */
.rrt-grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.rrt-grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}

.rrt-grid--4 {
	grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
}

.rrt-site-header {
	background: var(--rrt-color-bg);
}

.rrt-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--rrt-space-lg);
	padding-block: var(--rrt-space-md);
}

.rrt-site-header__brand {
	display: block;
	line-height: 0;
	text-decoration: none;
}

.rrt-site-header__logo {
	display: block;
	width: 3rem;
	height: 3rem;
}

.rrt-nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rrt-space-md) var(--rrt-space-lg);
	list-style: none;
	margin: 0;
	padding: 0;
}

.rrt-nav-list a {
	display: inline-flex;
	align-items: center;
	gap: var(--rrt-space-2xs);
	color: var(--rrt-color-text);
	font-weight: var(--rrt-font-weight-medium);
	text-decoration: none;
}

.rrt-nav-list a:hover,
.rrt-nav-list a:focus-visible {
	color: var(--rrt-color-text);
	text-decoration: underline;
	text-decoration-color: var(--rrt-color-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.rrt-site-footer {
	background: var(--rrt-color-bg);
	border-top: 1px solid var(--rrt-color-border);
	color: var(--rrt-color-text-muted);
}

.rrt-site-footer__inner {
	display: grid;
	grid-template-columns: auto minmax(0, var(--rrt-container-narrow));
	justify-content: start;
	align-items: start;
	column-gap: var(--rrt-space-lg);
	padding-block: var(--rrt-space-xl);
	text-align: left;
}

.rrt-site-footer__mark {
	display: block;
	line-height: 0;
	text-decoration: none;
}

.rrt-site-footer__logo {
	display: block;
	width: 3rem;
	height: 3rem;
}

.rrt-site-footer__about p {
	margin: 0;
	color: var(--rrt-color-text-muted);
	font-size: var(--rrt-fs-body-sm);
}

.rrt-site-footer__about p + p {
	margin-top: var(--rrt-space-sm);
}

.rrt-site-footer__about p.rrt-site-footer__copyright {
	margin-top: var(--rrt-space-md);
}

.rrt-tape {
	display: grid;
	gap: var(--rrt-space-xl);
}

.rrt-tape__image {
	display: block;
	width: 100%;
	height: auto;
}

.rrt-tape__credit {
	margin-top: var(--rrt-space-xs);
	color: var(--rrt-color-text-muted);
	font-size: var(--rrt-fs-small);
}

.rrt-tape__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rrt-space-sm);
	list-style: none;
	margin: var(--rrt-space-lg) 0 0;
	padding: 0;
}

.rrt-tape__tags a {
	display: inline-flex;
	align-items: center;
	gap: var(--rrt-space-2xs);
	color: var(--rrt-color-text);
	text-decoration: none;
}

.rrt-tape__tags a:hover,
.rrt-tape__tags a:focus-visible {
	color: var(--rrt-color-accent);
}

.rrt-site-header__nav svg {
	display: block;
	width: 1.75rem;
	height: 1.75rem;
	fill: currentColor;
}

@media (min-width: 60rem) {
	.rrt-tape {
		grid-template-columns: 1fr var(--rrt-tape-aside);
		align-items: start;
	}
}

.rrt-u-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
