/* ==========================================================================
   NILDS theme styles
   Design tokens mirror the approved NILDS design source exactly.
   ========================================================================== */

:root {
	--nilds-blue: #193AB2;
	--nilds-blue-dark: #14309A;
	--nilds-blue-deep: #0F2778;
	--nilds-ink: #14171F;
	--nilds-body: #56607A;
	--nilds-line: #DCE3F2;
	--nilds-line-soft: #EDF1FA;
	--nilds-tint: #F2F5FB;
	--nilds-tint-soft: #F8FAFD;
	--nilds-white: #FFFFFF;
	--nilds-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--nilds-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
	--nilds-gutter: clamp(24px, 3.6vw, 76px);
}

html,
body {
	margin: 0;
	padding: 0;
	background: var(--nilds-white);
	overflow-x: hidden;
}

body.nilds {
	font-family: var(--nilds-sans);
	color: var(--nilds-ink);
	-webkit-font-smoothing: antialiased;
}

* {
	box-sizing: border-box;
}

a {
	color: var(--nilds-blue);
	text-decoration: none;
}

::selection {
	background: var(--nilds-line);
	color: var(--nilds-blue);
}

img {
	max-width: 100%;
}

.nilds-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--nilds-blue);
	color: #fff;
	padding: 12px 18px;
	z-index: 999;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.nilds-skip:focus {
	left: 0;
}

/* ---------- Utility bar ---------- */

.nilds-topbar {
	background: var(--nilds-blue);
}

.nilds-topbar-inner {
	padding: 0 clamp(20px, 3.2vw, 72px);
	min-height: 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	flex-wrap: wrap;
}

.nilds-topbar-label {
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
	padding: 10px 0;
}

.nilds-topbar-links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
}

.nilds-util-link {
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	padding: 10px 14px;
}

.nilds-util-link:hover {
	color: rgba(255, 255, 255, 0.75);
}

.nilds-util-sep {
	width: 1px;
	height: 10px;
	background: rgba(255, 255, 255, 0.28);
}

.nilds-topbar-links > .nilds-util-link:last-of-type + .nilds-util-sep,
.nilds-topbar-links > .nilds-util-sep:last-child {
	display: none;
}

/* ---------- Masthead ---------- */

.nilds-header {
	background: var(--nilds-white);
	position: relative;
	z-index: 60;
}

.nilds-masthead {
	padding: 22px clamp(20px, 3.2vw, 72px);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px 40px;
	flex-wrap: wrap;
}

.nilds-brand {
	display: flex;
	align-items: center;
	gap: 20px;
	min-width: 0;
	flex: 0 1 auto;
}

.nilds-logo {
	height: 58px;
	width: auto;
	display: block;
}

.nilds-masthead-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	justify-content: flex-end;
	min-width: 0;
	flex: 1 1 460px;
}

.nilds-masthead-actions .search-form {
	display: flex;
	height: 46px;
	flex: 1 1 460px;
	min-width: 240px;
	max-width: 560px;
	border: 1px solid var(--nilds-line);
	background: var(--nilds-tint);
}

.nilds-masthead-actions .search-form label {
	flex: 1;
	display: flex;
}

.nilds-masthead-actions .search-field {
	border: 0;
	background: transparent;
	width: 100%;
	padding: 0 15px;
	font-family: var(--nilds-sans);
	font-size: 13.5px;
	color: var(--nilds-ink);
}

.nilds-masthead-actions .search-submit {
	width: 46px;
	border: 0;
	background: var(--nilds-blue);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}

/* ---------- Desktop navigation ---------- */

.nilds-nav {
	border-top: 1px solid var(--nilds-line);
	border-bottom: 1px solid var(--nilds-line);
}

.nilds-nav-inner {
	padding: 0 clamp(20px, 3.2vw, 72px);
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
}

.nilds-nav-item {
	position: relative;
	display: flex;
}

.nilds-nav-top {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 52px;
	padding: 0 18px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--nilds-ink);
	white-space: nowrap;
}

.nilds-nav-inner > .nilds-nav-top:first-child {
	padding: 0 16px 0 0;
}

.nilds-nav-top:hover,
.nilds-nav-top:focus-visible {
	color: var(--nilds-blue);
}

.nilds-nav-top.is-current {
	color: var(--nilds-blue);
	font-weight: 600;
	box-shadow: inset 0 -3px 0 var(--nilds-blue);
}

.nilds-caret {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.55;
	flex: none;
}

.nilds-mega {
	position: absolute;
	top: 52px;
	left: 0;
	z-index: 70;
	display: none;
	width: 310px;
	max-width: 90vw;
	background: #fff;
	border-top: 3px solid var(--nilds-blue);
	box-shadow: 0 26px 54px rgba(25, 58, 178, 0.18);
	padding: 20px 26px 22px;
}

.nilds-nav-item.is-open > .nilds-mega,
.nilds-nav-item.is-open > [data-nilds-panel] {
	display: block;
}

.nilds-mega-link {
	display: block;
	padding: 12px 0;
	font-size: 13.5px;
	color: var(--nilds-ink);
	border-bottom: 1px solid var(--nilds-line-soft);
}

.nilds-mega-link:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.nilds-mega-link:hover {
	color: var(--nilds-blue);
}

/* Departments panel is two columns, exactly as designed. */
.nilds-nav-item:nth-of-type(4) > .nilds-mega {
	width: 620px;
	column-count: 2;
	column-gap: 40px;
}

/* ---------- Mobile drawer ---------- */

.nilds-burger {
	display: none;
	align-items: center;
	gap: 12px;
	height: 46px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--nilds-blue);
	font-family: var(--nilds-sans);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.nilds-burger-bars,
.nilds-burger-bars::before,
.nilds-burger-bars::after {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--nilds-blue);
	content: '';
}

.nilds-burger-bars {
	position: relative;
}

.nilds-burger-bars::before {
	position: absolute;
	top: -6px;
}

.nilds-burger-bars::after {
	position: absolute;
	top: 6px;
}

.nilds-drawer {
	display: none;
	flex-direction: column;
	padding: 4px clamp(20px, 3.2vw, 72px) 22px;
	border-top: 1px solid var(--nilds-line);
	border-bottom: 1px solid var(--nilds-line);
}

.nilds-drawer.is-open {
	display: flex;
}

.nilds-m-row {
	border-bottom: 1px solid var(--nilds-line-soft);
}

.nilds-m-head {
	display: flex;
	align-items: center;
}

.nilds-m-link {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: center;
	min-height: 52px;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--nilds-ink);
}

.nilds-m-caret {
	width: 46px;
	height: 46px;
	flex: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--nilds-body);
	font-size: 13px;
	line-height: 1;
}

.nilds-m-caret[aria-expanded='true'] {
	color: var(--nilds-blue);
	transform: rotate(180deg);
}

.nilds-m-sub {
	display: none;
	flex-direction: column;
	padding: 2px 0 14px 2px;
}

.nilds-m-sub.is-open {
	display: flex;
}

.nilds-m-sublink {
	display: flex;
	align-items: center;
	min-height: 42px;
	font-size: 13.5px;
	color: var(--nilds-body);
}

.nilds-m-sublink:hover {
	color: var(--nilds-blue);
}

@media (max-width: 1023px) {
	.nilds-nav {
		display: none;
	}

	.nilds-burger {
		display: flex;
	}
}

@media (min-width: 1024px) {
	.nilds-drawer {
		display: none !important;
	}
}

/* ---------- Shared editorial primitives ---------- */

.nilds-eyebrow {
	display: inline-block;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--nilds-blue);
}

.nilds-display {
	font-family: var(--nilds-serif);
	font-weight: 400;
	font-size: clamp(30px, 3.4vw, 50px);
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: 14px 0 0;
	color: var(--nilds-ink);
}

.nilds-lede {
	font-size: 16.5px;
	line-height: 1.85;
	color: var(--nilds-body);
	max-width: 68ch;
	margin: 20px 0 0;
}

.nilds-hero-band {
	background: var(--nilds-blue);
	color: #fff;
	padding: clamp(52px, 6vw, 104px) var(--nilds-gutter);
}

.nilds-hero-band .nilds-eyebrow {
	color: rgba(255, 255, 255, 0.72);
}

.nilds-hero-band .nilds-display,
.nilds-hero-band .nilds-lede {
	color: #fff;
}

.nilds-hero-band .nilds-lede {
	color: rgba(255, 255, 255, 0.82);
}

.nilds-hero-band-inner,
.nilds-wrap {
	max-width: 1240px;
	margin: 0 auto;
}

.nilds-section {
	padding: clamp(56px, 6vw, 100px) var(--nilds-gutter);
}

.nilds-section--tint {
	background: var(--nilds-tint);
	border-top: 1px solid var(--nilds-line);
	border-bottom: 1px solid var(--nilds-line);
}

.nilds-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
}

.nilds-breadcrumbs a {
	color: #fff;
}

/* ---------- Cards & archives ---------- */

.nilds-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 34px 30px;
	margin-top: 42px;
}

.nilds-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--nilds-line);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.nilds-card:hover {
	border-color: var(--nilds-blue);
	transform: translateY(-3px);
}

.nilds-card-media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--nilds-tint);
}

.nilds-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nilds-card-body {
	padding: 22px 24px 26px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

.nilds-card-meta {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--nilds-blue);
}

.nilds-card-title {
	font-family: var(--nilds-serif);
	font-size: 21px;
	line-height: 1.32;
	margin: 0;
	color: var(--nilds-ink);
}

.nilds-card-excerpt {
	font-size: 14.5px;
	line-height: 1.8;
	color: var(--nilds-body);
	margin: 0;
}

.nilds-more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--nilds-blue);
	transition: gap 0.2s ease;
}

.nilds-more:hover {
	gap: 14px;
}

.nilds-pagination {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 48px;
}

.nilds-pagination .page-numbers {
	min-width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--nilds-line);
	font-size: 13px;
	color: var(--nilds-ink);
	padding: 0 12px;
}

.nilds-pagination .page-numbers.current,
.nilds-pagination .page-numbers:hover {
	background: var(--nilds-blue);
	border-color: var(--nilds-blue);
	color: #fff;
}

/* ---------- Long-form content ---------- */

.nilds-article {
	padding: clamp(44px, 5vw, 86px) var(--nilds-gutter);
}

.nilds-article-inner {
	max-width: 78ch;
	margin: 0 auto;
}

.nilds-prose {
	font-size: 16.5px;
	line-height: 1.9;
	color: #232838;
}

.nilds-prose > * + * {
	margin-top: 1.35em;
}

.nilds-prose h2,
.nilds-prose h3,
.nilds-prose h4 {
	font-family: var(--nilds-serif);
	font-weight: 500;
	color: var(--nilds-ink);
	line-height: 1.25;
	margin-top: 2em;
}

.nilds-prose h2 {
	font-size: 30px;
}

.nilds-prose h3 {
	font-size: 24px;
}

.nilds-prose a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nilds-prose blockquote {
	margin: 2em 0;
	padding: 4px 0 4px 26px;
	border-left: 3px solid var(--nilds-blue);
	font-family: var(--nilds-serif);
	font-size: 21px;
	line-height: 1.6;
	color: var(--nilds-ink);
}

.nilds-prose img,
.nilds-prose figure {
	max-width: 100%;
	height: auto;
}

.nilds-prose ul,
.nilds-prose ol {
	padding-left: 1.3em;
}

.nilds-prose li + li {
	margin-top: 0.5em;
}

.nilds-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	align-items: center;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	margin-top: 26px;
}

.nilds-featured {
	margin: 0;
}

.nilds-featured img {
	width: 100%;
	height: auto;
	display: block;
}

.nilds-detail-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.nilds-detail-list li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	border-bottom: 1px solid var(--nilds-line-soft);
	padding-bottom: 12px;
	font-size: 14.5px;
	color: var(--nilds-ink);
}

.nilds-detail-list strong {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--nilds-blue);
}

.nilds-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 50px;
	padding: 0 26px;
	background: var(--nilds-blue);
	border: 1px solid var(--nilds-blue);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	cursor: pointer;
}

.nilds-btn:hover {
	background: var(--nilds-blue-dark);
	border-color: var(--nilds-blue-dark);
	color: #fff;
}

.nilds-btn--ghost {
	background: transparent;
	color: var(--nilds-blue);
}

.nilds-btn--ghost:hover {
	background: var(--nilds-blue);
	color: #fff;
}

/* ---------- Gallery ---------- */

.nilds-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
	margin-top: 40px;
}

.nilds-gallery-grid a {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--nilds-tint);
}

.nilds-gallery-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.nilds-gallery-grid a:hover img {
	transform: scale(1.05);
}

/* ---------- Easy Edit mode ---------- */

.nilds-ee[contenteditable='true'] {
	outline: 1px dashed rgba(25, 58, 178, 0.55);
	outline-offset: 2px;
	min-width: 12px;
	display: inline-block;
}

.nilds-ee[contenteditable='true']:focus {
	outline: 2px solid var(--nilds-blue);
	background: rgba(25, 58, 178, 0.05);
}

.nilds-ee-section {
	position: relative;
}

body.nilds-editing .nilds-ee-section:hover {
	box-shadow: inset 0 0 0 2px rgba(25, 58, 178, 0.25);
}

.nilds-ee-bar {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 22px;
	z-index: 100000;
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--nilds-ink);
	color: #fff;
	padding: 12px 18px;
	box-shadow: 0 18px 44px rgba(20, 23, 31, 0.32);
	font-size: 12px;
	letter-spacing: 0.08em;
}

.nilds-ee-bar button {
	font: inherit;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border: 1px solid rgba(255, 255, 255, 0.4);
	background: transparent;
	color: #fff;
	padding: 8px 14px;
	cursor: pointer;
}

.nilds-ee-bar button.is-primary {
	background: var(--nilds-blue);
	border-color: var(--nilds-blue);
}

/* ---------- Elementor canvas ---------- */

body.nilds-canvas .nilds-main {
	padding: 0;
}

.elementor-page .nilds-main > .nilds-article {
	padding-top: 0;
}

/* ---------- Generated design hover/focus states (from the design source) ---------- */

.dch0:hover { color: rgba(255,255,255,0.75) !important; }
.dch1:hover { border-color: #193AB2 !important; }
.dch2:hover { color: #193AB2 !important; }
.dch3:hover { color: #FFFFFF !important; }
.dch4:hover { background: #F2F5FB !important; }
.dch5:hover { background: rgba(255,255,255,0.12) !important; }
.dch6:hover { background: rgba(255,255,255,0.08) !important; }
.dch7:hover { background: rgba(25,58,178,0.05) !important; }
.dch8:hover { background: rgba(25,58,178,0.08) !important; }
.dch9:hover { opacity: 0.95 !important; }
.dch10:hover { border-color: #FFFFFF !important; }
.dcf11:focus { border-color: #193AB2 !important; }
.dch12:hover { background: #FFFFFF !important; color: #193AB2 !important; }
.dch13:hover { opacity: 0.96 !important; }
.dch14:hover { border-color: #193AB2 !important; color: #193AB2 !important; }
.dch15:hover { background: #14171F !important; }
.dch16:hover { border-color: #FFFFFF !important; background: rgba(255,255,255,0.08) !important; }
.dch17:hover { color: #0F2778 !important; }
.dch18:hover { background: #F8FAFD !important; }
.dch19:hover { border-color: #193AB2 !important; transform: translateY(-3px) !important; }
.dch20:hover { gap: 14px !important; }
.dch21:hover { color: #14171F !important; }
.dch22:hover { background: #14309A !important; border-color: #14309A !important; }
.dch23:hover { background: #193AB2 !important; color: #FFFFFF !important; border-color: #193AB2 !important; }
.dch24:hover { color: #14309A !important; }
.dch25:hover { padding-left: 8px !important; }
.dch26:hover { background: #14309A !important; border-color: #FFFFFF !important; }
.dch27:hover { background: #F2F5FB !important; border-color: #193AB2 !important; }
.dch28:hover { transform: scale(1.05) !important; }
.dch29:hover { background: rgba(255,255,255,0.14) !important; }
.dch30:hover { background: rgba(25,58,178,0.06) !important; }
.dch31:hover { background: #0F2778 !important; }
