/*
 * About NEB pages (inc/about.php, build/about.php). NEB colours, square corners, no shadows; lines and rules in place
 * of boxes where they will do.
 */

/* ---------- [neb_org]: the Office above the three units, joined by NEB blue lines ---------- */
.neb-org-office { display: flex; justify-content: center; }
.neb-org-card { display: flex; align-items: center; gap: 14px; height: 100%; padding: 16px 18px; border: 1px solid var(--e-global-color-lightblue); background-color: #fff; color: var(--e-global-color-primary); text-decoration: none; transition: border-color .15s, background-color .15s; }
.neb-org-card:hover, .neb-org-card:focus-visible { border-color: var(--e-global-color-secondary); background-color: var(--e-global-color-paleblue); color: var(--e-global-color-primary); }
.neb-org-office .neb-org-card { width: min(100%, 460px); padding: 20px 22px; border-color: var(--e-global-color-primary); background-color: var(--e-global-color-primary); color: #fff; }
.neb-org-office .neb-org-card:hover, .neb-org-office .neb-org-card:focus-visible { border-color: var(--e-global-color-secondary); background-color: var(--e-global-color-secondary); color: #fff; }
.neb-org-text { min-width: 0; }
.neb-org-name { display: block; font: 600 19px/1.3 Outfit, sans-serif; }
.neb-org-office .neb-org-name { font-size: 22px; }
.neb-org-head { display: block; margin-top: 4px; font-size: 15px; line-height: 1.4; }
.neb-org-units { --n: 3; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; margin: 0; padding: 48px 0 0; list-style: none; }
.neb-org-units li { position: relative; margin: 0; }
/* Down from the Office, across, and down to each unit. */
.neb-org-units::before, .neb-org-units li::before { content: ""; position: absolute; left: 50%; width: 2px; height: 24px; margin-left: -1px; background-color: var(--e-global-color-secondary); }
.neb-org-units::before { top: 0; }
.neb-org-units li::before { top: -24px; }
.neb-org-units::after { content: ""; position: absolute; top: 24px; left: calc((100% - (var(--n) - 1) * 16px) / var(--n) / 2); right: calc((100% - (var(--n) - 1) * 16px) / var(--n) / 2); height: 2px; background-color: var(--e-global-color-secondary); }

/* Portraits as circles, or initials. (img.neb-face inside its parent: outranks Elementor's image reset.) */
.neb-face, .neb-org-card img.neb-face, .neb-unit-row-face img.neb-face { flex: none; display: block; width: 56px; height: 56px; max-width: none; border-radius: 50%; object-fit: cover; background-color: #fff; }
.neb-face--initials { display: flex; align-items: center; justify-content: center; background-color: var(--e-global-color-primary); color: #fff; font: 600 20px/1 Outfit, sans-serif; }
.neb-org-office .neb-face, .neb-org-office .neb-org-card img.neb-face { width: 72px; height: 72px; }
.neb-org-office .neb-face--initials { background-color: #fff; color: var(--e-global-color-primary); }

@media (max-width: 1024px) {
	/* Tablets and phones: a spine down the left from the Office, a short branch to each unit. */
	.neb-org-units { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px 0 0 24px; }
	.neb-org-units::before { top: 0; bottom: 36px; left: 8px; height: auto; margin: 0; }
	.neb-org-units::before, .neb-org-units li::before { content: ""; }
	.neb-org-units li::before { top: 50%; left: -16px; width: 16px; height: 2px; margin: -1px 0 0; }
	.neb-org-units::after { content: none; }
	.neb-org-office .neb-org-card { width: 100%; }
}

/* ---------- [neb_unit_list]: the units as ruled rows, the Office first ---------- */
.neb-unit-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--e-global-color-lightblue); }
.neb-unit-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 36px; align-items: start; margin: 0; padding: 36px 0; border-top: 1px solid var(--e-global-color-lightblue); }
.neb-unit-row:first-child { border-top: 3px solid var(--e-global-color-secondary); }
/* A unit with no head named (the GIS Sub-Unit): its text stays in the text column. */
.neb-unit-row-text:only-child { grid-column: 2; }
.neb-unit-row-face .neb-face, .neb-unit-row-face img.neb-face { width: 140px; height: 140px; }
.neb-unit-row-face .neb-face--initials { font-size: 44px; }
/* h2.…: outranks the kit's h2 (38px). */
.neb-unit-list .neb-unit-row-name { margin: 0 0 10px; font: 600 28px/1.2 Outfit, sans-serif; }
.neb-unit-row-name a { color: var(--e-global-color-primary); text-decoration: none; }
.neb-unit-row-name a:hover, .neb-unit-row-name a:focus-visible { color: var(--e-global-color-secondary); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.neb-unit-row-about { max-width: 64ch; margin: 0 0 14px; font-size: 18px; line-height: 1.6; color: var(--e-global-color-text); }
.neb-unit-row-head { margin: 0; font-size: 16px; line-height: 1.5; color: var(--e-global-color-primary); }
.neb-unit-row-head span { margin-right: 4px; color: var(--e-global-color-muted); }
/* Two to a row (About NEB): the top rule on each of the first two, smaller portraits; one to a row under 1025px. */
.neb-unit-list--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.neb-unit-list--grid .neb-unit-row { grid-template-columns: 112px minmax(0, 1fr); gap: 28px; }
/* No rule above the first row or below the last (Danny, 11 November 2026): thin rules only between rows. */
.neb-unit-list--grid { border-bottom: 0; }
.neb-unit-list--grid .neb-unit-row:nth-child(-n+2) { border-top: 0; padding-top: 4px; }
.neb-unit-list--grid .neb-unit-row-face .neb-face, .neb-unit-list--grid .neb-unit-row-face img.neb-face { width: 112px; height: 112px; }
.neb-unit-list--grid .neb-unit-row-name { font-size: 26px; }
.neb-unit-row--text { display: block; }
.neb-unit-row--text .neb-unit-row-about { margin-bottom: 0; }
/* On navy (the Office, in the head of Office and units). */
.neb-unit-list--panel { padding: 32px; border: 0; background-color: var(--e-global-color-primary); }
.neb-unit-list--panel .neb-unit-row, .neb-unit-list--panel .neb-unit-row:first-child { grid-template-columns: 104px minmax(0, 1fr); gap: 28px; padding: 0; border: 0; }
.neb-unit-list--panel .neb-unit-row-face .neb-face, .neb-unit-list--panel .neb-unit-row-face img.neb-face { width: 104px; height: 104px; }
.neb-unit-list--panel .neb-unit-row-name { font-size: 24px; }
.neb-unit-list--panel .neb-unit-row-name a, .neb-unit-list--panel .neb-unit-row-about, .neb-unit-list--panel .neb-unit-row-head { color: #fff; }
.neb-unit-list--panel .neb-unit-row-name a:hover, .neb-unit-list--panel .neb-unit-row-name a:focus-visible { color: #fff; }
.neb-unit-list--panel .neb-unit-row-about { font-size: 17px; }
.neb-unit-list--panel .neb-unit-row-head span { color: rgba(255, 255, 255, .78); }
/* Without a portrait (Office and units, Danny, 11 November 2026: no faces for units): across the page, the Office's
   name beside what it does; stacked under 1025px. */
.neb-unit-list--panel:has(.neb-unit-row--text) { padding: 40px; }
.neb-unit-list--panel .neb-unit-row--text .neb-unit-row-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 12px 56px; align-items: center; }
.neb-unit-list--panel .neb-unit-row--text .neb-unit-row-name { margin: 0; font-size: 28px; line-height: 1.25; }
.neb-unit-list--panel .neb-unit-row--text .neb-unit-row-about { margin: 0; font-size: 18px; line-height: 1.6; }
@media (max-width: 1024px) {
	.neb-unit-list--panel .neb-unit-row--text .neb-unit-row-text { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
	.neb-unit-list--panel, .neb-unit-list--panel:has(.neb-unit-row--text) { padding: 24px; }
	.neb-unit-list--panel .neb-unit-row--text .neb-unit-row-name { font-size: 22px; }
	.neb-unit-list--panel .neb-unit-row--text .neb-unit-row-about { font-size: 17px; }
	.neb-unit-list--panel .neb-unit-row, .neb-unit-list--panel .neb-unit-row:first-child { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; }
	.neb-unit-list--panel .neb-unit-row-face .neb-face, .neb-unit-list--panel .neb-unit-row-face img.neb-face { width: 76px; height: 76px; }
	.neb-unit-list--panel .neb-unit-row-name { font-size: 22px; }
}
/* With portraits: one to a row under 1025px. Text only (About NEB): two to a row down to tablets, one on phones. */
@media (max-width: 1024px) {
	.neb-unit-list--grid:has(.neb-unit-row-face) { grid-template-columns: minmax(0, 1fr); }
	.neb-unit-list--grid:has(.neb-unit-row-face) .neb-unit-row:nth-child(2) { border-top: 1px solid var(--e-global-color-lightblue); padding-top: 28px; }
	.neb-unit-list--grid { column-gap: 40px; }
}
@media (max-width: 767px) {
	.neb-unit-list--grid { grid-template-columns: minmax(0, 1fr); }
	.neb-unit-list--grid .neb-unit-row:nth-child(2) { border-top: 1px solid var(--e-global-color-lightblue); padding-top: 28px; }
	.neb-unit-list--grid .neb-unit-row { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; }
	.neb-unit-list--grid .neb-unit-row-face .neb-face, .neb-unit-list--grid .neb-unit-row-face img.neb-face { width: 76px; height: 76px; }
	.neb-unit-list--grid .neb-unit-row-name { font-size: 22px; }
}
@media (max-width: 767px) {
	.neb-unit-row { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 28px 0; }
	.neb-unit-row-face .neb-face, .neb-unit-row-face img.neb-face { width: 76px; height: 76px; }
	.neb-unit-row-face .neb-face--initials { font-size: 26px; }
	.neb-unit-list .neb-unit-row-name { font-size: 22px; }
	.neb-unit-row-about { font-size: 17px; }
}

/* ---------- Mandate and history: the timeline. Across the page, a dot on the light blue line above each date (the
   line is each item's top border; no column gap, so it runs on through the row). Phones: down a line on the left. */
/* .e-con.neb-tl-item: Elementor uses a container's ::before for its background overlay (content: none), so outrank it. */
.e-con.neb-tl-item { position: relative; }
.e-con.neb-tl-item::before { content: ""; display: block; position: absolute; inset: -8px auto auto 0; width: 14px; height: 14px; border-radius: 50%; background: var(--e-global-color-secondary); opacity: 1; mix-blend-mode: normal; }
.e-con.neb-tl-item.neb-tl-now::before { background: var(--e-global-color-primary); }
@media (max-width: 767px) {
	.e-con.neb-tl-item::before { inset: 7px auto auto -8px; }
}

/* ---------- Text blocks on these pages ---------- */
.neb-about-text p { margin: 0 0 14px; }
.neb-about-text p:last-child { margin-bottom: 0; }
.neb-about-text ul { margin: 0; padding-left: 1.3em; }
.neb-about-text li { margin: 0 0 8px; }
.neb-about-text li:last-child { margin-bottom: 0; }
.neb-about-text a { color: var(--e-global-color-secondary); text-decoration: underline; text-underline-offset: 3px; }

/* Responsibilities: each report, then who receives it. */
.neb-reports ul { margin: 0; padding: 0; list-style: none; }
.neb-reports li { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; margin: 0; padding: 12px 0; border-top: 1px solid var(--e-global-color-lightblue); }
.neb-reports li:first-child { padding-top: 0; border-top: 0; }
.neb-reports strong { font-weight: 600; color: var(--e-global-color-primary); }
.neb-reports span { color: var(--e-global-color-muted); }
@media (max-width: 767px) {
	.neb-reports li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* The circle-arrow "Learn more" under each unit (more="yes"; About NEB, Danny 11 November 2026). */
.neb-unit-list .neb-unit-row-more { margin: 18px 0 0; }
