/*
Theme Name: ASEF
Description: Alaska Science & Engineering Fair. Child of Twenty Twenty-Five with one self-hosted font and no page builder.
Template: twentytwentyfive
Author: Finite Technologies
Version: 1.9.6
Requires at least: 6.7
Text Domain: asef
*/

:root {
	--asef-gutter: max(1.25rem, calc((100% - 1200px) / 2));
	--asef-pink: #e0186c;
	--asef-violet: #7a3cff;
	--asef-teal: #00b8a9;
	--asef-orange: #ff8a00;
	--asef-sky: #1ea7ff;
	--asef-sun: #ffd60a;
	--asef-rainbow: linear-gradient(90deg, #ffd60a, #ff8a00, #ff3d81, #7a3cff, #1ea7ff, #00b8a9);
	--asef-shadow: 0 2px 4px rgb(43 26 107 / 6%), 0 12px 28px rgb(43 26 107 / 8%);
}

/* Colorful science art behind every page, kept clear of the reading column. */
html { background: #fff; }
body { background: transparent !important; position: relative; }
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: url("assets/science-page.svg?v=13") center top / max(1600px, 100%) auto no-repeat;
	opacity: 0.55;
	-webkit-mask-image: linear-gradient(90deg, #000 0, #000 17%, transparent 27%, transparent 73%, #000 83%, #000 100%);
	mask-image: linear-gradient(90deg, #000 0, #000 17%, transparent 27%, transparent 73%, #000 83%, #000 100%);
}

/* Header */
.asef-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	padding: 0.5rem var(--asef-gutter) 0.6rem;
	gap: 1.25rem;
}
.asef-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: var(--asef-rainbow);
}
.admin-bar .asef-header { top: 32px; }
.asef-brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-shrink: 0;
	color: var(--wp--preset--color--navy);
	font-weight: 800;
	font-size: 1rem;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-decoration: none;
}
.asef-brand img { display: block; width: 48px; height: 48px; }
.asef-brand:hover { color: var(--asef-pink); }
.asef-header .wp-block-navigation { flex: 1; justify-content: flex-end; }
.asef-header .wp-block-navigation__container { gap: 1rem; }
.asef-header .wp-block-navigation-item__content { text-decoration: none; }
.asef-header .wp-block-navigation-item__content:hover { color: var(--asef-pink); }
.asef-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: #fff !important;
	color: var(--wp--preset--color--ink) !important;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	box-shadow: var(--asef-shadow);
	min-width: 240px;
	padding: 0.4rem 0;
}
.asef-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.asef-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0;
	box-shadow: none;
}
.asef-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1rem; }
.asef-header__cta .wp-block-button__link { padding: 0.5rem 1rem; font-size: var(--wp--preset--font-size--small); white-space: nowrap; }
@media (max-width: 1240px) {
	.asef-header .asef-header__cta { display: none; }
}

/* Footer */
.asef-footer {
	position: relative;
	background: #fff9d9;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	margin-top: 0;
}
.asef-footer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: var(--asef-rainbow);
}
.asef-footer h2 { font-size: var(--wp--preset--font-size--medium); }
.asef-footer ul { list-style: none; padding: 0; }

/* Pages */
.asef-main { padding: 2.25rem 1.25rem 4rem; }
.asef-main .wp-block-post-title { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1.25rem; }
.asef-main li { margin-bottom: 0.35rem; }
.asef-main img { max-width: 100%; height: auto; border-radius: 10px; }
.wp-block-table { overflow-x: auto; }
.asef-callout {
	background: #fff9d9;
	border: 0;
	border-left: 6px solid var(--asef-sun);
	border-radius: 0 14px 14px 0;
	padding: 1.25rem 1.5rem;
}
.asef-callout > :first-child { margin-top: 0; }
.asef-callout > :last-child { margin-bottom: 0; }

/* Home: hero */
.asef-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient(110deg, #fff27a 0%, #ffe9b8 34%, #d3f8f3 68%, #ffd6ea 100%);
	color: var(--wp--preset--color--ink);
	padding: clamp(2rem, 4vw, 3.25rem) 1.25rem clamp(2.25rem, 4.5vw, 3.5rem);
}
.asef-hero::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background: url("assets/science-hero.svg?v=13") right 2% center / auto 108% no-repeat;
	opacity: 0.95;
	-webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 56%);
	mask-image: linear-gradient(90deg, transparent 38%, #000 56%);
}
.asef-hero h1 {
	color: var(--wp--preset--color--navy);
	font-size: clamp(2.2rem, 4.6vw, 3.5rem);
	margin: 0.4rem 0 0;
	padding-right: max(0px, calc(100% - 600px));
	text-wrap: balance;
}
.asef-hero p:not(.asef-eyebrow) {
	margin-top: 0.9rem;
	font-size: var(--wp--preset--font-size--large);
	padding-right: max(0px, calc(100% - 540px));
}
.asef-hero .wp-block-buttons { margin-top: 1.4rem; }
.asef-eyebrow {
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #c1125c;
	margin: 0;
}
.asef-outline .wp-block-button__link {
	background: #fff;
	border: 2px solid #5a22d6;
	color: #5a22d6;
}
.asef-outline .wp-block-button__link:hover { background: #5a22d6; color: #fff; }

/* Home: sections keep one left edge at every width */
.asef-hero > *, .asef-section > * {
	box-sizing: border-box;
	width: 100%;
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
.asef-section { padding: clamp(2.25rem, 5vw, 3.75rem) 1.25rem; }
.asef-section--paper { background: rgb(232 252 249 / 90%); }
.asef-section--paper + .asef-section + .asef-section--paper { background: rgb(243 237 255 / 90%); }
.asef-lede { box-sizing: border-box; color: var(--wp--preset--color--muted); padding-right: max(0px, calc(100% - 620px)); }
.asef-cards { gap: 1.25rem; }
.asef-card {
	background: #fff;
	border: 0;
	border-radius: 18px;
	box-shadow: var(--asef-shadow);
	padding: 1.5rem;
}
.asef-card h3 { font-size: var(--wp--preset--font-size--large); margin-top: 0; }
.asef-card > :last-child { margin-bottom: 0; }
.asef-news .wp-block-post-title { font-size: var(--wp--preset--font-size--large); margin: 0.25rem 0 0; }
.asef-news .wp-block-post-title a { text-decoration: none; }
.asef-news .wp-block-post-title a:hover { text-decoration: underline; }
.asef-news li { border-top: 3px solid var(--asef-sun); padding-top: 1rem; }

/* Sponsors: each tier has its own color */
.asef-tiers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.25rem;
	margin-top: 1.75rem;
}
.asef-tier {
	--tier: var(--asef-violet);
	--tier-tint: #f3edff;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 2px solid var(--tier);
	border-radius: 18px;
	box-shadow: var(--asef-shadow);
	padding: 1.25rem 1.5rem;
}
.asef-tier--title { grid-column: 1 / -1; --tier: #ff3d81; --tier-tint: #ffe6f0; }
.asef-tier--venue { --tier: #00b8a9; --tier-tint: #dffaf7; }
.asef-tier--presenting { --tier: #7a3cff; --tier-tint: #f0e9ff; }
.asef-tier--platinum { --tier: #1ea7ff; --tier-tint: #e2f4ff; }
.asef-tier--gold { --tier: #f2b600; --tier-tint: #fff7cf; }
.asef-tier--silver { --tier: #00b8a9; --tier-tint: #dffaf7; }
.asef-tier--friends { --tier: #ff8a00; --tier-tint: #fff0dd; }
.asef-tier--inkind { --tier: #ff3d81; --tier-tint: #ffe6f0; }
.asef-tier.is-open { background: var(--tier-tint); border-style: dashed; box-shadow: none; }
.asef-tier__name { margin: 0; font-size: var(--wp--preset--font-size--large); }
.asef-tier__amount { margin: 0.2rem 0 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.asef-tier__list { list-style: none; margin: 0.9rem 0 0; padding: 0; font-weight: 700; }
.asef-tier__list img { max-height: 70px; width: auto; }
.asef-tier__cta { margin: auto 0 0; padding-top: 1rem; font-size: var(--wp--preset--font-size--small); font-weight: 800; }
.asef-tier__cta a { text-decoration: none; }
.asef-tier__cta a:hover { text-decoration: underline; }
.asef-note { color: var(--wp--preset--color--muted); font-weight: 400; font-size: 0.9em; }

.asef-past { margin-top: 1.25rem; }
.asef-past__year { border-top: 2px solid var(--wp--preset--color--line); padding: 0.85rem 0; }
.asef-past__year:last-child { border-bottom: 2px solid var(--wp--preset--color--line); }
.asef-past__year summary { cursor: pointer; font-weight: 800; color: var(--wp--preset--color--navy); }
.asef-past__tier { margin-top: 0.85rem; }
.asef-past__tier h4 { margin: 0; font-size: var(--wp--preset--font-size--small); font-weight: 800; color: #c1125c; }
.asef-past__tier p { margin: 0.15rem 0 0; font-size: var(--wp--preset--font-size--small); }

/* Forms */
.wpcf7 label { display: block; font-weight: 700; margin-bottom: 1rem; }
.wpcf7 input, .wpcf7 select, .wpcf7 textarea { box-sizing: border-box; max-width: 100%; background: #fff; }
.wpcf7 input:not([type=submit]):not([type=checkbox]), .wpcf7 select, .wpcf7 textarea {
	display: block;
	width: 100%;
	margin-top: 0.3rem;
	padding: 0.65rem 0.8rem;
	border: 2px solid #cdbff5;
	border-radius: 10px;
	font: inherit;
	font-weight: 400;
}
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: 3px solid var(--asef-sun); outline-offset: 1px; }
.wpcf7 input[type=submit] {
	background: var(--asef-pink);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.8rem 1.6rem;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}
.wpcf7 input[type=submit]:hover { background: #b80f56; }
.wpcf7 .wpcf7-quiz-label { display: inline; font-weight: 700; margin-left: 0.25rem; }

/* Small screens: art steps back so text stays readable */
@media (max-width: 800px) {
	.asef-hero::before { opacity: 0.28; background-position: right -60px center; -webkit-mask-image: none; mask-image: none; }
	body::before { opacity: 0.16; -webkit-mask-image: none; mask-image: none; }
}

/* Highlighted sponsor band on the home page */
.asef-highlight { background: linear-gradient(100deg, #ffe0ee 0%, #efe6ff 50%, #d9f8f4 100%); }
.asef-highlight h2 { margin-top: 0; }
.asef-highlight__names { font-weight: 700; color: var(--wp--preset--color--navy); }

/* Home content is full width, so the page art stays faint there */
body.home::before { opacity: 0.14; }

/* ======== Award winners ======== */
.asef-search { margin: 1.25rem 0; }
.asef-search label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.asef-search input {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0.65rem 0.9rem;
	border: 2px solid #cdbff5;
	border-radius: 12px;
	font: inherit;
	background: #fff;
}
.asef-search input:focus { outline: 3px solid var(--asef-sun); outline-offset: 1px; }
.asef-award { background: #fff; border: 2px solid var(--wp--preset--color--line); border-radius: 16px; padding: 1rem 1.25rem; margin: 0.9rem 0; }
.asef-award h3 { font-size: var(--wp--preset--font-size--large); margin: 0 0 0.5rem; }
.asef-award ul { list-style: none; margin: 0; padding: 0; }
.asef-award li { padding: 0.5rem 0; border-top: 1px solid var(--wp--preset--color--line); margin: 0 !important; }
.asef-award li:first-child { border-top: 0; }
.asef-pid { color: var(--wp--preset--color--muted); font-size: 0.875rem; margin-left: 0.35rem; white-space: nowrap; }
.asef-atype { display: block; color: var(--wp--preset--color--muted); font-size: 0.9375rem; }
.asef-winners > h2 { margin-top: 2rem; }

/* ======== Hamburger up to tablet size: the full menu needs a laptop's width ======== */
.asef-sub-toggle { display: none; }
@media (max-width: 1023px) {
	.asef-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
	.asef-header .wp-block-navigation__responsive-container-open { display: flex !important; }
	.asef-header .wp-block-navigation__responsive-container-close { display: flex !important; }
}

/* Comfortable tap sizes for the open and close buttons */
.asef-header .wp-block-navigation__responsive-container-open,
.asef-header .wp-block-navigation__responsive-container-close {
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
}
.asef-header .wp-block-navigation__responsive-container-open svg,
.asef-header .wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; }

/* ======== Open menu: left-aligned sections that expand on tap ======== */
.asef-nav-cta { display: none !important; }
.is-menu-open .wp-block-navigation__responsive-container-content,
.is-menu-open .wp-block-navigation__container { align-items: stretch !important; width: 100%; padding-top: 0.25rem !important; }
.asef-header .wp-block-navigation__responsive-container.is-menu-open { padding: 0.75rem 1.25rem 2rem !important; overflow-y: auto; }
.is-menu-open .wp-block-navigation__container { gap: 0 !important; }
.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	position: relative;
	display: block !important;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
}
.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	display: flex !important;
	align-items: center;
	min-height: 56px;
	padding: 0 3.25rem 0 0 !important;
	font-size: 1.25rem;
	font-weight: 700;
	outline-offset: -2px;
}
.is-menu-open .wp-block-navigation__submenu-icon { display: none !important; }
.is-menu-open .asef-sub-toggle {
	position: absolute;
	top: 4px;
	right: -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: transparent;
	border: 0;
	border-radius: 12px;
	color: var(--asef-pink);
	cursor: pointer;
}
.is-menu-open .asef-sub-toggle::before {
	content: "";
	width: 10px;
	height: 10px;
	border-right: 3px solid currentcolor;
	border-bottom: 3px solid currentcolor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s;
}
.is-menu-open .asef-open > .asef-sub-toggle::before { transform: translateY(2px) rotate(-135deg); }
.is-menu-open .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container { display: none !important; }
.is-menu-open .wp-block-navigation-item.asef-open > .wp-block-navigation__submenu-container {
	display: block !important;
	position: static !important;
	width: 100% !important;
	min-width: 0;
	height: auto !important;
	padding: 0 0 0.75rem !important;
	opacity: 1 !important;
	visibility: visible !important;
	background: transparent !important;
}
.is-menu-open .asef-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: flex !important;
	align-items: center;
	min-height: 44px;
	padding: 0 0 0 0.75rem !important;
	font-size: 1.0625rem;
	font-weight: 500;
}
.is-menu-open .asef-nav-cta {
	display: block !important;
	border-bottom: 0 !important;
	margin-top: 0.75rem;
}
.is-menu-open .asef-nav-cta > .wp-block-navigation-item__content {
	justify-content: center;
	min-height: 52px !important;
	padding: 0 1rem !important;
	border-radius: 999px;
	background: var(--asef-pink);
	color: #fff !important;
	font-size: 1.0625rem !important;
}
.is-menu-open .asef-nav-cta--alt > .wp-block-navigation-item__content { background: #5a22d6; }

/* ======== Phones ======== */
@media (max-width: 800px) {
	.asef-header { padding: 0.35rem 1rem 0.55rem; }
	.asef-brand { font-size: 0.9375rem; gap: 0.5rem; }
	.asef-brand img { width: 40px; height: 40px; }

	/* Hero art gets its own strip under the text instead of running behind it */
	.asef-hero { padding: 1.5rem 1.25rem calc(50vw + 0.75rem); }
	.asef-hero::before {
		opacity: 0.95;
		background-position: center bottom 0.5rem;
		background-size: 100% auto;
		-webkit-mask-image: none;
		mask-image: none;
	}
	.asef-hero h1 { font-size: 2.25rem; }
	.asef-hero p:not(.asef-eyebrow) { font-size: 1.0625rem; }
	.asef-hero .wp-block-buttons { flex-direction: column; align-items: stretch; gap: 0.6rem; }
	.asef-hero .wp-block-button { width: 100%; }
	.asef-hero .wp-block-button__link { display: block; width: 100%; box-sizing: border-box; text-align: center; padding-top: 0.85rem; padding-bottom: 0.85rem; }
	/* Students are the main audience on phones, so registering comes first */
	.asef-hero .asef-outline { order: -1; }
	.asef-hero .asef-outline .wp-block-button__link { background: #5a22d6; border-color: #5a22d6; color: #fff; }

	/* Shorter home page: tiers sit two across */
	.asef-section { padding: 2rem 1rem; }
	.asef-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin-top: 1rem; }
	.asef-tier { position: relative; padding: 0.85rem 0.9rem; border-radius: 14px; overflow-wrap: anywhere; }
	.asef-tier__name { font-size: 1rem; }
	.asef-tier__amount { font-size: 0.875rem; }
	.asef-tier__list { margin-top: 0.5rem; font-size: 0.9375rem; }
	.asef-tier__list li { padding: 0.15rem 0; }
	.asef-tier__cta { padding-top: 0.6rem; }
	.asef-cta-long { display: none; }
	/* The whole open card is the button */
	.asef-tier.is-open .asef-tier__cta a::after { content: ""; position: absolute; inset: 0; }

	.asef-past__year summary { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; list-style-position: inside; }
	.asef-past__year { padding: 0.15rem 0; }
	.asef-card { padding: 1.15rem; }
	.asef-main { padding: 1.5rem 1.25rem 3rem; }
	.asef-footer li { padding: 0.35rem 0; margin: 0; }
	.asef-footer a { display: inline-block; }
	.asef-news .wp-block-post-title a { display: block; padding: 0.15rem 0; }
	.wp-block-table table { font-size: 0.9375rem; }
	body::before { opacity: 0.12; }
	body.home::before { opacity: 0.08; }
}

/* Older, narrow phones */
@media (max-width: 340px) {
	.asef-tiers { grid-template-columns: minmax(0, 1fr); }
}

/* Open menu: everything reads from the left, buttons centered */
.is-menu-open .asef-open .wp-block-navigation__submenu-container,
.is-menu-open .asef-open .wp-block-navigation__submenu-container .wp-block-navigation-item { align-items: flex-start !important; text-align: left !important; width: 100%; }
.is-menu-open .asef-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { justify-content: flex-start !important; width: 100%; text-align: left !important; }
.is-menu-open .asef-nav-cta > .wp-block-navigation-item__content { width: 100%; box-sizing: border-box; text-align: center; }
.is-menu-open .asef-nav-cta .wp-block-navigation-item__label { width: 100%; text-align: center; }

.asef-past__year > summary::marker { color: var(--asef-pink); }
@media (max-width: 800px) {
	.asef-tier__cta span[aria-hidden] { display: none; }
	.asef-past__year > summary { display: list-item; line-height: 44px; list-style-position: inside; }
}
.is-menu-open .wp-block-navigation__container > .asef-nav-cta > .wp-block-navigation-item__content { padding: 0 1rem !important; justify-content: center; }

/* Collapsible sponsor pane */
.asef-pane { background: #fff; border: 2px solid #cdbff5; border-radius: 18px; box-shadow: var(--asef-shadow); margin: 0; }
.asef-pane > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 60px;
	padding: 0.75rem 1.25rem;
	border-radius: 16px;
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	line-height: 1.2;
	cursor: pointer;
	list-style: none;
}
.asef-pane > summary::-webkit-details-marker { display: none; }
.asef-pane > summary::after {
	content: "";
	flex-shrink: 0;
	width: 12px;
	height: 12px;
	margin-right: 0.35rem;
	border-right: 3px solid var(--asef-pink);
	border-bottom: 3px solid var(--asef-pink);
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.15s;
}
.asef-pane[open] > summary::after { transform: translateY(3px) rotate(-135deg); }
.asef-pane > summary:focus-visible { outline: 3px solid var(--asef-sun); outline-offset: 2px; }
.asef-pane > :not(summary) { margin-left: 1.25rem; margin-right: 1.25rem; }
.asef-pane > :last-child { margin-bottom: 1.25rem; }
.asef-pane .asef-tiers { margin-top: 0.5rem; }
@media (max-width: 800px) {
	.asef-pane > summary { font-size: 1.1875rem; padding: 0.6rem 1rem; }
	.asef-pane > :not(summary) { margin-left: 0.75rem; margin-right: 0.75rem; }
}

/* Year rows */
.asef-years { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.asef-years .asef-pane > summary { font-size: var(--wp--preset--font-size--x-large); min-height: 56px; }
.asef-years .asef-pane .asef-tiers { margin-bottom: 1.25rem; }
.asef-years .asef-tier { box-shadow: none; }
@media (max-width: 800px) {
	.asef-years .asef-pane > summary { font-size: 1.125rem; min-height: 52px; }
	.asef-years .asef-pane .asef-tiers { margin-bottom: 0.75rem; }
}

/* Donate is always one tap away */
.asef-header .asef-header__cta { display: flex !important; flex-wrap: nowrap; gap: 0.5rem; flex-shrink: 0; }
.asef-donate .wp-block-button__link { background: var(--asef-sun); color: var(--wp--preset--color--navy); font-weight: 800; }
.asef-donate .wp-block-button__link:hover { background: #ffe34d; color: var(--wp--preset--color--navy); }
@media (max-width: 1360px) {
	.asef-header .asef-register { display: none; }
}
@media (max-width: 800px) {
	.asef-header { gap: 0.5rem; }
	.asef-header .wp-block-navigation { flex: 0 0 auto; }
	.asef-brand { flex: 1 1 auto; min-width: 0; flex-shrink: 1; }
	.asef-header__cta { margin-left: auto; }
	.asef-header__cta .wp-block-button__link { padding: 0.5rem 0.9rem; min-height: 40px; box-sizing: border-box; display: flex; align-items: center; }
}
@media (max-width: 374px) {
	.asef-brand span { font-size: 0.8125rem; }
	.asef-brand img { width: 34px; height: 34px; }
}

/* Donate page */
.asef-give { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.asef-give > * { margin: 0 !important; }
.asef-give .asef-way { background: #fff; border: 2px solid var(--wp--preset--color--line); border-radius: 18px; padding: 1.25rem 1.4rem; }
.asef-way h3 { font-size: var(--wp--preset--font-size--large); margin: 0 0 0.4rem; }
.asef-way p { margin: 0 0 0.9rem; }
.asef-way p:last-child { margin-bottom: 0; }
.asef-way--main { border-color: var(--asef-sun) !important; background: #fffbe0 !important; grid-column: 1 / -1; }
.asef-way .wp-block-button__link, .asef-way-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; box-sizing: border-box; padding: 0.6rem 1.5rem; border-radius: 999px; background: var(--asef-pink); color: #fff; font-weight: 800; text-decoration: none; }
.asef-way-btn:hover { background: #b80f56; color: #fff; }
.asef-way-btn--paypal { background: var(--asef-sun); color: var(--wp--preset--color--navy); }
.asef-way-btn--paypal:hover { background: #ffe34d; color: var(--wp--preset--color--navy); }
.asef-way-btn--venmo { background: #5a22d6; }
.asef-way-btn--venmo:hover { background: #4316a8; }
@media (max-width: 800px) {
	.asef-way-btn { display: flex; width: 100%; }
}
.is-menu-open .asef-nav-cta--donate > .wp-block-navigation-item__content { background: var(--asef-sun); color: var(--wp--preset--color--navy) !important; }

/* Header fit: both buttons only where they fit on one line; the menu button stays far right */
.asef-header { padding-left: max(1.25rem, calc((100% - 1360px) / 2)); padding-right: max(1.25rem, calc((100% - 1360px) / 2)); }
.asef-header .wp-block-navigation__container { flex-wrap: nowrap; }
.asef-header .wp-block-navigation-item__content { white-space: nowrap; }
@media (max-width: 1420px) {
	.asef-header .asef-register { display: none; }
}
@media (max-width: 1023px) {
	.asef-header { padding-left: 1rem; padding-right: 0.5rem; }
	.asef-brand { margin-right: auto; }
	.asef-header .asef-header__cta { order: 1; margin-left: 0; }
	.asef-header .wp-block-navigation { order: 2; flex: 0 0 auto; }
}

/* Hamburger until the full menu truly fits */
@media (max-width: 1099px) {
	.asef-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
	.asef-header .wp-block-navigation__responsive-container-open { display: flex !important; }
	.asef-header .wp-block-navigation__responsive-container-close { display: flex !important; }
	.asef-header { padding-left: 1rem; padding-right: 0.5rem; }
	.asef-brand { margin-right: auto; }
	.asef-header .asef-header__cta { order: 1; margin-left: 0; }
	.asef-header .wp-block-navigation { order: 2; flex: 0 0 44px; width: 44px; }
}

/* ======== Fair-first home page ======== */
[id] { scroll-margin-top: 84px; }
.asef-hero .asef-outline { order: 0 !important; }
.asef-hero .asef-outline .wp-block-button__link { background: #fff !important; border: 2px solid #5a22d6 !important; color: #5a22d6 !important; }
.asef-hero .asef-outline .wp-block-button__link:hover { background: #5a22d6 !important; color: #fff !important; }

/* Pick-your-path cards */
.asef-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.asef-path {
	display: block;
	padding: 1.25rem 1.4rem;
	border-radius: 18px;
	color: var(--wp--preset--color--navy) !important;
	text-decoration: none;
	box-shadow: var(--asef-shadow);
	transition: transform 0.12s;
}
.asef-path:hover { transform: translateY(-2px); }
.asef-path strong { display: block; font-size: var(--wp--preset--font-size--x-large); font-weight: 800; line-height: 1.2; }
.asef-path span { display: block; margin-top: 0.3rem; font-size: 1rem; }
.asef-path--student { background: #fff27a; }
.asef-path--judge { background: #c9f5ef; }
.asef-path--mentor { background: #ffd6ea; }

/* Reasons */
.asef-reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.asef-reasons li { margin: 0 !important; padding: 1.15rem 1.25rem; background: #fff; border-radius: 16px; box-shadow: var(--asef-shadow); border-top: 5px solid var(--c, #7a3cff); }
.asef-reasons strong { display: block; font-size: var(--wp--preset--font-size--large); line-height: 1.25; color: var(--wp--preset--color--navy); margin-bottom: 0.25rem; }
.asef-reasons li:nth-child(4n+1) { --c: #ff3d81; }
.asef-reasons li:nth-child(4n+2) { --c: #ff8a00; }
.asef-reasons li:nth-child(4n+3) { --c: #00b8a9; }
.asef-reasons li:nth-child(4n+4) { --c: #7a3cff; }

/* Numbered steps */
.asef-steps { counter-reset: step; margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.85rem; }
.asef-steps li { counter-increment: step; position: relative; margin: 0 !important; padding: 0.15rem 0 0.15rem 3.5rem; min-height: 2.75rem; }
.asef-steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--asef-pink);
	color: #fff;
	font-weight: 800;
}
.asef-steps strong { color: var(--wp--preset--color--navy); }
.asef-note-box { margin-top: 1.25rem; padding: 0.9rem 1.15rem; background: #fff9d9; border-left: 5px solid var(--asef-sun); border-radius: 0 12px 12px 0; }

.asef-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.asef-duo > section { background: #fff; border-radius: 18px; padding: 1.5rem; box-shadow: var(--asef-shadow); scroll-margin-top: 84px; }
.asef-duo h2 { margin-top: 0; }
.asef-duo ul { padding-left: 1.2rem; margin: 0.75rem 0 1rem; }
.asef-duo li { margin-bottom: 0.35rem; }
.asef-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.75rem; }

.asef-fund-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.asef-subhead { margin-top: 2.25rem !important; }

@media (max-width: 800px) {
	.asef-paths { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
	.asef-path { padding: 0.9rem 1.1rem; }
	.asef-path strong { font-size: 1.1875rem; }
	.asef-path span { font-size: 0.9375rem; }
	.asef-reasons { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; margin-top: 0.9rem; }
	.asef-reasons li { padding: 0.9rem 1.1rem; }
	.asef-duo { grid-template-columns: minmax(0, 1fr); }
	.asef-duo > section { padding: 1.15rem; }
	.asef-actions .asef-way-btn, .asef-fund-actions .asef-way-btn { flex: 1 1 100%; }
}

@media (max-width: 1099px) {
	.asef-brand { margin-right: 0; }
	.asef-header .asef-header__cta { margin-left: auto; }
}

/* ======== Road to ISEF ======== */
.asef-road-section { background: linear-gradient(115deg, #7a3cff 0%, #c32fb5 55%, #ff3d81 100%); color: #fff; }
.asef-road-section h2, .asef-road-section a:not(.asef-way-btn) { color: #fff; }
.asef-road-section .asef-lede { color: #fff; }
.asef-eyebrow--light { color: var(--asef-sun); font-size: var(--wp--preset--font-size--small); font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; margin: 0 0 0.3rem; }

.asef-road { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: none; }
.asef-road li { position: relative; margin: 0 !important; padding: 1rem 1.15rem; border-radius: 16px; background: rgb(255 255 255 / 16%); }
.asef-road strong { display: block; font-size: var(--wp--preset--font-size--large); line-height: 1.25; margin-bottom: 0.2rem; }
.asef-road li:last-child { background: var(--asef-sun); color: var(--wp--preset--color--navy); }

.asef-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin: 0.9rem 0 0; }
.asef-stat { padding: 1rem 1.15rem; background: #fff; border-radius: 16px; color: var(--wp--preset--color--ink); }
.asef-stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1; color: #5a22d6; }
.asef-stat span { display: block; margin-top: 0.25rem; font-size: 0.9375rem; line-height: 1.35; }
.asef-road-section .asef-actions { margin-top: 1.25rem; }
.asef-road-section .asef-source { margin-top: 0.75rem; font-size: 0.875rem; opacity: 0.95; }

/* The full page */
.asef-stats--page { margin: 1.25rem 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asef-stats--page .asef-stat { background: #f3edff; }

@media (max-width: 800px) {
	.asef-road { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; margin-top: 1rem; }
	.asef-road li { padding: 0.8rem 1rem; }
	.asef-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
	.asef-stat { padding: 0.8rem 0.9rem; }
	.asef-stat span { font-size: 0.875rem; }
}

/* ======== Grades 6-12 first ======== */
.asef-paths--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asef-paths--four .asef-path--middle { background: #fff27a; }
.asef-paths--four .asef-path--high { background: #ffc98a; }
.asef-paths-note { margin: 0.9rem 0 0; font-size: 1rem; }
.asef-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-top: 1.5rem; }
.asef-stage { display: flex; flex-direction: column; background: #fff; color: var(--wp--preset--color--ink); border-radius: 20px; padding: 1.5rem; box-shadow: 0 16px 36px rgb(43 26 107 / 25%); scroll-margin-top: 84px; }
.asef-stage .asef-grade { align-self: flex-start; padding: 0.25rem 0.8rem; border-radius: 999px; background: var(--asef-sun); color: var(--wp--preset--color--navy); font-size: 0.875rem; font-weight: 800; }
.asef-road-section .asef-stage h3 { margin: 0.7rem 0 0.4rem; color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--x-large); }
.asef-stage p { margin: 0 0 0.9rem; }
.asef-stage .asef-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 1rem; }
.asef-stage .asef-stat { background: #f3edff; }
.asef-stage .asef-stat b { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.asef-road-section .asef-stage a:not(.asef-way-btn) { color: #5a22d6; }
.asef-stage .asef-actions { margin-top: auto; padding-top: 0.25rem; }
.asef-stage .asef-way-btn--paypal { width: 100%; }
@media (max-width: 1000px) {
	.asef-paths--four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
	.asef-stages { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
	.asef-paths--four .asef-path { padding: 0.8rem 0.9rem; }
	.asef-paths--four .asef-path strong { font-size: 1.0625rem; }
	.asef-paths--four .asef-path span { font-size: 0.875rem; }
	.asef-stage { padding: 1.15rem; }
	.asef-stages { margin-top: 1rem; }
}

/* ======== Sponsor thank-you strip, directly under the hero ======== */
.asef-strip { background: #fff; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.asef-strip > * { box-sizing: border-box; width: 100%; max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; }
.asef-strip__wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; align-items: center; }
.asef-strip__lead { margin: 0; font-weight: 800; color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--large); line-height: 1.25; }
.asef-strip__names { margin: 0.2rem 0 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.5; }
.asef-strip__names a { color: inherit; text-decoration: none; }
.asef-strip__names a:hover { text-decoration: underline; }
.asef-strip__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.asef-strip__actions .asef-way-btn { min-height: 44px; padding: 0.45rem 1.1rem; font-size: 0.9375rem; white-space: nowrap; }
.asef-way-btn--line { background: #fff; border: 2px solid #5a22d6; color: #5a22d6; }
.asef-way-btn--line:hover { background: #5a22d6; color: #fff; }
@media (max-width: 900px) {
	.asef-strip__wrap { grid-template-columns: minmax(0, 1fr); }
	.asef-strip__actions { justify-content: flex-start; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
	.asef-strip__actions .asef-way-btn { display: flex; width: 100%; padding: 0.4rem 0.3rem; font-size: 0.875rem; white-space: normal; text-align: center; line-height: 1.15; }
}
@media (max-width: 800px) {
	/* Smaller art strip so sponsors and the entry cards come up sooner */
	.asef-hero { padding-bottom: calc(33vw + 0.5rem); }
	.asef-hero::before { background-size: auto 31vw; background-position: center bottom 0.4rem; }
	.asef-strip { padding: 0.9rem 1rem; }
}

/* "Register" is short enough to sit beside Donate on laptops */
@media (max-width: 1420px) {
	.asef-header .asef-register { display: block; }
}
@media (max-width: 1239px) {
	.asef-header .asef-register { display: none; }
}

/* Wide screens: percentages here resolve against the full-width parent, so cap them */
.asef-hero h1 { padding-right: max(0px, min(calc(100% - 640px), 560px)); }
.asef-hero p:not(.asef-eyebrow) { padding-right: max(0px, min(calc(100% - 600px), 600px)); }
.asef-lede { padding-right: max(0px, min(calc(100% - 660px), 540px)); }
.asef-hero::before { background-size: auto min(108%, 560px); }
@media (max-width: 800px) {
	.asef-hero::before { background-size: auto 31vw; }
}

/* Five ways in: every age, then the adults */
.asef-paths--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.asef-path--elementary { background: #c8ecff; }
.asef-paths--five .asef-path--middle { background: #fff27a; }
.asef-paths--five .asef-path--high { background: #ffc98a; }
@media (max-width: 1100px) {
	.asef-paths--five { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.6rem; }
	.asef-paths--five .asef-path { grid-column: span 2; padding: 0.85rem 1rem; }
	.asef-paths--five .asef-path--judge, .asef-paths--five .asef-path--mentor { grid-column: span 3; }
}
@media (max-width: 800px) {
	.asef-paths--five .asef-path { grid-column: span 6; }
	.asef-paths--five .asef-path--judge, .asef-paths--five .asef-path--mentor { grid-column: span 3; }
	.asef-paths--five .asef-path strong { font-size: 1.0625rem; }
	.asef-paths--five .asef-path span { font-size: 0.875rem; }
}

/* Three stages: one ladder */
.asef-stages--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) {
	.asef-stages--three { grid-template-columns: minmax(0, 1fr); }
}
.asef-stage--start .asef-grade { background: #c8ecff; }
.asef-checks { list-style: none; margin: 0 0 1rem; padding: 0; }
.asef-checks li { position: relative; margin: 0 !important; padding: 0.35rem 0 0.35rem 1.6rem; }
.asef-checks li::before { content: ""; position: absolute; left: 0.2rem; top: 0.72rem; width: 0.55rem; height: 0.3rem; border-left: 3px solid var(--asef-teal); border-bottom: 3px solid var(--asef-teal); transform: rotate(-45deg); }

/* Keep the hero art clear of the text on wide screens */
@media (min-width: 1400px) {
	.asef-hero::before {
		-webkit-mask-image: linear-gradient(90deg, transparent 51%, #000 60%);
		mask-image: linear-gradient(90deg, transparent 51%, #000 60%);
	}
}

/* Hero art always starts where the text column ends, at any desktop width */
@media (min-width: 801px) {
	.asef-hero::before {
		--asef-text-end: calc(max(1.25rem, (100% - 1200px) / 2) + 620px);
		-webkit-mask-image: linear-gradient(90deg, transparent var(--asef-text-end), #000 calc(var(--asef-text-end) + 90px));
		mask-image: linear-gradient(90deg, transparent var(--asef-text-end), #000 calc(var(--asef-text-end) + 90px));
	}
}

/* Big numbers always fit their boxes */
.asef-stage .asef-stat { padding: 0.85rem 0.9rem; min-width: 0; }
.asef-stage .asef-stat b { font-size: clamp(1.2rem, 1.75vw, 1.6rem); overflow-wrap: anywhere; }
@media (max-width: 1000px) {
	.asef-stage .asef-stat b { font-size: 1.5rem; }
}

/* When each role happens */
.asef-when { display: inline-block; margin: 0 0 0.5rem; padding: 0.2rem 0.75rem; border-radius: 999px; background: #c9f5ef; color: var(--wp--preset--color--navy); font-size: 0.875rem; font-weight: 800; }
#mentors .asef-when { background: #ffd6ea; }
.asef-duo h2 { margin-top: 0; }
