/*
Theme Name:   RSD Hello
Theme URI:    https://refugeesupportdevon.org.uk/
Description:  Child theme of Hello Elementor for Refugee Support Devon.
Author:       Tim Ross Web Development
Template:     hello-elementor
Version:      0.2.0
Text Domain:  rsd-hello
*/

/* ==========================================================================
   1. Brand font. "RSD Display" is a generic name so the files can be swapped
   for Brandon Grotesque when RSD confirms a web licence; nothing in
   Elementor needs to change. Josefin Sans (OFL) is the stand-in.
   ========================================================================== */
/* The block editor reuses two parts of this file for news posts, so the
   editing canvas looks like the published post: the parts between the
   "rsd:editor-start" and "rsd:editor-end" markers (functions.php, "Block
   editor"). Keep the markers; rules between them must make sense there too. */
/* rsd:editor-start */
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/josefin-sans-300-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/josefin-sans-300-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/josefin-sans-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/josefin-sans-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/josefin-sans-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/josefin-sans-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/josefin-sans-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "RSD Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/josefin-sans-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================================
   2. Design tokens. The same values exist as Elementor V4 Variables (seeded by
   scripts/elementor/seed-tokens.php) for the editor; these custom properties
   are what the rsd plugin's widget CSS and the rules below read.
   ========================================================================== */
:root {
	--rsd-devon-green: #007963;
	--rsd-deep-green: #09373b;
	--rsd-lime: #c7d540;
	--rsd-sky-blue: #2cb8cb;
	--rsd-yellow: #ffcc00;
	--rsd-yellow-hover: #ffd633;
	--rsd-pink: #df3d60;
	--rsd-white: #ffffff;
	--rsd-pale-green: #e8f2ef;
	--rsd-track: #e3ebe9;
	--rsd-font: "RSD Display", "Josefin Sans", system-ui, sans-serif;
	--rsd-radius-card: 32px;
	--rsd-radius-pill: 999px;
	--rsd-gutter: 40px;
	--rsd-container: 1280px;
}
@media (max-width: 767px) {
	:root {
		--rsd-radius-card: 24px;
		--rsd-gutter: 20px;
	}
}

body {
	font-family: var(--rsd-font);
	color: var(--rsd-deep-green);
	background: var(--rsd-white);
	-webkit-text-size-adjust: 100%;
}
/* rsd:editor-end */

/* ==========================================================================
   3. Hook classes. These are Global Classes in Elementor (so Tim can apply them
   in the editor) whose effect lives here because the V4 style schema can't
   express it: descendant selectors, pseudo-elements, white-space, clip.
   ========================================================================== */

/* Skip link (Hello Elementor outputs it in header.php). */
.skip-link.screen-reader-text:focus {
	position: absolute;
	left: 16px;
	top: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	overflow: visible;
	padding: 12px 16px;
	background: var(--rsd-yellow);
	color: var(--rsd-deep-green);
	font-weight: 700;
	text-decoration: none;
	border-radius: 6px;
	outline: 3px solid var(--rsd-deep-green);
	outline-offset: 2px;
}

/* Visually hidden headings keep the document outline for screen readers. */
.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Hero: the light-tinted logo mark (RSD's white mark at 16% opacity). */
.hero,
.hero--intro,
.hero--split {
	position: relative;
	overflow: hidden;
}
.hero::before,
.hero--intro::before,
.hero--split::before {
	content: "";
	position: absolute;
	right: -140px;
	top: 40px;
	/* Elementor's container ::before sets left: 0; without these the mark sat
	   behind the text on the left instead of off the right edge. */
	left: auto;
	bottom: auto;
	width: 700px;
	height: 700px;
	background: url("images/rsd-logo-mark-white.svg") no-repeat center / contain;
	opacity: 0.16;
	pointer-events: none;
}
.hero > *,
.hero--intro > *,
.hero--split > * {
	position: relative;
}
/* Below 1200px the mark runs under the text. At 8% white over Devon Green
   still has 4.6:1 and the Yellow highlight 3.05:1 (large text); at 16% they
   drop to 4.0:1 and 2.6:1. */
@media (max-width: 1199px) {
	.hero::before,
	.hero--intro::before,
	.hero--split::before {
		opacity: 0.08;
	}
}
@media (max-width: 767px) {
	.hero::before {
		right: -120px;
		top: 90px;
		width: 360px;
		height: 360px;
	}
}
/* Campaign hero: the mark sits bottom-left instead. */
.hero--split::before {
	right: auto;
	top: auto;
	left: -200px;
	bottom: -260px;
	width: 640px;
	height: 640px;
}
/* Inner pages: smaller band, smaller mark. */
.hero--intro::before {
	width: 520px;
	height: 520px;
	top: 0;
}
@media (max-width: 767px) {
	.hero--intro::before {
		width: 300px;
		height: 300px;
		right: -100px;
	}
}

/* V3 widgets inside a V4 flexbox default to 100% width; the menu and the
   Donate button share a row, so let the menu shrink to its content. */
.e-flexbox-base > .elementor-widget-nav-menu {
	width: auto;
}
.elementor-widget-nav-menu .elementor-nav-menu--main .elementor-nav-menu {
	gap: 0;
}

/* ==========================================================================
   4. Bands: text colour inheritance and the highlighted word.
   ========================================================================== */

/* Highlight = Underline in V4 headings (<u>), <mark> in V3 widgets. On white
   it is a Lime underline; on a green band it is Yellow text, h1 only (Yellow
   on Devon Green is 3.55:1, which only passes for display-size text). */
mark,
.rsd-highlight,
h1 u, h2 u, h3 u, h4 u {
	text-decoration: none;
	color: inherit;
	background: linear-gradient(transparent 62%, var(--rsd-lime) 62%);
	padding: 0 0.1em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
.band-dark mark,
.band-dark .rsd-highlight,
.band-dark h1 u, .band-dark h2 u, .band-dark h3 u, .band-dark h4 u,
.band-devon h1 u,
.band-devon mark {
	background: none;
	color: var(--rsd-yellow);
	padding: 0;
}
.band-devon h2 u, .band-devon h3 u, .band-devon h4 u {
	background: none;
	text-decoration: underline;
	text-decoration-thickness: 0.12em;
	text-underline-offset: 0.12em;
	color: inherit;
	padding: 0;
}

/* Links inside bands take the band's text colour. */
.band-dark a:not(.elementor-button):not(.e-button):not([class*="btn-"]),
.band-devon a:not(.elementor-button):not(.e-button):not([class*="btn-"]) {
	color: inherit;
}
.band-lime a:not(.elementor-button):not(.e-button):not([class*="btn-"]) {
	color: var(--rsd-deep-green);
}
a {
	text-underline-offset: 4px;
}
/* Links inside running text are always underlined (never colour alone). */
.e-paragraph-base a,
.elementor-widget-text-editor a,
.elementor-widget-theme-post-content a,
.rsd-contact-block a,
.e-list-item__content a {
	text-decoration: underline;
}

/* ==========================================================================
   5. Keyboard focus: visible on every interactive element, never removed.
   Deep Green ring on light backgrounds, Yellow on green bands, back to Deep
   Green inside white cards that sit on a band.
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--rsd-deep-green);
	outline-offset: 3px;
}
.band-dark :is(a, button, input, select, textarea, [tabindex]):focus-visible,
.band-devon :is(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline-color: var(--rsd-yellow);
}
.band-dark .rsd-campaign-card :is(a, button, input):focus-visible,
.band-devon .rsd-campaign-card :is(a, button, input):focus-visible,
.band-dark .rsd-card--outline:focus-visible,
.band-dark .rsd-route-tile--white:focus-visible,
.band-devon .rsd-route-tile:focus-visible {
	outline-color: var(--rsd-deep-green);
}

/* External-link icon on a button (Big Give). Decorative: the button's
   aria-label says it opens a new tab (CSS alt text on ::after isn't read by
   Chrome here). */
.btn-icon-external::after {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 4h6v6M20 4l-9 9M18 13v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6'/></svg>") no-repeat center / contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 4h6v6M20 4l-9 9M18 13v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6'/></svg>") no-repeat center / contain;
}

/* ==========================================================================
   6. Lists built from one-widget-per-row: rules between rows.
   ========================================================================== */
.news-row {
	border-top: 1px solid var(--rsd-deep-green);
}
.news-rows > :last-child .news-row,
.news-rows > .news-row:last-child {
	border-bottom: 1px solid var(--rsd-deep-green);
}
.news-row h3 a {
	color: var(--rsd-deep-green);
}

/* ==========================================================================
   7. Header navigation (Elementor Pro Nav Menu, the one V3 widget on the
   page). Colours come from the band; shapes are the design's.
   ========================================================================== */
.band-devon .elementor-nav-menu--main .elementor-item {
	color: var(--rsd-white);
	font-weight: 600;
	font-size: 1.0625rem;
	padding: 10px 0;
	text-decoration: none;
	/* Set on the resting state: Elementor transitions nav links (0.4s), so an
	   offset that only applies on hover animates and the underline slides. */
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}
.band-devon .elementor-nav-menu--main .elementor-item:hover,
.band-devon .elementor-nav-menu--main .elementor-item.elementor-item-active {
	color: var(--rsd-white);
	text-decoration-line: underline;
}
.band-devon .elementor-nav-menu--main .elementor-item:focus-visible {
	outline-color: var(--rsd-yellow);
}
/* Below 1025px the bar gives way to the [rsd_menu] button and panel. */
@media (max-width: 1024px) {
	.rsd-header-nav {
		display: none !important;
	}
}

/* ==========================================================================
   7a. Phone and tablet menu ([rsd_menu] shortcode, js/menu.js). The header
   stays put in Devon Green; the open panel fills the screen below it in Deep
   Green, so it is plainly a different layer from the hero underneath.
   ========================================================================== */
.e-flexbox-base > .rsd-menu-widget {
	width: auto;
}
@media (min-width: 1025px) {
	.rsd-menu-widget {
		display: none !important;
	}
}

/* The "Menu" pill. .rsd-menu prefix beats Hello's [type=button]:hover reset. */
.rsd-menu .rsd-menu__toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 68px; /* tablets: same as the Donate pill beside it */
	margin: 0;
	padding: 0 28px;
	border: 2px solid var(--rsd-white);
	border-radius: var(--rsd-radius-pill);
	background: transparent;
	color: var(--rsd-white);
	font-family: var(--rsd-font);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}
.rsd-menu .rsd-menu__toggle:hover,
.rsd-menu .rsd-menu__toggle:focus {
	background: rgba(255, 255, 255, 0.12);
	color: var(--rsd-white);
}
/* Open: filled white, so the button itself says the menu is open.
   Devon Green on white is 5.3:1. */
.rsd-menu .rsd-menu__toggle[aria-expanded="true"] {
	background: var(--rsd-white);
	color: var(--rsd-devon-green);
}
.rsd-menu__icon {
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
}
.rsd-menu__x,
.rsd-menu__toggle[aria-expanded="true"] .rsd-menu__bars {
	display: none;
}
.rsd-menu__toggle[aria-expanded="true"] .rsd-menu__x {
	display: inline;
}
@media (max-width: 767px) {
	.rsd-menu .rsd-menu__toggle {
		height: 50px; /* same as the phone Donate pill */
		padding: 0 12px;
		font-size: 16px;
		gap: 6px;
	}
}
/* Under 360px: icon only on screen; the word stays for screen readers. */
@media (max-width: 359px) {
	.rsd-menu .rsd-menu__toggle {
		width: 50px;
		justify-content: center;
		padding: 0;
	}
	.rsd-menu__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* The panel. top is set by menu.js to the header's bottom edge. */
.rsd-menu__panel {
	position: fixed;
	top: var(--rsd-header-h, 82px);
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 24px var(--rsd-gutter) 48px;
	background: var(--rsd-deep-green);
	color: var(--rsd-white);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
.rsd-menu__panel.is-open {
	opacity: 1;
	transform: none;
}
.rsd-menu__panel[hidden] {
	display: none;
}
html.rsd-menu-open {
	overflow: hidden;
}

/* Links: the hero's type, big enough to hit with a thumb. Colour is set on
   the item and inherited (band links take color: inherit). */
.rsd-menu__list,
.rsd-menu__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.rsd-menu__list a {
	display: block;
	padding: 8px 0;
	font-weight: 700;
	font-size: clamp(2rem, 1.5rem + 2.5vw, 2.75rem);
	line-height: 1.15;
	text-decoration: none;
	text-decoration-thickness: 3px;
	text-underline-offset: 0.18em;
}
.rsd-menu__list a:hover {
	text-decoration-line: underline;
}
/* Current page: Yellow (9.6:1 on Deep Green) and underlined, not colour alone. */
.rsd-menu__list .current-menu-item,
.rsd-menu__list .current-menu-ancestor {
	color: var(--rsd-yellow);
}
.rsd-menu__list .current-menu-item > a {
	text-decoration-line: underline;
}
.rsd-menu__list .sub-menu {
	padding: 0 0 8px 20px;
}
.rsd-menu__list .sub-menu a {
	font-size: 1.25rem;
	font-weight: 600;
}

/* Drop-in times and contact, under a rule. */
.rsd-menu__contact {
	max-width: 34ch;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.3);
	font-size: 1.125rem;
	line-height: 1.5;
}
.rsd-menu__contact p {
	margin: 0 0 12px;
}
.rsd-menu__contact a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Sticky header where the menu button shows, but only on screens tall
   enough to spare it (not landscape phones or 400% zoom, WCAG 1.4.10).
   scroll-padding keeps anchor targets and keyboard focus clear of it. */
@media (max-width: 1024px) and (min-height: 480px) {
	.elementor-location-header {
		position: sticky;
		top: 0;
		z-index: 100;
	}
	html {
		scroll-padding-top: calc(var(--rsd-header-h, 82px) + 16px);
	}
}
@media (min-width: 601px) and (max-width: 782px) and (min-height: 480px) {
	body.admin-bar .elementor-location-header {
		top: 46px;
	}
}
@media (min-width: 783px) and (max-width: 1024px) and (min-height: 480px) {
	body.admin-bar .elementor-location-header {
		top: 32px;
	}
}

/* ==========================================================================
   8. Forms (Elementor Pro Form, V3): pill fields, visible labels.
   ========================================================================== */
/* Elementor sets labels to line-height 1 with no gap, so they sat on the
   field's border. */
.elementor-field-group .elementor-field-label {
	margin-bottom: 8px;
	font-weight: 700;
	line-height: 1.3;
}
.elementor-field-group .elementor-field-textual {
	font: inherit;
	padding: 12px 16px;
	border: 2px solid var(--rsd-deep-green);
	border-radius: var(--rsd-radius-pill);
	background: var(--rsd-white);
	color: var(--rsd-deep-green);
}
.elementor-field-group textarea.elementor-field-textual {
	border-radius: 24px;
	min-height: 10em;
}
/* The acceptance class is on the field group itself, not inside one. */
.elementor-field-type-acceptance .elementor-field-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
/* Drawn like the text fields: the browser's grey box is under 3:1 on Lime
   (1.4.11). Two classes to outrank the kit's pill style for inputs
   (.elementor-kit-N input:not([type=button]):not([type=submit])). */
.elementor-form .elementor-field-type-acceptance input[type="checkbox"] {
	flex: none;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	appearance: none;
	border: 2px solid var(--rsd-deep-green);
	border-radius: 6px;
	background: var(--rsd-white) center / 16px no-repeat;
	cursor: pointer;
}
/* !important: the form widget prints its own white field background per
   element (.elementor-N .elementor-element-X … .elementor-field). */
.elementor-form .elementor-field-type-acceptance input[type="checkbox"]:checked {
	background-color: var(--rsd-deep-green) !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.elementor-form .elementor-field-type-acceptance input[type="checkbox"]:focus-visible {
	outline: 3px solid var(--rsd-deep-green);
	outline-offset: 3px;
}
.elementor-form .elementor-field-type-submit {
	align-items: flex-start;
}
.elementor-form .elementor-field-type-submit .elementor-button {
	width: auto;
	font-family: inherit;
	font-weight: 700;
	font-size: 1.25rem;
	background: var(--rsd-deep-green);
	color: var(--rsd-white);
	border: 0;
	padding: 16px 30px;
	border-radius: var(--rsd-radius-pill);
}
.elementor-form .elementor-button:hover,
.elementor-form .elementor-button:focus {
	background: var(--rsd-devon-green);
	color: var(--rsd-white);
}
.elementor-field-type-html .rsd-form-note {
	margin: 0;
	font-size: 1.0625rem;
}
.elementor-field-type-html .rsd-form-note a {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}
/* Newsletter consent: regular weight like the design (sheet 7), with the
   privacy link underlined so it isn't told apart by position alone (1.4.1). */
.elementor-form .elementor-field-type-acceptance .elementor-field-option label {
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.5;
}
.elementor-form .elementor-field-type-acceptance .elementor-field-option label a {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}
.elementor-message.elementor-message-danger {
	color: #9b1c1c;
}

/* ==========================================================================
   9. Motion: honour the OS setting. Entrance animations are also turned off
   in Elementor; this is the backstop.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   10. Footer: the Immigration Advice Authority badge (Yoshki iframe, 125 x 183
   on the old site). Sized by aspect ratio so it scales on narrow screens.
   ========================================================================== */
.rsd-iaa-badge {
	width: 110px;
	aspect-ratio: 125 / 183;
	margin-top: 24px;
}
.rsd-iaa-badge iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Credits (copyright, "Website by TRWD"): small print under a thin rule. */
#footer-credits {
	border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* The IAA badge validates against the live domain only (see functions.php). */
body:not(.rsd-env-production) .rsd-iaa-badge {
	display: none;
}

/* ==========================================================================
   11. News post body (Post Content widget, .rsd-post-body, written in the
   block editor). One left-aligned column of about 70 characters; photos sit
   in the column, or run the full content width when set to "Wide width",
   with the card radius so they belong with the tiles and cards. Captions stay
   at column width under any photo. Also loaded in the block editor, where
   ".rsd-post-body" is swapped for the editor's own content element.
   ========================================================================== */
/* rsd:editor-start */
.rsd-post-body {
	--rsd-measure: 48rem; /* ~70ch of body text */
	font-size: 1.25rem;
	line-height: 1.6;
	color: var(--rsd-deep-green);
}
.rsd-post-body > * {
	max-width: var(--rsd-measure);
	margin: 0 0 1.2em;
}
.rsd-post-body > :first-child {
	margin-top: 0;
}
.rsd-post-body > :last-child {
	margin-bottom: 0;
}
.rsd-post-body h2 {
	margin: 48px 0 16px;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
}
.rsd-post-body h3 {
	margin: 36px 0 12px;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
}
.rsd-post-body ul,
.rsd-post-body ol {
	padding-left: 1.4em;
}
.rsd-post-body li + li {
	margin-top: 8px;
}
.rsd-post-body a {
	color: var(--rsd-devon-green); /* 5.3:1 on white */
	text-underline-offset: 0.15em;
}
.rsd-post-body a:hover {
	color: var(--rsd-deep-green);
}
/* Quote block: quoted letters and statements, set off by a Devon Green rule. */
.rsd-post-body .wp-block-quote {
	margin: 32px 0;
	padding: 0 0 0 24px;
	border-left: 4px solid var(--rsd-devon-green);
}
.rsd-post-body .wp-block-quote > :last-child {
	margin-bottom: 0;
}

/* Photos: column width by default; "Wide width" (and "Full width", which
   would break the band layout) fill the content width. Left/right floats
   aren't part of the design, so they behave like the default. */
.rsd-post-body > .wp-block-image,
.rsd-post-body > .wp-block-gallery {
	margin: 48px 0;
}
.rsd-post-body > .alignwide,
.rsd-post-body > .alignfull {
	max-width: none;
}
.rsd-post-body > .alignleft,
.rsd-post-body > .alignright {
	float: none;
	margin-left: 0;
	margin-right: 0;
}
.rsd-post-body .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--rsd-radius-card);
}
.rsd-post-body .wp-element-caption,
.rsd-post-body .wp-block-image figcaption {
	max-width: var(--rsd-measure);
	margin: 14px 0 0;
	font-size: 1.0625rem;
	font-style: normal;
	line-height: 1.5;
	text-align: left;
	color: var(--rsd-deep-green);
}

/* Two or more photos side by side (Gallery block). Core lays them out; these
   undo its captions-over-the-photo style (white on a dark fade, which fails
   contrast on light photos) and stack them on phones. */
.rsd-post-body .wp-block-gallery.has-nested-images {
	gap: 20px;
}
.rsd-post-body .wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-direction: column;
	justify-content: flex-start;
}
.rsd-post-body .wp-block-gallery.has-nested-images figure.wp-block-image img {
	flex: none;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.rsd-post-body .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	position: static;
	max-height: none;
	overflow: visible;
	margin-top: 12px;
	padding: 0;
	background: none;
	color: var(--rsd-deep-green);
	font-size: 1.0625rem;
	text-align: left;
	text-shadow: none;
}
/* Core also blurs and fades the bottom of a captioned photo. */
.rsd-post-body .wp-block-gallery.has-nested-images figure.wp-block-image::before,
.rsd-post-body .wp-block-gallery.has-nested-images figure.wp-block-image figcaption::before {
	content: none;
	display: none;
}
.rsd-post-body .wp-block-gallery > .wp-element-caption {
	flex-basis: 100%;
	margin-top: 0;
}
@media (max-width: 599px) {
	.rsd-post-body .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
		width: 100%;
	}
}

/* Documents (File block): one ruled row each, the link text carrying the
   format and size, e.g. "Annual Review 2024–25 (PDF, 1.9 MB)". The block's
   separate "Download" button repeats the same link, so it is hidden. */
.rsd-post-body > .wp-block-file {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 16px 0;
	border-top: 1px solid var(--rsd-deep-green);
}
.rsd-post-body > .wp-block-file:not(:has(+ .wp-block-file)) {
	border-bottom: 1px solid var(--rsd-deep-green);
	margin-bottom: 1.2em;
}
.rsd-post-body > .wp-block-file > a:first-child {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	min-height: 44px;
	font-weight: 700;
	line-height: 1.4;
}
.rsd-post-body > .wp-block-file > a:first-child::before {
	content: "";
	flex: none;
	width: 28px;
	height: 28px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M14 2v6h6M8 13h8M8 17h8'/></svg>") no-repeat center / contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M14 2v6h6M8 13h8M8 17h8'/></svg>") no-repeat center / contain;
}
.rsd-post-body .wp-block-file__button {
	display: none;
}

/* Quotes: larger type, no rule down the side. */
.rsd-post-body > .wp-block-quote {
	margin: 40px 0;
	padding: 0;
	border: 0;
	font-size: 1.5rem;
	line-height: 1.45;
}
.rsd-post-body > .wp-block-quote p {
	margin: 0 0 0.6em;
}
.rsd-post-body > .wp-block-quote cite {
	font-size: 1.0625rem;
	font-style: normal;
	font-weight: 600;
}

@media (max-width: 767px) {
	.rsd-post-body {
		font-size: 19px;
	}
	.rsd-post-body h2 {
		margin: 36px 0 12px;
		font-size: 26px;
	}
	.rsd-post-body h3 {
		font-size: 22px;
	}
	.rsd-post-body > .wp-block-image,
	.rsd-post-body > .wp-block-gallery {
		margin: 32px 0;
	}
	.rsd-post-body > .wp-block-file > a:first-child {
		gap: 12px;
		font-size: 17px;
	}
	.rsd-post-body > .wp-block-quote {
		font-size: 1.3rem;
	}
}

/* rsd:editor-end */

/* Donorfy donation form on /donate/ (an iframe from Donorfy's form builder,
   seed-pages.php). It can't resize its own frame, so the height follows the
   form's measured height at each width (2026-11-20: 1756px at 1920, 1923px
   at 1200, 2206px at 1024, 2521px at 768, 2151px at 600, 2470px at 390,
   2847px at 320), with a little room to spare. Re-measure if RSD change the
   form in Donorfy. */
.rsd-donorfy {
	display: block;
	width: 100%;
	height: 1980px;
	border: 0;
}
@media (max-width: 1199px) {
	.rsd-donorfy {
		height: 2280px;
	}
}
@media (max-width: 1024px) {
	.rsd-donorfy {
		height: 2600px;
	}
}
@media (max-width: 479px) {
	.rsd-donorfy {
		height: 2900px;
	}
}

/* "More news" under a post: hidden when there are no other posts (the
   loop's empty state is only visible then). */
#more-news:has(.e-collection-loop-empty-state-base:not([style*="none"])) {
	display: none;
}
