/*
Theme Name: MSN Globalisation
Theme URI: https://msn-globalisation.org.my
Author: Trendsta Technology
Author URI: https://trendstatech.com
Description: Custom block theme for Monitoring Sustainability of Globalisation (MSN). Built on Twenty Twenty-Five.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: msn-theme
Tags: block-theme, full-site-editing, ngo, news, advocacy
*/

/* =============================================================================
 * TABLE OF CONTENTS
 * =============================================================================
 *
 * To jump to a section in your editor, search for the heading line including
 * the leading marker — e.g. "1.1 Header navigation". Sections are grouped by
 * the part of the site they affect, then ordered roughly head → toe.
 *
 *   1. HEADER
 *     1.1 Header navigation                  (item alignment, nowrap labels)
 *     1.2 Header nav hover                   (pill background highlight)
 *     1.3 Active page indicator              (green dot + colour shift)
 *     1.4 Focus Areas dropdown panel         (soft floating card, desktop)
 *
 *   2. SEARCH
 *     2.1 Slide-down search drawer           (toggle, panel, input, close)
 *
 *   3. FOOTER
 *     3.1 Sticky footer                      (pin to viewport bottom)
 *     3.2 Director Bio photo                 (force 200×200 circle)
 *     3.3 Footer link hover                  (no underline by default)
 *     3.4 Inline icons (location/envelope)   (CSS mask-image)
 *     3.5 Footer "Follow" row alignment      (margin-top:auto trick)
 *     3.6 Footer social icons                (36×36 rounded squares)
 *
 *   4. ACCESSIBILITY
 *     4.1 Focus rings — header + footer      (suppress mouse focus, keep kbd)
 *
 *   5. MOBILE (≤ 600px)
 *     5.1 Mobile menu — dark takeover        (overlay, hamburger, submenu rail)
 *     5.2 Mobile responsive                  (stack bio, centre footer, icons)
 *
 *   6. HOME PAGE
 *     6.1 Hero pill                          (tight uppercase badge, brand-primary)
 *     6.2 Section heading + gold bar         (3px gold accent before section H2s)
 *     6.3 Card visual (pub + press)          (border, shadow, flex column, equal heights)
 *     6.4 Publication type tag               (gold uppercase, letter-spaced)
 *     6.5 Card title (pub + press)           (16px serif, hover colour shift)
 *     6.6 CTA pill (pub PDF + press Read More) (brand-primary outline → filled hover)
 *     6.7 Press meta "Outlet · Date"         (flex row, CSS-injected separator)
 *     6.8 Campaigns row                      (badge | info | CTA, thin separators)
 *     6.9 Campaigns date badge               (green pill with day/month/year split)
 *     6.10 Campaigns View Details link       (text-link style with hover)
 *     6.11 Home page mobile responsive       (≤600px tweaks per section)
 *
 *   7. SINGLE PUBLICATION
 *     7.1 Layout wrapper                     (780px constrained, body rhythm)
 *     7.2 Cover banner                       (full-column, 280px, soft shadow)
 *     7.3 Type label                         (uppercase letter-spaced gold)
 *     7.4 Title + subtitle + date            (left-aligned navy/serif, calendar icon)
 *     7.5 Plain rule                         (1px grey hairline, not gold)
 *     7.6 Download CTA                       (full-width green 52px with arrow icon)
 *     7.7 Drop cap in post content           (serif 72px navy, scoped to post body)
 *     7.8 Blockquote / pull-quote            (gold left border + base-alt bg, italic)
 *     7.9 Focus row + focus pills            (top divider, green pill tags)
 *     7.10 Single publication mobile         (≤600px h1/cover/drop-cap shrink)
 *     7.11 Justified paragraph block style   (is-style-justified, editor opt-in)
 *
 *   8. PUBLICATIONS ARCHIVE
 *     8.1 Archive intro                      (H1 + gold rule + lede paragraph)
 *     8.2 Publication row layout             (flex: 100px cover + 1fr content)
 *     8.3 Row cover thumbnail                (100×140 portrait, rounded, shadow)
 *     8.4 Row content                        (type label, title, 2-line desc clamp)
 *     8.5 Row footer (PDF link + date)       (flex row, gap, alignment)
 *     8.6 Pagination                         (36px rounded buttons, green current)
 *     8.7 Archive mobile responsive          (≤600px: cover 80×112, tighter gaps)
 *
 *   9. SINGLE EVENT (CAMPAIGN)
 *     9.1 Layout wrapper                     (780px constrained, body rhythm)
 *     9.2 Pill row                           (focus / status / type pills)
 *     9.3 Title + gold accent rule           (left-aligned navy serif H1)
 *     9.4 Meta card                          (base-alt card: date/location/website)
 *     9.5 Highlight band                     (gold left border, italic pull-quote)
 *     9.6 About heading + post body          (serif H2, gold rule, prose)
 *     9.7 Downloads                          (filled + outline PDF buttons)
 *     9.8 Single event mobile responsive     (≤600px h1/meta/button shrink)
 *
 *  10. CAMPAIGN ARCHIVE
 *    10.1 Campaign list + row                (vertical list, beige row divider)
 *    10.2 Row external-URL line              (small muted link, reused weblink)
 *    10.3 Row title                          (serif navy H3, hover green)
 *    10.4 Row date + location meta           (icon rows, location hides if empty)
 *    10.5 Row summary                        (muted excerpt, max-width)
 *    10.6 Row download buttons               (compact green outline, hide if empty)
 *    10.7 Campaign archive mobile            (≤600px tightening)
 *
 *  11. SINGLE MEDIA (NEWS)
 *    11.1 Layout wrapper                     (780px constrained, body rhythm)
 *    11.2 Type badge                         (filled green/gold rounded rect)
 *    11.3 Title + gold accent rule           (left-aligned navy serif H1)
 *    11.4 Meta row                           (date · author/outlet · focus, CSS dots)
 *    11.5 MSN Release — featured image        (full-column hero, soft shadow)
 *    11.6 Drop cap                           (native .has-drop-cap toggle, matches §7.7)
 *    11.6b Body blockquote / pull-quote      (gold left border, italic serif)
 *    11.7 Press Clipping — excerpt box        (gold left border, italic serif)
 *    11.8 Press Clipping — read-original CTA  (full-width green, external icon)
 *    11.9 External-hosting disclaimer        (italic muted note — clip/video/podcast)
 *    11.10 Single media mobile responsive    (≤600px h1/hero/drop-cap shrink)
 *
 *  12. MEDIA ARCHIVE
 *    12.1 Page header                        (gold eyebrow + 48px H1 + gold rule + lede)
 *    12.2 Card grid                          (3-col grid, responsive collapse)
 *    12.3 Card shell                         (bordered card, shadow, hover lift)
 *    12.4 Card thumbnail + type badge        (160px thumb, absolute badge)
 *    12.5 Card body                          (outlet, title, 3-line excerpt)
 *    12.6 Card footer                        (date + Read More, top border)
 *    12.7 Media archive responsive           (3→2→1 columns, h1 shrink)
 *
 *  13. FOCUS AREA & WORK CARD PATTERNS
 *    13.1 Card shell                        (border, shadow, gold top bar)
 *    13.2 Card body                         (shared body: padding, gap, title, CTA)
 *    13.3 Card responsive                   (≤600px title shrink)
 *
 *  14. CONNECT BLOCK & DIRECTOR CARD PATTERNS
 *    14.1 Social icon tiles                 (boxed uniform-size logos)
 *    14.2 Connect block — mobile centred    (≤600px centred layout)
 *
 *  15. 404 PAGE
 *    15.1 Hero + graticule motif            (faint SVG grid background)
 *    15.2 Oversized "404"                   (fluid display number)
 *    15.3 Heading, message, links           (readable widths, dotted links)
 *    15.4 404 page responsive               (≤600px number shrink)
 *
 *  16. SEARCH PAGE
 *    16.1 Page header                       (eyebrow, H1, count, gold rule)
 *    16.2 Results list                      (vertical rows, hairline rule)
 *    16.3 Result row                        (meta line, title, clamped excerpt)
 *    16.4 No-results state                  (message, tip, section links)
 *
 * 17. FOCUS AREA HUB PAGES (Level 1 and Level 2)
 *   17.1 Level 1 — Focus Areas cards grid     (3-col, gap, responsive)
 *   17.2 Level 2 — Focus Area work cards grid (3-col, gap, responsive)
 *   17.3 Equal-height cards                   (align-stretch, height:auto)
 *   17.4 Crosslink strip                      (white outline button)
 *
 * 18. FOCUS AREA PAGES (Level 3 — page-focus-area template)
 *   18.1 Alternating section backgrounds      (nth-of-type(even) → base-alt)
 *   18.2 Intro section                        (focus pill, H1 gold rule)
 *   18.3 Section headings                     (locked H2 + gold rule ::after)
 *   18.4 Tweets section                       (content-col heading + wide 3-col grid)
 *   18.5 Statements section                   (gold left-border cards, vertical stack)
 *   18.6 Write-ups section                    (wide 2-col card grid, mobile collapse)
 *   18.7 Video Responses section              (wide 3-col grid, 16:9 thumb, meta)
 *   18.8 Podcasts section                     (vertical stack, embed player)
 *
 * ========================================================================== */

/* =============================================================================
 * 1. HEADER
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 1.1 Header navigation
 * Keep multi-word top-level nav labels (e.g. "Focus Areas") on a single line.
 * The default flex layout allows the label text to wrap when space is tight;
 * forcing `nowrap` matches the design reference and avoids the chevron being
 * orphaned beneath the label.
 * -------------------------------------------------------------------------- */
.wp-block-navigation .wp-block-navigation-item__content {
	white-space: nowrap;
}

/* -----------------------------------------------------------------------------
 * 1.2 Header nav hover — pill background highlight
 * Hovered or keyboard-focused top-level nav items get a soft rounded pill in
 * brand-primary at 8% opacity. Padding is set on the link itself so the pill
 * sits flush with the label. Transition is short (150ms) to feel responsive
 * without drawing attention away from the page content.
 * -------------------------------------------------------------------------- */
header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 8px 14px;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color 0.15s ease-out;
}
header .wp-block-navigation .wp-block-navigation-item__content:hover,
header .wp-block-navigation .wp-block-navigation-item__content:focus-visible {
	background-color: rgba(14, 127, 92, 0.08);
	text-decoration: none;
}
/* Remove the browser/WP default focus ring; the pill already conveys focus. */
header .wp-block-navigation .wp-block-navigation-item__content:focus {
	outline: none;
	box-shadow: none;
}

/* -----------------------------------------------------------------------------
 * 1.3 Active page indicator
 * WordPress adds `.current-menu-item` to the <li> wrapping whichever nav link
 * matches the current page URL. Show a small green dot under that item plus
 * shift the label colour to brand-primary so the active page is unmistakable.
 * -------------------------------------------------------------------------- */
header .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"],
header .wp-block-navigation .wp-block-navigation-item__content[data-msn-active="true"],
header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
header .wp-block-navigation .current_page_item > .wp-block-navigation-item__content,
header .wp-block-navigation .current-menu-parent > .wp-block-navigation-item__content,
header .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--brand-primary);
	position: relative;
}
header .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"]::after,
header .wp-block-navigation .wp-block-navigation-item__content[data-msn-active="true"]::after,
header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after,
header .wp-block-navigation .current_page_item > .wp-block-navigation-item__content::after,
header .wp-block-navigation .current-menu-parent > .wp-block-navigation-item__content::after,
header .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 2px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--brand-primary);
	transform: translateX(-50%);
}

/* -----------------------------------------------------------------------------
 * 2.1 Slide-down search drawer
 * A magnifier button in the header triggers a full-width drawer that slides
 * down from beneath the header bar, containing a large search input. Closes
 * on Esc, click outside, or the explicit close button. The header element is
 * given position:relative so the drawer can be absolutely positioned to its
 * bottom edge.
 * -------------------------------------------------------------------------- */
header.wp-block-group {
	position: relative;
}
.msn-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background-color: var(--wp--preset--color--brand-primary);
	border: none;
	border-radius: 999px;
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}
.msn-search-toggle:hover,
.msn-search-toggle:focus-visible {
	background-color: var(--wp--preset--color--brand-secondary);
}
.msn-search-toggle:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}
.msn-search-drawer {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--70);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 100;
}
.msn-search-drawer[aria-hidden="false"] {
	opacity: 1;
	transform: translateY(0);
}
.msn-search-form {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 1240px;
	margin: 0 auto;
	border-bottom: 2px solid rgba(0, 0, 0, 0.1);
	transition: border-color 0.15s ease;
}
.msn-search-form:focus-within {
	border-bottom-color: var(--wp--preset--color--brand-primary);
}
.msn-search-form__icon {
	color: rgba(0, 0, 0, 0.5);
	flex: 0 0 auto;
}
.msn-search-input {
	flex: 1;
	border: none;
	background-color: transparent;
	padding: 14px 0;
	font-size: 18px;
	color: inherit;
	outline: none;
}
.msn-search-input::placeholder {
	color: rgba(0, 0, 0, 0.4);
}
.msn-search-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background-color: transparent;
	border: none;
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	transition: background-color 0.15s ease-out;
}
.msn-search-close:hover,
.msn-search-close:focus-visible {
	background-color: rgba(0, 0, 0, 0.05);
}
.msn-search-close:focus:not(:focus-visible) {
	outline: none;
}
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* -----------------------------------------------------------------------------
 * 4.1 Focus rings — site-wide
 * Suppress the default theme.json focus outline (the "gold border" from
 * brand-accent) on every interactive element across the site for MOUSE clicks.
 * Keyboard users still get a visible focus indicator via :focus-visible,
 * styled separately to use the brand-primary green. Accessibility-critical:
 * NEVER remove :focus-visible entirely (gotcha #5 in wp-block-theme-gotchas.md).
 *
 * Scoped to header / main / footer / search-drawer so we don't accidentally
 * suppress focus rings inside WP-admin embedded contexts (e.g. block editor
 * iframe), but covers all front-end interactive elements.
 * -------------------------------------------------------------------------- */
header *:focus:not(:focus-visible),
main *:focus:not(:focus-visible),
footer.wp-block-group *:focus:not(:focus-visible),
.msn-search-drawer *:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}
header *:focus-visible,
main *:focus-visible,
footer.wp-block-group *:focus-visible,
.msn-search-drawer *:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 2px;
}
/* The search input has its own underline focus indicator — no outline ring. */
.msn-search-input:focus-visible {
	outline: none;
}

/* -----------------------------------------------------------------------------
 * 1.4 Focus Areas dropdown panel
 * Soft floating card: rounded corners, no border, gentle shadow. Replaces the
 * default square-bordered submenu chrome that WP applies. Inner items reuse
 * the same brand-primary pill hover as the top-level nav for consistency.
 * -------------------------------------------------------------------------- */
header .wp-block-navigation__submenu-container {
	background-color: #ffffff;
	border: none;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
	padding: 8px;
	min-width: 220px;
	margin-top: 6px;
}
/* Invisible bridge across the 6px gap so the dropdown stays open while the
 * mouse travels from the trigger label down to the panel. Without this, the
 * hover state is lost mid-transit and the panel closes. */
header .wp-block-navigation__submenu-container::before {
	content: "";
	position: absolute;
	top: -6px;
	left: 0;
	right: 0;
	height: 6px;
}
header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	border-radius: 6px;
	padding: 8px 12px;
	white-space: nowrap;
}

/* -----------------------------------------------------------------------------
 * 3.1 Sticky footer
 * Make the footer hug the bottom of the viewport on short pages (e.g. 404,
 * empty archives). Uses flex layout on the body / site wrapper so the main
 * content area grows to fill, pushing the footer down.
 * -------------------------------------------------------------------------- */
body.wp-singular,
body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	flex: 1 0 auto;
}
.wp-site-blocks > .wp-block-template-part:last-child,
.wp-site-blocks > footer:last-child {
	margin-top: auto;
}

/* -----------------------------------------------------------------------------
 * 3.2 Director Bio photo
 * The source photo is portrait-oriented; force a square crop inside the 200x200
 * circular frame using object-fit so it doesn't stretch into an oval.
 * -------------------------------------------------------------------------- */
.wp-image-37 {
	width: 200px !important;
	height: 200px !important;
	object-fit: cover;
	object-position: center top;
	border-radius: 50%;
}
/* The parent <figure> also needs its width pinned so it doesn't stretch the img. */
figure.wp-block-image:has(> .wp-image-37) {
	width: 200px;
	height: 200px;
	flex: 0 0 200px;
}

/* -----------------------------------------------------------------------------
 * 5.1 Mobile menu — full-screen dark takeover (≤ 600px)
 * Override WordPress's default responsive nav overlay so that the hamburger
 * opens a full-viewport surface-dark panel with large, left-aligned items
 * and an inline (not floating-card) submenu for Focus Areas. The active page
 * indicator dot shifts to inline-right of the label so it reads naturally in
 * a vertical list. Close (X) sits top-right.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	/* Hamburger trigger button — custom 3-bar icon overrides WP's default SVG
	 * (which renders as 2 lines in this version). The middle bar is the
	 * ::before pseudo-element; the top and bottom bars are box-shadow clones
	 * offset by ±7px. Clean and consistent across WP versions. */
	header .wp-block-navigation__responsive-container-open {
		position: relative;
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 999px;
		color: inherit;
		background-color: transparent;
		transition: background-color 0.15s ease-out;
	}
	header .wp-block-navigation__responsive-container-open:hover {
		background-color: rgba(14, 127, 92, 0.08);
	}
	header .wp-block-navigation__responsive-container-open svg {
		display: none;
	}
	header .wp-block-navigation__responsive-container-open::before {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 22px;
		height: 2px;
		background-color: currentColor;
		box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
		transform: translate(-50%, -50%);
	}

	/* Full-screen overlay surface */
	.wp-block-navigation__responsive-container.is-menu-open {
		background-color: var(--wp--preset--color--surface-dark) !important;
		padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) !important;
	}

	/* Close (X) button — top right */
	.wp-block-navigation__responsive-container-close {
		color: #ffffff;
		padding: 8px;
		border-radius: 999px;
		transition: background-color 0.15s ease-out;
	}
	.wp-block-navigation__responsive-container-close:hover {
		background-color: rgba(255, 255, 255, 0.08);
	}
	.wp-block-navigation__responsive-container-close svg {
		width: 28px;
		height: 28px;
	}

	/* Item list — stack from the top, left-aligned. Override WP's navigation
	 * layout-align CSS variable directly because `align-items` alone can't
	 * win against it. */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		--navigation-layout-align: flex-start !important;
		--navigation-layout-justify: flex-start !important;
		flex-direction: column !important;
		align-items: flex-start !important;
		justify-content: flex-start !important;
		gap: 4px;
		padding-top: var(--wp--preset--spacing--40);
		width: 100% !important;
		text-align: left !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > li,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
		width: 100% !important;
		display: block !important;
		text-align: left !important;
	}

	/* Top-level nav links — large, white, left-aligned, pill hover */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		color: #ffffff;
		font-size: 22px;
		font-weight: 500;
		padding: 12px 16px;
		border-radius: 8px;
		text-decoration: none;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
		background-color: rgba(255, 255, 255, 0.08);
	}

	/* Active-page styling inside the overlay: green colour, inline dot */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content[data-msn-active="true"] {
		color: var(--wp--preset--color--brand-primary);
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content[data-msn-active="true"]::after {
		position: static;
		display: inline-block;
		transform: none;
		margin-left: 8px;
		vertical-align: middle;
	}

	/* Submenu — always visible inside the overlay, rendered inline with a 2px
	 * brand-green vertical rail on the left tying it to the parent label.
	 * Forced position:static and display:block to override WP's overlay rules
	 * that otherwise render this as an absolutely-positioned floating card. */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
		background-color: transparent !important;
		box-shadow: none !important;
		border: none !important;
		border-left: 2px solid var(--wp--preset--color--brand-primary) !important;
		border-radius: 0 !important;
		padding: 4px 0 !important;
		margin: 4px 0 4px 20px !important;
		position: static !important;
		display: block !important;
		width: auto !important;
		height: auto !important;
		min-width: 0 !important;
		max-height: none !important;
		opacity: 1 !important;
		visibility: visible !important;
		overflow: visible !important;
		transform: none !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container::before {
		display: none;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container > li {
		width: 100% !important;
		display: block !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		color: rgba(255, 255, 255, 0.7);
		font-size: 18px;
		font-weight: 400;
		padding: 10px 16px;
		display: block !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
		color: #ffffff;
		background-color: rgba(255, 255, 255, 0.06);
	}
	/* Hide the desktop chevron icon — submenu is always visible, no toggle */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon {
		display: none !important;
	}
}

/* -----------------------------------------------------------------------------
 * 5.2 Mobile responsive (≤ 600px)
 * - Stack the director bio's photo above the text column so the text isn't
 *   squeezed into ~120px next to a 200px photo on narrow viewports.
 * - Centre the bio content and the social icons row.
 * - Release the "push Follow MSN to the bottom" rule because columns stack
 *   on mobile and there's nothing to align against.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-director-bio {
		flex-direction: column !important;
		align-items: center !important;
		text-align: center !important;
	}
	/* Make the bio's inner text column span full width so text-align: center
	 * actually centres each child block; otherwise it shrink-wraps the text
	 * and the centring is invisible. */
	.msn-director-bio > .wp-block-group {
		width: 100%;
		text-align: center;
		align-items: center;
	}
	/* Shrink the 200px portrait to 140px to suit narrow viewports. */
	.msn-director-bio .wp-image-37 {
		width: 140px !important;
		height: 140px !important;
	}
	.msn-director-bio figure.wp-block-image:has(> .wp-image-37) {
		width: 140px;
		height: 140px;
		flex: 0 0 140px;
	}
	/* Centre the Connect with Us column and its social icons. */
	footer.wp-block-group .wp-block-columns > .wp-block-column {
		text-align: center;
	}
	footer.wp-block-group .wp-block-columns > .wp-block-column .wp-block-social-links {
		justify-content: center;
	}
	.msn-director-bio .wp-block-social-links {
		justify-content: center;
	}
	/* Reintroduce a top margin on mobile so "Follow MSN" doesn't sit flush
	 * against the email line above it once columns stack. !important is
	 * required because the desktop rule below in source order (3.5) applies
	 * `margin-top: auto` with the same selector specificity and would
	 * otherwise win the cascade. */
	.wp-block-columns > .wp-block-column .msn-follow-label {
		margin-top: var(--wp--preset--spacing--40) !important;
	}
	/* Stack the location/email icons ABOVE their text on mobile.
	 * The shared inline-block ::before would otherwise sit beside the text.
	 * Making the paragraph itself a flex column turns the pseudo-element and
	 * the text into stacked flex items that both centre via align-items. */
	.msn-icon {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.msn-icon::before {
		width: 18px;
		height: 18px;
		margin: 0 0 6px 0;
	}
	/* Break the copyright line so the year sits above the company name. */
	.msn-copyright__year,
	.msn-copyright__name {
		display: block;
	}
	/* Centre the bottom bar: stack the copyright over the Terms / Cookie links
	 * (instead of the desktop space-between row) and centre-align both. */
	footer.wp-block-group .wp-block-group:has(.msn-copyright) {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	footer.wp-block-group .wp-block-group:has(.msn-copyright) > .wp-block-group {
		justify-content: center;
	}
}

/* -----------------------------------------------------------------------------
 * 3.3 Footer link hover
 * Footer text and inline links should look like plain text by default, with
 * the underline appearing only on hover/focus for affordance. Applies to
 * the email link in Connect with Us and the Terms of Use / Cookie Policy
 * links in the copyright bar.
 * -------------------------------------------------------------------------- */
.wp-block-template-part footer a,
footer.wp-block-group a {
	color: inherit;
	text-decoration: none;
}
.wp-block-template-part footer a:hover,
.wp-block-template-part footer a:focus-visible,
footer.wp-block-group a:hover,
footer.wp-block-group a:focus-visible {
	text-decoration: underline;
}

/* -----------------------------------------------------------------------------
 * 3.4 Inline icons (location pin, envelope) for the footer Connect with Us block.
 * Implemented as CSS mask pseudo-elements so the icon survives WordPress
 * content sanitization (which strips inline <svg> from paragraph blocks) and
 * inherits the parent text colour via `currentColor` on the mask background.
 * -------------------------------------------------------------------------- */
.msn-icon::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	vertical-align: -2px;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
}
.msn-icon--location::before {
	-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C7.58 2 4 5.58 4 10c0 5.25 7 12 8 12s8-6.75 8-12c0-4.42-3.58-8-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z"/></svg>');
	mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C7.58 2 4 5.58 4 10c0 5.25 7 12 8 12s8-6.75 8-12c0-4.42-3.58-8-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z"/></svg>');
}
/* -----------------------------------------------------------------------------
 * 3.5 Footer "Follow" row alignment
 * Push the "Follow MSN" label + social-links block to the bottom of the right
 * column so it baselines with "Follow Charles" + social-links in the director
 * bio (which sits at the bottom of the left column naturally). Works because
 * wp:columns gives both columns equal height by default.
 * -------------------------------------------------------------------------- */
.wp-block-columns > .wp-block-column {
	display: flex;
	flex-direction: column;
}
.wp-block-columns > .wp-block-column .msn-follow-label {
	margin-top: auto;
}

/* -----------------------------------------------------------------------------
 * 3.6 Footer social icons
 * Render each social link as a 36×36 rounded square with a subtle translucent
 * background and a white logo. Normalises the visual weight of icons whose
 * SVG paths render at different optical sizes (e.g. TikTok wider than X), and
 * matches the reference design's grey-tile pattern.
 * -------------------------------------------------------------------------- */
footer.wp-block-group .wp-block-social-links {
	gap: 6px;
}
footer.wp-block-group .wp-block-social-links .wp-social-link {
	width: 36px;
	height: 36px;
	background-color: rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	transition: background-color 0.2s ease;
}
footer.wp-block-group .wp-block-social-links .wp-social-link:hover,
footer.wp-block-group .wp-block-social-links .wp-social-link:focus-visible {
	background-color: rgba(255, 255, 255, 0.18);
}
footer.wp-block-group .wp-block-social-links .wp-social-link svg {
	width: 18px;
	height: 18px;
	fill: #ffffff;
}

.msn-icon--email::before {
	-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm9 7.2L21 7H3l9 6.2z"/></svg>');
	mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm9 7.2L21 7H3l9 6.2z"/></svg>');
}

/* =============================================================================
 * 6. HOME PAGE
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 6.1 Hero pill
 * The "Advocacy · Research · Policy" pill at the top of the home-page hero
 * (templates/front-page.html). Without this rule it renders as a full-width
 * brand-primary band — the block markup declares the className and brand
 * colours, but the tight-badge geometry (inline-block, small uppercase text
 * with letter-spacing, rounded corners, compact padding) is purely visual
 * polish and lives here so the markup stays clean.
 *
 * Sizes follow the client-approved mockup
 * (references/wp_realistic_mockup/msn-wp-home.html line 191–202).
 * -------------------------------------------------------------------------- */
/* Selectors use the `p.` element prefix + the `has-background` hook to outrank
   WordPress core's `.has-small-font-size` and per-block style attributes. The
   `!important` on width/display defeats flex-blockification in wp:column. */
p.msn-hero-pill,
p.msn-hero-pill.has-background {
	align-self: flex-start !important;
	display: inline-block !important;
	width: fit-content !important;
	max-width: 100%;
	padding: 6px 14px !important;
	border-radius: 4px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 1px !important;
	text-transform: uppercase !important;
	line-height: 1.4 !important;
	/* Reset bottom margin — the next-sibling rule below controls the gap to the H1. */
	margin-bottom: 0 !important;
}

/* -----------------------------------------------------------------------------
 * 6.1.1 Pill → heading gap
 * Theme blockGap is set to spacing|40 (~16–24px) for general rhythm. For the
 * hero we want the pill and headline to read as one unit, so override the gap
 * for any heading that follows the pill.
 * -------------------------------------------------------------------------- */
.msn-hero-pill + .wp-block-heading {
	margin-top: var(--wp--preset--spacing--20) !important;
}

/* -----------------------------------------------------------------------------
 * 6.2 Section heading + gold bar
 * Every home-page section H2 (Publications, Featured On, Campaigns) carries the
 * className "msn-section-heading". A 3px gold vertical bar sits to the left of
 * the text via ::before — matches mockup `.section-heading-wrap` lines 104–123.
 * Padding on the heading itself reserves the space so the bar overlays cleanly.
 * -------------------------------------------------------------------------- */
.msn-section-heading {
	position: relative;
	padding-left: 18px;
	font-size: 26px;
	line-height: 1.2;
	margin-bottom: 40px;
}
.msn-section-heading::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 3px;
	background-color: var(--wp--preset--color--brand-accent);
	border-radius: 2px;
}

/* -----------------------------------------------------------------------------
 * 6.3 Card visual (Publications + Featured On)
 * Both card types share the same shell: border + shadow + radius + hover lift
 * + flex-column layout that lets cards in a row share the height of the
 * tallest. The body section grows to fill remaining space and the CTA pill is
 * anchored to the bottom via margin-top:auto in 6.6 — so the three cards in a
 * row align at both the top AND bottom regardless of content length.
 *
 * The card border uses a neutral rgba (mockup's #E0D9D0 isn't in theme tokens;
 * documented exception, same pattern as the footer-bar separator in #06).
 * -------------------------------------------------------------------------- */
.msn-pub-card,
.msn-press-card {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, 0.10);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	transition: box-shadow 0.18s ease-out, transform 0.18s ease-out;
}
.msn-pub-card:hover,
.msn-press-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}
/* Body fills remaining card height so the bottom CTA aligns across cards. */
.msn-pub-card .msn-pub-card__body,
.msn-press-card .msn-press-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	text-align: left;
	align-items: flex-start;
}
/* Equal-height across columns requires the post-template grid items not to
 * inherit any min-height auto behaviours that prevent stretching. */
.wp-block-post-template.is-layout-grid {
	align-items: stretch;
}
.wp-block-post-template.is-layout-grid > li {
	display: flex;
}
.wp-block-post-template.is-layout-grid > li > .msn-pub-card,
.wp-block-post-template.is-layout-grid > li > .msn-press-card {
	flex: 1 1 auto;
	width: 100%;
}

/* Force 16:9 on the press-card featured image regardless of upload dimensions.
 * The wp:post-featured-image block carries aspectRatio:"16/9" but newer WP
 * drops that inline style on <figure> (see wp-block-theme-gotchas #28 + the
 * mirrored fix on .msn-card__image), so portrait uploads stretch the card. */
.msn-press-card .msn-press-logo {
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.msn-press-card .msn-press-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* -----------------------------------------------------------------------------
 * 6.4 Publication type tag
 * The "POLICY PAPER" / "BOOK" / "BRIEF" eyebrow above each card title. Output
 * by wp:post-terms on the publication_type taxonomy. Sized/spaced per mockup
 * `.pub-type` lines 241–249. Gold colour comes from the block's textColor.
 * -------------------------------------------------------------------------- */
.msn-pub-card .msn-pub-type {
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	line-height: 1;
	margin: 0 0 4px 0;
	/* Force flush-left even when wp:post-terms emits has-text-align-* classes
	   or core stylesheets centre tag-like elements. */
	text-align: left !important;
	align-self: flex-start !important;
	width: auto !important;
}
.msn-pub-card .msn-pub-type a {
	color: inherit;
	text-decoration: none;
}

/* -----------------------------------------------------------------------------
 * 6.5 Card title (Publications + Featured On)
 * Sized smaller than the default H3 preset so each card reads as a teaser, not
 * a section subheading. Link `color: inherit` so the title picks up whatever
 * textColor the block JSON declared (brand-secondary navy for pub cards,
 * contrast near-black for press cards — press is third-party editorial, not
 * MSN-branded content). Hover shifts both to brand-primary green for a clean
 * state change without underline noise.
 * -------------------------------------------------------------------------- */
.msn-pub-card .wp-block-post-title,
.msn-press-card .wp-block-post-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}
/* Clamp press-card titles to exactly two lines (truncate with ellipsis past
 * that) so the meta row aligns across every card in the row regardless of
 * title length. Press clippings carry the outlet's own headline — full text
 * lives on the outlet's site behind Read More, so truncation is acceptable.
 * Combines -webkit-line-clamp (ellipsis) with a hard max-height (cap) and
 * min-height (floor) so the title box is exactly 2 lines tall in every case. */
.msn-press-card .wp-block-post-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(2 * 16px * 1.35);
	max-height: calc(2 * 16px * 1.35);
}
.msn-pub-card .wp-block-post-title a,
.msn-press-card .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s ease-out;
}
.msn-pub-card .wp-block-post-title a:hover,
.msn-pub-card .wp-block-post-title a:focus-visible,
.msn-press-card .wp-block-post-title a:hover,
.msn-press-card .wp-block-post-title a:focus-visible {
	color: var(--wp--preset--color--brand-primary);
	text-decoration: none;
}

/* -----------------------------------------------------------------------------
 * 6.6 Download PDF link
 * The block markup uses wp:button so we can bind the `url` attribute to the
 * pub_pdf ACF field. Visually we strip every trace of "button" — transparent
 * background, no padding, brand-primary text colour, underline on hover. The
 * margin-top:auto sticks the link to the bottom of the card so equal-height
 * rows look balanced.
 * -------------------------------------------------------------------------- */
.msn-pub-card .msn-pdf-link-wrap,
.msn-press-card .msn-press-read-more-wrap {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
	/* Specificity escalations — wp:buttons flex layout can re-centre via
	   .is-content-justification-* classes or inline justify-content. */
	justify-content: flex-start !important;
	align-self: flex-start !important;
	width: auto !important;
}
.msn-pub-card .msn-pdf-link-wrap .wp-block-button,
.msn-press-card .msn-press-read-more-wrap .wp-block-button {
	margin: 0 !important;
}
/* Outline pill: transparent fill, brand-primary border + text. Fills with
 * brand-primary + white text on hover for a clear interaction state.
 * Unscoped so the same pill ships on: home Publications cards, home Featured
 * On cards, and the Publications archive rows (Section 8). The card-specific
 * wrap behaviour (margin-top:auto) remains scoped above; only the button
 * visual is shared.
 */
.msn-pdf-link .wp-block-button__link,
.msn-press-read-more .wp-block-button__link {
	background: transparent !important;
	color: var(--wp--preset--color--brand-primary) !important;
	border: 1.5px solid var(--wp--preset--color--brand-primary);
	padding: 6px 14px !important;
	border-radius: 999px; /* full pill */
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.2px;
	text-decoration: none;
	transition: background-color 0.18s ease-out, color 0.18s ease-out;
}
.msn-pdf-link .wp-block-button__link:hover,
.msn-pdf-link .wp-block-button__link:focus-visible,
.msn-press-read-more .wp-block-button__link:hover,
.msn-press-read-more .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--brand-primary) !important;
	color: var(--wp--preset--color--base) !important;
	text-decoration: none;
}

/* -----------------------------------------------------------------------------
 * 6.7 Press meta "Outlet · Date"
 * Flex row of two children: the outlet name (bound to ACF news_outlet) and the
 * post date (wp:post-date). A "·" separator is injected before the date via
 * ::before so the markup stays clean — no literal-text separator block needed.
 * Aligns items to baseline so the typography looks balanced when the two
 * children render at slightly different baselines (paragraph vs <time>).
 * -------------------------------------------------------------------------- */
.msn-press-card .msn-press-meta {
	align-items: baseline;
}
.msn-press-card .msn-press-meta > * {
	margin: 0 !important;
}
/* Separator: visible between adjacent meta children, hidden before the first
 * (so a card without an outlet binding doesn't show a stray "· Date"). */
.msn-press-card .msn-press-meta > *:not(:first-child)::before {
	content: "· ";
	color: var(--wp--preset--color--contrast-muted);
	margin-right: 2px;
}

/* -----------------------------------------------------------------------------
 * 6.8 Campaigns row
 * Three-column flex row per Campaign: green date badge | info column (title +
 * location) | "View Details →" link. Vertical-aligned at center so the badge,
 * the multi-line info, and the single-line CTA all sit on the same axis.
 * Thin neutral border-bottom between rows; the last row drops its border via
 * the next-sibling :has() approach (fall-back :last-child also covered).
 *
 * Mobile: collapse to 2 columns (hide CTA), tighten gap, shrink badge.
 * Matches mockup `.event-row` lines 313–349.
 * -------------------------------------------------------------------------- */
.msn-event-row {
	border-bottom: 1px solid rgba(0, 0, 0, 0.10);
	padding: var(--wp--preset--spacing--40) 0;
}
/* Last row in the post-template loop: no separator. WP wraps each rendered
 * post in <li>; targeting the last li's child row removes the trailing line. */
.wp-block-post-template > li:last-child .msn-event-row {
	border-bottom: none;
}
/* Column proportions — badge fixed-width, info fills, CTA hugs right. */
.msn-event-row > .msn-event-badge {
	flex: 0 0 88px;
}
.msn-event-row > .msn-event-info {
	flex: 1 1 auto;
	min-width: 0; /* allow text to wrap inside the flex item */
}
.msn-event-row > .msn-event-cta {
	flex: 0 0 auto;
	margin-left: auto;
}
/* Tighten typography inside the info column — title is a teaser, location is
 * secondary. Default H3 size + theme blockGap would be too generous. */
.msn-event-info .wp-block-post-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}
.msn-event-info .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s ease-out;
}
.msn-event-info .wp-block-post-title a:hover,
.msn-event-info .wp-block-post-title a:focus-visible {
	color: var(--wp--preset--color--brand-primary);
}
.msn-event-info > p {
	margin: 0;
}

/* -----------------------------------------------------------------------------
 * 6.9 Campaigns date badge
 * Green pill containing three bound paragraphs (day / month / year), each
 * binding the same event_start ACF field with a different `format` arg —
 * see inc/block-bindings.php for the format contract. Typography matches
 * mockup `.event-date-badge` lines 323–334: big day, small uppercase month,
 * small dimmed year.
 * -------------------------------------------------------------------------- */
.msn-event-badge {
	min-width: 70px;
	text-align: center;
	font-family: var(--wp--preset--font-family--sans);
	line-height: 1.2;
}
.msn-event-badge > p {
	margin: 0 !important;
}
.msn-event-badge__day {
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}
.msn-event-badge__mon {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin-top: 2px !important;
}
.msn-event-badge__year {
	font-size: 10px;
	opacity: 0.75;
	margin-top: 2px !important;
}

/* -----------------------------------------------------------------------------
 * 6.10 Campaigns View Details link
 * wp:read-more renders as `<a class="wp-block-read-more msn-event-cta">`.
 * Style as a plain text link in brand-primary; underline appears on hover.
 * -------------------------------------------------------------------------- */
a.wp-block-read-more.msn-event-cta {
	color: var(--wp--preset--color--brand-primary) !important;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap; /* keep the arrow on the same line as the text */
	transition: color 0.18s ease-out;
}
/* Hover state: darken to brand-secondary navy. No underline — keeps the link
 * feeling like part of the editorial flow rather than a generic hyperlink. */
a.wp-block-read-more.msn-event-cta:hover,
a.wp-block-read-more.msn-event-cta:focus-visible {
	color: var(--wp--preset--color--brand-secondary) !important;
	text-decoration: none;
}

/* -----------------------------------------------------------------------------
 * 6.11 Home page mobile responsive (≤ 600px)
 * Co-located mobile rules for the home page sections. Per mockup behaviour:
 *   - Campaigns: hide "View Details →" (the title is the click target), shrink
 *     the date badge so the info column gets more space and titles stop
 *     hyphenating at narrow widths (e.g. "Roundtabl-e").
 *
 * The hero, Publications, and Featured On sections rely on their wp:columns
 * `isStackedOnMobile` and post-template grid auto-stacking for responsive
 * behaviour — no extra rules needed here.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	/* Campaigns row: badge | info layout only. CTA hidden — title still links. */
	a.wp-block-read-more.msn-event-cta {
		display: none;
	}
	.msn-event-row > .msn-event-badge {
		flex: 0 0 64px;
		min-width: 64px;
	}
	/* Trim badge typography a touch so the smaller badge doesn't feel cramped. */
	.msn-event-badge__day {
		font-size: 20px;
	}
	/* Tighter row gap on mobile so badge + info don't feel disconnected. */
	.msn-event-row {
		gap: var(--wp--preset--spacing--30) !important;
	}
}

/* =============================================================================
 * 7. SINGLE PUBLICATION
 * Front-end styling for templates/single-publication.html. Implements the
 * reference design at references/wp_realistic_mockup/msn-wp-publication-single.html.
 * Classes prefixed `.msn-pub-single__*` are scoped to the single template only;
 * `.msn-pub-focus` is shared with the archive (#08 Part 2).
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 7.1 Layout wrapper
 * The inner content group inherits contentSize 780px from theme.json, matching
 * the mockup's max-width: 780px. blockGap on the wrapper handles vertical
 * rhythm between cover / label / title / etc. — section-specific margins are
 * tuned below.
 * -------------------------------------------------------------------------- */
.msn-pub-single {
	max-width: 780px;
	margin: 0 auto;
}

/* -----------------------------------------------------------------------------
 * 7.2 Cover banner
 * Mockup: 280px tall, fills the 780px column, soft drop shadow, 4px radius.
 * WP forces height:auto on images (gotcha #8) — so both width and height
 * carry !important. object-fit:cover crops portrait or landscape source to
 * the banner shape without distortion.
 * -------------------------------------------------------------------------- */
.msn-pub-single__cover {
	margin: 0;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}
.msn-pub-single__cover img {
	width: 100% !important;
	height: 280px !important;
	object-fit: cover;
	object-position: center center;
	display: block;
}

/* -----------------------------------------------------------------------------
 * 7.3 Type label
 * Uppercase letter-spaced gold tag identifying the Publication Type
 * (Policy Paper / Book / Brief). The block renders as
 * .wp-block-post-terms with an inner <a>; we colour the anchor by inheritance.
 * -------------------------------------------------------------------------- */
.msn-pub-single__type-label {
	text-transform: uppercase;
	letter-spacing: 1.1px;
	font-weight: 700;
	font-size: 12px !important;
	color: var(--wp--preset--color--brand-accent);
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: 0;
}
.msn-pub-single__type-label a {
	color: inherit;
	text-decoration: none;
}
.msn-pub-single__type-label a:hover {
	text-decoration: underline;
}

/* -----------------------------------------------------------------------------
 * 7.4 Title + subtitle + date
 * H1 left-aligned, navy serif, 32px (mockup) — overrides theme.json's
 * xx-large preset since this view wants tighter typography than the
 * fluid clamp default.
 *
 * The date row uses a CSS mask-image calendar icon (gotcha #2 — inline
 * <svg> inside wp:paragraph is stripped by wp_kses_post). currentColor
 * lets the icon inherit the muted paragraph colour automatically.
 * -------------------------------------------------------------------------- */
.msn-pub-single__title {
	font-size: 32px !important;
	letter-spacing: -0.3px;
	line-height: 1.2;
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--20);
	text-align: left;
}
.msn-pub-single__subtitle {
	font-size: 17px !important;
	line-height: 1.6;
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--30);
}
.msn-pub-single__date {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px !important;
	line-height: 1.4;
	margin-top: 0;
	margin-bottom: 0;
}
.msn-pub-single__date::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-color: currentColor;
	opacity: 0.6;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/></svg>") no-repeat center / contain;
}

/* -----------------------------------------------------------------------------
 * 7.5 Plain rule
 * 1px hairline matching the rgba(0,0,0,0.1) used in header bottom-border and
 * footer copyright-bar top-border. NOT gold — the gold accent on this page
 * is reserved for the blockquote left border (7.8). Reset WP separator
 * defaults (background-color, height) so only the top border is drawn.
 * -------------------------------------------------------------------------- */
.msn-pub-single__rule {
	border: none !important;
	/* 1px warm-beige hairline matching the mockup's --border (#E0D9D0).
	 * Reserved for thin divider lines; NOT gold (gold accent is reserved
	 * for the small rule under the H1 and the blockquote left border). */
	border-top: 1px solid #E0D9D0 !important;
	background: transparent !important;
	height: 0 !important;
	width: auto !important;
}

/* -----------------------------------------------------------------------------
 * 7.6 Download CTA
 * Full-column-width primary button at 52px tall with a download-arrow icon
 * prepended via CSS mask. Inherits brand-primary background + white text
 * from theme.json's elements.button styles; only sizing, font-weight, and
 * the icon are added here.
 * -------------------------------------------------------------------------- */
.msn-pub-single__download-wrap {
	margin-top: var(--wp--preset--spacing--30) !important;
	margin-bottom: var(--wp--preset--spacing--50) !important;
}
.msn-pub-single__download .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 52px;
	font-size: 15px !important;
	font-weight: 600 !important;
	border-radius: 4px;
}
.msn-pub-single__download .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/></svg>") no-repeat center / contain;
}

/* -----------------------------------------------------------------------------
 * 7.7 Drop cap in post content
 * Native Paragraph block "drop cap" toggle adds .has-drop-cap. WordPress
 * core's default drop cap is sans and undersized for the mockup design;
 * override to match: serif, 72px, navy, floated left of the first line.
 * Scoped under .msn-pub-single .wp-block-post-content so it never leaks
 * to other templates (front-page paragraphs, archives, etc.).
 * -------------------------------------------------------------------------- */
.msn-pub-single .wp-block-post-content .has-drop-cap:not(:focus)::first-letter {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 60px;
	font-weight: 700;
	line-height: 0.85;
	color: var(--wp--preset--color--brand-secondary);
	float: left;
	margin-right: 4px;
	margin-top: 4px;
	padding-top: 2px;
}

/* -----------------------------------------------------------------------------
 * 7.8 Blockquote / pull-quote
 * Mockup design: gold left border, cream (base-alt) background, italic serif
 * inner text in navy. Applied to all three quote-flavour blocks an editor
 * might reach for: classic <blockquote>, core/quote, core/pullquote.
 * Pull-quote = optional — staff create publications without it routinely.
 * -------------------------------------------------------------------------- */
.msn-pub-single .wp-block-post-content blockquote,
.msn-pub-single .wp-block-post-content .wp-block-quote,
.msn-pub-single .wp-block-post-content .wp-block-pullquote {
	border-left: 4px solid var(--wp--preset--color--brand-accent);
	background: var(--wp--preset--color--base-alt);
	padding: 16px 20px !important;
	margin: 24px 0 !important;
	border-radius: 0 4px 4px 0;
}
.msn-pub-single .wp-block-post-content blockquote p,
.msn-pub-single .wp-block-post-content .wp-block-quote p,
.msn-pub-single .wp-block-post-content .wp-block-pullquote p {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 16px !important;
	font-style: italic;
	color: var(--wp--preset--color--brand-secondary);
	line-height: 1.7;
	margin-bottom: 0;
}
.msn-pub-single .wp-block-post-content blockquote cite,
.msn-pub-single .wp-block-post-content .wp-block-quote cite,
.msn-pub-single .wp-block-post-content .wp-block-pullquote cite {
	display: block;
	margin-top: 12px;
	font-style: normal;
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
}

/* -----------------------------------------------------------------------------
 * 7.9 Focus row + focus pills
 * The .msn-pub-focus pill visual styles are now unscoped so the archive row
 * variant (Section 8) inherits the same pill design without duplication.
 * Layout-specific styles (flex container, gap) stay scoped to the parent
 * that hosts the focus row in each template.
 *
 * Pill colour values match the mockup verbatim — kept as rgba literals
 * because the mockup uses brand-primary at 8%/22% opacities which aren't
 * pre-defined theme.json colours.
 * -------------------------------------------------------------------------- */
.msn-pub-single__focus-row {
	gap: var(--wp--preset--spacing--20);
}
.msn-pub-single__focus-label {
	margin: 0;
	font-size: 13px !important;
	font-weight: 600;
}
.msn-pub-single__focus-row .msn-pub-focus {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
}
/* Unscoped pill container — also unscoped now so removing the separator
   text node (via `separator:""` block attribute) doesn't collapse the
   pills together. inline-flex + gap gives visual spacing without needing
   a literal separator character. */
.msn-pub-focus {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
}
/* Unscoped pill visual — shared by single-publication (Section 7) + archive
   row (Section 8). Targets the inner <a> that wp:post-terms emits. */
.msn-pub-focus a {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--wp--preset--color--brand-primary);
	background: rgba(14, 127, 92, 0.08);
	border: 1px solid rgba(14, 127, 92, 0.22);
	padding: 3px 10px;
	border-radius: 20px;
	text-decoration: none;
	line-height: 1.4;
}
.msn-pub-focus a:hover {
	background: rgba(14, 127, 92, 0.15);
}

/* -----------------------------------------------------------------------------
 * 7.10 Single publication mobile responsive (≤ 600px)
 * Title shrinks (32 → 26 mockup spec), cover banner trims to 200px so it
 * doesn't dominate a narrow viewport, drop cap shrinks (72 → 56 mockup).
 * Everything else either reflows naturally (focus row wraps) or uses
 * fluid sizes already.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-pub-single__title {
		font-size: 26px !important;
	}
	.msn-pub-single__cover img {
		height: 200px !important;
	}
	.msn-pub-single .wp-block-post-content .has-drop-cap:not(:focus)::first-letter {
		font-size: 48px;
	}
}

/* -----------------------------------------------------------------------------
 * 7.11 Justified paragraph block style
 * Registered in inc/block-styles.php via register_block_style() so it appears
 * as "Justified" in the editor's Block → Styles panel. Applied to any
 * paragraph the editor opts in by clicking the style chip — not site-wide.
 *
 * Selector note: the editor wraps each paragraph block in a
 * `.wp-block-paragraph` container, but the front-end render is just a bare
 * `<p class="is-style-justified">`. Targeting `.is-style-justified` alone
 * matches both. Currently only registered on core/paragraph; if extended to
 * other blocks later, tighten the selector then.
 *
 * Hyphenation softens the ragged spacing that justified prose can produce
 * in narrow columns; supported in all modern browsers.
 * -------------------------------------------------------------------------- */
.is-style-justified {
	text-align: justify;
	hyphens: auto;
	-webkit-hyphens: auto;
}

/* =============================================================================
 * 8. PUBLICATIONS ARCHIVE
 * Front-end styling for templates/archive-publication.html. Implements the
 * reference design at references/wp_realistic_mockup/msn-wp-publications.html.
 * Publications appear as horizontal rows (100px cover + content body).
 * Pill styling and outline-pill PDF button styling are shared with the
 * single-publication template via the refactored unscoped rules in
 * Section 6.6 and Section 7.9.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 8.1 Archive intro
 * Title section above the publication list. The gold accent rule is rendered
 * as an `::after` pseudo-element on the H1 so it's positionally locked to
 * the title — no separate wp:separator block that could drift out of
 * alignment under different layouts.
 *
 * H1 size override: theme.json sets H1 to fluid xx-large (40–56px). We
 * push to 48px solidly so it reads as a strong page anchor regardless of
 * viewport size. !important is needed to beat theme.json element styles.
 * -------------------------------------------------------------------------- */
.msn-archive-intro__h1 {
	font-size: 48px !important;
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 var(--wp--preset--spacing--30) 0;
}
.msn-archive-intro__h1::after {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: var(--wp--preset--color--brand-accent);
	border-radius: 2px;
	margin-top: 16px;
}
.msn-archive-intro__lede {
	font-size: 16px;
	line-height: 1.7;
	/* Fill the full constrained column so the paragraph's left edge aligns
	 * with the H1. Previously had max-width:640px which, combined with the
	 * parent's constrained-layout `margin-inline:auto > *` rule (specificity
	 * 0,2,0 — beats a single class selector), centred the paragraph and
	 * shifted it ~70px to the right of the heading. Removing the cap lets
	 * the paragraph fill the 780px column and the left edges line up. */
	margin: 0;
}

/* -----------------------------------------------------------------------------
 * 8.1b Meta row — "Showing X of Y publications" + sort dropdown
 * Sits between the page intro and the publication list. Flex justify-between
 * puts the count on the left, the dropdown on the right; wraps on mobile.
 *
 * The submit button on the form is hidden when JS is present (the .msn-js
 * class on <html> is added by assets/js/publication-sort.js, which then
 * auto-submits the form on <select> change). Without JS the button stays
 * visible so the page is fully usable.
 * -------------------------------------------------------------------------- */
.msn-pub-list-meta {
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
	/* Thin beige hairline below the meta row, matching the mockup's
	 * .pub-list-meta border. Same colour (#E0D9D0) as the intro section
	 * bottom border for visual consistency throughout the page. */
	border-bottom: 1px solid #E0D9D0;
	padding-bottom: var(--wp--preset--spacing--20);
}
.msn-pub-list-count {
	margin: 0;
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
}
.msn-pub-list-count strong {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}
.msn-pub-sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}
.msn-pub-sort__label {
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
	margin: 0;
}
.msn-pub-sort__select {
	font-family: inherit;
	font-size: 13px;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	padding: 6px 28px 6px 10px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%231F3A4D' stroke-width='1.5'><path d='M1 1.5l5 5 5-5'/></svg>");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 10px 7px;
}
.msn-pub-sort__select:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 2px;
}
.msn-pub-sort__submit {
	font-family: inherit;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 6px;
	border: 1px solid var(--wp--preset--color--brand-primary);
	background: var(--wp--preset--color--brand-primary);
	color: var(--wp--preset--color--base);
	cursor: pointer;
}
/* JS-enabled: hide the submit button (the JS auto-submits on change). */
.msn-js .msn-pub-sort__submit {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 8.2 Publication row layout
 * Flex container: cover (fixed 100px) + content (flex-grow). The wp:group
 * carries flex layout via block attributes; this section adds the visual
 * inner-list rhythm (no border on the last row).
 *
 * The query container itself is reset so the wp:query alignwide wrapper
 * doesn't conflict with our constrained-content sizing.
 * -------------------------------------------------------------------------- */
.msn-archive-query {
	max-width: 780px;
	margin: 0 auto;
}
.msn-archive-list > li:last-child .msn-pub-row,
.msn-archive-list > .msn-pub-row:last-child {
	border-bottom: none !important;
}

/* -----------------------------------------------------------------------------
 * 8.3 Row cover thumbnail
 * Fixed-width 100px portrait card with rounded corners + soft shadow.
 * width is forced because flex would otherwise let the figure shrink to
 * fit content. height comes from aspect-ratio: 5/7 declared inline on the
 * figure (block attribute), so we don't need to set it here.
 *
 * The inner <img> uses object-fit: cover so portrait or landscape source
 * crops to the 5/7 frame without distortion. WP's height:auto rule
 * (gotcha #8) is overridden with !important.
 * -------------------------------------------------------------------------- */
.msn-pub-row__cover {
	width: 100px !important;
	max-width: 100px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
	margin: 0;
}
.msn-pub-row__cover img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	object-position: center center;
	display: block;
}

/* -----------------------------------------------------------------------------
 * 8.4 Row content
 * Type label reuses the same uppercase gold styling as the single page
 * (Section 7.3) — values match by intent, not via shared selector, because
 * each context owns its own className.
 *
 * Title hover swaps to brand-primary (consistent with home Publications
 * cards). Description uses CSS line-clamp to limit to two lines so rows
 * stay visually consistent regardless of subtitle length.
 * -------------------------------------------------------------------------- */
.msn-pub-row__content {
	flex: 1 1 auto;
	min-width: 0;
}
.msn-pub-row__type {
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
	font-size: 11px !important;
	color: var(--wp--preset--color--brand-accent);
	margin: 0;
}
.msn-pub-row__type a {
	color: inherit;
	text-decoration: none;
}
.msn-pub-row__type a:hover {
	text-decoration: underline;
}
.msn-pub-row__title {
	font-size: 18px !important;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}
.msn-pub-row__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s ease-out;
}
.msn-pub-row__title a:hover,
.msn-pub-row__title a:focus-visible {
	color: var(--wp--preset--color--brand-primary);
}
.msn-pub-row__desc {
	font-size: 14px !important;
	line-height: 1.65;
	margin: 0;
	/* Two-line clamp keeps rows visually balanced regardless of subtitle
	   length. -webkit-line-clamp is widely supported on modern browsers. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* -----------------------------------------------------------------------------
 * 8.5 Row footer (PDF link + date)
 * Flex row carried via block attributes; this section just adds vertical
 * alignment safety and date styling. The PDF button's visual comes from
 * the unscoped Section 6.6 rule (.msn-pdf-link .wp-block-button__link).
 * -------------------------------------------------------------------------- */
.msn-pub-row__footer {
	gap: 20px;
}
.msn-pub-row__footer .msn-pdf-link-wrap {
	margin: 0;
}
/* Archive-row PDF action: strip the outline-pill visual so it reads as a
 * lightweight text link instead — the focus-area pills above it already
 * have a pill shape, and stacking two outlined pills made the eye unsure
 * which one was the action. Scoped to .msn-pub-row__footer so the home
 * page Publications cards keep their outline-pill button (the action is
 * the only pill there, so no competition).
 * Targets .wp-block-button__link directly because that's where the
 * theme's button background / border / padding are applied. */
.msn-pub-row__footer .msn-pdf-link .wp-block-button__link {
	background: transparent !important;
	border: none !important;
	color: var(--wp--preset--color--brand-primary) !important;
	padding: 0 !important;
	border-radius: 0 !important;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}
.msn-pub-row__footer .msn-pdf-link .wp-block-button__link:hover,
.msn-pub-row__footer .msn-pdf-link .wp-block-button__link:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.msn-pub-row__date {
	font-size: 13px !important;
	margin: 0;
}

/* -----------------------------------------------------------------------------
 * 8.6 Pagination
 * Mockup design: 36px rounded buttons with 1px grey border, navy text.
 * Current page = solid green with white text. Prev / Next are wider
 * pill-like buttons with the same border treatment.
 *
 * wp:query-pagination renders an outer container then three children:
 *   - <a class="wp-block-query-pagination-previous">
 *   - <div class="wp-block-query-pagination-numbers"> containing
 *       <a class="page-numbers"> and <span class="page-numbers current">
 *       and <span class="page-numbers dots">…</span>
 *   - <a class="wp-block-query-pagination-next">
 * We style the leaf anchors and spans uniformly, then override per-state.
 * -------------------------------------------------------------------------- */
.msn-archive-pagination {
	gap: 4px;
}
.msn-archive-pagination .wp-block-query-pagination-previous,
.msn-archive-pagination .wp-block-query-pagination-next,
.msn-archive-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	font-size: 14px;
	font-weight: 500;
	border-radius: 4px;
	text-decoration: none;
	color: var(--wp--preset--color--brand-secondary);
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: var(--wp--preset--color--base);
	transition: border-color 0.18s ease-out, color 0.18s ease-out;
}
.msn-archive-pagination .wp-block-query-pagination-previous:hover,
.msn-archive-pagination .wp-block-query-pagination-next:hover,
.msn-archive-pagination .page-numbers:not(.current):not(.dots):hover {
	border-color: var(--wp--preset--color--brand-primary);
	color: var(--wp--preset--color--brand-primary);
}
.msn-archive-pagination .page-numbers.current {
	background: var(--wp--preset--color--brand-primary);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--brand-primary);
	font-weight: 600;
}
.msn-archive-pagination .page-numbers.dots {
	border: none;
	background: none;
	color: var(--wp--preset--color--contrast-muted);
	min-width: 24px;
	cursor: default;
}
.msn-archive-pagination .wp-block-query-pagination-previous,
.msn-archive-pagination .wp-block-query-pagination-next {
	padding: 0 14px;
	color: var(--wp--preset--color--contrast-muted);
}

/* -----------------------------------------------------------------------------
 * 8.7 Archive mobile responsive (≤ 600px)
 * Cover shrinks to 80×112 (mockup: same proportions), row gap tightens so
 * the cover doesn't feel disconnected from its content. Pagination spacing
 * stays comfortable enough for touch.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-pub-row {
		gap: var(--wp--preset--spacing--30) !important;
	}
	.msn-pub-row__cover {
		width: 80px !important;
		max-width: 80px;
	}
	.msn-pub-row__title {
		font-size: 16px !important;
	}
	.msn-pub-row__footer {
		gap: 12px;
	}
	.msn-archive-intro__h1 {
		font-size: 28px !important;
	}
	/* Stack count above dropdown on narrow screens so neither item wraps
	 * onto two lines at typical mobile widths. */
	.msn-pub-list-meta {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 12px;
	}
}

/* =============================================================================
 * 9. SINGLE EVENT (CAMPAIGN)
 * Front-end styling for templates/single-event.html. Implements the reference
 * design at references/wp_realistic_mockup/msn-wp-event-single.html.
 * Classes prefixed `.msn-event-*` are scoped to the Campaign templates;
 * `.msn-pub-focus` (focus-area pills) is shared with the Publication views.
 *
 * Conditional blocks (type pill, date end, location, website, highlight band,
 * download buttons) always render in the markup — when their bound ACF field
 * is empty the block renders empty, and the :empty / :has() rules below hide
 * it. No PHP visibility filter is used in Part 1.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 9.1 Layout wrapper
 * The inner content group inherits contentSize 780px from theme.json, matching
 * the mockup's max-width: 780px.
 * -------------------------------------------------------------------------- */
.msn-event-single {
	max-width: 780px;
	margin: 0 auto;
}

/* -----------------------------------------------------------------------------
 * 9.2 Pill row
 * Flex row of focus-area pills, the Upcoming/Past status badge and the event
 * type pill. The row sits in flex layout so the pills are NOT auto-centred by
 * constrained-layout margins (wp-block-theme-gotchas #19).
 * -------------------------------------------------------------------------- */
.msn-event-pills {
	align-items: center;
	gap: 8px;
}
/* The status badge is a <span> injected by the render_block filter, and the
 * type pill is a paragraph block — zero the paragraph's default margin so it
 * sits on the same centre line as the badge and the focus pills. */
.msn-event-pills > p {
	margin: 0;
}
/* Focus-area pills reuse the shared .msn-pub-focus visual, but in the campaign
 * pill row they are normalised to match the status + type pills exactly —
 * same padding, font size/weight, and uppercase treatment — so all three
 * align. The override is scoped to .msn-event-pills so the Publication views,
 * which keep the title-case .msn-pub-focus pill, are unaffected. */
.msn-event-pills .msn-pub-focus a {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	padding: 4px 12px;
}

/* Status badge — base is the neutral grey "Past" outline pill. The --upcoming
 * modifier switches it to a SOLID navy fill (white text). The filled treatment
 * — rather than another light outline — is what makes the status badge stand
 * out from the light grey "Past" pill and the green focus / gold type outline
 * pills beside it. The border colour matches the fill so a filled and an
 * outline pill keep the same box size. */
.msn-event-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 20px;
	line-height: 1.4;
	color: var(--wp--preset--color--contrast-muted);
	background: rgba(85, 85, 85, 0.08);
	border: 1px solid rgba(85, 85, 85, 0.18);
}
.msn-event-badge--upcoming {
	color: #ffffff;
	background: var(--wp--preset--color--brand-secondary);
	border-color: var(--wp--preset--color--brand-secondary);
}

/* Event-type pill — gold treatment, matching the mockup .pill-type. */
.msn-event-pill--type {
	display: inline-block;
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 20px;
	line-height: 1.4;
	color: var(--wp--preset--color--brand-accent);
	background: rgba(201, 161, 74, 0.08);
	border: 1px solid rgba(201, 161, 74, 0.22);
}
/* Hide the type pill entirely when event_type is blank (binding renders the
 * paragraph empty). Without this an empty bordered pill would still show. */
.msn-event-pill--type:empty {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 9.3 Title + gold accent rule
 * H1 left-aligned, navy serif, 32px (mockup). The gold rule is a core
 * separator; constrained layout would auto-centre a 40px-wide child
 * (wp-block-theme-gotchas #28), so the margin is forced left-aligned.
 * -------------------------------------------------------------------------- */
.msn-event-single__title {
	font-size: 32px !important;
	letter-spacing: -0.3px;
	line-height: 1.2;
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--20);
	text-align: left;
}
.msn-event-single .msn-event-rule {
	border: none !important;
	background-color: var(--wp--preset--color--brand-accent) !important;
	width: 40px !important;
	height: 3px !important;
	border-radius: 2px;
	margin-top: var(--wp--preset--spacing--20) !important;
	margin-bottom: var(--wp--preset--spacing--20) !important;
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* -----------------------------------------------------------------------------
 * 9.4 Meta card
 * Base-alt card with a warm-beige hairline border and soft shadow. Holds the
 * date / location / website rows stacked vertically.
 * -------------------------------------------------------------------------- */
.msn-event-meta {
	gap: 10px;
	padding: 20px;
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--base-alt);
	border: 1px solid #E0D9D0;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}
.msn-event-meta-item {
	gap: 10px;
	align-items: center;
	font-size: 14.5px;
}
/* Leading icon for each meta row — CSS mask-image, because inline <svg> in a
 * block would be stripped by wp_kses_post (wp-block-theme-gotchas #2). */
.msn-event-meta-item::before {
	content: "";
	display: inline-block;
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	background-color: var(--wp--preset--color--contrast-muted);
	opacity: 0.7;
}
.msn-event-meta-item--date::before {
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/></svg>") no-repeat center / contain;
}
.msn-event-meta-item--location::before {
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / contain;
}
.msn-event-meta-item--website::before {
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93C7.05 19.44 4 16.08 4 12c0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41C19.92 5.77 22 8.65 22 12c0 3.34-2.08 6.23-5.1 7.39z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93C7.05 19.44 4 16.08 4 12c0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41C19.92 5.77 22 8.65 22 12c0 3.34-2.08 6.23-5.1 7.39z'/></svg>") no-repeat center / contain;
}
.msn-event-meta-item__label {
	margin: 0;
	width: 72px;
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast-muted);
}
.msn-event-meta-item__value {
	margin: 0;
	font-size: 14.5px;
}
/* Meta-row values: the location paragraph and the date paragraph injected by
 * the render_block filter (.msn-event-dates). Strip the default paragraph
 * margin and match the value font size. The label paragraph is excluded so it
 * keeps its own uppercase styling. */
.msn-event-meta-item > p:not(.msn-event-meta-item__label) {
	margin: 0;
	font-size: 14.5px;
}
/* Hide the location row entirely when event_location is blank. */
.msn-event-meta-item--location:has(.msn-event-loc:empty) {
	display: none;
}
/* Website link — the [msn_event_website] shortcode outputs this anchor with
 * the URL (protocol stripped) as its text. Styled as a green text link with a
 * small "opens in a new tab" icon after it, matching the mockup's .meta-link. */
.msn-event-weblink-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--wp--preset--color--brand-primary);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	word-break: break-word;
}
.msn-event-weblink-link:hover {
	text-decoration: underline;
}
.msn-event-weblink-link::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	/* Muted grey — a quiet secondary indicator, matching the leading
	 * globe/calendar icons in the meta card. Green stays the link-text colour. */
	background-color: var(--wp--preset--color--contrast-muted);
	/* The mockup's exact external-link glyph: a thin stroked outline (the
	 * stroke's alpha is what the mask renders, so fill is none and the stroke
	 * is given a solid colour purely so it paints). Matches msn-wp-event-single.html. */
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V7M7.5 1H11m0 0v3.5M11 1 5.5 6.5' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V7M7.5 1H11m0 0v3.5M11 1 5.5 6.5' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}
/* Hide the website row when event_external_url is blank: the shortcode then
 * returns nothing, so the row contains no anchor at all. */
.msn-event-meta-item--website:not(:has(a)) {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 9.5 Highlight band
 * Gold left border, base-alt background, italic serif pull-quote in navy.
 * The whole band hides when event_highlight is blank.
 * -------------------------------------------------------------------------- */
.msn-event-highlight {
	padding: 24px;
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--base-alt);
	border-left: 4px solid var(--wp--preset--color--brand-accent);
	border-radius: 0 4px 4px 0;
}
.msn-event-highlight__text {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 17px;
	font-style: italic;
	line-height: 1.7;
	color: var(--wp--preset--color--brand-secondary);
}
.msn-event-highlight:has(.msn-event-highlight__text:empty) {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 9.6 About heading + post body
 * Serif navy H2 with a gold rule beneath (the same .msn-event-rule used under
 * the H1). The post body uses the theme's default prose styling.
 * -------------------------------------------------------------------------- */
.msn-event-h2 {
	font-size: 24px !important;
	line-height: 1.2;
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--20);
}

/* -----------------------------------------------------------------------------
 * 9.7 Downloads
 * First button is the filled brand-primary CTA; the second uses the core
 * "Outline" style. Each button carries a download-arrow icon and hides when
 * its bound file field is empty (no href is injected). The whole section
 * hides when neither Agenda nor Slides has been uploaded.
 * -------------------------------------------------------------------------- */
.msn-event-downloads {
	margin-top: var(--wp--preset--spacing--50);
}
.msn-event-downloads__buttons {
	gap: 12px;
	margin-top: var(--wp--preset--spacing--20);
}
.msn-event-dl-btn {
	flex: 1 1 200px;
}
.msn-event-dl-btn .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 50px;
	font-size: 14px !important;
	font-weight: 600 !important;
	border-radius: 4px;
}
.msn-event-dl-btn .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/></svg>") no-repeat center / contain;
}
/* Filled (Agenda) button — solid brand-green with a navy hover, both inherited
 * from theme.json elements.button (:hover → brand-secondary). No override is
 * needed here; it already matches the publication "Download PDF" button.
 *
 * Outline (Slides) button — transparent fill with a 2px brand-green border and
 * green label + icon, matching the mockup's .btn-dl-outline. Core's
 * is-style-outline otherwise defaults to a dark/contrast border that reads as
 * off-brand. On hover/focus it fills SOLID NAVY with white text — the same
 * hover colour as the filled Agenda and publication "Download PDF" buttons —
 * so both download buttons resolve to an identical navy state on interaction.
 * The icon tracks the text colour automatically via currentColor. */
.msn-event-dl-btn.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	border: 2px solid var(--wp--preset--color--brand-primary) !important;
	color: var(--wp--preset--color--brand-primary) !important;
}
.msn-event-dl-btn.is-style-outline .wp-block-button__link:hover,
.msn-event-dl-btn.is-style-outline .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--brand-secondary) !important;
	border-color: var(--wp--preset--color--brand-secondary) !important;
	color: #ffffff !important;
}
/* Hide an individual download button when its file field is empty — the
 * msn/acf binding only injects href when the field has a value. */
.msn-event-downloads .wp-block-button:not(:has(.wp-block-button__link[href])) {
	display: none;
}
/* Hide the whole Downloads section when neither file has been uploaded. */
.msn-event-downloads:not(:has(.wp-block-button__link[href])) {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 9.8 Single event mobile responsive (≤ 600px)
 * Title shrinks (32 → 24, mockup spec), the meta label drops its fixed width
 * so values are not cramped, and the download buttons stack full-width.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-event-single__title {
		font-size: 24px !important;
	}
	/* Drop the DATE / LOCATION / WEBSITE text labels on mobile — the leading
	 * icon already identifies each row — leaving a clean icon + value line.
	 * The meta items keep their base align-items:center (section 9.4). */
	.msn-event-meta-item__label {
		display: none;
	}
	.msn-event-dl-btn {
		flex-basis: 100%;
	}
}

/* =============================================================================
 * 10. CAMPAIGN ARCHIVE
 * Front-end styling for templates/archive-event.html. Implements the reference
 * design at references/wp_realistic_mockup/msn-wp-campaigns.html.
 *
 * The page intro (.msn-archive-intro*), the count line + sort dropdown
 * (.msn-pub-list-meta, .msn-pub-sort*, .msn-pub-list-count) and the pagination
 * (.msn-archive-pagination) are all REUSED from the Publications archive
 * (sections 8.1 / 8.6) — only the per-row campaign layout is new here.
 * The status / type pills reuse section 9.2 via the .msn-event-pills class.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 10.1 Campaign list + row
 * One vertical chronological list (no Upcoming/Past split — #09 decision #1).
 * Row padding and the beige hairline divider are set on the block in the
 * template; only the last-row divider removal lives here.
 * -------------------------------------------------------------------------- */
.msn-event-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.msn-event-list > li:last-child .msn-event-item {
	border-bottom: none !important;
}
/* Focus-area pills on a campaign row — uppercase, matching the single-campaign
 * pill row (section 9.2). Scoped to .msn-event-item so the Publications views
 * keep their title-case .msn-pub-focus pills. */
.msn-event-item .msn-pub-focus a {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	padding: 4px 12px;
}

/* -----------------------------------------------------------------------------
 * 10.2 Row external-URL line
 * The render_block filter injects the .msn-event-weblink-link anchor (section
 * 9.4) directly as a child of the row. It is scoped smaller and muted here —
 * on a row it is a quiet secondary detail, not the prominent green link of
 * the single page — and forced onto its own line (the row is block-flow, so a
 * bare inline anchor would otherwise run into the badges below).
 * -------------------------------------------------------------------------- */
.msn-event-item > .msn-event-weblink-link {
	display: flex;
	width: -moz-fit-content;
	width: fit-content;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--wp--preset--color--contrast-muted);
}

/* -----------------------------------------------------------------------------
 * 10.3 Row title
 * Serif navy H3, links to the single campaign, shifts to brand-green on hover.
 * -------------------------------------------------------------------------- */
.msn-event-item__title {
	font-size: 20px !important;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}
.msn-event-item__title a {
	color: var(--wp--preset--color--brand-secondary);
	text-decoration: none;
}
.msn-event-item__title a:hover {
	color: var(--wp--preset--color--brand-primary);
	text-decoration: underline;
}

/* -----------------------------------------------------------------------------
 * 10.4 Row date + location meta
 * Flex row of two icon+text items. The location item hides when
 * event_location is empty (its bound paragraph renders empty).
 * Icons via CSS mask-image (gotcha #2 — inline <svg> would be stripped).
 * -------------------------------------------------------------------------- */
.msn-event-item__meta {
	gap: 20px;
	align-items: center;
}
.msn-event-item__meta-date,
.msn-event-item__meta-loc {
	gap: 6px;
	align-items: center;
}
.msn-event-item__meta-date p,
.msn-event-item__meta-loc p {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	/* A tight line-height keeps the paragraph box close to the text height so
	 * it centres cleanly against the 14px icon — the body's default 1.65
	 * line-height made the box much taller than the glyphs, leaving the icon
	 * looking off-centre. */
	line-height: 1.3;
	color: var(--wp--preset--color--contrast-muted);
}
.msn-event-item__meta-date::before,
.msn-event-item__meta-loc::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-color: var(--wp--preset--color--contrast-muted);
	opacity: 0.7;
}
.msn-event-item__meta-date::before {
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/></svg>") no-repeat center / contain;
}
.msn-event-item__meta-loc::before {
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / contain;
}
/* Hide the location item entirely when event_location is blank. */
.msn-event-item__meta-loc:has(.msn-event-item__loc:empty) {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 10.5 Row summary
 * The post excerpt, muted, capped so long copy does not run the full column.
 * Clamped to 3 lines so every archive row stays a similar height and the row
 * does not become a wall of text on a narrow screen. A little vertical margin
 * gives the summary breathing room from the meta row and the buttons.
 * -------------------------------------------------------------------------- */
.msn-event-item__summary {
	margin: var(--wp--preset--spacing--10) 0;
	max-width: 640px;
}
.msn-event-item__summary p {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--wp--preset--color--contrast-muted);
	/* Clamp to 3 lines with an ellipsis (overflow line-clamp). */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

/* -----------------------------------------------------------------------------
 * 10.6 Row download buttons
 * Compact green outline buttons (the single page uses larger filled/outline
 * buttons; a list row needs a lighter treatment). Both fill solid navy on
 * hover/focus — the same hover end-state as every other download button on
 * the site. A button hides when its file field injects no href; the whole
 * row hides when neither file is uploaded.
 * -------------------------------------------------------------------------- */
.msn-event-item__downloads {
	gap: 10px;
	margin-top: var(--wp--preset--spacing--10);
}
.msn-event-item__dl .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-size: 13px !important;
	font-weight: 600 !important;
	border-radius: 4px;
	background-color: transparent !important;
	border: 1.5px solid var(--wp--preset--color--brand-primary) !important;
	color: var(--wp--preset--color--brand-primary) !important;
}
.msn-event-item__dl .wp-block-button__link:hover,
.msn-event-item__dl .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--brand-secondary) !important;
	border-color: var(--wp--preset--color--brand-secondary) !important;
	color: #ffffff !important;
}
.msn-event-item__dl .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/></svg>") no-repeat center / contain;
}
/* Hide an individual download button when its file field is empty. */
.msn-event-item__downloads .wp-block-button:not(:has(.wp-block-button__link[href])) {
	display: none;
}
/* Hide the whole download row when neither file has been uploaded. */
.msn-event-item__downloads:not(:has(.wp-block-button__link[href])) {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 10.7 Campaign archive mobile responsive (≤ 600px)
 * Tighten the meta row only. The download buttons intentionally keep their
 * compact, auto-width desktop sizing so they sit side by side (wrapping only
 * if both do not fit) rather than becoming heavy full-width stacked CTAs.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-event-item__meta {
		gap: 8px 16px;
	}
}

/* =============================================================================
 * 11. SINGLE MEDIA (NEWS)
 * Front-end styling for templates/single-news.html. Implements the reference
 * design at references/wp_realistic_mockup/msn-wp-media-item-versions.html.
 *
 * One template renders all four Media variants — MSN Release, Press Clipping,
 * Video and Podcast. The render_block filter in inc/news-variants.php strips
 * the blocks of the three variants that do not apply, so the rules below only
 * ever style the surviving variant's blocks. Classes prefixed `.msn-news-*`
 * are scoped to the Media templates; `.msn-pub-focus` (focus-area pills) is
 * shared with the Publication and Campaign views.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 11.1 Layout wrapper
 * The inner content group inherits contentSize 780px from theme.json, matching
 * the mockup's max-width: 780px.
 * -------------------------------------------------------------------------- */
.msn-news-single {
	max-width: 780px;
	margin: 0 auto;
}

/* -----------------------------------------------------------------------------
 * 11.2 Type badge
 * A solid filled, 4px-radius rectangle (mockup .type-badge) — green for MSN
 * Release / Video / Podcast, gold for Press Clipping. Four badge paragraphs
 * sit in the .msn-news-badges flex row; the render_block filter keeps only the
 * matching one, so exactly one badge shows, left-aligned. The flex row keeps
 * that badge shrink-to-fit — a bare inline-block paragraph in the constrained
 * inner group would be auto-centred (wp-block-theme-gotchas #19).
 * -------------------------------------------------------------------------- */
.msn-news-badges {
	gap: 8px;
	align-items: center;
}
/* When the post has no news_type term every badge is stripped, leaving the
 * flex row empty — hide it so it adds no stray vertical space. */
.msn-news-badges:empty {
	display: none;
}
.msn-news-badge {
	margin: 0;
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	padding: 5px 13px;
	border-radius: 4px;
	line-height: 1.4;
}
.msn-news-badge--green {
	background: var(--wp--preset--color--brand-primary);
	color: #ffffff;
}
.msn-news-badge--gold {
	background: var(--wp--preset--color--brand-accent);
	color: #ffffff;
}
/* Navy badge — Video and Podcast. Groups the two multimedia formats together
 * and keeps them distinct from the green MSN Release and gold Press Clipping
 * editorial badges. */
.msn-news-badge--navy {
	background: var(--wp--preset--color--brand-secondary);
	color: #ffffff;
}

/* -----------------------------------------------------------------------------
 * 11.3 Title + gold accent rule
 * H1 left-aligned, navy serif, 32px — matching the single-publication and
 * single-event titles for cross-template consistency. The gold rule is a core
 * separator; constrained layout would auto-centre a 40px-wide child
 * (wp-block-theme-gotchas #28), so its margin is forced left-aligned.
 * -------------------------------------------------------------------------- */
.msn-news-single__title {
	font-size: 32px !important;
	letter-spacing: -0.3px;
	line-height: 1.2;
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--20);
	text-align: left;
}
.msn-news-single .msn-news-rule {
	border: none !important;
	background-color: var(--wp--preset--color--brand-accent) !important;
	width: 40px !important;
	height: 3px !important;
	border-radius: 2px;
	margin-top: var(--wp--preset--spacing--20) !important;
	margin-bottom: var(--wp--preset--spacing--20) !important;
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* -----------------------------------------------------------------------------
 * 11.4 Meta row
 * A flex row: publish date, then a variant-marked author ("By MSN
 * Globalisation", MSN Release) or outlet (news_outlet, Press Clipping) line,
 * then the focus-area pills. The "·" separators are injected by CSS on every
 * item except the first — so when the render_block filter strips a variant
 * line, or an empty outlet is hidden, no orphaned separator is left behind.
 * -------------------------------------------------------------------------- */
.msn-news-meta {
	gap: 8px;
	align-items: center;
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
}
/* Strip the default paragraph margin from every meta child so the row sits on
 * a single centre line. */
.msn-news-meta > * {
	margin: 0;
}
/* Dot separator before every item except the first. A stripped or hidden
 * sibling leaves no visible dot — its own ::before is hidden with it, and the
 * next visible item still gets exactly one leading dot. */
.msn-news-meta > * + *::before {
	content: "·";
	margin-right: 8px;
	color: rgba(0, 0, 0, 0.25);
}
.msn-news-meta .wp-block-post-date,
.msn-news-meta__author {
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
}
.msn-news-meta__author {
	font-weight: 500;
}
/* Outlet name — uppercase gold, matching the mockup .meta-outlet. */
.msn-news-meta__outlet {
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-accent);
}
/* Hide the outlet line (and its leading dot) when news_outlet is blank — the
 * binding renders the paragraph empty. */
.msn-news-meta p:empty {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 11.5 MSN Release — featured image
 * Full-column hero above the article body, soft shadow, 4px radius. WP forces
 * height:auto on images (wp-block-theme-gotchas #8) — so width and height both
 * carry !important; object-fit:cover crops a portrait or landscape source.
 * -------------------------------------------------------------------------- */
.msn-news-featured {
	margin: 0 0 var(--wp--preset--spacing--30) 0;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}
.msn-news-featured img {
	width: 100% !important;
	height: 320px !important;
	object-fit: cover;
	object-position: center center;
	display: block;
}

/* -----------------------------------------------------------------------------
 * 11.6 Drop cap
 * Matches the single-publication drop cap (section 7.7) — same mechanism, same
 * sizing — so the two single templates stay consistent. WordPress's native
 * Paragraph "drop cap" toggle adds .has-drop-cap; this rule restyles that cap
 * to the MSN design (serif, navy, floated left of the first line) rather than
 * core's undersized sans default. It is editor-driven, not automatic — staff
 * apply it where they want it, typically the first paragraph of an MSN Release
 * body. Scoped to .msn-news-single .wp-block-post-content so it covers every
 * variant's body (MSN Release / Video / Podcast) without leaking elsewhere.
 * -------------------------------------------------------------------------- */
.msn-news-single .wp-block-post-content .has-drop-cap:not(:focus)::first-letter {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 60px;
	font-weight: 700;
	line-height: 0.85;
	color: var(--wp--preset--color--brand-secondary);
	float: left;
	margin-right: 4px;
	margin-top: 4px;
	padding-top: 2px;
}

/* -----------------------------------------------------------------------------
 * 11.6b Body blockquote / pull-quote
 * The mockup's MSN Release body includes a gold-bordered italic pull-quote.
 * Style the three quote-flavour blocks an editor might use inside the post
 * body — classic <blockquote>, core/quote, core/pullquote — to match. Scoped
 * to .msn-news-single .wp-block-post-content so it covers every variant whose
 * body uses wp:post-content (MSN Release, Video, Podcast) without leaking to
 * other templates. Mirrors the single-publication treatment (section 7.8).
 * -------------------------------------------------------------------------- */
.msn-news-single .wp-block-post-content blockquote,
.msn-news-single .wp-block-post-content .wp-block-quote,
.msn-news-single .wp-block-post-content .wp-block-pullquote {
	border-left: 4px solid var(--wp--preset--color--brand-accent);
	background: var(--wp--preset--color--base-alt);
	padding: 16px 20px !important;
	margin: 24px 0 !important;
	border-radius: 0 4px 4px 0;
}
.msn-news-single .wp-block-post-content blockquote p,
.msn-news-single .wp-block-post-content .wp-block-quote p,
.msn-news-single .wp-block-post-content .wp-block-pullquote p {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 16px !important;
	font-style: italic;
	color: var(--wp--preset--color--brand-secondary);
	line-height: 1.7;
	margin-bottom: 0;
}
.msn-news-single .wp-block-post-content blockquote cite,
.msn-news-single .wp-block-post-content .wp-block-quote cite,
.msn-news-single .wp-block-post-content .wp-block-pullquote cite {
	display: block;
	margin-top: 12px;
	font-style: normal;
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
}

/* -----------------------------------------------------------------------------
 * 11.7 Press Clipping — excerpt box
 * Gold left border, base-alt background, italic serif navy text — the same
 * pull-quote treatment as the campaign highlight band (section 9.5). The whole
 * box hides when news_excerpt is blank (the bound paragraph renders empty).
 * -------------------------------------------------------------------------- */
.msn-news-excerpt {
	padding: 16px 20px;
	margin-bottom: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--base-alt);
	border-left: 4px solid var(--wp--preset--color--brand-accent);
	border-radius: 0 4px 4px 0;
}
.msn-news-excerpt__text {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 16px;
	font-style: italic;
	line-height: 1.72;
	color: var(--wp--preset--color--brand-secondary);
}
.msn-news-excerpt:has(.msn-news-excerpt__text:empty) {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 11.8 Press Clipping — read-original CTA
 * Full-column-width green button at 52px tall with a trailing external-link
 * icon (CSS mask — inline <svg> would be stripped, wp-block-theme-gotchas #2).
 * Background + white text are inherited from theme.json elements.button. The
 * button hides when news_external_url is blank — the msn/acf binding then
 * injects no href (button text stays static so the block itself still renders,
 * wp-block-theme-gotchas #32).
 * -------------------------------------------------------------------------- */
.msn-news-original-wrap {
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--20);
}
.msn-news-original .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 52px;
	font-size: 15px !important;
	font-weight: 600 !important;
	border-radius: 4px;
}
.msn-news-original .wp-block-button__link::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V7M7.5 1H11m0 0v3.5M11 1 5.5 6.5' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V7M7.5 1H11m0 0v3.5M11 1 5.5 6.5' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}
/* Hide the CTA when news_external_url is blank — no href is injected. */
.msn-news-original:not(:has(.wp-block-button__link[href])) {
	display: none;
}

/* -----------------------------------------------------------------------------
 * 11.9 External-hosting disclaimer
 * Small italic muted note clarifying that MSN does not host external content.
 * Used by three variants: below the CTA on Press Clipping, and below the body
 * on Video and Podcast.
 * -------------------------------------------------------------------------- */
.msn-news-disclaimer {
	margin: 0;
	font-size: 13px !important;
	font-style: italic;
	line-height: 1.6;
}

/* -----------------------------------------------------------------------------
 * 11.10 Single media mobile responsive (≤ 600px)
 * Title shrinks (32 → 24, mockup spec), the featured hero trims so it does not
 * dominate a narrow viewport, and the drop cap shrinks (60 → 48, matching §7.10).
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-news-single__title {
		font-size: 24px !important;
	}
	.msn-news-featured img {
		height: 220px !important;
	}
	.msn-news-single .wp-block-post-content .has-drop-cap:not(:focus)::first-letter {
		font-size: 48px;
	}
}

/* =============================================================================
 * 12. MEDIA ARCHIVE
 * Front-end styling for templates/archive-news.html. Implements the reference
 * design at references/wp_realistic_mockup/msn-wp-media.html.
 *
 * Unlike the single-column Publication and Campaign archives, the Media archive
 * is a wide (1240px) 3-column card grid. The count line + sort dropdown
 * (.msn-pub-list-meta, .msn-pub-sort*, .msn-pub-list-count) and the pagination
 * (.msn-archive-pagination) are REUSED from the Publications archive (sections
 * 8.1b / 8.6). The type-badge colours reuse .msn-news-badge--green / --gold /
 * --navy from section 11.2. Only the page header and the card grid are new.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 12.1 Page header
 * Gold eyebrow label → serif navy H1 → 40px gold rule. The inner group is
 * align:wide so its left edge lines up with the card grid below. blockGap is
 * zeroed on that group (block markup) so the three elements' spacing is set
 * here precisely, matching the mockup.
 * -------------------------------------------------------------------------- */
.msn-media-archive__eyebrow {
	margin: 0 0 10px 0;
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-accent);
}
/* H1 size matches the Campaign / Publication archive H1 (.msn-archive-intro__h1,
 * section 8.1) — 48px — so all three archive titles read at the same scale. */
.msn-media-archive__h1 {
	font-size: 48px !important;
	font-weight: 700;
	line-height: 1.15;
	margin: 0;
}
/* Intro lede — a short description below the gold rule, matching the
 * Campaign / Publication archive lede. Capped to a readable measure so the
 * line length stays comfortable in the wide (1240px) header. */
.msn-media-archive__lede {
	margin: var(--wp--preset--spacing--30) 0 0 0;
	max-width: 720px;
	font-size: 16px;
	line-height: 1.7;
}
/* Gold accent rule — a core separator. Constrained layout would auto-centre a
 * 40px-wide child (wp-block-theme-gotchas #28), so the margin is forced
 * left-aligned. */
.msn-media-archive-header .msn-media-archive__rule {
	border: none !important;
	background-color: var(--wp--preset--color--brand-accent) !important;
	width: 40px !important;
	height: 3px !important;
	border-radius: 2px;
	margin-top: var(--wp--preset--spacing--20) !important;
	margin-bottom: 0 !important;
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* -----------------------------------------------------------------------------
 * 12.1b Filter chip strip
 * Visitor-facing news_type filter row above the card grid. Server-rendered by
 * [msn_media_chips] (inc/media-chip-strip.php); each chip is a plain anchor to
 * a native term archive — no JS, no client-state. Active chip carries
 * .is-active + aria-current="page".
 *
 * Each chip carries a variant modifier (.msn-media-chip--<slug>) that picks
 * the colour of its sibling card badge so the filter / result connection is
 * visually obvious: green chip for MSN Release, gold for Press Clipping, navy
 * for Video / Podcast / Write-up / All. Inactive chip = outlined in the
 * variant colour with matching text; active chip = filled with the variant
 * colour, white text. The variant colour is supplied via a --msn-chip-color
 * custom property so the base rule stays DRY.
 * -------------------------------------------------------------------------- */
.msn-media-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0; /* Sits inline inside .msn-pub-list-meta between count and sort. */
}
.msn-media-chip {
	--msn-chip-color: var(--wp--preset--color--brand-secondary); /* navy default */
	display: inline-block;
	padding: 5px 12px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	/* Default state: filled with the variant colour, white text — matches the
	 * card badge aesthetic so each chip reads as "the same family as the
	 * badge it filters to." */
	color: var(--wp--preset--color--base);
	background: var(--msn-chip-color);
	border: 1px solid var(--msn-chip-color);
	border-radius: 4px; /* Matches the rectangular badge corner on the cards. */
	text-decoration: none;
	transition: background-color 0.18s ease-out, color 0.18s ease-out;
}
.msn-media-chip:hover,
.msn-media-chip:focus-visible {
	/* Slight darken on hover so the filled chip still gives press feedback. */
	background: color-mix(in srgb, var(--msn-chip-color) 85%, #000 15%);
	color: var(--wp--preset--color--base);
}
/* Active (selected) state: outlined — the inverse of default. Communicates
 * "you're currently filtered to this one" by sitting visually quieter while
 * keeping the colour identity through the border + text. */
.msn-media-chip.is-active,
.msn-media-chip.is-active:hover,
.msn-media-chip.is-active:focus-visible {
	background: transparent;
	color: var(--msn-chip-color);
}

/* Variant colour overrides — mirrors the .msn-news-badge--* palette so each
 * chip matches the badge on its sibling cards. */
.msn-media-chip--msn-release {
	--msn-chip-color: var(--wp--preset--color--brand-primary); /* green */
}
.msn-media-chip--press-clipping {
	--msn-chip-color: var(--wp--preset--color--brand-accent);  /* gold */
}
/* Write-up shares the green of MSN Release: both are MSN-authored original
 * content, just different formats (formal statement vs. commentary). Grouping
 * them visually reinforces the distinction from press clippings (third-party)
 * and video/podcast (multimedia). The chip order in inc/media-chip-strip.php
 * places Write-up directly after MSN Release for the same reason. */
.msn-media-chip--writeup {
	--msn-chip-color: var(--wp--preset--color--brand-primary); /* green */
}
/* --video, --podcast, --all inherit the navy default — no override needed.
 * Keeping them as explicit no-op selectors here would just be noise; the
 * default cascade does the right thing. */

/* -----------------------------------------------------------------------------
 * 12.2 Card grid
 * A 3-column grid. The post-template's columnCount:3 supplies the desktop
 * grid-template-columns; the rules here add the responsive collapse to 2 then
 * 1 column. .wp-block-post-template.is-layout-grid align-items:stretch and the
 * li display:flex come from section 6.3 (shared by all grid post-templates).
 * -------------------------------------------------------------------------- */
.msn-media-list > li > .msn-media-card {
	flex: 1 1 auto;
	width: 100%;
}

/* -----------------------------------------------------------------------------
 * 12.3 Card shell
 * Bordered white card with a soft shadow and a subtle hover lift, matching the
 * home-page cards (section 6.3). Flex column so the body — and the footer
 * inside it — can stretch and anchor across equal-height cards.
 * -------------------------------------------------------------------------- */
.msn-media-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	border: 1px solid #E0D9D0;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	transition: box-shadow 0.18s ease-out, transform 0.18s ease-out;
}
.msn-media-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

/* -----------------------------------------------------------------------------
 * 12.4 Card thumbnail + type badge
 * Fixed-height thumbnail; the featured image fills it (object-fit:cover). When
 * a post has no featured image the base-alt background shows through. The type
 * badge is absolutely positioned over the thumbnail's top-left corner; its
 * colour comes from .msn-news-badge--* (section 11.2).
 * -------------------------------------------------------------------------- */
.msn-media-card__thumb {
	position: relative;
	height: 160px;
	background: var(--wp--preset--color--base-alt);
	overflow: hidden;
}
.msn-media-card__img {
	margin: 0;
	height: 100%;
}
/* WP forces height:auto on images (wp-block-theme-gotchas #8) — width and
 * height both carry !important; object-fit:cover crops the source to the box. */
.msn-media-card__img img {
	width: 100% !important;
	height: 160px !important;
	object-fit: cover;
	object-position: center center;
	display: block;
}
.msn-media-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 1;
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 3px;
	line-height: 1.4;
	/* Lift the badge off the thumbnail with a soft drop shadow so it
	 * reads as raised label rather than a flat sticker. */
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* -----------------------------------------------------------------------------
 * 12.5 Card body
 * Flex column that grows to fill the card height (flex:1) so the footer can be
 * pushed to the bottom edge with margin-top:auto — giving every card in a row
 * the same top AND bottom edge regardless of title / excerpt length
 * (wp-block-theme-gotchas #25).
 * -------------------------------------------------------------------------- */
.msn-media-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 18px 20px 20px;
}

/* Outlet name — Press Clipping cards only (render-filtered). Uppercase gold,
 * matching the single-media meta outlet. Hidden when news_outlet is empty. */
.msn-media-card__outlet {
	margin: 0;
	font-size: 10.5px !important;
	font-weight: 700;
	letter-spacing: 1.1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-accent);
	/* Reserve one line of vertical space whether the outlet is bound or not.
	 * Non-press-clipping cards have no news_outlet field value and render an
	 * empty paragraph; the min-height keeps the title at a consistent baseline
	 * across every card in the row. */
	min-height: calc(10.5px * 1.4);
}

/* Card title — serif navy, shifts to brand-green on hover. */
.msn-media-card__title {
	margin: 0;
	font-size: 16px !important;
	font-weight: 700;
	line-height: 1.35;
	/* Clamp to two lines so the meta row + Read More align across every card
	 * regardless of headline length. Same pattern as the home-page press cards
	 * (section 6.5) — short titles pad up to the 2-line floor, long titles
	 * truncate with ellipsis at the end of line 2. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(2 * 16px * 1.35);
	max-height: calc(2 * 16px * 1.35);
}
.msn-media-card__title a {
	color: var(--wp--preset--color--brand-secondary);
	text-decoration: none;
	transition: color 0.18s ease-out;
}
.msn-media-card__title a:hover,
.msn-media-card__title a:focus-visible {
	color: var(--wp--preset--color--brand-primary);
}

/* Card excerpt — muted, clamped to 3 lines so cards stay a similar height. */
.msn-media-card__excerpt {
	margin: 0;
	font-size: 13.5px !important;
	line-height: 1.65;
	color: var(--wp--preset--color--contrast-muted);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

/* -----------------------------------------------------------------------------
 * 12.6 Card footer
 * Date on the left, "Read More →" link on the right, separated by a hairline
 * top border. margin-top:auto pushes the footer to the card's bottom edge.
 * -------------------------------------------------------------------------- */
.msn-media-card__footer {
	margin-top: auto;
	gap: 8px;
	padding-top: 14px;
	border-top: 1px solid #E0D9D0;
}
.msn-media-card__date {
	margin: 0;
	font-size: 12px;
	color: var(--wp--preset--color--contrast-muted);
}
.msn-media-card__link {
	font-size: 13px;
	font-weight: 600;
	color: var(--wp--preset--color--brand-primary);
	text-decoration: none;
	white-space: nowrap;
}
.msn-media-card__link:hover,
.msn-media-card__link:focus-visible {
	text-decoration: underline;
}

/* -----------------------------------------------------------------------------
 * 12.7 Media archive responsive
 * The 3-column grid collapses to 2 columns on tablet and 1 on mobile. The
 * selector carries .is-layout-grid (specificity 0,2,0) so it overrides the
 * post-template's generated columnCount rule (0,1,0). H1 shrinks on mobile.
 * -------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.msn-media-list.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 600px) {
	.msn-media-list.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* =============================================================================
 * 13. FOCUS AREA & WORK CARD PATTERNS
 *
 * Styles for the two card patterns staff insert on the Focus Areas pages
 * (issue #10): msn/focus-area-card (Level 1 hub) and msn/work-card (Level 2
 * hubs). Both patterns share one base class — .msn-card — and one body class
 * — .msn-card__body — so a single set of rules sizes both. The two card types
 * are therefore styled identically by construction and cannot drift apart.
 * The variant classes .msn-card--focus / .msn-card--work carry only the
 * differences (the focus card's gold top bar, the work card's gold underline).
 *
 * Visual design follows references/wp_realistic_mockup/msn-wp-focus-areas.html.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 13.1 Card shell
 * Neutral border, soft shadow, hover lift, flex column — matching the home-page
 * Publications / Featured On cards (Section 6.3).
 * -------------------------------------------------------------------------- */
.msn-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid rgba(0, 0, 0, 0.10);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	transition: box-shadow 0.18s ease-out, transform 0.18s ease-out;
}
.msn-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}
/* 4px gold accent bar across the top — focus-area card only. */
.msn-card--focus {
	border-top: 4px solid var(--wp--preset--color--brand-accent);
}

/* Card image sits flush to the card edges (padding lives on the body).
 * aspect-ratio is CSS-driven, not via the block's aspectRatio attribute, so
 * the image block saves without inline styles and passes validation on all
 * WordPress versions (WP 6.4 dropped the aspect-ratio style from <figure>
 * but our patterns were written to the WP 6.3 format — see gotcha #28). */
.msn-card__image {
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.msn-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* -----------------------------------------------------------------------------
 * 13.2 Card body
 * ONE rule for both card types. The body is a flex column so the description
 * can grow and push the Explore button to a common bottom edge. Padding and
 * gap are set here — never in the block markup — so they are identical on both
 * cards and cannot be stripped from an inserted instance by block recovery.
 * !important guarantees the padding holds even on an instance carrying a stale
 * inline padding value.
 * -------------------------------------------------------------------------- */
.msn-card .msn-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: var(--wp--preset--spacing--30);
	/* Fill the card edge to edge — no max-width cap, no auto-margin centring,
	   so the body cannot be re-positioned by an ancestor's layout. */
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--40) !important;
	text-align: left;
	align-items: flex-start;
}

/* Numbered label (01 / 02 / 03) — small uppercase gold caps. Focus card only.
   Colour comes from the brand-accent token on the block; geometry is here. */
.msn-card__num {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	line-height: 1;
}

/* Card title — tighter than the default heading preset so the card reads as a
   teaser. The focus card (h2) and work card (h3) share one treatment. */
.msn-card__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
}
/* Short gold accent line under the work card title — its counterpart to the
   focus card's gold top accent bar. */
.msn-card--work .msn-card__title::after {
	content: "";
	display: block;
	width: 36px;
	height: 3px;
	margin-top: 10px;
	background-color: var(--wp--preset--color--brand-accent);
	border-radius: 2px;
}

/* Description sits at its natural height — no flex-grow, so no empty gap opens
   below it. The CTA's margin-top:auto absorbs any spare height in a tall card
   (equal-height rows on the Level 1 page) and keeps the button at the bottom. */
.msn-card__desc {
	margin: 0;
	line-height: 1.7;
}

/* Sub-topic pill tags (focus card only) — green outline pills, matching the
   publication focus pills (Section 7.9) so tag styling stays consistent. */
.msn-card__tags {
	gap: 8px;
}
.msn-card__tag {
	margin: 0;
	display: inline-block;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wp--preset--color--brand-primary);
	background: rgba(14, 127, 92, 0.08);
	border: 1px solid rgba(14, 127, 92, 0.22);
	padding: 3px 10px;
	border-radius: 20px;
}

/* Explore button — a single full-width CTA anchored to the bottom of the body.
   14px text and tighter padding trim it down from the bulky 18px theme preset. */
.msn-card__cta {
	margin-top: auto;
	width: 100%;
}
.msn-card__cta .wp-block-button {
	width: 100%;
}
.msn-card__cta .wp-block-button__link {
	font-size: 14px;
	padding: 12px 20px;
}

/* -----------------------------------------------------------------------------
 * 13.3 Card responsive (≤ 600px)
 * Card titles shrink slightly on narrow viewports; the cards themselves stack
 * naturally once the Level 1 / Level 2 page layout collapses to one column.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-card__title {
		font-size: 20px;
	}
}

/* =============================================================================
 * 14. CONNECT BLOCK & DIRECTOR CARD PATTERNS
 *
 * Styles for the msn/connect-block and msn/director-card patterns on the light
 * page background. The location/email icons reuse the global .msn-icon mask
 * classes; the social links carry .msn-social-tiles for the boxed-icon look.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 14.1 Social icon tiles
 * The connect-block and director-card social links carry .msn-social-tiles.
 * Each icon sits in a rounded square tile so logos of differing optical width
 * (e.g. TikTok wider than X) read as a uniform size — the light-background
 * counterpart of the footer's social tiles (Section 3.6).
 * -------------------------------------------------------------------------- */
/* Selectors lead with `.msn-social-tiles.wp-block-social-links` (two classes)
   so they out-rank WordPress's core social-links CSS, which is printed after
   the theme stylesheet and would otherwise win at equal specificity. */
.msn-social-tiles.wp-block-social-links {
	gap: 6px;
}
.msn-social-tiles.wp-block-social-links .wp-social-link {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	background-color: rgba(0, 0, 0, 0.06);
	border-radius: 8px;
	transition: background-color 0.2s ease;
}
.msn-social-tiles.wp-block-social-links .wp-social-link:hover,
.msn-social-tiles.wp-block-social-links .wp-social-link:focus-visible {
	background-color: rgba(0, 0, 0, 0.12);
}
/* The anchor fills the tile and centres the logo. Resetting core's default
   anchor padding is what stops the icon sitting in the tile's top-left. */
.msn-social-tiles.wp-block-social-links .wp-social-link a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0;
}
/* Pin every logo to the same size so optical widths are normalised. */
.msn-social-tiles.wp-block-social-links .wp-social-link svg {
	width: 18px;
	height: 18px;
}

/* -----------------------------------------------------------------------------
 * 14.2 Connect block — mobile centred layout (≤ 600px)
 * On narrow viewports the whole block centres, matching the footer's Connect
 * with Us treatment. The shared .msn-icon mobile rule (Section 5.2) already
 * stacks and centres the location/email icons.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-connect {
		text-align: center;
	}
	/* Drop the left gold accent bar — it cannot sit beside centred text —
	   and remove the heading's site-wide 40px bottom margin so it sits
	   closer to the content below it. */
	.msn-connect .msn-section-heading {
		padding-left: 0;
		margin-bottom: 0;
	}
	.msn-connect .msn-section-heading::before {
		display: none;
	}
	/* Centre the social-tiles row in the connect-block and director-card
	   patterns. A full-width flex list with centred justification works in
	   both the flow (connect-block) and flex-column (director-card) parents;
	   !important overrides WordPress's social-links layout CSS. */
	.msn-social-tiles.wp-block-social-links {
		width: 100% !important;
		justify-content: center !important;
	}
}

/* =============================================================================
 * 15. 404 PAGE
 *
 * The rebuilt Not Found page (templates/404.html): an oversized typographic
 * "404" over a faint latitude/longitude graticule motif, with MSN-voiced copy,
 * a search form and recovery links. The graticule is a tiled SVG data-URI
 * background (the same data-URI technique as the .msn-icon masks, Section 3.4).
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 15.1 Hero + graticule motif
 * The faint grid sits behind the whole 404 main. stroke-opacity is baked into
 * the SVG (CSS cannot fade a background-image), kept low so it never competes
 * with the typography.
 * -------------------------------------------------------------------------- */
.msn-404 {
	text-align: center;
	background-color: var(--wp--preset--color--base);
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80"><path d="M80 0H0V80" fill="none" stroke="%231F3A4D" stroke-opacity="0.07" stroke-width="1"/></svg>');
	background-position: center;
	background-size: 80px 80px;
}

/* -----------------------------------------------------------------------------
 * 15.2 Oversized "404"
 * A decorative display number — fluid so it scales from mobile to desktop.
 * -------------------------------------------------------------------------- */
.msn-404__number {
	margin: 0 0 var(--wp--preset--spacing--20) 0;
	font-size: clamp(5rem, 18vw, 11rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
}

/* -----------------------------------------------------------------------------
 * 15.3 Heading, message, links
 * Content widths are capped so lines stay readable on wide viewports; the
 * blocks centre via auto margins (the 404 main is constrained-layout).
 * -------------------------------------------------------------------------- */
.msn-404__title {
	margin: 0 auto var(--wp--preset--spacing--30) auto;
	max-width: 20ch;
}
.msn-404__message {
	margin: 0 auto var(--wp--preset--spacing--50) auto;
	max-width: 50ch;
	line-height: 1.65;
}
.msn-404__links {
	margin-top: var(--wp--preset--spacing--50);
}
/* Keep each section name on one line so the dotted list breaks cleanly. */
.msn-404__links a {
	white-space: nowrap;
}

/* -----------------------------------------------------------------------------
 * 15.4 404 page responsive (≤ 600px)
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.msn-404__number {
		font-size: clamp(4rem, 28vw, 7rem);
	}
}

/* =============================================================================
 * 16. SEARCH PAGE
 *
 * The rebuilt search results page (templates/search.html): an archive-style
 * header (eyebrow + query-title H1 + result count + refine-search box + gold
 * rule), then a flat, relevance-ordered vertical list of results. Each result
 * row is labelled with its post type by the render_block filter in
 * inc/search-display.php.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 16.1 Page header
 * Mirrors the archive page headers (Sections 8 / 12) — gold eyebrow, serif H1,
 * short gold accent rule.
 * -------------------------------------------------------------------------- */
.msn-search-header__eyebrow {
	margin: 0 0 var(--wp--preset--spacing--20) 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
.msn-search-header__h1 {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.15;
}
.msn-search-count {
	margin: var(--wp--preset--spacing--20) 0 0 0;
	font-size: 15px;
}
/* Short gold accent rule, left-aligned. !important + explicit left/right
   margins override core's separator centring (the same approach as the
   archive headers' .msn-media-archive__rule). */
.msn-search-header__rule {
	border: none !important;
	background-color: var(--wp--preset--color--brand-accent) !important;
	width: 60px !important;
	height: 3px !important;
	border-radius: 2px;
	margin-top: var(--wp--preset--spacing--30) !important;
	margin-bottom: var(--wp--preset--spacing--30) !important;
	margin-left: 0 !important;
	margin-right: auto !important;
	opacity: 1;
}
.msn-search-header__form {
	max-width: 480px;
}

/* -----------------------------------------------------------------------------
 * 16.2 Results list
 * A vertical list of rows separated by a thin beige hairline (the same border
 * colour as the Campaigns archive list). No grid, no thumbnails.
 * -------------------------------------------------------------------------- */
.msn-search-result {
	padding: var(--wp--preset--spacing--40) 0;
	border-bottom: 1px solid #E0D9D0;
}
.msn-search-result:first-child {
	padding-top: 0;
}

/* -----------------------------------------------------------------------------
 * 16.3 Result row — meta line, title, excerpt
 * The meta line is a flex row: the post-type label (filled by the render_block
 * filter) and the date, joined by a CSS "·". The separator is on the date and
 * only shows when a type label precedes it, so a result with an unrecognised
 * type (no label) does not render an orphan "·".
 * -------------------------------------------------------------------------- */
.msn-search-result__meta {
	align-items: baseline;
	margin-bottom: var(--wp--preset--spacing--20);
}
.msn-search-result__type {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-accent);
}
.msn-search-result__date {
	margin: 0;
	font-size: 13px;
	color: var(--wp--preset--color--contrast-muted);
}
.msn-search-result__type ~ .msn-search-result__date::before {
	content: "·";
	margin-right: 8px;
	color: var(--wp--preset--color--contrast-muted);
}
.msn-search-result__title {
	margin: 0 0 var(--wp--preset--spacing--20) 0;
	font-size: 20px;
	line-height: 1.3;
}
.msn-search-result__title a {
	text-decoration: none;
}
.msn-search-result__title a:hover {
	text-decoration: underline;
}
/* Two-line clamp on the excerpt text so rows stay even. */
.msn-search-result__excerpt p {
	margin: 0;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* -----------------------------------------------------------------------------
 * 16.4 No-results state
 * -------------------------------------------------------------------------- */
.msn-search-empty__title {
	margin: 0 0 var(--wp--preset--spacing--20) 0;
	font-size: clamp(1.5rem, 4vw, 2rem);
}
.msn-search-empty__links {
	margin-top: var(--wp--preset--spacing--40);
}
.msn-search-empty__links a {
	white-space: nowrap;
}

/* =============================================================================
 * 17. FOCUS AREA HUB PAGES (Level 1 and Level 2)
 *
 * Card grid layout for the Focus Areas overview page (msn/focus-areas-hub)
 * and the Level 2 Focus Area work-listing pages (msn/focus-area-hub).
 * The intro section reuses the archive intro styles (section 8.1).
 * The Level 3 work page styles are in section 15 (Part 5 of issue #10).
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 17.1 Level 1 — Focus Areas cards grid
 * -------------------------------------------------------------------------- */
.msn-focus-areas-hub__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 900px) {
	.msn-focus-areas-hub__cards {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.msn-focus-areas-hub__cards {
		grid-template-columns: 1fr;
	}
}

/* -----------------------------------------------------------------------------
 * 17.2 Level 2 — Focus Area work cards grid
 * -------------------------------------------------------------------------- */
.msn-focus-area-hub__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 900px) {
	.msn-focus-area-hub__cards {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.msn-focus-area-hub__cards {
		grid-template-columns: 1fr;
	}
}

/* -----------------------------------------------------------------------------
 * 17.3 Equal-height cards
 * align-items:stretch is the CSS Grid default, but we state it explicitly here
 * to guard against WordPress's generated layout classes overriding it.
 *
 * height:100% on a grid item whose row height is not explicitly set resolves to
 * auto (CSS Grid spec — percentage heights are treated as auto when the grid
 * area's block size is indefinite). The global .msn-card{height:100%} rule in
 * section 13.1 therefore has no stretching effect inside these grids. We reset
 * it to auto and let align-self:stretch (the grid default) do the work instead.
 *
 * See docs/agents/wp-block-theme-gotchas.md #25 for the full explanation.
 * -------------------------------------------------------------------------- */
.msn-focus-areas-hub__cards,
.msn-focus-area-hub__cards {
	align-items: stretch;
}

.msn-focus-areas-hub__cards .msn-card,
.msn-focus-area-hub__cards .msn-card {
	/* Let grid stretching (not height:100%) fill the grid cell. */
	height: auto;
}

/* WordPress global-styles-inline-css (loaded after theme stylesheet) injects
 * is-layout-flow margin rules onto the cards container's direct children:
 *   :root :where(.is-layout-flow) > :first-child { margin-block-start: 0 }   ← spec 0,0,1,0
 *   :root :where(.is-layout-flow) > *             { margin-block-start: spacing-40 } ← spec 0,0,0,0
 * The :first-child rule has higher specificity, so card 1 gets 0 top margin
 * while cards 2+ get spacing-40. In the grid, cards 2/3 margin-boxes are
 * taller by spacing-40 → row height inflates → card 1 stretches to fill →
 * card 1's content-box is physically taller (visible extra gap above the CTA).
 * Force all grid children to 0 to eliminate the asymmetry. */
.msn-focus-areas-hub__cards > *,
.msn-focus-area-hub__cards > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* -----------------------------------------------------------------------------
 * 17.4 Crosslink strip — white outline secondary button
 * -------------------------------------------------------------------------- */
.msn-btn-outline-white .wp-block-button__link {
	background: transparent !important;
	color: #fff !important;
	border: 2px solid rgba(255, 255, 255, 0.55) !important;
}
.msn-btn-outline-white .wp-block-button__link:hover {
	border-color: #fff !important;
}

/* =============================================================================
 * 18. FOCUS AREA PAGES (Level 3 — page-focus-area template)
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 18.1 Alternating section backgrounds
 * All six <section> blocks share .msn-focus-section and default to base
 * (white) via the block's backgroundColor:base attribute. The :nth-of-type
 * pseudo-class counts by element type in the parent — so a deleted section
 * is absent from the DOM, and the remaining sections re-number and alternate
 * correctly without any JS. No !important needed: specificity 0,0,2,0 beats
 * .has-base-background-color at 0,0,1,0.
 * -------------------------------------------------------------------------- */
/* !important required: WordPress global-styles-inline-css forces
 * .has-base-background-color { background-color: ... !important } on every
 * section group. Our specificity (0,0,2,0) beats WP's (0,0,1,0) only when
 * both declarations carry !important. */
.msn-focus-section:nth-of-type(even) {
	background-color: var(--wp--preset--color--base-alt) !important;
}

/* -----------------------------------------------------------------------------
 * 18.2 Intro section — focus pill + gold rule below the H1
 * -------------------------------------------------------------------------- */

/* Focus pill: small uppercase green badge above the H1. Filter A in
 * inc/focus-area-display.php replaces its text with the parent page's
 * title at render time; the msn-render-focus-pill marker class is stripped.
 *
 * display:block + width:fit-content shrinks the badge to hug its text.
 * display:inline-block would collapse the auto margins to 0 (CSS resolves
 * auto horizontal margins on inline-level boxes to 0), pinning the pill to
 * the section's full-width left edge — gotcha #38. */
.msn-focus-pill {
	display: block;
	width: fit-content;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-primary);
	background: rgba(14, 127, 92, 0.08);
	border: 1px solid rgba(14, 127, 92, 0.22);
	padding: 4px 12px;
	border-radius: 20px;
	margin-bottom: 16px;
}

/* The intro <section> is align:full + layout:constrained, so WordPress centres
 * every direct child to the 780px content column with
 * margin-left:auto !important; margin-right:auto !important. A fit-content pill
 * under those rules centres in the viewport; margin-left:0 pins it to the
 * full-width left edge (left of the H1). Neither aligns with the H1.
 *
 * The H1's left edge sits at (containerWidth - contentSize) / 2 inside the
 * section padding. Reproduce that offset on the pill so its left edge tracks
 * the H1 responsively; max(0px, …) collapses the gap to 0 on viewports
 * narrower than the content column, exactly as the H1 does. !important is
 * required to beat WordPress's own !important margins; the two-class
 * selector (0,0,2,0) beats core's :where() selector (0,0,0,0). */
.msn-focus-section--intro .msn-focus-pill {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

/* Gold rule below the H1: reproduced as a ::after pseudo-element so no
 * extra block is needed in the editor. Dimensions and colour match the
 * .intro-gold-rule div in the mockup (msn-wp-focus-labour.html). */
.msn-focus-section--intro .wp-block-post-title::after {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: var(--wp--preset--color--brand-accent);
	border-radius: 2px;
	margin-top: 24px;
	margin-bottom: 28px;
}

/* -----------------------------------------------------------------------------
 * 18.3 Section headings — locked H2 + gold rule
 * The .msn-focus-section__heading class is used for the locked H2 in every
 * non-Intro section. A ::after pseudo-element reproduces the .gold-rule div
 * from the mockup so no extra block is needed.
 * -------------------------------------------------------------------------- */
.msn-focus-section__heading {
	font-size: 24px;
	line-height: 1.2;
	margin-bottom: 0;
}

.msn-focus-section__heading::after {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: var(--wp--preset--color--brand-accent);
	border-radius: 2px;
	margin-top: 12px;
	margin-bottom: 32px;
}

/* -----------------------------------------------------------------------------
 * 18.4 Tweets section — heading in content column, embeds in a wide 3-col grid
 * The locked H2 is a normal constrained child, so it centres to the 780px
 * content column and its left edge lines up with the Intro H1. The embeds
 * live in an inner align:wide group (.msn-focus-tweets-grid) that breaks
 * wider than the heading so three X/Twitter cards fit comfortably per row;
 * the full-width background band is preserved by the section wrapper.
 *
 * The inner group uses layout:default (flow), so WordPress injects no
 * margin:auto on its children — the embeds fill their grid cells directly.
 * Three per row on desktop, two on tablet, one on phone; extra tweets wrap
 * to new rows automatically.
 * -------------------------------------------------------------------------- */
.msn-focus-tweets-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	/* Top-align cards so naturally different-height tweet embeds line up at
	 * the top instead of the row stretching every cell to the tallest. */
	align-items: start;
}

/* X/Twitter embeds are cross-origin iframes — widgets.js sizes each card to
 * the width it measures when it runs. Pin every embed to its column width so
 * an early (pre-layout) measurement can't render the first card wider (and so
 * taller) than the rest. We cannot equalise iframe heights from CSS; with
 * distinct tweets the heights still vary naturally. */
.msn-focus-tweets-grid > .wp-block-embed {
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.msn-focus-tweets-grid > .wp-block-embed .wp-block-embed__wrapper {
	width: 100%;
}

@media (max-width: 900px) {
	.msn-focus-tweets-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.msn-focus-tweets-grid {
		grid-template-columns: 1fr;
	}
}

/* -----------------------------------------------------------------------------
 * 18.5 Statements section — gold left-border cards, vertical stack
 * Heading + Query Loop are align:wide, so they share the left edge with the
 * Tweets cards. The post-template is capped at a readable width and left-
 * aligned at that edge rather than stretching the full wide column.
 *
 * Cards are white (base) with a thin border + shadow + gold left accent — NOT
 * a beige fill. Section backgrounds alternate white/beige, and a deleted
 * section can flip Statements onto a beige band; a beige card would then
 * vanish. A white card reads on both backgrounds and matches the site's other
 * cards (§13).
 * -------------------------------------------------------------------------- */
.msn-focus-section--statements .wp-block-post-template {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 820px;
}

.msn-focus-statement {
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(0, 0, 0, 0.10);
	border-left: 4px solid var(--wp--preset--color--brand-accent);
	border-radius: 0 4px 4px 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
	padding: 16px 20px;
}

.msn-focus-statement__date {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast-muted);
	margin-bottom: 8px;
}

.msn-focus-statement__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 17px;
	line-height: 1.3;
	color: var(--wp--preset--color--brand-secondary);
	margin-bottom: 8px;
}

.msn-focus-statement__title a {
	color: inherit;
	text-decoration: none;
}

.msn-focus-statement__title a:hover {
	color: var(--wp--preset--color--brand-primary);
	text-decoration: underline;
}

.msn-focus-statement__excerpt {
	font-size: 14px;
	color: var(--wp--preset--color--contrast-muted);
	line-height: 1.65;
	margin-bottom: 12px;
}

.msn-focus-statement__link {
	font-size: 14px;
	font-weight: 500;
	color: var(--wp--preset--color--brand-primary);
	text-decoration: none;
}

.msn-focus-statement__link:hover {
	text-decoration: underline;
}

/* -----------------------------------------------------------------------------
 * 18.6 Write-ups section — heading + wide 2-col card grid
 * Same structure as Tweets (18.4): the locked H2 and the cards are align:wide
 * so they share the left edge with the Tweets cards, while the section keeps
 * its full-width background band. Cards live in an inner .msn-focus-writeups-
 * grid group. Two per row on desktop, one on mobile; extra cards wrap to new
 * rows. align-items:start keeps cards top-aligned at their natural heights.
 * -------------------------------------------------------------------------- */
.msn-focus-writeups-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	/* Default align-items: stretch — cards in a row stretch to equal height.
	 * Each card is a flex column (flex:1 excerpt + margin-top:auto footer), so
	 * uniform-height cards keep their footers aligned at the bottom (gotcha
	 * #25). Do NOT set align-items:start here — that collapses cards to their
	 * natural heights and breaks the equal-height behaviour. */
}

/* WordPress flow layout injects margin-block-start on every child except the
 * first (:where(.is-layout-flow) > *:not(:first-child)). In a grid that pushes
 * the 2nd+ card down and shrinks its stretched height, so cards look unequal.
 * The grid manages spacing via gap — reset the injected margins. */
.msn-focus-writeups-grid > .msn-focus-writeup {
	margin-top: 0;
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.msn-focus-writeups-grid {
		grid-template-columns: 1fr;
	}
}

.msn-focus-writeup {
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(0, 0, 0, 0.10);
	border-radius: 4px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.msn-focus-writeup__category {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-accent);
	margin-bottom: 8px;
}

.msn-focus-writeup__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 16px;
	line-height: 1.3;
	color: var(--wp--preset--color--brand-secondary);
	margin-bottom: 8px;
}

.msn-focus-writeup__excerpt {
	font-size: 13.5px;
	color: var(--wp--preset--color--contrast-muted);
	line-height: 1.65;
	margin-bottom: 14px;
	flex: 1;
}

.msn-focus-writeup__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.10);
	margin-top: auto;
}

.msn-focus-writeup__byline {
	font-size: 12px;
	color: var(--wp--preset--color--contrast-muted);
}

.msn-focus-writeup__link,
.msn-focus-writeup__link a {
	font-size: 14px;
	font-weight: 500;
	color: var(--wp--preset--color--brand-primary);
	text-decoration: none;
}

.msn-focus-writeup__link a:hover {
	text-decoration: underline;
}

/* -----------------------------------------------------------------------------
 * 18.7 Video Responses section — wide 3-col grid, 16:9 thumbnails, meta line
 * Heading + Query Loop are align:wide (left edge = Tweets cards). The block
 * declares layout:grid(columnCount:3) on the post-template, so at the wide
 * width each card is ~395px — matching the mockup's card size. 3 cols on
 * desktop, 2 on tablet, 1 on phone. The post-template uses WP's grid layout
 * (not flow), so no per-item margin reset is needed here (unlike Write-ups).
 * -------------------------------------------------------------------------- */
.msn-focus-section--videos .wp-block-post-template {
	gap: 20px;
}

@media (max-width: 900px) {
	.msn-focus-section--videos .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.msn-focus-section--videos .wp-block-post-template {
		grid-template-columns: 1fr;
	}
}

.msn-focus-video {
	display: flex;
	flex-direction: column;
}

/* Force 16:9 on the featured-image thumbnail regardless of upload dimensions. */
.msn-focus-video__thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}

.msn-focus-video__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 15px;
	line-height: 1.3;
	color: var(--wp--preset--color--brand-secondary);
	margin-top: 12px;
	margin-bottom: 4px;
}

.msn-focus-video__title a {
	color: inherit;
	text-decoration: none;
}

.msn-focus-video__title a:hover {
	color: var(--wp--preset--color--brand-primary);
}

.msn-focus-video__meta {
	display: flex;
	align-items: baseline;
}

.msn-focus-video__outlet,
.msn-focus-video__date {
	font-size: 12.5px;
	color: var(--wp--preset--color--contrast-muted);
}

/* CSS-injected separator between outlet name and date, matching §6.7 / §11.4. */
.msn-focus-video__outlet::after {
	content: " · ";
}

/* -----------------------------------------------------------------------------
 * 18.8 Podcasts section — vertical stack, embedded player
 * Heading + Query Loop are align:wide (left edge = Tweets cards); the stack is
 * capped at a readable width and left-aligned at that edge. Single column on
 * all viewports (podcast cards are wider than tall).
 *
 * Cards are white (base) with a border + shadow, NOT a beige fill — section
 * backgrounds alternate white/beige and a deleted section can flip Podcasts
 * onto a beige band, where a beige card would vanish (same fix as Statements).
 * -------------------------------------------------------------------------- */
.msn-focus-section--podcasts .wp-block-post-template {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 820px;
}

.msn-focus-podcast {
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(0, 0, 0, 0.10);
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
	padding: 20px;
}

.msn-focus-podcast__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 17px;
	line-height: 1.3;
	color: var(--wp--preset--color--brand-secondary);
	margin-bottom: 12px;
}

.msn-focus-podcast__title a {
	color: inherit;
	text-decoration: none;
}

.msn-focus-podcast__title a:hover {
	color: var(--wp--preset--color--brand-primary);
}

.msn-focus-podcast__embed {
	display: block;
	margin-bottom: 12px;
}

/* oEmbed iframes (Spotify / Apple / SoundCloud) are full-width. */
.msn-focus-podcast__embed iframe {
	width: 100% !important;
}

.msn-focus-podcast__meta {
	display: flex;
	align-items: baseline;
}

.msn-focus-podcast__outlet,
.msn-focus-podcast__date {
	font-size: 12.5px;
	color: var(--wp--preset--color--contrast-muted);
}

.msn-focus-podcast__outlet::after {
	content: " · ";
}
