/*
 * NSWF section components (CLAUDE.md section 6).
 *
 * Adapted from the prototype. Three systematic changes:
 *  - physical left/right become logical properties (section 3)
 *  - prototype variables become theme.json presets, so editing the palette in
 *    the Site Editor restyles these too
 *  - the prototype's undefined --on-green becomes #fff (see CLAUDE.md § 18)
 */

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

.nswf-section {
	padding-block: clamp(48px, 6vw, 72px);
}

.nswf-section--paper {
	background: var(--wp--preset--color--paper);
}

.nswf-sec-head {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 24px;
	margin-block-end: 32px;
	flex-wrap: wrap;
}

.nswf-kicker {
	color: var(--wp--preset--color--brand);
	font-weight: 500;
	font-size: 15px;
	margin-block-end: 6px;
	display: block;
}

.nswf-lead {
	color: var(--wp--preset--color--muted);
	max-width: 60ch;
}

.nswf-fine {
	font-size: 12.5px;
	color: var(--wp--preset--color--muted);
	line-height: 1.6;
}

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

.nswf-hero {
	position: relative;
	color: #fff;
	background: var(--wp--preset--color--deep);
	overflow: hidden;
}

.nswf-hero::after {
	/* Readability gradient: strongest behind the text, which in RTL is the
	   inline start. Mirrored for LTR below. */
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(270deg, rgba(9, 40, 29, .92) 0%, rgba(9, 40, 29, .78) 42%, rgba(9, 40, 29, .35) 100%);
	pointer-events: none;
}

[dir="ltr"] .nswf-hero::after {
	background: linear-gradient(90deg, rgba(9, 40, 29, .92) 0%, rgba(9, 40, 29, .78) 42%, rgba(9, 40, 29, .35) 100%);
}

.nswf-hero > * {
	position: relative;
	z-index: 1;
}

.nswf-hero h1 {
	color: #fff;
	font-size: var(--wp--preset--font-size--hero);
	line-height: 1.18;
	letter-spacing: -.01em;
}

.nswf-hero__line2 {
	color: var(--wp--preset--color--highlight);
	display: block;
}

.nswf-hero__lead {
	font-size: clamp(17px, 1.6vw, 20px);
	color: var(--nswf-on-deep-1);
	max-width: 46ch;
	font-weight: 300;
}

.nswf-facts {
	/*
	 * A grid, not a wrapping flex row. Three long labels wrapped the group
	 * onto two lines at every desktop width, which read as two groups of
	 * figures rather than one. Equal tracks keep the three on one line and
	 * let each label wrap inside its own column instead.
	 */
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px 24px;
	align-items: start;
}

.nswf-fact {
	border-inline-start: 2px solid color-mix(in srgb, var(--wp--preset--color--highlight) 50%, transparent);
	padding-inline-start: 14px;
}

.nswf-fact b {
	display: block;
	font-size: 26px;
	font-weight: 600;
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.nswf-fact span {
	font-size: 13.5px;
	color: var(--nswf-on-deep-3);
}

.nswf-credit {
	font-size: 11px;
	color: rgba(255, 255, 255, .55);
	direction: ltr;
	unicode-bidi: isolate;
}

/* ---------------------------------------------------------- task cards */

/*
 * The overlap lives on the WRAPPER, not on the grid.
 *
 * Core's flow layout emits `.is-layout-flow > :first-child { margin-block-start: 0 }`,
 * which outranks a single class, so the negative margin set on .nswf-tasks was
 * discarded and the cards sat flush against the hero with neither a gap nor an
 * overlap. The wrapper is not a first child, so it keeps its own margin.
 */
.nswf-tasks-wrap {
	margin-block-start: -32px;
	position: relative;
	z-index: 2;
}

.nswf-tasks {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.nswf-task {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--wp--preset--color--fg);
	text-decoration: none;
	box-shadow: var(--nswf-shadow);
	transition: transform 200ms var(--nswf-ease), border-color var(--nswf-fast) ease;
}

.nswf-task:hover {
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {

	.nswf-task:hover {
		transform: translateY(-3px);
		border-color: var(--wp--preset--color--bright);
	}
}

.nswf-ic {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--brand);
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.nswf-task b {
	font-size: 17px;
	font-weight: 600;
}

.nswf-task span {
	font-size: 14px;
	color: var(--wp--preset--color--muted);
	line-height: 1.6;
}



/* ------------------------------------------------------------- chips */

.nswf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: var(--nswf-pill);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}

.nswf-chip::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.nswf-chip--open {
	background: var(--wp--custom--chip--open-bg);
	color: var(--wp--custom--chip--open-fg);
}

.nswf-chip--work {
	background: var(--wp--custom--chip--work-bg);
	color: var(--wp--custom--chip--work-fg);
}

.nswf-chip--run {
	background: var(--wp--custom--chip--run-bg);
	color: var(--wp--custom--chip--run-fg);
}

/* -------------------------------------------------- reconstruction */

.nswf-rebuild {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	align-items: start;
}

.nswf-phases {
	display: grid;
	gap: 14px;
}

.nswf-phase {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 20px 22px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 18px;
	align-items: center;
}

.nswf-phase .nswf-chip {
	grid-column: 2;
	justify-self: start;
}

.nswf-phase__n {
	grid-row: span 3;
}

.nswf-phase__n {
	grid-row: span 2;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	font-weight: 600;
	font-size: 18px;
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--brand);
}

.nswf-phase h3 {
	font-size: 18px;
}

.nswf-phase p {
	grid-column: 2;
	color: var(--wp--preset--color--muted);
	font-size: 14.5px;
	line-height: 1.6;
}

.nswf-phase__bar {
	grid-column: 1 / -1;
	height: 6px;
	border-radius: 6px;
	background: var(--wp--preset--color--line);
	overflow: hidden;
	margin-block-start: 8px;
}

.nswf-phase__bar i {
	display: block;
	height: 100%;
	background: var(--wp--preset--color--brand);
	border-radius: 6px;
}



/* --------------------------------------------------- cards and grids */

.nswf-grid {
	display: grid;
	gap: 20px;
}

/*
 * The patterns declare these grids as groups with `layout: default`, so core
 * tags them `is-layout-flow` and emits `> * { margin-block-start: 24px }`
 * with `:first-child { 0 }`. Those margins survive `display: grid`, so the
 * FIRST card of the whole grid sat 24px higher and 24px taller than the rest
 * of its row - visible on the reconstruction page, where الخرطوم did not line
 * up with its two neighbours while the second row was fine (all three of its
 * cards carry the margin equally). The gap already spaces these; the margins
 * only ever misaligned them.
 */
.nswf-grid > * {
	margin-block: 0;
}

/* One column on a phone; widened at 600 and 900 below. */
.nswf-grid--2,
.nswf-grid--3,
.nswf-grid--4 { grid-template-columns: 1fr; }



.nswf-card {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nswf-card__media {
	aspect-ratio: 16 / 10;
	background: var(--wp--preset--color--paper) center / cover no-repeat;
	max-width: 100%;
}

.nswf-card__body {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.nswf-card h3 {
	font-size: 19px;
}

.nswf-card p {
	color: var(--wp--preset--color--muted);
	font-size: 15px;
	line-height: 1.7;
}

.nswf-card__meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	font-size: 13.5px;
	color: var(--wp--preset--color--muted);
}

.nswf-card__foot {
	margin-block-start: auto;
	padding-block-start: 8px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.nswf-svc {
	padding: 24px;
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/*
 * A service that has a page of its own is an anchor rather than a div, so it
 * needs the colour and underline reset a card should not inherit from a
 * link, plus something that says it can be followed.
 */
a.nswf-svc--link {
	color: inherit;
	text-decoration: none;
	transition: border-color var(--nswf-fast) ease, box-shadow var(--nswf-fast) ease;
}

a.nswf-svc--link:hover {
	border-color: var(--wp--preset--color--brand);
	box-shadow: var(--nswf-shadow);
}

a.nswf-svc--link h3 {
	color: var(--wp--preset--color--brand);
}

.nswf-svc h3 {
	font-size: 18px;
}

.nswf-svc p {
	color: var(--wp--preset--color--muted);
	font-size: 15px;
	line-height: 1.7;
}

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

/*
 * Two columns at most: the thumbnail, then one stack of date, title and
 * excerpt. The date used to be a grid column of its own, which stranded it at
 * one end of a 1200px row with the title at the other.
 */
.nswf-news {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
}

.nswf-news-item {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding-block: 18px;
	border-block-end: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--fg);
	text-decoration: none;
	height: 100%;
}

.nswf-news-item .wp-block-post-featured-image {
	flex: 0 0 104px;
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp--preset--color--paper);
}

.nswf-news-item .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.nswf-news-item__text {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	gap: 4px;
	align-content: start;
}

.nswf-news-item:hover {
	text-decoration: none;
}

.nswf-news-item time {
	color: var(--wp--preset--color--brand);
	font-size: 14px;
	font-weight: 500;
}

.nswf-news-item h3 {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
	margin: 0;
}

.nswf-news-item p {
	color: var(--wp--preset--color--muted);
	font-size: 15px;
	margin: 0;
}

@media (hover: hover) and (pointer: fine) {

	.nswf-news-item:hover h3 {
		color: var(--wp--preset--color--brand);
	}
}


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

.nswf-page-head {
	background: var(--wp--preset--color--deep);
	color: #fff;
	position: relative;
	overflow: hidden;
	padding-block: 56px 48px;
}

.nswf-page-head > * {
	position: relative;
	z-index: 1;
}

.nswf-page-head h1 {
	color: #fff;
	font-size: var(--wp--preset--font-size--h1);
}

.nswf-page-head p {
	color: var(--nswf-on-deep-2);
	max-width: 60ch;
	font-size: 18px;
	font-weight: 300;
}

.nswf-crumbs {
	font-size: 14px;
	color: var(--nswf-on-deep-3);
	margin-block-end: 14px;
}

.nswf-crumbs a {
	color: var(--nswf-on-deep-2);
}

/* -------------------------------------------------- content blocks */

.nswf-two {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	align-items: center;
}


.nswf-photo {
	border-radius: var(--nswf-r-l);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: center / cover no-repeat var(--wp--preset--color--paper);
	max-width: 100%;
}

/* Diamond bullets (section 4). */
.nswf-list {
	list-style: none;
	padding: 0;
	margin: 16px 0 0;
	display: grid;
	gap: 10px;
}

.nswf-list li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.nswf-list li::before {
	content: "";
	width: 8px;
	height: 8px;
	margin-block-start: 11px;
	flex-shrink: 0;
	background: var(--wp--preset--color--brand);
	transform: rotate(45deg);
	border-radius: 1px;
}

.nswf-types {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.nswf-type {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 24px;
	background: var(--wp--preset--color--bg);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nswf-type h3 {
	font-size: 20px;
}

.nswf-type p {
	color: var(--wp--preset--color--muted);
	font-size: 15px;
}

.nswf-type dl {
	margin: 6px 0 0;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 14px;
	font-size: 14.5px;
}

.nswf-type dt {
	color: var(--wp--preset--color--muted);
}

.nswf-type dd {
	margin: 0;
	font-weight: 500;
}


/* Numbered steps (section 6.3). */
.nswf-steps {
	counter-reset: s;
	display: grid;
	gap: 12px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.nswf-steps li {
	counter-increment: s;
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 14px;
	align-items: start;
	padding: 16px 18px;
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
}

.nswf-steps li::before {
	content: counter(s);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--brand);
	color: #fff;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.nswf-steps b {
	display: block;
	font-weight: 600;
}

.nswf-steps span {
	color: var(--wp--preset--color--muted);
	font-size: 15px;
}

.nswf-note {
	border-radius: 14px;
	padding: 14px 18px;
	background: var(--wp--custom--chip--work-bg);
	color: var(--wp--custom--chip--work-fg);
	font-size: 14.5px;
	line-height: 1.7;
}

/*
 * A refusal should not look like a tip.
 *
 * `.nswf-note` is the ochre "in progress" pair, which is right for a heads
 * up. `--warn` is on thirteen messages across the signed-in area - "this
 * service is not available", "applications are not open", "the form list
 * did not arrive" - several of them carrying role="alert", and it was
 * defined nowhere, so every one of them rendered as an ordinary amber
 * note. Section 4 already names `danger` for errors; this is that colour
 * through the color-mix idiom the figures and rules here already use, so
 * it needs no new token. Measured 5.6:1.
 *
 * Colour is the second signal only: these messages say what is wrong in
 * words, which is what section 12 requires.
 */
.nswf-note--warn {
	background: color-mix(in srgb, var(--wp--preset--color--danger) 10%, #fff);
	color: var(--wp--preset--color--danger);
}

/* ------------------------------------------------------ dark bands */

.nswf-band {
	background: var(--wp--preset--color--deep);
	color: var(--nswf-on-deep-2);
	position: relative;
	overflow: hidden;
	border-radius: var(--nswf-r-l);
	padding: clamp(32px, 5vw, 56px);
}

.nswf-band > * {
	position: relative;
	z-index: 1;
}

.nswf-band h2,
.nswf-band h3 {
	color: #fff;
}

/*
 * Fine print on a dark band needs the dark-band palette.
 *
 * `.nswf-fine` is `--muted` (#55625B), which is right on paper and is
 * 1.95:1 on deep green - a WCAG failure at 12.5px, and it was carrying the
 * sentence telling students when the loan conditions would be announced.
 * The band already inherits `--nswf-on-deep-2` to its paragraphs; fine
 * print takes `-3`, the quieter of the two light tokens, so it stays
 * subordinate without dropping out of sight. Measured 6.4:1.
 */
.nswf-band .nswf-fine {
	color: var(--nswf-on-deep-3);
}

.nswf-products {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.nswf-product {
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: var(--nswf-r-m);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nswf-product__name {
	color: var(--wp--preset--color--highlight);
	font-weight: 600;
	font-size: 18px;
}

.nswf-product p {
	color: var(--nswf-on-deep-2);
	font-size: 14.5px;
	line-height: 1.7;
}


/* ------------------------------------------------- about page bits */

.nswf-vm {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.nswf-vm__box {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 28px;
	background: var(--wp--preset--color--bg);
}


.nswf-values {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	padding: 0;
	margin: 0;
	list-style: none;
}

.nswf-values li {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--brand-ink);
	border-radius: var(--nswf-pill);
	padding: 8px 18px;
	font-weight: 500;
}

.nswf-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
}

.nswf-timeline li {
	display: grid;
	grid-template-columns: 92px 1fr;
	gap: 18px;
	padding-block: 16px;
	border-block-end: 1px solid var(--wp--preset--color--line);
}

.nswf-timeline b {
	color: var(--wp--preset--color--brand);
	font-variant-numeric: tabular-nums;
}

.nswf-people {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.nswf-person {
	display: flex;
	gap: 14px;
	align-items: center;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 18px;
	background: var(--wp--preset--color--bg);
}

.nswf-person--lead {
	grid-column: 1 / -1;
	background: var(--wp--preset--color--tint);
	border-color: transparent;
}

.nswf-person__av {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--wp--preset--color--brand);
	color: #fff;
	display: grid;
	place-items: center;
	font-weight: 600;
	font-size: 20px;
	flex-shrink: 0;
}

.nswf-person b {
	display: block;
}

.nswf-person span {
	color: var(--wp--preset--color--muted);
	font-size: 14px;
}



.nswf-partners {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.nswf-partners li {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-pill);
	padding: 10px 20px;
	background: var(--wp--preset--color--bg);
	font-size: 15px;
}

/* ------------------------------------------- filters and form fields */

.nswf-filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-block-end: 20px;
	align-items: center;
}

.nswf-seg {
	display: inline-flex;
	background: var(--wp--preset--color--paper);
	border-radius: var(--nswf-pill);
	padding: 4px;
	gap: 2px;
	flex-wrap: wrap;
}

.nswf-seg button {
	border: 0;
	background: none;
	font: inherit;
	font-size: 14.5px;
	padding: 7px 14px;
	border-radius: var(--nswf-pill);
	cursor: pointer;
	color: var(--wp--preset--color--muted);
	transition: background-color var(--nswf-fast) ease, color var(--nswf-fast) ease;
}

.nswf-seg button[aria-pressed="true"] {
	background: var(--wp--preset--color--bg);
	color: var(--wp--preset--color--fg);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	font-weight: 500;
}

/*
 * Text-like fields only.
 *
 * This set gives every field a border, padding and width:100%. A radio or a
 * checkbox is not a field you type into, and taking the full width made each
 * one an 700px-wide box that shoved its own label to the far edge - the whole
 * service step of the wizard read as broken. They are sized below instead.
 */
/*
 * Qualified by element on purpose. `nswf-field` names two different things:
 * a control (the state search, the wizard's inputs) and the <p> that wraps a
 * label, its control and its hint in the student forms. Unqualified, the
 * wrapper was given a border and a pill radius of its own, so every field
 * rendered inside a second, rounder box - the double outline. A <p> cannot
 * match these selectors, so the wrapper is now styled by nothing here.
 */
input.nswf-field,
select.nswf-field,
textarea.nswf-field,
.nswf-form select,
.nswf-form input:not([type="radio"]):not([type="checkbox"]),
.nswf-form textarea {
	box-sizing: border-box; /* width:100% must INCLUDE the padding and border */
	font: inherit;
	font-size: 16px; /* 16px avoids iOS zoom-on-focus */
	color: var(--wp--preset--color--fg);
	background: var(--wp--preset--color--bg);
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 11px 14px;
	width: 100%;
	transition: border-color var(--nswf-fast) ease;
}

/*
 * The "notify me" form is one row, not three stacked blocks.
 *
 * `nswf-form--inline` has been on that form's markup since it was written and
 * was never defined anywhere, so a name field and a phone field each spanned
 * the full 1150px of the dark band - the width of the field told the reader
 * to expect a paragraph. Two short fields and the button now share a row from
 * 600px and stack below it.
 *
 * Only the three <p> wrappers are in flow here: the hidden inputs and the
 * nonce are display:none by the UA stylesheet, and the honeypot is already
 * position:absolute, so none of them claims a column.
 */
.nswf-form--inline {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	align-items: end;
}

.nswf-form--inline > p {
	margin: 0;
}

@media (min-width: 600px) {

	.nswf-form--inline {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
		gap: 16px 18px;
	}
}

.nswf-form input[type="radio"],
.nswf-form input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border-radius: 0;
	accent-color: var(--wp--preset--color--brand);
}

/*
 * The label takes the room the control gave back.
 *
 * Not the dot: the checker's own radio is a <span class="nswf-opt__dot">, and
 * `.nswf-opt > span` outranks `.nswf-opt__dot` on specificity, so the shorthand
 * here overrode its flex-shrink and grew an 18px circle into a wide ellipse.
 */
.nswf-opt > span:not(.nswf-opt__dot) {
	flex: 1 1 auto;
	min-width: 0;
}

.nswf-form select:focus,
.nswf-form input:focus,
.nswf-form textarea:focus {
	border-color: var(--wp--preset--color--brand);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--brand) 20%, transparent);
}

.nswf-empty {
	padding: 40px;
	text-align: center;
	color: var(--wp--preset--color--muted);
	border: 1.5px dashed var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
}

/* Placeholder for blocks that arrive in phases 5 and 6. */
.nswf-placeholder {
	border: 1.5px dashed var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 32px;
	text-align: center;
	color: var(--wp--preset--color--muted);
	background: var(--wp--preset--color--paper);
}

/* ------------------------------------------------ eligibility checker */

.nswf-checker {
	background: var(--wp--preset--color--bg);
	color: var(--wp--preset--color--fg);
	border-radius: var(--nswf-r-l);
	padding: 28px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
	text-align: start;
}

.nswf-checker__title {
	font-size: 22px;
}

.nswf-checker__sub {
	color: var(--wp--preset--color--muted);
	font-size: 14.5px;
	margin-block-start: 4px;
}

.nswf-checker__dots {
	display: flex;
	gap: 6px;
	margin: 18px 0 16px;
}

.nswf-checker__dots i {
	height: 4px;
	flex: 1;
	border-radius: 4px;
	background: var(--wp--preset--color--line);
	transition: background-color 200ms ease;
}

.nswf-checker__dots i.is-on {
	background: var(--wp--preset--color--brand);
}

.nswf-checker__step {
	border: 0;
	margin: 0;
	padding: 0;
}

.nswf-checker__q {
	font-weight: 500;
	font-size: 17px;
	margin-block-end: 12px;
	padding: 0;
}

.nswf-checker__opts {
	display: grid;
	gap: 8px;
}

.nswf-opt {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	text-align: start;
	background: var(--wp--preset--color--paper);
	border: 1.5px solid transparent;
	border-radius: 14px;
	padding: 13px 16px;
	font: inherit;
	font-size: 15.5px;
	color: var(--wp--preset--color--fg);
	cursor: pointer;
	transition: border-color var(--nswf-fast) ease, background-color var(--nswf-fast) ease, transform var(--nswf-fast) var(--nswf-ease);
}

.nswf-opt:hover {
	border-color: var(--wp--preset--color--bright);
}

.nswf-opt:active {
	transform: scale(.98);
}

.nswf-opt__dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid var(--wp--preset--color--muted);
	flex-shrink: 0;
}

.nswf-checker__back {
	background: none;
	border: 0;
	color: var(--wp--preset--color--muted);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	margin-block-start: 14px;
	padding: 4px 0;
}

.nswf-result__list {
	display: grid;
	gap: 8px;
	margin: 14px 0 18px;
	padding: 0;
	list-style: none;
}

.nswf-result__list li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--wp--preset--color--paper);
	font-size: 15px;
}

.nswf-result__list li.is-yes {
	background: var(--wp--custom--chip--open-bg);
}

.nswf-result__list li.is-no {
	color: var(--wp--preset--color--muted);
}

.nswf-result__mark {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 700;
	background: var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
}

.nswf-result__list li.is-yes .nswf-result__mark {
	background: var(--wp--preset--color--brand);
	color: #fff;
}

.nswf-result__list li.is-soon .nswf-result__mark {
	background: var(--wp--custom--chip--work-bg);
	color: var(--wp--custom--chip--work-fg);
}

.nswf-result__list small {
	display: block;
	color: var(--wp--preset--color--muted);
	font-size: 13px;
	line-height: 1.5;
}

.nswf-result__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-block-end: 14px;
}

/* Buttons inside blocks, matching the core button element styling. */
.nswf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 0;
	border-radius: var(--nswf-pill);
	padding: 12px 22px;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--nswf-fast) ease;
}

.nswf-btn:hover {
	text-decoration: none;
}

.nswf-btn--primary {
	background: var(--wp--preset--color--brand);
	color: #fff;
}

.nswf-btn--primary:hover {
	background: var(--wp--preset--color--brand-ink);
	color: #fff;
}

.nswf-btn--ghost {
	background: transparent;
	color: var(--wp--preset--color--fg);
	border: 1px solid var(--wp--preset--color--line);
}

.nswf-btn--ghost:hover {
	background: var(--wp--preset--color--paper);
}

.nswf-btn--sm {
	padding: 8px 16px;
	font-size: 14px;
}

/* The hero's checker sits in the second column on wide screens. */
.nswf-hero__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: center;
}

/*
 * Stacked, the checker comes before the figures.
 *
 * It is what a student is there to do, and behind the heading, the lead, two
 * buttons and three figures it began a full screen down the page. The figures
 * are context rather than a task, so they follow it. They are a sibling of
 * the checker rather than part of the text column precisely so this ordering
 * is possible; above 900px both are placed explicitly and nothing moves.
 */
.nswf-hero__grid > .nswf-checker {
	order: 1;
}

.nswf-hero__grid > .nswf-facts {
	order: 2;
}


.nswf-filters__label {
	display: inline-flex;
}

.nswf-filters select {
	font: inherit;
	font-size: 15px;
	color: var(--wp--preset--color--fg);
	background: var(--wp--preset--color--bg);
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-pill);
	padding: 8px 16px;
	min-width: 160px;
}

.nswf-editor-placeholder {
	border: 1.5px dashed var(--wp--preset--color--line, #DDE3DC);
	border-radius: 16px;
	padding: 24px;
	background: var(--wp--preset--color--paper, #F3F5F1);
	text-align: center;
}

/* ------------------------------------------------------ state search */

.nswf-field-label {
	display: block;
	width: 100%;
	max-width: 420px;
}

/*
 * The state search only. It is the one `nswf-field` control that lives
 * outside a `.nswf-form`, so it needs its own copy of the field styling, and
 * it is a pill because it sits in the filter row rather than in a form.
 * Scoped by its own data attribute: as a bare `.nswf-field` this rule also
 * painted the student forms' <p> wrappers, and as `select.nswf-field` it
 * out-ordered `.nswf-form select` and turned every form select into a pill.
 */
.nswf-field[data-state-search] {
	box-sizing: border-box;
	font: inherit;
	font-size: 16px; /* 16px keeps iOS from zooming on focus */
	color: var(--wp--preset--color--fg);
	background: var(--wp--preset--color--bg);
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-pill);
	padding: 11px 18px;
	width: 100%;
	transition: border-color var(--nswf-fast) ease;
}

.nswf-field[data-state-search]:focus {
	border-color: var(--wp--preset--color--brand);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--brand) 20%, transparent);
}

/* Visually hidden but available to screen readers (section 12). */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

/* -------------------------------------------------------- wizard */

.nswf-wizard {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: start;
}

.nswf-wz-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 4px;
	grid-auto-flow: column;
	overflow-x: auto;
}

/*
 * Numbers only on a phone. With the labels showing, five steps laid out in a
 * row measured 711px wide and pushed the whole page sideways - the labels
 * come back with the vertical rail at 900px.
 */
.nswf-wz-steps li span {
	display: none;
}

/* The rail must not be able to widen its grid column either. */
.nswf-wizard,
.nswf-wz-steps {
	min-width: 0;
}

.nswf-wz-steps li {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 12px 14px;
	border-radius: 12px;
	color: var(--wp--preset--color--muted);
	font-size: 15px;
}

.nswf-wz-steps li i {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	border: 1.5px solid var(--wp--preset--color--line);
	font-style: normal;
	font-size: 14px;
	font-weight: 600;
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

.nswf-wz-steps li.is-on {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--fg);
	font-weight: 500;
}

.nswf-wz-steps li.is-on i {
	border-color: var(--wp--preset--color--brand);
	background: var(--wp--preset--color--brand);
	color: #fff;
}

.nswf-wz-steps li.is-done i {
	border-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--brand);
}

.nswf-panel {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-l);
	padding: 32px;
	min-width: 0;
}

.nswf-wz-step {
	border: 0;
	margin: 0;
	padding: 0;
}

.nswf-wz-step legend {
	font-size: 20px;
	font-weight: 600;
	margin-block-end: 18px;
	padding: 0;
}

.nswf-label {
	display: block;
	font-weight: 500;
	margin-block-end: 6px;
}

.nswf-optional,
.nswf-hint {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
	font-size: 13.5px;
}

.nswf-hint {
	display: block;
	margin-block-start: 4px;
}

.nswf-opts--inline {
	grid-auto-flow: column;
	justify-content: start;
	gap: 10px;
}

.nswf-opt.is-disabled {
	opacity: .5;
	cursor: not-allowed;
}

/*
 * The honeypot must be unreachable by people but present in the DOM for bots.
 *
 * Clipped rather than pushed to -9999px: an off-screen box still sits outside
 * the viewport, which in RTL lands 10,000px to the RIGHT and shows up as a
 * layout overflow. Clipping keeps the box at 1px where it stands.
 */
.nswf-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* The box is clipped, but its label and field still lay out at their own
   natural width - and from a narrow flex item near the page edge that runs
   off-canvas, which the layout check rightly reports. Sizing them to the box
   keeps the trap exactly as useful (still in the DOM, still submitted, still
   invisible) and stops it being the one thing on a page that overflows. Same
   reasoning as clipping it rather than pushing it to -9999px. */
.nswf-hp label {
	display: block;
	overflow: hidden;
}

.nswf-hp label,
.nswf-hp input {
	inline-size: 1px;
	max-inline-size: 1px;
	min-inline-size: 0;
}

.nswf-wz-nav {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-block-start: 28px;
	padding-block-start: 20px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

.nswf-review {
	width: 100%;
	border-collapse: collapse;
}

.nswf-review th,
.nswf-review td {
	text-align: start;
	padding: 10px 12px;
	border-block-end: 1px solid var(--wp--preset--color--line);
	vertical-align: top;
}

.nswf-review th {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
	width: 45%;
}

.nswf-consent {
	margin-block-start: 20px;
	padding: 14px 16px;
	background: var(--wp--preset--color--paper);
	border-radius: 12px;
}

.nswf-errors {
	background: #FDECEA;
	color: var(--wp--preset--color--danger);
	border-radius: 14px;
	padding: 16px 20px;
	margin-block-end: 24px;
}

.nswf-errors ul {
	margin: 8px 0 0;
	padding-inline-start: 20px;
}

/*
 * One field's problem, written where the applicant is looking.
 *
 * The words carry the message on their own - section 12 does not allow colour
 * to be the only signal - and the control points at this element through
 * aria-describedby, so a screen reader reads it when focus lands there.
 */
.nswf-error {
	display: block;
	margin-block-start: 6px;
	color: var(--wp--preset--color--danger);
	font-size: 14px;
	font-weight: 500;
}

.nswf-error:empty {
	display: none;
}

/* The control carries aria-invalid, never the <p> that wraps it. */
input.nswf-field[aria-invalid="true"],
select.nswf-field[aria-invalid="true"],
textarea.nswf-field[aria-invalid="true"] {
	border-color: var(--wp--preset--color--danger);
}

/* ------------------------------------------------ success + ticket */

.nswf-success {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-l);
	padding: 32px;
}

.nswf-success__ref {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-block: 16px 24px;
	padding: 16px 20px;
	background: var(--wp--custom--chip--open-bg);
	border-radius: 14px;
}

.nswf-ref {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: .04em;
	direction: ltr;
	unicode-bidi: isolate;
	font-variant-numeric: tabular-nums;
}

.nswf-ticket {
	margin-block-start: 28px;
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-l);
	padding: 28px;
}

.nswf-ticket__meta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 18px;
	margin-block: 16px;
}

.nswf-ticket__meta dt {
	color: var(--wp--preset--color--muted);
}

.nswf-ticket__meta dd {
	margin: 0;
}

.nswf-timeline--status li {
	grid-template-columns: 26px 1fr;
	align-items: center;
	border-block-end: 0;
	padding-block: 10px;
}

.nswf-timeline--status li::before {
	content: "";
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid var(--wp--preset--color--line);
}

.nswf-timeline--status li.is-done::before {
	background: var(--wp--preset--color--brand);
	border-color: var(--wp--preset--color--brand);
}

.nswf-timeline--status li.is-pending b {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}


/* --------------------------------------------- news centre tabs */

.nswf-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-block-start: 16px;
}

.nswf-tab {
	display: inline-block;
	padding: 8px 18px;
	border-radius: var(--nswf-pill);
	background: rgba(255, 255, 255, .12);
	color: #fff;
	text-decoration: none;
	font-size: 14.5px;
	white-space: nowrap;
}

.nswf-tab:hover {
	background: rgba(255, 255, 255, .22);
	text-decoration: none;
	color: #fff;
}

.nswf-tab.is-current {
	background: #fff;
	color: var(--wp--preset--color--deep);
	font-weight: 500;
}

/* Sub-category chips sit on the same dark band, one step quieter. */
.nswf-tabs--sub .nswf-tab {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .35);
	font-size: 13.5px;
}

/* The FAQ starter's details blocks. */
.nswf-faq {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 16px 20px;
	margin-block-end: 10px;
	background: var(--wp--preset--color--bg);
}

.nswf-faq summary {
	cursor: pointer;
	font-weight: 500;
}

/* ------------------------------------- organisational structure (6.9)
 *
 * The chart is drawn, not pictured: the markup is a heading plus nested
 * lists, so a screen reader hears the hierarchy and a 360px phone gets a
 * readable outline, while the elbows and spines below are pure CSS and
 * flip with the writing direction like everything else.
 */

.nswf-org {
	margin-block-start: 24px;
}

.nswf-org__crown {
	display: grid;
	justify-items: center;
	gap: 0;
}

.nswf-org__node {
	margin: 0;
	max-width: 100%;
	padding: 14px 28px;
	border-radius: 999px;
	font-weight: 600;
	text-align: center;
}

.nswf-org__node--board {
	background: var(--wp--preset--color--deep);
	color: #fff;
}

.nswf-org__node--sg {
	background: var(--wp--preset--color--brand);
	color: #fff;
}

.nswf-org__stem {
	display: block;
	width: 2px;
	height: 26px;
	background: var(--wp--preset--color--line);
}

.nswf-org__label {
	margin: 14px 0 0;
	text-align: center;
	font-size: 14.5px;
	color: var(--wp--preset--color--muted);
}

.nswf-org__units {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.nswf-org__units li {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-block-start: 3px solid var(--wp--preset--color--brand);
	border-radius: var(--nswf-r-s);
	padding: 14px 16px;
	font-weight: 500;
	line-height: 1.5;
}

.nswf-dirs {
	display: grid;
	gap: 18px;
	margin-block-start: 24px;
	grid-template-columns: 1fr;
	/* Each card hugs its own departments; شئون الولايات has none and
	   would otherwise stretch to the height of its tallest neighbour. */
	align-items: start;
}

.nswf-dir {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	padding: 22px;
}

.nswf-dir__head {
	margin: 0 0 4px;
	padding-block-end: 14px;
	border-block-end: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--deep);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.45;
}

.nswf-dir__deps {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nswf-dir__deps li {
	position: relative;
	padding-inline-start: 26px;
	padding-block-start: 10px;
}

/*
 * The elbow: a vertical drop from the item above, turning into the arm that
 * meets the department's first line. Logical borders, so in Arabic it hangs
 * from the right and in English from the left with no second rule.
 */
.nswf-dir__deps li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0;
	width: 16px;
	height: 30px;
	border-inline-start: 2px solid var(--wp--preset--color--line);
	border-block-end: 2px solid var(--wp--preset--color--line);
	border-end-start-radius: 8px;
}

/* The spine carrying on to the next department; absent on the last. */
.nswf-dir__deps li:not(:last-child)::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 30px;
	inset-block-end: 0;
	width: 2px;
	background: var(--wp--preset--color--line);
}

.nswf-dir__deps li > span {
	display: inline-block;
	background: var(--wp--preset--color--paper);
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 15.5px;
	line-height: 1.5;
}

.nswf-dir__note {
	margin: 14px 0 0;
	color: var(--wp--preset--color--muted);
	font-size: 14.5px;
	line-height: 1.7;
}

/* ------------------------------------------------- events (6B 2.5) */

/*
 * An event card is a news row with a picture that earns its space: a
 * festival or an exhibition is the one thing on this site people look at
 * before they read. Mobile-first, so the base is one column.
 */
.nswf-events {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-block-start: 4px;
}

.nswf-event {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	overflow: hidden;
}

.nswf-event__media {
	display: block;
	background: var(--wp--preset--color--paper);
}

.nswf-event__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.nswf-event__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 22px;
}

.nswf-event__body h3 {
	margin: 0;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.45;
}

.nswf-event__body h3 a {
	color: var(--wp--preset--color--fg);
	text-decoration: none;
}

.nswf-event__body p {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: 15px;
	line-height: 1.7;
}

.nswf-event__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-block-start: auto;
	padding-block-start: 6px;
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}

.nswf-event__when {
	color: var(--wp--preset--color--brand);
	font-weight: 500;
}

.nswf-events__divider {
	margin: 44px 0 20px;
	padding-block-end: 12px;
	border-block-end: 1px solid var(--wp--preset--color--line);
	font-size: 17px;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

/*
 * The strip at the head of a single event.
 *
 * It sits between the photograph and the writer's copy, so the two questions
 * a reader has - when, and where - are answered before the prose starts.
 */
.nswf-event-detail {
	margin-block: 4px 28px;
	padding: 22px 24px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--paper);
}

.nswf-event-detail dl {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px 40px;
	margin: 0;
}

.nswf-event-detail dt {
	margin: 0 0 2px;
	font-size: 13.5px;
	color: var(--wp--preset--color--muted);
}

.nswf-event-detail dd {
	margin: 0;
	font-weight: 500;
	line-height: 1.6;
}

.nswf-event-detail__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-block-start: 20px;
}

/* --------------------------------------------------------- slogan */

/*
 * «من الدمار إلى الإعمار» — the reconstruction project's own line.
 *
 * The slogan is a movement from one state to the other, so the two halves
 * are set apart rather than run together: the first in the body colour, the
 * second in brand green. Larger than a section heading because it is the
 * line people are meant to carry away, and `balance` so the break lands
 * between the halves rather than mid-phrase.
 */
.nswf-slogan {
	margin: 0;
	font-size: clamp(30px, 4.6vw, 46px);
	font-weight: 700;
	line-height: 1.25;
	text-wrap: balance;
}

.nswf-slogan span {
	color: var(--wp--preset--color--brand);
}

/* On a dark band the brand green is too close to the ground to read. */
.nswf-band .nswf-slogan span,
.nswf-hero .nswf-slogan span {
	color: var(--wp--preset--color--highlight);
}

/* ------------------------------------------------- document seams */

/*
 * No white strip between the header, the page and the footer.
 *
 * Core's root layout emits `:where(.wp-site-blocks) > * { margin-block: 24px 0 }`,
 * which put 24px of page background under the navigation on every page - above
 * the hero, above every page-header band - and another 24px above the footer.
 * The three top-level blocks are meant to butt together; the space inside them
 * is `.nswf-section`'s own padding.
 */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/*
 * The same seam one level in: the <header> and <footer> template parts are
 * transparent wrappers with no padding, so the top margin on the group inside
 * them collapses straight out and shows as page background - 36px of white
 * above the dark footer.
 */
.wp-site-blocks > * > :first-child {
	margin-block-start: 0;
}

/* ===================================================================
 * Breakpoints (Phase 6B section 4.1)
 *
 * Everything above is the 360px case. These are the only three widths
 * the layout changes at, and they are min-width only, so a narrow screen
 * never has to undo a desktop rule.
 * =================================================================== */

@media (min-width: 600px) {

	.nswf-tasks {
		grid-template-columns: repeat(2, 1fr);
	}

	.nswf-phase {
		grid-template-columns: auto 1fr auto;
	}

	.nswf-phase .nswf-chip {
		grid-column: auto;
		justify-self: auto;
	}

	.nswf-phase__n {
		grid-row: span 2;
	}

	.nswf-grid--2,
	.nswf-grid--3,
	.nswf-grid--4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.nswf-facts {
		grid-template-columns: repeat(3, 1fr);
	}

	.nswf-news-item {
		gap: 20px;
	}

	.nswf-news-item .wp-block-post-featured-image {
		flex-basis: 132px;
	}

	.nswf-vm {
		grid-template-columns: 1fr 1fr;
	}

	.nswf-people {
		grid-template-columns: repeat(2, 1fr);
	}

	.nswf-org__units,
	.nswf-dirs {
		grid-template-columns: repeat(2, 1fr);
	}

	.nswf-events {
		grid-template-columns: repeat(2, 1fr);
	}

	.nswf-event-detail dl {
		grid-template-columns: repeat(2, max-content);
	}
}

@media (min-width: 900px) {

	.nswf-tasks-wrap {
		margin-block-start: -48px;
	}

	.nswf-tasks {
		grid-template-columns: repeat(4, 1fr);
	}

	/*
	 * Two news rows abreast. A single column of four rows across 1200px gave
	 * each excerpt a ~95-character measure; halved, it lands near 50.
	 */
	.nswf-news {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 40px;
	}

	.nswf-rebuild {
		grid-template-columns: .8fr 1.2fr;
		gap: 48px;
	}

	.nswf-grid--3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.nswf-grid--4 {
		grid-template-columns: repeat(4, 1fr);
	}

	.nswf-two {
		grid-template-columns: 1fr 1fr;
		gap: 48px;
	}

	.nswf-types,
	.nswf-products,
	.nswf-people {
		grid-template-columns: repeat(3, 1fr);
	}

	.nswf-org__units {
		grid-template-columns: repeat(4, 1fr);
	}

	.nswf-dirs {
		grid-template-columns: repeat(3, 1fr);
	}

	.nswf-events {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}

	.nswf-hero__grid {
		grid-template-columns: 1.1fr .9fr;
		gap: 48px;
	}

	/*
	 * Two columns: text over figures on one side, the checker beside both and
	 * centred against them - the arrangement the order above only rearranges
	 * when the grid is a single column.
	 */
	.nswf-hero__grid > .wp-block-group {
		grid-column: 1;
		grid-row: 1;
	}

	.nswf-hero__grid > .nswf-facts {
		grid-column: 1;
		grid-row: 2;
		align-self: start;
	}

	.nswf-hero__grid > .nswf-checker {
		grid-column: 2;
		grid-row: 1 / span 2;
		align-self: center;
	}

	/* The wizard gets its step rail back beside the panel. */
	.nswf-wizard {
		grid-template-columns: 280px 1fr;
		gap: 40px;
	}

	.nswf-wizard > form,
	.nswf-wizard > .nswf-success {
		grid-column: 2;
	}

	.nswf-wizard .nswf-wz-steps {
		grid-column: 1;
		grid-row: 1;
		grid-auto-flow: row;
		overflow-x: visible;
		position: sticky;
		inset-block-start: 110px;
	}

	.nswf-wz-steps li span {
		display: inline;
	}

	.nswf-panel {
		padding: 32px;
	}
}

/* ---------------------------------------------------------------------------
   The Fund by the numbers (About).
   Figures from the Fund's 2023-2025 performance report. Mobile-first like
   everything else here: one column by default, widening with the viewport.
   --------------------------------------------------------------------------- */

.nswf-numbers {
	display: grid;
	gap: 18px;
	grid-template-columns: 1fr;
}

.nswf-number {
	border-inline-start: 3px solid color-mix(in srgb, var(--wp--preset--color--brand) 35%, transparent);
	padding-inline-start: 16px;
}

/*
 * `width: fit-content` is what keeps the number on the same edge as its
 * own label.
 *
 * The markup carries dir="ltr" so the digits and their comma cannot be
 * reordered, but on a full-width block that also sets `text-align: start`
 * to LEFT while the Arabic label beside it starts on the right - so every
 * figure on the About page sat on the opposite edge from the words
 * describing it, with the brand rule meant to tie the pair together on the
 * far side. Shrink-wrapping the box leaves dir="ltr" governing only the
 * digits inside it, and the parent's own direction places the box. No
 * left/right anywhere, so one rule serves both languages.
 */
.nswf-number .nswf-num {
	display: block;
	width: fit-content;
	font-size: clamp(28px, 4.6vw, 38px);
	font-weight: 600;
	line-height: 1.15;
	color: var(--wp--preset--color--brand-ink);
}

.nswf-number span {
	display: block;
	margin-block-start: 4px;
	color: var(--wp--preset--color--muted);
	font-size: 15.5px;
	line-height: 1.5;
}

/* A source note is quieter than an alert: this is provenance, not a warning. */
.nswf-note--source {
	background: transparent;
	color: var(--wp--preset--color--muted);
	border: 1px solid var(--wp--preset--color--line);
	font-size: 14px;
	margin-block-start: 20px;
}

@media (min-width: 600px) {
	.nswf-numbers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 32px;
	}
}

@media (min-width: 900px) {
	.nswf-numbers {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------------------
   How to apply: the two routes the Fund's housing guide describes - online
   through this site, or at the housing office in the complex.
   --------------------------------------------------------------------------- */

.nswf-routes {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}

.nswf-route {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	padding: 20px;
	background: var(--wp--preset--color--bg);
}

.nswf-route h3 {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 600;
}

.nswf-route p {
	margin: 0;
	color: var(--wp--preset--color--muted);
	line-height: 1.6;
}

@media (min-width: 768px) {
	.nswf-routes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

/* ------------------------------------------------- reconstruction gallery */

/*
 * Survey photographs on the reconstruction page.
 *
 * Mobile-first per 6B section 4.1: one column is the default, two from 600px
 * and three from 900px. The images carry their own width/height so the grid
 * reserves space before they load and CLS stays flat on a slow connection,
 * which is the whole point of shipping them at 1600px and ~120KB.
 */
.nswf-gallery {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-top: 28px;
}

.nswf-gallery__item {
	margin: 0;
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	overflow: hidden;
}

.nswf-gallery__item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.nswf-gallery__item figcaption {
	padding: 12px 16px 14px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
	/* A two-line floor, so one frame is not 22px shorter than the next
	   merely because its caption fits on one line. */
	min-height: calc(2 * 1.6em);
}

@media (min-width: 600px) {

	.nswf-gallery {
		grid-template-columns: repeat(2, 1fr);
	}

	.nswf-figs {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 900px) {

	.nswf-gallery {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}
}

/* ------------------------------------------- reconstruction page furniture */

/*
 * A page, not an article.
 *
 * The first version of this page was a single column of prose with headings -
 * blog rhythm. These three pieces give it page rhythm instead: an image it can
 * open on, a figure row that reads as data rather than a sentence, and a
 * gallery whose first frame is given the width it deserves.
 */
.nswf-photo-frame {
	margin: 0;
	border-radius: var(--nswf-r-l);
	overflow: hidden;
	background: var(--wp--preset--color--paper);
}

.nswf-photo-frame img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/*
 * Figures read as a row of numbers, each on its own rule.
 *
 * Core's Columns block was doing this before, and its three flex columns
 * carried three labels of different lengths: one wrapped to two lines and the
 * others did not, so the three blocks ended at three different heights. An
 * explicit grid with a two-line floor under the label lines the tops AND the
 * bottoms up whatever the wording becomes.
 */
.nswf-figs {
	display: grid;
	grid-template-columns: 1fr;
	gap: 22px;
	align-items: start;
}

.nswf-fig {
	border-inline-start: 3px solid color-mix(in srgb, var(--wp--preset--color--bright) 55%, transparent);
	padding-inline-start: 16px;
}

.nswf-fig b {
	display: block;
	font-size: clamp(28px, 3.6vw, 38px);
	line-height: 1.1;
	font-weight: 600;
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.nswf-fig span {
	display: block;
	margin-block-start: 8px;
	font-size: 14px;
	line-height: 1.6;
	min-height: calc(2 * 1.6em);
}

/*
 * A call to action is one band with one job.
 *
 * Both places that had one - the home page partner band and the foot of the
 * reconstruction page - put two buttons inside a bordered white panel beside a
 * paragraph, so the panel's outline competed with the buttons and neither
 * button looked like the main one. This is the band, the sentence and a single
 * primary action, with any second action as a light secondary beside it.
 */
.nswf-cta {
	display: grid;
	gap: 22px;
	align-items: center;
}

.nswf-cta__text {
	max-width: 62ch;
}

.nswf-cta__text > :first-child {
	margin-block-start: 0;
}

.nswf-cta .wp-block-buttons {
	margin: 0;
}

/*
 * Prose that shares a section with cards or a gallery.
 *
 * Those sections are 1200px wide, which is a 90-character measure at the body
 * size - unreadable. Capping the paragraph keeps the line length honest while
 * its inline-start edge still lines up with the grid beside it, which is what
 * a narrower centred block could never do.
 */
.nswf-measure {
	max-width: 68ch;
}

/*
 * The cost line on a damage card.
 *
 * The booklet prices four of the six regions and not the other two, so two
 * cards had the line and four did not - which pushed their descriptions to
 * different heights and made a tidy grid look ragged. Every card now carries
 * the slot, and a region with no published figure says so.
 */
.nswf-cost {
	display: block;
	margin-block: 6px 12px;
	min-height: 1.6em;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--wp--preset--color--brand);
	font-variant-numeric: tabular-nums;
}

.nswf-cost--none {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

@media (min-width: 900px) {

	.nswf-figs {
		grid-template-columns: repeat(3, 1fr);
		gap: 32px;
	}

	.nswf-cta {
		grid-template-columns: 1fr auto;
		gap: 40px;
	}

	/* Five long sentences in one 1200px column is a 90-character measure. */
	.nswf-list--two {
		grid-template-columns: 1fr 1fr;
		column-gap: 48px;
	}
}

/* ------------------------------------------------------------- partners */

/*
 * Partners as cards, not a bare list.
 *
 * The shortcode used to emit `<li>name</li>` and nothing else, in the home
 * page band and on About alike, so the Fund's partners were the least visible
 * thing on either page. A card carries a logo when one is set and becomes a
 * link when one is filled; neither is required, so a name on its own still
 * sits correctly in the grid.
 */
.nswf-partners--cards {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.nswf-partners--cards .nswf-partner {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	text-align: center;
	padding: 24px 20px;
}

.nswf-partners--cards .nswf-partner > a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
}

/*
 * A fixed box for the mark, not a fixed width for the file.
 *
 * The ten logos the Fund supplied are square, but the next one may not be,
 * and a logo that sets its own height makes every card in the row a
 * different shape. The box is constant and the mark is contained inside it.
 */
.nswf-partner__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 84px;
}

.nswf-partners--cards .nswf-partner:hover {
	border-color: var(--wp--preset--color--brand);
}

.nswf-partner__logo img {
	display: block;
	max-width: 110px;
	max-height: 84px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.nswf-partner__name {
	display: block;
	font-weight: 500;
	font-size: 15.5px;
	line-height: 1.5;
}

.nswf-partner__tie {
	display: block;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

/* The band keeps the older single line. */
.nswf-partners--inline {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
}

@media (min-width: 600px) {

	.nswf-partners--cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {

	.nswf-partners--cards {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}


/* --------------------------------------------- the signed-in student area */

/* Status chips reuse the palette the reconstruction phases already set, so a
   student meets one vocabulary of colour across the site. Rejected needs a
   stop colour the phases never had. */

.nswf-chip.is-approved {
	background: var(--wp--custom--chip--open-bg);
	color: var(--wp--custom--chip--open-fg);
}

.nswf-chip.is-pending,
.nswf-chip.is-soon {
	background: var(--wp--custom--chip--work-bg);
	color: var(--wp--custom--chip--work-fg);
}

.nswf-chip.is-rejected {
	background: #FBE9E7;
	color: var(--wp--preset--color--danger);
}

.nswf-student-gate {
	max-width: 56ch;
}

/* The one screen after registering: the username, said once and plainly. */
.nswf-welcome {
	max-width: 56ch;
}

.nswf-welcome__user {
	font-size: clamp(22px, 4vw, 30px);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--brand);
	background: var(--wp--preset--color--tint);
	border-radius: var(--nswf-r-s);
	padding: 12px 18px;
	margin-block: 10px;
	text-align: center;
	user-select: all; /* one tap selects the whole number to copy */
}

.nswf-welcome__cta {
	margin-block: 20px 12px;
}

.nswf-welcome__tick {
	width: 44px;
	height: 44px;
	margin: 0 0 12px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 24px;
	line-height: 1;
	color: #fff;
	background: var(--wp--preset--color--brand);
}

/* No reset route exists, so this explains rather than links. */
.nswf-forgot {
	margin-block-start: 18px;
}

.nswf-forgot > summary {
	cursor: pointer;
	color: var(--wp--preset--color--brand);
	padding-block: 10px; /* a 44px target without a box around it */
}

.nswf-forgot p {
	margin-block: 8px 0;
	color: var(--wp--preset--color--muted);
	font-size: 15px;
}

/* Routes out of the profile, which the header button now lands on. */
.nswf-profile__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-block: 0 22px;
}

/* The gate is where every signed-out visitor to the student area lands, so it
   carries the way in rather than only naming it. */
.nswf-student-gate__cta,
.nswf-apply-routes__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-block: 18px 0;
}

.nswf-apply-routes__cta {
	margin-block: 24px;
}

.nswf-apply-routes .nswf-note {
	margin-block-start: 24px;
}

/* ---- catalog ---- */

.nswf-svc-groups {
	display: grid;
	gap: 36px;
	margin-block-start: 28px;
}

.nswf-svc-group__head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-block-end: 16px;
}

.nswf-svc-group__head > div {
	min-width: 0;
}

.nswf-svc-group__name {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.35;
}

.nswf-svc-group__head .nswf-fine {
	margin-block: 4px 0;
	max-width: 62ch;
}

.nswf-svc__logo {
	flex: none;
	width: 48px;
	height: 48px;
	/* `--nswf-r-sm` is not a token - it is `--nswf-r-s` - so this resolved
	   to 0 and the logo had square corners. */
	border-radius: var(--nswf-r-s);
	object-fit: contain;
	background: var(--wp--preset--color--paper);
}

/*
 * One column on a phone, two from 600px. Grid rows stretch, so cards in a
 * row end level however long the API's description happens to be - they
 * were ragged, each one as tall as its own text, with the action floating
 * at a different height in every card.
 */
.nswf-svc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

@media (min-width: 600px) {
	.nswf-svc-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/*
 * Scoped to the catalog list. `nswf-svc` is also the services grid's card
 * (further up this file), and as a bare class this rule won on order and
 * gave that card the catalog's 18px padding. Its radius came from
 * `--nswf-r-md`, which is not a token - the token is `--nswf-r-m` - so the
 * undefined value resolved to 0 and every service card on the site had
 * square corners.
 */
.nswf-svc-list .nswf-svc {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
	min-width: 0;
}

/* Takes the slack, so the action below it sits on the card's floor. */
.nswf-svc__body {
	min-width: 0;
	flex: 1;
}

.nswf-svc__name {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
}

.nswf-svc__desc {
	margin-block: 6px 0;
	color: var(--wp--preset--color--muted);
	font-size: 15px;
	line-height: 1.6;
}

/*
 * The action, on the card's floor and reading like one. It was a small
 * outline pill floating wherever the text happened to end, which made the
 * one thing a student came to do the quietest mark on the card.
 */
.nswf-svc__cta {
	margin: 0;
	padding-block-start: 4px;
}

.nswf-svc__cta .wp-element-button {
	width: 100%;
}

@media (min-width: 600px) {
	.nswf-svc__cta .wp-element-button {
		width: auto;
		min-width: 140px;
	}
}

/*
 * A service the Fund has not opened yet. Said as a chip rather than a
 * sentence in the same grey as the description, so an open card and a
 * closed one can be told apart at a glance instead of by reading both.
 */
.nswf-svc__shut {
	margin: 0;
	padding-block-start: 4px;
}

.nswf-svc__shut > span {
	display: inline-block;
	padding: 6px 12px;
	border-radius: var(--nswf-pill);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--muted);
	font-size: 14px;
}

/* A closed card recedes; an open one stays on white. */
.nswf-svc:has(.nswf-svc__shut) {
	background: color-mix(in srgb, var(--wp--preset--color--paper) 55%, var(--wp--preset--color--bg));
}

/* ---- my requests ---- */

.nswf-reqs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.nswf-req {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 18px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
	min-width: 0;
}

.nswf-req__link {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	/* The whole row is the target, so the 44px rule is met by the row's own
	   padding rather than by stretching the text. */
	text-decoration: none;
	color: inherit;
}

.nswf-req__link:hover .nswf-req__name,
.nswf-req__link:focus-visible .nswf-req__name {
	text-decoration: underline;
}

.nswf-req__name {
	font-weight: 600;
}

.nswf-req__meta {
	color: var(--wp--preset--color--muted);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.nswf-back {
	margin-block: 0 14px;
	font-size: 15px;
}

.nswf-req-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-block-end: 4px;
}

.nswf-req-head__name {
	margin: 0;
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 600;
	line-height: 1.3;
}

/* ---- key/value table, used by the request detail ---- */

/*
 * A card of rows rather than a bare table. The label and the value were the
 * same size and nearly the same colour, so a column of them read as one
 * grey block; the label is now small and muted above a value that carries
 * the weight. Rows stack on a phone, where a 40% label column left some
 * values two words wide.
 */
.nswf-kv {
	width: 100%;
	border-collapse: collapse;
	margin-block-start: 20px;
	font-size: 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	overflow: hidden;
	background: var(--wp--preset--color--bg);
}

.nswf-kv tr {
	display: grid;
	gap: 2px;
	padding: 14px 18px;
	border-block-end: 1px solid var(--wp--preset--color--line);
}

.nswf-kv tr:last-child {
	border-block-end: 0;
}

.nswf-kv th,
.nswf-kv td {
	display: block;
	padding: 0;
	text-align: start;
	border: 0;
}

.nswf-kv th {
	font-size: 13px;
	font-weight: 500;
	color: var(--wp--preset--color--muted);
	letter-spacing: 0.01em;
}

.nswf-kv td {
	font-weight: 500;
	color: var(--wp--preset--color--fg);
	overflow-wrap: anywhere;
}

/* Side by side once there is room, with the label still the quieter half. */
@media (min-width: 600px) {
	.nswf-kv tr {
		grid-template-columns: 34% 1fr;
		gap: 16px;
		align-items: baseline;
	}

	.nswf-kv th {
		font-size: 15px;
	}
}

/* ---- placement ---- */

.nswf-placement {
	margin-block-start: 24px;
	padding: 20px;
	border: 1px solid var(--wp--preset--color--brand);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--tint);
}

.nswf-placement h3 {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 600;
}

.nswf-placement__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.nswf-placement__grid li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nswf-placement__grid span {
	color: var(--wp--preset--color--muted);
	font-size: 13px;
}

.nswf-placement__grid b {
	font-weight: 600;
}

.nswf-placement .nswf-fine {
	margin-block: 14px 0;
}

@media (min-width: 600px) {
	.nswf-svc-list {
		grid-template-columns: 1fr 1fr;
	}

	.nswf-svc__logo {
		width: 56px;
		height: 56px;
	}

	.nswf-placement__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 900px) {
	/* The rows are a grid now, so a width on the cell does nothing; the
	   label column narrows here instead. */
	.nswf-kv tr {
		grid-template-columns: 28% 1fr;
	}
}

/* ---- sign in ---- */

.nswf-signin {
	max-width: 46ch;
	margin-block-start: 26px;
}

.nswf-signin .nswf-form {
	margin-block-end: 20px;
}

.nswf-account {
	max-width: 46ch;
	margin-block-start: 26px;
}

.nswf-account__name {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 600;
}

.nswf-account__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-block: 16px;
}

.nswf-account form {
	margin-block-start: 8px;
}

.nswf-account .nswf-fine {
	margin-block-start: 16px;
}

/* ---- applying ---- */

/* The radio card below is shared: `.nswf-dorm` chooses a dorm when applying
   for housing, `.nswf-pick` chooses between admission forms when registering.
   One shape, because to a student they are the same gesture. */

.nswf-apply__h {
	margin-block: 28px 6px;
	font-size: 18px;
	font-weight: 600;
}

.nswf-apply fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.nswf-apply legend {
	padding: 0;
}

.nswf-complex + .nswf-complex {
	margin-block-start: 18px;
}

.nswf-complex__name {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

.nswf-dorm,
.nswf-pick {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
	cursor: pointer;
	min-width: 0;
}

.nswf-dorm + .nswf-dorm,
.nswf-pick + .nswf-pick {
	margin-block-start: 8px;
}

.nswf-dorm:has(input:checked),
.nswf-pick:has(input:checked) {
	border-color: var(--wp--preset--color--brand);
	background: var(--wp--preset--color--tint);
}

.nswf-dorm input,
.nswf-pick input {
	margin-block-start: 5px;
	flex: none;
}

.nswf-dorm__body,
.nswf-pick__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nswf-docs .nswf-field {
	margin-block-start: 14px;
}

.nswf-docs input[type="file"] {
	display: block;
	width: 100%;
	max-width: 100%;
	font-size: 15px;
}

/* ---- the interest step ---- */

.nswf-interests { margin-block-start: 22px; }

.nswf-interests h2 {
	margin: 0 0 8px;
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 600;
	line-height: 1.3;
}

.nswf-interest-group {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.nswf-interest-group legend {
	padding: 0;
	margin-block-end: 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

.nswf-interest {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-s);
	background: var(--wp--preset--color--bg);
	cursor: pointer;
	min-width: 0;
}

.nswf-interest + .nswf-interest { margin-block-start: 6px; }

.nswf-interest:has(input:checked) {
	border-color: var(--wp--preset--color--brand);
	background: var(--wp--preset--color--tint);
}

.nswf-interest input { flex: none; }

/* ---- profile ---- */

.nswf-profile { margin-block-start: 22px; }

/* A record is a card, not stacked lines of equal weight. min-width:0 keeps
   a long value from pushing the grid column wider than its track. */
.nswf-record {
	display: grid;
	gap: 4px;
	margin-block: 10px 12px;
	min-width: 0;
}

.nswf-record b {
	font-size: 17px;
}

/* ---- creating an account ---- */

.nswf-reg {
	max-width: 62ch;
	margin-block-start: 26px;
}

.nswf-reg__h {
	margin: 0 0 8px;
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 600;
	line-height: 1.3;
}

/* Wrapping rather than scrolling: four labels do not fit one 360px line in
   either language, and a progress bar that overflows is worse than one that
   takes two lines. */
.nswf-reg-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	counter-reset: nswf-reg;
	font-size: 14px;
}

.nswf-reg-steps li {
	counter-increment: nswf-reg;
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	color: var(--wp--preset--color--muted);
}

.nswf-reg-steps li::before {
	content: counter(nswf-reg);
	display: grid;
	place-items: center;
	flex: none;
	inline-size: 22px;
	block-size: 22px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.nswf-reg-steps li.is-now {
	color: var(--wp--preset--color--fg);
	font-weight: 600;
}

.nswf-reg-steps li.is-now::before {
	background: var(--wp--preset--color--brand);
	border-color: var(--wp--preset--color--brand);
	color: #FFFFFF;
}

.nswf-reg-steps li.is-done::before {
	background: var(--wp--preset--color--tint);
	border-color: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--brand-ink);
}

/* The two ids are alternatives, so the word between them is a divider. */
.nswf-reg__or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-block: 14px;
	color: var(--wp--preset--color--muted);
	font-size: 14px;
}

.nswf-reg__or::before,
.nswf-reg__or::after {
	content: "";
	flex: 1;
	border-block-end: 1px solid var(--wp--preset--color--line);
}

.nswf-reg__forms {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.nswf-reg__legend {
	padding: 0;
	margin-block-end: 10px;
	font-size: 15px;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

/* Resending and changing the number are peers, and neither is the main action
   on the page - that is the form above them. */
.nswf-reg__alt {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-block: 18px 10px;
}

.nswf-reg__confirm {
	margin-block-start: 8px;
}

.nswf-reg__restart {
	margin-block-start: 24px;
	padding-block-start: 18px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

/* ---- account tabs, menu and copy ---- */

/*
 * Links, not script-driven panels. The row WRAPS on a narrow screen rather
 * than scrolling sideways: a scrolling row puts tabs off
 * the edge of a 360px phone with nothing to say they are there, and most
 * students are on a phone. Wrapped, all four stay visible at once.
 */
.nswf-tabs--account {
	/*
	 * The base `.nswf-tabs` is `display: flex` for the news centre's bar,
	 * which made this `ul` a flex ITEM and shrink-wrapped it to the width of
	 * its four tabs - so the hairline stopped after the last one instead of
	 * running to the edge of the sheet below it.
	 */
	display: block;
	margin-block-end: 28px;
}

/*
 * An UNDERLINED strip, not a segmented control.
 *
 * This reverses the 4 November entry in the decisions log, which replaced an
 * underlined row with pills because "the site already speaks in pills". The
 * client has asked for the underline back for the account area. The cost is
 * recorded rather than hidden: these four tabs are now the one control on the
 * site that is not a pill.
 *
 * Still scoped to the --account modifier, because `.nswf-tabs` is ALSO the
 * news centre's category bar (inc/categories.php) - white pills on the dark
 * band. Unscoped, these rules win on source order and repaint that bar.
 */
.nswf-tabs--account ul {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * The hairline lives on each `li`, not on the `ul`, so a row that wraps is
 * still underlined - the English labels are long enough to wrap on a phone,
 * and a `ul` border would have left the upper row floating with no rule. The
 * `::after` is a flexible filler carrying the same hairline, which runs the
 * line to the end of the LAST row; without it the line stopped after the
 * final tab and the sheet below started a column further along.
 */
/*
 * Mobile first. Below 600px the four tabs cannot fit on one row - the
 * English labels alone come to 485px - so they GROW to fill whatever row
 * they land on. That keeps every row's hairline continuous and, more to the
 * point, keeps the active tab's rule sitting on a line: hugging, the first
 * row stopped after the second tab and the active rule floated over the gap.
 */
.nswf-tabs--account li {
	flex: 1 1 auto;
	border-block-end: 1px solid var(--wp--preset--color--line);
}

/*
 * From 600px all four fit on one row, so they go back to their own widths
 * and pack at the inline start. The `::after` is a flexible filler carrying
 * the same hairline, which runs the line to the end of that row; without it
 * the line stopped after the last tab while the sheet below ran full width.
 */
@media (min-width: 600px) {
	.nswf-tabs--account li {
		flex: 0 1 auto;
	}

	.nswf-tabs--account ul::after {
		content: "";
		flex: 1 1 auto;
		min-width: 0;
		border-block-end: 1px solid var(--wp--preset--color--line);
	}
}

/*
 * The active rule is 3px and pulled down by 1px so it sits ON the hairline
 * rather than above it. Inactive tabs keep a transparent rule of the same
 * weight, so nothing shifts when the active tab changes.
 */
.nswf-tabs--account .nswf-tab {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 11px 14px;
	min-height: 44px;
	border-radius: 0;
	border-block-end: 3px solid transparent;
	margin-block-end: -1px;
	background: transparent;
	color: var(--wp--preset--color--muted);
	font-size: 15px;
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--nswf-fast) ease, border-color var(--nswf-fast) ease;
}

.nswf-tabs--account .nswf-tab:hover {
	color: var(--wp--preset--color--fg);
	text-decoration: none;
	border-block-end-color: var(--wp--preset--color--line);
}

.nswf-tabs--account .nswf-tab.is-on {
	color: var(--wp--preset--color--brand);
	font-weight: 600;
	border-block-end-color: var(--wp--preset--color--brand);
}

.nswf-tabs--account .nswf-tab.is-on:hover {
	color: var(--wp--preset--color--brand-ink);
	border-block-end-color: var(--wp--preset--color--brand-ink);
}

/* The header's account menu. `details` gives the open/close and the keyboard
   behaviour; only the panel needs placing. */
.nswf-acct {
	position: relative;
}

.nswf-acct > summary {
	list-style: none;
	cursor: pointer;
}

.nswf-acct > summary::-webkit-details-marker {
	display: none;
}

/*
 * The panel opens INWARD - anchored on whichever side its button sits on -
 * so it can never run off the edge. On a phone the header wraps and the
 * buttons sit at the inline-start of the second row, so the panel hangs
 * from the start edge; in the single-row header above 600px they sit at
 * the inline-end and it hangs from there. Anchoring it to one fixed side
 * put 73px of it past the right edge of a 360px screen.
 */
.nswf-acct__menu {
	position: absolute;
	inset-block-start: calc(100% + 6px);
	inset-inline-start: 0;
	z-index: 60;
	min-width: 220px;
	max-width: calc(100vw - 32px);
	padding: 6px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
	box-shadow: var(--nswf-shadow);
}

.nswf-acct__item {
	display: block;
	padding: 10px 12px;
	min-height: 44px;
	border-radius: var(--nswf-r-s);
	color: var(--wp--preset--color--fg);
	text-decoration: none;
}

.nswf-acct__item:hover {
	background: var(--wp--preset--color--paper);
}

.nswf-acct__out {
	margin-block-start: 6px;
	padding-block-start: 6px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

.nswf-acct__out .wp-element-button {
	width: 100%;
}

@media (min-width: 600px) {
	.nswf-acct__menu {
		inset-inline-start: auto;
		inset-inline-end: 0;
	}
}

/* A value beside the button that copies it. */
.nswf-copy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-block: 10px;
}

.nswf-copy__value {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
	user-select: all;
}

/* On the welcome screen the number is the point of the page, so it keeps
   the larger treatment it had before the button joined it. */
.nswf-welcome.nswf-copy {
	justify-content: center;
	padding: 12px 18px;
	border-radius: var(--nswf-r-s);
	background: var(--wp--preset--color--tint);
}

.nswf-welcome.nswf-copy .nswf-copy__value {
	font-size: clamp(22px, 4vw, 30px);
	color: var(--wp--preset--color--brand);
}

/* ---- account: fields and panels ---- */

/*
 * The settings forms were a stack of bare inputs with no edge between one
 * concern and the next - the email you are changing and the password you
 * are changing sat in one undifferentiated column. Each form is now a card
 * with its own heading, which is also what makes the submit button
 * obviously belong to the fields above it.
 */
.nswf-profile .nswf-form {
	padding: 20px;
	margin-block: 12px 28px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
}

.nswf-profile .nswf-form > :first-child {
	margin-block-start: 0;
}

.nswf-profile .nswf-form > :last-child {
	margin-block-end: 0;
}

/* The heading above each card, set as a section label rather than a
   heading competing with the page title. */
.nswf-profile .nswf-apply__h {
	margin-block: 28px 0;
	font-size: 17px;
	font-weight: 600;
}

.nswf-profile .nswf-apply__h:first-of-type {
	margin-block-start: 0;
}

/* A field needs room to breathe, and its label needs to look like a label
   rather than another line of body text. */
.nswf-profile .nswf-field {
	margin-block: 0 18px;
}

.nswf-profile .nswf-field:last-of-type {
	margin-block-end: 20px;
}

.nswf-profile .nswf-field > label {
	display: block;
	margin-block-end: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--fg);
}

.nswf-profile .nswf-field input,
.nswf-profile .nswf-field select,
.nswf-profile .nswf-field textarea {
	min-height: 48px;
}

/* Section 4 asks for an ochre focus ring on every interactive element; the
   fields were relying on a border-colour change alone, which is a thin
   signal for anyone moving through a form by keyboard. */
.nswf-profile input:focus-visible,
.nswf-profile select:focus-visible,
.nswf-profile textarea:focus-visible,
.nswf-tab:focus-visible,
.nswf-acct__item:focus-visible {
	outline: 3px solid var(--wp--preset--color--ochre);
	outline-offset: 2px;
}


/* ============================================================ account area
 *
 * The record screens behind sign-in: بياناتي، اهتماماتي، إعدادات الحساب.
 * Three of the four tabs are records to READ and one is a thing to DO, and
 * the rule that organises all of this is that those two must not look alike.
 * A record is a sheet of grouped label/value rows; an action is a card with
 * a measured field and one primary button.
 * ======================================================================= */

/*
 * The account area reads at the theme's own contentSize, not the 1200px its
 * page gives it. Every line here is a label and a value, and at 1200px the
 * two sat most of a screen apart with nothing in between; an eight-character
 * password got a field wider than a laptop. Capping and centring turns that
 * empty half-page into margin.
 *
 * Done here rather than in the pattern so it holds without regenerating the
 * stored page content, and so every tab inherits it from one place.
 */
.nswf-profile {
	max-width: 760px;
	margin-inline: auto;
}

/* ---- the record sheet ---- */

.nswf-sheet {
	margin-block-start: 24px;
	padding: 24px 20px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
}

/*
 * A general sibling, not an adjacent one: the note that covers both of the
 * Fund's records sits BETWEEN two groups, so `+` left the group after it
 * with no divider.
 */
.nswf-grp ~ .nswf-grp {
	margin-block-start: 28px;
	padding-block-start: 24px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

/*
 * The side note sits beside the heading, so a reader learns where the group
 * comes from in the same glance that reads its title. It wraps under on a
 * narrow screen, where it loses its divider rather than carrying a rule
 * across the middle of the sheet.
 */
.nswf-grp__h {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
}

.nswf-grp__t {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--brand);
}

.nswf-grp__side {
	margin: 0;
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}

@media (min-width: 600px) {
	.nswf-grp__side {
		padding-inline-start: 12px;
		border-inline-start: 1px solid var(--wp--preset--color--line);
	}
}

/*
 * Inside a sheet the table drops its own card: the sheet IS the card, and a
 * bordered table inside a bordered box is two outlines saying one thing.
 */
.nswf-sheet .nswf-kv {
	margin-block-start: 12px;
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: visible;
}

.nswf-sheet .nswf-kv tr {
	padding: 12px 0;
	border-block-end: 0;
	border-block-start: 1px solid
		color-mix(in srgb, var(--wp--preset--color--line) 55%, var(--wp--preset--color--bg));
}

.nswf-sheet .nswf-kv tr:first-child {
	padding-block-start: 0;
	border-block-start: 0;
}

/* A label needs only its own width; the rest belongs to the value. */
@media (min-width: 600px) {
	.nswf-sheet .nswf-kv tr {
		grid-template-columns: 150px 1fr;
	}
}

/* The note under the Fund's own records, and the line that opens a tab. */
.nswf-gnote {
	max-width: 60ch;
	margin-block: 14px 0;
	line-height: 1.7;
}

.nswf-sheet .nswf-gnote {
	margin-block: 20px 0;
}

.nswf-lede {
	max-width: 62ch;
	margin-block: 0 4px;
	font-size: 13.5px;
	line-height: 1.7;
}

/* ---- اهتماماتي: what was chosen, so a tick rather than a control ---- */

.nswf-chosen {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nswf-chosen__g + .nswf-chosen__g {
	margin-block-start: 20px;
}

/*
 * The parent is the service that was chosen; the chips under it are the
 * kinds chosen from it. Rendered flat, every row repeated the parent's name
 * in front of its own - the same words four times down one column.
 */
.nswf-chosen__p {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.nswf-chosen__tick {
	--nswf-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.4 6.2 11.6 13 4.8'/%3E%3C/svg%3E");
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: var(--nswf-pill);
	background: var(--wp--preset--color--tint);
}

/*
 * A mask rather than a coloured SVG, so the tick takes its colour from the
 * palette and cannot drift from it.
 */
.nswf-chosen__tick::before {
	content: "";
	display: block;
	width: 13px;
	height: 13px;
	background: var(--wp--preset--color--brand);
	-webkit-mask: var(--nswf-tick) center / 13px 13px no-repeat;
	mask: var(--nswf-tick) center / 13px 13px no-repeat;
}

.nswf-chosen__k {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	margin-inline-start: 11px;
	padding-inline-start: 23px;
	border-inline-start: 1px solid var(--wp--preset--color--line);
}

.nswf-chosen__k li {
	display: flex;
	align-items: center;
	min-height: 36px;
	padding: 7px 15px;
	border-radius: var(--nswf-pill);
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--brand-ink);
	font-size: 14px;
	font-weight: 500;
}

/* ---- إعدادات الحساب ---- */

/*
 * The username is the one thing a student needs to get back in, and the one
 * thing registration handed them in passing. It gets a tinted strip of its
 * own above the two things they may change.
 */
.nswf-ustrip {
	margin-block-start: 24px;
	padding: 16px 20px;
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--tint);
}

.nswf-ustrip__l {
	margin: 0 0 4px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--wp--preset--color--brand-ink);
}

.nswf-ustrip .nswf-fine {
	margin-block: 8px 0;
}

/* An action is a card: heading, one line saying what it is for, a measured
   field, one primary button. */
.nswf-fcard {
	margin-block-start: 14px;
	padding: 20px 18px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nswf-r-m);
	background: var(--wp--preset--color--bg);
}

.nswf-fcard .nswf-apply__h {
	margin-block: 0 4px;
}

.nswf-fcard__sub {
	max-width: 52ch;
	margin-block: 0 16px;
}

/*
 * `.nswf-profile .nswf-form` is itself a bordered card, from before these
 * sections existed. Inside `.nswf-fcard` the wrapper IS the card, so the
 * form drops its own - otherwise every field sat in a second rounded box
 * inside the first, which is the double-outline the 3 November entry of the
 * decisions log describes, arriving from the other direction.
 */
.nswf-fcard .nswf-form {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

/*
 * 420px, because these fields hold an address and a password - not a
 * paragraph. Full width is what made an eight-character password look like
 * a form for something else entirely.
 */
@media (min-width: 600px) {
	.nswf-fcard .nswf-field {
		max-width: 420px;
	}
}

/*
 * Signing out is not a third setting. It sits under a rule, in a quiet
 * button, with the sentence that explains the session beside it.
 */
.nswf-sout {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 28px;
	margin-block-start: 28px;
	padding-block-start: 20px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

.nswf-sout p {
	flex: 1 1 24ch;
	max-width: 52ch;
	margin: 0;
}

.nswf-sout form {
	margin: 0;
}

/* ---- the header's account button ---- */

/*
 * A chevron, so the button looks like what it is: a menu, not a link to one
 * more page. Masked rather than drawn as a coloured SVG, so it inherits the
 * button's own colour in both the ghost and the hover state.
 */
.nswf-acct > summary {
	--nswf-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.4 8 10.4 12 6.4'/%3E%3C/svg%3E");
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 44px;
	padding-inline: 10px;
	border: 0;
	background: none;
	color: var(--wp--preset--color--fg);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	list-style: none;
	cursor: pointer;
	transition: color var(--nswf-fast) ease;
}

.nswf-acct > summary:hover {
	color: var(--wp--preset--color--brand);
}

.nswf-acct > summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--ochre);
	outline-offset: 2px;
	border-radius: var(--nswf-r-s);
}

.nswf-acct > summary::after {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: var(--nswf-chev) center / 14px 14px no-repeat;
	mask: var(--nswf-chev) center / 14px 14px no-repeat;
	transition: transform var(--nswf-fast) ease;
}

.nswf-acct[open] > summary::after {
	transform: rotate(180deg);
}

/* ---- the hamburger overlay's extras ---- */

/*
 * Mobile first. Below 600px the language switch and the account menu live
 * INSIDE the overlay (inc/nav.php injects them), so the header itself is one
 * row of brand and hamburger rather than wrapping to a second row carrying
 * them under the logo.
 */
.nswf-nav__extras {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-block-start: 20px;
	padding-block-start: 20px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

.nswf-nav__signin {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--fg);
	font-size: 17px;
	font-weight: 500;
	text-decoration: none;
}

.nswf-nav__signin:hover {
	color: var(--wp--preset--color--brand);
}

/*
 * From 600px the overlay is gone and the header shows its own row of
 * actions, so the injected copies step aside. Without this they would render
 * inline beside the menu, duplicating what the header already shows.
 */
@media (min-width: 600px) {
	.nswf-nav__extras {
		display: none;
	}
}

/*
 * Qualified by the header, not a bare class: core emits
 * `body .is-layout-flex { display: flex }` at specificity 0,1,1, which
 * outranks `.nswf-header__actions` at 0,1,0 - so the row stayed visible and
 * the phone still showed «حسابي» and «EN» under the brand. Two classes beat
 * it without reaching for !important.
 */
.nswf-header .nswf-header__actions {
	display: none;
}

@media (min-width: 600px) {
	.nswf-header .nswf-header__actions {
		display: flex;
	}
}
