/* ST5000 site styles
   Modernized type system and palette — see project handoff notes for the
   full set of design decisions this implements. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
	--st-navy: #0A0E18;
	--st-amber: #D98A3D;
	--st-amber-dark: #B5651D;
	--st-ivory: #FAF8F3;
	--st-text: #2B2622;
	--st-text-muted: #6B6259;
}

body {
	font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
	background-color: var(--st-ivory);
	color: var(--st-text);
	margin: 0;
}

h1, h2, h3, h4 {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 600;
	color: var(--st-text);
}

p, li {
	line-height: 1.5;
}

a:link {
	color: var(--st-amber-dark);
	text-decoration: underline;
}
a:visited {
	color: var(--st-text-muted);
	text-decoration: underline;
}
a:hover {
	color: var(--st-amber);
}
a:active {
	color: var(--st-amber-dark);
}

/* Site navigation */
.sitenav {
	background: linear-gradient(90deg, var(--st-navy), #1a2035);
	padding: 0.6em 1em;
}
.sitenav ul {
	text-align: left;
	margin: 0;
	padding: 0;
}
.sitenav ul li {
	list-style-type: none;
	display: inline;
}
.sitenav ul li:before {
	content: "";
}
.sitenav ul li a {
	font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
	font-weight: 500;
	color: var(--st-ivory);
	text-decoration: none;
	padding: 0.3em 0.7em;
	border-radius: 3px;
}
.sitenav ul li a:visited {
	color: var(--st-ivory);
}
.sitenav ul li a:hover {
	background-color: var(--st-amber);
	color: var(--st-navy);
}
.sitenav ul li a:active {
	color: var(--st-amber);
}

/* Tables */
table {
	background-color: #fff;
	border-collapse: collapse;
	border: 1px solid #ddd;
}
table caption {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 600;
	padding: 0.4em 0;
}
table th, table td {
	padding: 0.4em 0.7em;
	border-bottom: 1px solid #eee;
}
table tbody tr:nth-child(even) {
	background-color: #F5F2EA;
}
table.data td, table.data th {
	font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

/* Status dots, for tables like Flights that show an outcome per row */
.status-dot {
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	margin-right: 0.4em;
}
.status-dot.status-green { background-color: #4A8B5C; }
.status-dot.status-amber { background-color: var(--st-amber); }
.status-dot.status-rust  { background-color: #A2432D; }

img {
	image-orientation: none;
}

/* Homepage hero: gradient banner with the full launch photo framed on it */
.hero {
	background: linear-gradient(135deg, var(--st-navy), #3a2a1a 60%, var(--st-amber));
	padding: 3em 1.5em;
	text-align: center;
}
.hero h1, .hero h3 {
	color: var(--st-ivory);
	margin: 0.2em 0;
}
.hero .hero-photo {
	margin: 1.5em auto 0;
	max-width: 900px;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.hero .hero-photo img {
	display: block;
	width: 100%;
	height: auto;
}

/* Document list (homepage "read" section, and similar lists elsewhere):
   a labeled row per item instead of a flat bullet list */
.doc-list {
	list-style: none;
	margin: 1em 0;
	padding: 0;
	border-top: 1px solid #E6E0D2;
}
.doc-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 20px;
	padding: 16px 0;
	border-bottom: 1px solid #E6E0D2;
}
.doc-row .doc-type {
	width: 84px;
	flex-shrink: 0;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--st-amber-dark);
}
.doc-row .doc-title {
	flex-grow: 1;
	font-size: 15px;
	font-weight: 500;
	color: var(--st-text);
	text-decoration: none;
}
.doc-row .doc-title:hover { color: var(--st-amber-dark); text-decoration: underline; }
.doc-row .doc-meta {
	flex-shrink: 0;
	font-size: 13px;
	color: var(--st-text-muted);
}
.doc-row .doc-meta a { color: var(--st-text-muted); }
.doc-row .doc-meta a:hover { color: var(--st-amber-dark); }

/* Page content container: keeps body text from running edge-to-edge */
.page-content {
	max-width: 760px;
	margin: 0 auto;
	padding: 2.5em 1.5em 3em;
}
.section-label {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--st-amber-dark);
	margin: 2.2em 0 0.3em;
}
.section-label:first-of-type { margin-top: 0; }
.section-heading {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 600;
	font-size: 22px;
	margin: 0 0 1em;
	color: var(--st-text);
}
.lead {
	font-size: 17px;
	line-height: 1.6;
}

/* Collapsible document sections (documents.shtml): native <details>/<summary>
   replacing the old Adobe Spry CollapsiblePanel widgets */
.doc-section {
	max-width: 760px;
	margin: 0 auto 0.8em;
	border: 1px solid #E6E0D2;
	border-radius: 4px;
	background-color: #fff;
	overflow: hidden;
}
.doc-section summary {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 600;
	font-size: 16px;
	color: var(--st-text);
	background-color: #F5F2EA;
	padding: 0.7em 1em;
	cursor: pointer;
	list-style: none;
}
.doc-section summary::-webkit-details-marker {
	display: none;
}
.doc-section summary::before {
	content: "\25B8";
	display: inline-block;
	width: 1em;
	margin-right: 0.4em;
	color: var(--st-amber-dark);
	transition: transform 0.15s ease;
}
.doc-section[open] summary::before {
	transform: rotate(90deg);
}
.doc-section summary:hover {
	background-color: #EFE9D8;
}
.doc-section-content {
	padding: 1em 1.4em 1.2em;
}

/* Generic edge-to-edge fix: any page that drops its content straight into
   <body> (no dedicated wrapper) - the ~57 rocket mission subpages and the
   balloon subpages, mostly - gets a sensible max-width and side padding
   automatically, with no per-page markup changes needed. Pages that
   already have their own wrapper (.page-content, .pic-gallery,
   .vendor-list, .doc-section, .hero) opt out and keep their own width.
   Tables are excluded too: they already self-center via their own
   align="center" attribute, so they were never edge-crowded, and capping
   a wide multi-column table (rockets.shtml, balloons.shtml) to 900px just
   squeezes their last column narrower/taller for no benefit. */
body > *:not(.sitenav):not(.hero):not(.page-content):not(.pic-gallery):not(.vendor-list):not(.doc-section):not(.flight-plots):not(table) {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5em;
	padding-right: 1.5em;
	box-sizing: border-box;
}

/* Print: tuned for the Rockets flights table (a coworker prints rockets.shtml
   for a bulletin board), but these rules are generic enough to help any page
   with a table print more cleanly. */
@media print {
	@page {
		margin: 0.4in;
	}
	body {
		background-color: #fff;
	}
	/* The nav bar repeats on every printed page for no benefit - drop it. */
	.sitenav {
		display: none;
	}
	/* Zebra striping looks like uneven ink blotches once row heights vary
	   (short one-line rows next to long multi-link status notes), and it
	   burns toner for no real gain on paper. Use a plain border instead. */
	table {
		width: 100%;
		font-size: 10px;
	}
	table tbody tr:nth-child(even) {
		background-color: transparent;
	}
	table th, table td {
		padding: 0.15em 0.4em;
		border-bottom: 1px solid #ccc;
	}
	table caption {
		font-size: 12px;
		padding: 0.15em 0;
	}
	/* Keep a flight's row (including its wrapped status text) together
	   rather than splitting it across a page break where possible. */
	tr {
		page-break-inside: avoid;
	}
}

/* Pictures page (pictures.shtml): mission-by-mission photo gallery.
   The markup is a flat run of <p>label</p> then thumbnail links per
   mission - styled without restructuring it. */
.pic-gallery {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1em 2em 3em;
}
.pic-gallery p {
	margin: 1.6em 0 0.7em;
	line-height: 1.4;
}
.pic-gallery p:first-of-type {
	margin-top: 0;
}
/* A <p> whose text is just the mission label (no images inside it) -
   style it like a section heading. A <p> that also contains an <img>
   keeps this styling too, but it's invisible there since there's no
   text node for it to apply to. */
.pic-gallery p {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 600;
	font-size: 16px;
	color: var(--st-amber-dark);
}
.pic-gallery img {
	margin: 4px;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.2);
	vertical-align: top;
}
.pic-gallery a:hover img {
	box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* Datasheets page (datasheets.shtml): vendor-by-vendor list of links.
   Same "flat, flush against the edge" problem as pictures.shtml had -
   a centered container plus label/list spacing, no markup changes. */
.vendor-list {
	max-width: 760px;
	margin: 0 auto;
	padding: 1em 1.5em 3em;
}
.vendor-list p {
	margin: 1.6em 0 0.5em;
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 600;
	font-size: 15px;
	color: var(--st-text);
}
.vendor-list p:first-of-type {
	margin-top: 0;
}
.vendor-list ul {
	margin: 0.3em 0 1.2em;
	padding-left: 1.3em;
}
.vendor-list li {
	margin-bottom: 0.35em;
}
.vendor-list ul ul {
	margin: 0.35em 0 0.35em 0;
}

/* Mission subpages: per-flight generated plots (flight activity timeline,
   temperatures, pointing errors, star-fit quality). Was a flat stack of
   uncaptioned full-width images; now a captioned grid with the flight
   activity timeline given top billing as the summary view. */
.flight-plots {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1em 2em 3em;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5em;
}
.flight-plots figure {
	margin: 0;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.15);
	overflow: hidden;
}
.flight-plots figure.flight-plots-lead {
	grid-column: 1 / -1;
}
.flight-plots img {
	display: block;
	width: 100%;
	height: auto;
}
.flight-plots figcaption {
	padding: 10px 14px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--st-text-muted);
	border-top: 1px solid #E6E0D2;
}
@media (max-width: 760px) {
	.flight-plots { grid-template-columns: 1fr; }
}
