/**
 * Mardi Gras in Saugatuck — component styles.
 *
 * Values come from the Figma file. Tokens (colour, type, spacing) live in
 * theme.json; this file covers what theme.json cannot express: ornaments,
 * block-style variations and the header/menu behaviour.
 *
 * Breakpoints (Figma design widths 390 / 834 / 1440):
 *   mobile  < 782px   single column
 *   tablet  782–1023  menu button, 2-column grids
 *   desktop ≥ 1024    full navigation
 */

:root {
	--mg-gold: var(--wp--preset--color--gold);
	--mg-deep-purple: var(--wp--preset--color--deep-purple);
	--mg-purple: var(--wp--preset--color--purple);
	--mg-green: var(--wp--preset--color--green);
	--mg-dark-green: var(--wp--preset--color--dark-green);
	--mg-cream: var(--wp--preset--color--cream);
	--mg-ink: var(--wp--preset--color--ink);
	--mg-label: var(--wp--preset--font-family--josefin-sans);
	--mg-display: var(--wp--preset--font-family--display);
	--mg-corner: var(--wp--custom--ornament--corner-size, 72px);
	--mg-corner-inset: var(--wp--custom--ornament--corner-inset, 6.5px);
	--mg-neon-tube: var(--wp--custom--neon--tube, #8a36d6);
	--mg-neon-radius: var(--wp--custom--neon--radius, 20px);
}

/* Neon Krewe (Figma colour mode "Neon Krewe"): sections with this style, and
 * the post header with the top of its featured image, swap the palette for the neon one. Text, backgrounds and
 * ornaments inside follow automatically because they use the presets. */
.is-style-neon-krewe,
.mg-post-header,
.mg-post-hero {
	--wp--preset--color--gold: var(--wp--custom--neon-krewe--gold);
	--wp--preset--color--deep-purple: var(--wp--custom--neon-krewe--deep-purple);
	--wp--preset--color--purple: var(--wp--custom--neon-krewe--purple);
	--wp--preset--color--green: var(--wp--custom--neon-krewe--green);
	--wp--preset--color--dark-green: var(--wp--custom--neon-krewe--dark-green);
	--wp--preset--color--cream: var(--wp--custom--neon-krewe--cream);
	--wp--preset--color--ink: var(--wp--custom--neon-krewe--ink);
	--mg-gold: var(--wp--preset--color--gold);
	--mg-deep-purple: var(--wp--preset--color--deep-purple);
	--mg-purple: var(--wp--preset--color--purple);
	--mg-green: var(--wp--preset--color--green);
	--mg-dark-green: var(--wp--preset--color--dark-green);
	--mg-cream: var(--wp--preset--color--cream);
	--mg-ink: var(--wp--preset--color--ink);
}

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

body {
	-webkit-font-smoothing: antialiased;
}

:where(.wp-site-blocks) > *,
.is-root-container:not(.wp-block-post-content) > * {
	margin-block-start: 0;
}

/* Full-width bands sit flush, as in Figma; prose keeps the block gap. The
 * editor wraps synced patterns in .wp-block-block. */
.wp-block-post-content > :is(.alignfull, .wp-block-block) {
	margin-block-start: 0;
}

:where(a, button, input, textarea, select, summary):focus-visible {
	/* Two-tone ring (MG-64): deep purple inside, gold outside, so it shows
	 * against both the pale and the dark bands (WCAG 2.4.7, 1.4.11). */
	outline: 2px solid var(--mg-deep-purple);
	outline-offset: 0;
	box-shadow: 0 0 0 4px var(--mg-gold);
}

main:focus {
	outline: none;
}

.mg-skip-link {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 100000;
	padding: 12px 20px;
	background: var(--mg-gold);
	color: var(--mg-deep-purple);
	font-weight: 700;
	text-decoration: underline;
}

.mg-skip-link:focus {
	top: 8px;
}

.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	white-space: nowrap;
}

.mg-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Links inside coloured text take that colour (e.g. gold footer link). */
.has-text-color a:where(:not(.wp-element-button)) {
	color: inherit;
}

/* -------------------------------------------------------------------------
 * Ornaments (Figma: Ornament/*) — decorative only, hidden from AT.
 * ---------------------------------------------------------------------- */

.wp-block-spacer:where(.is-style-harlequin-band, .is-style-jeweled-band, .is-style-bead-swag, .is-style-bead-swag-drooping, .is-style-bead-dots, .is-style-corner-scroll, .is-style-led-string, .is-style-sparkle) {
	flex: none;
}

.is-style-harlequin-band {
	width: 100%;
	height: var(--wp--custom--ornament--band-height, 12px) !important;
	margin: 0 !important;
	background: var(--mg-deep-purple) url("../images/harlequin-band.svg") repeat-x 0 0 / 1440px 12px;
}

/* Jeweled harlequin (Figma: Ornament/Jeweled harlequin): 40 × 20 diamonds
 * between gold piping. Like the Figma component it takes the colours of the
 * section it sits in: Lilac Press (header, footer), Neon Krewe inside a
 * Neon Krewe colours group. */
.is-style-jeweled-band {
	width: 100%;
	height: 20px !important;
	margin: 0 !important;
	background: var(--mg-deep-purple) url("../images/harlequin-jeweled-lilac.svg") repeat-x 0 0 / 1440px 32px;
}

.is-style-neon-krewe .is-style-jeweled-band {
	background-image: url("../images/harlequin-jeweled.svg");
}

@media (max-width: 781px) {
	.is-style-jeweled-band {
		height: 15px !important;
		background-size: 1080px 24px;
	}
}

/* Bead swag (Figma: Ornament/Bead swag (gleam), front strand, no doubloon) */
.is-style-bead-swag {
	width: min(720px, 100%);
	height: 96px !important;
	margin-inline: auto;
	background: url("../images/bead-swag-gleam.svg") no-repeat center top / 720px 96px;
}

/* 404: the swag sags off one end (Figma: Ornament/Bead swag (drooping)). */
.is-style-bead-swag-drooping {
	width: min(727px, 100%);
	height: auto !important;
	aspect-ratio: 727 / 194;
	margin-inline: auto;
	background: url("../images/bead-swag-drooping.svg") no-repeat center / contain;
	transform-origin: 2% 10%;
}

.is-style-bead-dots {
	width: 59px;
	height: 7px !important;
	margin-inline: auto;
	background: url("../images/bead-dots.svg") no-repeat center / 59px 7px;
}

.is-style-corner-scroll {
	width: var(--mg-corner);
	height: var(--mg-corner) !important;
	background: url("../images/corner-scroll.svg") no-repeat center / contain;
}

/* LED bead string (Figma: Ornament/LED bead strand): hangs from the top edge
 * of the spacer, so it sits pinned to the bottom of the block above. */
.is-style-led-string {
	width: 100%;
	height: 78px !important;
	background: url("../images/led-strand.svg") repeat-x 0 -12px / 1440px 90px;
}

.is-style-sparkle {
	width: 32px;
	height: 32px !important;
	background: url("../images/sparkle-l-gold.svg") no-repeat center / contain;
}

/* Harlequin field: lattice behind dark bands. */
.is-style-harlequin,
.is-style-harlequin-beads {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.is-style-harlequin::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: url("../images/harlequin-field.svg") repeat center top / 1440px 960px;
}

/* Festive hero (Figma: Page hero): lattice, a bead swag along the top,
 * sparkles in the margins and a jeweled harlequin edge along the
 * bottom. The post header shares the ornaments without the lattice. The
 * swag is on ::after so it can settle on its own (festive.css). */
.is-style-harlequin-beads {
	--mg-hero-swag-x: -40px;
	--mg-hero-swag-y: -10px;
	z-index: 1;
	overflow: visible;
	background-image: url("../images/harlequin-field.svg");
	background-position: center top;
	background-size: 1440px 960px;
}

.mg-post-header {
	position: relative;
	isolation: isolate;
	z-index: 1;
}

/* Figma: the Home hero, About hero and post header start the swag flush
 * left. Editors get the About hang with the "mg-hero-hang" Additional CSS
 * class. */
.mg-home-hero,
.mg-post-header,
.is-style-harlequin-beads.mg-hero-hang {
	--mg-hero-swag-x: 0px;
}

/* There the whole swag hangs 18px up, over the header's edge, so on
 * desktop (inline nav, no overlay to cover) the hero stacks over the header. */
@media (min-width: 1024px) {
	.mg-post-header,
	.is-style-harlequin-beads.mg-hero-hang {
		--mg-hero-swag-lift: -18px;
		--mg-hero-swag-y: 0px;
		z-index: 21;
	}
}

:is(.is-style-harlequin-beads, .mg-post-header)::before,
:is(.is-style-harlequin-beads, .mg-post-header)::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	z-index: -1;
	pointer-events: none;
}

:is(.is-style-harlequin-beads, .mg-post-header)::before {
	top: 0;
	bottom: 0;
	background:
		url("../images/sparkle-l-gold.svg") no-repeat right 118px top 150px / 32px,
		url("../images/sparkle-s-white.svg") no-repeat right 92px top 196px / 12px,
		url("../images/sparkle-m-white.svg") no-repeat right 230px bottom 67px / 20px,
		url("../images/sparkle-m-gold.svg") no-repeat left 70px bottom 106px / 20px,
		url("../images/sparkle-s-white.svg") no-repeat left 110px bottom 84px / 12px,
		url("../images/harlequin-jeweled-lilac.svg") repeat-x 0 calc(100% + 12px) / 1440px 32px;
}

:is(.is-style-harlequin-beads, .mg-post-header)::after {
	top: var(--mg-hero-swag-lift, 0px);
	height: 96px;
	background: url("../images/bead-swag-gleam.svg") repeat-x var(--mg-hero-swag-x, 0px) var(--mg-hero-swag-y, 0px) / 720px 96px;
}

@media (max-width: 781px) {
	/* Phones keep the sparkles in the corners, clear of the title. */
	:is(.is-style-harlequin-beads, .mg-post-header)::before {
		background:
			url("../images/sparkle-m-white.svg") no-repeat right 14px bottom 44px / 14px,
			url("../images/sparkle-m-gold.svg") no-repeat left 14px bottom 40px / 16px,
			url("../images/harlequin-jeweled-lilac.svg") repeat-x 0 calc(100% + 9px) / 1080px 24px;
	}

	:is(.is-style-harlequin-beads, .mg-post-header)::after {
		height: 58px;
		background-size: 432px 58px;
		background-position: calc(var(--mg-hero-swag-x, 0px) * 0.6) calc(var(--mg-hero-swag-y, 0px) * 0.6);
	}
}

/* Scroll frame: cream panel, gold rule, four art-nouveau corners. */
.is-style-scroll-frame {
	position: relative;
	border: 1.5px solid var(--mg-gold);
}

.is-style-scroll-frame::before {
	content: "";
	position: absolute;
	inset: var(--mg-corner-inset);
	pointer-events: none;
	background:
		url("../images/corner-scroll.svg") no-repeat left top / var(--mg-corner),
		url("../images/corner-scroll-tr.svg") no-repeat right top / var(--mg-corner),
		url("../images/corner-scroll-br.svg") no-repeat right bottom / var(--mg-corner),
		url("../images/corner-scroll-bl.svg") no-repeat left bottom / var(--mg-corner);
}

.is-style-rule-top {
	border-top: 1px solid var(--mg-gold);
}

/* -------------------------------------------------------------------------
 * Text styles (Figma: Label/*)
 * ---------------------------------------------------------------------- */

.is-style-eyebrow,
.is-style-eyebrow-diamonds,
.is-style-eyebrow-rules,
.is-style-eyebrow-rule {
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.is-style-eyebrow-diamonds,
.is-style-eyebrow-rules,
.is-style-eyebrow-rule {
	display: flex;
	align-items: center;
}

.is-style-eyebrow-diamonds { gap: 14px; }
.is-style-eyebrow-rules,
.is-style-eyebrow-rule { gap: 12px; }

.is-style-eyebrow-diamonds.has-text-align-center,
.is-style-eyebrow-rules.has-text-align-center {
	justify-content: center;
}

.is-style-eyebrow-diamonds::before,
.is-style-eyebrow-diamonds::after {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	background: currentColor;
	transform: rotate(45deg);
}

.is-style-eyebrow-rules::before,
.is-style-eyebrow-rules::after,
.is-style-eyebrow-rule::before {
	content: "";
	flex: none;
	width: 32px;
	height: 2px;
	background: currentColor;
}

.is-style-eyebrow-rule::before {
	width: clamp(28px, 23.54px + 1.1429vw, 40px);
}

.is-style-link-label,
.mg-link-label {
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--button);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
}

.is-style-link-label a,
.mg-link-label a {
	color: inherit;
	text-decoration: none;
}

.is-style-link-label a:hover,
.mg-link-label a:hover {
	text-decoration: underline;
}

.is-style-pill {
	display: inline-flex;
	width: fit-content;
	padding: 9px 14px 7px;
	border-radius: 999px;
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--label-xs);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.is-style-numeral {
	font-family: var(--mg-display);
	font-weight: 400;
	line-height: 0.9;
	-webkit-text-fill-color: transparent;
	-webkit-text-stroke: 2px currentColor;
	paint-order: stroke fill;
}

.is-style-numeral.has-numeral-s-font-size {
	line-height: 1.05;
	-webkit-text-stroke-width: 1.5px;
}

/* -------------------------------------------------------------------------
 * Buttons (Figma: Button — Primary / Secondary / Purple)
 * ---------------------------------------------------------------------- */

.wp-block-button.is-style-secondary .wp-block-button__link {
	background: transparent;
	color: var(--mg-gold);
	border: 2px solid var(--mg-gold);
}

.wp-block-button.is-style-purple .wp-block-button__link {
	background: var(--mg-purple);
	color: var(--wp--preset--color--white);
}

.wp-block-button__link:hover {
	filter: brightness(1.06);
}

/* MG-48: Josefin Sans capitals sit about 0.095em above the middle of their line
 * box (measured on the rendered page: 1.4px at 15px, 1.8px at 18.8px). Buttons
 * therefore get more padding above than below. Plain padding works in every
 * browser; the earlier text-box-trim attempt did not take effect. The default
 * button (theme.json) is 18.5px / 15.5px; the ticket panel's larger label
 * needs 17.8px / 14.2px (same 32px total as before). */

/* Ticket cards: buttons line up along the bottom whatever the copy length. */
.mg-ticket-cards .mg-event-card > .wp-block-buttons {
	margin-top: auto;
}

/* Ticket button before its link exists: same shape as a button, clearly inert. */
.wp-block-button.mg-ticket-soon .wp-block-button__link {
	/* MG-56: words in cream (not the card's orange on a dim tint) so they always read,
	 * whatever colour the saved page gives the button. */
	color: var(--wp--preset--color--cream) !important;
	background: color-mix(in srgb, var(--wp--preset--color--cream) 16%, transparent);
	border: 2px solid color-mix(in srgb, var(--wp--preset--color--cream) 70%, transparent);
	opacity: 1;
	cursor: default;
	pointer-events: none;
	filter: none;
	/* Its label is longer than the other buttons': keep it inside the card's
	 * padding (it was pushing the card's content off-centre), and match their height. */
	box-sizing: border-box;
	max-width: 100%;
	padding-inline: 18px;
	letter-spacing: 0.06em;
	text-align: center;
	white-space: normal;
}

@media (max-width: 600px) {
	.wp-block-button.mg-ticket-soon .wp-block-button__link {
		padding-inline: 10px;
		letter-spacing: 0.02em;
		font-size: 0.85em;
	}
}

.wp-block-buttons.is-full-mobile .wp-block-button {
	flex: none;
}

/* -------------------------------------------------------------------------
 * Images
 * ---------------------------------------------------------------------- */

/* Neon frame (Figma: Ornament/Neon border): a purple neon tube with a white
 * core and soft bloom, and gold-neon corner brackets 14px inside it. A Group
 * style for cards and markers; the Poster image style uses the same frame. */
.is-style-neon-frame,
.wp-block-image.is-style-poster {
	position: relative;
	isolation: isolate;
	border-radius: var(--mg-neon-radius);
}

.is-style-neon-frame::before,
.wp-block-image.is-style-poster::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	border: 2.5px solid var(--mg-neon-tube);
	border-radius: inherit;
	outline: 1px solid rgba(255, 255, 255, 0.9);
	outline-offset: -1.75px;
	box-shadow:
		0 0 3px 2px color-mix(in srgb, var(--mg-neon-tube) 90%, transparent),
		0 0 14px 6px color-mix(in srgb, var(--mg-neon-tube) 55%, transparent),
		inset 0 0 3px 2px color-mix(in srgb, var(--mg-neon-tube) 90%, transparent),
		inset 0 0 14px 4px color-mix(in srgb, var(--mg-neon-tube) 40%, transparent);
}

.is-style-neon-frame::after,
.wp-block-image.is-style-poster::after {
	content: "";
	position: absolute;
	inset: -16px;
	pointer-events: none;
	background:
		url("../images/neon-bracket-tl.svg") no-repeat left top / 88px,
		url("../images/neon-bracket-tr.svg") no-repeat right top / 88px,
		url("../images/neon-bracket-br.svg") no-repeat right bottom / 88px,
		url("../images/neon-bracket-bl.svg") no-repeat left bottom / 88px;
}

/* Poster (Figma: Hero › Poster): the vertical 11 × 17 poster, upright, in the
 * neon frame 40px out from the artwork. */
.mg-poster-showcase {
	position: relative;
	width: min(500px, 100%);
	margin-inline: auto;
	padding-top: 28px;
}

.wp-block-image.is-style-poster {
	width: min(500px, 100%);
	margin: 0 auto;
	padding: clamp(20px, 11.09px + 2.2857vw, 40px);
	box-sizing: border-box;
}

.wp-block-image.is-style-poster img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 420 / 630;
	object-fit: cover;
	box-shadow: var(--wp--preset--shadow--poster);
}

/* Pinned over the frame's top-right corner (Figma: Tag). The parent in the
 * selector outranks the editor's position: relative on every block. */
.mg-poster-showcase .mg-poster-tag {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
}

/* Cameo crops of the poster horses (Figma: Horse art). The crop rectangles
 * are the Figma image transforms, expressed as percentages. */
.mg-cameo {
	position: relative;
	isolation: isolate;
	width: min(440px, 100%);
	margin-inline: auto;
}

.mg-cameo::before,
.mg-cameo::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.mg-cameo::before {
	z-index: -1;
	top: 36px;
	left: 36px;
	width: 100%;
	height: calc(100% - 0px);
	background: var(--mg-cameo-backdrop, var(--mg-green));
}

.mg-cameo::after {
	inset: -12px;
	border: 1.5px solid var(--mg-gold);
}

.mg-cameo.is-joy {
	--mg-cameo-backdrop: var(--mg-purple);
}

.mg-cameo.is-joy::before {
	left: -40px;
}

.wp-block-image.is-style-cameo-left,
.wp-block-image.is-style-cameo-joy {
	margin: 0;
	overflow: hidden;
	border-radius: 50%;
	border: 4px solid var(--mg-deep-purple);
	background: var(--mg-gold);
}

.wp-block-image.is-style-cameo-left { aspect-ratio: 440 / 360; }
.wp-block-image.is-style-cameo-joy { aspect-ratio: 440 / 414; }

.wp-block-image.is-style-cameo-left img,
.wp-block-image.is-style-cameo-joy img {
	display: block;
	max-width: none;
	height: auto;
}

.wp-block-image.is-style-cameo-left img {
	width: 540.54%;
	margin-left: -10.27%;
}

.wp-block-image.is-style-cameo-joy img {
	width: 602.41%;
	margin-left: -497.2%;
	margin-top: -2.85%;
}

/* Post card media with bead placeholder (Figma: Post card › Featured image) */
.mg-post-media {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	aspect-ratio: 400 / 260;
	border-radius: 4px;
	background: var(--mg-deep-purple);
}

.mg-post-media::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		url("../images/bead-swag-gleam.svg") no-repeat -160px -18px / 720px 96px,
		url("../images/harlequin-field.svg") no-repeat -520px -350px / 1440px 960px;
}

.mg-post-media .wp-block-post-featured-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.mg-post-media .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* MG-63: the Red Horse Center post's picture is a poster full of words, so its
 * card shows the whole picture, stretched to fill the frame (a little distorted,
 * on purpose) instead of cropping the sides. The other posts keep the cropped
 * look. Found by the picture's file name; the block sets object-fit inline, so
 * this needs !important. */
.mg-post-media .wp-block-post-featured-image img[src*="red-horse-center"] {
	object-fit: fill !important;
}

/* MG-68: the Art Coast of Michigan picture (the Make a weekend post) has a
 * transparent background and dark words, so it always sits on a light
 * background (never the purple or green card colour): shown whole, centred, on
 * white, on cards, the featured card and in the post. Found by file name. */
.mg-post-media .wp-block-post-featured-image:has(img[src*="welcome-to-the-art-coast"]),
.mg-featured-media:has(img[src*="welcome-to-the-art-coast"]) {
	background: var(--wp--preset--color--white);
}

.mg-post-media .wp-block-post-featured-image img[src*="welcome-to-the-art-coast"],
.mg-featured-media img[src*="welcome-to-the-art-coast"] {
	object-fit: contain !important;
	background: var(--wp--preset--color--white);
}

.mg-post-hero-image img[src*="welcome-to-the-art-coast"] {
	background: var(--wp--preset--color--white);
}

.wp-block-post-template > li:nth-child(3n+2) .mg-post-media { background: var(--mg-purple); }
.wp-block-post-template > li:nth-child(3n) .mg-post-media { background: var(--mg-dark-green); }

/* -------------------------------------------------------------------------
 * Lists, pills, meta
 * ---------------------------------------------------------------------- */

.is-style-diamonds {
	list-style: none;
	padding-left: 0;
}

.is-style-diamonds > li {
	position: relative;
	padding-left: 19px;
}

.is-style-diamonds > li + li {
	margin-top: 12px;
}

.is-style-diamonds > li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.62em;
	width: 7px;
	height: 7px;
	background: var(--mg-gold);
	transform: rotate(45deg);
}

/* Filter pills (Figma: Filter pill — Active / Default) */
.mg-pill-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.wp-block-categories.is-style-pills,
.mg-pill-row .wp-block-categories {
	display: contents;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wp-block-categories.is-style-pills li {
	margin: 0;
}

.wp-block-categories.is-style-pills a,
.wp-block-post-terms.is-style-pills a,
.mg-pill a,
.mg-pill > span {
	display: inline-flex;
	padding: 11px 20px 9px;
	border: 1.5px solid var(--mg-deep-purple);
	border-radius: 999px;
	color: var(--mg-deep-purple);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--label-s);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
}

.wp-block-categories.is-style-pills .current-cat a,
.mg-pill.is-active a,
.mg-pill.is-active > span {
	background: var(--mg-deep-purple);
	color: var(--mg-gold);
}

.mg-pill {
	margin: 0;
}

.wp-block-post-terms.is-style-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wp-block-post-terms.is-style-pills .wp-block-post-terms__separator {
	display: none;
}

/* Diamond separators in meta rows (Figma: Meta › Rectangle 5×5 @45°) */
.mg-meta {
	align-items: center;
}

.mg-meta > * + *::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 5px;
	margin-right: 12px;
	vertical-align: 0.15em;
	background: var(--mg-gold);
	transform: rotate(45deg);
}

.mg-meta > .mg-avatar + *::before,
.mg-meta > .is-style-pill + *::before,
.mg-meta > .is-style-pill::before {
	content: none;
}

.mg-avatar {
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: 50%;
	border: 2px solid var(--mg-gold);
	background: var(--mg-deep-purple);
}

/* -------------------------------------------------------------------------
 * Section pieces
 * ---------------------------------------------------------------------- */

/* Timeline (Figma: The day › Timeline) */
.mg-timeline {
	display: flex;
	width: 100%;
}

.mg-timeline__stop {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

.mg-timeline__stop::before,
.mg-timeline__stop::after {
	content: "";
	flex: 1 1 0;
	height: 2px;
	background: var(--mg-gold);
}

.mg-timeline__stop:first-child::before,
.mg-timeline__stop:last-child::after {
	background: transparent;
}

.mg-hour {
	flex: none;
	margin: 0;
	padding: 8px 14px 6px;
	border: 1.5px solid var(--mg-gold);
	border-radius: 999px;
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--label-s);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.mg-hour.is-filled {
	border-color: var(--mg-deep-purple);
}

/* Facts rows (Figma: Events › Facts) */
.mg-facts > .mg-fact {
	border-top: 1px solid var(--mg-gold);
}

.mg-fact > :first-child {
	flex: 0 0 140px;
}

.mg-fact > :last-child {
	flex: 1 1 0;
}

/* MG-42: ticket button with its words, up under the event title. */
.mg-ticket-panel {
	border: 2px solid var(--mg-gold);
	border-left-width: 8px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--mg-gold) 16%, transparent);
	margin-block: 8px 12px;
}

.mg-ticket-panel .wp-block-buttons {
	padding-top: 8px;
}

.mg-ticket-panel .wp-block-button__link {
	font-size: 1.1em;
	padding-block: 17.8px 14.2px;
}

.mg-ticket-panel p {
	margin: 0;
}

/* Event jump bar */
.mg-jump a {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	color: var(--mg-deep-purple);
	text-decoration: none;
	font-family: var(--mg-display);
	font-size: 22px;
	line-height: 1.25;
}

.mg-jump a:hover {
	text-decoration: underline;
}

.mg-jump a span {
	color: var(--mg-purple);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Venue map (Figma: Venue map). The list is the legend; assets/js/map.js
 * draws the map above it. */
.mg-map {
	overflow: hidden;
	isolation: isolate;
}

.mg-pin-brunch { --mg-pin: var(--mg-gold); }
.mg-pin-second-line { --mg-pin: var(--mg-green); }
.mg-pin-masquerade { --mg-pin: var(--mg-purple); }

.mg-map-places {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 24px;
	margin: 0;
	padding: 22px 24px 24px;
	list-style: none;
	line-height: 1.4;
}

.mg-map-places li {
	position: relative;
	padding-left: 22px;
	color: rgba(255, 255, 255, 0.78);
}

.mg-map-places li::before {
	content: "";
	position: absolute;
	top: 0.3em;
	left: 0;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--mg-pin, var(--mg-green));
	box-shadow: 0 0 0 2px var(--wp--preset--color--white);
}

.mg-map-places a {
	color: var(--wp--preset--color--white);
	font-weight: 700;
	text-decoration: none;
}

.mg-map-places a:hover,
.mg-map-places a:focus-visible {
	color: var(--mg-gold);
	text-decoration: underline;
}

.mg-map__canvas {
	height: 420px;
	background: var(--mg-cream);
	font-family: inherit;
}

/* OpenStreetMap tiles, quietened to a warm vintage map so the pins lead. */
.mg-map__canvas .leaflet-tile-pane {
	filter: grayscale(1) sepia(0.35) contrast(0.92) brightness(1.06);
}

.mg-map__canvas .leaflet-bar a {
	color: var(--mg-deep-purple);
}

/* Pins: teardrops for the brunch and masquerade, beads for Second Line stops. */
.leaflet-marker-icon.mg-map-pin {
	background: none;
	border: 0;
}

.mg-map-pin span {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	border: 3px solid var(--wp--preset--color--white);
	border-radius: 50% 50% 50% 0;
	background: var(--mg-pin);
	box-shadow: 0 4px 10px rgba(42, 10, 53, 0.35);
	transform: rotate(-45deg);
}

.mg-map-pin span::after {
	content: "";
	position: absolute;
	inset: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
}

.mg-map-pin.is-bead span {
	border-width: 2px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.95) 0 16%, transparent 20%),
		var(--mg-pin);
	transform: none;
}

.mg-map-pin.is-bead span::after {
	content: none;
}

.mg-map-pin:focus-visible {
	outline: 3px solid var(--mg-deep-purple);
	outline-offset: 3px;
}

/* Popups */
.mg-map-popup .leaflet-popup-content-wrapper {
	border: 1.5px solid var(--mg-gold);
	border-radius: 4px;
	background: var(--mg-deep-purple);
	color: var(--wp--preset--color--white);
}

.mg-map-popup .leaflet-popup-tip {
	background: var(--mg-deep-purple);
}

.mg-map-popup .leaflet-popup-content {
	margin: 16px 20px;
	font-family: var(--wp--preset--font-family--nunito-sans);
}

.mg-map-popup .leaflet-popup-content p {
	margin: 0;
}

.mg-map-popup__name {
	font-family: var(--mg-display);
	font-size: 22px;
	line-height: 1.15;
	color: var(--mg-gold);
}

.mg-map-popup__detail {
	padding: 6px 0 10px;
	font-size: 14px;
	line-height: 1.4;
}

.leaflet-container .mg-map-popup a.mg-map-popup__link {
	color: var(--mg-green);
	font-family: var(--mg-label);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}

.leaflet-container .mg-map-popup a.leaflet-popup-close-button {
	color: var(--wp--preset--color--white);
}

/* Logo slots (Figma: Logo slot) */
.mg-logo-slot {
	min-height: 120px;
}

/* Logo cards: an Image block style, so editors swap a sponsor's logo with
 * Replace and its link with the link button. The card keeps every logo
 * readable on any band: dark logos on the light card, white logos on the
 * dark one. */
.wp-block-image.is-style-logo-card,
.wp-block-image.is-style-logo-card-dark {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--mg-logo-card-height, 112px);
	margin: 0;
	padding: 14px 20px;
	border-radius: 4px;
	background: var(--wp--preset--color--white);
}

.wp-block-image.is-style-logo-card-dark {
	background: var(--wp--preset--color--deep-purple);
}

/* Sponsors page: logos sit straight on the section (MG-35). The dark card
 * stays, because the white Saugatuck Center for the Arts logo needs it. */
.mg-partners .wp-block-image.is-style-logo-card {
	background: transparent;
}

.wp-block-image.is-style-logo-card a,
.wp-block-image.is-style-logo-card-dark a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.wp-block-image.is-style-logo-card img,
.wp-block-image.is-style-logo-card-dark img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: var(--mg-logo-height, 64px);
	max-height: var(--mg-logo-height, 64px);
	margin: 0 auto;
	object-fit: contain;
	object-position: center;
}

/* MG-53: no purple box. The one white logo (Saugatuck Center for the Arts)
 * used to sit on a purple card; now it sits straight on the section like the
 * others, flipped to dark (the filter turns white to black and keeps the reds
 * and blues). Every logo gets the same box, so they read at an even size and
 * sit centred, on the Home band and the Sponsors page alike. */
.wp-block-image.is-style-logo-card-dark {
	background: transparent;
}

.wp-block-image.is-style-logo-card-dark img {
	filter: invert(1) hue-rotate(180deg);
}

/* MG-63: on the front page only, the Saugatuck Center for the Arts logo goes back
 * on its purple card (white logo, as supplied). The Sponsors page keeps MG-53's
 * look. `.home` is WordPress's body class for the front page. */
.home .mg-sponsor-band .wp-block-image.is-style-logo-card-dark {
	background: var(--wp--preset--color--deep-purple);
}

.home .mg-sponsor-band .wp-block-image.is-style-logo-card-dark img {
	filter: none;
}

/* Event Sponsors and Second Line Stops use the same box as the Grand Marshals. */
.mg-partner-grid {
	--mg-logo-card-height: clamp(112px, 92px + 5vw, 164px);
	--mg-logo-height: clamp(68px, 54px + 3.5vw, 112px);
}

.wp-block-image.is-style-logo-card a:focus-visible,
.wp-block-image.is-style-logo-card-dark a:focus-visible {
	outline: 2px solid var(--wp--preset--color--purple);
	outline-offset: 6px;
	border-radius: 2px;
}

/* Logo grids: two by two in the sponsor band, a row of four on the
 * Sponsors page (two by two on phones). The group is a flow layout, so
 * cancel the block gap it gives each child. */
.mg-logo-grid {
	display: grid;
	gap: 12px;
}

.mg-logo-grid > * {
	margin: 0 !important;
}

.mg-logo-grid.is-pairs {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	--mg-logo-card-height: 112px;
	--mg-logo-height: 76px;
}

.mg-logo-grid.is-row {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(12px, 9.03px + 0.7619vw, 20px);
	--mg-logo-card-height: clamp(112px, 92px + 5vw, 164px);
	--mg-logo-height: clamp(68px, 54px + 3.5vw, 112px);
}

/* Each tier fills the section's width, so its grid can lay out. */
.mg-sponsor-tier > .mg-logo-grid,
.mg-sponsor-tier > .mg-partner-grid {
	align-self: stretch;
	width: 100%;
}

@media (max-width: 781px) {
	.mg-logo-grid.is-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.wp-block-image.is-style-logo-card,
	.wp-block-image.is-style-logo-card-dark {
		padding: 12px 14px;
	}
}

/* Share buttons (Figma: Share) */
.mg-share .wp-block-button__link {
	width: 40px;
	height: 40px;
	padding: 0;
	font-size: 13px;
	letter-spacing: 0;
	text-transform: none;
}

/* Form fields (Figma: Form field) */
.mg-form {
	display: grid;
	gap: 24px;
}

/* Contact form: honeypot (hidden from people) and result notice (MG-3) */
.mg-form .mg-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mg-form-notice {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 8px 0 24px;
	padding: 14px 18px;
	border-left: 4px solid currentColor;
	border-radius: 4px;
	font-weight: 600;
	line-height: 1.4;
}

.mg-form-notice::before {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.mg-form-notice.is-success::before {
	content: "✓";
	background: #1d5e30;
}

.mg-form-notice.is-error::before {
	content: "!";
	background: #8f1d1d;
}

.mg-form-notice.is-success {
	background: #e7f3ea;
	color: #1d5e30;
}

.mg-form-notice.is-error {
	background: #fbeaea;
	color: #8f1d1d;
}

.mg-form .mg-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.mg-field {
	display: grid;
	gap: 8px;
	margin: 0;
}

.mg-field label {
	color: var(--mg-deep-purple);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--label-xs);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.mg-field input,
.mg-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 16px 18px;
	border: 1.5px solid var(--mg-deep-purple);
	border-radius: 6px;
	background: #fff;
	color: var(--mg-ink);
	font-family: var(--wp--preset--font-family--nunito-sans);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.65;
}

.mg-field textarea {
	min-height: 152px;
	resize: vertical;
}

.mg-field ::placeholder {
	color: var(--mg-ink);
	opacity: 1;
}

.mg-form .wp-element-button {
	justify-self: start;
	border: 0;
	cursor: pointer;
}

.mg-form .wp-element-button.is-purple {
	background: var(--mg-purple);
	color: #fff;
}

.mg-newsletter-form {
	display: flex;
	gap: 12px;
	align-items: flex-end;
}

.mg-newsletter-form .mg-field {
	width: 360px;
}

/* -------------------------------------------------------------------------
 * Header & navigation (Figma: Site header, Mobile menu)
 * ---------------------------------------------------------------------- */

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

/* Logo (Figma: Site header → Logo): 180px on phones up to 260px at 1440. */
.mg-header-logo {
	margin: 0;
	line-height: 0;
}

.mg-header-logo img {
	display: block;
	width: clamp(180px, 150.29px + 7.619vw, 260px);
	height: auto;
}

.mg-site-header .mg-primary-nav .wp-block-navigation-item__content {
	color: #fff;
	text-decoration: none;
}

.mg-site-header .mg-primary-nav .wp-block-navigation-item__content:hover {
	color: var(--mg-gold);
}

.mg-primary-nav .mg-menu-cta {
	display: none;
}

/* Menu / Close pill (Figma: Menu button) */
.mg-primary-nav .wp-block-navigation__responsive-container-open,
.mg-primary-nav .wp-block-navigation__responsive-container-close {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 12px 9px;
	border: 1.5px solid var(--mg-gold);
	border-radius: 999px;
	color: var(--mg-gold);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--label-s);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
}

.mg-primary-nav .wp-block-navigation__responsive-container-open::after,
.mg-primary-nav .wp-block-navigation__responsive-container-close::after {
	content: "";
	display: block;
	width: 18px;
	height: 14px;
	background: url("../images/icon-menu.svg") no-repeat center / 18px 14px;
}

.mg-primary-nav .wp-block-navigation__responsive-container-close::after {
	width: 16px;
	height: 16px;
	background-image: url("../images/icon-close.svg");
	background-size: 16px 16px;
}

/* Open overlay: jeweled band along the top with the bead swag hanging from
 * it (phone hero size), over the lattice. */
.mg-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0;
	background-color: var(--mg-deep-purple) !important;
	background-image:
		url("../images/harlequin-jeweled-lilac.svg"),
		url("../images/bead-swag-gleam.svg"),
		url("../images/harlequin-field.svg");
	background-repeat: repeat-x, repeat-x, repeat;
	background-position: 0 0, 0 15px, -500px 0;
	background-size: 1080px 24px, 432px 58px, 1440px 960px;
}

.mg-primary-nav .is-menu-open .wp-block-navigation__responsive-close {
	max-width: none;
}

/* The logo and Close sit below the swag. */
.mg-primary-nav .is-menu-open .wp-block-navigation__responsive-dialog {
	padding-top: 56px;
}

.mg-primary-nav .is-menu-open .wp-block-navigation__responsive-container-close {
	position: absolute;
	top: 72px;
	right: 20px;
}

/* The open menu repeats the header logo. */
.mg-primary-nav .is-menu-open .wp-block-navigation__responsive-dialog::before {
	content: "";
	display: block;
	width: 140px;
	height: 51px;
	margin: 16px 0 0 20px;
	background: url("../images/mardi-gras-saugatuck-logo.webp") no-repeat left center / contain;
}

.mg-primary-nav .is-menu-open .wp-block-navigation__responsive-container-content {
	padding: 32px 20px 32px !important;
	align-items: stretch !important;
}

.mg-primary-nav .is-menu-open .wp-block-navigation__container {
	gap: 0 !important;
	width: 100%;
	align-items: stretch !important;
}

.mg-primary-nav .is-menu-open .wp-block-navigation-item {
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	text-align: left;
	align-items: stretch !important;
	border-bottom: 1px solid var(--mg-gold);
}

.mg-primary-nav .is-menu-open .wp-block-navigation-item__content {
	display: flex !important;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 18px 0 !important;
	font-family: var(--mg-display);
	font-size: 30px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.2;
}

.mg-primary-nav .is-menu-open .wp-block-navigation-item__content::after {
	content: "→";
	color: var(--mg-gold);
	font-size: 24px;
	line-height: 1.25;
}

/* Ticket button inside the open menu (classic menu item with class mg-menu-cta) */
.mg-primary-nav .is-menu-open .mg-menu-cta {
	display: block;
	margin-top: 40px;
	border-bottom: 0;
}

.mg-primary-nav .is-menu-open .mg-menu-cta::before {
	content: var(--wp--custom--event--date-label, "");
	display: block;
	margin-bottom: 16px;
	color: var(--mg-green);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.mg-primary-nav .is-menu-open .mg-menu-cta .wp-block-navigation-item__content {
	box-sizing: border-box;
	justify-content: center;
	padding: 18.5px 28px 15.5px !important;
	border-radius: 999px;
	background: var(--mg-gold);
	color: var(--mg-deep-purple);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--button);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
}

.mg-primary-nav .is-menu-open .mg-menu-cta .wp-block-navigation-item__content::after {
	content: none;
}

@media (min-width: 1024px) {
	/* Full navigation inline; the menu button only appears below 1024px. */
	.mg-primary-nav .wp-block-navigation__responsive-container-open {
		display: none !important;
	}

	.mg-primary-nav .wp-block-navigation__responsive-container.hidden-by-default:not(.is-menu-open) {
		display: block;
		position: relative;
		width: auto;
		z-index: auto;
		padding: 0;
		background-color: transparent !important;
	}

	.mg-primary-nav .wp-block-navigation__responsive-container.hidden-by-default:not(.is-menu-open) .wp-block-navigation__responsive-container-close {
		display: none;
	}

	.mg-primary-nav .wp-block-navigation__responsive-container.hidden-by-default:not(.is-menu-open) .wp-block-navigation__container {
		gap: 32px;
	}
}

@media (max-width: 1023px) {
	.mg-header-tickets {
		display: none !important;
	}

	.mg-site-header .mg-header-bar {
		padding-top: 16px !important;
		padding-bottom: 16px !important;
	}
}

/* -------------------------------------------------------------------------
 * Footer (Figma: Site footer)
 * ---------------------------------------------------------------------- */

.mg-site-footer .wp-block-navigation-item__content {
	color: #fff;
	text-decoration: none;
}

.mg-site-footer .wp-block-navigation-item__content:hover {
	color: var(--mg-gold);
	text-decoration: underline;
}

.mg-site-footer .wp-block-site-title {
	font-size: clamp(36px, 33.03px + 0.7619vw, 44px);
}

.mg-footer-legal {
	border-top: 1px solid #fff;
}

/* -------------------------------------------------------------------------
 * Responsive layout helpers
 * ---------------------------------------------------------------------- */

@media (max-width: 1023px) {
	.wp-block-columns.mg-stack-lg {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.mg-stack-lg > .wp-block-column {
		flex-basis: 100% !important;
	}
}

@media (max-width: 781px) {
	.mg-hide-mobile {
		display: none !important;
	}

	.mg-timeline {
		display: none !important;
	}

	.mg-fact {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 4px !important;
	}

	.mg-fact > :first-child {
		flex-basis: auto;
	}

	.mg-marker {
		flex-direction: row !important;
		flex-wrap: wrap !important;
		align-items: center !important;
		gap: 16px !important;
	}

	.mg-marker .wp-block-image.mg-sketch {
		flex-basis: 100%;
		max-width: 220px;
		margin: 0;
	}

	/* In the neon frame the marker is a card: centre it, clear of the brackets. */
	.mg-marker.is-style-neon-frame {
		justify-content: center !important;
		padding: 32px 24px 44px !important;
	}

	.mg-marker.is-style-neon-frame .wp-block-image.mg-sketch {
		margin-inline: auto;
	}

	.mg-steps {
		flex-direction: column;
		align-items: center !important;
	}

	.mg-steps .mg-bead-trio {
		display: none !important;
	}

	.mg-form .mg-form-row {
		grid-template-columns: 1fr;
	}

	.mg-newsletter-form {
		flex-direction: column;
		align-items: stretch;
	}

	.mg-newsletter-form .mg-field {
		width: auto;
	}

	.wp-block-buttons.is-full-mobile,
	.wp-block-buttons.is-full-mobile .wp-block-button,
	.wp-block-buttons.is-full-mobile .wp-block-button__link {
		width: 100%;
	}

	.wp-block-buttons.is-full-mobile {
		flex-direction: column;
	}

	.mg-site-footer .mg-footer-columns {
		flex-direction: column;
	}

	/* The brand column's 420px basis would become its height once stacked. */
	.mg-site-footer .mg-footer-brand {
		flex-basis: auto !important;
	}

	.mg-site-footer .mg-menu-footer .wp-block-navigation__container {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 12px 24px !important;
	}

	.mg-footer-legal {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 8px !important;
	}

	.mg-map__canvas {
		height: 320px;
	}

	.mg-map-places {
		grid-template-columns: minmax(0, 1fr);
	}

	.mg-poster-showcase {
		padding-top: 20px;
	}

	.mg-poster-showcase::before {
		display: none;
	}

	.mg-cameo {
		width: min(290px, 80%);
	}

	.mg-cameo::before {
		top: 30px;
		left: 28px;
	}

	.mg-cameo.is-joy::before {
		left: -26px;
		top: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;	}
}

/* -------------------------------------------------------------------------
 * Pattern-specific pieces
 * ---------------------------------------------------------------------- */

/* Home hero (Figma: Hero) — radial glow behind the poster, over the lattice */
.mg-home-hero {
	background-image:
		radial-gradient(circle 450px at calc(100% - 230px) 290px, rgba(138, 54, 214, 0.5), rgba(138, 54, 214, 0)),
		url("../images/harlequin-field.svg");
	background-size: auto, 1440px 960px;
}

/* On desktop the whole hero fits the screen under the header: the padding,
 * poster, wordmark and date shrink with the window's height and stop at the
 * Figma sizes on tall screens. */
@media (min-width: 1024px) {
	/* Fills the window under the header, so the jeweled edge sits on the
	 * bottom of the screen (festive.js keeps --mg-header-height exact). Not
	 * in the editor, where the canvas isn't the window. */
	body:not(.editor-styles-wrapper) .mg-home-hero {
		display: flex;
		flex-direction: column;
		justify-content: center;
		min-height: calc(100svh - var(--mg-header-height, 158px) - var(--wp-admin--admin-bar--height, 0px));
	}

	.mg-home-hero {
		padding-top: clamp(80px, 16svh - 44px, 136px) !important;
		padding-bottom: clamp(56px, 13svh - 44px, 148px) !important;
	}

	.mg-home-hero :is(.mg-poster-showcase, .wp-block-image.is-style-poster) {
		width: clamp(300px, 47svh - 44px, 500px);
	}

	.mg-home-hero .mg-hero-title {
		font-size: min(var(--wp--preset--font-size--display-xl), 10.4svh) !important;
	}

	.mg-home-hero .mg-date-numeral {
		font-size: min(var(--wp--preset--font-size--date), 9svh) !important;
	}

	.mg-home-hero .mg-hero-date {
		padding-block: min(20px, 1.8svh) !important;
	}

	/* The lower-right sparkle sits beside the poster, not on its bracket. */
	.mg-home-hero::before {
		background-position: right 118px top 150px, right 92px top 196px, right 60px bottom 120px, left 70px bottom 106px, left 110px bottom 84px, 0 calc(100% + 12px);
	}

	.mg-home-hero .wp-block-column > .wp-block-group > * + * {
		margin-block-start: min(28px, 2.2svh) !important;
	}
}

/* Short laptop windows: tighter still, so the edge stays on screen. */
@media (min-width: 1024px) and (max-height: 760px) {
	.mg-home-hero {
		padding-top: 72px !important;
		padding-bottom: 44px !important;
	}

	.mg-home-hero .mg-hero-title {
		font-size: 9.4svh !important;
	}

	.mg-home-hero .has-lead-font-size {
		font-size: var(--wp--preset--font-size--medium) !important;
	}

	.mg-home-hero .wp-block-column > .wp-block-group > * + * {
		margin-block-start: 1.8svh !important;
	}
}

/* Hero wordmark (Figma: Hero wordmark): "Mardi Gras" over a smaller "in"
 * and a tracked-out SAUGATUCK. Editors type it as Mardi Gras ⏎ *in* **Saugatuck**. */
.mg-hero-title {
	margin: 0;
	/* Nudge the large "M" right so it shares a left edge with the small "in"
	 * below it (about 6px at the full 104px size; em keeps it in proportion). */
	text-indent: 0.04em;
}

/* "in" and SAUGATUCK share a raised baseline (Figma: baseline-aligned). */
.mg-hero-title em {
	font-style: normal;
	font-size: 0.5085em;
	color: var(--wp--preset--color--cream);
	vertical-align: 0.12em;
}

.mg-hero-title strong {
	font-family: var(--mg-label);
	font-weight: 700;
	font-size: 0.5085em;
	letter-spacing: 0.267em;
	text-transform: uppercase;
	vertical-align: 0.12em;
}

/* Page titles sit on a hard shadow and a soft drop (Figma: Page title effects). */
.mg-hero-title,
.mg-page-hero :is(h1, .wp-block-post-title, .wp-block-query-title) {
	text-shadow: 0 6px 0 rgba(20, 5, 38, 0.55), 0 10px 24px rgba(13, 0, 26, 0.45);
}

.mg-hero-date {
	border-top: 1px solid var(--mg-gold);
	border-bottom: 1px solid var(--mg-gold);
}

.mg-date-numeral {
	margin: 0;
}

/* Event card time chip (Figma: Event card › Time) */
.mg-time-chip {
	padding: 9px 16px 7px;
}

/* On a neon card the time glows instead of sitting on a chip. */
.is-style-neon-frame .mg-time-chip {
	padding: 0;
	background: none !important;
	color: var(--wp--preset--color--white) !important;
	letter-spacing: 0.16em;
	text-shadow: 0 0 6px var(--mg-neon-tube), 0 0 16px color-mix(in srgb, var(--mg-neon-tube) 80%, transparent);
}

/* Diamonds (Figma: rotated 12×12 / 14×14 squares) */
.mg-diamond {
	width: 12px;
	height: 12px !important;
	margin: 4px 2px !important;
	transform: rotate(45deg);
	background: var(--mg-gold);
}

.mg-marks .mg-diamond {
	width: 14px;
	height: 14px !important;
}

.has-purple-diamond { background: var(--mg-purple); }
.has-green-diamond { background: var(--mg-green); }
.has-gold-diamond { background: var(--mg-gold); }

/* Info cards (Figma: Essentials) */
.mg-info-card.is-accent-purple { border-top: 6px solid var(--mg-purple); }
.mg-info-card.is-accent-green { border-top: 6px solid var(--mg-green); }
.mg-info-card.is-accent-gold { border-top: 6px solid var(--mg-gold); }

/* Bead trio between steps (Figma: How it helps › Beads) */
.mg-bead-trio {
	flex: none;
	width: 39px;
	height: 9px !important;
	margin-top: 48px !important;
	background:
		radial-gradient(circle at 4.5px 4.5px, var(--mg-purple) 4.5px, transparent 5px),
		radial-gradient(circle at 19.5px 4.5px, var(--mg-gold) 4.5px, transparent 5px),
		radial-gradient(circle at 34.5px 4.5px, var(--mg-green) 4.5px, transparent 5px);
	background-repeat: no-repeat;
}

/* Tier cards (Figma: Sponsorship levels › Tiers) */
.mg-tier {
	height: 100%;
	box-sizing: border-box;
}

.mg-tier.is-outlined {
	border: 1.5px solid var(--mg-gold);
}

.mg-tier > .mg-tier-action {
	margin-top: auto !important;
	padding-top: 7px;
}

.mg-tier .is-style-diamonds {
	margin-top: 8px;
}

/* LED bead string along the top of the CTA and newsletter bands (Figma:
 * Ornament/LED bead strand). The points where the strings meet rest on the
 * band's top edge and the bulbs hang down into it. */
.mg-cta-band,
.mg-newsletter-band {
	overflow: visible;
}

.mg-cta-band::after,
.mg-newsletter-band::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 78px;
	z-index: 1;
	pointer-events: none;
	background: url("../images/led-strand.svg") repeat-x 0 -12px / 1440px 90px;
}

/* Phones: one swag per screen width, pinned at both edges. */
@media (max-width: 781px) {
	:is(.mg-cta-band, .mg-newsletter-band)::after,
	.is-style-led-string {
		height: 44px !important;
		background-size: 200% auto;
		background-position: 0 calc(-12 / 1440 * 200vw);
	}
}

/* Featured tier in the neon frame (Figma: Sponsorship levels › Grand Marshal) */
.mg-tier.is-style-neon-frame {
	border-radius: var(--mg-neon-radius);
}

/* At a glance as a dark neon card (Figma: News — Single post › At a glance) */
.mg-at-a-glance .mg-glance-row + .mg-glance-row {
	border-top: 1px solid color-mix(in srgb, var(--mg-neon-tube) 45%, transparent);
}

/* Event marker in the neon frame (Figma: Events › Mardi Gras Masquerade) */
.mg-marker.is-style-neon-frame {
	padding: clamp(24px, 18.06px + 1.5238vw, 40px);
}

/* Where the time sits under the numeral, clear the display face's descending
 * figures (the 3 of 03) so the time is centred in the space beneath. */
@media (min-width: 782px) {
	.mg-marker > .is-style-numeral {
		margin-bottom: 0.16em !important;
	}
}

/* CTA band copy column */
.mg-cta-copy {
	flex: 1 1 520px;
	max-width: 760px;
}

.mg-newsletter-band .mg-cta-copy {
	max-width: 560px;
}

/* Read more as a purple pill (Figma: Featured post › Button) */
.wp-block-read-more.mg-read-more {
	display: inline-flex;
	width: fit-content;
	padding: 18.5px 28px 15.5px;
	border-radius: 999px;
	background: var(--mg-purple);
	color: var(--wp--preset--color--white);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--button);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
}

/* Pagination (Figma: Pagination) */
.mg-pagination {
	margin-top: var(--wp--preset--spacing--gap-xxl);
	gap: 10px;
	align-items: center;
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--button);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.mg-pagination .wp-block-query-pagination-numbers {
	display: flex;
	gap: 10px;
}

.mg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1.5px solid var(--mg-deep-purple);
	border-radius: 50%;
	color: var(--mg-deep-purple);
	text-decoration: none;
	box-sizing: border-box;
}

.mg-pagination .page-numbers.current {
	background: var(--mg-deep-purple);
	color: var(--mg-gold);
}

.mg-pagination .page-numbers.dots {
	border: 0;
}

.mg-pagination a.wp-block-query-pagination-next,
.mg-pagination a.wp-block-query-pagination-previous {
	color: var(--mg-purple);
	text-decoration: none;
}

/* Single post (Figma: News — Single post) */
.mg-post-hero {
	background: linear-gradient(to bottom, var(--mg-cream) 50%, var(--wp--preset--color--white) 50%);
}

/* The whole photo shows, never cropped: it keeps its own proportions, fits the
 * width, and a tall or square one is capped in height and centred. */
.mg-post-hero-image {
	text-align: center;
}

.mg-post-hero-image img {
	box-shadow: var(--wp--preset--shadow--photo);
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(78vh, 760px);
	object-fit: contain;
}

.mg-post-body > p:first-child {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.55;
}

.mg-post-body > * + * {
	margin-block-start: 28px;
}

.mg-glance-time {
	flex: 0 0 150px;
}

.wp-block-quote.mg-pull-quote p,
.mg-post-body .wp-block-quote p {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.mg-byline .wp-block-post-date,
.mg-byline .wp-block-post-time-to-read {
	color: var(--mg-ink);
}

.mg-breadcrumb a {
	text-decoration: none;
}

.mg-crumb-terms a {
	color: var(--mg-ink);
	letter-spacing: 0.14em;
}

/* Search */
.mg-search .wp-block-search__input {
	padding: 16px 18px;
	border: 1.5px solid var(--mg-deep-purple);
	border-radius: 6px;
	font-size: var(--wp--preset--font-size--medium);
}

.mg-search .wp-block-search__button {
	margin-left: 12px;
	background: var(--mg-purple);
	color: #fff;
}

.mg-search .wp-block-search__label {
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--label-xs);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mg-deep-purple);
}

@media (max-width: 781px) {
	.mg-jump-bar {
		justify-content: flex-start !important;
	}

	.mg-jump a {
		padding: 8px 12px 6px;
		border: 1.5px solid var(--mg-deep-purple);
		border-radius: 999px;
		font-family: var(--mg-label);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.14em;
		text-transform: uppercase;
	}

	.mg-jump a span {
		font-size: inherit;
		color: inherit;
	}

	.mg-glance-row {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 4px !important;
	}

	.mg-glance-time {
		flex-basis: auto;
	}

	.mg-tags-share {
		flex-direction: column;
		align-items: flex-start !important;
	}

	.mg-home-hero {
		background-image: none;
	}

	.mg-post-hero {
		background: linear-gradient(to bottom, var(--mg-cream) 50%, var(--wp--preset--color--white) 50%);
	}
}

/* Menu items flagged mg-mobile-only (e.g. Contact) appear only in the open menu. */
.mg-primary-nav :not(.is-menu-open) .mg-mobile-only {
	display: none;
}

@media (min-width: 782px) and (max-width: 1023px) {
	/* Figma tablet frame: the cameo shrinks to 320px beside its copy. */
	.wp-block-columns > .wp-block-column.mg-cameo-col {
		flex-basis: 320px !important;
	}

	.mg-cameo-col .mg-cameo {
		width: min(290px, 100%);
	}
}

/* Partner logos (Figma: Logos — 4 per row, last row centred; 2 per row on mobile) */
.mg-partner-grid > .mg-logo-slot,
.mg-partner-grid > .wp-block-image {
	flex: 0 1 calc((100% - 3 * clamp(12px, 9.03px + 0.7619vw, 20px)) / 4);
	box-sizing: border-box;
}

/* Pony Sponsors "This could be you": one wide card; more can be added and stack
 * (MG-37). A real logo dropped into a card sits in the same wide card. */
.mg-partner-grid.mg-pony-grid {
	flex-direction: column;
	align-items: center;
}

.mg-partner-grid.mg-pony-grid > .wp-block-image {
	flex: 0 0 auto;
	width: min(100%, 600px);
	min-height: 0;
	padding: 0;
	background: transparent;
}

.mg-pony-grid > .wp-block-image img {
	height: auto;
	max-height: none;
	filter: none;
	border-radius: 18px;
}

/* MG-54: the invitation above the card */
.mg-pony-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
}

.mg-pony-block .mg-pony-copy {
	flex: 0 0 auto;
	margin: 0;
	max-width: 600px;
	height: auto;
	text-align: center;
}

.mg-pony-block > .mg-pony-grid {
	flex: 0 0 auto;
	width: 100%;
}

.mg-pony-grid > .wp-block-image a:hover img {
	filter: brightness(1.12);
}

/* Phones: two per row as a grid (the flex basis alone let long names wrap
 * each card onto its own row); an odd last card sits centred. */
@media (max-width: 781px) {
	.mg-partner-grid:not(.mg-pony-grid) {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px !important;
	}

	.mg-partner-grid > .mg-logo-slot {
		margin: 0 !important;
	}

	.mg-partner-grid > .mg-logo-slot:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		justify-self: center;
		width: calc(50% - 6px);
	}
}

/* Buttons inside HTML forms use the same pill as the Button block. */
.mg-form button.wp-element-button,
.mg-newsletter-form button.wp-element-button {
	padding: 18.5px 28px 15.5px;
	border: 0;
	border-radius: 999px;
	background: var(--mg-purple);
	color: var(--wp--preset--color--white);
	font-family: var(--mg-label);
	font-size: var(--wp--preset--font-size--button);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
}

/* Article copy is Body / Large in Figma. */
.mg-post-body p {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

/* 404: the bead swag sags off one end. */
.mg-lost-beads {
	position: relative;
	width: min(727px, 100%);
	margin-inline: auto;
}

/* Event sketches (Figma: Sketch/*) under the numeral and time. */
.wp-block-image.mg-sketch {
	width: 100%;
	max-width: 360px;
	margin: 24px 0 0;
}

.wp-block-image.mg-sketch img {
	display: block;
	width: 100%;
	height: auto;
}

/* Tablet: the marker spans the stacked event, so the sketch sits beside the
 * numeral and time instead of under them. */
@media (min-width: 782px) and (max-width: 1023px) {
	.mg-marker:has(> .mg-sketch) {
		display: grid !important;
		grid-template-columns: auto minmax(0, 300px);
		/* Spare height goes to the outer rows, keeping numeral + time together. */
		grid-template-rows: 1fr auto auto 1fr;
		justify-content: space-between;
		align-items: center;
		gap: 8px 48px !important;
	}

	.mg-marker:has(> .mg-sketch) > :not(.mg-sketch) {
		grid-column: 1;
		margin: 0;
	}

	.mg-marker:has(> .mg-sketch) > :first-child {
		grid-row: 2;
	}

	.mg-marker:has(> .mg-sketch) > :nth-child(2) {
		grid-row: 3;
	}

	.mg-marker .wp-block-image.mg-sketch {
		grid-column: 2;
		grid-row: 1 / -1;
		margin: 0;
	}
}

/* Photo band (Figma: Photo band / Photo slot): Gallery "Mosaic" style — one
 * feature photo (2×2) and four supporting photos; captions are pill chips. */
.wp-block-gallery.has-nested-images.is-style-mosaic {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(120px, 15.3vw, 220px);
	gap: 16px;
}

.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image:not(#individual-image) {
	width: auto;
	margin: 0;
	border-radius: 4px;
	overflow: hidden;
	background: var(--mg-deep-purple);
}

.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image:first-of-type {
	grid-column: span 2;
	grid-row: span 2;
}

.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image:has(figcaption)::before {
	content: none;
}

/* Photo with caption tag (Figma: Photo slot): a single Image block with the
 * same pill caption as the mosaic. */
.wp-block-image.is-style-photo-tag {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: 4px;
}

.wp-block-image.is-style-photo-tag img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wp-block-image.is-style-photo-tag figcaption,
.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image figcaption {
	position: absolute;
	right: auto;
	bottom: 16px;
	left: 16px;
	width: auto;
	max-height: none;
	margin: 0;
	padding: 7px 12px 5px;
	overflow: visible;
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	color: var(--mg-deep-purple);
	font-family: var(--mg-label);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-align: left;
	text-shadow: none;
	text-transform: uppercase;
}

.wp-block-gallery.has-nested-images.is-style-mosaic > .blocks-gallery-caption {
	grid-column: 1 / -1;
	margin: 8px 0 0;
	color: var(--mg-ink);
	font-size: 13px;
	opacity: 0.75;
	text-align: center;
}

.wp-block-gallery.is-style-mosaic > .blocks-gallery-caption a {
	color: inherit;
}

@media (max-width: 781px) {
	.wp-block-gallery.has-nested-images.is-style-mosaic {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 120px;
	}

	.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image:not(:first-of-type) figcaption {
		display: none;
	}

	.wp-block-gallery.has-nested-images.is-style-mosaic > .blocks-gallery-caption {
		text-align: left;
	}
}

/* Footer credit (Figma: Site footer › Legal) */
.mg-footer-credit {
	opacity: 0.75;
}

.mg-footer-credit a {
	text-decoration-color: var(--mg-gold);
	text-underline-offset: 3px;
}

.mg-footer-credit a:hover,
.mg-footer-credit a:focus-visible,
.mg-footer-privacy a:hover,
.mg-footer-privacy a:focus-visible {
	color: var(--mg-gold);
}

.mg-footer-privacy {
	opacity: 0.75;
}

.mg-footer-privacy a {
	text-decoration-color: var(--mg-gold);
	text-underline-offset: 3px;
}

/* Privacy note beside forms (MG-8) */
.mg-privacy-note {
	margin: 0;
	opacity: 0.85;
}

.mg-privacy-note a {
	text-underline-offset: 3px;
}

/* -------------------------------------------------------------------------
 * Phones (Figma: Responsive, 390): the 2027 look
 * ---------------------------------------------------------------------- */

@media (max-width: 781px) {
	/* Room for the swag above the eyebrow and the wordmark's swash. */
	.mg-home-hero {
		padding-top: 96px !important;
		padding-bottom: 76px !important;
	}

	.mg-hero-title {
		padding-top: 0.12em;
	}

	.mg-post-header {
		padding-top: 84px !important;
	}

	/* Poster: phone-sized, with its tag on the frame's top edge. */
	.mg-poster-showcase,
	.wp-block-image.is-style-poster {
		width: min(320px, 100%);
	}

	.mg-poster-showcase .mg-poster-tag {
		top: 8px;
		right: -6px;
		font-size: 11px;
	}

	/* Event jump bar: three equal links in one row. */
	.mg-jump-bar {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px !important;
	}

	.mg-jump-bar > .mg-jump,
	.mg-jump a {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
		margin: 0;
		box-sizing: border-box;
		text-align: center;
	}

	.mg-jump a {
		padding: 9px 4px 7px;
		border-radius: 14px;
		font-size: 10px;
		letter-spacing: 0.1em;
	}

	.mg-jump a span {
		display: block;
	}

	/* Neon cards: keep content clear of the corner brackets. */
	.mg-tier.is-style-neon-frame {
		padding-top: 52px !important;
	}

	/* Category filters scroll sideways in one row instead of stacking, edge
	 * to edge, with the first pill in line with the content. A fade marks the
	 * side that has more pills (festive.js sets has-more-before/-after only
	 * when the row overflows). */
	.mg-pill-row {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		margin-inline: calc(-1 * var(--wp--preset--spacing--gutter)) !important;
		padding-block: 4px;
		padding-inline: var(--wp--preset--spacing--gutter);
		scroll-padding-inline: var(--wp--preset--spacing--gutter);
		--mg-fade: 56px;
	}

	.mg-pill-row.has-more-after {
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--mg-fade)), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - var(--mg-fade)), transparent);
	}

	.mg-pill-row.has-more-before {
		-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--mg-fade));
		mask-image: linear-gradient(to right, transparent, #000 var(--mg-fade));
	}

	.mg-pill-row.has-more-before.has-more-after {
		-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--mg-fade), #000 calc(100% - var(--mg-fade)), transparent);
		mask-image: linear-gradient(to right, transparent, #000 var(--mg-fade), #000 calc(100% - var(--mg-fade)), transparent);
	}

	.mg-pill-row::-webkit-scrollbar {
		display: none;
	}

	.mg-pill-row .wp-block-categories,
	.mg-pill-row .wp-block-categories ul {
		flex-wrap: nowrap;
	}

	.mg-pill-row :is(.mg-pill, li) {
		flex: none;
	}

	/* Newsletter: full-width field and button. */
	.mg-newsletter-form,
	.mg-newsletter-form .mg-field,
	.mg-newsletter-form input,
	.mg-newsletter-form button.wp-element-button {
		width: 100%;
	}

	/* Scroll-frame cards: smaller corners and more padding so the scrolls
	 * never sit on the title or the button. */
	.is-style-scroll-frame {
		--mg-corner: 48px;
	}

	.mg-form-card {
		padding: 56px 24px 64px !important;
	}

	/* Stacked columns: tighter gap than desktop's side-by-side gutter. */
	.wp-block-columns.mg-stack-lg {
		row-gap: 40px !important;
	}
}


/* -------------------------------------------------------------------------
 * Tablet (Figma: Responsive, 834)
 * ---------------------------------------------------------------------- */

@media (min-width: 782px) and (max-width: 1023px) {
	/* Rows of three stay rows of three instead of leaving an orphan. */
	.is-layout-grid:has(> :nth-child(3):last-child):not(.mg-event-grid),
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}

	/* Event cards need the width: two up, the third centred below. */
	.mg-event-grid > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
		justify-self: center;
		width: calc(50% - 16px);
	}

	/* Footer: the brand spans the top, the three lists sit beneath it. */
	.mg-site-footer .mg-footer-columns {
		flex-wrap: wrap !important;
		row-gap: 40px !important;
	}

	.mg-site-footer .mg-footer-brand {
		flex: 1 1 100% !important;
	}

	.mg-site-footer .mg-footer-brand > * {
		max-width: 560px;
	}

	.mg-site-footer .mg-footer-columns > :not(.mg-footer-brand) {
		flex: 1 1 160px;
	}
}

/* Ghost signup-form embed in the newsletter band (MG-4). */
.mg-newsletter-embed {
	min-width: 360px;
}

@media (max-width: 781px) {
	.mg-newsletter-embed {
		min-width: 0;
	}
}

.mg-newsletter-fallback {
	margin: 8px 0 0;
	font-size: 0.875rem;
	color: var(--wp--preset--color--deep-purple);
}

.mg-newsletter-fallback a {
	color: inherit;
	text-decoration: underline;
}

/* Presented by lockup, in the footer of every page. Deliberately quiet: a small,
 * dimmed logo card (the sponsor block carries the full-size Red Horse logo). */
.mg-footer-presented {
	--mg-logo-card-height: 56px;
	--mg-logo-height: 36px;
}

.mg-footer-presented .wp-block-image.is-style-logo-card {
	flex: 0 0 auto;
	min-width: 112px;
	opacity: 0.55;
	filter: grayscale(0.4);
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.mg-footer-presented .wp-block-image.is-style-logo-card:hover,
.mg-footer-presented .wp-block-image.is-style-logo-card:focus-within {
	opacity: 1;
	filter: none;
}

.mg-footer-presented .is-style-eyebrow {
	margin: 0;
}

.mg-site-footer .mg-footer-presented a:focus-visible {
	outline-color: var(--mg-gold);
}

/* Red Horse links in the footer keep the text colour around them. */
.mg-footer-brand a,
.mg-footer-presented .is-style-eyebrow a {
	color: inherit;
}

.mg-footer-presented .is-style-eyebrow a {
	text-decoration: none;
}

/* Red Horse links in running copy keep their colour. */
.mg-why-sponsor a,
.mg-mission p a,
.mg-step a,
.mg-sponsor-levels p a,
.mg-presented-by a,
.mg-about-org a:not(.wp-element-button) {
	color: inherit;
}

@media (max-width: 600px) {
	.mg-footer-presented {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* About page, bottom: the three white sections (Presented by, intro, Who we support)
 * share one even top and bottom padding so the text sits evenly between them. */
.mg-main-about .mg-presented-by,
.mg-main-about .mg-about-org {
	padding-top: clamp(40px, 33px + 1.8vw, 64px) !important;
	padding-bottom: clamp(40px, 33px + 1.8vw, 64px) !important;
}

/* MG-19: the fundraiser sentence sits in a harlequin band; its link stays gold on the purple. */
.mg-about-intro p a {
	color: var(--wp--preset--color--gold);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.mg-about-intro p a:hover,
.mg-about-intro p a:focus-visible {
	color: var(--wp--preset--color--white);
}

/* Lobster sets wide: balance heading lines so a lone word never hangs on its own line. */
:is(h1, h2, h3, h4, .wp-block-heading, .wp-block-post-title, .mg-hero-title) {
	text-wrap: balance;
}
