/*
Theme Name: Manogat
Theme URI: https://manogat.in/
Author: Manogat
Description: Lightweight classic theme reproducing the Manogat visual design. Semantic HTML5, plain CSS, minimal vanilla JS. Consultation booking stays at https://app.manogat.in/.
Version: 2.1.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: manogat
*/

/* =========================================================================
   1. DESIGN TOKENS — change the look of the whole site here.
   ========================================================================= */
:root {
	/* Brand colours.
	   NOTE: the reference site's compiled CSS was not available, so these are
	   close estimates (teal + amber). Replace with the exact brand hex values. */
	--mg-teal: #0f766e;
	--mg-teal-dark: #134e4a;
	--mg-teal-tint: #e6f4f1;
	--mg-amber: #f59e0b;
	--mg-amber-dark: #b45309;

	/* Neutrals */
	--mg-bg: #fafaf7;
	--mg-white: #ffffff;
	--mg-fg: #1a2b2a;
	--mg-muted: #4b5b5a;
	--mg-border: #dbe4e2;

	/* Typography */
	--mg-font: "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Layout */
	--mg-container: 72rem;
	--mg-container-narrow: 48rem;
	--mg-gutter: 1rem;
	--mg-header-h: 4rem;
	--mg-section-y: 4rem;
	--mg-hero-y: 5rem;
	--mg-radius: 0.5rem;
	--mg-radius-lg: 1rem;

	/* Derived tints (fallbacks first, refined below where supported) */
	--mg-tint-50: var(--mg-teal-tint);
	--mg-tint-40: var(--mg-teal-tint);
	--mg-header-bg: var(--mg-bg);
	--mg-teal-15: var(--mg-border);
	--mg-teal-50: var(--mg-teal);
	--mg-teal-60: var(--mg-teal);
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
	:root {
		--mg-tint-50: color-mix(in srgb, var(--mg-teal-tint) 50%, transparent);
		--mg-tint-40: color-mix(in srgb, var(--mg-teal-tint) 40%, transparent);
		--mg-header-bg: color-mix(in srgb, var(--mg-bg) 95%, transparent);
		--mg-teal-15: color-mix(in srgb, var(--mg-teal) 15%, transparent);
		--mg-teal-50: color-mix(in srgb, var(--mg-teal) 50%, transparent);
		--mg-teal-60: color-mix(in srgb, var(--mg-teal) 60%, transparent);
	}
}

@media (min-width: 40em) {
	:root {
		--mg-gutter: 1.5rem;
		--mg-section-y: 5rem;
		--mg-hero-y: 7rem;
	}
}

/* =========================================================================
   2. RESET + BASE
   ========================================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--mg-bg);
	color: var(--mg-fg);
	font-family: var(--mg-font);
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-size: inherit; font-weight: inherit; }
p, figure, blockquote, dl, dd, pre, hr { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: inherit; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; }

:focus-visible {
	outline: 2px solid var(--mg-teal);
	outline-offset: 2px;
}

/* =========================================================================
   3. LAYOUT
   ========================================================================= */
.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.site-main { flex: 1; }

.container {
	width: 100%;
	max-width: var(--mg-container);
	margin-inline: auto;
	padding-inline: var(--mg-gutter);
}

.container--narrow { max-width: var(--mg-container-narrow); }

.section { padding-block: var(--mg-section-y); }
.section--rel { position: relative; }

/* Icons */
.icon { width: 1rem; height: 1rem; flex: none; }
.icon--xs { width: 0.875rem; height: 0.875rem; }
.icon--md { width: 1.5rem; height: 1.5rem; }
.icon--lg { width: 1.75rem; height: 1.75rem; color: var(--mg-teal); }

/* Small uppercase label above headings */
.eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 700;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--mg-amber-dark);
}

.eyebrow--light { gap: 0.5rem; color: var(--mg-amber); }

.section-title {
	margin-top: 0.75rem;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--mg-teal-dark);
}

.section-title--narrow { max-width: 36rem; }

@media (min-width: 40em) {
	.section-title { font-size: 1.875rem; line-height: 2.25rem; }
}

/* Vertical side labels (wide screens only, decorative) */
.edge-label {
	position: absolute;
	left: 1.25rem;
	display: none;
	font-size: 11px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.35em;
	text-transform: uppercase;
	white-space: nowrap;
	writing-mode: vertical-rl;
	rotate: 180deg;
	pointer-events: none;
	color: var(--mg-teal-50);
}

.edge-label--middle { top: 50%; translate: 0 -50%; }
.edge-label--top { top: 4rem; }
.edge-label--hero { color: var(--mg-teal-60); }
.edge-label--light { color: rgb(255 255 255 / 0.5); }

@media (min-width: 80em) {
	.edge-label { display: block; }
}

/* =========================================================================
   4. BUTTONS + LINKS
   ========================================================================= */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--mg-radius);
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	transition: color 0.15s, background-color 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn--sm { padding: 0.5rem 1rem; }

.btn--primary { background: var(--mg-teal); color: #fff; }
.btn--primary:hover { background: var(--mg-teal-dark); }

.btn--outline { border-color: var(--mg-teal); color: var(--mg-teal); }
.btn--outline:hover { background: var(--mg-teal-tint); }
.hero .btn--outline:hover,
.cta-band .btn--outline:hover { background: var(--mg-white); }

.btn--amber { background: var(--mg-amber); color: var(--mg-teal-dark); }
.btn--amber:hover { background: var(--mg-amber-dark); color: #fff; }

.btn--light { border-color: rgb(255 255 255 / 0.4); color: #fff; }
.btn--light:hover { background: rgb(255 255 255 / 0.1); }

.band-dark .btn { padding-block: 0.75rem; }

.btn-row {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 2rem;
}

.btn-row--center { justify-content: center; }

@media (min-width: 40em) {
	.btn-row { flex-direction: row; }
}

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 700;
	color: var(--mg-teal);
	transition: color 0.15s;
}

.text-link:hover { color: var(--mg-teal-dark); }

/* =========================================================================
   5. HEADER + NAVIGATION (mobile-first)
   ========================================================================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--mg-border);
	background: var(--mg-header-bg);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--mg-header-h);
}

.site-logo {
	display: inline-flex;
	align-items: center;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--mg-teal-dark);
}

.site-logo span { color: var(--mg-amber); }
.site-logo__img { height: 2.5rem; width: auto; }

/* Mobile panel. Without JS the menu simply sits below the logo. */
.site-menu { flex-basis: 100%; order: 3; padding-bottom: 1rem; }

.js .site-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	order: 0;
	padding: 0.5rem var(--mg-gutter) 1.25rem;
	background: var(--mg-bg);
	border-bottom: 1px solid var(--mg-border);
	max-height: calc(100vh - var(--mg-header-h));
	max-height: calc(100dvh - var(--mg-header-h));
	overflow-y: auto;
}

.js .site-menu.is-open { display: block; }

.site-nav__list { display: flex; flex-direction: column; gap: 0.25rem; }

.site-nav__list a {
	display: block;
	padding: 0.75rem;
	border-radius: 0.375rem;
	font-weight: 600;
	color: var(--mg-muted);
	transition: color 0.15s;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a,
.site-nav__list .current-menu-ancestor > a { color: var(--mg-teal-dark); }

.site-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 1rem;
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: var(--mg-radius);
	background: none;
	color: var(--mg-teal-dark);
	cursor: pointer;
}

.js .nav-toggle { display: inline-flex; }
.nav-toggle .icon--x { display: none; }
.nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--x { display: block; }

/* Desktop: logo | nav | actions in one row (wrapper dissolves). */
@media (min-width: 64em) {
	.site-header__inner { flex-wrap: nowrap; }

	.site-menu,
	.js .site-menu,
	.js .site-menu.is-open { display: contents; }

	.nav-toggle,
	.js .nav-toggle { display: none; }

	.site-nav__list { flex-direction: row; gap: 0.25rem; }

	.site-nav__list a {
		padding: 0.5rem 0.75rem;
		font-size: 0.875rem;
		line-height: 1.25rem;
	}

	.site-actions { flex-direction: row; gap: 0.5rem; margin-top: 0; }
}

/* =========================================================================
   6. HOME — HERO
   ========================================================================= */
.hero {
	position: relative;
	border-bottom: 1px solid var(--mg-border);
	background: var(--mg-tint-50);
}

.hero__inner { padding-block: var(--mg-hero-y); }

.hero__title {
	margin-top: 1rem;
	font-size: 2.25rem;
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--mg-teal-dark);
}

.hero__accent {
	text-decoration: underline;
	text-decoration-color: var(--mg-amber);
	text-decoration-thickness: 4px;
	text-underline-offset: 8px;
}

.hero__lead {
	max-width: 42rem;
	margin-top: 1.5rem;
	font-size: 1.125rem;
	line-height: 1.625;
	color: var(--mg-muted);
}

.hero__points {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--mg-teal-15);
}

.hero__points li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 600;
	color: var(--mg-teal-dark);
}

.hero__points .icon { color: var(--mg-amber-dark); stroke-width: 2.2; }

@media (min-width: 40em) {
	.hero__title { font-size: 3rem; line-height: 1; }
	.hero__points { flex-direction: row; gap: 2rem; }
}

/* Entrance animation (one-off, on load) */
@keyframes mg-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.rise { animation: mg-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise-2 { animation-delay: 0.08s; }
.rise-3 { animation-delay: 0.16s; }
.rise-4 { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
	.rise { animation: none; }
	.btn { transition: none; }
}

/* =========================================================================
   7. HOME — PATHS, ORGANISATIONS, KNOWLEDGE BASE, CTA
   ========================================================================= */
.card-grid {
	display: grid;
	gap: 1px;
	margin-top: 2.5rem;
	overflow: hidden;
	border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius-lg);
	background: var(--mg-border);
}

.card-grid__cell { padding: 2rem; background: var(--mg-white); }

.card-grid__title {
	margin-top: 1rem;
	font-size: 1.25rem;
	line-height: 1.75rem;
	font-weight: 700;
	color: var(--mg-teal-dark);
}

.card-grid__text {
	margin-top: 0.75rem;
	line-height: 1.625;
	color: var(--mg-muted);
}

.card-grid__cell .text-link { margin-top: 1.25rem; }

.section-note {
	max-width: 42rem;
	margin: 2rem auto 0;
	text-align: center;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--mg-muted);
}

@media (min-width: 40em) {
	.card-grid__cell { padding: 2.5rem; }
}

@media (min-width: 48em) {
	.card-grid { grid-template-columns: 1fr 1fr; }
}

/* Dark organisations band */
.band-dark {
	position: relative;
	border-block: 1px solid var(--mg-border);
	background: var(--mg-teal-dark);
	color: #fff;
}

.band-dark__inner {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding-block: var(--mg-section-y);
}

.band-dark__copy { max-width: 36rem; }
.band-dark .section-title { color: inherit; }

.band-dark__text {
	margin-top: 1rem;
	line-height: 1.625;
	color: rgb(255 255 255 / 0.8);
}

.band-dark__actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex-shrink: 0;
}

@media (min-width: 40em) {
	.band-dark__actions { flex-direction: row; }
}

@media (min-width: 48em) {
	.band-dark__inner { flex-direction: row; align-items: center; justify-content: space-between; }
	.band-dark__actions { flex-direction: column; }
}

/* Knowledge Base */
.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
}

.kb-list {
	border-block: 1px solid var(--mg-border);
}

.section-head + .kb-list { margin-top: 2.5rem; }

.kb-item + .kb-item { border-top: 1px solid var(--mg-border); }

.kb-row {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding-block: 1.5rem;
}

.kb-row__label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mg-amber-dark);
}

.kb-row__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	color: var(--mg-teal);
}

.kb-row__title {
	margin-top: 0.375rem;
	font-size: 1.125rem;
	line-height: 1.75rem;
	font-weight: 700;
	color: var(--mg-teal-dark);
	transition: color 0.15s;
}

.kb-row:hover .kb-row__title { color: var(--mg-teal); }

.kb-row__excerpt {
	max-width: 42rem;
	margin-top: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--mg-muted);
}

.kb-row__time {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	flex-shrink: 0;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
	color: var(--mg-muted);
}

.kb-empty { color: var(--mg-muted); }

@media (min-width: 40em) {
	.kb-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
}

/* Closing CTA */
.cta-band {
	border-top: 1px solid var(--mg-border);
	background: var(--mg-tint-50);
}

.cta-band__inner {
	padding-block: var(--mg-section-y);
	text-align: center;
}

.cta-band .section-title { margin-top: 0; }

.cta-band__text {
	max-width: 36rem;
	margin: 1rem auto 0;
	line-height: 1.625;
	color: var(--mg-muted);
}

/* =========================================================================
   8. FOOTER
   ========================================================================= */
.site-footer {
	border-top: 1px solid var(--mg-border);
	background: var(--mg-tint-40);
}

.site-footer__grid {
	display: grid;
	gap: 2.5rem;
	padding-block: 3rem;
}

.site-footer__about {
	max-width: 20rem;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--mg-muted);
}

.site-footer__col {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.site-footer__list { display: flex; flex-direction: column; gap: 0.5rem; }

.site-footer__heading {
	margin-bottom: 0.25rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mg-teal-dark);
}

.site-footer__col a,
.site-footer__list a {
	width: fit-content;
	color: var(--mg-muted);
	transition: color 0.15s;
}

.site-footer__col a:hover,
.site-footer__list a:hover { color: var(--mg-teal-dark); }

.site-footer__col .site-footer__cta { font-weight: 600; color: var(--mg-teal); }
.site-footer__col .site-footer__cta:hover { color: var(--mg-teal-dark); }

.site-footer__note {
	max-width: 20rem;
	margin-top: 1rem;
	font-size: 0.75rem;
	line-height: 1.625;
	color: var(--mg-muted);
}

.site-footer__bar { border-top: 1px solid var(--mg-border); }

.site-footer__bar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding-block: 1rem;
	font-size: 0.75rem;
	line-height: 1rem;
	color: var(--mg-muted);
}

@media (min-width: 48em) {
	.site-footer__grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   9. INNER PAGES, POSTS, ARCHIVES
   ========================================================================= */
.page-hero {
	padding-block: 3.5rem;
	border-bottom: 1px solid var(--mg-border);
	background: var(--mg-tint-50);
}

.page-hero__title {
	margin-top: 0.75rem;
	font-size: 1.875rem;
	line-height: 2.25rem;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--mg-teal-dark);
}

.page-hero__title:first-child { margin-top: 0; }

.page-hero__intro {
	max-width: 42rem;
	margin-top: 1rem;
	font-size: 1.125rem;
	line-height: 1.625;
	color: var(--mg-muted);
}

.page-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.25rem;
	margin-top: 1rem;
	font-size: 0.875rem;
	color: var(--mg-muted);
}

@media (min-width: 40em) {
	.page-hero { padding-block: 5rem; }
	.page-hero__title { font-size: 2.25rem; line-height: 2.5rem; }
}

/* Editor content (pages + posts) */
.entry-content { font-size: 1rem; line-height: 1.75; }
.entry-content > * + * { margin-top: 1.25rem; }

.entry-content h2 {
	margin-top: 2.5rem;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--mg-teal-dark);
}

.entry-content h3 {
	margin-top: 2rem;
	font-size: 1.25rem;
	line-height: 1.75rem;
	font-weight: 700;
	color: var(--mg-teal-dark);
}

.entry-content h4 { margin-top: 1.5rem; font-weight: 700; color: var(--mg-teal-dark); }

.entry-content a {
	color: var(--mg-teal);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content a:hover { color: var(--mg-teal-dark); }

.entry-content ul { list-style: disc; padding-left: 1.5rem; }
.entry-content ol { list-style: decimal; padding-left: 1.5rem; }
.entry-content li + li { margin-top: 0.375rem; }

.entry-content blockquote {
	padding-left: 1rem;
	border-left: 4px solid var(--mg-amber);
	color: var(--mg-muted);
}

.entry-content img { border-radius: 0.75rem; }
.entry-content figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: var(--mg-muted); }
.entry-content hr { border: 0; border-top: 1px solid var(--mg-border); margin-block: 2rem; }

.entry-content code {
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	background: var(--mg-teal-tint);
	font-size: 0.9em;
}

.entry-content pre { overflow-x: auto; padding: 1rem; border-radius: var(--mg-radius); background: var(--mg-teal-tint); }
.entry-content pre code { padding: 0; background: none; }

.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.entry-content th,
.entry-content td { padding: 0.5rem 0.75rem; border: 1px solid var(--mg-border); text-align: left; }
.entry-content th { background: var(--mg-teal-tint); color: var(--mg-teal-dark); }

.entry-thumb { margin-bottom: 2rem; overflow: hidden; border-radius: var(--mg-radius-lg); }
.entry-thumb img { width: 100%; }

.entry-tags,
.edit-link { margin-top: 2rem; font-size: 0.875rem; color: var(--mg-muted); }
.entry-tags a:hover,
.edit-link a:hover { color: var(--mg-teal-dark); }

/* Previous / next post */
.post-navigation {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--mg-border);
}

.post-navigation .nav-links { display: grid; gap: 1.5rem; }
.post-navigation a { font-weight: 700; color: var(--mg-teal-dark); }
.post-navigation a:hover { color: var(--mg-teal); }
.post-nav__label {
	display: block;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mg-amber-dark);
}

@media (min-width: 40em) {
	.post-navigation .nav-links { grid-template-columns: 1fr 1fr; }
	.post-navigation .nav-next { text-align: right; }
}

/* Pagination */
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: 0.75rem;
	border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius);
	background: var(--mg-white);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--mg-teal-dark);
}

a.page-numbers:hover { border-color: var(--mg-teal); }
.page-numbers.current { border-color: var(--mg-teal); background: var(--mg-teal); color: #fff; }

/* Search form */
.search-form { display: flex; gap: 0.5rem; margin-block: 1.5rem; }
.search-form label { flex: 1; }

.search-field {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius);
	background: var(--mg-white);
	font: inherit;
	color: var(--mg-fg);
}

.search-submit {
	padding: 0.75rem 1.25rem;
	border: 0;
	border-radius: var(--mg-radius);
	background: var(--mg-teal);
	font-size: 0.875rem;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
}

.search-submit:hover { background: var(--mg-teal-dark); }

/* =========================================================================
   10. WORDPRESS CORE CLASSES
   ========================================================================= */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1rem;
	clip: auto;
	clip-path: none;
	border-radius: var(--mg-radius);
	background: var(--mg-white);
	font-weight: 700;
	color: var(--mg-teal-dark);
}

.alignleft { float: left; margin: 0.25rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.25rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption { margin-top: 0.5rem; font-size: 0.875rem; color: var(--mg-muted); }
.sticky,
.bypostauthor { display: block; }
.wp-block-embed iframe,
.entry-content iframe { max-width: 100%; }

/* =========================================================================
   11. DOODLE LAYER (v2.0)
   Hand-drawn accents, shown only where an admin has explicitly assigned one
   via Doodles in wp-admin. Positioned with plain insets (never negative) so
   they stay inside their anchor and never cause horizontal scroll.
   ========================================================================= */
.hero,
.page-hero,
.section--rel,
.band-dark,
.card-grid__cell,
.site { position: relative; }

.mg-doodle {
	position: absolute;
	max-width: 30%;
	height: auto;
	pointer-events: none;
	user-select: none;
}

.mg-doodle--front { z-index: 1; }
.mg-doodle--back { z-index: 0; }

.mg-doodle--top-left { top: 0.75rem; left: 0.75rem; }
.mg-doodle--top-right { top: 0.75rem; right: 0.75rem; }
.mg-doodle--bottom-left { bottom: 0.75rem; left: 0.75rem; }
.mg-doodle--bottom-right { bottom: 0.75rem; right: 0.75rem; }
.mg-doodle--center { top: 50%; left: 50%; translate: -50% -50%; }

/* Background placement sits behind the whole page, very low-key by default. */
.mg-doodle--background { position: absolute; z-index: 0; }

@media (prefers-reduced-motion: no-preference) {
	.mg-doodle { transition: opacity 0.2s; }
}
