/* ==========================================================================
   Matthew Ashley theme
   Colours: dark is the default (also without JavaScript); light is opt-in
   via <html data-theme="light">, set by the toggle and remembered.
   ========================================================================== */

:root {
	color-scheme: dark;
	--ma-bg: #171614;
	--ma-surface: #201f1c;
	--ma-ink: #eceae6;
	--ma-body: #d0ccc5;
	--ma-muted: #a8a298;
	--ma-line: #312e29;
	--ma-accent: #e9b65c;
	--ma-article: #d8d4cd;
	--ma-hero: #1a1916;
	--ma-hero-body: #dcd6cc;
	--ma-hero-muted: #ada69a;
	--ma-hero-line: rgba(255, 255, 255, 0.12);
	--ma-header-tint: rgba(0, 0, 0, 0.28);
	--ma-gold: #f2b84b;
	--ma-on-gold: #24221f;
	--ma-chip-ink: #171614;
	--ma-note: #221e15;
	--ma-note-line: #3a3322;
	--ma-note-ink: #ebd08f;
	--ma-quote-bg: #24221e;
	--ma-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	--ma-image-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);

	--ma-rail-bg: #18263a;   --ma-rail-fg: #8fb4e8;   --ma-rail-text: #a9c6ee;
	--ma-food-bg: #16281d;   --ma-food-fg: #7fc4a6;   --ma-food-text: #9ad3b8;
	--ma-housing-bg: #2d1d16; --ma-housing-fg: #f0a27a; --ma-housing-text: #f3b595;
	--ma-policy-bg: #281b27; --ma-policy-fg: #d9a0cb; --ma-policy-text: #e2b5d6;
	--ma-education-bg: #2a2313; --ma-education-fg: #e5c36e; --ma-education-text: #ebd08f;
	--ma-neutral-bg: #2a2824; --ma-neutral-text: #d8d2c6;

	--ma-serif: Newsreader, Georgia, "Times New Roman", serif;
	--ma-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ma-radius: 16px;
}

:root[data-theme="light"] {
	color-scheme: light;
	--ma-bg: #efebe3;
	--ma-surface: #fbf9f5;
	--ma-ink: #16181d;
	--ma-body: #3a3e46;
	--ma-muted: #5b5f68;
	--ma-line: #e3ded3;
	--ma-accent: #8a5410;
	--ma-article: #24272e;
	--ma-hero: #24221f;
	--ma-hero-body: #dcd6cc;
	--ma-hero-muted: #ada69a;
	--ma-hero-line: rgba(255, 255, 255, 0.16);
	--ma-header-tint: rgba(0, 0, 0, 0.18);
	--ma-chip-ink: #ffffff;
	--ma-note: #f7e9c8;
	--ma-note-line: #e6d4a8;
	--ma-note-ink: #5a420a;
	--ma-quote-bg: #e6e0d5;
	--ma-shadow: 0 1px 2px rgba(20, 24, 32, 0.06), 0 8px 24px rgba(20, 24, 32, 0.06);
	--ma-image-shadow: 0 12px 32px rgba(10, 20, 40, 0.18);

	--ma-rail-bg: #dce6f4;   --ma-rail-fg: #1d4e89;   --ma-rail-text: #173e6d;
	--ma-food-bg: #dcebdd;   --ma-food-fg: #2e6b3f;   --ma-food-text: #24563a;
	--ma-housing-bg: #f4dfd3; --ma-housing-fg: #9a3412; --ma-housing-text: #7f2b10;
	--ma-policy-bg: #ecddea; --ma-policy-fg: #6b2d5c; --ma-policy-text: #5a2550;
	--ma-education-bg: #f3e6c4; --ma-education-fg: #8a6510; --ma-education-text: #6b4e0c;
	--ma-neutral-bg: #e6e0d5; --ma-neutral-text: #3a3e46;
}

/* ---- Base ---------------------------------------------------------------- */

body {
	background: var(--ma-bg);
	color: var(--ma-ink);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.wp-site-blocks {
	padding-top: 0;
	padding-bottom: 0;
}

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

a {
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

:where(a, button, input, summary):focus-visible {
	outline: 3px solid var(--ma-gold);
	outline-offset: 2px;
	border-radius: 6px;
}

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

.ma-main {
	padding-bottom: 0;
}

.ma-main > .alignfull:first-child {
	margin-top: 0;
}

/* Section rhythm */
.ma-section {
	margin-top: 88px !important;
}

.ma-section--first {
	margin-top: 72px !important;
}

.ma-section-head {
	gap: 12px 24px;
	align-items: baseline !important;
	margin-bottom: 24px;
}

.ma-section-head > * {
	margin: 0 !important;
}

.ma-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: clamp(26px, 3vw, 32px) !important;
	margin: 0;
}

.ma-section-title::before {
	content: "";
	flex: none;
	width: 28px;
	height: 4px;
	border-radius: 2px;
	background: var(--ma-accent);
}

.ma-more a {
	color: var(--ma-accent);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
}

.ma-more a:hover {
	text-decoration: underline;
}

/* ---- Buttons ------------------------------------------------------------- */

.ma-button,
a.ma-button,
.wp-block-read-more.ma-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--ma-gold);
	color: var(--ma-on-gold) !important;
	font-family: var(--ma-sans);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none !important;
	width: auto;
	transition: transform 0.15s ease, filter 0.15s ease;
}

.ma-button:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
}

.ma-button--arrow::after {
	content: "→";
	font-size: 17px;
	line-height: 1;
}

.ma-icon-btn {
	width: 44px;
	height: 44px;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ma-hero-line);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.15s ease;
}

.ma-icon-btn:hover {
	background: var(--ma-hero-line);
}

.ma-icon {
	display: block;
}

/* Dark/light toggle shows the mode you would switch to */
.ma-theme-toggle .ma-sun,
.ma-theme-toggle .ma-moon {
	display: inline-flex;
}

.ma-theme-toggle .ma-moon,
:root[data-theme="light"] .ma-theme-toggle .ma-sun {
	display: none;
}

:root[data-theme="light"] .ma-theme-toggle .ma-moon {
	display: inline-flex;
}

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

.ma-site-header {
	position: relative;
	z-index: 20;
}

.ma-header {
	background: linear-gradient(var(--ma-header-tint), var(--ma-header-tint)), var(--ma-hero);
	border-top: 4px solid var(--ma-gold);
	border-bottom: 1px solid var(--ma-hero-line);
	color: #fff;
	padding-top: 18px !important;
	padding-bottom: 18px !important;
}

/* Brand left; menu, search and buttons right. On medium screens the menu
   drops to its own row; on phones it collapses to the menu button. */
.ma-header-bar {
	gap: 14px 16px !important;
}

.ma-header-bar > * {
	margin: 0 !important;
}

.ma-header-bar > .ma-nav {
	order: 2;
	margin-left: auto !important;
}

.ma-header-bar > .ma-search {
	order: 3;
}

.ma-header-buttons {
	order: 4;
	display: flex;
	align-items: center;
	gap: 8px;
}

@media (min-width: 600px) and (max-width: 1180px) {
	.ma-header-bar > .ma-nav {
		order: 5;
		flex: 1 1 100%;
		margin-left: 0 !important;
	}

	.ma-header-bar > .ma-search {
		margin-left: auto !important;
	}
}

@media (max-width: 599px) {
	.ma-header-bar {
		gap: 8px !important;
	}

	.ma-header-bar > .ma-search {
		margin-left: auto !important;
	}

	.ma-header-bar > .ma-nav {
		order: 5;
	}

	.ma-header-buttons {
		gap: 6px;
	}

	.ma-header-buttons a.ma-icon-btn {
		display: none; /* Bluesky link is in the footer on phones */
	}

	.ma-brand {
		gap: 10px;
	}

	.ma-brand .ma-logo {
		width: 40px;
		height: 40px;
	}

	.ma-brand-name {
		font-size: 20px;
	}

	.ma-icon-btn,
	.ma-search .wp-block-search__button,
	.ma-nav .wp-block-navigation__responsive-container-open {
		width: 40px !important;
		height: 40px !important;
		min-width: 40px !important;
	}
}

.ma-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	color: #fff !important;
	text-decoration: none !important;
}

.ma-brand .ma-logo {
	flex: none;
	border-radius: 10px;
}

.ma-brand-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.ma-brand-name {
	font-family: var(--ma-serif);
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.1;
}

.ma-brand-tagline {
	font-size: 13px;
	color: var(--ma-hero-muted);
	letter-spacing: 0.02em;
}

/* Navigation: pill bar on desktop */
.ma-nav {
	color: #fff;
	font-size: 15px;
}

.ma-nav .wp-block-navigation__container {
	gap: 2px;
}

@media (min-width: 600px) {
	.ma-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
		background: var(--ma-hero-line);
		border-radius: 999px;
		padding: 4px;
	}
}

.ma-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border-radius: 999px;
	color: #fff;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.ma-nav .wp-block-navigation__container > .wp-block-navigation-item.has-child > .wp-block-navigation-item__content {
	padding-right: 4px;
}

.ma-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover {
	background: var(--ma-hero-line);
}

.ma-nav .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content,
.ma-nav .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content {
	background: var(--ma-gold);
	color: var(--ma-on-gold);
	font-weight: 600;
}

.ma-nav .wp-block-navigation-item {
	align-items: center;
}

.ma-nav a:hover,
.ma-nav a:focus {
	text-decoration: none !important;
}

.ma-nav .wp-block-navigation__submenu-icon {
	color: inherit;
	width: 14px;
	height: 14px;
	margin: 0 12px 0 0 !important;
	padding: 0;
}

/* Invisible bridge across the gap above a drop-down, so it stays open
   while the pointer moves down onto it. */
@media (min-width: 600px) {
	.ma-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .has-child > .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: -14px;
		height: 14px;
	}
}

/* Drop-downs */
.ma-nav .wp-block-navigation__submenu-container {
	background: var(--ma-surface) !important;
	color: var(--ma-ink) !important;
	border: 1px solid var(--ma-line) !important;
	border-radius: 14px;
	padding: 6px !important;
	min-width: 260px !important;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
	top: calc(100% + 6px) !important;
}

.ma-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 10px 14px !important;
	border-radius: 10px;
	color: var(--ma-ink);
	text-decoration: none;
}

.ma-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--ma-bg);
}

/* Mobile overlay */
.ma-nav .wp-block-navigation__responsive-container-open {
	width: 44px;
	height: 44px;
	border: 1px solid var(--ma-hero-line);
	border-radius: 999px;
	color: #fff;
	align-items: center;
	justify-content: center;
}

.ma-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--ma-hero) !important;
	color: #fff !important;
	padding: 24px;
}

.ma-nav .is-menu-open .wp-block-navigation__container {
	gap: 4px;
}

.ma-nav .is-menu-open .wp-block-navigation-item__content {
	font-size: 20px;
	min-height: 48px;
	padding: 0 !important;
	background: none !important;
	color: #fff !important;
}

.ma-nav .is-menu-open .wp-block-navigation__submenu-container {
	background: none !important;
	border: 0 !important;
	box-shadow: none;
	padding: 0 0 0 16px !important;
	min-width: 0 !important;
}

.ma-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 17px;
	color: var(--ma-hero-body) !important;
}

/* Search (icon button that opens a field) */
.ma-search {
	margin: 0;
}

.ma-search .wp-block-search__inside-wrapper {
	border: 0 !important;
	padding: 0 !important;
	background: none;
	gap: 6px;
}

.ma-search .wp-block-search__button {
	width: 44px;
	height: 44px;
	min-width: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ma-hero-line) !important;
	border-radius: 999px !important;
	background: transparent !important;
	color: #fff !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ma-search .wp-block-search__button svg {
	fill: currentColor;
	width: 22px;
	height: 22px;
}

.ma-search .wp-block-search__input {
	height: 44px;
	border-radius: 999px !important;
	border: 1px solid var(--ma-hero-line) !important;
	background: var(--ma-surface);
	color: var(--ma-ink);
	padding: 0 18px;
	font-size: 15px;
}

/* ---- Homepage hero ------------------------------------------------------- */

.ma-hero {
	background: var(--ma-hero);
	color: #fff;
	padding-top: 64px !important;
	padding-bottom: 72px !important;
}

.ma-hero-cols {
	gap: 48px !important;
	margin: 0 !important;
}

.ma-hero-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.ma-hero-text > * {
	margin: 0 !important;
}

.ma-eyebrow {
	display: inline-flex;
	flex-wrap: wrap;
	align-self: flex-start;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--ma-hero-line);
	color: var(--ma-gold);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0 !important;
}

.ma-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.ma-hero-title,
.ma-post-title,
.ma-page-title {
	color: #fff !important;
	font-size: clamp(38px, 5vw, 60px) !important;
	line-height: 1.05 !important;
	letter-spacing: -0.02em;
	margin: 0;
}

.ma-hero-title a {
	color: inherit;
	text-decoration: none;
}

.ma-hero-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.ma-hero-excerpt {
	font-family: var(--ma-serif);
	font-size: 21px;
	line-height: 1.5;
	color: var(--ma-hero-body);
}

.ma-hero-excerpt p {
	margin: 0;
}

.ma-hero-excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

.ma-hero-date {
	font-size: 14px;
	color: var(--ma-hero-muted);
}

.ma-hero-image,
.ma-hero-image img {
	border-radius: 20px;
}

.ma-hero-image {
	border: 1px solid var(--ma-hero-line);
	overflow: hidden;
	margin: 0;
}

/* ---- Topic cards --------------------------------------------------------- */

.ma-topics {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.ma-topic {
	--t-bg: var(--ma-rail-bg);
	--t-fg: var(--ma-rail-fg);
	display: flex;
	flex-direction: column;
	gap: 28px;
	padding: 22px;
	border-radius: var(--ma-radius);
	background: var(--t-bg);
	color: var(--ma-ink) !important;
	text-decoration: none !important;
	transition: transform 0.15s ease;
}

.ma-topic:hover {
	transform: translateY(-2px);
}

.ma-topic--food { --t-bg: var(--ma-food-bg); --t-fg: var(--ma-food-fg); }
.ma-topic--housing { --t-bg: var(--ma-housing-bg); --t-fg: var(--ma-housing-fg); }
.ma-topic--policy { --t-bg: var(--ma-policy-bg); --t-fg: var(--ma-policy-fg); }
.ma-topic--education { --t-bg: var(--ma-education-bg); --t-fg: var(--ma-education-fg); }

.ma-topic-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--t-fg);
	color: var(--ma-chip-ink);
}

.ma-topic-label {
	font-weight: 600;
	font-size: 17px;
	line-height: 1.3;
}

/* ---- Tags (colour-coded by topic in the link URL) ------------------------ */

.ma-tag,
.ma-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.ma-tag a,
.ma-tags a {
	--t-bg: var(--ma-neutral-bg);
	--t-text: var(--ma-neutral-text);
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--t-bg);
	color: var(--t-text) !important;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
}

.ma-tags a {
	min-height: 36px;
	padding: 0 14px;
	font-size: 14px;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 500;
}

.ma-tag .wp-block-post-terms__separator,
.ma-tags .wp-block-post-terms__separator {
	display: none;
}

:is(.ma-tag, .ma-tags) a:is([href*="rail"], [href*="transport"], [href*="hs2"]) { --t-bg: var(--ma-rail-bg); --t-text: var(--ma-rail-text); }
:is(.ma-tag, .ma-tags) a:is([href*="food"], [href*="environment"], [href*="climate"]) { --t-bg: var(--ma-food-bg); --t-text: var(--ma-food-text); }
:is(.ma-tag, .ma-tags) a:is([href*="housing"], [href*="grenfell"]) { --t-bg: var(--ma-housing-bg); --t-text: var(--ma-housing-text); }
:is(.ma-tag, .ma-tags) a:is([href*="polic"], [href*="politic"], [href*="administration"]) { --t-bg: var(--ma-policy-bg); --t-text: var(--ma-policy-text); }
:is(.ma-tag, .ma-tags) a:is([href*="educat"], [href*="knowledge"]) { --t-bg: var(--ma-education-bg); --t-text: var(--ma-education-text); }

.ma-meta {
	gap: 10px !important;
}

.ma-meta > * {
	margin: 0 !important;
}

.ma-date {
	font-size: 13px;
	color: var(--ma-muted);
	margin: 0;
}

/* ---- Post cards ---------------------------------------------------------- */

.ma-cards {
	gap: 24px !important;
}

.ma-cards > li {
	margin: 0;
}

.ma-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	border-radius: var(--ma-radius);
	overflow: hidden;
	background: var(--ma-surface);
	box-shadow: var(--ma-shadow);
	transition: transform 0.15s ease;
}

.ma-card:hover {
	transform: translateY(-2px);
}

.ma-card > * {
	margin: 0 !important;
}

.ma-card-image {
	margin: 0;
	background: var(--ma-rail-bg);
}

.ma-card-image img {
	width: 100%;
	display: block;
}

.ma-card-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px 24px 26px;
	flex: 1;
}

.ma-card-body > * {
	margin: 0 !important;
}

.ma-card-title {
	font-size: 25px !important;
	line-height: 1.2;
	margin: 0;
}

.ma-card-title a,
.ma-list-title a,
.ma-note-title a {
	color: inherit;
	text-decoration: none;
}

.ma-card-title a:hover,
.ma-list-title a:hover,
.ma-note-title a:hover {
	text-decoration: underline;
}

.ma-card-excerpt {
	color: var(--ma-body);
	font-size: 16px;
}

.ma-card-excerpt p {
	margin: 0;
}

.ma-card-excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

/* ---- Research + notebook panels ----------------------------------------- */

.ma-panels {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.ma-panels > * {
	margin: 0 !important;
}

.ma-panel {
	flex: 2 1 480px;
	min-width: 0;
	padding: 28px 32px 12px;
	border-radius: var(--ma-radius);
	background: var(--ma-surface);
}

.ma-panel--note {
	flex: 1 1 300px;
	background: var(--ma-note);
	--ma-line: var(--ma-note-line);
}

.ma-panel .ma-section-head {
	margin-bottom: 8px;
}

.ma-panel .ma-section-title {
	font-size: 26px !important;
}

.ma-panel--note .ma-section-title::before {
	background: #d9932b;
}

.ma-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ma-list > li {
	border-bottom: 1px solid var(--ma-line);
	margin: 0;
}

.ma-list > li:last-child {
	border-bottom: 0;
}

.ma-list-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 0;
}

.ma-list-row > * {
	margin: 0 !important;
}

.ma-list-title {
	font-size: 20px !important;
	font-weight: 500;
	line-height: 1.3;
}

.ma-note-title {
	font-family: var(--ma-sans);
	font-size: 17px !important;
	font-weight: 500;
	line-height: 1.35;
}

/* ---- Bluesky ------------------------------------------------------------- */

.ma-bluesky {
	padding: 32px;
	border-radius: 20px;
	background: var(--ma-surface);
}

.ma-bluesky-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.ma-bluesky-id {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ma-bluesky-badge {
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ma-rail-bg);
	color: var(--ma-rail-fg);
}

.ma-bluesky-title {
	margin: 0;
	font-size: 28px !important;
	line-height: 1.2;
}

.ma-bluesky-handle {
	font-size: 14px;
	color: var(--ma-muted) !important;
	text-decoration: none;
}

.ma-bluesky-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.ma-bsky-post {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 20px;
	border-radius: 14px;
	border: 1px solid var(--ma-line);
	background: var(--ma-bg);
	min-width: 0;
}

.ma-bsky-author {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ma-bsky-avatar,
.ma-bsky-author .ma-logo {
	width: 36px;
	height: 36px;
	border-radius: 999px;
	flex: none;
	object-fit: cover;
}

.ma-bsky-who {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.ma-bsky-name {
	font-weight: 600;
	font-size: 15px;
}

.ma-bsky-time {
	font-size: 13px;
	color: var(--ma-muted) !important;
	text-decoration: none;
}

.ma-bsky-text {
	margin: 0;
	font-size: 16px;
	color: var(--ma-body);
	overflow-wrap: anywhere;
}

.ma-bsky-image img {
	display: block;
	width: 100%;
	max-height: 240px;
	object-fit: cover;
	border-radius: 10px;
}

.ma-bsky-link {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--ma-line);
	font-size: 14px;
	color: var(--ma-ink) !important;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.ma-bsky-stats {
	margin-top: auto;
	display: flex;
	gap: 18px;
}

.ma-bsky-stat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	font-size: 14px;
	color: var(--ma-muted) !important;
	text-decoration: none !important;
}

.ma-bsky-stat:hover {
	color: var(--ma-ink) !important;
}

.ma-bluesky-empty {
	margin: 0;
	color: var(--ma-body);
}

/* ---- Quote band ---------------------------------------------------------- */

.ma-quote {
	margin: 0;
	padding: 64px 32px;
	border-radius: 24px;
	background: var(--ma-gold);
	color: var(--ma-on-gold);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}

.ma-quote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
}

.ma-quote blockquote p {
	margin: 0;
	max-width: 780px;
	font-family: var(--ma-serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(26px, 3.2vw, 38px);
	line-height: 1.25;
}

.ma-quote figcaption {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---- Article ------------------------------------------------------------- */

.ma-post-hero {
	background: var(--ma-hero);
	color: #fff;
	padding-top: 64px !important;
	padding-bottom: 136px !important;
}

.ma-post-hero > * {
	margin-top: 0 !important;
	margin-bottom: 20px !important;
}

.ma-post-hero > *:last-child {
	margin-bottom: 0 !important;
}

.ma-byline {
	gap: 8px 16px !important;
	font-size: 14px;
	color: var(--ma-hero-muted);
	padding-top: 4px;
}

.ma-byline > * {
	margin: 0 !important;
}

.ma-byline .ma-date {
	color: var(--ma-hero-muted);
	font-size: 14px;
}

.ma-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.ma-author .wp-block-post-author__avatar {
	margin: 0;
}

.ma-author .wp-block-post-author__avatar img {
	border-radius: 999px;
	border: 2px solid var(--ma-gold);
	display: block;
}

.ma-author .wp-block-post-author__name {
	color: #fff;
	font-weight: 500;
	font-size: 15px;
}

.ma-post-image {
	max-width: 1440px !important;
	margin-top: -80px !important;
	margin-bottom: 0 !important;
	position: relative;
}

/* Featured images: natural size (never stretched), capped in height, centred.
   Wide banners still span the page; portraits stay a sensible size. */
.ma-post-image {
	text-align: center;
}

.ma-post-image img {
	display: block;
	width: auto !important;
	max-width: 100%;
	max-height: 560px;
	height: auto !important;
	margin-left: auto;
	margin-right: auto;
	object-fit: contain;
	border-radius: 20px;
	box-shadow: var(--ma-image-shadow);
}

.ma-prose {
	font-family: var(--ma-serif);
	font-size: 21px;
	line-height: 1.75;
	color: var(--ma-article);
	margin-top: 0 !important;
}

/* The reading card: page and post content sit on a raised box that
   overlaps the dark title band. */
.ma-content-card {
	box-sizing: border-box;
	max-width: 1440px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 72px 96px 88px !important;
	/* Wider reading column inside the card (WordPress uses this for the text width). */
	--wp--style--global--content-size: 1120px;
	--wp--style--global--wide-size: 100%;
	background: var(--ma-surface);
	border: 1px solid var(--ma-line);
	border-radius: 24px;
	box-shadow: var(--ma-image-shadow);
	position: relative;
	display: flow-root;
}

.ma-post-hero + .ma-content-card,
.ma-page-hero + .ma-content-card {
	margin-top: -88px !important;
}

.ma-post-image + .ma-content-card {
	margin-top: 40px !important;
}

.ma-content-card > .ma-tags {
	margin-top: 40px !important;
	padding-top: 24px;
	border-top: 1px solid var(--ma-line);
}

.ma-content-card :is(pre, code) {
	background: var(--ma-bg);
}

.ma-content-card .ma-prose .alignwide,
.ma-content-card .ma-prose .alignfull {
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.ma-prose > * {
	margin-top: 0;
	margin-bottom: 0;
}

.ma-prose > * + * {
	margin-top: 1.15em !important;
}

.ma-prose :is(h2, h3, h4) {
	color: var(--ma-ink);
	margin-top: 2.2em !important;
	margin-bottom: -0.2em !important;
}

.ma-prose h2 {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 30px;
}

.ma-prose h2::before {
	content: "";
	flex: none;
	width: 24px;
	height: 4px;
	border-radius: 2px;
	background: var(--ma-accent);
}

.ma-prose h3 {
	font-size: 25px;
}

.ma-prose strong {
	color: var(--ma-ink);
}

.ma-prose a {
	color: var(--ma-accent);
	text-decoration: underline;
}

.ma-prose :is(ul, ol) {
	padding-left: 1.3em;
}

.ma-prose li + li {
	margin-top: 0.35em;
}

.ma-prose blockquote,
.ma-prose .wp-block-quote,
.ma-prose .wp-block-pullquote {
	margin-left: 0;
	margin-right: 0;
	padding: 32px 28px;
	border: 0;
	border-radius: var(--ma-radius);
	background: var(--ma-quote-bg);
	color: var(--ma-ink);
	font-style: italic;
	font-size: 26px;
	line-height: 1.4;
	text-align: center;
}

.ma-prose blockquote cite,
.ma-prose blockquote footer {
	display: block;
	margin-top: 12px;
	font-family: var(--ma-sans);
	font-style: normal;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ma-muted);
}

.ma-prose img {
	border-radius: 12px;
}

.ma-prose figcaption {
	font-family: var(--ma-sans);
	font-size: 14px;
	color: var(--ma-muted);
	text-align: center;
}

.ma-prose hr {
	border: 0;
	height: 1px;
	background: var(--ma-line);
	max-width: 120px;
	margin-left: auto;
	margin-right: auto;
}

.ma-prose pre,
.ma-prose code {
	font-size: 0.8em;
	background: var(--ma-surface);
	border-radius: 6px;
}

.ma-prose pre {
	padding: 16px;
	overflow-x: auto;
}

.ma-prose table {
	font-family: var(--ma-sans);
	font-size: 16px;
	display: block;
	overflow-x: auto;
}

.ma-prose th,
.ma-prose td {
	border-color: var(--ma-line);
}

.ma-post-footer {
	margin-top: 48px !important;
	--wp--style--global--content-size: 1120px;
}

.ma-post-footer > * + * {
	margin-top: 40px !important;
}

.ma-post-nav {
	gap: 16px !important;
	padding-top: 24px;
	border-top: 1px solid var(--ma-line);
	font-size: 15px;
}

.ma-post-nav a {
	color: var(--ma-ink);
	font-weight: 500;
	text-decoration: none;
}

.ma-post-nav a:hover {
	text-decoration: underline;
}

/* Comments */
.ma-comments {
	font-size: 16px;
}

.ma-comments .wp-block-comments-title {
	font-size: 26px;
}

.ma-comment {
	padding: 20px 0;
	border-bottom: 1px solid var(--ma-line);
}

.ma-comment-meta {
	gap: 10px !important;
}

.ma-comment-meta img {
	border-radius: 999px;
}

.ma-comments :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
	width: 100%;
	background: var(--ma-surface);
	color: var(--ma-ink);
	border: 1px solid var(--ma-line);
	border-radius: 10px;
	padding: 12px 14px;
	font: inherit;
}

.ma-comments .wp-block-button__link,
.ma-comments input[type="submit"] {
	min-height: 44px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: var(--ma-gold);
	color: var(--ma-on-gold);
	font-weight: 600;
	cursor: pointer;
}

/* ---- Archive / page title band ------------------------------------------ */

.ma-page-hero {
	background: var(--ma-hero);
	color: #fff;
	padding-top: 56px !important;
	padding-bottom: 56px !important;
}

.ma-page-hero > * {
	margin-top: 0 !important;
	margin-bottom: 16px !important;
}

.ma-page-hero > *:last-child {
	margin-bottom: 0 !important;
}

.ma-page-hero .ma-page-title {
	font-size: clamp(34px, 4.5vw, 52px) !important;
}

.ma-page-intro,
.ma-page-intro p {
	color: var(--ma-hero-body);
	font-family: var(--ma-serif);
	font-size: 20px;
	max-width: 720px;
	margin: 0;
}

.ma-page-hero:has(+ .ma-content-card),
.ma-page-hero:has(+ .ma-post-image) {
	padding-bottom: 136px !important;
}

.ma-search-form .wp-block-search__inside-wrapper {
	max-width: 520px;
	gap: 8px;
	border: 0;
	padding: 0;
}

.ma-search-form .wp-block-search__input {
	min-height: 48px;
	border-radius: 999px;
	border: 1px solid var(--ma-line);
	background: var(--ma-surface);
	color: var(--ma-ink);
	padding: 0 18px;
	font-size: 16px;
}

.ma-search-form .wp-block-search__button {
	min-height: 48px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: var(--ma-gold);
	color: var(--ma-on-gold);
	font-weight: 600;
	padding: 0 22px;
}

.ma-empty {
	color: var(--ma-body);
}

/* Pagination */
.ma-pagination {
	margin-top: 48px !important;
	gap: 8px !important;
	font-size: 15px;
}

.ma-pagination a,
.ma-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	background: var(--ma-surface);
	color: var(--ma-ink);
	text-decoration: none;
}

.ma-pagination .page-numbers.current {
	background: var(--ma-gold);
	color: var(--ma-on-gold);
	font-weight: 600;
}

.ma-pagination .page-numbers.dots {
	background: none;
}

/* ---- Footer -------------------------------------------------------------- */

.ma-footer {
	margin-top: 96px;
	background: var(--ma-hero);
	color: var(--ma-hero-body);
	border-top: 4px solid var(--ma-gold);
	padding-top: 56px !important;
	padding-bottom: 28px !important;
}

.ma-footer a {
	color: inherit;
	text-decoration: none;
}

.ma-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.ma-footer-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 40px 56px;
}

.ma-footer-about {
	flex: 2 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
}

.ma-footer-about .ma-brand:hover {
	text-decoration: none;
}

.ma-footer-blurb {
	margin: 0;
	max-width: 380px;
	font-family: var(--ma-serif);
	font-size: 19px;
	line-height: 1.5;
}

.ma-pill-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid var(--ma-hero-line);
	color: #fff !important;
	font-size: 15px;
	font-weight: 500;
}

.ma-pill-link:hover {
	background: var(--ma-hero-line);
	text-decoration: none !important;
}

.ma-footer-col {
	flex: 1 1 170px;
	min-width: 0;
}

.ma-footer-col h2 {
	margin: 0 0 14px;
	font-family: var(--ma-sans);
	font-size: 13px !important;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ma-gold);
}

.ma-footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 15px;
}

.ma-footer-col a {
	display: inline-block;
	padding: 6px 0;
}

.ma-footer-bottom {
	margin-top: 48px;
	padding-top: 20px;
	border-top: 1px solid var(--ma-hero-line);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--ma-hero-muted);
}

.ma-to-top {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--ma-hero-body) !important;
}

/* ---- Small screens ------------------------------------------------------- */

@media (max-width: 1280px) {
	.ma-content-card {
		padding: 56px 56px 64px !important;
	}
}

@media (max-width: 1000px) {
	.ma-content-card {
		padding: 44px 36px 52px !important;
	}
}

@media (max-width: 781px) {
	.ma-hero {
		padding-top: 40px !important;
		padding-bottom: 48px !important;
	}

	.ma-hero-cols {
		gap: 32px !important;
	}

	.ma-section {
		margin-top: 64px !important;
	}

	.ma-section--first {
		margin-top: 48px !important;
	}

	.ma-panel,
	.ma-bluesky {
		padding: 22px 20px 8px;
	}

	.ma-bluesky {
		padding-bottom: 22px;
	}

	.ma-quote {
		padding: 44px 22px;
	}

	.ma-prose {
		font-size: 19px;
	}

	.ma-content-card {
		padding: 28px 20px 36px !important;
		border-radius: 18px;
	}

	.ma-post-hero,
	.ma-page-hero:has(+ .ma-content-card),
	.ma-page-hero:has(+ .ma-post-image) {
		padding-bottom: 104px !important;
	}

	.ma-post-hero + .ma-content-card,
	.ma-page-hero + .ma-content-card {
		margin-top: -64px !important;
	}

	.ma-post-image {
		margin-top: -56px !important;
	}

	.ma-brand-tagline {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}


/* ---- Reading content: wide card extras, framed images, older posts ------- */

@media (min-width: 1200px) {
	.ma-content-card .ma-prose {
		font-size: 22px;
		line-height: 1.75;
	}
}

.ma-prose {
	overflow-wrap: break-word;
}

.ma-prose a {
	overflow-wrap: anywhere;
}

/* Framed images */
.ma-prose img:not(.emoji):not(.avatar):not(.wp-smiley),
.ma-post-image img {
	box-sizing: border-box;
	padding: 8px;
	background: var(--ma-bg);
	border: 1px solid var(--ma-line);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 10px 28px rgba(0, 0, 0, 0.14);
}

.ma-post-image img {
	padding: 10px;
	background: var(--ma-surface);
	border-radius: 22px;
}

.ma-prose img.emoji,
.ma-prose img.wp-smiley {
	padding: 0;
	border: 0;
	box-shadow: none;
	background: none;
}

.ma-prose figure,
.ma-prose .wp-block-image {
	margin-top: 1.6em !important;
	margin-bottom: 1.6em !important;
}

.ma-prose figcaption,
.ma-prose .wp-caption-text,
.ma-prose .wp-element-caption {
	margin-top: 10px;
	font-family: var(--ma-sans);
	font-size: 14px;
	line-height: 1.5;
	color: var(--ma-muted);
	text-align: center;
}

/* Classic-editor image alignment (images inside paragraphs, captions) */
.ma-prose .alignleft {
	float: left;
	margin: 0.3em 1.6em 1em 0 !important;
	max-width: 45%;
}

.ma-prose .alignright {
	float: right;
	margin: 0.3em 0 1em 1.6em !important;
	max-width: 45%;
}

.ma-prose .aligncenter {
	display: block;
	margin-left: auto !important;
	margin-right: auto !important;
}

.ma-prose .wp-caption {
	max-width: 100% !important;
}

.ma-prose .wp-caption img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.ma-prose > p:has(> img:only-child),
.ma-prose > p:has(> a:only-child > img:only-child) {
	text-align: center;
}

@media (max-width: 600px) {
	.ma-prose .alignleft,
	.ma-prose .alignright {
		float: none;
		max-width: 100%;
		margin: 1em 0 !important;
	}
}

/* Galleries made with the old [gallery] shortcode */
.ma-prose .gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.ma-prose .gallery-item {
	margin: 0;
}

.ma-prose .gallery br {
	display: none;
}

/* Embeds and video */
.ma-prose iframe,
.ma-prose video,
.ma-prose embed {
	max-width: 100%;
	border-radius: 12px;
}

.ma-prose iframe.wp-embedded-content {
	width: 100%;
	border: 1px solid var(--ma-line);
	background: var(--ma-surface);
}

/* Headings rebuilt from bold lines in older posts */
.ma-prose .ma-legacy-heading {
	font-size: 30px;
}

/* Divider */
.ma-prose hr,
.ma-prose .ma-separator {
	border: 0;
	height: auto;
	background: none;
	max-width: none;
	margin: 2.4em auto !important;
	text-align: center;
	color: var(--ma-muted);
	overflow: visible;
}

.ma-prose hr::before,
.ma-prose .ma-separator::before {
	content: "• • •";
	letter-spacing: 0.6em;
	font-size: 14px;
}

/* Reference lists */
.ma-references {
	font-family: var(--ma-sans);
	font-size: 15px;
	line-height: 1.55;
	color: var(--ma-body);
	margin-top: 1em !important;
	padding: 24px 28px;
	border-radius: 14px;
	background: var(--ma-bg);
	border: 1px solid var(--ma-line);
}

.ma-references p {
	margin: 0;
	padding: 10px 0 10px 1.6em;
	text-indent: -1.6em;
	border-bottom: 1px solid var(--ma-line);
}

.ma-references p:last-child {
	border-bottom: 0;
}

.ma-references a {
	color: var(--ma-accent);
}

/* Images in content never grow past their own size or the screen height. */
.ma-prose img:not(.emoji):not(.wp-smiley) {
	max-width: 100%;
	max-height: 85vh;
	height: auto;
	object-fit: contain;
}

.ma-prose .wp-caption img {
	width: auto;
	max-width: 100%;
}

@media (max-width: 781px) {
	.ma-post-image img {
		max-height: 420px;
	}
}
