/*
 * The card becomes the thing the code is measured against, so the code can be
 * sized as a share of it and fill the width on any screen without a breakpoint
 * being involved. Sizing it against the viewport instead would have been wrong
 * here: the card is a third of the page on a desktop and all of it on a phone.
 */
.gateway--media {
	container-type: inline-size;
}

/*
 * A dial string is read left to right whatever the sentence around it does,
 * and it starts and ends with a symbol, which is exactly what the bidi
 * algorithm would otherwise move. Overridden the way account numbers already
 * are on this site.
 *
 * The rem is a fallback: where container queries are not supported the cqw
 * line is dropped and the code still has a size to fall back on.
 */
.ussd-code {
	margin-block-start: var(--wp--preset--spacing--20);
	direction: ltr;
	unicode-bidi: bidi-override;
	text-align: center;
	font-size: 1.6rem;
	font-size: 10cqw;
	font-weight: 600;
	line-height: var(--wp--custom--line-height--tight);
	font-variant-numeric: tabular-nums;
	/* Never wrapped: half a dial code on its own line is not a dial code. */
	white-space: nowrap;
}

.ussd-code a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}
/*
Theme Name:  ریحانه
Theme URI:   https://reyhaneh-charity.ir/
Author:      Navid
Description: قالب اختصاصی بلوکی موسسهٔ نیکوکاری ریحانه‌النبی. راست‌چین، سبک، بدون هیچ وابستگی خارجی.
Version:     0.27.2
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.2
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reyhaneh
Tags:        block-theme, rtl-language-support, full-site-editing, one-column, accessibility-ready
*/

/*
 * theme.json is the source of truth for tokens. This file only carries what
 * theme.json cannot express: the responsive root scale, the variable-font axis
 * setup, and the reduced-motion baseline.
 */

/*
 * The only two breakpoints this theme owns, and they exist for typography
 * alone. Layouts use grid with minimumColumnWidth instead, so they need none.
 * Core owns 782px (columns stacking, nav overlay) and that is not ours to
 * move. See design-tokens.md § breakpoints before adding a third.
 *
 * Percentages, not pixels: 106.25% of a 16px default is the 17px from
 * design-tokens.md, while still honouring a reader's own browser font size.
 */
/*
 * WordPress sets border-box on its own blocks, one block class at a time, and
 * nowhere else. Anything this theme writes by hand inside a core/html block is
 * therefore content-box, and its padding is added to whatever width it is
 * given rather than taken out of it.
 *
 * That is how the section nav came to sit wider than the hero above it: same
 * max-width, but the nav's own padding hung off the outside of it. Setting it
 * once here rather than per component means the next hand-written element does
 * not have to remember.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	font-size: 106.25%;
}

@media (min-width: 700px) {
	html {
		font-size: 112.5%;
	}
}

@media (min-width: 1000px) {
	html {
		font-size: 118.75%;
	}
}

/*
 * Everything the browser makes bold by default asks for 700, and this font is
 * declared as 300-600. Chrome answers by clamping to 600 and the page looks
 * right; iOS Safari instead synthesises the weight itself, and a synthetic
 * bold breaks Persian shaping, dropping the joined forms of some letters as
 * missing glyphs. Naming a weight inside the range removes the question.
 *
 * The headings are handled in theme.json, where their other type lives. These
 * are the tags the institution can reach from the editor's own bold button.
 */
strong,
b,
th {
	font-weight: 600;
}

/* ─── Heading scale on a phone ───────────────────────────────────────── */

/*
 * A heading's size in this theme comes from the size class it wears, not from
 * its level, and that is deliberate: an h2 is a section title in the middle of
 * a page and a column label in the footer, and those should not look alike.
 *
 * On a phone that freedom broke the order. The titles at the top of a page had
 * been brought down to suit the width and the ones inside it had not, so a
 * section title could stand larger than the page's own title above it.
 *
 * The fix is not a size per heading but a value per level for the presets that
 * level can wear. A heading then resolves whatever class it carries against a
 * number chosen for its rank, and one carrying a deliberately small size, like
 * the xs footer titles, is left alone because that preset is not redefined.
 *
 * Redefining the preset also settles the preset classes without an !important
 * of its own: they read the custom property, so they are handed a different
 * number instead of being fought.
 */
@media (max-width: 599px) {
	h1 {
		--wp--preset--font-size--display: 2.1rem;
		--wp--preset--font-size--xxl: 2.1rem;
	}

	h2 {
		--wp--preset--font-size--xxl: 1.6rem;
		--wp--preset--font-size--xl: 1.6rem;
	}

	h3 {
		--wp--preset--font-size--l: 1.25rem;
	}
}

/*
 * Abar VF carries two axes: wght and CNTR (0-100, stroke contrast, the
 * Low/Mid/High split of the static family). font-weight drives wght on its own;
 * CNTR has to be stated or it falls back to 0.
 *
 * The site uses Mid contrast and only four weights: 300 Light, 400 Regular,
 * 500 Medium, 600 Semibold. theme.json declares the face as 300-600, so a weight
 * outside that band is clamped by the browser rather than silently rendered.
 */
body {
	font-variation-settings: "CNTR" var(--wp--custom--font--contrast, 0);
	font-feature-settings: "kern" on, "liga" on;
	text-rendering: optimizeLegibility;
}

/* Persian numerals and the Arabic comma read better with the Persian locale. */
:where(body) {
	font-language-override: normal;
}

/*
 * Fragment links travel rather than teleport, so a jump to a section reads as
 * having gone somewhere on this page instead of having landed on another one.
 *
 * Document wide, because scroll-behavior belongs to the thing that scrolls, not
 * to the link that asks it to. The rule below turns it off for anyone who has
 * asked for less movement, and gallery.js states its own behaviour explicitly
 * so it is unaffected either way.
 */
html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-delay: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------------------------------------------------------------- canvas */

/*
 * A wash over the top of every page, from the deepest of the three creams down
 * to the page's own. It gives the boxes their ground: a card sitting on this
 * reads as a card, where on flat cream its edge disappeared.
 *
 * surface-2 is the colour the cards on the front page are filled with, so the
 * top of the page and the things sitting on it are made of the same three
 * creams. Still no fourth colour and still no shadow.
 */
body {
	background-image: linear-gradient(
		to bottom,
		var(--wp--preset--color--surface-2) 0,
		var(--wp--preset--color--bg) 110vh
	);
	background-repeat: no-repeat;
}

/* ------------------------------------------------------------------ links */

/*
 * Links never carry an underline, in any state. Colour alone marks them.
 * Keyboard focus keeps a visible ring instead, because a colour change is
 * not enough on its own to show where the keyboard is.
 */
:where(a):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

.is-on-accent :where(a):focus-visible,
.site-footer :where(a):focus-visible {
	outline-color: var(--wp--preset--color--bg);
}

/* ---------------------------------------------------------------- header */

/*
 * Sticky lives on the template part wrapper, not on the inner group. A sticky
 * element can only travel inside its own parent, and the wrapper is the child
 * of .wp-site-blocks that spans the whole page.
 */
/*
 * Stated once. The in-page navigation on long pages parks directly under the
 * header, so the two have to agree on how tall it is.
 */
:root {
	--reyhaneh-header-height: 5.5rem;
}

/*
 * On screen the whole way down. It used to slide out of the way on a scroll
 * down and come back on a scroll up; it does not any more, so the only thing
 * that changes about it is its ground.
 */
/*
 * At rest the header should stand as far from the top of the window as it
 * stands from what follows it, and what follows is one block gap away.
 *
 * The space is padding on the wrapper, not margin on the header, for two
 * reasons. A top margin on the header would collapse straight through the
 * wrapper and do nothing, because the header is its first child. And putting
 * it inside the header would change the header's own height, which is sticky:
 * a height that shrank on scroll would jerk the whole page up the moment it
 * pinned. As padding above, the header keeps one height and the gap simply
 * scrolls away.
 */
.wp-site-blocks {
	padding-block-start: var(--wp--style--block-gap);
}

header.wp-block-template-part {
	position: sticky;
	inset-block-start: 0;
	z-index: 10;
	transition: background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

/*
 * At the top the header has no ground of its own and shows the page cream. It
 * only turns white once the page has moved under it, which is what separates
 * it from the content it now floats over.
 */
header.wp-block-template-part.is-stuck {
	background-color: var(--wp--preset--color--white);
}

/* The hairline appears with the solid ground, not before it. */
.site-header {
	border-block-end: 1px solid transparent;
	transition: border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.is-stuck .site-header {
	border-block-end-color: var(--wp--preset--color--surface);
}

.site-header .site-header__inner {
	min-height: var(--reyhaneh-header-height);
}

/*
 * Logo start, nav dead centre, call to action end. The two outer zones share
 * the leftover space equally, which is what actually centres the nav.
 */
.site-header .site-header__brand,
.site-header .site-header__end {
	flex: 1 1 0;
	min-width: 0;
}

.site-header .site-header__nav {
	flex: 0 0 auto;
}

.site-header .site-header__brand .wp-block-site-logo img {
	display: block;
	height: auto;
}

/*
 * Below the navigation's own breakpoint, 600px, the header has to carry a
 * logo, a hamburger and a call to action across 390px and all three come out
 * cramped. The call to action leaves the row for the bottom of the screen,
 * where a thumb already rests. With it gone the logo's flex-grow pushes the
 * hamburger to the far end on its own, so nothing has to be reordered.
 */
@media (max-width: 599px) {
	/*
	 * Fixed resolves against the viewport even though the header is sticky:
	 * sticky is not one of the things that makes a containing block for a
	 * fixed child. The open menu overlay carries z-index 100000 inside this
	 * same stacking context, so it covers the button, which is what should
	 * happen.
	 */
	.site-header .site-header__end {
		position: fixed;
		inset-block-end: var(--wp--preset--spacing--40);
		inset-inline-end: var(--wp--preset--spacing--40);
	}

	/*
	 * Filled here, where in the header it is an outline. Floating over
	 * whatever scrolls underneath, an outline button shows the page through
	 * itself, and this theme lifts nothing off a page with a shadow.
	 */
	.site-header__end .wp-block-button__link {
		background-color: var(--wp--preset--color--accent);
		color: var(--wp--preset--color--on-accent);
	}

	/*
	 * Room under the last line of the page. The footer's own bottom padding is
	 * an inline style from the block, so the space is given to the block that
	 * ends the footer rather than fought for with !important.
	 */
	.site-footer__legal {
		padding-block-end: var(--wp--preset--spacing--60);
	}

	/*
	 * Bigger than the 1.5rem this theme gives a control icon: on a phone the
	 * hamburger is the only way into the menu, and at the control size it read
	 * as an afterthought beside the logo.
	 *
	 * Green, not ink. It is the one thing in the header that does something,
	 * now that the call to action has left the row, and the accent is how this
	 * site says so. The icon inherits fill from currentColor, so the colour
	 * goes on the button.
	 */
	.site-header .wp-block-navigation__responsive-container-open {
		color: var(--wp--preset--color--accent);
	}

	.site-header .wp-block-navigation__responsive-container-open svg {
		width: 2.5rem;
		height: 2.5rem;
	}

	/*
	 * The close button stands exactly where the hamburger stood, at the same
	 * size, so the control does not jump under the thumb that just pressed it.
	 *
	 * Its offset is built from the same tokens that place the hamburger rather
	 * than copied as a number, and it has two values because the header does:
	 * at rest the header sits one block gap down the page, and once stuck it
	 * sits against the top. The close button is inside the header, so the
	 * stuck class reaches it.
	 */
	header.wp-block-template-part {
		--reyhaneh-burger-top: calc(
			var(--wp--style--block-gap) +
				(var(--reyhaneh-header-height) - 2.5rem) / 2
		);
	}

	header.wp-block-template-part.is-stuck {
		--reyhaneh-burger-top: calc((var(--reyhaneh-header-height) - 2.5rem) / 2);
	}

	/* Named through .site-header to outrank core's own top/left on the button. */
	.site-header .wp-block-navigation__responsive-container-close {
		position: fixed;
		inset: auto;
		inset-block-start: var(--reyhaneh-burger-top);
		inset-inline-end: var(--wp--preset--spacing--40);
	}

	.site-header .wp-block-navigation__responsive-container-close svg {
		width: 2.5rem;
		height: 2.5rem;
	}

	/*
	 * Core sets the open overlay's padding from root padding presets this
	 * theme does not define. An empty var inside a clamp is invalid at
	 * computed-value time, which does not drop the declaration: it wins the
	 * cascade and then resolves to zero, so the menu runs to the screen edge
	 * and no plainer rule on that element can reach past it.
	 *
	 * The inset goes on the content inside instead, where core only ever sets
	 * padding-top, and is matched to the inset the header's own row keeps.
	 */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-container-content {
		padding-inline: var(--wp--preset--spacing--40);
	}

	/*
	 * One value for both actions at the foot of the menu, so the circle stands
	 * exactly as tall as the button beside it without either height being
	 * measured, or written down twice and left to drift apart.
	 */
	.wp-block-navigation__responsive-container.is-menu-open {
		--reyhaneh-menu-action: 3.5rem;
		--reyhaneh-menu-line: color-mix(
			in srgb,
			var(--wp--preset--color--bg) 25%,
			transparent
		);
	}

	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content {
		/* Nine tenths of 1.6rem. */
		font-size: 1.44rem;
	}

	/*
	 * A rule between the items rather than a gap around them, so the line has
	 * an even space on each side of it and the list reads as one column.
	 *
	 * The element is in the selector on purpose: core hands the list its gap
	 * with `gap: inherit` from three classes deep, and a plain class selector
	 * ties with that and loses. One element name gets past it without an
	 * !important having to be introduced.
	 */
	.site-header .is-menu-open
		.wp-block-navigation__responsive-container-content
		ul.wp-block-navigation__container {
		gap: 0;
		/*
		 * Core aligns the column to the reading edge, which leaves the list as
		 * wide as its widest word. The items can then stretch all they like and
		 * a rule under them still starts halfway across the screen.
		 */
		align-self: stretch;
	}

	/*
	 * Named by what each item is, not by .wp-block-navigation-item on its own:
	 * core wraps the social icons in an item that carries only that class, and
	 * a rule taking all of them would draw a line under an invisible row. A
	 * link, the home link and a submenu each name themselves, so listing the
	 * three covers everything the institution can put in a menu.
	 *
	 * stretch so every item is the width of the menu and every rule is the
	 * same length, and a negative inline margin against a matching padding so
	 * the rule runs edge to edge while the words keep their inset.
	 */
	.site-header .is-menu-open .wp-block-navigation__container
		> .wp-block-navigation-item.wp-block-navigation-link,
	.site-header .is-menu-open .wp-block-navigation__container
		> .wp-block-navigation-item.wp-block-home-link,
	.site-header .is-menu-open .wp-block-navigation__container
		> .wp-block-navigation-item.wp-block-navigation-submenu {
		align-self: stretch;
		margin-inline: calc(var(--wp--preset--spacing--40) * -1);
		/* Nine tenths of the 1rem this list used to breathe by. */
		padding-block: 0.9rem;
		padding-inline: var(--wp--preset--spacing--40);
		border-block-start: 1px solid var(--reyhaneh-menu-line);
	}

	/* Between the items means neither above the first nor below the last. */
	.site-header .is-menu-open .wp-block-navigation__container
		> .wp-block-navigation-item.wp-block-navigation-link:first-child,
	.site-header .is-menu-open .wp-block-navigation__container
		> .wp-block-navigation-item.wp-block-home-link:first-child {
		padding-block-start: 0;
		border-block-start: 0;
	}

	/*
	 * The overlay stretches to the screen, but the three boxes between it and
	 * the menu do not, so there is nothing for an auto margin to push against.
	 * This opens that chain; the call to action then takes the slack and lands
	 * on the floor.
	 */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-close,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-dialog {
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.site-header .wp-block-navigation__responsive-container.is-menu-open
		div.wp-block-navigation__responsive-container-content {
		position: relative;
		flex: 1;
		/*
		 * Core leaves room for a 24px close button; this one is 2.5rem and sits
		 * a header's offset down the screen, so the first item was landing
		 * beside it rather than under it. Built from the same three values that
		 * place the button, and one class deeper than core's own rule so it
		 * does not come down to which stylesheet loaded last.
		 */
		padding-block-start: calc(
			var(--reyhaneh-burger-top) + 2.5rem + var(--wp--preset--spacing--40)
		);
		padding-block-end: var(--wp--preset--spacing--40);
	}

	.site-header .is-menu-open .wp-block-buttons.menu-cta {
		display: flex;
		margin-block-start: auto;
	}

	/*
	 * Lifted out of the column to stand at the far end of the button's own
	 * line. Both are held to the same bottom edge, so their feet agree without
	 * either height being named, and the inline offset repeats the container's
	 * padding because an absolute box is measured from outside it.
	 *
	 * The list core wrapped the icons in is what moves, not the icons: leaving
	 * the wrapper in the column would hold a blank row open under them.
	 */
	.site-header .is-menu-open ul.wp-block-navigation__container:has(.menu-social) {
		display: flex;
		position: absolute;
		inset-block-end: var(--wp--preset--spacing--40);
		inset-inline-end: var(--wp--preset--spacing--40);
		margin: 0;
		padding: 0;
	}

	.site-header .is-menu-open .wp-block-social-links.menu-social {
		display: flex;
		margin: 0;
	}

	/*
	 * Reversed: the button wears the accent everywhere else, and here the
	 * ground is the accent, so it takes the ground's colour instead.
	 */
	.is-menu-open .menu-cta .wp-block-button__link {
		display: inline-flex;
		align-items: center;
		min-height: var(--reyhaneh-menu-action);
		background-color: var(--wp--preset--color--on-accent);
		border-color: var(--wp--preset--color--on-accent);
		color: var(--wp--preset--color--accent);
		font-size: var(--wp--preset--font-size--m);
	}

	/*
	 * Core builds this circle from the icon's own em plus a padding on the
	 * link inside it, which is why the height is set on the box and the icon
	 * is set from the box's font size rather than from a width.
	 */
	.site-header .is-menu-open .menu-social .wp-social-link {
		display: grid;
		place-items: center;
		width: var(--reyhaneh-menu-action);
		height: var(--reyhaneh-menu-action);
		font-size: 1.5rem;
		border-radius: var(--wp--preset--border-radius--round);
		/*
		 * The deep green, and the fill matters as much as the shade: core paints
		 * a social icon in its service's own brand colour, and Instagram's is a
		 * magenta that is the one colour on this site outside its palette.
		 *
		 * Filled rather than outlined, so it reads as the quieter twin of the
		 * cream button beside it: same size, same line, less voice.
		 */
		background-color: var(--wp--preset--color--accent-deep);
		color: var(--wp--preset--color--on-accent);
	}

	.site-header .is-menu-open .menu-social .wp-social-link a {
		display: grid;
		place-items: center;
		padding: 0;
		color: inherit;
	}

	/*
	 * The hero was given a wider inset than the cards below it, which reads as
	 * hierarchy on a desktop and as waste on a phone: 68px a side out of a
	 * 339px box left the opening line about 200px to live in. Matched to the
	 * cards so every box on the page holds its text at the same distance.
	 *
	 * !important because the padding is an inline style the block writes, and
	 * an inline style outranks any selector without it.
	 */
	.intro {
		padding-inline: var(--wp--preset--spacing--50) !important;
	}
}

/* ---------------------------------------------------------------- buttons */

/*
 * Everything about how a button looks lives in theme.json: the base in
 * styles.elements.button, the two variants in styles.blocks.core/button.
 * Only two things are left here, and neither can be said in theme.json.
 */

/*
 * On any dark surface the accent green loses its contrast, so buttons flip to
 * cream. theme.json has no ancestor selector, so this is the one button rule
 * that has to be written as CSS. `.is-on-accent` marks a green section.
 */
.site-footer .wp-block-button__link,
.page-hero .wp-block-button__link,
.is-on-accent .wp-block-button__link {
	background-color: var(--wp--preset--color--bg);
	border-color: var(--wp--preset--color--bg);
	color: var(--wp--preset--color--ink);
}

.site-footer .wp-block-button__link:hover,
.site-footer .wp-block-button__link:focus,
.page-hero .wp-block-button__link:hover,
.page-hero .wp-block-button__link:focus,
.is-on-accent .wp-block-button__link:hover,
.is-on-accent .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	outline-color: var(--wp--preset--color--bg);
}

.site-footer .is-style-outline > .wp-block-button__link,
.page-hero .is-style-outline > .wp-block-button__link,
.is-on-accent .is-style-outline > .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--bg);
}

.site-footer .is-style-quiet > .wp-block-button__link,
.page-hero .is-style-quiet > .wp-block-button__link,
.is-on-accent .is-style-quiet > .wp-block-button__link {
	background-color: transparent;
	border-color: transparent;
	color: var(--wp--preset--color--bg);
}

/* ----------------------------------------------------------------- forms */

/*
 * With the button inside, the search block draws its frame on the wrapper, not
 * on the input, so theme.json's textInput radius never reaches the visible box.
 * The wrapper has to be rounded here, and the inner field stripped bare.
 */
.wp-block-search__button-inside .wp-block-search__inside-wrapper {
	align-items: center;
	border: 1px solid var(--wp--preset--color--ink-soft);
	border-radius: var(--wp--preset--border-radius--input);
	background-color: var(--wp--preset--color--bg);
	padding: 0.3rem;
}

.wp-block-search__button-inside .wp-block-search__input {
	border: 0;
	background: transparent;
	padding-block: 0.55em;
	/*
	 * The field had no inline padding of its own, so the text began at the
	 * wrapper's own 0.3rem and sat against the edge. More at the start, where
	 * the text begins, than at the end, where the button already keeps its
	 * distance.
	 */
	padding-inline: 1.1em 0.6em;
}

/*
 * The submit button is a button like any other: same size, same padding, same
 * radius. Core stretches it to the wrapper and adds its own margin; both are
 * undone here so it matches a standalone button exactly.
 */
.wp-block-search__button-inside .wp-block-search__button {
	align-self: center;
	flex: 0 0 auto;
	margin: 0;
	border-radius: var(--wp--preset--border-radius--btn);
}

.wp-block-search__button-inside .wp-block-search__input:focus {
	outline: none;
}

/* The frame takes the focus ring so the whole control reads as one field. */
.wp-block-search__button-inside .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--accent);
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
}

/* ------------------------------------------------------------------ hero */

/*
 * The signature shape of the reference: a rounded box, never an edge-to-edge
 * banner. The cover falls back to a flat ink panel when a post has no featured
 * image; the tree carries the identity instead.
 */
.page-hero,
.archive-hero,
.error-hero {
	position: relative;
	/* Above the section nav, which tucks its top edge underneath this box. */
	z-index: 2;
	overflow: hidden;
	min-height: 20rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/*
 * Everything inside a hero sits above the tree. Without this the tree, being
 * the only positioned thing in the box, paints straight over the text.
 */
.page-hero > *,
.archive-hero > *,
.error-hero > *,
.feature-quote > * {
	position: relative;
	z-index: 1;
}

/*
 * The institution's tree, cropped by the box and sitting a shade darker than
 * the ground it stands on. It is drawn as a mask rather than an <img> so the
 * colour comes from CSS: one file serves every tint we might want, and the
 * shape never needs a second copy in a second green.
 */
.page-hero::before,
.archive-hero::before,
.error-hero::before,
.feature-quote::before {
	content: "";
	position: absolute;
	z-index: 0;
	inset-block: -12% -22%;
	inset-inline-end: -2%;
	aspect-ratio: 1;
	background-color: var(--wp--custom--color--tree);
	-webkit-mask: url("assets/img/tree.svg") no-repeat center / contain;
	mask: url("assets/img/tree.svg") no-repeat center / contain;
	pointer-events: none;
}

/*
 * The 404 box is white and much taller than a hero, so the tree would grow with
 * it and swamp the page. Pinned to a height instead of the box, and faded back
 * to a tint so the message and the search field stay the loudest thing here.
 */
.error-hero::before {
	/* Sitting on the bottom edge, not hanging past it. */
	inset-block: auto 0;
	height: 26rem;
	opacity: 0.16;
}

/*
 * Title and deck keep to the reading half so the tree never crowds them. The
 * hero group is a default layout, not constrained: a constrained parent hands
 * every child margin-inline: auto !important, which centred the title the
 * moment it was given a max-width.
 */
.page-hero .wp-block-post-title,
.archive-hero .wp-block-query-title,
.page-hero__deck {
	position: relative;
	margin-block: 0;
	max-width: 42ch;
}

.page-hero .wp-block-post-title,
.archive-hero .wp-block-query-title {
	text-wrap: balance;
}

.page-hero__deck {
	/* Mid Light, the lightest of the four sanctioned weights. */
	font-weight: 300;
	color: color-mix(in srgb, var(--wp--preset--color--bg) 82%, transparent);
	line-height: var(--wp--custom--line-height--body);
}

/*
 * On a phone the green hero at the top of a page follows the front page's
 * hero: the same inset from the box edge, and a title at the same size as
 * the opening line there. Every box on a phone then holds its text at one
 * distance, and every page opens at one size.
 */
@media (max-width: 599px) {
	/* !important because the padding is an inline style the block writes. */
	.page-hero,
	.error-hero {
		padding-inline: var(--wp--preset--spacing--50) !important;
	}
}

/*
 * post-excerpt wraps its text in its own paragraph, which arrives with core's
 * margins. Zeroing it here is safe: that paragraph is inside the block, not a
 * child of the hero group, so the group's blockGap never runs through it.
 */
.page-hero__deck p {
	margin-block: 0;
	/*
	 * Balanced wrapping rather than a line clamp: the browser evens the lines
	 * out so a deck never ends on a single orphaned word, and a longer one
	 * grows the box instead of being cut off. A clamp would have forced
	 * display: -webkit-box here, and text-wrap: balance is ignored inside one.
	 */
	text-wrap: balance;
}

@media (max-width: 700px) {
	.page-hero,
	.archive-hero {
		min-height: 12rem;
	}

	.page-hero::before,
	.archive-hero::before {
		opacity: 0.55;
	}

	.page-hero .wp-block-post-title,
	.archive-hero .wp-block-query-title,
	.page-hero__deck {
		max-width: 100%;
	}
}

/*
 * Category and date under the deck of a post's hero.
 *
 * The archive card frames its date in a bordered pill because it sits on the
 * cream ground and needs an edge to read as a tag. Here the row sits on the
 * green, where the contrast is already doing that work, so the frame would
 * only add weight. Sized and dimmed instead, which is the same tool the deck
 * above it uses.
 */
.post-hero__meta {
	/* The deck holds itself to the reading half; this row follows it. */
	max-width: 42ch;
	align-items: baseline;
}

.post-hero__cat,
.post-hero__date {
	margin-block: 0;
	color: color-mix(in srgb, var(--wp--preset--color--bg) 70%, transparent);
}

/*
 * theme.json paints every link the institution's green, which is invisible on
 * the green hero. The category is the one link in this box, so it takes the
 * ground colour instead and separates from the date beside it by being solid
 * rather than dimmed.
 */
.post-hero__cat a {
	color: var(--wp--preset--color--bg);
}

.post-hero__cat a:hover,
.post-hero__cat a:focus {
	color: color-mix(in srgb, var(--wp--preset--color--bg) 78%, transparent);
}

/*
 * A middot rather than a gap alone, so the two read as one line of attribution
 * instead of two loose labels. Attached to the date and conditioned on the
 * category preceding it: an uncategorised post would otherwise open its line
 * with a stray dot.
 */
.post-hero__cat + .post-hero__date::before {
	content: "·";
	margin-inline-end: var(--wp--preset--spacing--30);
}

.archive-hero .wp-block-term-description {
	margin-block-end: 0;
	max-width: 46ch;
}

/* ------------------------------------------------------- front sections */

/*
 * The hero is a framed box like every other section, and the lightest surface
 * on the page. It sits on the cream wash, which is what makes its frame read.
 */
/*
 * The tree is square and stands on the floor of this box, so the box's height
 * is the only thing that decides how big it can be. This is taller than a hero
 * needs to be for its three lines of type; the extra is the tree's.
 */
.intro {
	position: relative;
	/*
	 * The tree is drawn larger than this box and runs off its end edge. The box
	 * cuts it there, at the rounded corner, which is the whole point: a tree
	 * cropped by its frame reads as bigger than the frame, where the same tree
	 * fitted inside would just read as small.
	 */
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 56vh;
}

/* The words stay above the tree; only the tree is allowed underneath them. */
.intro > :not(.intro__tree) {
	position: relative;
	z-index: 1;
}

/*
 * The tree takes the whole end half of the box, floor to ceiling. Absolute
 * positioning is measured from the padding box, so none of the box's own
 * padding pushes it off the edge.
 *
 * Taller than the box it stands in, and pushed past its end edge, so the box
 * crops it on two sides. Everything is a share of the box: the tree keeps the
 * same relationship to its frame at any window size.
 *
 * Height drives it and aspect-ratio derives the width, because the tree is
 * square and it is the floor-to-ceiling reach that the eye reads as its size.
 */
.intro__tree {
	position: absolute;
	inset-block-end: 0;
	inset-inline-end: -6%;
	z-index: 0;
	height: 114%;
	aspect-ratio: 22.03 / 22.05;
	color: var(--wp--preset--color--accent);
	pointer-events: none;
}

.intro__tree svg {
	display: block;
	width: 100%;
	height: 100%;
}

/*
 * On a narrow screen the heading needs the whole box, so the tree stops being a
 * thing beside the words and becomes a watermark behind them.
 */
@media (max-width: 47.99em) {
	.intro__tree {
		inset-inline-end: 0;
		/* Uncropped here: behind the heading, a cut tree just reads as a smudge. */
		height: auto;
		width: 76%;
		opacity: 0.12;
	}
}

/*
 * A phone's hero is tall and narrow, and a tree sized by its width grew to
 * fill the box from top to bottom, standing behind the heading rather than
 * under it. Two thirds of the box, measured up from the floor, keeps it below
 * the words. Back to height driving it and aspect-ratio deriving the width,
 * the way it works everywhere else.
 */
@media (max-width: 599px) {
	.intro__tree {
		height: 80%;
		width: auto;
		/*
		 * At this height the tree is wider than the box, so it will be cut
		 * whatever happens; the question is only where. Pushed far enough past
		 * the end edge that the cut falls on that side and the trunk sits left
		 * of centre, rather than the tree being trimmed evenly and reading as
		 * centred.
		 */
		inset-inline-end: -35%;
	}
}

/* ─── The tree leafing out ───────────────────────────────────────────── */

/*
 * The eleven groups are the leaves of the logo dealt out at random, so each
 * batch is scattered over the whole crown and the tree fills in all over at
 * once rather than in rings working outwards.
 *
 * Only opacity and transform move. The scale is anchored at the fork, which is
 * why the leaves seem to travel out along the branches rather than swell in
 * place.
 *
 * This rule set carries no hidden state: with no stylesheet class on the page,
 * the tree is in full leaf. The head hides it a moment before the first paint,
 * and only when there is a script to bring it back.
 */
/*
 * Each leaf carries its own transform-origin, written into the SVG: the point
 * on that leaf nearest the branch it hangs from. So a leaf opens outwards along
 * its own branch, which is the direction a leaf actually grows. One shared
 * origin under the trunk had every leaf on the tree arriving from below.
 *
 * The origin is in viewBox coordinates, which is what transform-box: view-box
 * makes the numbers mean.
 *
 * The leaves animate, not the eleven groups. The groups still set the timing:
 * --stage is a custom property so it inherits down to the paths, and the delay
 * is built from it there. The repainted area is the same either way; what
 * changes is that each leaf can now move on its own terms.
 *
 * Opacity finishes well before the scale does, on purpose. The growing is the
 * point, and a leaf that is still half transparent while it grows is a leaf
 * whose growing nobody sees.
 */
.tree__stage path {
	transform-box: view-box;
	transition: opacity 1000ms ease, transform 1900ms cubic-bezier(0.2, 0.75, 0.3, 1);
}

.tree-armed .tree__stage path {
	opacity: 0;
	transform: scale(0.2);
}

/*
 * Wins over the line above on specificity, not on order, so the two can never
 * end up fighting over which was written last.
 */
.tree.is-grown .tree__stage path {
	opacity: 1;
	transform: none;
	transition-delay: calc(var(--stage) * 400ms);
}

/*
 * Once the leaves are out they never stop moving, very slightly, the way a tree
 * never quite stands still.
 *
 * The sway is on the eleven groups, not on the leaves, and it turns them about
 * the fork of the trunk, so the crown moves at its edges and barely at all near
 * the middle. That is where a tree actually bends. Each group runs at its own
 * length and starts at its own moment, so they drift out of step with each
 * other and the crown shimmers instead of rocking as one slab.
 *
 * Each group starts the instant its own leaves have finished arriving, which
 * makes the movement spread through the tree in the order the leaves did.
 *
 * Under a degree of turn. At this size that is about two pixels at the outside
 * of the crown, which is the point: noticed rather than watched.
 */
/*
 * Nothing moves on its own. The tree came with a constant sway and a per leaf
 * flutter and both are gone: a page that never stops moving is a page you
 * cannot rest your eyes on, and the movement rode over the growth as well,
 * because an animation's delay counts from when the page loaded while the
 * growth starts when the tree comes into view. The two never lined up, and
 * leaves jumped as the animation took a half grown leaf off the transition.
 *
 * What is left moves only when the reader does.
 *
 * Each group answers the pointer its own way, and that is the whole point of
 * the groups being scattered: --pull is signed, so some of them turn with the
 * pointer and some against it, and since every group has leaves all over the
 * crown, two leaves side by side will often be going opposite ways.
 *
 * One multiplier for turn, one for a small sideways drift, one for how long the
 * group takes to settle. All three are written into the SVG, one set per group
 * from a fixed seed. A single shared angle, which is what this was, moves the
 * whole crown one way and reads as a printed sheet being tilted.
 */
.tree__stage {
	transform-box: view-box;
	transform-origin: 48% 71%;
	transform: rotate(calc(var(--tree-lean, 0) * var(--pull, 1) * 1deg))
		translate(calc(var(--tree-lean, 0) * var(--drift, 0) * 1px), 0);
	transition: transform var(--settle, 1200ms) cubic-bezier(0.22, 0.8, 0.3, 1);
}

.tree__crown {
	transform-box: view-box;
	transform-origin: 48% 78%;
	transform: rotate(calc(var(--tree-lean, 0) * 0.35deg));
	transition: transform 1500ms cubic-bezier(0.22, 0.8, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
	.tree__stage path,
	.tree.is-grown .tree__stage path {
		transition: none;
	}

	.tree-armed .tree__stage path {
		opacity: 1;
		transform: none;
	}

	.tree__stage,
	.tree__crown {
		transform: none;
		transition: none;
	}
}

/* The opening line is the loudest thing on the site; it needs room to breathe. */
.intro__eyebrow {
	margin-block: 0;
	color: var(--wp--preset--color--accent);
}

.intro__line {
	/* The eyebrow above is small; it needs more air than the blockGap gives. */
	margin-block-start: var(--wp--preset--spacing--60);
	max-width: 20ch;
	text-wrap: balance;
	line-height: var(--wp--custom--line-height--tight);
}

/*
 * No margin-block: 0 here. The group carries a blockGap and core builds that gap
 * out of margin-block-start on every child after the first; zeroing it wins on
 * the front end but loses inside the editor, which is exactly how the two views
 * drifted apart. Let the blockGap do the spacing.
 */
.intro__lede {
	max-width: 40ch;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 75%, transparent);
}

/*
 * The box introduces itself in the order it reads: whose it is, what they do,
 * and then the list, a part at a time.
 *
 * Pure CSS and no class to wait for, because this box is the first thing on the
 * page and there is nothing to scroll to. animation-fill-mode: both is what
 * holds each line out of sight through its own delay; without it they would all
 * be visible from the first frame and only then start moving.
 *
 * The delays are cumulative on purpose rather than one shared rhythm: the
 * heading waits for the eyebrow, and the first part of the list waits for the
 * heading, so the timing survives any of them changing length.
 */
/*
 * In from the start edge, along the line the words are read on.
 *
 * A positive translateX is a move to the right, which on a right-to-left page
 * is the side reading begins from. There is no logical translate to write this
 * with, so an English version of the site would need the sign flipped here.
 */
@keyframes reyhaneh-rise {
	from {
		opacity: 0;
		transform: translateX(1rem);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.intro__eyebrow {
	animation: reyhaneh-rise 1950ms ease both;
}

.intro__line {
	animation: reyhaneh-rise 2550ms ease 1150ms both;
}

/*
 * One span per comma, built in inc/intro.php from whatever the sentence says,
 * so the stagger follows the writing rather than a count fixed here.
 */
.intro__part {
	display: inline-block;
	animation: reyhaneh-rise 1500ms ease calc(3200ms + var(--part, 0) * 520ms) both;
}

/* The space between parts belongs outside them, or it moves with the part. */
.intro__part + .intro__part {
	margin-inline-start: 0.3em;
}

/* A small muted label above a section, per design-tokens.md. */
.section-label {
	font-weight: 400;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
	margin-block: 0;
}

/* Section title on one side, the quiet link out on the other. */
.section-head {
	gap: var(--wp--preset--spacing--30);
}

.section-head h2 {
	margin-block: 0;
}

.unit__handle a {
	text-decoration: none;
}

.unit__handle a:hover,
.unit__handle a:focus {
	color: var(--wp--preset--color--accent-hover);
}

/*
 * The same green as every other box on the site, and the same tree behind it.
 * It used to be the one box in the deeper green, which read as a different kind
 * of thing rather than as the same site saying something quietly.
 *
 * Not folded into the hero rule above, because that one also sets a minimum
 * height and centres its contents on a column, and this box is neither: it is
 * as tall as the sentence in it.
 */
.feature-quote {
	position: relative;
	overflow: hidden;
}

/*
 * Bigger than the box is tall, and hung so that only the crown falls inside it.
 * The trunk is the bottom quarter of the drawing, and here it sits below the
 * floor of the box and is cut off: what shows is branches and leaves.
 *
 * The height is what sets the size, and the square ratio turns it into a width
 * of about a third of the box.
 */
.feature-quote::before {
	inset-block: -85% -92.5%;
	inset-inline-end: 0;
}

.feature-quote blockquote {
	margin-block: 0;
	border: 0;
	padding: 0;
	text-align: center;
}

.feature-quote blockquote p {
	margin-block: 0;
	line-height: var(--wp--custom--line-height--heading);
}

/* Cream-surface version. `.is-on-accent cite` at the end of this file overrides it. */
.feature-quote cite {
	display: block;
	margin-block-start: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--s);
	font-style: normal;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

/* Numbers carry the weight here, so the label sits back and the figure leads. */
/*
 * The icon leads the figure the way it does on the report cards, so a row of
 * numbers on the front page and a row of numbers on the report page are read
 * as the same kind of object.
 */
.stat__icon {
	margin-block-end: var(--wp--preset--spacing--30);
}

.stat__value {
	margin-block: 0;
	font-weight: 600;
	line-height: var(--wp--custom--line-height--tight);
}

/*
 * Material Symbols Sharp, weight 200, drawn inline so the eight icons cost no
 * extra requests. currentColor is what lets one CSS rule recolour all of them.
 */
.service__icon {
	display: block;
	color: var(--wp--preset--color--accent);
	padding-block-end: var(--wp--preset--spacing--20);
}

.stat__label {
	color: color-mix(in srgb, var(--wp--preset--color--ink) 65%, transparent);
}

/* The two gateway cards and the service list share the same quiet link list. */
.gateway__links {
	list-style: none;
	padding-inline-start: 0;
	line-height: 2.1;
}

.gateway__links a {
	text-decoration: none;
}

.gateway__links a:hover,
.gateway__links a:focus {
	color: var(--wp--preset--color--accent-hover);
}

.gateway .wp-block-buttons {
	margin-block-start: var(--wp--preset--spacing--20);
}

/*
 * The services read as a list of principles, not as cards: a hairline above
 * each one instead of a box around it, exactly as in the reference.
 */
.service {
	border-block-start: 1px solid var(--wp--preset--color--ink-soft);
	padding-block-start: var(--wp--preset--spacing--30);
}

.service p {
	color: color-mix(in srgb, var(--wp--preset--color--ink) 75%, transparent);
}

/* ------------------------------------------------------------ news cards */

.news-card__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--preset--border-radius--card);
}

/*
 * The photos come from the institution's Instagram, where the post template
 * puts a green band across the bottom of every image. Cropping from the top
 * keeps the subject and leaves the band outside the frame.
 */
.news-card__media img {
	display: block;
	width: 100%;
	object-position: center top;
	transition: transform var(--wp--custom--motion--duration-image) var(--wp--custom--motion--ease);
}

.news-card:hover .news-card__media img,
.news-card:focus-within .news-card__media img {
	transform: scale(1.05);
}

/* Category label rides the corner of the image, as in the reference. */
.news-card__cat {
	position: absolute;
	inset-block-start: var(--wp--preset--spacing--20);
	inset-inline-start: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0.35em 0.9em;
	border-radius: var(--wp--preset--border-radius--btn);
	background: var(--wp--preset--color--bg);
	color: var(--wp--preset--color--ink);
}

.news-card__cat a {
	color: inherit;
	text-decoration: none;
}

.news-card .wp-block-post-title {
	text-wrap: balance;
}

.news-card .wp-block-post-title a {
	text-decoration: none;
	color: inherit;
}

.news-card:hover .wp-block-post-title a,
.news-card .wp-block-post-title a:focus {
	color: var(--wp--preset--color--accent);
}

/* The date gets its own frame so it reads as a tag, not as trailing text. */
.news-card__date {
	align-self: flex-start;
}

.news-card__date time {
	display: inline-block;
	padding: 0.4em 0.9em 0.25em;
	border: 1px solid var(--wp--preset--color--ink-soft);
	border-radius: var(--wp--preset--border-radius--btn);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 70%, transparent);
}

/* Titles and text need daylight from the image above and from each other. */
.news-card .wp-block-post-featured-image {
	margin-block-end: 0;
}

/* Same Instagram band on the featured image behind a page or post hero. */
.page-hero .wp-block-cover__image-background,
.page-hero .wp-block-cover__video-background {
	object-position: center top;
}

.page-hero.wp-block-cover {
	background-position: center top;
}

/* --------------------------------------------------------- news filter */

/*
 * The search sits inside the green box rather than under it, on its floor and
 * at its end edge. The auto top margin claims the free space the box's centred
 * layout would otherwise share out, which drops the field to the bottom and
 * leaves the heading where it was.
 */
.page-hero .news-search {
	/*
	 * Out of the flow, so the box keeps the height it has on every other page.
	 * In flow the field made the news hero four rem taller than the rest, which
	 * is the sort of difference you see across pages without being able to say
	 * why.
	 *
	 * Inset by half the box's own padding: written as a fraction of that padding
	 * rather than as a number off the spacing scale, because what it is is half
	 * the gap the words above it keep, and it should stay half of it if that
	 * padding ever changes.
	 */
	--reyhaneh-search-inset: calc(var(--wp--preset--spacing--60) / 2);

	position: absolute;
	inset-block-end: var(--reyhaneh-search-inset);
	inset-inline-end: var(--reyhaneh-search-inset);
	z-index: 1;
	width: min(24rem, calc(100% - var(--reyhaneh-search-inset) * 2));
	margin-block: 0;
}

/* Below this there is no room beside the deck, so it goes back under it. */
@media (max-width: 47.99em) {
	.page-hero .news-search {
		position: static;
		width: 100%;
	}
}

/* White ground, no hairline: on green a cream field with a border muddies. */
.page-hero .wp-block-search__inside-wrapper {
	border-color: transparent;
	background-color: var(--wp--preset--color--white);
}

/*
 * The topics are the same .page-nav row the section pages carry, so there is
 * nothing to style here. What was .news-chip has gone with it: two shapes for
 * one job is how a site stops looking like one site.
 */

/* ------------------------------------------------------------ pagination */

.news-pagination {
	gap: var(--wp--preset--spacing--30);
	flex-wrap: wrap;
}

.news-pagination .page-numbers,
.news-pagination .wp-block-query-pagination-previous,
.news-pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-width: 2.75em;
	min-height: 2.75em;
	padding: 0.2em 0.9em;
	border: 1px solid var(--wp--preset--color--ink-soft);
	border-radius: var(--wp--preset--border-radius--btn);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition:
		background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease),
		border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.news-pagination a:hover,
.news-pagination a:focus {
	background-color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--ink);
	text-decoration: none;
}

/* The page you are on is stated, not linked. */
.news-pagination .page-numbers.current {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

/* The gap marker is not a button. */
.news-pagination .page-numbers.dots {
	border-color: transparent;
	min-width: auto;
	padding-inline: 0.2em;
}

/*
 * Core hard-codes → for next and ← for previous. In a right-to-left page
 * forward reads leftward, so both have to be mirrored.
 */
.news-pagination .wp-block-query-pagination-next-arrow,
.news-pagination .wp-block-query-pagination-previous-arrow {
	display: inline-block;
	transform: scaleX(-1);
	margin: 0;
}

/* --------------------------------------------------------- post footer */

.post-nav {
	gap: var(--wp--preset--spacing--40);
}

.post-nav a {
	text-decoration: none;
}

.post-nav a:hover,
.post-nav a:focus {
	color: var(--wp--preset--color--accent-hover);
}

/* ---------------------------------------------------------------- footer */

/*
 * The footer is the one dark surface on the site. Ink ground, cream type,
 * hairlines and muted text built from cream at low alpha so the palette
 * stays at nine colours.
 */
.site-footer {
	--footer-muted: color-mix(in srgb, var(--wp--preset--color--bg) 60%, transparent);
	--footer-line: color-mix(in srgb, var(--wp--preset--color--bg) 18%, transparent);
}

/*
 * A footer file of its own, not the header mark recoloured. The mark is a dark
 * wordmark beside a green tile with the tree cut out of it, so on ink the
 * wordmark vanishes and the tree fills with the footer's own colour. No filter
 * fixes that: it would flatten the green tile too. The footer file sets the
 * wordmark in cream and puts a cream ground behind the tile.
 */
.site-footer__logo {
	margin: 0;
}

.site-footer__logo img {
	display: block;
	width: 240px;
	height: auto;
	max-width: 100%;
	/* theme.json rounds photos; a logo is artwork that reaches its own edge. */
	border-radius: 0;
}

/*
 * The two ways to give, repeated in the footer so the most useful thing on a
 * charity's site is one glance away from every page. Set tight: a label at the
 * size of a caption and the value under it, nothing between them, because a
 * footer column is a reference and not a section of the page.
 *
 * No copy button beside the number. The number is the button: a footer has no
 * room for a control next to every value, and the value itself is the thing
 * the reader is already aiming at.
 */
.footer-give {
	margin-block: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.footer-give + .footer-give {
	margin-block-start: var(--wp--preset--spacing--30);
}

.footer-give__label {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--footer-muted);
}

/*
 * Latin order: the digits read left to right whatever the sentence around them
 * does, and the dial code starts and ends with a symbol the bidi algorithm
 * would otherwise move.
 */
.footer-give__value {
	align-self: start;
	padding: 0;
	border: 0;
	background: none;
	direction: ltr;
	unicode-bidi: bidi-override;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--s);
	font-variant-numeric: tabular-nums;
	color: inherit;
	cursor: pointer;
	transition: color var(--wp--custom--motion--duration-fast)
		var(--wp--custom--motion--ease);
}

.footer-give__value:hover,
.footer-give__value:focus-visible {
	color: var(--wp--preset--color--bg);
}

/* The only sign that the tap did anything, so it has to be visible. */
.footer-give__value.is-copied::after,
.footer-give__value.is-failed::after {
	content: attr(data-done);
	margin-inline-start: 0.5em;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--footer-muted);
}

.footer-give__value.is-failed::after {
	content: attr(data-fail);
}

/*
 * The tick is drawn by the ::after above, so this only has to reach a screen
 * reader. Not display: none, which would take it out of the accessibility
 * tree along with the announcement.
 */
.footer-give__status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* The small label above a column, per design-tokens.md. */
.footer-col__title {
	font-weight: 400;
	color: var(--footer-muted);
	margin-block-end: var(--wp--preset--spacing--30);
}

.footer-links {
	list-style: none;
	padding-inline-start: 0;
	line-height: 2.2;
}

/* Footer links stay cream so the green accent keeps its meaning elsewhere. */
.site-footer a {
	color: inherit;
	text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
	color: color-mix(in srgb, var(--wp--preset--color--bg) 70%, transparent);
}

.site-footer .wp-block-separator {
	border: 0;
	border-block-start: 1px solid var(--footer-line);
	opacity: 1;
	margin-block: 0;
}

/*
 * Caps the measure so the intro breaks into three short lines instead of two
 * wide ones. Only the line length changes; the column keeps its 34% and every
 * block around it stays where it was.
 */
.site-footer__about {
	max-width: 45ch;
}

.site-footer__legal,
.site-footer__credit {
	color: var(--footer-muted);
}

.site-footer__legal p {
	margin-block-end: 0;
	line-height: 1.9;
}

/*
 * The strip between the two hairlines. Block gap is off on the tail group and
 * every margin here is zeroed, so the only vertical space inside the strip is
 * its own symmetric padding. That is what makes the row sit dead centre
 * between the two rules instead of drifting toward one of them.
 */
.site-footer__bottom {
	align-items: center;
	gap: var(--wp--preset--spacing--40);
	padding-block: var(--wp--preset--spacing--40);
}

.site-footer__bottom > *,
.site-footer__bottom p,
.site-footer__bottom .wp-block-social-links,
.site-footer__bottom .wp-social-link {
	margin-block: 0;
}

.site-footer__bottom .footer-links {
	align-items: center;
	line-height: 1.6;
}

.site-footer__legal {
	margin-block-start: var(--wp--preset--spacing--40);
}

/*
 * Bottom alignment comes from the block's own verticalAlignment attribute, not
 * from here, so the institution can still change it in the editor. Only the
 * stray paragraph margin needs clearing.
 */
.site-footer__credit p {
	margin-block: 0;
}

/*
 * The registration facts used to stack on four lines against the reading edge,
 * which left most of the row empty and made the quietest text on the site the
 * tallest block in it. One wrapping run instead, with a dot between the facts,
 * so the row fills and the credit opposite has something to sit against.
 *
 * The dot is decorative: a reader hearing "middle dot" between two numbers
 * learns nothing, and the wrap already separates them on a narrow screen.
 */
.site-footer__facts {
	max-width: 68ch;
}

/*
 * Each fact is one unbreakable run. Without this the row wrapped wherever it
 * ran out of width, which put «شمارهٔ مجوز ثبت» on one line and «۱۲۸۲۶» on the
 * next: a label orphaned from the number it labels. Now the only place the
 * line can break is at a dot, which is where the reader expects it.
 */
.site-footer__fact {
	white-space: nowrap;
}

/*
 * The spaces around this in the markup are load-bearing, not tidiness. Each
 * fact beside it is nowrap, so without a space between the spans the whole
 * run is one unbreakable word: the paragraph then demanded its full width,
 * the footer grew past the screen, and the page gained a sideways scroll that
 * showed up at the top as a band of bare canvas.
 */
.site-footer__sep,
.gateway__sep {
	margin-inline: 0.25em;
	opacity: 0.45;
}

/* The two numbers sit on one line, so the separator claims as little as it can. */
.gateway__sep {
	margin-inline: 0.1em;
}

/*
 * Between roughly 700 and 860 the three cards are still side by side but each
 * one is too narrow to hold both numbers on a line. There the card sizes them
 * itself. The media query keeps this off the phone, where the card is equally
 * narrow but the numbers are meant to stay large and wrap instead.
 */
@media (min-width: 600px) {
	@container (max-width: 310px) {
		.gateway__contacts {
			--wp--preset--font-size--l: 6.6cqw;
		}
	}
}

/* ─── Contact page ───────────────────────────────────────────────────── */

/*
 * post-content stacks its blocks 4rem apart, which is right for the long pages
 * but leaves the contact row further from the map than its own two columns are
 * from each other. Two class names beat core's single-class layout rule, so the
 * vertical gap here can match the horizontal one without touching the default.
 */
.wp-block-post-content > .contact-top {
	margin-block-start: var(--wp--preset--spacing--40);
}

/*
 * One box holds every contact detail, a third of the row wide, with the form
 * filling the rest. Five separate cards made the reader cross five ground
 * planes for what is really one block of information.
 */
.contact-top__info,
.contact-top__form {
	display: flex;
	flex-direction: column;
}

.contact-top__info > *,
.contact-top__form > * {
	margin-block: 0;
	flex: 1;
}

.info-list__item {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
	padding-block: var(--wp--preset--spacing--40);
}

/* Hairlines between the details, none above the first or below the last. */
.info-list__item + .info-list__item {
	border-block-start: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent);
}

.info-list__item:first-child {
	padding-block-start: 0;
}

.info-list__item:last-child {
	padding-block-end: 0;
}

.info-list__icon {
	display: block;
	color: var(--wp--preset--color--accent);
}

.info-list__text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.info-list__label {
	margin-block: 0;
	font-size: var(--wp--preset--font-size--xs);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

.info-list__body {
	margin-block: 0;
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.7;
}

/* ─── Contact form ───────────────────────────────────────────────────── */

.contact-form__lede {
	margin-block: 0;
	max-width: 52ch;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 65%, transparent);
}

/* One gap owns the whole form: rows, and the fields inside a row. */
.contact-form__form {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

/*
 * A wider gap than the rows use. Two capsules side by side read as one shape
 * when the space between them is smaller than their own end radius.
 */
.contact-form__row {
	display: grid;
	column-gap: var(--wp--preset--spacing--60);
	row-gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.contact-form__field {
	margin-block: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.contact-form__field label {
	font-size: var(--wp--preset--font-size--s);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 65%, transparent);
}

.contact-form__field input,
.contact-form__field textarea {
	width: 100%;
	font: inherit;
	color: inherit;
	padding: 0.55em 1.2em;
	background-color: var(--wp--preset--color--white);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 15%, transparent);
	border-radius: var(--wp--preset--border-radius--input);
	transition: border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.contact-form__field textarea {
	padding: 0.9em 1.2em;
	border-radius: var(--wp--preset--border-radius--box);
	resize: vertical;
	line-height: var(--wp--custom--line-height--body);
}

.contact-form__field :is(input, textarea):focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
	border-color: transparent;
}

/*
 * The honeypot. Off-screen rather than display:none, because some bots skip
 * fields they can tell are hidden. A person never reaches it: it is out of the
 * tab order and marked aria-hidden.
 */
.contact-form__trap {
	position: absolute;
	inset-inline-start: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form__actions {
	margin-block: 0;
}

.contact-form__actions button {
	cursor: pointer;
	border: 0;
}

/*
 * The card is written with spacing-60 on every side, which is 68px at the
 * phone's root size. Two of those leave a 375px screen about 190px of usable
 * width, so every field ends up narrower than the label above it and the form
 * reads as a column of pills floating in a margin. The inline padding is what
 * has to give; the block padding stays generous because the card has a
 * heading and a lede to separate from its own edge.
 *
 * !important because the padding is an inline style the block writes.
 */
@media (max-width: 599px) {
	.contact-form {
		padding-inline: var(--wp--preset--spacing--40) !important;
		padding-block: var(--wp--preset--spacing--50) !important;
	}
}

.contact-form__note {
	margin-block: 0;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border-radius: var(--wp--preset--border-radius--card);
	font-size: var(--wp--preset--font-size--s);
}

.contact-form__note.is-ok {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent);
	color: var(--wp--preset--color--accent-deep);
}

.contact-form__note.is-error {
	background-color: color-mix(in srgb, var(--wp--preset--color--ink) 8%, transparent);
}

/*
 * A section heading belongs to what follows it, not to what came before. Left
 * to the post-content blockGap it sat the same 4rem from both and read as
 * floating between two sections rather than opening one.
 *
 * :is() takes the specificity of its most specific argument, so this lands at
 * one class plus one element and beats core's single-class layout rule.
 */
.wp-block-post-content > :is(h1, h2, h3) + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

/* ─── Ways to help ───────────────────────────────────────────────────── */

/*
 * The account numbers lead the page. Someone arriving here has usually decided
 * to give already and is looking for where to send it, so the numbers come
 * before the explanation of the ways to give.
 */
.accounts__grid {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.accounts__item {
	padding: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--white);
	border-radius: var(--wp--preset--border-radius--box);
}

.accounts__icon {
	display: block;
	color: var(--wp--preset--color--accent);
	padding-block-end: var(--wp--preset--spacing--30);
}

/* The bank names the account, so it leads the caption rather than sitting back. */
.accounts__label {
	margin-block: 0 0.2rem;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

/* A number to be copied, so it is set apart and never wraps mid-digit. */
/*
 * A number to be read off and typed into a bank app.
 *
 * bidi-override locks the visual order to the source order. Persian digits are
 * bidi class EN and the groups are separated by plain spaces, so inside a
 * right-to-left page the algorithm is free to reorder the four-digit groups;
 * this removes that freedom, and a wrong card number is not a cosmetic bug.
 *
 * The group gap uses word-spacing, not letter-spacing: it only widens the
 * spaces between groups and never touches the joining of Persian letters, which
 * the project forbids interfering with.
 */
.accounts__number {
	margin-block: 0;
	direction: ltr;
	unicode-bidi: bidi-override;
	/*
	 * The safe size for the narrowest card the number appears in. The rule
	 * below grows it where there is room.
	 */
	font-size: 1.15rem;
	font-weight: 600;
	line-height: var(--wp--custom--line-height--tight);
	font-variant-numeric: tabular-nums;
	word-spacing: 0.35em;
	white-space: nowrap;
	overflow-x: auto;
}

/*
 * The number and its copy button sit on one line. The row itself stays in the
 * page direction so the number keeps the start edge; only the digits inside are
 * forced left-to-right.
 */
.accounts__number-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}

/*
 * The same number appears in a wide box and in a narrow grid card, so its size
 * has to follow the card it is in, not the window. It was sized in vw before,
 * which reads the viewport and knows nothing about how much room the card
 * actually has: on a desktop window the narrow card got the large end of the
 * scale and the last digits fell out of it.
 *
 * Guarded by @supports because a browser without container queries would throw
 * the whole clamp away as invalid and inherit a body-sized number. Without the
 * guard it degrades worse than the bug it fixes.
 */
@supports (container-type: inline-size) {
	.accounts__number-row {
		container-type: inline-size;
	}

	.accounts__number-row .accounts__number {
		font-size: clamp(1.15rem, 6cqi, 1.5rem);
	}
}

.accounts__number-row .accounts__number {
	min-width: 0;
}

/*
 * Smaller than the 3rem content icons on purpose. This is a control the reader
 * operates, not an illustration: at the size of a service icon it would compete
 * with the number it belongs to.
 *
 * It sits on the end edge of the card, away from the digits, so a stray tap
 * near the number cannot hit it.
 *
 * The nudge is optical, not structural. align-items centres the button on the
 * line box, but digits sit high in that box, so a mathematically centred button
 * reads as sitting low next to them.
 */
.accounts__copy {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	position: relative;
	margin-inline-start: auto;
	padding: 0;
	border: 0;
	border-radius: var(--wp--preset--border-radius--round);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
	transform: translateY(-0.15rem);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.accounts__copy svg {
	display: block;
	width: 1.5rem;
	height: 1.5rem;
}

.accounts__copy:hover {
	background-color: var(--wp--preset--color--accent-hover);
}

/* The ring has to clear a solid green disc, so it sits outside it. */
.accounts__copy:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-deep);
	outline-offset: 2px;
}

/* Both icons occupy the same cell, so the swap does not move the row. */
.accounts__copy-idle,
.accounts__copy-done {
	grid-area: 1 / 1;
}

.accounts__copy-done {
	opacity: 0;
}

.accounts__copy.is-copied .accounts__copy-idle {
	opacity: 0;
}

.accounts__copy.is-copied .accounts__copy-done {
	opacity: 1;
}

/*
 * The confirmation is a word, not only a tick, for anyone who misses the swap.
 *
 * It is taken out of the flow on purpose. As a flex item its width would appear
 * the moment it had text, and the row would rearrange itself under a finger
 * that is still on the button. Out of flow it cannot move anything, whatever it
 * says and however narrow the card is. It is offset by exactly the button plus
 * the row gap, so it lands beside the button, on the number's side of it.
 */
.accounts__copy-status {
	position: absolute;
	inset-inline-end: calc(2.4rem + var(--wp--preset--spacing--30));
	top: 50%;
	/* Matches the button's own optical nudge so the two share a centre line. */
	transform: translateY(calc(-50% - 0.15rem));
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--accent);
	white-space: nowrap;
}

.accounts__copy.is-failed ~ .accounts__copy-status {
	color: var(--wp--preset--color--ink);
}

/*
 * The label on hover. A real element rather than the title attribute: the
 * native tooltip arrives after a delay, in the browser's own styling, and this
 * one can be told to keep out of the way once the number has been copied.
 *
 * Centring uses physical left and translate because it centres the label on its
 * own button, which is the same operation in either text direction.
 */
.accounts__copy::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 0.5rem);
	left: 50%;
	transform: translateX(-50%);
	padding: 0.3em 0.9em;
	border-radius: var(--wp--preset--border-radius--btn);
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--bg);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 400;
	line-height: var(--wp--custom--line-height--tight);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.accounts__copy:hover::after,
.accounts__copy:focus-visible::after {
	opacity: 1;
}

/* Once it is copied the tick and the message say it; the label would repeat. */
.accounts__copy.is-copied::after,
.accounts__copy.is-failed::after {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.accounts__copy,
	.accounts__copy::after {
		transition: none;
	}
}

/*
 * Bank and holder read as one caption above the number, so they sit close to
 * each other and leave the air below, where the digits begin.
 */
.accounts__holder {
	margin-block: 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--s);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 60%, transparent);
}

/*
 * The warning about personal accounts. This is the one line on the page that
 * protects someone from being defrauded in the institution's name, so it is
 * allowed to look different from everything around it.
 */
.accounts__warning {
	display: flex;
	gap: var(--wp--preset--spacing--30);
	align-items: center;
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--preset--border-radius--box);
	background-color: color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent);
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.7;
}

.accounts__warning-icon {
	flex: none;
	color: var(--wp--preset--color--accent-deep);
}

.way-card__icon {
	display: block;
	color: var(--wp--preset--color--accent);
}

.way-card__body > * {
	margin-block: 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.8;
}

.way-card__body > :last-child {
	margin-block-end: 0;
}

.way-card__body :is(ul, ol) {
	padding-inline-start: 1.2em;
}

.way-card__body li {
	margin-block-end: 0.45rem;
}

.way-card__body li:last-child {
	margin-block-end: 0;
}

.way-card__cta {
	padding-block-start: var(--wp--preset--spacing--20);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 60%, transparent);
}

/*
 * A card that leads somewhere is the link, not a line of text at the bottom of
 * it. The heading carries the href and an empty layer stretched over the whole
 * card carries the click, so a screen reader hears one link with the heading as
 * its name and a mouse can press anywhere.
 *
 * inherit on the radius, so the pressable area is the rounded card rather than
 * a rectangle overhanging its corners.
 */
/*
 * The ground of a card that is a link comes from here, not from the block's
 * background attribute.
 *
 * WordPress writes its colour classes with !important, so a hover set in a
 * stylesheet cannot beat one, and the card would have kept its cream while its
 * text went pale on it. Taking the colour out of the content leaves an ordinary
 * cascade with nothing shouting in it.
 */
.way-card:has(> h3 > a) {
	background-color: var(--wp--preset--color--surface);
	position: relative;
	transition:
		background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease),
		color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.way-card > h3 > a {
	color: inherit;
}

.way-card > h3 > a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

/*
 * :has, so the whole card answers a hover on the link that covers it. Where it
 * is not supported the card simply does not colour: the link still works and
 * the cursor still changes, which is the part that has to work.
 */
.way-card:has(> h3 > a:hover),
.way-card:has(> h3 > a:focus-visible) {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.way-card:has(> h3 > a:hover) h3,
.way-card:has(> h3 > a:focus-visible) h3,
.way-card:has(> h3 > a:hover) .way-card__icon,
.way-card:has(> h3 > a:focus-visible) .way-card__icon {
	color: inherit;
}

@media (prefers-reduced-motion: reduce) {
	.way-card:has(> h3 > a) {
		transition: none;
	}
}

/* ─── Report sections ────────────────────────────────────────────────── */

/*
 * Each section reads as a pair: what the figures mean on the reading side, the
 * figures themselves beside it. Splitting them keeps a twelve-row balance sheet
 * from running the full width, where the eye loses the row it is on.
 */
.report-row + .report-row {
	padding-block-start: var(--wp--preset--spacing--60);
	border-block-start: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent);
}

.report-row__intro,
.split__aside {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
	align-content: start;
}

.report-row__intro > *,
.split__aside > * {
	margin-block: 0;
}

.report-row__intro h2,
.split__aside h2 {
	text-wrap: balance;
}

.report-row__table > *,
.split__main > * {
	margin-block: 0;
}

/*
 * The blocks stacked in the main column of a split.
 *
 * Both .section-eyebrow and .statement set margin-block: 0 on themselves, and
 * that is the same specificity as blockGap, so between them they were killing
 * every gap in this column and the two statements ran into each other and into
 * their own labels. Naming the parent twice puts this ahead of both.
 */
.split .split__main > * + * {
	margin-block-start: var(--wp--preset--spacing--60);
}

/*
 * Except right after a label, which belongs to the sentence under it. A label
 * sitting the same distance from the sentence it names as from the one it does
 * not is a label attached to neither.
 */
.split .split__main > .section-eyebrow + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

@media (max-width: 781px) {
	.report-row + .report-row {
		padding-block-start: var(--wp--preset--spacing--50);
	}
}

/* ─── Info and figure cards ──────────────────────────────────────────── */

/*
 * One card shape serves the contact details and the report's headline figures.
 * The icon leads, the label sits back, and the value carries the weight.
 */
.info-card__icon,
.figure-card__icon,
.download-card__icon,
.stat__icon {
	display: block;
	color: var(--wp--preset--color--accent);
}

/*
 * Every icon on the site is 3rem. Stated once here so a new component cannot
 * quietly arrive at a different size; design-tokens.md carries the rule.
 */
.service__icon svg,
.info-card__icon svg,
.info-list__icon svg,
.figure-card__icon svg,
.accounts__icon svg,
.accounts__warning-icon svg,
.way-card__icon svg,
.section-icon svg,
.stat__icon svg {
	display: block;
	width: 3rem;
	height: 3rem;
}

/* The icon is a marker, not a heading; it needs less air under it than the
   card's blockGap gives, and padding survives core's margin reset. */
.info-card__icon {
	padding-block-end: 0.15rem;
}

.download-card__icon svg {
	display: block;
	width: 1.75rem;
	height: 1.75rem;
}

.info-card__label,
.figure-card__label {
	font-weight: 400;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

.info-card__body {
	line-height: 1.7;
}

.figure-card__value {
	padding-block-start: 0.35rem;
	font-weight: 600;
	line-height: var(--wp--custom--line-height--tight);
	font-variant-numeric: tabular-nums;
}

/* The unit rides along with the figure without competing with it. */
.figure-card__unit {
	margin-inline-start: 0.45em;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 400;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

.download-card__meta {
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
	font-size: var(--wp--preset--font-size--s);
}

/* The lede that opens the report, set larger and calmer than the body. */
/*
 * The opening sentence of a page. It kept a reading measure and was centred in
 * the wide column, which put it adrift from the sections under it: they start
 * at the edge and it started a hand's width in.
 *
 * It runs the full width now, on the ask. That is a long line for prose, and if
 * it reads badly the fix is to keep this cap and drop the centring instead, not
 * to put the cap back as it was.
 */
.wp-block-post-content > .report-lede {
	max-width: none;
}

.report-lede {
	max-width: 62ch;
	margin-block: 0;
	font-weight: 300;
	line-height: var(--wp--custom--line-height--body);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 80%, transparent);
}

/* A note attached to a table, not a paragraph of its own standing. */
.report-note {
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
	max-width: 60ch;
}

/*
 * The only third-party frame on the site. It is boxed like every other surface
 * so it reads as part of the page rather than as a window punched through it.
 */
.contact-map {
	overflow: hidden;
	border-radius: var(--wp--preset--border-radius--box);
	background-color: var(--wp--preset--color--surface);
	aspect-ratio: 16 / 9;
}

.contact-map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 640px) {
	.contact-map {
		aspect-ratio: 4 / 3;
	}
}

/*
 * Must come after the base .contact-map rules. Both are single-class selectors,
 * so source order decides, and declared earlier this modifier lost its
 * aspect-ratio: auto to the 16/9 above — which then computed the band's width
 * from its fixed height and left the map a third of the page wide.
 */
.contact-map--strip {
	aspect-ratio: auto;
	height: 20rem;
}

@media (max-width: 781px) {
	.contact-map--strip {
		height: 15rem;
	}
}

.contact-map__credit {
	margin-block-start: var(--wp--preset--spacing--20);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

/*
 * Long figures on a phone. These sit after the rules they answer rather than
 * with the other phone rules at the top of the file: they carry no more
 * weight than the base rules do, so only their position decides the winner.
 */
@media (max-width: 599px) {
	/*
	 * A figure and its unit are one unbroken run of characters: there is no
	 * space between «۱۶۰٬۱۶۸٬۰۰۰» and «تومان», only a margin, so the browser
	 * has nowhere to break the line. On a phone the pair is wider than the
	 * card, and a box that cannot hold its contents pushes the whole page
	 * sideways. The unit takes its own line, which is where a figure this
	 * size wants it anyway.
	 */
	.figure-card__unit {
		display: block;
		margin-inline-start: 0;
	}

	/*
	 * A figure is one word to the browser: it has no break opportunity, so a
	 * fixed size either fits the screen or carries the page off it. Letting a
	 * long number break instead was worse still, splitting «۱۶۰٬۱۶۸٬۰۰۰» across
	 * two lines mid-thousand.
	 *
	 * So the size follows the screen. The middle term is chosen for the longest
	 * figure the institution publishes, thirteen characters, and it shrinks
	 * with a narrower phone rather than waiting for a breakpoint to catch it.
	 * The preset is redefined rather than the font-size set, because the size
	 * class WordPress writes carries !important.
	 */
	.stat__value {
		--wp--preset--font-size--xxl: clamp(1.2rem, 6.5vw, 2.6rem);
	}

	.figure-card__value {
		--wp--preset--font-size--xl: clamp(1.1rem, 5.5vw, 1.9rem);
	}

}

/* ─── Bar chart ───────────────────────────────────────────────────────── */

/*
 * Drawn in CSS, not by a charting library: rule 1 forbids an external script,
 * and a bundled one would cost more bytes than the whole stylesheet for four
 * bars. Each row carries its own --bar percentage, set inline in the content,
 * so the institution can edit a figure in the editor and the bar follows.
 *
 * The figures are also written out beside every bar. A bar alone is a picture
 * of a number; on a report page the number itself is the point, and it is what
 * a screen reader and a slow connection both get first.
 */
.bar-chart {
	margin: 0;
}

.bar-chart__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wp--preset--spacing--30);
}

.bar-chart__row {
	display: grid;
	grid-template-columns: minmax(7rem, auto) 1fr;
	align-items: baseline;
	column-gap: var(--wp--preset--spacing--30);
	row-gap: 0.35rem;
}

.bar-chart__label {
	font-size: var(--wp--preset--font-size--s);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 70%, transparent);
}

.bar-chart__value {
	font-size: var(--wp--preset--font-size--s);
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--ink);
}

/*
 * The track spans both columns on its own line so a long Persian label never
 * squeezes the bar down to a stub on a narrow screen.
 */
.bar-chart__track {
	grid-column: 1 / -1;
	block-size: 0.75rem;
	border-radius: 999px;
	background-color: color-mix(in srgb, var(--wp--preset--color--ink) 8%, transparent);
	overflow: hidden;
}

.bar-chart__fill {
	display: block;
	block-size: 100%;
	inline-size: var(--bar, 0%);
	border-radius: inherit;
	background-color: var(--wp--preset--color--accent);
}

/* The sum is not a category, so it is stated rather than drawn as a fifth bar. */
.bar-chart__total {
	margin-block-start: var(--wp--preset--spacing--40);
	padding-block-start: var(--wp--preset--spacing--30);
	border-block-start: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 12%, transparent);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: var(--wp--preset--font-size--s);
}

.bar-chart__total strong {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-size: var(--wp--preset--font-size--l);
}

.bar-chart figcaption {
	margin-block-start: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--xs, 0.8rem);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

/*
 * On a phone the label and the figure sit on one line with the space between
 * them, so the eye reads the name on one edge and the number on the other
 * instead of hunting for the figure in the middle of the row.
 */
@media (max-width: 599px) {
	.bar-chart__value {
		text-align: end;
	}
}

/*
 * The min-width on .wp-block-table table is there for the four-column balance
 * table, which cannot be read squeezed onto a phone. A two-column table has no
 * such problem: the scroll only pushed its figures off the left edge, which is
 * the column the reader came for. :has lets each table opt out by its own
 * shape, so nothing has to be tagged by hand in the editor.
 */
@media (max-width: 599px) {
	.wp-block-table table:not(:has(td:nth-child(3))) {
		min-width: 0;
	}

	.wp-block-table table:not(:has(td:nth-child(3))) :is(th, td) {
		padding-inline: var(--wp--preset--spacing--30);
	}
}

/* ─── Tables ─────────────────────────────────────────────────────────── */

/*
 * The balance tables run to four columns of long Persian numerals. The figure
 * scrolls on its own so a narrow screen never pushes the whole page sideways,
 * and the radius is clipped here rather than on the table so the scroll and the
 * rounded corners can coexist.
 */
.wp-block-table {
	margin-block: 0;
	overflow-x: auto;
	border-radius: var(--wp--preset--border-radius--box);
}

.wp-block-table table {
	width: 100%;
	min-width: 34rem;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--s);
	/* Keeps every digit the same width so figures line up down a column. */
	font-variant-numeric: tabular-nums;
}

.wp-block-table th,
.wp-block-table td {
	padding: 0.85rem var(--wp--preset--spacing--40);
	line-height: 1.6;
	text-align: start;
	vertical-align: baseline;
	border: 0;
	border-block-end: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 8%, transparent);
}

/*
 * Core draws a 3px currentColor rule under thead, which lands as a hard black
 * bar. The accent carries the same separation without the weight.
 */
.wp-block-table thead {
	border-block-end: 2px solid var(--wp--preset--color--accent);
}

/* The header sits back: it labels the figures, it is not one of them. */
.wp-block-table thead th {
	font-weight: 500;
	white-space: nowrap;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 60%, transparent);
	background-color: color-mix(in srgb, var(--wp--preset--color--ink) 5%, transparent);
}

/*
 * The first column is the row's label and reads as its heading, so it keeps the
 * reading edge and a heavier weight. Everything after it is a figure, and
 * figures sit centred under their own column.
 */
.wp-block-table th,
.wp-block-table td {
	text-align: center;
}

.wp-block-table tr > :first-child {
	text-align: start;
	font-weight: 600;
}

.wp-block-table thead tr > :first-child {
	font-weight: 500;
}

.wp-block-table tbody tr:last-child td {
	border-block-end: 0;
}

/* A row carrying bold cells is a total, and it closes the table off. The
   emphasis comes from the row's own <strong>, not from a weight set here. */
.wp-block-table tbody tr:has(td strong) {
	background-color: color-mix(in srgb, var(--wp--preset--color--ink) 5%, transparent);
}

/*
 * Phone numbers keep the order they were written in.
 *
 * ۰۲۱-۸۸۰۰۷۶۳۱ was rendering as ۸۸۰۰۷۶۳۱-۰۲۱: two runs of Persian digits either
 * side of a hyphen are reordered by the bidi algorithm inside a right-to-left
 * page, and the area code ends up last. Same cause as the card number, and the
 * same fix — every phone on the site is a tel: link, so one rule covers them.
 *
 * inline-block keeps the override from leaking into the sentence around it.
 */
a[href^="tel:"] {
	display: inline-block;
	direction: ltr;
	unicode-bidi: bidi-override;
}

/* Two phone numbers, told apart by distance rather than a separator. */
.footer-phones a[href^="tel:"] + a[href^="tel:"] {
	margin-inline-start: 1.75rem;
}

/*
 * Social pills: cream glyph in a barely-there cream well, so they read as
 * part of the dark surface instead of punching holes in it.
 */
.site-footer__social .wp-social-link {
	background-color: color-mix(in srgb, var(--wp--preset--color--bg) 12%, transparent);
	color: var(--wp--preset--color--bg);
	transition: background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.site-footer__social .wp-social-link:hover,
.site-footer__social .wp-social-link:focus-within {
	background-color: color-mix(in srgb, var(--wp--preset--color--bg) 22%, transparent);
}

.site-footer__social .wp-social-link a {
	color: inherit;
}

/* The tail keeps a tighter rhythm than the columns above it. */
.site-footer__tail {
	margin-block-start: var(--wp--preset--spacing--20);
}

/* Rules sit flush; the spacing around them belongs to their neighbours. */
.site-footer__tail .wp-block-separator {
	margin-block: 0;
}

/* ------------------------------------------------------- green sections */

/*
 * A green section inherits cream type from theme.json, but links, muted text
 * and hairlines are all built from the ink colour and have to be rebuilt from
 * cream instead. One block, so a new green section needs no extra rules.
 */
.is-on-accent a:where(:not(.wp-element-button)) {
	color: inherit;
}

.is-on-accent .gateway__links a,
.is-on-accent .unit__handle a {
	color: inherit;
}

.is-on-accent .stat__label,
.is-on-accent .section-label,
.is-on-accent .intro__lede,
.is-on-accent .service p,
.is-on-accent cite {
	color: color-mix(in srgb, var(--wp--preset--color--on-accent) 72%, transparent);
}

.is-on-accent .service {
	border-block-start-color: color-mix(in srgb, var(--wp--preset--color--on-accent) 25%, transparent);
}

/* ─── Page sections ──────────────────────────────────────────────────── */

/*
 * A long page reads as several subjects rather than one scroll. The hairline
 * belongs to the join between two sections, not to a section, so it goes on the
 * adjacent selector: the first section never carries a line above it and the
 * last never carries one below.
 */
.page-section + .page-section {
	padding-block-start: var(--wp--preset--spacing--60);
	border-block-start: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent);
}

/*
 * Two sections sit in a white box, to break up a page that otherwise runs as
 * one flat column of hairlines from top to bottom.
 *
 * Keyed on the section ids rather than a class of their own. Those ids already
 * have to exist for the navigation to reach these sections, so they are the one
 * thing about a section that cannot quietly go missing; a new class would just
 * be a second thing to lose.
 */
.page-section#intro,
.page-section#vision,
.page-section#funding,
.page-section#profit,
.page-section#units {
	padding: var(--wp--preset--spacing--60);
	border-block-start: 0;
	border-radius: var(--wp--preset--border-radius--box);
	background-color: var(--wp--preset--color--white);
}

/*
 * A phone has no room for the inset these boxes keep on a wide screen. At
 * spacing 60 a section spent 136pt of a 378pt screen on its own margins, and
 * what was left could not hold a nine-figure sum: the card grew past its
 * column and hung off the start edge, which is why one side looked right and
 * the other did not.
 *
 * Down to the same inset the hero and the cards already use here, and the
 * card inside it down one step further, so the figure has room to stand.
 */
@media (max-width: 599px) {
	.page-section#intro,
	.page-section#vision,
	.page-section#funding,
	.page-section#profit,
	.page-section#units {
		padding: var(--wp--preset--spacing--50);
	}

	/* !important because the padding is an inline style the block writes. */
	.figure-card {
		padding-inline: var(--wp--preset--spacing--40) !important;
	}
}


/* A hairline immediately under a box is a second line saying the same thing. */
.page-section#intro + .page-section,
.page-section#vision + .page-section,
.page-section#funding + .page-section,
.page-section#profit + .page-section,
.page-section#units + .page-section {
	border-block-start: 0;
}

/*
 * Two figures, two columns, the full width of the box.
 *
 * The grid block asks for as many columns as fit, which with two cards in a
 * wide section means two cards and two empty tracks beside them. Two is the
 * number here, not a minimum to fill.
 */
.page-section#profit .figure-grid {
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 47.99em) {
	.page-section#profit .figure-grid {
		grid-template-columns: 1fr;
	}
}

/*
 * Green, and the ground comes from here rather than the block's background
 * attribute: WordPress writes those colour classes with !important, so a
 * stylesheet cannot take one back.
 */
.page-section#profit .figure-card {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.page-section#profit .figure-card__icon {
	color: var(--wp--preset--color--on-accent);
}

/* The label and the unit stay quieter than the figure, in cream now. */
.page-section#profit .figure-card__label,
.page-section#profit .figure-card__unit {
	color: color-mix(in srgb, var(--wp--preset--color--on-accent) 72%, transparent);
}

/*
 * Six short lines in one column left a column and a half of white beside them.
 * The rows carry a rule between them when they stack; in two columns that rule
 * would run down the middle of nothing, so the gap does the separating instead.
 */
.page-section#funding .info-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

.page-section#funding .info-list__item {
	padding-block: 0;
}

.page-section#funding .info-list__item + .info-list__item {
	border-block-start: 0;
}

/*
 * Same reason as the row above: how wide a section is, is the theme's business,
 * not something spelled out in the content it holds.
 */
.wp-block-post-content > .page-section,
main > .page-section {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

/*
 * A section whose heading stands on its own, rather than beside its content in
 * a split, needs the heading to sit clear of what follows. blockGap gives it
 * the same gap it gives everything else, which reads as a caption rather than a
 * heading.
 *
 * The element is named, which is enough to get ahead of blockGap.
 */
.page-section > h2 + * {
	margin-block-start: var(--wp--preset--spacing--60);
}

/*
 * Everything inside a section fills it.
 *
 * The section is a constrained layout, which hands every child the reading
 * measure as a max-width and centres it. Against a section that is itself the
 * wide measure, that left the prose indented and floating in the middle while
 * the card grids beside it ran the full width, and no two edges lined up.
 *
 * The parent is named so this beats WordPress's own rule outright rather than
 * tying with it. That rule is written with :where(), which carries no
 * specificity, so a bare .page-section > * would come down to which stylesheet
 * the browser happened to read last.
 */
.wp-block-post-content > .page-section > *,
main > .page-section > * {
	max-width: none;
}

/*
 * The icon names the subject before the heading does. Its size comes from the
 * shared rule above with every other content icon, never from here.
 */
.section-icon {
	display: block;
	color: var(--wp--preset--color--accent);
}

/* ─── Tick lists ─────────────────────────────────────────────────────── */

/*
 * Short items that are a set rather than a sequence: what a workshop sews, what
 * a market sells. Two columns where there is room, because a single column of
 * six four-word lines is a lot of empty page beside a lot of white space.
 */
.tick-list ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	margin-block: 0;
	padding-inline-start: 0;
	list-style: none;
}

.tick-list li {
	position: relative;
	padding-inline-start: 1.7em;
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.7;
}

/*
 * A mask rather than an inline SVG per item: twenty ticks would be twenty
 * copies of the same path in the page, and the colour still comes from CSS.
 */
.tick-list li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0.45em;
	width: 1em;
	height: 1em;
	background-color: var(--wp--preset--color--accent);
	mask: url("assets/img/icons/check.svg") no-repeat center / contain;
}

/* ─── Gallery ────────────────────────────────────────────────────────── */

/*
 * The shell exists only to hold the arrows and the counter still while the
 * track under them scrolls. It is built by the script, so the editor shows the
 * plain group of images and nothing that would not work there.
 */
.gallery-shell {
	position: relative;
}

/*
 * The track is a plain group of image blocks in the content. Scroll snapping
 * does the whole slideshow on its own: it swipes on a phone, scrolls on a
 * trackpad and takes arrow keys, with no script running at all. The script only
 * adds the buttons and the counter on top.
 */
.gallery {
	display: flex;
	gap: var(--wp--preset--spacing--30);
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
	display: none;
}

/*
 * The group is a flow layout, so WordPress spaces its children with a top
 * margin on every child after the first. In a flex row that margin is nonsense.
 */
.gallery > * + * {
	margin-block-start: 0;
}

.gallery > * {
	flex: 0 0 auto;
	width: min(20rem, 80%);
	margin-block: 0;
	scroll-snap-align: center;
}

/*
 * One ratio for photos that arrive in three of them, so the track does not
 * change height as it scrolls.
 */
.gallery img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--wp--preset--border-radius--card);
}

.gallery:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
}

.gallery__nav {
	position: absolute;
	inset-block-start: calc(50% - 1.5rem);
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	border-radius: var(--wp--preset--border-radius--round);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.gallery__nav svg {
	display: block;
	width: 1.5rem;
	height: 1.5rem;
}

.gallery__nav--previous {
	inset-inline-start: calc(var(--wp--preset--spacing--20) * -1);
}

.gallery__nav--next {
	inset-inline-end: calc(var(--wp--preset--spacing--20) * -1);
}

.gallery__nav:hover:not(:disabled) {
	background-color: var(--wp--preset--color--accent-hover);
}

.gallery__nav:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-deep);
	outline-offset: 2px;
}

/*
 * Faded, not removed. An arrow that disappears at the end takes the other one
 * with it visually and the reader loses the control they were aiming for.
 */
.gallery__nav:disabled {
	opacity: 0.3;
	cursor: default;
}

.gallery__counter {
	margin-block: var(--wp--preset--spacing--20) 0;
	font-size: var(--wp--preset--font-size--xs);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Below the photos there is no room beside them for a round button. */
@media (max-width: 47.99em) {
	.gallery__nav {
		position: static;
		inset: auto;
	}

	.gallery-shell {
		display: grid;
		grid-template-areas:
			"track track"
			"count count"
			"prev next";
		justify-content: center;
		gap: var(--wp--preset--spacing--20);
	}

	.gallery {
		grid-area: track;
	}

	.gallery__counter {
		grid-area: count;
		margin-block-start: 0;
	}

	.gallery__nav--previous {
		grid-area: prev;
	}

	.gallery__nav--next {
		grid-area: next;
	}
}

/*
 * On a phone the row above leaves no photo worth looking at: a third of the
 * screen goes to the neighbours peeking in at the edges, and the arrows sit
 * under it all in their own row. Here the photo takes the full width, one at
 * a time, and the two arrows stand on its own edges.
 *
 * This comes after that block rather than inside it because both queries
 * match a phone and neither outranks the other; the later one wins.
 */
@media (max-width: 599px) {
	.gallery-shell {
		display: block;
	}

	.gallery > * {
		width: 100%;
	}

	.gallery__nav {
		position: absolute;
		inset-block-start: calc(50% - 1.5rem);
	}

	.gallery__nav--previous {
		inset-inline-start: var(--wp--preset--spacing--20);
	}

	.gallery__nav--next {
		inset-inline-end: var(--wp--preset--spacing--20);
	}

	/*
	 * Out of sight, not out of the page. The counter carries aria-live, and it
	 * is the only thing telling a screen reader that the photo changed; hiding
	 * it with display would take that away along with the text.
	 */
	.gallery__counter {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

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


/*
 * Two blocks that belong to the phone menu and to nothing else. They live in
 * the navigation's own content so the institution edits them alongside the
 * menu items, which also means they reach the desktop header, where they have
 * no business. Hidden by default and shown only inside the open overlay.
 */
.site-header .wp-block-buttons.menu-cta {
	display: none;
}

/*
 * Its own rule, not a second selector on the one above. An unsupported
 * selector invalidates the whole list it appears in, and :has is the only
 * way up to the list core wrapped these icons in; sharing a rule would mean
 * a browser without :has showing the button in the desktop header too.
 */
.site-header ul.wp-block-navigation__container:has(.menu-social) {
	display: none;
}

/*
 * A gateway card that leads with a picture. The image sits flush to the card's
 * own corners rather than keeping the padding, so the card reads as one object
 * instead of a photo floating inside a box.
 */
.gateway--media {
	display: flex;
	flex-direction: column;
}

/*
 * The parent is named because WordPress prints its blockGap rules inline in
 * the head at one class of weight, and one of them sets margin-block-start: 0
 * on a group's first child. A bare .gateway__media ties with that and loses,
 * which left the card's top padding showing as a white band above the
 * picture while the sides pulled through correctly.
 */
.gateway--media > .gateway__media {
	margin-block: calc(var(--wp--preset--spacing--50) * -1) 0;
	margin-inline: calc(var(--wp--preset--spacing--50) * -1);
}

/*
 * The text sits in the white below the picture, and that strip has the card's
 * bottom padding under it but only the block gap over it, so the whole block
 * read as pushed up. Matching the two puts it in the middle. The card is a
 * flex column and the row stretches every card to the tallest, so giving all
 * three the same opening gap also starts all three headings on one line.
 *
 * Two classes are needed: the parent is named for the same reason it is named
 * above, and a bare tag would lose to the gap rule WordPress prints inline.
 */
.gateway--media > .gateway__media + * {
	margin-block-start: var(--wp--preset--spacing--50);
}

.gateway__media img {
	display: block;
	width: 100%;
	height: auto;
	/*
	 * One landscape frame for all three, cropped top and bottom. The artwork is
	 * drawn square with room left around the subject for exactly this, and the
	 * card keeps one height whatever picture goes in it.
	 */
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--wp--preset--border-radius--box)
		var(--wp--preset--border-radius--box) 0 0;
}

.gateway__contacts a {
	display: inline-block;
}

/*
 * On the accent the links have to leave it: an accent-coloured link on an
 * accent ground is invisible. Underlines stay off, per the project rule, so
 * weight carries the distinction instead.
 */
.is-on-accent .gateway__contacts a,
.is-on-accent .ussd-code a {
	color: var(--wp--preset--color--on-accent);
	font-weight: 600;
}

.is-on-accent .gateway__contacts a:hover,
.is-on-accent .ussd-code a:hover {
	color: color-mix(in srgb, var(--wp--preset--color--on-accent) 78%, transparent);
}

/* The handle alone does not say which network it belongs to. */
.gateway__social a {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.gateway__social svg {
	flex: 0 0 auto;
	width: 1.5rem;
	height: 1.5rem;
}

/*
 * A dial string is read left to right whatever the sentence around it does,
 * and it starts and ends with a symbol, which is exactly what the bidi
 * algorithm would otherwise move. Overridden here the way account numbers
 * already are, and held to the reading edge so it still starts where the rest
 * of the card starts.
 */
.ussd-code {
	direction: ltr;
	unicode-bidi: bidi-override;
	text-align: right;
	font-size: var(--wp--preset--font-size--l);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--accent);
}

/* ─── In-page navigation ─────────────────────────────────────────────── */

/*
 * A page with six subjects needs a way in other than the scrollbar. The row
 * parks under the site header, which is why the two share a height variable.
 *
 * It sits below the header in the stack. The header hides itself on the way
 * down and comes back on the way up, and when it comes back it should pass over
 * this rather than be pushed off by it.
 */
.page-nav {
	position: sticky;
	inset-block-start: var(--reyhaneh-header-height);
	/*
	 * Above the page, below the hero. The hero covers its top edge, which is
	 * what makes it read as a second layer sliding out from under the box
	 * rather than a bar parked below it.
	 */
	z-index: 1;
	/*
	 * The width comes from the alignwide class on the element itself, which is
	 * the same mechanism the hero above it uses, so the two are the same width
	 * by construction rather than by two rules that have to agree.
	 *
	 * On the element, not on a wrapper around it. A sticky element can only
	 * travel inside its own parent, and a wrapper group is exactly as tall as
	 * this row, so it would come unstuck the moment it moved.
	 */
	/*
	 * Even, and the same in both of this element's states. The top padding used
	 * to carry the strip's tuck under the hero, which meant the space over the
	 * pills was hidden at rest and appeared once the bar stuck to the header:
	 * one padding reading as two different ones.
	 */
	padding-block: var(--wp--preset--spacing--30);
	padding-inline: var(--wp--preset--spacing--40);
	/*
	 * Only the bottom corners, and physical rather than logical because both
	 * take the same value: there is nothing here for a text direction to flip.
	 */
	border-radius: 0 0 var(--wp--preset--border-radius--box) var(--wp--preset--border-radius--box);
	background-color: var(--wp--preset--color--white);
}

/*
 * The pull upwards has to out-specify WordPress, which is why it is not in the
 * rule above with everything else about this element.
 *
 * post-content's blockGap emits `.wp-container-… > * { margin-block-start: 0 }`
 * inline in the head. That is the same specificity as a bare .page-nav and it
 * comes later in the document, so it wins, and the nav sat in the gap with no
 * sign of anything being wrong. Naming the parent puts this rule ahead of it.
 *
 * The distance is exactly the gap content would otherwise sit below the hero
 * at, and no more: the strip butts against the box rather than running up
 * behind it. It used to go a corner radius further so the white filled the two
 * notches the hero's rounded corners leave, but that hid a corner radius of the
 * strip's own top padding, and the moment the bar stuck to the header that
 * padding came back and the row was suddenly top heavy.
 */
/*
 * Width comes from here, not from a class in the content.
 *
 * The row used to take its width from an alignwide class written into the page.
 * That put the layout at the mercy of a word in editable content: rebuilding
 * the page without it dropped the row to the reading measure and it stopped
 * lining up with the box above it. Nothing about how a page is laid out should
 * be something an edit can take away.
 *
 * The parent is named so this beats WordPress's own constrained rule outright.
 * That rule is written with :where(), which carries no specificity, so a bare
 * selector would come down to which stylesheet the browser read last.
 */
.wp-block-post-content > .page-nav,
main > .page-nav {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

.wp-block-post-content > .page-nav {
	margin-block-start: calc(var(--wp--preset--spacing--60) * -1);
}

/*
 * Zero, not the same negative pull as above, and the difference is where the
 * row sits in the tree. On a page it is inside post-content, which is itself
 * already a gap below the hero, so it has that gap to climb back up. On the
 * news archives it is a direct child of main and its own gap is the only one
 * there is, so cancelling it is enough. Pulling it up again sent it a full gap
 * behind the hero, where the hero paints over it and it vanished.
 */
main > .page-nav {
	margin-block-start: 0;
}

/*
 * A floor under the gap between the row and whatever the page opens with.
 *
 * It cannot be left to blockGap. Several of the site's opening elements set
 * margin-block: 0 on themselves, .report-lede among them, and that is the same
 * specificity as the blockGap rule, so the gap simply vanished on three of the
 * four pages and the first line of the page sat against the navigation.
 *
 * Written as the nav's relationship to its next sibling rather than as a margin
 * on each class that might follow it: the rule then holds for anything put
 * there later, and it out-specifies both blockGap and any element zeroing its
 * own margins.
 */
.wp-block-post-content > .page-nav + *,
main > .page-nav + * {
	margin-block-start: var(--wp--preset--spacing--60);
}

/*
 * On a page carrying the nav, the hero and the strip beneath it are one card:
 * green above, white below, rounded at the top and the bottom and straight
 * where they meet. The hero gives up its bottom corners for that.
 *
 * Without this the corners curve away from the join and leave two notches of
 * page showing between the two shapes. They were always there; the deeper wash
 * behind them is what made them visible.
 *
 * !important because the radius arrives as an inline style from the block's own
 * border attribute, and nothing but !important outranks an inline style. The
 * two corners take the same value, so naming them physically is safe: there is
 * nothing here for a text direction to flip.
 */
.has-page-nav .page-hero {
	border-bottom-left-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}

.page-nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-block: 0;
	padding-inline-start: 0;
	list-style: none;
}

/*
 * On a phone the pills wrapped onto five rows and the strip grew taller than
 * the hero above it. One row that scrolls sideways instead: the reader swipes
 * through the sections, and page-nav.js brings the current one into view as
 * they scroll past it, so the row never has to be driven by hand.
 *
 * The scrollbar is hidden because the row is a set of buttons, not a pane of
 * content, and a bar under it would read as a divider.
 */
@media (max-width: 599px) {
	/*
	 * The inset moves off the strip and onto the row inside it, so the row is
	 * as wide as the box and a pill is cut by the box edge rather than
	 * vanishing short of it. Because the inset is padding on a scroll
	 * container it still holds the first and last pill clear of the edge at
	 * either end of the travel, so nothing about the resting layout moves.
	 *
	 * overflow on the strip, not on the row: the bottom corners are rounded by
	 * 25.5px and a pill's lower edge sits 17px above the floor, so a row that
	 * clipped itself square would push a pill out through the curve. Letting
	 * the box do the masking means the mask has the box's shape.
	 */
	.page-nav {
		padding-inline: 0;
		overflow: hidden;
	}

	.page-nav ul {
		padding-inline: var(--wp--preset--spacing--40);
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		/* A swipe that runs out of pills should not start scrolling the page. */
		overscroll-behavior-inline: contain;
		scrollbar-width: none;
	}

	.page-nav ul::-webkit-scrollbar {
		display: none;
	}

	/* Pills keep their own width instead of being squeezed to fit the row. */
	.page-nav li {
		flex: 0 0 auto;
	}

	.page-nav a {
		white-space: nowrap;
	}
}

.page-nav a {
	display: block;
	padding: 0.45em 1.1em;
	border-radius: var(--wp--preset--border-radius--btn);
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--s);
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.page-nav a:hover {
	background-color: var(--wp--preset--color--surface-2);
}

/*
 * aria-current, not a class: the state is which section the reader is in, and
 * that is exactly what the attribute is for, so the styling and the screen
 * reader are told the same thing once.
 */
.page-nav a[aria-current="true"],
.page-nav a[aria-current="page"] {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
}

/* How many posts a category holds. Data, not a label: quieter than the name. */
.page-nav__count {
	margin-inline-start: 0.5em;
	font-size: var(--wp--preset--font-size--xs);
	opacity: 0.55;
	font-variant-numeric: tabular-nums;
}

/*
 * An anchor must not land underneath the header and the row hanging off it.
 * Both of the site's section shapes are named, so a page built out of either
 * one can carry the navigation.
 */
.page-section,
.report-row {
	/*
	 * The script measures the header and the nav row and publishes the total, so
	 * a section landed on stops exactly where the script decides a section has
	 * been reached. The fallback covers the moment before the script has run,
	 * which is when a page opened straight onto a fragment jumps.
	 */
	scroll-margin-block-start: var(
		--reyhaneh-nav-offset,
		calc(var(--reyhaneh-header-height) + 5rem)
	);
}

@media (prefers-reduced-motion: reduce) {
	.page-nav a {
		transition: none;
	}
}

/* ─── Eyebrow and statement ──────────────────────────────────────────── */

/*
 * A short label with a rule leading into it, over a sentence set large enough
 * to be read as a statement rather than as body copy. Persian has no capitals
 * to make an eyebrow out of, and letter-spacing is off the table, so the rule
 * and the colour do that work instead.
 */
.section-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-block: 0;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

.section-eyebrow::before {
	content: "";
	flex: none;
	width: 2.5rem;
	height: 1px;
	background-color: var(--wp--preset--color--accent);
}

/*
 * A statement is a paragraph that has a label over it, and nothing else. It
 * used to be set larger and lighter with balanced lines, and balancing was what
 * stopped it reaching the end of the column: the browser evens the lines out,
 * so the block sits short of the edge while every other paragraph on the page
 * runs the full width. Next to them it read as a different kind of text in a
 * narrower column.
 */
.statement {
	margin-block: 0;
}

/* ─── Name lists ─────────────────────────────────────────────────────── */

/*
 * Ten trustees as one comma-separated run is a paragraph nobody reads to the
 * end of. As a grid each name is a name.
 */
.name-grid ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	margin-block: 0;
	padding-inline-start: 0;
	list-style: none;
}

.name-grid li {
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.7;
}

.name-grid__label {
	margin-block: 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--xs);
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

.name-grid + .name-grid {
	margin-block-start: var(--wp--preset--spacing--50);
}
