/*
 * OAK 2026 component styles.
 * Colours, fonts, sizes and spacing come from theme.json presets; this file only
 * adds what theme.json cannot express. Corners stay square throughout.
 */

/* Base ------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
}

h1, h2, h3, h4 {
	text-wrap: balance;
}

/* With large text on a small phone, a long word, email address or form field
 * wraps or shrinks instead of pushing the page sideways. */
body {
	overflow-wrap: break-word;
}

:where(input, select, textarea) {
	max-width: 100%;
}

/* A quote keeps the browser's 40px side margins on wide screens, but gives
 * most of them back on a phone so the words are not squeezed. */
:where(.wp-block-quote) {
	margin-inline: min(40px, 5vw);
}

/* A card's plain label, such as "News" or "Film, 12 min". */
.oak-tag {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* Pages built from full-width sections: bands sit edge to edge, each pattern sets its own padding. */
.oak-sections > * {
	margin-block-start: 0;
}

.oak-lead {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	max-width: 42rem;
}

.oak-small {
	font-size: var(--wp--preset--font-size--small);
}

/* Dark bands: deep teal or teal backgrounds with white text. */
.oak-dark {
	--oak-on-dark-soft: #e1eeeb;
	--oak-tick: var(--wp--preset--color--gold);
	--oak-rule: rgb(255 255 255 / 0.3);
	--oak-dot: var(--wp--preset--color--teal-dark);
	--oak-dot-edge: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
}

.oak-dark :where(h1, h2, h3, h4) {
	color: inherit;
}

.oak-dark a:where(:not(.wp-element-button)) {
	color: inherit;
}

.oak-dark .oak-tag,
.oak-dark .oak-footnote,
.oak-dark figcaption {
	color: var(--oak-on-dark-soft);
}

.oak-dark :where(a, button, input, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--white);
}

/* Header ----------------------------------------------------------------- */

/* Each link stays on one line; on a phone the row wraps between links. */
.oak-utility p {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin: 0;
	padding-block: 0.45rem;
}

.oak-utility a {
	color: var(--wp--preset--color--ink-soft);
	font-weight: 600;
	margin-left: 1.25rem;
	text-decoration: none;
	white-space: nowrap;
}

.oak-utility a:hover {
	color: var(--wp--preset--color--ink);
	text-decoration: underline;
}

/* On a phone all five links need two rows, which also breaks the sticky
   header's one-row offset. Learning platform is the longest and is in the
   main menu too, so it leaves this row and Contact us stays on the first. */
@media (max-width: 30em) {
	.oak-utility a[href="/learning-platform/"] {
		display: none;
	}
}

.oak-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.oak-brand .wp-block-site-logo img {
	height: auto;
}

.oak-brand .wp-block-site-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.4rem;
	font-weight: 900;
	line-height: 1;
	margin: 0;
}

.oak-brand .wp-block-site-title a {
	color: var(--wp--preset--color--teal);
	text-decoration: none;
}

.oak-brand .wp-block-site-tagline {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.3;
	margin: 0.1rem 0 0;
}

.oak-header .wp-block-navigation .wp-block-navigation-item__content {
	text-decoration: none;
}

.oak-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--gold);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.5em;
}

.oak-header .wp-block-search__button {
	background: transparent;
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 0;
	color: var(--wp--preset--color--ink);
}

.oak-header .wp-block-search__input {
	border-radius: 0;
}

.oak-header .wp-block-button__link {
	white-space: nowrap;
}

.oak-brand .wp-block-site-logo {
	flex-shrink: 0;
}

/* Header breakpoints are in em (16px each at the default text size), so a
 * larger browser text size moves to the compact header sooner. */
@media (max-width: 37.5em) {
	.oak-header .wp-block-group {
		gap: 0.75rem;
	}

	.oak-brand .wp-block-site-logo img {
		width: 44px;
	}

	.oak-brand .wp-block-site-title {
		font-size: 1.15rem;
	}

	/* The name and tagline sit close together, not 0.75rem apart like the
	 * rest of the header. */
	.oak-header .oak-brand > .wp-block-group {
		gap: 0;
	}

	/* The tagline stays on one line under the name, a size smaller than on desktop. */
	.oak-brand .wp-block-site-tagline {
		font-size: 0.75rem;
		line-height: 1.2;
		white-space: nowrap;
	}

	.oak-header .wp-block-button__link {
		font-size: var(--wp--preset--font-size--small);
		padding: 0.6rem 0.9rem;
	}

	.oak-header .wp-block-search__button {
		height: 44px;
		justify-content: center;
		min-width: 0;
		padding: 0;
		width: 44px;
	}
}

/* The narrowest phones, or a small phone with large text: tighter spacing,
 * then the logo alone stands for the name, so Donate stays on screen. In em,
 * so these move with the browser's text size. */
@media (max-width: 22em) {
	.oak-header .wp-block-group {
		gap: 0.5rem;
	}

	.oak-header .wp-block-button__link {
		padding: 0.55rem 0.7rem;
	}
}

/* Below 360px the tagline would touch the menu button, so only the name shows. */
@media (max-width: 22.49em) {
	.oak-brand .wp-block-site-tagline {
		display: none;
	}
}

@media (max-width: 19.5em) {
	.oak-brand .wp-block-site-title {
		display: none;
	}
}

/* Hero with donation box -------------------------------------------------- */

.oak-hero .oak-hero__box {
	margin: -7rem 0 0 clamp(1rem, 3vw, 2.5rem);
	max-width: 36rem;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	position: relative;
	z-index: 4;
}

.oak-hero .oak-hero__give {
	align-self: center;
	padding: clamp(1.5rem, 3vw, 3rem);
}

@media (max-width: 781px) {
	.oak-hero .oak-hero__box {
		margin: -3rem 1rem 0;
	}
}

/* Donation box (rendered by [oak_give_box]) */
.oak-give {
	container-type: inline-size;
	display: grid;
	gap: 0.75rem;
}

.oak-give fieldset {
	border: 0;
	display: grid;
	margin: 0;
	padding: 0;
	position: relative;
}

.oak-give [hidden] {
	display: none;
}

.oak-give .oak-give__freq,
.oak-give .oak-give__cur {
	border: 2px solid var(--wp--preset--color--ink);
	grid-template-columns: 1fr 1fr;
}

.oak-give .oak-give__cur {
	grid-template-columns: repeat(3, 1fr);
}

.oak-give .oak-give__cur label {
	font-size: var(--wp--preset--font-size--small);
	min-height: 2.5rem;
}

.oak-give .oak-give__note {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

.oak-give .oak-give__amounts {
	gap: 0.5rem;
	grid-template-columns: repeat(4, 1fr);
}

.oak-give input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.oak-give label {
	align-items: center;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	display: flex;
	font-weight: 700;
	justify-content: center;
	min-height: 3rem;
}

.oak-give .oak-give__amounts label {
	border: 2px solid var(--wp--preset--color--ink);
	padding-inline: 0.25rem;
	white-space: nowrap;
}

/* Amounts drop to two a row, then one, before any would split (£10 / 0).
 * Naira amounts (₦50,000) are wider, so they drop sooner. */
@container (max-width: 17rem) {
	.oak-give .oak-give__amounts {
		grid-template-columns: repeat(2, 1fr);
	}
}

@container (max-width: 24rem) {
	.oak-give .oak-give__amounts[data-currency="NGN"] {
		grid-template-columns: repeat(2, 1fr);
	}
}

@container (max-width: 12rem) {
	.oak-give .oak-give__amounts,
	.oak-give .oak-give__amounts[data-currency="NGN"] {
		grid-template-columns: 1fr;
	}
}

.oak-give .oak-give__freq input:checked + label,
.oak-give .oak-give__cur input:checked + label {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

/* The ink border and inset ring carry the selected state; gold alone is too faint on white. */
.oak-give .oak-give__amounts input:checked + label {
	background: var(--wp--preset--color--gold);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--ink);
}

.oak-give input:focus-visible + label {
	outline: 3px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
	position: relative;
	z-index: 1;
}

/* On the ink-filled toggle an outside ink ring would vanish, so draw it inside in gold. */
.oak-give .oak-give__freq input:focus-visible + label,
.oak-give .oak-give__cur input:focus-visible + label {
	outline-color: var(--wp--preset--color--gold);
	outline-offset: -6px;
}

@media (forced-colors: active) {
	.oak-give input:checked + label {
		outline: 3px solid Highlight;
		outline-offset: -5px;
	}
}

.oak-give .oak-give__go {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	font-size: var(--wp--preset--font-size--large);
	gap: 0.5rem;
	justify-content: center;
	padding-block: 1rem;
	text-decoration: none;
	width: 100%;
}

.oak-give .oak-give__go::before {
	background: currentColor;
	content: "";
	height: 1em;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h1v8H3V7h1zm2 0h4V5a2 2 0 1 0-4 0v2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h1v8H3V7h1zm2 0h4V5a2 2 0 1 0-4 0v2z'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 1em;
}

/* The panel that stands in for the box while the November appeal is live. */
.oak-give--campaign > p:first-child {
	margin: 0;
}

/* Impact stats and funder logos ------------------------------------------ */

.oak-stat {
	container-type: inline-size;
	padding: 1.5rem 1.25rem;
}

.oak-stat p {
	margin: 0;
}

/* A figure stays on one line and shrinks to fit its card, so a long one
 * (25.09.26, 421,000) is never cut. --oak-fig, its width in em, comes from
 * inc/figures.php; browsers without container units keep the clamp. */
.oak-stat .oak-stat__num {
	color: var(--wp--preset--color--teal);
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
	font-size: min(clamp(2.5rem, 2rem + 2vw, 3.5rem), calc(92cqi / var(--oak-fig, 3)));
	font-variant-numeric: tabular-nums;
	font-weight: 900;
	line-height: 1;
	margin-bottom: 0.5rem;
	white-space: nowrap;
}

.oak-logos {
	border-top: 1px solid var(--wp--preset--color--line);
	gap: 1.5rem 2.5rem;
	justify-content: flex-start;
	padding-top: 1.5rem;
}

.oak-logos > p {
	flex-basis: 100%;
}

.oak-logos p {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--x-small);
	margin: 0;
}

.oak-logos .oak-logo {
	margin: 0;
}

.oak-logos .oak-logo img {
	height: 44px;
	width: auto;
}

/* Two front doors --------------------------------------------------------- */

.oak-door {
	border: 1px solid var(--wp--preset--color--line);
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

.oak-door.oak-dark {
	border-color: transparent;
}

.oak-door .oak-door__links {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.oak-door .oak-door__links li {
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
	padding: 1rem 0;
}

.oak-door.oak-dark .oak-door__links li {
	border-color: rgb(255 255 255 / 0.2);
	color: var(--oak-on-dark-soft);
}

.oak-door .oak-door__links a {
	align-items: center;
	color: var(--wp--preset--color--ink);
	display: flex;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	gap: 1rem;
	justify-content: space-between;
	text-decoration: none;
}

.oak-door.oak-dark .oak-door__links a {
	color: var(--wp--preset--color--white);
}

/* An arrow icon at the end of each row, which nudges forward on hover. */
.oak-door .oak-door__links a::after {
	background-color: var(--wp--preset--color--teal);
	content: "" / "";
	flex: none;
	height: 1.25rem;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 1.25rem;
}

.oak-door.oak-dark .oak-door__links a::after {
	background-color: var(--wp--preset--color--gold);
}

@media (prefers-reduced-motion: no-preference) {
	.oak-door .oak-door__links a::after {
		transition: transform 0.2s ease;
	}

	.oak-door .oak-door__links a:hover::after {
		transform: translateX(0.25rem);
	}
}

.oak-door .oak-door__links a:hover {
	text-decoration: underline;
}

/* Appeal band ------------------------------------------------------------- */

.oak-offers {
	display: grid;
	gap: 0.5rem 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
	list-style: none;
	padding: 0;
}

.oak-offers li {
	padding-left: 1.75rem;
	position: relative;
}

.oak-offers li::before {
	border-bottom: 3px solid var(--oak-tick, var(--wp--preset--color--teal));
	border-left: 3px solid var(--oak-tick, var(--wp--preset--color--teal));
	content: "";
	height: 0.45rem;
	left: 0.1rem;
	position: absolute;
	top: 0.45em;
	transform: rotate(-45deg);
	width: 0.9rem;
}

.oak-goal > .wp-block-group {
	border: 2px solid var(--wp--preset--color--gold);
	container-type: inline-size;
	padding: 1.25rem;
}

.oak-goal p {
	margin: 0;
}

/* Fits its box the same way as .oak-stat__num, so US$5,000 is never cut. */
.oak-goal .oak-goal__num {
	color: var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem);
	font-size: min(clamp(2rem, 1.6rem + 1.4vw, 2.6rem), calc(92cqi / var(--oak-fig, 3)));
	font-weight: 900;
	line-height: 1;
	margin-bottom: 0.4rem;
	white-space: nowrap;
}

.oak-footnote {
	font-size: var(--wp--preset--font-size--x-small);
}

.oak-mosaic > :first-child {
	grid-column: 1 / -1;
}

.oak-mosaic .wp-block-image {
	margin: 0;
}

.oak-mosaic .wp-block-image img {
	aspect-ratio: 4 / 3;
	display: block;
	object-fit: cover;
	width: 100%;
}

.oak-timeline {
	border-top: 2px solid var(--oak-rule, var(--wp--preset--color--line));
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(4, 1fr);
	list-style: none;
	padding: 0;
}

.oak-timeline li {
	font-size: var(--wp--preset--font-size--small);
	padding-top: 1.25rem;
	position: relative;
}

.oak-timeline li::before {
	background: var(--oak-dot, var(--wp--preset--color--white));
	border: 2px solid var(--oak-dot-edge, var(--wp--preset--color--teal));
	content: "";
	height: 14px;
	left: 0;
	position: absolute;
	top: -8px;
	width: 14px;
}

.oak-timeline li.is-now::before {
	background: var(--wp--preset--color--gold);
	border-color: var(--wp--preset--color--gold);
}

.oak-timeline strong {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
	margin-bottom: 0.25rem;
}

@media (max-width: 781px) {
	.oak-timeline {
		border-left: 2px solid var(--oak-rule, var(--wp--preset--color--line));
		border-top: 0;
		grid-template-columns: 1fr;
		padding-left: 1.5rem;
	}

	.oak-timeline li {
		padding-top: 0;
	}

	.oak-timeline li::before {
		left: calc(-1.5rem - 8px);
		top: 0.35rem;
	}
}

/* Cards ------------------------------------------------------------------- */

.oak-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	padding-bottom: 1.5rem;
}

.oak-card > * {
	margin-inline: 1.25rem;
}

.oak-card > .wp-block-image {
	margin: 0 0 1.25rem;
}

/* Cards without a photo start with an icon or heading. */
.oak-card > :first-child:not(.wp-block-image) {
	margin-top: 1.5rem;
}

.oak-card > .wp-block-image img {
	aspect-ratio: 16 / 10;
	display: block;
	object-fit: cover;
	width: 100%;
}

.oak-card h3 a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.oak-card h3 a:hover {
	text-decoration: underline;
}

.oak-card p:last-child {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
}

/* Four cards sit two by two, then in one row, never three and one. */
@media (min-width: 600px) {
	.wp-block-group.oak-grid-four {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.wp-block-group.oak-grid-four {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Story and voices -------------------------------------------------------- */

.oak-story .oak-story__img {
	margin: 0;
}

.oak-story .oak-story__img img {
	aspect-ratio: 3 / 4;
	display: block;
	object-fit: cover;
	width: 100%;
}

.oak-voice {
	padding: clamp(1.5rem, 3vw, 2.25rem);
}

.oak-voice .wp-block-quote {
	border: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 400;
	line-height: 1.5;
	margin: 0;
	padding: 0;
}

.oak-voice .wp-block-quote::before {
	color: var(--wp--preset--color--teal);
	content: "\201C" / "";
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 4rem;
	font-weight: 900;
	height: 2.25rem;
	line-height: 1;
}

.oak-voice .wp-block-quote cite {
	color: var(--wp--preset--color--ink-soft);
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	margin-top: 1rem;
}

/* Funder facts ------------------------------------------------------------ */

.oak-facts > .wp-block-group {
	border-top: 1px solid var(--wp--preset--color--line);
	display: grid;
	gap: 1rem;
	grid-template-columns: 10rem 1fr;
	padding-block: 1rem;
}

.oak-facts p {
	margin: 0;
}

.oak-facts .oak-facts__k {
	font-weight: 700;
}

@media (max-width: 600px) {
	.oak-facts > .wp-block-group {
		gap: 0.25rem;
		grid-template-columns: 1fr;
	}
}

/* In a narrow column, such as the appeal box or a profile sidebar, the label
 * sits above its value so a value like US$5,000 is never squeezed. */
.oak-facts {
	container-type: inline-size;
}

@container (max-width: 26rem) {
	.oak-facts > .wp-block-group {
		gap: 0.25rem;
		grid-template-columns: 1fr;
	}
}

/* Post lists -------------------------------------------------------------- */

.oak-posts .wp-block-post-featured-image {
	margin-bottom: 1rem;
}

.oak-meta {
	font-size: var(--wp--preset--font-size--x-small);
	gap: 0.75rem;
}

.oak-meta .wp-block-post-terms a {
	color: var(--wp--preset--color--teal);
	font-weight: 700;
	text-decoration: none;
}

.oak-meta .wp-block-post-terms a:hover {
	text-decoration: underline;
}

.oak-posts .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.oak-posts .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* Inner pages ------------------------------------------------------------- */

.oak-page-hero h1 {
	font-size: var(--wp--preset--font-size--huge);
	margin-block: 0.25rem 0;
}

/* Image crops: add oak-crop (4:3), plus --portrait (4:5) or --wide (16:9), to an image block. */
.wp-block-image.oak-crop {
	margin: 0;
}

.wp-block-image.oak-crop img {
	aspect-ratio: 4 / 3;
	display: block;
	object-fit: cover;
	width: 100%;
}

.wp-block-image.oak-crop--portrait img {
	aspect-ratio: 4 / 5;
	object-position: 50% 20%;
}

.wp-block-image.oak-crop--wide img {
	aspect-ratio: 16 / 9;
}

.oak-card.oak-card--person > .wp-block-image img {
	aspect-ratio: 4 / 5;
	object-position: 50% 20%;
}

/* Until we have someone's photo, their initials hold its place. */
.oak-card.oak-card--person > .oak-initials {
	align-items: center;
	aspect-ratio: 4 / 5;
	background: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--cream);
	display: flex;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2.5rem, 5vw, 3.5rem);
	font-weight: 900;
	justify-content: center;
	letter-spacing: 0.04em;
	margin: 0 0 1.25rem;
}

/* Keeps a double-barrelled surname, such as Soji-Adeyemo, from breaking at its hyphen. */
.oak-nowrap {
	white-space: nowrap;
}

/* Questions and answers */
.oak-faq .wp-block-details {
	border-top: 1px solid var(--wp--preset--color--line);
	margin: 0;
	padding-block: 1rem;
}

.oak-faq .wp-block-details:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.oak-faq summary {
	cursor: pointer;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	list-style: none;
	padding-right: 2.5rem;
	position: relative;
}

.oak-faq summary::-webkit-details-marker {
	display: none;
}

.oak-faq summary::after {
	color: var(--wp--preset--color--teal);
	content: "+" / "";
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
}

.oak-faq details[open] > summary::after {
	content: "\2212" / "";
}

.oak-faq details > :not(summary) {
	margin-block: 0.75rem 0;
}

/* Galleries: captions sit under the photo rather than over it. */
.wp-block-gallery.oak-gallery.has-nested-images figure.wp-block-image {
	flex-direction: column;
}

.wp-block-gallery.oak-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
	content: none;
}

.wp-block-gallery.oak-gallery.has-nested-images figure.wp-block-image img {
	aspect-ratio: 4 / 3;
	flex: none;
	height: auto;
	object-fit: cover;
}

.wp-block-gallery.oak-gallery.has-nested-images figure.wp-block-image figcaption {
	background: none;
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--x-small);
	max-height: none;
	overflow: visible;
	padding: 0.5rem 0 0;
	position: static;
	text-align: left;
	text-shadow: none;
}

/* Notes, form boxes and plugin placeholders */
.oak-notice {
	background: var(--wp--preset--color--cream);
	border-left: 4px solid var(--wp--preset--color--gold);
	padding: 1.25rem 1.5rem;
}

.oak-notice > :first-child {
	margin-top: 0;
}

.oak-form-box {
	background: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.oak-form-box :where(h2, h3) {
	color: var(--wp--preset--color--ink);
}

.oak-placeholder {
	background: var(--wp--preset--color--white);
	border: 2px dashed var(--wp--preset--color--line);
	color: var(--wp--preset--color--ink-soft);
	padding: 1.5rem;
}

.oak-dark .is-style-outline > .wp-element-button:not(:hover) {
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
}

/* Footer with wave edge --------------------------------------------------- */

.oak-footer {
	margin-top: 40px;
	position: relative;
}

.oak-footer::before {
	background: var(--wp--preset--color--teal);
	content: "";
	height: 32px;
	left: 0;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 32' preserveAspectRatio='none'%3E%3Cpath d='M0 32V18C150 4 300 4 450 15s300 16 450 3 200-13 300-6v20z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 32' preserveAspectRatio='none'%3E%3Cpath d='M0 32V18C150 4 300 4 450 15s300 16 450 3 200-13 300-6v20z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
	position: absolute;
	right: 0;
	top: -31px;
}

.oak-footer h2 {
	font-size: var(--wp--preset--font-size--medium);
}

.oak-footer .oak-footer__logo img {
	width: 120px;
}

.oak-footer ul {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.oak-footer li + li {
	margin-top: 0.35rem;
}

.oak-footer a {
	text-decoration: none;
}

.oak-footer a:hover {
	text-decoration: underline;
}

.oak-footer address {
	font-style: normal;
}

.oak-footer a[href^="tel:"] {
	white-space: nowrap;
}

/* Tablets: the logo column takes the full row so the three link columns have
 * room. In em, so with large text the columns stack until the phone numbers
 * fit on one line. */
@media (min-width: 782px) and (max-width: 67.5em) {
	.oak-footer > .wp-block-columns {
		flex-wrap: wrap !important;
	}

	.oak-footer > .wp-block-columns > .wp-block-column:first-child {
		flex-basis: 100% !important;
	}
}

@media (min-width: 782px) and (max-width: 48.8125em) {
	.oak-footer > .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}
}

.oak-footer .oak-footer__base {
	border-top: 1px solid rgb(255 255 255 / 0.25);
	font-size: var(--wp--preset--font-size--x-small);
}

.oak-footer .oak-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
}

/* Social media links (inc/social.php). They are plain markup, not core's
   Social Icons block: Fanboy's social and annoyance lists, used by content
   blockers in some browsers, hide .wp-block-social-links after the page loads.
   Square teal buttons with names on light sections, plain icons in the footer. */
.oak-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin-block-end: 0;
	padding: 0;
}

.oak-social__link {
	align-items: center;
	color: inherit;
	display: flex;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.oak-social__link:hover {
	color: var(--wp--preset--color--gold);
	text-decoration: none;
}

.oak-social__link svg {
	fill: currentColor;
	flex: none;
	height: 1.5rem;
	width: 1.5rem;
}

.oak-social--labelled .oak-social__link {
	background-color: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--cream);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	gap: 0.5rem;
	line-height: 1.2;
	padding: 0.6rem 0.9rem;
}

.oak-social--labelled .oak-social__link:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
}

.oak-social--labelled .oak-social__link svg {
	height: 1.25rem;
	width: 1.25rem;
}

.oak-page-hero .oak-social {
	margin-top: 1.5rem;
}

.oak-footer .oak-social {
	gap: 1rem;
	margin-top: 1.5rem;
}

.oak-footer .oak-social li + li {
	margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

/* November appeal: New Africa Fund's checkout, embedded while the appeal is live.
   Sized to the checkout's one-column layout, which hides its own logo. */
.oak-naf-give__frame {
	background: var(--wp--preset--color--white);
	border-bottom-right-radius: 2.5rem;
	max-width: 40rem;
	overflow: hidden;
	padding: 0.5rem 0.5rem 1.5rem;
}

.oak-naf-give__frame iframe {
	border: 0;
	display: block;
	height: 58rem;
	width: 100%;
}

/* Links to a section (#africa-give, #photo-gallery) stop below the sticky header. */
.wp-site-blocks [id] {
	scroll-margin-top: 8rem;
}

/* Fluent Forms: fields and button in the site's type, borders and colours. */
.frm-fluent-form .ff-el-input--label label,
.frm-fluent-form .ff-el-form-check-label {
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.frm-fluent-form .ff-el-form-control {
	border: 2px solid var(--wp--preset--color--line);
	border-radius: 0;
	color: var(--wp--preset--color--ink);
	font-family: inherit;
	font-size: 1rem;
	padding: 0.75rem 0.875rem;
}

.frm-fluent-form .ff-el-form-control::placeholder {
	color: var(--wp--preset--color--ink-soft);
}

.frm-fluent-form .ff-el-form-control:focus {
	border-color: var(--wp--preset--color--teal);
	outline: 3px solid color-mix(in srgb, var(--wp--preset--color--teal) 30%, transparent);
	outline-offset: 0;
}

.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style) {
	background-color: var(--wp--preset--color--gold) !important;
	border: 2px solid var(--wp--preset--color--gold) !important;
	border-radius: 0;
	color: var(--wp--preset--color--ink) !important;
	font-size: 1rem;
	font-weight: 700;
	max-width: 100%;
	padding: 0.875rem 1.5rem;
	white-space: normal;
}

.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style):hover {
	background-color: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--white) !important;
	opacity: 1;
}
