/*
Theme Name: The Phage
Theme URI: https://www.thephage.xyz
Author: Raphael Hans Lwesya
Author URI: https://www.thephage.xyz
Description: Magazine and training theme for The Phage — bacteriophage research, protocols, events, jobs and structured learning. Classic PHP templates, no build step, no jQuery. Includes a gated linear training system, a plugin-free student dashboard, a click-to-load video engine, and a full schema.org and AI-crawler layer.
Version: 3.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: phage
Tags: magazine, education, news, accessibility-ready, translation-ready, custom-menu, featured-images
*/

/* ==========================================================================
   THE PHAGE — STYLESHEET

   This is a rewrite of the v1 stylesheet, not a redesign. Every class name,
   every measurement and every colour is carried over deliberately, so the
   rendered site is the site you already have.

   What changed is the construction:

   - v1 had SEVENTEEN sections annotated "(USE LAST BLOCK)" — the same
     selectors defined two or three times with a later block winning. That
     duplication was most of the 108 KB. Each is resolved here to the block
     that actually rendered, once.
   - Hard-coded colours (#ffffff, #4b5563, #047857, rgba(16,185,129,0.4)…)
     appeared throughout and had to be overridden one by one in the dark-mode
     section, which is why v1's dark mode had gaps. Everything is a token now,
     so dark mode is a token swap and cannot drift.
   - Component styles are grouped by component rather than by the order they
     were written in.

   CONTENTS
     1.  Design tokens
     2.  Reset and base
     3.  Layout
     4.  Header and navigation
     5.  Buttons and pills
     6.  Sections, cards, grids
     7.  Hero
     8.  Topic strip
     9.  Jobs
     10. Sidebar widgets
     11. Entry (single post / protocol / event)
     12. Protocol components
     13. Event components
     14. Team
     15. Training and dashboard shell
     16. Share row
     17. Forms
     18. Search and filters
     19. Pagination
     20. Comments
     21. Notices, ads, newsletter, announcement
     22. Footer
     23. Utilities
     24. Motion, print, forced-colours
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS

   Three theme states, in cascade order:
     :root                                → light, and the default
     @media (prefers-color-scheme: dark)  → OS preference, unless the reader
       :root:not([data-theme="light"])      has explicitly chosen light
     :root[data-theme="dark"]             → explicit choice wins either way

   Every colour has its definition in the first block. Nothing gets its only
   value inside a media query.
   ========================================================================== */

:root {
	/* --- Brand. Carried over from v1 unchanged. --------------------------- */
	--accent: #10b981;
	--accent-ink: #047857;          /* accent text on light surfaces — AA on white */
	--accent-hover: #059669;
	--accent-soft: #d1fae5;
	--accent-line: rgba(16, 185, 129, 0.4);
	--accent-on: #ffffff;           /* text on an accent fill */

	/* --- Surfaces -------------------------------------------------------- */
	--bg: #f9fafb;
	--surface: #ffffff;
	--surface-2: #f3f4f6;
	--surface-3: #e5e7eb;

	/* --- Ink ------------------------------------------------------------- */
	--primary: #111827;             /* headings */
	--text: #111827;
	--text-2: #4b5563;              /* card excerpts in v1 */
	--muted: #6b7280;
	--on-dark: #f9fafb;             /* text over the hero overlay / footer */
	--on-dark-2: #e5e7eb;
	--on-dark-3: #94a3b8;

	/* --- Lines ----------------------------------------------------------- */
	--border: #e5e7eb;
	--border-2: #d1d5db;

	/* --- States ---------------------------------------------------------- */
	--info: #0369a1;
	--info-soft: #ecfeff;
	--info-line: #bae6fd;
	--warn: #b45309;
	--warn-soft: #fef3c7;
	--danger: #b91c1c;
	--danger-soft: #fee2e2;

	/* --- Footer (dark in both themes — it is a deliberate block) ---------- */
	--footer-bg: #020617;
	--footer-text: #94a3b8;
	--footer-heading: #f8fafc;
	--footer-line: #1e293b;

	/* --- Hero ------------------------------------------------------------ */
	--hero-wash: radial-gradient(circle at top left, #ecfeff 0, #ffffff 45%, #f9fafb 100%);
	--hero-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.55));

	/* --- Elevation ------------------------------------------------------- */
	--shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
	--shadow-lift: 0 18px 40px rgba(15, 23, 42, 0.06);

	/* --- Shape ----------------------------------------------------------- */
	--radius: 0.75rem;
	--radius-lg: 0.85rem;
	--radius-xl: 1.25rem;
	--radius-pill: 999px;

	/* --- Type ------------------------------------------------------------ */
	--font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	/* --- Layout ---------------------------------------------------------- */
	--max-width: 1160px;
	--gutter: 1.25rem;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--accent: #34d399;
		--accent-ink: #34d399;
		--accent-hover: #6ee7b7;
		--accent-soft: #064e3b;
		--accent-line: rgba(52, 211, 153, 0.35);
		--accent-on: #022c22;

		--bg: #0b1220;
		--surface: #111827;
		--surface-2: #1b2433;
		--surface-3: #263040;

		--primary: #f9fafb;
		--text: #e5e7eb;
		--text-2: #cbd5e1;
		--muted: #9ca3af;

		--border: #374151;
		--border-2: #4b5563;

		--info: #7dd3fc;
		--info-soft: #0c2733;
		--info-line: #164e63;
		--warn: #fbbf24;
		--warn-soft: #3a2c08;
		--danger: #f87171;
		--danger-soft: #3d1618;

		--hero-wash: radial-gradient(circle at top left, #0f2b2b 0, #0f1729 45%, #0b1220 100%);
		--hero-overlay: linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.62));

		--shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
		--shadow-lift: 0 18px 40px rgba(0, 0, 0, 0.45);

		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--accent: #34d399;
	--accent-ink: #34d399;
	--accent-hover: #6ee7b7;
	--accent-soft: #064e3b;
	--accent-line: rgba(52, 211, 153, 0.35);
	--accent-on: #022c22;

	--bg: #0b1220;
	--surface: #111827;
	--surface-2: #1b2433;
	--surface-3: #263040;

	--primary: #f9fafb;
	--text: #e5e7eb;
	--text-2: #cbd5e1;
	--muted: #9ca3af;

	--border: #374151;
	--border-2: #4b5563;

	--info: #7dd3fc;
	--info-soft: #0c2733;
	--info-line: #164e63;
	--warn: #fbbf24;
	--warn-soft: #3a2c08;
	--danger: #f87171;
	--danger-soft: #3d1618;

	--hero-wash: radial-gradient(circle at top left, #0f2b2b 0, #0f1729 45%, #0b1220 100%);
	--hero-overlay: linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.62));

	--shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
	--shadow-lift: 0 18px 40px rgba(0, 0, 0, 0.45);

	color-scheme: dark;
}


/* ==========================================================================
   2. RESET AND BASE
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 5.5rem;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }

h1, h2, h3, h4, h5, h6 {
	color: var(--primary);
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p, li, dd { text-wrap: pretty; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

input, button, textarea, select { font: inherit; color: inherit; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 1.75rem 0;
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }


/* ==========================================================================
   3. LAYOUT
   ========================================================================== */

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.phage-main { flex: 1 0 auto; }

.phage-container {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1.5rem var(--gutter);
}

@media (min-width: 992px) {
	.phage-container { padding: 2.5rem 1.5rem; }
}

/* A container that only sets width, with no vertical padding of its own. */
.phage-container-flush { padding-top: 0; padding-bottom: 0; }

.phage-main-layout {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 1.3fr);
	gap: 1.75rem;
	align-items: start;
	margin-top: 1.75rem;
}

.phage-main-layout-wide { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 960px) {
	.phage-main-layout { grid-template-columns: minmax(0, 1fr); }
}

.phage-main-content { min-width: 0; }

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

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999;
}

.skip-link:focus {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	left: 0.75rem;
	background: var(--accent);
	color: var(--accent-on);
	padding: 0.6rem 1.1rem;
	border-radius: var(--radius);
	font-weight: 600;
	text-decoration: none;
}


/* ==========================================================================
   4. HEADER AND NAVIGATION
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: saturate(150%) blur(10px);
	border-bottom: 1px solid var(--border);
}

.site-header-inner {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1.5rem;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0.65rem var(--gutter);
}

.site-title { margin: 0; font-size: 1.1rem; font-weight: 700; }

.site-title-link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--primary);
}

.site-title-link:hover { opacity: 0.9; text-decoration: none; }

.site-logo {
	color: var(--primary);
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	transition: transform 0.3s ease;
}

.site-title-link:hover .site-logo { transform: scale(1.04); }

/*
 * The logo mark.
 *
 * The file is a single path filled with `currentColor`. Used as a MASK rather
 * than as an <img>, the browser paints `background-color` through its alpha
 * channel — so the mark is whatever colour its container's text is. That gives
 * an external, cached file the recolouring behaviour of an inline SVG:
 * dark in light mode, white in dark mode, white in the footer, with no second
 * file and no extra request.
 *
 * The URL is relative to this stylesheet, which sits beside /svg.
 */
.site-logo-mark,
.site-footer-logo-link .site-logo-mark {
	display: block;
	background-color: currentColor;
	-webkit-mask: url(svg/The_phage_logo.svg) center / contain no-repeat;
	mask: url(svg/The_phage_logo.svg) center / contain no-repeat;
}

/* Fallback for the rare engine without mask support: show the file itself. */
@supports not ((-webkit-mask-image: url(#m)) or (mask-image: url(#m))) {
	.site-logo-mark {
		background: url(svg/The_phage_logo.svg) center / contain no-repeat;
	}
}

.site-logo svg, .site-logo img { width: 100%; height: 100%; display: block; }
.site-logo-text { display: none; }

@media (min-width: 560px) {
	.site-logo-text {
		display: inline;
		font-size: 1.05rem;
		font-weight: 700;
		letter-spacing: -0.02em;
		color: var(--primary);
	}
}

/* --- Primary nav ------------------------------------------------------- */

.main-nav { justify-self: center; }

.main-nav-list {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-nav-list > li > a {
	color: var(--text);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	white-space: nowrap;
	padding: 0.35rem 0;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav-list > li > a:hover,
.main-nav-list > .current-menu-item > a,
.main-nav-list > .current-menu-parent > a,
.main-nav-list > .current-post-ancestor > a {
	color: var(--accent-ink);
	border-bottom-color: var(--accent);
	text-decoration: none;
}

/* Sub-menus */
.main-nav-list li { position: relative; }

.main-nav-list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 12rem;
	list-style: none;
	margin: 0;
	padding: 0.4rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-soft);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 20;
}

.main-nav-list li:hover > .sub-menu,
.main-nav-list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.main-nav-list .sub-menu a {
	display: block;
	padding: 0.45rem 0.6rem;
	border-radius: 6px;
	font-size: 0.88rem;
	color: var(--text);
	text-decoration: none;
}

.main-nav-list .sub-menu a:hover { background: var(--surface-2); color: var(--accent-ink); }

/* --- Header actions ---------------------------------------------------- */

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.header-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	background: none;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	color: var(--muted);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.header-icon-btn:hover { color: var(--primary); border-color: var(--border-2); }

.theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* --- Header search -----------------------------------------------------
 *
 * The form is in the markup on every page, collapsed. Opening it changes no
 * layout above it, so there is no shift — the panel expands below the header
 * bar and pushes nothing.
 */

.header-search {
	border-top: 1px solid var(--border);
	background: var(--surface);
	animation: phage-search-in 0.18s ease;
}

.header-search-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0.85rem var(--gutter);
}

.header-search .phage-search-form { max-width: 34rem; margin: 0 auto; }

@keyframes phage-search-in {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.header-search { animation: none; }
}

/* The toggle switches to an X while the panel is open. */
.search-toggle[aria-expanded="true"] {
	background: var(--accent-soft);
	border-color: var(--accent);
	color: var(--accent-ink);
}

/* Search inside the mobile drawer. */
.mobile-nav-search { display: none; }

/* --- Hamburger --------------------------------------------------------- */

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 26px;
	height: 18px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	z-index: 1100;
}

.nav-toggle-bar {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--primary);
	border-radius: 2px;
	transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav-actions { display: none; }

@media (max-width: 900px) {
	.nav-toggle { display: flex; }
	.header-actions .phage-button { display: none; }

	/* The drawer has its own search field, so the panel toggle is redundant. */
	.search-toggle { display: none; }
	.mobile-nav-search { display: block; margin-bottom: 1.25rem; }

	.main-nav {
		position: fixed;
		inset: 3.9rem 0 0;
		display: none;
		background: var(--bg);
		padding: 1.5rem var(--gutter) 2rem;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 1050;
	}

	.main-nav[data-open] { display: block; }

	.main-nav-list { flex-direction: column; align-items: stretch; gap: 0; }

	.main-nav-list > li > a {
		display: block;
		padding: 0.9rem 0;
		font-size: 1.05rem;
		border-bottom: 1px solid var(--border);
		border-top: 0;
	}

	.main-nav-list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		border: 0;
		box-shadow: none;
		padding: 0 0 0 1rem;
		background: none;
	}

	.mobile-nav-actions {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
		margin-top: 2rem;
	}

	.mobile-nav-actions .phage-button { width: 100%; }

	body[data-nav-open] { overflow: hidden; }
}


/* ==========================================================================
   5. BUTTONS AND PILLS
   ========================================================================== */

.phage-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.45rem 1.2rem;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

.phage-button:hover { text-decoration: none; }
.phage-button:active { transform: translateY(1px); }

.phage-button-light {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-on);
}

.phage-button-light:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-on); }

.phage-button-outline {
	background: var(--surface);
	border-color: var(--border);
	color: var(--primary);
}

.phage-button-outline:hover { border-color: var(--accent); color: var(--accent-ink); }

.phage-button-ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.55);
	color: #ffffff;
}

.phage-button-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }

.phage-button-lg { padding: 0.7rem 1.6rem; font-size: 1rem; }
.phage-button-sm { padding: 0.3rem 0.85rem; font-size: 0.82rem; }
.phage-button-block { width: 100%; }

.phage-button[disabled],
.phage-button.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

/* --- Pills ------------------------------------------------------------- */

.phage-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.2rem 0.65rem;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

.phage-pill-primary {
	background: var(--accent-soft);
	border-color: var(--accent-line);
	color: var(--accent-ink);
}

.phage-pill-outline {
	background: var(--surface);
	border-color: var(--border);
	color: var(--muted);
}

.phage-pill-job {
	background: var(--info-soft);
	border-color: var(--info-line);
	color: var(--info);
}

.phage-pill-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.phage-pill-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.phage-pill--lowercase { text-transform: none; letter-spacing: 0.01em; }
.phage-pill-lg { padding: 0.4rem 1rem; font-size: 0.85rem; }


/* ==========================================================================
   6. SECTIONS, CARDS, GRIDS
   ========================================================================== */

.phage-section { margin-top: 1.75rem; }
.phage-section:first-child { margin-top: 0; }

.phage-section-header { margin-bottom: 1rem; }

.phage-section-header h1,
.phage-section-header h2 {
	font-size: 1.3rem;
	margin: 0 0 0.25rem;
	color: var(--primary);
}

.phage-section-header p {
	margin: 0;
	font-size: 0.94rem;
	color: var(--muted);
}

.phage-section-header-inline {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1rem;
	flex-wrap: wrap;
}

.phage-section-description { color: var(--muted); font-size: 0.94rem; }

.phage-grid { display: grid; gap: 1.1rem; }
.phage-grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.phage-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.phage-grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

/* --- Card -------------------------------------------------------------- */

.phage-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	padding: 0.85rem 0.95rem 1rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.phage-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lift);
	border-color: var(--accent-line);
}

.phage-card-flat { box-shadow: none; }
.phage-card-flat:hover { transform: none; box-shadow: none; }

.phage-card-thumb-link {
	display: block;
	margin-bottom: 0.6rem;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface-2);
	aspect-ratio: 16 / 9;
}

.phage-card-thumb {
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.phage-card:hover .phage-card-thumb { transform: scale(1.03); }

.phage-card-body { padding: 0; display: flex; flex-direction: column; flex: 1; }

.phage-card-title {
	margin: 0.35rem 0 0;
	font-size: 1.02rem;
	font-weight: 650;
	line-height: 1.3;
}

.phage-card-title a { color: var(--primary); text-decoration: none; }
.phage-card-title a:hover { color: var(--accent-ink); text-decoration: underline; }

.phage-card-meta {
	margin-top: 0.3rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.75rem;
	font-size: 0.8rem;
	color: var(--muted);
}

.phage-card-excerpt {
	margin: 0.55rem 0 0;
	font-size: 0.88rem;
	color: var(--text-2);
	flex: 1;
}

.phage-card-side { padding: 0.8rem 0.9rem 0.95rem; }

.phage-card-footer {
	margin-top: 0.85rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.phage-empty {
	padding: 3rem 1.25rem;
	text-align: center;
	color: var(--muted);
	background: var(--surface);
	border: 1px dashed var(--border-2);
	border-radius: var(--radius-lg);
}


/* ==========================================================================
   7. HERO
   ========================================================================== */

.phage-hero {
	background: var(--hero-wash);
	border-bottom: 1px solid var(--border);
	padding: 2.3rem 0 1.8rem;
}

.phage-hero-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 var(--gutter);
	display: grid;
	grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.1fr);
	gap: 1.75rem;
}

.phage-hero-inner--single { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 960px) {
	.phage-hero-inner { grid-template-columns: minmax(0, 1fr); }
}

.phage-hero-main {
	position: relative;
	min-height: 320px;
	border-radius: var(--radius-xl);
	overflow: hidden;
	background-color: var(--surface-3);
	display: flex;
	align-items: flex-end;
}

.phage-hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.phage-hero-overlay {
	position: absolute;
	inset: 0;
	background: var(--hero-overlay);
}

.phage-hero-content {
	position: relative;
	padding: 1.75rem 1.9rem;
	max-width: 560px;
	color: var(--on-dark);
}

.phage-hero-eyebrow {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--accent-soft);
}

.phage-hero-content .phage-pill { margin-top: 0.7rem; }

.phage-hero-title {
	font-size: clamp(1.6rem, 1.15rem + 2vw, 2.15rem);
	line-height: 1.1;
	letter-spacing: -0.03em;
	margin: 0.7rem 0 0.45rem;
	color: var(--on-dark);
}

.phage-hero-title a { color: var(--on-dark); text-decoration: none; }
.phage-hero-title a:hover { color: #ffffff; text-decoration: underline; }

.phage-hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.6rem;
	font-size: 0.82rem;
	color: var(--on-dark-2);
}

.phage-hero-excerpt {
	margin: 0.4rem 0 1rem;
	font-size: 0.95rem;
	color: var(--on-dark-2);
}

.phage-hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.phage-hero-side { display: flex; flex-direction: column; gap: 0.9rem; }

/* Text-only hero, used by archives and the fallback front page. */
.phage-hero--text { padding: 2.5rem 0 2rem; }

.phage-hero-fallback,
.phage-hero-textblock {
	max-width: 46rem;
	padding: 0;
}

.phage-hero--text .phage-hero-eyebrow { color: var(--accent-ink); }

.phage-hero--text .phage-hero-title,
.phage-hero--text .phage-hero-title a {
	color: var(--primary);
	font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.4rem);
}

.phage-hero--text .phage-hero-excerpt { color: var(--muted); font-size: 1rem; }
.phage-hero--text .phage-hero-meta { color: var(--muted); }


/* --- Hero search -------------------------------------------------------
 *
 * Sits at the top of the hero's side column. On a reference site this is the
 * most-used control on the page, so it gets the most valuable real estate the
 * layout has left after the featured story.
 */

.phage-hero-search {
	padding: 1.1rem 1.15rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
}

.phage-hero-search-title {
	margin: 0 0 0.7rem;
	font-size: 0.95rem;
	font-weight: 700;
}

.phage-hero-search .phage-archive-search { margin-top: 0; max-width: none; }

.phage-hero-search .phage-search-form input[type="search"] { flex: 1; min-width: 0; }

@media (max-width: 520px) {
	.phage-hero-search .phage-search-form { flex-wrap: wrap; }
	.phage-hero-search .phage-search-form .phage-button { width: 100%; }
}

/* ==========================================================================
   7b. BROWSE STRIP

   Four cards naming the site's main sections with a real count on each.
   "24 protocols" communicates depth in a way a link labelled "Protocols"
   cannot, and it is the cheapest possible signal to a first-time visitor that
   this is a reference site rather than a blog.
   ========================================================================== */

.phage-browse { padding-top: 1.75rem; }

.phage-browse-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 0.9rem;
}

.phage-browse-card {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
	padding: 1.1rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	text-decoration: none;
	color: var(--text);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.phage-browse-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lift);
	border-color: var(--accent-line);
	text-decoration: none;
	color: var(--text);
}

.phage-browse-icon {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	flex-shrink: 0;
	border-radius: var(--radius);
	background: var(--accent-soft);
	color: var(--accent-ink);
}

.phage-browse-body { display: grid; gap: 0.15rem; min-width: 0; }

.phage-browse-label {
	font-size: 1rem;
	font-weight: 650;
	color: var(--primary);
	letter-spacing: -0.015em;
}

.phage-browse-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

.phage-browse-count {
	margin-top: 0.3rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--accent-ink);
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   7c. NEWSROOM

   Articles and news side by side. v1 gave each a full-width row of image
   cards, which cost a screen of scrolling and made two different kinds of
   content compete at the same visual weight. News items are short and
   frequent, so they read better as a dated list than as five more cards —
   and that also removes five image requests from the page.
   ========================================================================== */

.phage-newsroom {
	display: grid;
	grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

@media (max-width: 900px) {
	.phage-newsroom { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
}

.phage-newsroom-side {
	padding: 1.25rem;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.phage-news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }

.phage-news-item {
	display: grid;
	grid-template-columns: 3.2rem minmax(0, 1fr);
	gap: 0.7rem;
	align-items: baseline;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--border);
}

.phage-news-item:last-child { border-bottom: 0; padding-bottom: 0; }

.phage-news-date {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.phage-news-link {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--primary);
	text-decoration: none;
}

.phage-news-link:hover { color: var(--accent-ink); text-decoration: underline; }

.phage-section-footnote {
	margin: 1.1rem 0 0;
	font-size: 0.86rem;
	color: var(--muted);
}

/* ==========================================================================
   8. TOPIC STRIP
   ========================================================================== */

.phage-topic-strip {
	background: var(--surface);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.phage-topic-list {
	display: flex;
	list-style: none;
	margin: 0 auto;
	padding: 0 var(--gutter);
	max-width: var(--max-width);
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.phage-topic-list::-webkit-scrollbar { display: none; }

.phage-topic-item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.1rem;
	font-size: 0.88rem;
	font-weight: 550;
	color: var(--text);
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.phage-topic-item:hover,
.phage-topic-item[aria-current] {
	color: var(--accent-ink);
	border-bottom-color: var(--accent);
	text-decoration: none;
}

.phage-topic-icon { color: var(--muted); flex-shrink: 0; }
.phage-topic-item:hover .phage-topic-icon,
.phage-topic-item[aria-current] .phage-topic-icon { color: var(--accent); }


/* ==========================================================================
   9. JOBS
   ========================================================================== */

.phage-section-jobs { margin-top: 1.75rem; }

.phage-grid-jobs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: 0.9rem;
}

.phage-job-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	padding: 1rem 1.05rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.phage-job-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lift);
	border-color: var(--accent-line);
}

.phage-job-title { margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.3; }
.phage-job-title a { color: var(--primary); text-decoration: none; }
.phage-job-title a:hover { color: var(--accent-ink); text-decoration: underline; }

.phage-job-meta {
	margin-top: 0.35rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.75rem;
	font-size: 0.8rem;
	color: var(--muted);
}

.phage-job-card .phage-card-excerpt { margin-top: 0.5rem; }
.phage-job-tags { margin-top: 0.55rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.phage-job-deadline { font-weight: 600; color: var(--danger); }

.phage-job-external {
	margin-top: 0.75rem;
	font-size: 0.75rem;
	color: var(--muted);
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}


/* ==========================================================================
   10. SIDEBAR WIDGETS
   ========================================================================== */

.phage-sidebar { display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 5rem; }

@media (max-width: 960px) {
	.phage-sidebar { position: static; }
}

.phage-widget {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	padding: 1.1rem 1.15rem;
}

.phage-widget-title {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--primary);
}

.phage-widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.phage-widget a { color: var(--text); text-decoration: none; font-size: 0.9rem; }
.phage-widget a:hover { color: var(--accent-ink); text-decoration: underline; }

.phage-widget-post-item { display: grid; gap: 0.15rem; }
.phage-widget-post-link { font-weight: 550; line-height: 1.35; }
.phage-widget-post-date { font-size: 0.78rem; color: var(--muted); }
.phage-widget-ad { padding: 0.5rem; }

.phage-widget-search .phage-search-form { flex-wrap: wrap; gap: 0.5rem; }
.phage-widget-search .phage-search-form input[type="search"] { min-width: 0; }
.phage-widget-search .phage-search-form .phage-button { flex: 1; }


/* ==========================================================================
   11. ENTRY — single post, protocol, event, page
   ========================================================================== */

.entry-header { margin-bottom: 1.25rem; }

.entry-title {
	font-size: clamp(1.65rem, 1.2rem + 2vw, 2.25rem);
	line-height: 1.15;
	margin: 0.5rem 0 0.6rem;
}

.entry-subtitle { font-size: 1.05rem; color: var(--muted); margin: 0 0 0.75rem; }

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.85rem;
	font-size: 0.84rem;
	color: var(--muted);
	margin-bottom: 0.5rem;
}

.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--accent-ink); }
.entry-meta--reviewer { font-size: 0.82rem; }
.entry-meta--doi { font-family: var(--font-mono); font-size: 0.78rem; }
.entry-read-time { white-space: nowrap; }

.entry-media {
	margin: 1rem 0 1.5rem;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--surface-2);
}

.entry-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.entry-media figcaption {
	padding: 0.6rem 0.9rem;
	font-size: 0.82rem;
	color: var(--muted);
	background: var(--surface);
}

/* --- Long-form content ------------------------------------------------- */

.entry-content {
	font-size: 1.02rem;
	line-height: 1.75;
	color: var(--text);
	max-width: 72ch;
}

.entry-content > * + * { margin-top: 1.1rem; }

.entry-content h2 {
	font-size: 1.45rem;
	margin-top: 2.25rem;
	padding-top: 0.25rem;
	scroll-margin-top: 6rem;
}

.entry-content h3 { font-size: 1.2rem; margin-top: 1.75rem; scroll-margin-top: 6rem; }
.entry-content h4 { font-size: 1.05rem; margin-top: 1.5rem; }

.entry-content ul,
.entry-content ol { padding-left: 1.4em; }

.entry-content li + li { margin-top: 0.4rem; }

.entry-content a { text-decoration: underline; text-underline-offset: 2px; }

.entry-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 0.25rem 0 0.25rem 1.1rem;
	border-left: 3px solid var(--accent);
	color: var(--text-2);
	font-style: italic;
}

.entry-content code {
	font-family: var(--font-mono);
	font-size: 0.875em;
	background: var(--surface-2);
	padding: 0.15em 0.4em;
	border-radius: 5px;
}

.entry-content pre {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem;
	overflow-x: auto;
	font-size: 0.86rem;
	line-height: 1.6;
}

.entry-content pre code { background: none; padding: 0; }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin: 1.75rem 0; }
.entry-content figcaption { margin-top: 0.5rem; font-size: 0.84rem; color: var(--muted); }

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	display: block;
	overflow-x: auto;
}

.entry-content th,
.entry-content td {
	padding: 0.55rem 0.7rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

.entry-content th { font-weight: 650; color: var(--primary); background: var(--surface-2); }

.entry-footer { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

.page-links { margin-top: 1.5rem; display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.page-links-title { color: var(--muted); font-size: 0.85rem; }

.page-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	font-size: 0.85rem;
	text-decoration: none;
}

/* --- Author bio -------------------------------------------------------- */

.phage-author-bio {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin-top: 1.75rem;
	padding: 1.15rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.phage-author-avatar { flex-shrink: 0; border-radius: 50%; overflow: hidden; width: 56px; height: 56px; }
.phage-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.phage-author-name { margin: 0 0 0.2rem; font-size: 1rem; }
.phage-author-role { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.4rem; }
.phage-author-text { margin: 0; font-size: 0.9rem; color: var(--text-2); }


/* ==========================================================================
   12. PROTOCOL COMPONENTS
   ========================================================================== */

.phage-protocol-topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.phage-protocol-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
	gap: 0.75rem;
	margin: 1.25rem 0;
}

.phage-protocol-fact {
	padding: 0.75rem 0.9rem;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.phage-protocol-fact dt,
.phage-protocol-fact-label {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--muted);
	margin-bottom: 0.2rem;
}

.phage-protocol-fact dd,
.phage-protocol-fact-value {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--primary);
}

.phage-card--citation { background: var(--surface-2); box-shadow: none; }
.phage-card--citation:hover { transform: none; box-shadow: none; border-color: var(--border); }

.phage-citation-text {
	font-size: 0.88rem;
	line-height: 1.7;
	color: var(--text-2);
	font-family: var(--font-mono);
	word-break: break-word;
}

.phage-citation-actions { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.phage-references-content { font-size: 0.9rem; line-height: 1.7; }
.phage-references-content p { margin: 0 0 0.6rem; }

.protocol-stat { display: inline-flex; align-items: baseline; gap: 0.3rem; }


/* ==========================================================================
   13. EVENT COMPONENTS
   ========================================================================== */

.phage-event-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
	gap: 0.75rem;
	margin: 1.25rem 0;
}

.event-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
	align-items: baseline;
	font-size: 0.9rem;
	margin-bottom: 0.45rem;
}

.event-meta-row strong { color: var(--primary); font-weight: 650; }

.phage-event-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0; }

.phage-event-date-badge {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 3.6rem;
	height: 3.6rem;
	flex-shrink: 0;
	background: var(--accent-soft);
	color: var(--accent-ink);
	border: 1px solid var(--accent-line);
	border-radius: var(--radius);
	line-height: 1.1;
}

.phage-event-date-day { font-size: 1.25rem; font-weight: 750; }
.phage-event-date-month { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.phage-event-card-head { display: flex; gap: 0.75rem; align-items: flex-start; }

.phage-event-past { opacity: 0.72; }
.phage-event-past .phage-event-date-badge { background: var(--surface-2); color: var(--muted); border-color: var(--border); }


/* ==========================================================================
   14. TEAM
   ========================================================================== */

.phage-team-hero { padding-bottom: 1.5rem; }
.phage-team-intro { max-width: 46rem; margin: 0 auto; text-align: center; }
.phage-team-section { margin-top: 2.5rem; }

.phage-team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
	gap: 1.1rem;
}

.phage-team-grid-founder { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.phage-team-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	padding: 1.15rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.phage-team-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lift);
	border-color: var(--accent-line);
}

.phage-team-top { display: flex; gap: 0.9rem; align-items: flex-start; }

.phage-team-avatar {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
	border-radius: 50%;
	overflow: hidden;
	background: var(--surface-2);
}

.phage-team-avatar img { width: 100%; height: 100%; object-fit: cover; }

.phage-team-avatar-fallback {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--accent-soft);
	color: var(--accent-ink);
	font-size: 1.35rem;
	font-weight: 700;
}

.phage-team-head { min-width: 0; }
.phage-team-name { margin: 0; font-size: 1.05rem; font-weight: 650; }
.phage-team-role { font-size: 0.85rem; color: var(--accent-ink); font-weight: 600; margin-top: 0.1rem; }

.phage-team-meta {
	margin-top: 0.3rem;
	font-size: 0.8rem;
	color: var(--muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.6rem;
}

.phage-team-social { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }

.phage-team-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.9rem;
	height: 1.9rem;
	border: 1px solid var(--border);
	border-radius: 50%;
	color: var(--muted);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.phage-team-social a:hover { color: var(--accent-ink); border-color: var(--accent); }
.phage-team-social svg { width: 15px; height: 15px; }

.phage-team-bio { margin-top: 0.85rem; font-size: 0.89rem; color: var(--text-2); line-height: 1.65; }
.phage-team-bio p { margin: 0 0 0.5rem; }

.phage-team-bio-toggle {
	margin-top: 0.3rem;
	background: none;
	border: 0;
	padding: 0;
	color: var(--accent-ink);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}

.phage-team-bio-toggle:hover { text-decoration: underline; }
.phage-team-empty { color: var(--muted); font-size: 0.9rem; }


/* ==========================================================================
   15. TRAINING AND DASHBOARD SHELL
   These use the same card, pill and button vocabulary as the magazine, so a
   lesson page reads as part of the same site rather than a bolted-on LMS.
   ========================================================================== */

/* --- Progress bars ----------------------------------------------------- */

.phage-progress {
	position: relative;
	height: 8px;
	background: var(--surface-3);
	border-radius: var(--radius-pill);
	overflow: hidden;
}

.phage-progress-fill {
	display: block;
	height: 100%;
	background: var(--accent);
	border-radius: inherit;
	transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.phage-progress-sm { height: 5px; }
.phage-progress-lg { height: 12px; }

.phage-progress-caption {
	margin-top: 0.4rem;
	font-size: 0.8rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* --- Course facts ------------------------------------------------------ */

.phage-course-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	list-style: none;
	margin: 0.9rem 0 0;
	padding: 0;
	font-size: 0.85rem;
	color: var(--muted);
}

.phage-course-facts li { display: inline-flex; align-items: center; gap: 0.35rem; }

.phage-outcome-list,
.phage-prereq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; font-size: 0.89rem; }

.phage-outcome-list li { position: relative; padding-left: 1.55rem; }

.phage-outcome-list li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.42em;
	width: 0.8rem;
	height: 0.45rem;
	border-left: 2px solid var(--accent);
	border-bottom: 2px solid var(--accent);
	transform: rotate(-45deg);
}

.phage-prereq-list li { position: relative; padding-left: 1.1rem; color: var(--text-2); }

.phage-prereq-list li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.68em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--muted);
}

/* --- Syllabus steps ---------------------------------------------------- */

.phage-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }

.phage-step {
	display: grid;
	grid-template-columns: 2.1rem minmax(0, 1fr) auto;
	gap: 0.9rem;
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 0.9rem 1rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phage-step.is-open:hover { border-color: var(--accent-line); box-shadow: var(--shadow-soft); }
.phage-step.is-locked { background: var(--surface-2); opacity: 0.8; }
.phage-step.is-done { border-color: var(--accent-line); }

.phage-step-marker {
	display: grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.phage-step.is-done .phage-step-marker { background: var(--accent); color: var(--accent-on); }
.phage-step.is-open .phage-step-marker { background: var(--accent-soft); color: var(--accent-ink); }

.phage-step-title { margin: 0; font-size: 0.98rem; font-weight: 600; line-height: 1.35; }
.phage-step-title a { color: var(--primary); text-decoration: none; }
.phage-step-title a:hover { color: var(--accent-ink); text-decoration: underline; }

.phage-step-meta { margin-top: 0.2rem; font-size: 0.78rem; color: var(--muted); display: flex; gap: 0.5rem; flex-wrap: wrap; }
.phage-step-lock { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--warn); }

@media (max-width: 620px) {
	.phage-step { grid-template-columns: 2.1rem minmax(0, 1fr); }
	.phage-step > .phage-pill,
	.phage-step > .phage-button { grid-column: 2; justify-self: start; margin-top: 0.4rem; }
}

/* --- Lesson rail ------------------------------------------------------- */

.phage-lesson-rail {
	position: sticky;
	top: 3.9rem;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 93%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

.phage-lesson-rail-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0.6rem var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.phage-rail-course {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
}

.phage-rail-course:hover { color: var(--accent-ink); text-decoration: none; }
.phage-rail-progress { display: flex; align-items: center; gap: 0.75rem; min-width: 11rem; }
.phage-rail-step { font-size: 0.78rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.phage-rail-progress .phage-progress { width: 7.5rem; }

/* --- Lesson completion ------------------------------------------------- */

.phage-lesson-video { margin-bottom: 1.5rem; }

.phage-lesson-complete {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2rem;
	padding: 1.25rem;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.phage-lesson-complete.is-done { background: var(--accent-soft); border-color: var(--accent-line); }
.phage-complete-title { margin: 0; font-size: 1.05rem; }
.phage-complete-sub { margin: 0.2rem 0 0; font-size: 0.86rem; color: var(--muted); }
.phage-lesson-complete.is-done .phage-complete-title,
.phage-lesson-complete.is-done .phage-complete-sub { color: var(--accent-ink); }
.phage-complete-error { flex-basis: 100%; margin: 0; color: var(--danger); font-size: 0.86rem; }

/* --- Lesson nav -------------------------------------------------------- */

.phage-lesson-nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.phage-lesson-nav-link {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.9rem 1rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	text-decoration: none;
	color: var(--text);
}

a.phage-lesson-nav-link:hover { border-color: var(--accent); text-decoration: none; }
.phage-lesson-nav-link.is-next { text-align: right; align-items: flex-end; }
.phage-lesson-nav-link.is-locked { background: var(--surface-2); opacity: 0.7; cursor: not-allowed; }

.phage-nav-dir {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--muted);
}

.phage-lesson-nav-link.is-locked .phage-nav-dir { color: var(--warn); }
.phage-nav-name { font-size: 0.88rem; font-weight: 600; }

/* --- Locked / pending state cards -------------------------------------- */

.phage-state-card {
	max-width: 34rem;
	margin: 3rem auto;
	padding: 2.5rem 1.5rem;
	text-align: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-soft);
}

.phage-state-icon {
	display: grid;
	place-items: center;
	width: 3.75rem;
	height: 3.75rem;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: var(--warn-soft);
	color: var(--warn);
}

.phage-state-title { margin: 0; font-size: 1.35rem; }
.phage-state-body { margin: 0.75rem 0 0; color: var(--text-2); }
.phage-state-detail { margin: 1rem 0 0; font-size: 0.89rem; color: var(--muted); }
.phage-state-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.5rem; }

.phage-state-list {
	display: grid;
	gap: 0.75rem;
	margin: 1.25rem 0 0;
	padding: 1rem;
	background: var(--surface-2);
	border-radius: var(--radius);
	text-align: left;
	font-size: 0.88rem;
}

.phage-state-list dt {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--muted);
	font-weight: 700;
}

.phage-state-list dd { margin: 0.2rem 0 0; font-weight: 600; }

/* --- Video facade ------------------------------------------------------ */

.phage-video {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--surface-2);
	border-radius: var(--radius-lg);
	overflow: hidden;
	isolation: isolate;
}

.phage-video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.phage-video::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.4));
	pointer-events: none;
}

.phage-video-play {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: none;
	border: 0;
	cursor: pointer;
}

.phage-video-play-icon {
	position: relative;
	display: block;
	width: 4.25rem;
	height: 4.25rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
	transition: transform 0.18s ease, background-color 0.18s ease;
}

.phage-video-play-icon::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-38%, -50%);
	border-style: solid;
	border-width: 0.75rem 0 0.75rem 1.25rem;
	border-color: transparent transparent transparent #111827;
}

.phage-video-play:hover .phage-video-play-icon,
.phage-video-play:focus-visible .phage-video-play-icon { transform: scale(1.08); background: #fff; }

.phage-video-duration {
	position: absolute;
	right: 0.75rem;
	bottom: 0.75rem;
	z-index: 3;
	padding: 0.15rem 0.5rem;
	border-radius: 5px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.phage-video[data-playing] .phage-video-poster,
.phage-video[data-playing] .phage-video-play,
.phage-video[data-playing] .phage-video-duration { display: none; }

.phage-video[data-playing]::after { display: none; }
.phage-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.phage-video-noscript {
	position: absolute;
	inset: auto 0 0;
	z-index: 3;
	padding: 0.6rem;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	text-align: center;
	font-size: 0.85rem;
}


/* ==========================================================================
   16. SHARE ROW
   ========================================================================== */

.phage-share { margin-top: 2rem; }
.phage-share-title { font-size: 0.85rem; font-weight: 700; color: var(--muted); margin: 0 0 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; }
.phage-share-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.phage-share-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--border);
	border-radius: 50%;
	color: var(--muted);
	background: var(--surface);
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.phage-share-icon:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.phage-share-icon svg { width: 16px; height: 16px; }


/* ==========================================================================
   17. FORMS
   ========================================================================== */

.phage-form { display: grid; gap: 1rem; }
.form-group,
.phage-form-row { display: grid; gap: 0.4rem; }

.phage-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	gap: 1rem;
}

.phage-form label,
.form-group label,
.login label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea,
select {
	width: 100%;
	padding: 0.6rem 0.8rem;
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border-2);
	border-radius: var(--radius);
	font-size: 0.95rem;
}

textarea { resize: vertical; min-height: 5rem; }

input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
	border-color: var(--accent);
}

.phage-field-hint { font-size: 0.78rem; color: var(--muted); margin: 0; }
.phage-field-error { font-size: 0.78rem; color: var(--danger); font-weight: 600; margin: 0; }

.phage-form-message { padding: 0.7rem 0.9rem; border-radius: var(--radius); font-size: 0.88rem; }
.phage-form-message.is-success { background: var(--accent-soft); color: var(--accent-ink); }
.phage-form-message.is-error { background: var(--danger-soft); color: var(--danger); }

/* Honeypot — offscreen rather than display:none, which bots detect. */
.phage-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* wp_login_form() output */
.login { display: grid; gap: 1rem; }
.login p { display: grid; gap: 0.4rem; margin: 0; }
.login .login-remember { display: flex; align-items: center; }
.login .login-remember label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.login .login-remember input { width: auto; }

.login .login-submit input[type="submit"] {
	width: 100%;
	padding: 0.6rem 1.2rem;
	background: var(--accent);
	color: var(--accent-on);
	border: 1px solid var(--accent);
	border-radius: var(--radius-pill);
	font-size: 0.95rem;
	font-weight: 550;
	cursor: pointer;
}

.login .login-submit input[type="submit"]:hover { background: var(--accent-hover); }


/* ==========================================================================
   18. SEARCH AND FILTERS
   ========================================================================== */

.phage-search-form { display: flex; gap: 0.5rem; }
.phage-search-form input[type="search"] { flex: 1; }

.phage-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--border);
}

.search-filter-button,
.phage-filter-button {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.85rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	font-size: 0.85rem;
	color: var(--text);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.search-filter-button:hover,
.phage-filter-button:hover { border-color: var(--accent); color: var(--accent-ink); }

.search-filter-button[aria-pressed="true"],
.phage-filter-button[aria-pressed="true"] {
	background: var(--accent-soft);
	border-color: var(--accent);
	color: var(--accent-ink);
	font-weight: 600;
}

.filter-button-count {
	font-size: 0.72rem;
	color: var(--muted);
	background: var(--surface-2);
	padding: 0.05rem 0.4rem;
	border-radius: var(--radius-pill);
}

.phage-filter-status { font-size: 0.85rem; color: var(--muted); margin: 0 0 1rem; }
.phage-is-filtering { opacity: 0.55; transition: opacity 0.15s ease; }

.phage-protocol-select {
	padding: 0.45rem 0.7rem;
	font-size: 0.85rem;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
}


/* ==========================================================================
   19. PAGINATION
   ========================================================================== */

.phage-pagination { display: flex; justify-content: center; margin: 2.5rem 0 1rem; }
.phage-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.phage-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.35rem;
	height: 2.35rem;
	padding: 0 0.7rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	color: var(--text);
	font-size: 0.88rem;
	text-decoration: none;
}

.phage-pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

.phage-pagination .page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-on);
	font-weight: 600;
}

.phage-pagination .dots { border-color: transparent; background: none; }


/* ==========================================================================
   20. COMMENTS
   ========================================================================== */

.phage-comments { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.phage-comments-title { font-size: 1.2rem; margin: 0 0 1.25rem; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.comment-list .children { list-style: none; margin: 1rem 0 0 1.25rem; padding-left: 1rem; border-left: 2px solid var(--border); display: grid; gap: 1rem; }

.comment-body {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1rem;
}

.comment-author { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.comment-content { margin-top: 0.6rem; font-size: 0.92rem; }
.comment-reply-link { font-size: 0.82rem; font-weight: 600; }
.comment-respond { margin-top: 1.75rem; }
.comment-reply-title { font-size: 1.05rem; margin: 0 0 0.9rem; }


/* ==========================================================================
   21. NOTICES, ADS, NEWSLETTER, ANNOUNCEMENT
   ========================================================================== */

.phage-notice {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 0.9rem 1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-2);
	font-size: 0.9rem;
	margin: 1rem 0;
}

.phage-notice svg { flex-shrink: 0; margin-top: 2px; }
.phage-notice p { margin: 0; }
.phage-notice-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.phage-notice-info { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.phage-notice-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }

.noscript-notice {
	padding: 0.6rem var(--gutter);
	background: var(--warn-soft);
	color: var(--warn);
	font-size: 0.85rem;
	text-align: center;
}

/* Ads — height reserved so a late fill cannot shift the article. */
.phage-ad-wrap {
	margin: 1.75rem auto;
	min-height: 100px;
	display: grid;
	place-items: center;
	overflow: hidden;
}

.phage-ad-wrap-article-top { margin-top: 0.5rem; }
.phage-ad-wrap-article-bottom { margin-bottom: 0.5rem; }
.phage-ad-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.35rem; }

/* Announcement */
.phage-section-announcement { margin-top: 2rem; }

.phage-announcement-card {
	padding: 1.5rem 1.6rem;
	background: linear-gradient(135deg, var(--accent-soft), var(--info-soft));
	border: 1px solid var(--accent-line);
	border-radius: var(--radius-xl);
}

.phage-announcement-title { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--primary); }
.phage-announcement-body { font-size: 0.93rem; color: var(--text-2); }
.phage-announcement-body p { margin: 0 0 0.6rem; }
.phage-announcement-card .phage-button { margin-top: 0.5rem; }

/* Newsletter strip */
.phage-newsletter-strip { background: var(--surface-2); border-top: 1px solid var(--border); padding: 2.25rem 0; }

.phage-newsletter-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 var(--gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.phage-newsletter-text h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.phage-newsletter-text p { margin: 0; color: var(--muted); font-size: 0.93rem; max-width: 34rem; }
.phage-newsletter-action { flex-shrink: 0; }


/* ==========================================================================
   22. FOOTER
   ========================================================================== */

.site-footer {
	position: relative;
	margin-top: 4rem;
	padding: 3rem 0 1.5rem;
	background: var(--footer-bg);
	color: var(--footer-text);
	font-size: 0.9rem;
}

.site-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.35), transparent);
}

.site-footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }

.site-footer-top {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2.5rem;
	margin-bottom: 2.5rem;
}

@media (max-width: 1100px) { .site-footer-top { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (max-width: 620px) { .site-footer-top { grid-template-columns: 1fr; gap: 1.75rem; } }

.site-footer-col h3,
.site-footer-col-title {
	margin: 0 0 1rem;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--footer-heading);
}

.site-footer-brand { display: flex; flex-direction: column; gap: 1rem; }
/*
 * The footer is dark in BOTH themes, so its logo and icons take an explicit
 * near-white rather than inheriting --footer-text, which is a mid grey chosen
 * for body copy. The mask above means setting `color` here is all it takes.
 */
.site-footer-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--footer-heading);
	transition: opacity 0.2s ease;
}

.site-footer-logo-link:hover { opacity: 0.85; }
.site-footer-logo-link img,
.site-footer-logo-link svg { width: 48px; height: 48px; }
.site-footer-tagline { margin: 0; color: var(--footer-text); line-height: 1.65; max-width: 22rem; }

.site-footer-links-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.site-footer-link { color: var(--footer-text); text-decoration: none; }
.site-footer-link:hover { color: var(--accent); text-decoration: none; }

.site-footer-social-title { margin-top: 1.25rem; }
.site-footer .phage-share-buttons { gap: 0.5rem; }

.site-footer .phage-share-icon {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.16);
	color: var(--footer-heading);
}

.site-footer .phage-share-icon:hover {
	color: #ffffff;
	border-color: var(--accent);
	background: rgba(16, 185, 129, 0.2);
}

.site-footer-contact { margin-top: 1.25rem; display: grid; gap: 0.4rem; font-size: 0.85rem; }
.site-footer-contact a { color: var(--footer-text); }
.site-footer-contact a:hover { color: var(--accent); }

.site-footer-newsletter .site-footer-form { display: grid; gap: 0.6rem; }

.site-footer-newsletter input[type="email"],
.site-footer-newsletter input[type="text"] {
	background: rgba(255, 255, 255, 0.06);
	border-color: var(--footer-line);
	color: #f8fafc;
}

.site-footer-newsletter input::placeholder { color: #64748b; }

.site-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--footer-line);
	font-size: 0.82rem;
}

.site-footer-copyright { margin: 0; }
.site-footer-legal-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer-legal-link { color: var(--footer-text); text-decoration: none; }
.site-footer-legal-link:hover { color: var(--accent); }
.site-footer-legal-separator { color: var(--footer-line); }


/* ==========================================================================
   23. UTILITIES
   ========================================================================== */

.phage-breadcrumbs { font-size: 0.82rem; padding-top: 0.25rem; }
.phage-breadcrumb-list { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.phage-breadcrumb-list a { color: var(--muted); text-decoration: none; }
.phage-breadcrumb-list a:hover { color: var(--accent-ink); text-decoration: underline; }
.phage-breadcrumb-list [aria-current] { color: var(--text); }
.phage-breadcrumb-sep { color: var(--border-2); }

.phage-flow > * + * { margin-top: 1rem; }
.phage-center { text-align: center; }
.phage-mt-0 { margin-top: 0; }
.phage-mb-0 { margin-bottom: 0; }
.phage-muted { color: var(--muted); }
.phage-nowrap { white-space: nowrap; }
.phage-tabular { font-variant-numeric: tabular-nums; }

/* Below-the-fold sections skip layout and paint until scrolled into view. */
.phage-defer-paint { content-visibility: auto; contain-intrinsic-size: 0 600px; }


/* ==========================================================================
   24. MOTION, PRINT, FORCED COLOURS
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.phage-card:hover,
	.phage-job-card:hover,
	.phage-team-card:hover { transform: none; }
}

@media (forced-colors: active) {
	.phage-card,
	.phage-job-card,
	.phage-step,
	.phage-widget { border: 1px solid CanvasText; }

	.phage-progress-fill { background: Highlight; }
	.phage-button { border: 1px solid ButtonText; }
}

@media print {
	.site-header,
	.site-footer,
	.phage-topic-strip,
	.phage-sidebar,
	.phage-share,
	.phage-ad-wrap,
	.phage-newsletter-strip,
	.phage-lesson-rail,
	.phage-lesson-nav,
	.phage-lesson-complete,
	.phage-video,
	.phage-pagination,
	.skip-link,
	.nav-toggle,
	.header-actions,
	.comment-respond { display: none !important; }

	body { background: #fff; color: #000; font-size: 11pt; }
	.phage-main-layout { display: block; }
	.entry-content { max-width: none; }
	a { color: #000; text-decoration: underline; }
	.entry-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }

	/* Certificates print as a clean card. */
	.phage-cert-print { break-inside: avoid; border: 2px solid #000; padding: 2rem; }
}
