/**
 * Mysterious Galaxies — Mission Control components (brand-guidelines §14.5).
 * All colors come from tokens.css; nothing here hardcodes a palette, so every
 * component works across the four reading-mode × tone combinations.
 */

/* ---- Global ---- */

body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 15.5px;
	line-height: 1.75;
	margin: 0;
	transition: background .3s, color .3s;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.05;
	color: var(--ink);
}

a {
	color: var(--ink);
	text-decoration-color: var(--acc);
}

a:hover {
	color: var(--acc);
}

::selection {
	background: var(--acc);
	color: var(--bg);
}

:focus-visible {
	outline: 2px solid var(--signal);
	outline-offset: 2px;
}

/* The site is a single centered dossier column (mockup stage = 680px). */
.mg-shell {
	max-width: 680px;
	margin: 0 auto;
	padding: 0 18px;
}

.screen-reader-text,
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- 0. Skip-to-content link (WCAG 2.4.1; visible on keyboard focus) ---- */

.mg-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 10px 16px;
	background: var(--panel);
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	border: var(--hairline);
}

.mg-skip-link:focus {
	left: 8px;
	top: 8px;
	outline: 2px solid var(--signal);
	outline-offset: 2px;
}

/* ---- 1. Telemetry status bar ---- */

.mg-status {
	background: var(--inset);
	border-bottom: var(--hairline);
}

.mg-status__row {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 7px 0;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
	overflow-x: auto;
}

.mg-status__row > span {
	white-space: nowrap;
}

.mg-status__tone {
	margin-left: auto;
	color: var(--signal);
}

.mg-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--acc);
	display: inline-block;
	vertical-align: baseline;
	margin-right: 4px;
}

/* ---- 2. Site header / nav ---- */

.mg-header {
	border-bottom: 2px solid var(--acc);
}

.mg-header__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	padding: 15px 0;
}

.mg-wordmark {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink);
	text-decoration: none;
}

.mg-wordmark:hover {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--acc);
}

.mg-header__right {
	display: flex;
	gap: 14px;
	align-items: center;
}

.mg-nav ul {
	display: flex;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mg-nav a {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--signal);
	text-decoration: none;
}

.mg-nav a:hover,
.mg-nav .current-menu-item > a,
.mg-nav .current_page_item > a {
	color: var(--acc);
}

.mg-menu-toggle {
	display: none;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .05em;
	background: transparent;
	border: var(--hairline);
	color: var(--signal);
	padding: 6px 10px;
	border-radius: var(--radius-pill);
	cursor: pointer;
}

/* ---- 13. Reading toggle ---- */

.mg-toggle {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .05em;
	background: transparent;
	border: var(--hairline);
	color: var(--signal);
	padding: 6px 10px;
	border-radius: var(--radius-pill);
	cursor: pointer;
}

.mg-toggle:hover {
	border-color: var(--signal);
}

/* ---- 3. Mission patch (SVG sizing; drawing is the template part) ---- */

.mg-patch {
	flex-shrink: 0;
	display: block;
}

/* ---- 4. Briefing header ---- */

.mg-briefing {
	display: flex;
	gap: 18px;
	padding: 24px 0 20px;
	border-bottom: var(--hairline);
}

.mg-briefing__panel {
	flex: 1;
	min-width: 0;
}

.mg-briefing--framed .mg-briefing__panel {
	border: var(--hairline);
	border-radius: var(--radius);
	padding: 14px 16px;
}

.mg-eyebrow {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--acc);
	margin: 0 0 6px;
}

.mg-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 30px;
	line-height: 1.05;
	margin: 0 0 14px;
	color: var(--ink);
}

.mg-data-table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-mono);
	font-size: 11px;
}

.mg-data-table td {
	padding: 5px 0;
	border-bottom: var(--hairline);
	color: var(--mut);
	letter-spacing: .04em;
	text-transform: uppercase;
}

.mg-data-table td.v {
	text-align: right;
	color: var(--ink);
}

.mg-data-table td.v a {
	color: var(--ink);
	text-decoration: none;
}

.mg-data-table td.v a:hover {
	color: var(--acc);
}

.mg-data-table .mg-status-value {
	color: var(--signal);
}

/* Pulsing ◉ status glyph (episode briefing STATUS row). A slow "recording"
   blink; motion-safe (goes static under prefers-reduced-motion, §8). */
.mg-pulse {
	display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
	.mg-pulse {
		animation: mg-blink 1.8s ease-in-out infinite;
	}
}

@keyframes mg-blink {
	0%, 45% { opacity: 1; }
	65% { opacity: .18; }
	85%, 100% { opacity: 1; }
}

/* ---- 5. Transmission monitor (video facade) ---- */

.mg-monitor {
	margin: 20px 0;
	border: var(--hairline);
	border-radius: var(--radius);
	aspect-ratio: 16 / 9;
	position: relative;
	background: var(--panel);
	overflow: hidden;
}

.mg-monitor__facade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: inherit;
}

.mg-monitor__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .35;
}

.mg-monitor__label {
	position: absolute;
	top: 10px;
	left: 12px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--acc);
}

.mg-monitor__timecode {
	position: absolute;
	top: 10px;
	right: 12px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: .1em;
	color: var(--mut);
}

.mg-monitor__play {
	width: 52px;
	height: 52px;
	border: 1.5px solid var(--acc);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--acc);
	font-size: 20px;
	position: relative;
	z-index: 1;
}

.mg-monitor__caption {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
	position: relative;
	z-index: 1;
}

.mg-monitor iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---- 6. Mission log / manifest table ---- */

.mg-manifest {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-body);
	font-size: 11.5px;
}

.mg-manifest th {
	text-align: left;
	font-family: var(--font-mono);
	font-weight: 400;
	font-size: 10px;
	color: var(--mut);
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 7px 8px;
	border-bottom: 0.5px solid var(--rule);
}

.mg-manifest td {
	padding: 9px 8px;
	border-bottom: var(--hairline);
	letter-spacing: .03em;
	vertical-align: middle;
}

.mg-manifest .ep {
	font-family: var(--font-mono);
	color: var(--mut);
}

.mg-manifest .des {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 13px;
}

.mg-manifest .des a {
	color: var(--ink);
	text-decoration: none;
}

.mg-manifest .des a:hover {
	color: var(--acc);
}

.mg-manifest .sub {
	color: var(--mut);
	text-transform: uppercase;
	font-family: var(--font-mono);
	font-size: 10.5px;
}

.mg-manifest .dur {
	font-family: var(--font-mono);
	font-size: 11px;
}

.mg-pill {
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 3px 7px;
	border-radius: 3px;
	white-space: nowrap;
}

.mg-pill--live {
	background: color-mix(in srgb, var(--signal) 18%, transparent);
	color: var(--signal);
}

.mg-pill--logged {
	background: color-mix(in srgb, var(--ink) 12%, transparent);
	color: var(--mut);
}

.mg-pill--inbound {
	background: color-mix(in srgb, var(--acc) 18%, transparent);
	color: var(--acc);
}

/* ---- 7. Cards ---- */

.mg-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin: 16px 0;
}

.mg-card {
	border: var(--hairline);
	border-radius: var(--radius);
	padding: 14px 16px;
	background: var(--panel);
}

.mg-card__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 15px;
	margin: 8px 0 6px;
	line-height: 1.25;
}

.mg-card__title a {
	color: var(--ink);
	text-decoration: none;
}

.mg-card__title a:hover {
	color: var(--acc);
}

.mg-card__meta {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mut);
}

/* ---- 8. Section label ---- */

.mg-sect {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--signal);
	margin: 28px 0 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mg-sect::before {
	content: "";
	height: 0.5px;
	width: 22px;
	background: var(--signal);
	flex-shrink: 0;
}

.mg-sect__aside {
	margin-left: auto;
	font-family: var(--font-mono);
	font-weight: 400;
	color: var(--mut);
	letter-spacing: .1em;
	font-size: 11px;
}

/* ---- Reading body (the "technical dossier") ---- */

.mg-prose {
	max-width: var(--measure);
	padding: 6px 0 26px;
}

.mg-prose p {
	font-size: 15.5px;
	line-height: 1.75;
	margin: 0 0 18px;
	color: var(--ink);
}

.mg-prose > p:first-child,
.mg-prose .lede {
	font-size: 17px;
}

.mg-prose > p:first-child::first-letter,
.mg-prose .lede::first-letter {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 46px;
	float: left;
	line-height: .8;
	margin: 4px 10px 0 0;
	color: var(--acc);
}

/* h2 = amber section label with a hairline dash; sized up so sections stand out. */
.mg-prose h2 {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 16px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--signal);
	margin: 34px 0 14px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.mg-prose h2::before {
	content: "";
	height: 0.5px;
	width: 24px;
	background: var(--signal);
	flex-shrink: 0;
}

/* h3 = quiet subheading: smaller than h2, sentence case, ink, no dash. */
.mg-prose h3 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.35;
	color: var(--ink);
	margin: 24px 0 8px;
}

/* ---- Accordions: FAQ (.mg-faq) + Sources (.mg-sources) ----
   Native <details>/<summary>: collapsed by default, keyboard-accessible, no JS.
   Authored as a block-editor Group `.mg-faq` of Details blocks, or a single
   Details `.mg-sources`. inc/schema.php reads `.mg-faq` to build FAQPage. */

.mg-prose .mg-faq {
	margin: 18px 0;
	border-bottom: var(--hairline);
}

.mg-prose .mg-faq details,
.mg-prose details.mg-sources {
	border-top: var(--hairline);
	margin: 0;
}

.mg-prose details.mg-sources {
	margin: 24px 0 0;
}

.mg-prose .mg-faq summary,
.mg-prose details.mg-sources summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 2px;
}

.mg-prose .mg-faq summary::-webkit-details-marker,
.mg-prose details.mg-sources summary::-webkit-details-marker {
	display: none;
}

/* shared +/- toggle glyph */
.mg-prose .mg-faq summary::after,
.mg-prose details.mg-sources summary::after {
	content: "+";
	margin-left: auto;
	font-family: var(--font-mono);
	font-size: 16px;
	line-height: 1;
	color: var(--signal);
	flex-shrink: 0;
}

.mg-prose .mg-faq details[open] > summary::after,
.mg-prose details.mg-sources[open] > summary::after {
	content: "\2212"; /* minus sign */
}

/* FAQ question */
.mg-prose .mg-faq summary {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 15px;
	line-height: 1.3;
	color: var(--ink);
}

.mg-prose .mg-faq summary:hover,
.mg-prose .mg-faq details[open] > summary {
	color: var(--acc);
}

/* FAQ answer */
.mg-prose .mg-faq details > *:not(summary) {
	margin: 0 0 14px;
	padding-left: 22px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--ink);
}

/* Sources: mono uppercase, like a section label */
.mg-prose details.mg-sources summary {
	font-family: var(--font-mono);
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: 12px;
	color: var(--signal);
}

.mg-prose details.mg-sources summary:hover,
.mg-prose details.mg-sources[open] > summary {
	color: var(--acc);
}

.mg-prose details.mg-sources > *:not(summary) {
	margin: 0 0 14px;
}

/* subtle reveal, motion-safe */
@media (prefers-reduced-motion: no-preference) {
	.mg-prose details[open] > *:not(summary) {
		animation: mg-reveal .18s ease;
	}
}

@keyframes mg-reveal {
	from { opacity: 0; }
	to { opacity: 1; }
}

.mg-prose img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius);
}

/* ---- Prose tables (Mission Control instrument styling) ----
 * Block-editor tables arrive as <figure class="wp-block-table"><table>. The
 * figure is the horizontal scroll container on narrow viewports. The scroll
 * cue is a pure-CSS edge fade: two "cover" gradients (background-attachment:
 * local) ride with the content and hide the shadow when that edge is reached,
 * while two worm-red shadow gradients (attachment: scroll) stay pinned to the
 * container edges — so a soft red glow shows only while there is more table to
 * scroll toward. No JS. Browsers without color-mix simply get no glow.
 */
.mg-prose figure.wp-block-table {
	margin: 22px 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--radius);
	background:
		linear-gradient(to right, var(--bg) 32%, transparent) 0 0 / 46px 100% no-repeat local,
		linear-gradient(to left, var(--bg) 32%, transparent) 100% 0 / 46px 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--acc) 22%, transparent), transparent) 0 0 / 16px 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--acc) 22%, transparent), transparent) 100% 0 / 16px 100% no-repeat scroll;
}

.mg-prose table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.5;
}

.mg-prose table th {
	font-family: var(--font-mono);
	font-weight: 400;
	font-size: 10.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-align: left;
	color: var(--mut);
	background: var(--inset);
	padding: 9px 14px;
	border-bottom: 0.5px solid var(--rule);
	white-space: nowrap;
}

.mg-prose table td {
	padding: 9px 14px;
	border-bottom: var(--hairline);
	color: var(--ink);
	vertical-align: top;
}

.mg-prose table tr:last-child td {
	border-bottom: 0;
}

.mg-prose table a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--acc) 50%, transparent);
	text-underline-offset: 2px;
}

.mg-prose table a:hover {
	color: var(--acc);
	text-decoration-color: var(--acc);
}

.mg-prose figure.wp-block-table figcaption {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mut);
	text-align: left;
	margin-top: 8px;
}

/* ---- 9. Pull quote ---- */

.mg-prose blockquote,
.mg-pq {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 20px;
	line-height: 1.4;
	color: var(--ink);
	border-left: 2px solid var(--acc);
	padding: 6px 0 6px 18px;
	margin: 24px 0;
}

.mg-prose blockquote p {
	font-size: inherit;
	line-height: inherit;
	margin: 0;
}

.mg-prose blockquote cite,
.mg-pq cite {
	display: block;
	font-family: var(--font-mono);
	font-weight: 400;
	font-style: normal;
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
	margin-top: 10px;
}

/* ---- References / source line ---- */

.mg-refs {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--mut);
	line-height: 1.7;
	border-top: var(--hairline);
	padding-top: 14px;
	margin-top: 8px;
}

/* ---- 10. Buttons & inputs ---- */

.mg-btn {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 9px 14px;
	border-radius: var(--radius-pill);
	background: var(--signal);
	color: var(--bg);
	border: 0;
	cursor: pointer;
	text-decoration: none;
}

.mg-btn:hover {
	background: var(--acc);
	color: var(--bg);
}

.mg-btn--secondary {
	background: transparent;
	color: var(--signal);
	border: var(--hairline);
	font-weight: 400;
}

.mg-btn--secondary:hover {
	background: transparent;
	color: var(--acc);
	border-color: var(--acc);
}

.mg-input,
.mg-prose input[type="text"],
.mg-prose input[type="email"],
.mg-prose input[type="search"],
.mg-prose input[type="url"],
.mg-prose textarea,
.mg-comments input[type="text"],
.mg-comments input[type="email"],
.mg-comments input[type="url"],
.mg-comments textarea,
.mg-search input[type="search"] {
	background: var(--inset);
	border: var(--hairline);
	border-radius: var(--radius-input);
	color: var(--ink);
	padding: 9px 12px;
	font-family: var(--font-mono);
	font-size: 12px;
}

/* ---- CTA panel (YouTube + RSS; newsletter insertion point) ---- */

.mg-cta {
	margin: 16px 0 20px;
	border: 0.5px solid var(--signal);
	border-radius: var(--radius);
	padding: 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.mg-cta__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 15px;
	text-transform: uppercase;
}

.mg-cta__sub {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--mut);
	letter-spacing: .06em;
	text-transform: uppercase;
	margin-top: 3px;
}

.mg-cta__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* ---- Prev/next episode nav ---- */

.mg-adjacent {
	display: flex;
	justify-content: space-between;
	align-items: stretch;
	gap: 12px;
	margin: 8px 0 0;
}

.mg-adjacent__item {
	flex: 1;
	padding: 16px;
	border: var(--hairline);
	border-radius: var(--radius);
	text-decoration: none;
	display: block;
}

.mg-adjacent__item--next {
	text-align: right;
}

.mg-adjacent__label {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
}

.mg-adjacent__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 15px;
	color: var(--ink);
	margin-top: 4px;
}

.mg-adjacent__item:hover .mg-adjacent__title {
	color: var(--acc);
}

/* ---- 11. Comments — "Transmissions from ground control" ---- */

.mg-comments {
	margin-top: 28px;
	border-top: var(--hairline);
	padding-top: 8px;
}

.mg-comments .comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mg-comments .comment {
	border: var(--hairline);
	border-radius: var(--radius);
	padding: 14px 16px;
	margin: 0 0 12px;
	background: var(--panel);
}

.mg-comments .comment .children {
	list-style: none;
	margin: 12px 0 0;
	padding: 0 0 0 14px;
	border-left: 2px solid var(--rule);
}

.mg-comments .comment-meta,
.mg-comments .comment-author,
.mg-comments .comment-metadata {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mut);
}

.mg-comments .comment-author .fn {
	color: var(--signal);
	font-style: normal;
	font-weight: 700;
}

.mg-comments .comment-content {
	font-size: 14.5px;
	line-height: 1.7;
}

.mg-comments .reply a {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--signal);
	text-decoration: none;
}

.mg-comments .comment-form label {
	display: block;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
	margin-bottom: 4px;
}

.mg-comments .comment-form p {
	margin: 0 0 14px;
}

.mg-comments .comment-form input[type="text"],
.mg-comments .comment-form input[type="email"],
.mg-comments .comment-form input[type="url"],
.mg-comments .comment-form textarea {
	width: 100%;
	box-sizing: border-box;
}

.mg-comments .form-submit input[type="submit"] {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 9px 14px;
	border-radius: var(--radius-pill);
	background: var(--signal);
	color: var(--bg);
	border: 0;
	cursor: pointer;
}

/* ---- 12. Footer ---- */

.mg-footer {
	border-top: var(--hairline);
	background: var(--inset);
	margin-top: 28px;
}

.mg-footer__row {
	padding: 14px 0;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.mg-footer a {
	color: var(--mut);
	text-decoration: none;
}

.mg-footer a:hover {
	color: var(--signal);
}

/* Machine downlink: the agent-facing endpoint list. */
.mg-footer__downlink {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 22px;
	padding: 18px 0 16px;
}

.mg-footer__label {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--signal);
}

.mg-footer__endpoints {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	font-family: var(--font-mono);
	font-size: 13px;
	letter-spacing: .02em;
}

.mg-footer__endpoints a {
	color: var(--ink);
}

/* Human companion pages. */
.mg-footer__pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	padding: 14px 0;
	border-top: var(--hairline);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.mg-footer__pages a:not(:last-child)::after {
	content: "·";
	margin-left: 16px;
	color: var(--rule);
}

/* Identity line + status. */
.mg-footer__row {
	border-top: var(--hairline);
}

.mg-footer__ident {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.mg-footer__status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--signal);
}

.mg-footer__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--signal);
}

/* ---- 14. 404 — SIGNAL LOST ---- */

.mg-404 {
	text-align: center;
	padding: 60px 0;
}

.mg-404__code {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: .2em;
	color: var(--signal);
}

.mg-404__title {
	font-size: 42px;
	margin: 12px 0;
	letter-spacing: .06em;
}

.mg-404__sub {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--mut);
	letter-spacing: .08em;
	text-transform: uppercase;
	margin-bottom: 28px;
}

/* ---- Search ---- */

.mg-search {
	display: flex;
	gap: 10px;
	margin: 16px 0;
}

.mg-search input[type="search"] {
	flex: 1;
}

/* ---- Archive pagination ---- */

.mg-pagination {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin: 24px 0;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: .08em;
}

.mg-pagination .page-numbers {
	padding: 6px 10px;
	border: var(--hairline);
	border-radius: var(--radius-pill);
	color: var(--signal);
	text-decoration: none;
}

.mg-pagination .page-numbers.current {
	background: var(--signal);
	color: var(--bg);
	border-color: var(--signal);
}

/* ---- Writers hub (/writers/) ---- */

.mg-alpha {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 20px 0 8px;
	padding-bottom: 18px;
	border-bottom: var(--hairline);
}

.mg-alpha__ltr {
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .04em;
	border: var(--hairline);
	border-radius: var(--radius-pill);
	background: var(--panel);
	color: var(--ink);
	text-decoration: none;
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}

a.mg-alpha__ltr:hover,
a.mg-alpha__ltr:focus-visible {
	background: var(--signal);
	border-color: var(--signal);
	color: var(--bg);
}

/* Faded, non-clickable letters have no author on file. */
.mg-alpha__ltr.is-empty {
	background: transparent;
	border-color: transparent;
	color: var(--mut);
	opacity: .38;
	cursor: default;
}

.mg-writers__group {
	scroll-margin-top: 84px;
}

.mg-writers__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 12px 0 4px;
}

.mg-writers__empty {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
	opacity: .6;
	margin: 8px 0 2px;
}

.mg-writer {
	position: relative;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 16px 18px;
	border: var(--hairline);
	border-radius: var(--radius);
	background: var(--panel);
	transition: border-color .15s ease;
}

.mg-writer:hover,
.mg-writer:focus-within {
	border-color: var(--acc);
}

.mg-writer__body {
	flex: 1;
	min-width: 0;
}

.mg-writer__name {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 19px;
	line-height: 1.15;
	margin: 0 0 6px;
}

.mg-writer__link {
	color: var(--ink);
	text-decoration: none;
}

.mg-writer:hover .mg-writer__link,
.mg-writer:focus-within .mg-writer__link {
	color: var(--acc);
}

/* Stretched link: the whole card is the click target. z-index keeps the overlay
   above the positioned portrait so clicks there register too. */
.mg-writer__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: var(--radius);
}

.mg-writer__link:focus-visible::after {
	outline: 2px solid var(--signal);
	outline-offset: 2px;
}

.mg-writer__desc {
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.55;
	color: var(--ink);
	margin: 0 0 8px;
	max-width: 54ch;
}

.mg-writer__meta {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mut);
	margin: 0;
}

.mg-writer__portrait {
	position: relative;
	flex-shrink: 0;
	width: 92px;
	height: 92px;
	overflow: hidden;
	border: var(--hairline);
	border-radius: var(--radius);
	background: var(--inset);
}

.mg-writer__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale(1) contrast(1.03);
	transition: filter .3s ease;
}

.mg-writer:hover .mg-writer__img,
.mg-writer:focus-within .mg-writer__img {
	filter: grayscale(0);
}

.mg-writer__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 34px;
	color: var(--mut);
}

/* ---- Author bio (episode + essay sign-off) ---- */

.mg-author {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	max-width: var(--measure);
	margin: 4px 0 8px;
	padding: 22px 0 4px;
	border-top: var(--hairline);
}

.mg-author__portrait {
	position: relative;
	flex-shrink: 0;
	width: 120px;
	height: 120px;
	overflow: hidden;
	border: var(--hairline);
	border-radius: var(--radius);
	background: var(--inset);
}

.mg-author__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale(1) contrast(1.03);
	transition: filter .3s ease;
}

.mg-author:hover .mg-author__img,
.mg-author:focus-within .mg-author__img {
	filter: grayscale(0);
}

.mg-author__body {
	flex: 1;
	min-width: 0;
}

.mg-author__body p {
	font-family: var(--font-body);
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--ink);
	margin: 0 0 12px;
}

.mg-author__body .mg-eyebrow {
	margin-bottom: 10px;
}

.mg-author__body p:last-child {
	margin-bottom: 0;
}

.mg-author__cta a {
	color: var(--acc);
	text-decoration: none;
}

.mg-author__cta a:hover {
	text-decoration: underline;
}

/* ---- 15. Back-to-top control ----
   Fixed hairline panel in the mission-control idiom: ▲ glyph over a mono TOP
   label. Hidden (and out of the tab order via visibility) until totop.js adds
   .is-visible past one viewport of scroll. Sits below the skip link (z 100). */

.mg-totop {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 90;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	width: 46px;
	padding: 8px 0 7px;
	background: var(--panel);
	border: var(--hairline);
	border-radius: var(--radius);
	color: var(--signal);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s, border-color .15s ease, color .15s ease;
}

.mg-totop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mg-totop:hover {
	border-color: var(--acc);
	color: var(--acc);
}

.mg-totop__glyph {
	font-size: 11px;
	line-height: 1;
}

.mg-totop__label {
	font-family: var(--font-mono);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

@media (max-width: 480px) {
	.mg-totop {
		right: 12px;
		bottom: 12px;
	}
}

/* ---- Motion (§14.7) ---- */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* ---- Responsive (§14.8) ---- */

@media (max-width: 680px) {
	.mg-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--panel);
		border-bottom: 2px solid var(--acc);
		padding: 10px 18px 16px;
		z-index: 10;
	}

	.mg-nav.is-open {
		display: block;
	}

	.mg-nav ul {
		flex-direction: column;
		gap: 12px;
	}

	.mg-header {
		position: relative;
	}

	.mg-menu-toggle {
		display: inline-block;
	}

	/* Briefing stacks: patch above text */
	.mg-briefing {
		flex-direction: column;
		align-items: flex-start;
	}

	.mg-title {
		font-size: 26px;
	}

	/* Author bio stacks: portrait above the copy */
	.mg-author {
		flex-direction: column;
		gap: 16px;
	}

	/* Manifest → stacked label/value rows */
	.mg-manifest thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.mg-manifest tr {
		display: block;
		border-bottom: var(--hairline);
		padding: 10px 0;
	}

	.mg-manifest td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		border-bottom: 0;
		padding: 3px 0;
	}

	.mg-manifest td::before {
		content: attr(data-label);
		font-family: var(--font-mono);
		font-size: 10px;
		letter-spacing: .1em;
		text-transform: uppercase;
		color: var(--mut);
	}
}

@media (max-width: 480px) {
	.mg-shell {
		padding: 0 14px;
	}

	.mg-title {
		font-size: 23px;
	}

	.mg-404__title {
		font-size: 32px;
	}

	.mg-prose > p:first-child::first-letter,
	.mg-prose .lede::first-letter {
		font-size: 38px;
	}

	.mg-writer {
		gap: 12px;
		padding: 14px;
	}

	.mg-writer__portrait {
		width: 64px;
		height: 64px;
	}

	.mg-writer__name {
		font-size: 17px;
	}

	.mg-writer__placeholder {
		font-size: 26px;
	}
}
