/* Sustainability site only (see inc/styles.php): its side-nav items are
 * long enough to stretch the nav past var(--nav-side-width), because
 * nav-links are nowrap and flex min-width defaults to auto. Wrap them
 * instead, at every viewport. */
.nav-sub-side {
	min-width: 0;
}

/* Looser line-height for wrapped items; 1.1 suits single lines only. */
.nav-sub-side .nav-link {
	white-space: normal;
	line-height: 1.35;
}

/* Keep the underline off the next wrapped line. */
.nav-sub-side .nav-item--level-1.current-menu-item .nav-link,
.nav-sub-side .nav-link:focus-visible,
.nav-sub-side .nav-link:hover {
	text-underline-offset: .25em;
}

/* Wider than the theme default so long items wrap less. */
body {
	--nav-side-width: 320px;
}

/* On wide screens keep the theme's gutter-fill sizing (content stays
 * centered), with 320px as the floor. */
@media screen and (min-width: 1320px) {
	body {
		--nav-side-width: max(320px, calc((100% - var(--theme-container-max-width)) / 2));
	}
}
