/* ------------------------------------------------------------------
   Lancaster EE138 - shared responsive stylesheet used by every page.
   Change a colour or font here and the whole site updates.
   Colours: night-sky ground, white "paper" sheet, poppy red for news,
   navy for emphasis, your original link blue (#41599d).
------------------------------------------------------------------- */
:root {
	--ground: #e4e9f1;
	--paper: #ffffff;
	--ink: #1d2433;
	--muted: #5a6577;
	--rule: #d3dae5;
	--link: #41599d;
	--navy: #1b3a8c;
	--poppy: #a8232b;
	--brass: #2f6161;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; }

p { margin: 0 0 1rem; }

.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Links (same blue as before; now underlined so they are easy to spot) ---- */
a:link, a:visited {
	color: var(--link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }
a:active { text-decoration-thickness: 2px; }
a:has(img) { text-decoration: none; }
a:focus-visible {
	outline: 3px solid var(--link);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ---- Banner ---- */
.banner {
	max-width: 1240px;
	margin: 0 auto;
	background: #a9c1de;
	border-bottom: 4px solid var(--navy);
	line-height: 0;
}
.banner img { display: block; width: 100%; height: auto; }

/* ---- Page layout: mobile first (one column) ---- */
.page {
	max-width: 1240px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

.side {
	background: var(--paper);
	border-bottom: 1px solid var(--rule);
	padding: 1rem;
}

.nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
	gap: 6px;
	justify-items: center;
}
.nav a { display: block; line-height: 0; }
.nav img { display: block; width: 136px; height: auto; }


.sheet {
	background: var(--paper);
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.col { padding: 1.25rem 1rem 0.5rem; }
.col + .col { border-top: 1px solid var(--rule); }

/* ---- Photos ---- */
.figure { margin: 1.1rem 0; }
.photo {
	display: block;
	padding: 4px;
	background: var(--paper);
	border: 1px solid var(--rule);
}
.figure.center .photo { margin-left: auto; margin-right: auto; }
.caption { color: var(--muted); font-size: 0.9rem; margin-top: -0.35rem; }
/* ---- Quotations ---- */
.quote, .callout {
	margin: 1.4rem 0;
	padding: 0.85rem 1.1rem;
	background: #f4f6fa;
	border-left: 4px solid var(--poppy);
}
.quote p:last-child, .callout p:last-child { margin-bottom: 0; }
.callout p { margin-bottom: 0.75rem; }

/* ---- Footer ---- */
.footer {
	max-width: 1240px;
	margin: 0 auto;
	padding: 1.25rem 1rem 2rem;
	text-align: center;
	font-size: 0.9rem;
	color: var(--muted);
}
.footer p { margin: 0; }
.footer .style17,
.footer .style20,
.footer .style1 { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.footer a:link, .footer a:visited { font-weight: 700; }

/* ---- Tablet: menu across the top, two text columns ---- */
@media (min-width: 860px) {
	.sheet { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.col { padding: 1.75rem 1.5rem 0.75rem; }
	.col + .col { border-top: 0; border-left: 1px solid var(--rule); }
}

/* ---- Desktop: menu becomes a sticky left sidebar ---- */
@media (min-width: 1080px) {
	.page {
		grid-template-columns: 172px minmax(0, 1fr);
		gap: 1.25rem;
		padding: 1.25rem 1rem 0;
		align-items: start;
	}
	.side {
		position: sticky;
		top: 1rem;
		border: 1px solid var(--rule);
		padding: 0.75rem 0.5rem;
	}
	.nav { grid-template-columns: 1fr; gap: 4px; }
	.sheet { border: 1px solid var(--rule); }
	.col { padding: 2rem 2rem 1rem; }
}


/* ---- Inner pages (one reading column) ---- */
.sheet.single { grid-template-columns: minmax(0, 1fr); }
.sheet.single .col { border: 0; padding: 1.5rem 1rem 1rem; }
.prose { max-width: 46rem; margin: 0 auto; width: 100%; }
.prose::after { content: ""; display: block; clear: both; }
.prose p { margin: 0 0 1rem; }
.sheet { min-width: 0; }

.center { text-align: center; }
.center .photo, .photo.center { margin-left: auto; margin-right: auto; }
img.photo { margin-top: 0.4rem; margin-bottom: 0.4rem; }
img[usemap].photo { padding: 0; }
.gap { display: inline-block; width: 1.25em; }
.attrib { display: block; margin-top: 0.5rem; padding-left: 2rem; }
.MsoNormal { margin: 0 0 0.35rem; }
.log p { margin: 0 0 0.6rem; }

@media (min-width: 860px) {
	.sheet.single .col { padding: 1.75rem 1.5rem 1rem; }
}
@media (min-width: 1080px) {
	.sheet.single .col { padding: 2rem 2rem 1rem; }
}

/* Lists, embedded videos and the full-width rows between photo grids */
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li { margin: 0.25rem 0; }
.prose iframe { display: block; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 0.75rem 0; }
.fullrow { display: flow-root; margin: 0 0 1rem; }

/* Photos that used to wrap beside text: stacked on phones, floated on wider screens */
img.float-left, img.float-right { margin-left: 0; margin-right: 0; }
@media (min-width: 700px) {
	img.float-left  { float: left;  clear: both; margin: 0.25rem 1.25rem 0.75rem 0; }
	img.float-right { float: right; clear: both; margin: 0.25rem 0 0.75rem 1.25rem; }
}

/* Rows of "small picture + description" (65th Commemoration, Crew) */
.itemrow, .person {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin: 0 0 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--rule);
}
.itemrow-pic, .person-photo { flex: 0 0 auto; }
.itemrow { align-items: flex-start; }
.itemrow-pic { width: 130px; }
.itemrow-pic p, .person-photo p, .itemrow-pic div, .person-photo div { margin: 0; }
.itemrow-pic .photo, .person-photo .photo { margin: 0; }
.itemrow-text, .person-info { flex: 1 1 14rem; min-width: 0; }
.itemrow-text p:last-child, .person-info p:last-child { margin-bottom: 0; }
.person-photo { width: 132px; }
.person:last-child, .linkitem:last-child { border-bottom: 0; }

/* Resource list (Links page) */
.linkitem {
	display: flow-root;
	margin: 0 0 1.25rem;
	padding: 0 0 0.25rem;
	border-bottom: 1px solid var(--rule);
}

/* Data tables (BBMF flight times): scroll sideways on small screens, never break the page */
.tablewrap { overflow-x: auto; margin: 1rem 0 1.5rem; -webkit-overflow-scrolling: touch; }
table.data { border-collapse: collapse; font-size: 0.95rem; min-width: 40rem; width: 100%; overflow-wrap: normal; word-break: normal; }
table.data.times td:nth-child(-n+3) { white-space: nowrap; }
table.data.dated td:first-child { min-width: 8.5rem; }
table.data.dated td:nth-child(2) { min-width: 7rem; }
table.data.dated td:nth-child(3) { width: 45%; min-width: 13rem; }
table.data td, table.data th {
	border: 1px solid var(--rule);
	padding: 0.35rem 0.6rem;
	vertical-align: top;
	text-align: left;
}
table.data p { margin: 0; }
table.data tr:first-child td { background: #f1f4f9; font-weight: 700; }

/* Grey box (medals on the Rolfe page) */
.panel { clear: both; display: flow-root; margin: 1.25rem 0; padding: 1rem; background: #eef1f6; border: 1px solid var(--rule); }
.panel > p:last-child { margin-bottom: 0; }

/* Two columns of photos that stack on a phone (McPhan, Runnymede) */
.duo {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: 0 1.5rem;
	margin: 0 0 1rem;
}
.duo > div { min-width: 0; }

/* Photo gallery with captions (Site Preparations) */
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 1.5rem 1.5rem;
	margin: 0 0 1rem;
}
.gallery .gcell { min-width: 0; }
.gallery .span-all { grid-column: 1 / -1; }
.gcell p { margin: 0 0 0.5rem; }

/* Order of Service: page-turner bar and cover */
.pager { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.pager a:link, .pager a:visited {
	flex: 1 1 7rem;
	padding: 0.55rem 0.75rem;
	text-align: center;
	font-weight: 700;
	text-decoration: none;
	color: var(--navy);
	background: #93c8e1;
}
.pager a:hover { background: #7bb9d6; }
.cover { display: flow-root; padding: 1.25rem 1rem; background: #93c8e1; }
.cover p { margin: 0 0 0.9rem; }
.cover img.photo { padding: 0; border: 0; background: none; }
.cover a:link, .cover a:visited { color: var(--navy); }

/* Old Flash players: no browser runs Flash any more, so they are hidden */
.flash { display: none; }

/* Plane page header: photo strip over the clouds */
.banner.strip {
	background: #a9c1de url("Images/clouds2bk.jpg") left top / cover no-repeat;
	padding: 0.75rem 0;
}
.banner.strip img { width: 100%; max-width: 899px; height: auto; }

@media print {
	.side, .banner { display: none; }
	body { background: #fff; }
}
