/*! NSBM header and mega menu (eikra-child 1.3.0)
 *
 * Loaded after styles.css / nsbm-chrome.css and nsbm-bridge.css on every page with the new header.
 * Replaces the floating glass bar with a solid white bar, and the dropdowns with three-column mega panels:
 * section card | links with icons and grouped links | featured card.
 * The links come from the WordPress main menu (inc/nsbm/menus.php); every selector starts at the header
 * wrapper (.nsbm-ui.nsbm-chrome-head), so nothing here reaches page content.
 */

.nsbm-ui.nsbm-chrome-head {
	--mm-ink: var(--blue-950, #071e3a);
	--mm-text: var(--neutral-800, #273445);
	--mm-muted: var(--neutral-600, #4e5f74);
	--mm-subtle: var(--neutral-500, #6b7c91);
	--mm-line: var(--neutral-200, #dfe6ef);
	--mm-tint: var(--neutral-50, #f5f8fc);
	--mm-brand: var(--blue-700, #0a4a8c);
	--mm-brand-soft: var(--blue-50, #eef6ff);
	--mm-accent: var(--green-700, #126a41);
	--mm-accent-soft: var(--green-50, #edfbf2);
	--mm-raise: 0 1px 2px rgb(7 30 58 / 0.06), 0 0 0 1px var(--mm-line);
}

/* ---------------------------------------------------------------------------
 * 1. Bar: solid white, full width, sticky at the top of the window.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head .site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	margin: 0;
	padding: 0;
	/* !important: the site's Customizer "Additional CSS" has `.site-header { background-color: #002147 !important }`
	   for the old Eikra header, and our bar shares that class name; this keeps the bar colour under the theme's
	   control (section 9: white by default since 1.3.13, colour from Site Settings). The more specific selector wins between two !important rules. */
	background: var(--mm-bar, #fff) !important;
	border-bottom: 1px solid var(--mm-line);
	pointer-events: auto;
}

body.admin-bar.nsbm-chrome .nsbm-ui.nsbm-chrome-head .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	/* The admin bar scrolls away on small screens. */
	body.admin-bar.nsbm-chrome .nsbm-ui.nsbm-chrome-head .site-header {
		top: 0;
	}
}

.nsbm-ui.nsbm-chrome-head .glass-bar {
	min-height: 76px;
	gap: 20px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	isolation: auto;
}

.nsbm-ui.nsbm-chrome-head .glass-bar::after {
	content: none;
}

.nsbm-ui.nsbm-chrome-head .glass-bar .brand {
	padding: 0;
	background: none;
	box-shadow: none;
}

.nsbm-ui.nsbm-chrome-head .glass-bar .brand img {
	height: 48px;
}

/* ---------------------------------------------------------------------------
 * 2. Top-level links.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head .main-nav {
	justify-content: center;
	min-width: 0;
}

.nsbm-ui.nsbm-chrome-head .main-nav > ul {
	align-items: center;
	gap: 2px;
}

.nsbm-ui.nsbm-chrome-head .main-nav .nav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 42px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--mm-text);
	font: 500 0.96875rem/1 var(--font-sans);
	letter-spacing: 0;
	text-transform: none;
	text-shadow: none;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.nsbm-ui.nsbm-chrome-head .main-nav summary.nav-link::after {
	content: "";
	width: 6px;
	height: 6px;
	margin: -3px 0 0 2px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.7;
	transition: transform 0.2s;
}

.nsbm-ui.nsbm-chrome-head .main-nav .nav-link:hover {
	background: var(--mm-tint);
	color: var(--mm-ink);
}

.nsbm-ui.nsbm-chrome-head .main-nav details[open] > summary.nav-link {
	background: var(--mm-brand-soft);
	border-color: var(--blue-100, #d8eafe);
	color: var(--mm-brand);
}

.nsbm-ui.nsbm-chrome-head .main-nav details[open] > summary.nav-link::after {
	margin-top: 3px;
	transform: rotate(-135deg);
}

.nsbm-ui.nsbm-chrome-head .main-nav .is-current > .nav-link,
.nsbm-ui.nsbm-chrome-head .main-nav .is-current > details > .nav-link {
	color: var(--mm-brand);
	font-weight: 600;
}

.nsbm-ui.nsbm-chrome-head .main-nav .nav-link:focus-visible,
.nsbm-ui.nsbm-chrome-head .mega-panel a:focus-visible,
.nsbm-ui.nsbm-chrome-head .mobile-menu-panel :is(a, summary):focus-visible {
	outline: 2px solid var(--focus, #1fa463);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * 3. Mega panel (1.3.6): a drawer the width of the bar's container, attached under
 *    the bar with rounded lower corners; the page behind is dimmed.
 *    Photo card for the section | links with icon tiles (and grouped lists) | news cards.
 *    Layouts (header.php): "light" up to 5 links: one column of links, two cards;
 *    "full" more links or groups: two columns of links, one card.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head .mega-panel {
	position: absolute;
	z-index: 60;
	top: 100%;
	left: 0;
	right: 0;
	display: block;
	max-height: calc(100vh - 130px);
	max-height: calc(100dvh - 130px);
	overflow: auto;
	overscroll-behavior: contain;
	padding: 12px;
	border: 0;
	border-radius: 0 0 20px 20px;
	background: #fff;
	/* Drop shadow plus a page dim (the spread shadow), clipped so it never covers the bar above. */
	box-shadow: 0 28px 56px -20px rgb(0 23 47 / 0.45), 0 0 0 100vmax rgb(0 23 47 / 0.3);
	clip-path: inset(0 -100vmax -100vmax -100vmax);
	color: var(--mm-text);
	text-align: left;
}

.nsbm-ui.nsbm-chrome-head .mega[open] > .mega-panel {
	animation: nsbm-mega-in 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Movement only, no fade: an opacity animation on this large panel could be left part-way (seen in headless
   Chromium), which shows the page through the menu. The panel is always fully opaque. */
@keyframes nsbm-mega-in {
	from {
		transform: translateY(-4px);
	}
}

/* Eikra's <header id="masthead" class="site-header"> matches styles.css's `.site-header { view-transition-name }`
   too; two elements with one name cancel page transitions. Only the inner bar keeps the name. */
#masthead.site-header {
	view-transition-name: none;
	background: transparent !important; /* Same Additional CSS rule; the wrapper itself has no height. */
}

@media (prefers-reduced-motion: reduce) {
	.nsbm-ui.nsbm-chrome-head .mega[open] > .mega-panel {
		animation: none;
	}
}

.nsbm-ui.nsbm-chrome-head .mega-panel ul {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nsbm-ui.nsbm-chrome-head .mega-panel p {
	max-width: none;
	margin: 0;
}

.nsbm-ui.nsbm-chrome-head .mega-panel a {
	width: auto;
	min-height: 0;
	text-shadow: none;
}

/* Grid */
.nsbm-ui.nsbm-chrome-head .mega-grid {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 12px;
}

.nsbm-ui.nsbm-chrome-head .mega-grid--full.has-cards {
	grid-template-columns: 280px minmax(0, 1fr) 300px;
}

.nsbm-ui.nsbm-chrome-head .mega-grid--light.has-cards {
	grid-template-columns: 280px 300px minmax(0, 1fr);
}

@media (max-width: 1439px) {
	.nsbm-ui.nsbm-chrome-head .mega-grid {
		grid-template-columns: 250px minmax(0, 1fr);
	}

	.nsbm-ui.nsbm-chrome-head .mega-grid--full.has-cards {
		grid-template-columns: 250px minmax(0, 1fr) 270px;
	}

	.nsbm-ui.nsbm-chrome-head .mega-grid--light.has-cards {
		grid-template-columns: 250px 280px minmax(0, 1fr);
	}
}

/* Column 1: photo card for the section */
.nsbm-ui.nsbm-chrome-head .mega-intro {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 10px;
	min-height: 280px;
	padding: 24px 22px 22px;
	overflow: hidden;
	border-radius: 14px;
	background: #0a2d5a var(--mega-photo) center / cover no-repeat;
	color: #fff;
}

.nsbm-ui.nsbm-chrome-head .mega-intro::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgb(0 33 71 / 0.15) 0%, rgb(0 33 71 / 0.55) 40%, rgb(0 33 71 / 0.94) 100%);
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-intro-title {
	color: #fff;
	font: 700 1.5rem/1.15 var(--font-sans);
	letter-spacing: -0.01em;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-intro-title::before {
	content: "";
	display: block;
	width: 28px;
	height: 3px;
	margin-bottom: 12px;
	border-radius: 2px;
	background: var(--green-300, #70d8a0);
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-intro-text {
	color: rgb(255 255 255 / 0.86);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-more {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-top: 6px;
	padding: 10px 16px;
	border-radius: 10px;
	background: #fff;
	color: #002147;
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.15s;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-more:hover {
	background: var(--green-300, #70d8a0);
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-more:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Column 2: links with icon tiles */
.nsbm-ui.nsbm-chrome-head .mega-main {
	padding: 6px 4px;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-items {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2px;
}

.nsbm-ui.nsbm-chrome-head .mega-grid--full .mega-items,
.nsbm-ui.nsbm-chrome-head .mega-grid--light:not(.has-cards) .mega-items {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2px 12px;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-item {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 54px;
	padding: 8px 10px;
	border-radius: 12px;
	color: var(--mm-text);
	text-decoration: none;
	transition: background-color 0.15s;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-item:hover,
.nsbm-ui.nsbm-chrome-head .mega-panel .mega-item.is-current {
	background: var(--mm-tint);
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-item::after {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	margin-left: auto;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	color: var(--mm-subtle);
	opacity: 0;
	transform: translateX(-4px) rotate(45deg);
	transition: opacity 0.15s, transform 0.15s;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-item:hover::after {
	opacity: 1;
	transform: translateX(0) rotate(45deg);
}

.nsbm-ui.nsbm-chrome-head .mega-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #eaf1fa;
	color: #0a4a8c;
	transition: background-color 0.15s, color 0.15s;
}

.nsbm-ui.nsbm-chrome-head .mega-icon svg {
	width: 19px;
	height: 19px;
}

.nsbm-ui.nsbm-chrome-head .mega-item:hover .mega-icon,
.nsbm-ui.nsbm-chrome-head .mega-item.is-current .mega-icon {
	background: var(--green-100, #d3f5e0);
	color: var(--green-800, #125536);
}

.nsbm-ui.nsbm-chrome-head .mega-item-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nsbm-ui.nsbm-chrome-head .mega-item-title {
	color: var(--mm-ink);
	font-size: 0.96875rem;
	font-weight: 600;
	line-height: 1.3;
}

.nsbm-ui.nsbm-chrome-head .mega-item:hover .mega-item-title {
	color: var(--mm-brand);
}

.nsbm-ui.nsbm-chrome-head .mega-item-desc {
	color: var(--mm-muted);
	font-size: 0.84375rem;
	line-height: 1.45;
}

/* Grouped lists (e.g. Conferences, Journals) */
.nsbm-ui.nsbm-chrome-head .mega-items + .mega-groups {
	margin-top: 12px;
	padding-top: 16px;
	border-top: 1px solid var(--mm-line);
}

.nsbm-ui.nsbm-chrome-head .mega-groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 16px 24px;
	padding: 0 10px;
}

/* Small labels: sentence case, never capitals. */
.nsbm-ui.nsbm-chrome-head .mega-panel .mega-label {
	margin: 0 0 6px;
	color: var(--mm-subtle);
	font: 600 0.8125rem/1.3 var(--font-sans);
	letter-spacing: 0.02em;
	text-transform: none;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-label a {
	color: inherit;
	text-decoration: none;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-label a:hover {
	color: var(--mm-brand);
	text-decoration: underline;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-links a {
	display: block;
	padding: 5px 0;
	border-radius: 0;
	color: var(--mm-text);
	font-size: 0.90625rem;
	line-height: 1.4;
	text-decoration: none;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-links a:hover {
	color: var(--mm-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Column 3: news cards. The photo grows to fill the column, so there is no empty space under a card. */
.nsbm-ui.nsbm-chrome-head .mega-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}

.nsbm-ui.nsbm-chrome-head .mega-grid--light .mega-cards {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-height: 100%;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--mm-line);
	border-radius: 14px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.nsbm-ui.nsbm-chrome-head .mega-panel .mega-card:hover {
	border-color: transparent;
	box-shadow: 0 14px 30px -14px rgb(0 33 71 / 0.35), 0 0 0 1px var(--mm-line);
}

.nsbm-ui.nsbm-chrome-head .mega-card-media {
	position: relative;
	display: block;
	flex: 1 1 auto;
	width: 100%;
	min-height: 150px;
	overflow: hidden;
	background: var(--mm-accent-soft);
}

.nsbm-ui.nsbm-chrome-head .mega-card-media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.nsbm-ui.nsbm-chrome-head .mega-card:hover .mega-card-media img {
	transform: scale(1.04);
}

.nsbm-ui.nsbm-chrome-head .mega-card-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 16px;
}

.nsbm-ui.nsbm-chrome-head .mega-card-label {
	color: var(--green-700, #126a41);
	font-size: 0.8125rem;
	font-weight: 600;
}

.nsbm-ui.nsbm-chrome-head .mega-card-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--mm-ink);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
}

.nsbm-ui.nsbm-chrome-head .mega-card:hover .mega-card-title {
	color: var(--mm-brand);
}

.nsbm-ui.nsbm-chrome-head .mega-card-text {
	color: var(--mm-muted);
	font-size: 0.875rem;
	line-height: 1.5;
}

.nsbm-ui.nsbm-chrome-head .mega-card-more {
	margin-top: auto;
	padding-top: 8px;
	color: var(--green-700, #126a41);
	font-size: 0.875rem;
	font-weight: 700;
}

/* A card without a photo: a tinted text card, the words set larger. */
.nsbm-ui.nsbm-chrome-head .mega-panel .mega-card.is-text {
	border-color: transparent;
	background:
		radial-gradient(80% 70% at 100% 0%, rgb(112 216 160 / 0.35), transparent 70%),
		#eef7f1;
}

.nsbm-ui.nsbm-chrome-head .mega-card.is-text .mega-card-body {
	flex: 1;
	justify-content: flex-end;
	gap: 10px;
	padding: 22px;
}

.nsbm-ui.nsbm-chrome-head .mega-card.is-text .mega-card-title {
	-webkit-line-clamp: 3;
	font-size: 1.25rem;
	line-height: 1.3;
}

.nsbm-ui.nsbm-chrome-head .mega-card.is-text .mega-card-more {
	margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.nsbm-ui.nsbm-chrome-head .mega-card:hover .mega-card-media img {
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * 4. Search and Apply.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head .header-actions {
	gap: 10px;
}

.nsbm-ui.nsbm-chrome-head .search-link {
	min-width: 44px;
	justify-content: center;
	padding: 0 12px;
	border-color: var(--mm-line);
	border-radius: 12px;
	background: #fff;
	color: var(--mm-text);
}

.nsbm-ui.nsbm-chrome-head .search-link:hover {
	border-color: var(--mm-brand);
	color: var(--mm-brand);
}

.nsbm-ui.nsbm-chrome-head .search-link .label {
	display: none;
}

@media (min-width: 1500px) {
	.nsbm-ui.nsbm-chrome-head .search-link .label {
		display: inline;
	}
}

.nsbm-ui.nsbm-chrome-head .glass-bar .btn--small {
	box-shadow: none;
}

/* ---------------------------------------------------------------------------
 * 5. Width: the full menu from 1280px; below that the Menu button.
 * ------------------------------------------------------------------------ */
@media (max-width: 1279px) {
	.nsbm-ui.nsbm-chrome-head .main-nav {
		display: none;
	}

	.nsbm-ui.nsbm-chrome-head .mobile-menu {
		display: block;
	}

	.nsbm-ui.nsbm-chrome-head .glass-bar {
		min-height: 68px;
	}

	.nsbm-ui.nsbm-chrome-head .glass-bar .brand img {
		height: 42px;
	}
}

@media (min-width: 1280px) and (max-width: 1439px) {
	.nsbm-ui.nsbm-chrome-head .main-nav .nav-link {
		padding: 0 9px;
		font-size: 0.9375rem;
	}

	.nsbm-ui.nsbm-chrome-head .glass-bar {
		gap: 12px;
	}

	.nsbm-ui.nsbm-chrome-head .glass-bar .brand img {
		height: 44px;
	}
}

/* ---------------------------------------------------------------------------
 * 6. Small screens: Menu button and an accordion panel.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head .mobile-menu > summary {
	border-color: var(--mm-line);
	border-radius: 12px;
	background: #fff;
	color: var(--mm-ink);
	font-weight: 600;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu[open] > summary {
	background: var(--mm-brand-soft);
	border-color: var(--blue-100, #d8eafe);
	color: var(--mm-brand);
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel {
	top: calc(100% + 8px);
	padding: 8px 16px 16px;
	border-color: var(--mm-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 56px -16px rgb(7 30 58 / 0.25), 0 4px 12px rgb(7 30 58 / 0.06);
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-nav {
	margin: 0;
	padding: 0;
}

.nsbm-ui.nsbm-chrome-head .m-nav > li {
	border-bottom: 1px solid var(--mm-line);
}

.nsbm-ui.nsbm-chrome-head .m-nav > li:last-child {
	border-bottom: 0;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-nav > li > .m-link,
.nsbm-ui.nsbm-chrome-head .m-group > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	padding: 0 4px;
	color: var(--mm-ink);
	font-size: 1.0625rem;
	font-weight: 600;
	text-decoration: none;
	list-style: none;
	cursor: pointer;
}

.nsbm-ui.nsbm-chrome-head .m-group > summary::-webkit-details-marker {
	display: none;
}

.nsbm-ui.nsbm-chrome-head .m-group > summary::after {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	margin: -4px 6px 0 12px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s;
}

.nsbm-ui.nsbm-chrome-head .m-group[open] > summary {
	color: var(--mm-brand);
}

.nsbm-ui.nsbm-chrome-head .m-group[open] > summary::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.nsbm-ui.nsbm-chrome-head .m-body {
	padding: 0 0 14px;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-overview {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 4px;
	color: var(--mm-brand);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-items {
	margin: 0;
	padding: 0;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-items a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 4px;
	border-radius: 10px;
	color: var(--mm-text);
	font-size: 1rem;
	text-decoration: none;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-items a:active {
	background: var(--mm-tint);
}

.nsbm-ui.nsbm-chrome-head .m-items .mega-icon {
	width: 34px;
	height: 34px;
	border-radius: 9px;
}

.nsbm-ui.nsbm-chrome-head .m-items .mega-icon svg {
	width: 18px;
	height: 18px;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-items--plain a {
	min-height: 44px;
	padding-left: 50px;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-label {
	margin: 12px 0 2px;
	padding: 0 4px 0 50px;
	color: var(--mm-subtle);
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: none;
}

.nsbm-ui.nsbm-chrome-head .mobile-menu-panel .m-label a {
	color: inherit;
}

/* ---------------------------------------------------------------------------
 * 7. Windows High Contrast / forced colours: keep panel and card edges visible.
 * ------------------------------------------------------------------------ */
@media (forced-colors: active) {
	.nsbm-ui.nsbm-chrome-head .mega-panel,
	.nsbm-ui.nsbm-chrome-head .mega-intro-card,
	.nsbm-ui.nsbm-chrome-head .mega-card,
	.nsbm-ui.nsbm-chrome-head .mega-icon {
		border: 1px solid CanvasText;
	}
}

/* ---------------------------------------------------------------------------
 * 8. Short sections (one or two links, no groups): a narrow dropdown under the
 *    menu name: a short photo header and the links, no news cards.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head .main-nav li.is-compact {
	position: relative;
}

.nsbm-ui.nsbm-chrome-head .main-nav li.is-compact .mega-panel {
	left: 0;
	right: auto;
	width: 340px;
	padding: 10px;
}

.nsbm-ui.nsbm-chrome-head .main-nav li.is-compact .mega-grid {
	grid-template-columns: minmax(0, 1fr);
	gap: 6px;
}

.nsbm-ui.nsbm-chrome-head .main-nav li.is-compact .mega-intro {
	min-height: 120px;
	padding: 18px;
}

.nsbm-ui.nsbm-chrome-head .main-nav li.is-compact .mega-intro-title {
	font-size: 1.25rem;
}

.nsbm-ui.nsbm-chrome-head .main-nav li.is-compact .mega-main {
	padding: 0;
}

/* Phone accordion rows: not the rounded Menu-button style that `.mobile-menu summary` gives every summary inside. */
.nsbm-ui.nsbm-chrome-head .mobile-menu .m-group > summary {
	width: 100%;
	min-width: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

/* ---------------------------------------------------------------------------
 * 9. Bar colours (1.3.13): white bar with dark navy menu names by default. Both colours
 *    come from NSBM Site Settings → Header (colour pickers; inc/nsbm/menus.php prints them
 *    as --mm-bar / --mm-on-bar on this element). Every tint below is mixed from those two,
 *    so any pair of colours works. The logo plate is off by default (Settings: "Logo
 *    background"), useful only on a dark bar. The dropdown panels stay white.
 *    Contrast: #002147 on #fff is 15.9:1; white on the green Apply button (#168550) 4.6:1.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head {
	--mm-bar: #fff;
	--mm-on-bar: #002147;
	--mm-on-bar-soft: color-mix(in srgb, var(--mm-on-bar) 86%, var(--mm-bar));
	--mm-bar-line: color-mix(in srgb, var(--mm-on-bar) 12%, transparent);
	--mm-bar-tint: color-mix(in srgb, var(--mm-on-bar) 7%, transparent);
	--mm-bar-mark: #168550;
}

.nsbm-ui.nsbm-chrome-head .site-header {
	border-bottom: 1px solid var(--mm-bar-line);
	box-shadow: 0 8px 24px -18px rgb(0 23 47 / 0.45);
}

/* Top strip above the bar (social icons, phone, Student, Register): NSBM deep navy with white text, as before
   1.3.13. Its own colours from Site Settings → Header → Top strip (--mm-top, --mm-on-top, --mm-top-accent). */
.nsbm-ui.nsbm-chrome-head {
	--mm-top: #00172f;
	--mm-on-top: #ffffff;
	--mm-top-accent: #70d8a0;
}

.nsbm-ui.nsbm-chrome-head .utility {
	/* The header wrapper (Eikra's #masthead) has pointer-events: none on staging, so the links in this strip took
	   no clicks (1.3.14). The bar below restores them in section 1; the strip needs the same. */
	pointer-events: auto;
	border-bottom: 1px solid color-mix(in srgb, var(--mm-on-top) 16%, transparent);
	background: var(--mm-top);
}

.nsbm-ui.nsbm-chrome-head .utility a {
	color: color-mix(in srgb, var(--mm-on-top) 82%, var(--mm-top));
}

.nsbm-ui.nsbm-chrome-head .utility a:hover {
	color: var(--mm-on-top);
}

.nsbm-ui.nsbm-chrome-head .utility .social a:hover {
	background: color-mix(in srgb, var(--mm-on-top) 10%, transparent);
	color: var(--mm-on-top);
}

.nsbm-ui.nsbm-chrome-head .utility .register a {
	color: var(--mm-top-accent);
	font-weight: 700;
}

.nsbm-ui.nsbm-chrome-head .utility a:focus-visible {
	outline: 2px solid var(--mm-top-accent);
	outline-offset: -2px;
}

/* Logo: no plate on the bar by default. */
.nsbm-ui.nsbm-chrome-head .glass-bar .brand {
	display: inline-flex;
	align-items: center;
	flex: none;
	padding: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.nsbm-ui.nsbm-chrome-head .glass-bar .brand img {
	height: 52px;
}

/* Optional white plate behind the logo, for a dark bar colour. */
.nsbm-ui.nsbm-chrome-head.has-logo-plate .glass-bar .brand {
	padding: 7px 14px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 10px -2px rgb(0 0 0 / 0.35);
}

.nsbm-ui.nsbm-chrome-head.has-logo-plate .glass-bar .brand img {
	height: 46px;
}

/* Menu names */
.nsbm-ui.nsbm-chrome-head .main-nav .nav-link {
	color: var(--mm-on-bar);
}

.nsbm-ui.nsbm-chrome-head .main-nav .nav-link:hover {
	background: var(--mm-bar-tint);
	color: var(--mm-on-bar);
}

.nsbm-ui.nsbm-chrome-head .main-nav details[open] > summary.nav-link {
	border-color: var(--mm-bar-line);
	background: var(--mm-bar-tint);
	color: var(--mm-on-bar);
}

.nsbm-ui.nsbm-chrome-head .main-nav .is-current > .nav-link,
.nsbm-ui.nsbm-chrome-head .main-nav .is-current > details > .nav-link {
	color: var(--mm-on-bar);
	box-shadow: inset 0 -2px 0 var(--mm-bar-mark);
}

.nsbm-ui.nsbm-chrome-head .main-nav .nav-link:focus-visible,
.nsbm-ui.nsbm-chrome-head .search-link:focus-visible,
.nsbm-ui.nsbm-chrome-head .glass-bar .btn--small:focus-visible,
.nsbm-ui.nsbm-chrome-head .mobile-menu > summary:focus-visible {
	outline: 2px solid var(--mm-bar-mark);
	outline-offset: 2px;
}

/* Search and Apply */
.nsbm-ui.nsbm-chrome-head .search-link {
	border: 1px solid color-mix(in srgb, var(--mm-on-bar) 28%, transparent);
	background: transparent;
	color: var(--mm-on-bar);
}

.nsbm-ui.nsbm-chrome-head .search-link:hover {
	border-color: var(--mm-on-bar);
	background: var(--mm-bar-tint);
	color: var(--mm-on-bar);
}

.nsbm-ui.nsbm-chrome-head .glass-bar .btn--small {
	border-color: var(--green-600, #168550);
	background: var(--green-600, #168550);
	color: #fff;
}

.nsbm-ui.nsbm-chrome-head .glass-bar .btn--small:hover {
	border-color: var(--green-700, #126a41);
	background: var(--green-700, #126a41);
	color: #fff;
}

/* Menu button below 1280px */
.nsbm-ui.nsbm-chrome-head .mobile-menu > summary {
	border-color: color-mix(in srgb, var(--mm-on-bar) 28%, transparent);
	background: transparent;
	color: var(--mm-on-bar);
}

.nsbm-ui.nsbm-chrome-head .mobile-menu[open] > summary {
	border-color: var(--mm-on-bar);
	background: var(--mm-bar-tint);
	color: var(--mm-on-bar);
}

@media (max-width: 1279px) {
	.nsbm-ui.nsbm-chrome-head .glass-bar .brand img {
		height: 42px;
	}

	.nsbm-ui.nsbm-chrome-head.has-logo-plate .glass-bar .brand {
		padding: 6px 12px;
	}

	.nsbm-ui.nsbm-chrome-head.has-logo-plate .glass-bar .brand img {
		height: 38px;
	}
}

@media (forced-colors: active) {
	.nsbm-ui.nsbm-chrome-head.has-logo-plate .glass-bar .brand {
		border: 1px solid CanvasText;
	}
}

/* ---------------------------------------------------------------------------
 * 10. Menu names fill the bar's height, so the open section is marked by a green
 *     line on the bar's bottom edge, right where the panel starts.
 * ------------------------------------------------------------------------ */
@media (min-width: 1280px) {
	.nsbm-ui.nsbm-chrome-head .main-nav > ul {
		align-self: stretch;
		align-items: stretch;
		gap: 0;
	}

	.nsbm-ui.nsbm-chrome-head .main-nav .nav-item,
	.nsbm-ui.nsbm-chrome-head .main-nav .nav-item > details {
		display: flex;
	}

	.nsbm-ui.nsbm-chrome-head .main-nav .nav-link {
		min-height: 76px;
		padding: 0 14px;
		border: 0;
		border-radius: 0;
	}

	.nsbm-ui.nsbm-chrome-head .main-nav details[open] > summary.nav-link {
		border: 0;
		background: var(--mm-bar-tint);
		box-shadow: inset 0 -3px 0 var(--mm-bar-mark);
	}

	.nsbm-ui.nsbm-chrome-head .main-nav .nav-link:focus-visible {
		outline-offset: -4px;
	}
}

@media (min-width: 1280px) and (max-width: 1439px) {
	.nsbm-ui.nsbm-chrome-head .main-nav .nav-link {
		padding: 0 10px;
	}
}

/* ---------------------------------------------------------------------------
 * 11. One container width on every page (1.3.6). Inner pages also load the parent
 *     theme's Bootstrap, whose `.container { max-width: 1140px; padding: 0 15px }`
 *     made the bar 1140px wide there: the menu did not fit and ran over the logo
 *     and the Search button. The homepage was 1360px.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-head .container {
	width: min(100% - 2 * clamp(16px, 2.5vw, 36px), 1360px);
	max-width: none;
	margin-inline: auto;
	padding-inline: 0;
}

/* ---------------------------------------------------------------------------
 * 12. Faculty of Computing pages (1.3.10): the site header scrolls away with the page and
 *     the Faculty menu stays pinned at the top instead (foc-integration.css section 3);
 *     back at the top, both show. Same pattern as sliit.lk's faculty pages. `relative`,
 *     not `static`, so the mega panels still open under the bar and above the page.
 * ------------------------------------------------------------------------ */
body.nsbm-foc-page .nsbm-ui.nsbm-chrome-head .site-header,
body.admin-bar.nsbm-foc-page.nsbm-chrome .nsbm-ui.nsbm-chrome-head .site-header {
	position: relative;
	top: auto;
}
