/* Magaaribi — experience-led school theme for Kisomo Kenya
   Inspired by northeastern.edu (black/white/red, photo-forward), not a copy. */
:root {
	--mg-black: #000;
	--mg-ink: #17191f;
	--mg-red: #c8012e;
	--mg-gold: #a4804a;
	--mg-paper: #fff;
	--mg-mist: #f3f4f6;
	--mg-mute: #5c616b;
	--mg-line: rgba(23, 25, 31, 0.12);
}

body.mg {
	font-family: Lato, "Segoe UI", sans-serif;
	background: var(--mg-paper);
	color: var(--mg-ink);
	margin: 0;
	overflow-x: hidden;
}
img, iframe, video { max-width: 100%; }

.mg-wrap {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
}

.mg-eyebrow {
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 900;
	color: var(--mg-red);
	margin-bottom: 8px;
}
.mg-eyebrow-light { color: #fff; }

.mg-topbar {
	background: var(--mg-black);
	color: #fff;
	font-size: 0.82rem;
}
.mg-topbar-inner {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: center;
	padding: 8px 0;
}
.mg-topbar-links { display: flex; gap: 18px; }
.mg-topbar-links a { color: #fff; font-weight: 700; text-decoration: none; }
.mg-topbar-links a:hover { color: var(--mg-red); }

.mg-bar {
	background: #fff;
	border-bottom: 1px solid var(--mg-line);
	position: sticky;
	top: 0;
	z-index: 20;
}
.mg-bar-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 78px;
	position: relative;
}
.mg-mark {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--mg-black);
	text-decoration: none;
	font-weight: 900;
	letter-spacing: -0.02em;
	min-width: 180px;
}
.mg-mark img {
	width: 48px;
	height: 48px;
	object-fit: contain;
}
.mg-burger {
	display: none;
	margin-left: auto;
	background: var(--mg-black);
	border: 0;
	color: #fff;
	width: 44px;
	height: 44px;
	min-width: 44px;
}
.mg-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin-left: auto;
}
.mg-links a {
	color: var(--mg-ink);
	text-decoration: none;
	font-weight: 700;
	padding: 10px 0 8px;
	border-bottom: 3px solid transparent;
}
.mg-links a:hover,
.mg-links a.is-on {
	color: var(--mg-black);
	border-bottom-color: var(--mg-red);
}

.mg-stage { min-height: 50vh; }

.mg-hero {
	min-height: 78vh;
	background: var(--mg-ink) center/cover no-repeat;
	display: flex;
	align-items: flex-end;
	position: relative;
	padding: 48px 0 56px;
	overflow: hidden;
}
.mg-hero-veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(0,0,0,0.15) 10%, rgba(0,0,0,0.72) 100%);
	pointer-events: none;
}
.mg-hero-copy { position: relative; z-index: 2; color: #fff; }
.mg-hero h1 {
	font-family: "Archivo Black", Lato, sans-serif;
	font-size: clamp(3.4rem, 12vw, 8.2rem);
	line-height: 0.88;
	letter-spacing: -0.04em;
	margin: 8px 0 16px;
	text-transform: uppercase;
}
.mg-hero-lede {
	max-width: 36rem;
	font-size: 1.15rem;
	line-height: 1.55;
}
.mg-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.mg-btn {
	display: inline-flex;
	align-items: center;
	background: var(--mg-red);
	color: #fff;
	padding: 12px 20px;
	text-decoration: none;
	font-weight: 900;
	letter-spacing: 0.02em;
}
.mg-btn:hover { color: #fff; background: #9d0124; }
.mg-btn-ghost {
	background: transparent;
	color: #fff;
	border: 1px solid #fff;
}
.mg-btn-ghost:hover { background: #fff; color: var(--mg-black); }
.mg-link {
	color: var(--mg-black);
	font-weight: 900;
	text-decoration: none;
	border-bottom: 2px solid var(--mg-red);
}
.mg-link:hover { color: var(--mg-red); }

.mg-lanes { background: var(--mg-black); }
.mg-lanes-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}
.mg-lanes-row a {
	color: #fff;
	text-decoration: none;
	padding: 22px 16px;
	border-right: 1px solid rgba(255,255,255,0.14);
	font-weight: 900;
}
.mg-lanes-row a:last-child { border-right: 0; }
.mg-lanes-row a:hover { background: var(--mg-red); }
.mg-lanes-row em {
	display: block;
	font-style: normal;
	color: var(--mg-red);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	margin-bottom: 6px;
}
.mg-lanes-row a:hover em { color: #fff; }

.mg-block { padding: 72px 0; }
.mg-block-ink { background: var(--mg-mist); }
.mg-block h1,
.mg-block h2,
.mg-sheet h1 {
	font-family: "Archivo Black", Lato, sans-serif;
	letter-spacing: -0.03em;
}
.mg-block-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 32px;
}
.mg-block-head h2 { margin: 0; }

.mg-digest {
	display: grid;
	grid-template-columns: 1.4fr 0.9fr;
	gap: 28px;
}
.mg-digest a { color: inherit; text-decoration: none; }
.mg-digest-lead img,
.mg-photo-gap {
	width: 100%;
	height: 340px;
	object-fit: cover;
	background: #d9dce2;
	margin-bottom: 14px;
}
.mg-digest p {
	color: var(--mg-red);
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0 0 6px;
}
.mg-digest h3 {
	font-family: "Archivo Black", Lato, sans-serif;
	font-size: 1.45rem;
	margin: 0;
	letter-spacing: -0.02em;
}
.mg-digest-stack article + article {
	border-top: 1px solid var(--mg-line);
	padding-top: 18px;
	margin-top: 18px;
}
.mg-digest-stack a {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 14px;
	align-items: start;
}
.mg-digest-stack img {
	width: 110px;
	height: 82px;
	object-fit: cover;
}

.mg-campus {
	min-height: 420px;
	background: var(--mg-ink) center/cover no-repeat;
	position: relative;
	display: flex;
	align-items: flex-end;
	padding: 64px 0;
}
.mg-campus-veil {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.18) 70%);
}
.mg-campus-copy {
	position: relative;
	color: #fff;
	max-width: 34rem;
}
.mg-campus-copy h2 {
	font-family: "Archivo Black", Lato, sans-serif;
	font-size: clamp(1.8rem, 4vw, 3rem);
	margin: 8px 0 12px;
}

.mg-drive {
	background: var(--mg-black);
	color: #fff;
	padding: 64px 0;
}
.mg-drive-line {
	font-family: "Archivo Black", Lato, sans-serif;
	font-size: clamp(1.5rem, 3.4vw, 2.6rem);
	line-height: 1.2;
	letter-spacing: -0.03em;
	margin: 0;
	max-width: 46rem;
}

.mg-faces {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}
.mg-faces a { display: block; color: inherit; text-decoration: none; }
.mg-faces img {
	width: 100%;
	aspect-ratio: 3/4;
	object-fit: cover;
	margin-bottom: 10px;
}
.mg-faces strong { display: block; font-weight: 900; }
.mg-faces span { color: var(--mg-mute); font-size: 0.9rem; }

#map {
	width: 100%;
	height: 380px;
	background: #d7dce4;
}

.mg-sheet { padding: 40px 0 64px; }
.mg-sheet h1 {
	font-size: clamp(2rem, 5vw, 3.4rem);
	margin: 0 0 16px;
	text-transform: none;
}
.mg-copy {
	font-size: 1.08rem;
	line-height: 1.85;
	max-width: 46rem;
}
.mg-pair {
	display: grid;
	grid-template-columns: 1.5fr 0.9fr;
	gap: 36px;
	align-items: start;
}
.mg-pair img { width: 100%; object-fit: cover; }

.mg-story-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.mg-story-list li {
	padding: 18px 0;
	border-bottom: 1px solid var(--mg-line);
}
.mg-story-list a {
	color: var(--mg-black);
	font-family: "Archivo Black", Lato, sans-serif;
	font-size: 1.2rem;
	text-decoration: none;
	letter-spacing: -0.02em;
}
.mg-story-list p { margin: 4px 0 0; color: var(--mg-mute); }

.mg-story-hero img {
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	margin: 16px 0 28px;
}
.mg-rail a {
	display: block;
	color: var(--mg-black);
	font-weight: 900;
	margin-bottom: 8px;
	text-decoration: none;
}

.mg-albums {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 24px;
	list-style: none;
	padding: 0;
}
.mg-albums a { color: inherit; text-decoration: none; }
.mg-albums img,
.mg-prints img {
	width: 100%;
	height: 190px;
	object-fit: cover;
	display: block;
}
.mg-albums h3 { font-weight: 900; margin: 10px 0 4px; }
.mg-prints {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 10px;
}
.mg-prints button { border: 0; padding: 0; background: none; cursor: pointer; }

.mg-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.94);
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.mg-lightbox[hidden] { display: none !important; }
.mg-lightbox img { max-width: 92vw; max-height: 78vh; }
.mg-lightbox-close,
.mg-lightbox-nav {
	position: absolute;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 2rem;
	cursor: pointer;
	width: 48px;
	height: 48px;
}
.mg-lightbox-close { top: 12px; right: 12px; z-index: 3; }
.mg-lightbox-prev,
.mg-lightbox-next { top: 50%; transform: translateY(-50%); z-index: 2; }
.mg-lightbox-prev { left: 8px; }
.mg-lightbox-next { right: 8px; }
body.mg-lightbox-open { overflow: hidden; }

.mg-profile {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 32px;
}
.mg-profile img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

.mg-foot {
	background: var(--mg-black);
	color: #c9ccd3;
	padding: 56px 0 16px;
	border-top: 6px solid var(--mg-red);
}
.mg-foot-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.mg-foot h2 {
	color: #fff;
	font-family: "Archivo Black", Lato, sans-serif;
	font-size: 1.35rem;
}
.mg-foot a { color: #fff; text-decoration: none; font-weight: 700; }
.mg-foot a:hover { color: var(--mg-red); }
.mg-foot-copy {
	border-top: 1px solid rgba(255,255,255,0.12);
	margin-top: 28px;
	padding-top: 12px;
	font-size: 0.85rem;
}

.kisomo-empty-state { max-width: 36rem; margin: 0 auto; text-align: center; }
.kisomo-empty-title { font-family: "Archivo Black", Lato, sans-serif; }
.kisomo-empty-copy { color: var(--mg-mute); }
.kisomo-empty-orb {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(200, 1, 46, 0.12);
	color: var(--mg-red);
	font-size: 1.6rem;
}

.mg-toggle {
	background: #fff;
	border: 1px solid var(--mg-line);
	color: var(--mg-ink);
	font-weight: 700;
}
.btn-check:checked + .mg-toggle {
	background: var(--mg-red);
	border-color: var(--mg-red);
	color: #fff;
}
.fee-table-view .table thead th,
.fee-govt-view .table thead th,
.fee-mobile-view .table thead th {
	background: var(--mg-black);
	color: #fff;
	border: none;
}
.fee-pdf-iframe { width: 100%; height: 75vh; min-height: 600px; border: 0; }

.mg-year-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 28px;
	background: var(--mg-black);
	color: #fff;
	padding: 22px 24px;
	margin: 24px 0 32px;
}
.mg-year-stats span { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.mg-year-stats strong {
	display: block;
	font-family: "Archivo Black", Lato, sans-serif;
	font-size: 1.8rem;
	letter-spacing: -0.03em;
}
.mg-year-run { border-left: 4px solid var(--mg-red); padding-left: 22px; }
.mg-year-term,
.mg-year-half,
.mg-year-event {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--mg-line);
}
.mg-year-term time,
.mg-year-half time,
.mg-year-event time {
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 0.78rem;
	color: var(--mg-red);
}
.mg-year-term p {
	font-family: "Archivo Black", Lato, sans-serif;
	margin: 0;
	letter-spacing: -0.02em;
}
.mg-year-holiday {
	background: var(--mg-red);
	color: #fff;
	display: inline-block;
	margin: 16px 0;
	padding: 8px 14px;
	font-weight: 900;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 0.78rem;
}

@media (max-width: 991px) {
	.mg-burger { display: inline-flex; align-items: center; justify-content: center; }
	.mg-links {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background: #fff;
		flex-direction: column;
		padding: 12px 20px 20px;
		border-bottom: 1px solid var(--mg-line);
	}
	body.mg-open .mg-links { display: flex; }
	.mg-links a { min-height: 44px; display: flex; align-items: center; }
	.mg-lanes-row,
	.mg-digest,
	.mg-digest-stack a,
	.mg-faces,
	.mg-pair,
	.mg-profile,
	.mg-foot-grid,
	.mg-year-term,
	.mg-year-half,
	.mg-year-event { grid-template-columns: 1fr; }
	.mg-hero {
		min-height: 48vh;
		padding: 32px 0 40px;
	}
	.mg-hero h1 {
		font-size: clamp(2.1rem, 14vw, 3.2rem);
		word-break: break-word;
	}
	.mg-mark { min-width: 0; flex: 1; }
	.mg-mark span { overflow-wrap: anywhere; }
	.mg-sheet h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); word-break: break-word; }
	.mg-topbar-inner { flex-direction: column; align-items: flex-start; }
	.mg-block { padding: 40px 0; }
	#map { height: 260px; }
	.fee-pdf-iframe { height: 55vh; min-height: 320px; }
}
@media (max-width: 575px) {
	.mg-wrap { width: min(1180px, calc(100% - 24px)); }
	.mg-lightbox { padding: 56px 8px 12px; }
	.mg-hero { min-height: 0; }
	.mg-year-stats { padding: 16px; }
}
