/* ─────────────────────────────────────────────────────────────
   Chrome — ONE branded bar + accessible mobile menu.
   The corporate bar (#rmm-bar) is the only branded bar. The
   explorer toolbar below it is a utility strip: same page colour,
   no hairline, no backdrop. At ≤800px the company nav + CTA move
   into a disclosure panel owned by #rmm-menu-btn (44×44, labelled,
   aria-expanded, Escape closes). Loaded last, so it wins.
   The breakpoint is 800px, not 720px: the desktop row needs
   nav + gap + CTA + gutter ≈ 790px, so releasing it at 721 pushed
   the CTA 65px past the right edge (measured band 721–795).
   ───────────────────────────────────────────────────────────── */

/* ── Landmark shell: JS adopts the SPA shell into <main> ── */
#rmm-main {
	display: flex;
	flex-direction: column;
	order: 2;
	flex: 1 0 auto;
	min-width: 0;
}
#rmm-main > .header-container {
	order: 1;
}
#rmm-main > .rmm-page-head {
	order: 2;
}
/* Takes over from `body > .content[class]` once the shell is adopted. */
#rmm-main > .content[class] {
	order: 3;
	flex: 0 0 auto;
	height: auto;
	min-height: 0;
	background: var(--bg-deepest);
}

/* ── Page title — the page's single h1 ─────────────────────── */
.rmm-page-head {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: clamp(20px, 3vw, 32px) var(--gutter) 0;
}
.rmm-page-title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--text-primary);
}
.rmm-page-deck {
	margin: 8px 0 0;
	max-width: var(--measure);
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--text-tertiary);
}

/* ── One bar: the explorer strip is a toolbar, not a bar ───── */
.header-container {
	background: var(--bg-deepest);
	border-bottom: 0;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

/* ── Menu button (mobile only) ─────────────────────────────── */
.rmm-menu__btn {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex-direction: column;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	background: var(--bg-elevated);
	color: var(--text-primary);
	cursor: pointer;
}
.rmm-menu__btn:hover {
	border-color: var(--accent);
}
.rmm-menu__btn[aria-expanded="true"] {
	border-color: var(--accent);
	color: var(--accent);
}
.rmm-menu__bar {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

/* ── Panel: on desktop it dissolves into the bar row ───────── */
.rmm-menu {
	display: contents;
}

@media (max-width: 800px) {
	.rmm-bar__inner {
		position: relative;
		gap: 10px;
	}
	.rmm-bar .rmm-brand img {
		height: 16px;
	}
	.rmm-menu__btn {
		display: inline-flex;
		margin-left: auto;
	}
	.rmm-menu {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 240;
		flex-direction: column;
		gap: 0;
		padding: 6px var(--gutter) 14px;
		background: var(--bg-deepest);
		border-bottom: 1px solid var(--border);
		box-shadow: 0 28px 48px -28px #000;
	}
	.rmm-menu[data-open] {
		display: flex;
	}
	.rmm-menu .rmm-bar__nav {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
		margin-left: 0;
	}
	.rmm-menu .rmm-bar__nav a {
		height: auto;
		min-height: 44px;
		justify-content: flex-start;
		padding: 0 12px;
	}
	.rmm-menu .rmm-bar__cta {
		height: 44px;
		margin: 6px 0 0;
		padding: 0 14px;
		justify-content: center;
		font-size: 0.84rem;
	}
	/* Explorer grid: one column, and nothing inside a card may widen it. */
	#rmm-main > .content[class] {
		flex-direction: column;
	}
	#rmm-main > .content[class] > .left,
	#rmm-main > .content[class] > .center {
		width: 100%;
		min-width: 0;
	}
	.repo-grid[class] {
		grid-template-columns: minmax(0, 1fr);
	}
	.repo-card,
	.repo-card.compact {
		min-width: 0;
	}
	.headline-and-badges {
		min-width: 0;
	}
	.headline-and-badges .txt-body-l-semibold {
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	/* Utility strip: readable, not sticky, not another bar. */
	.header-container {
		position: static;
		height: auto;
	}
	/* The corporate CTA already carries this action. */
	.header-container .get-started {
		display: none;
	}
}

@media (max-width: 360px) {
	.rmm-badge {
		display: none;
	}
}
