/*
 * Nusa Foundation — component styles.
 * Every color, font, size and radius comes from theme.json presets (Global Styles).
 * Mobile first: base styles target small screens; min-width queries add columns.
 */

/* ------------------------------------------------------------ Base */

html {
	scroll-padding-top: calc(var(--wp--custom--header--height, 72px) + 1rem);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

img {
	max-width: 100%;
	height: auto;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

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

.nusafdt-main {
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--60);
}

.nusafdt-main--home {
	padding-top: 0;
}

.nusafdt-main--landing {
	padding-top: 0;
}

.nusafdt-main--focused {
	padding-top: var(--wp--preset--spacing--50);
}

/* ------------------------------------------------------------ Header */

.nusafdt-site-header {
	position: relative;
	z-index: 50;
}

.nusafdt-sticky-header .nusafdt-site-header {
	position: sticky;
	top: 0;
}

/* The admin bar scrolls away on phones, so the header sticks to the very top there. */
.admin-bar.nusafdt-sticky-header .nusafdt-site-header {
	top: 0;
}

@media (min-width: 601px) {
	.admin-bar.nusafdt-sticky-header .nusafdt-site-header {
		top: var(--wp-admin--admin-bar--height, 32px);
	}
}

.nusafdt-header {
	min-height: var(--wp--custom--header--height);
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--base);
}

.nusafdt-header__inner {
	gap: 1rem;
}

.nusafdt-brand {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.1rem;
	min-width: 0;
}

.nusafdt-brand .custom-logo-link {
	display: block;
	line-height: 0;
}

.nusafdt-brand .custom-logo {
	display: block;
	width: var(--nusafdt-logo-w-m, 128px);
	max-width: 52vw;
	height: auto;
	max-height: 56px;
	object-fit: contain;
	object-position: left center;
}

.nusafdt-site-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 52vw;
}

.nusafdt-site-title a {
	color: inherit;
	text-decoration: none;
}

.nusafdt-site-tagline {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 52vw;
}

@media (min-width: 782px) {
	.nusafdt-brand .custom-logo {
		width: var(--nusafdt-logo-w, 180px);
		max-width: 30vw;
		max-height: 72px;
	}

	.nusafdt-site-title,
	.nusafdt-site-tagline {
		max-width: 32vw;
	}
}

.nusafdt-header--minimal .nusafdt-brand {
	align-items: center;
	margin-inline: auto;
	text-align: center;
}

.nusafdt-header__actions {
	gap: 0.5rem;
}

.nusafdt-header-cta .wp-block-button__link {
	padding: 0.5rem 0.85rem;
	font-size: var(--wp--preset--font-size--small);
	white-space: nowrap;
}

.nusafdt-header-cta.is-style-nusafdt-outline .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--primary);
}

@media (min-width: 600px) {
	.nusafdt-header__actions {
		gap: 0.75rem;
	}

	.nusafdt-header-cta .wp-block-button__link {
		padding: 0.55rem 1.1rem;
		font-size: inherit;
	}
}

/*
 * Primary menu, mobile-first: it stays behind the menu button until there is room for every
 * item. The width is chosen in Customize > Header (body class nusafdt-nav-600/782/1024/1200).
 */
.nusafdt-nav-primary .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: flex;
}

.nusafdt-nav-primary .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
	display: none;
}

@media (min-width: 600px) {
	.nusafdt-nav-600 .nusafdt-nav-primary .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}

	.nusafdt-nav-600 .nusafdt-nav-primary .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		position: relative;
		z-index: auto;
		display: block;
		width: 100%;
		background-color: inherit;
	}
}

@media (min-width: 782px) {
	.nusafdt-nav-782 .nusafdt-nav-primary .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}

	.nusafdt-nav-782 .nusafdt-nav-primary .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		position: relative;
		z-index: auto;
		display: block;
		width: 100%;
		background-color: inherit;
	}
}

@media (min-width: 1024px) {
	.nusafdt-nav-1024 .nusafdt-nav-primary .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}

	.nusafdt-nav-1024 .nusafdt-nav-primary .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		position: relative;
		z-index: auto;
		display: block;
		width: 100%;
		background-color: inherit;
	}
}

@media (min-width: 1200px) {
	.nusafdt-nav-1200 .nusafdt-nav-primary .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}

	.nusafdt-nav-1200 .nusafdt-nav-primary .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		position: relative;
		z-index: auto;
		display: block;
		width: 100%;
		background-color: inherit;
	}
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.5rem 0.25rem;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}

/* ------------------------------------------------------------ Breadcrumbs */

.nusafdt-breadcrumbs {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.nusafdt-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nusafdt-breadcrumbs li + li::before {
	content: "/";
	margin-right: 0.25rem;
	color: var(--wp--preset--color--border);
}

.nusafdt-breadcrumbs a {
	color: inherit;
}

/* ------------------------------------------------------------ Sections and block styles */

.nusafdt-section {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
}

.nusafdt-section:empty {
	display: none;
}

.is-style-nusafdt-band {
	background: var(--wp--preset--color--surface);
}

.is-style-nusafdt-card,
.nusafdt-card-box {
	padding: var(--wp--custom--card--padding);
	background: var(--wp--preset--color--surface);
}

.is-style-nusafdt-band .is-style-nusafdt-card,
.is-style-nusafdt-band .nusafdt-card-box {
	background: var(--wp--preset--color--base);
}

.wp-block-button.is-style-nusafdt-outline .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--primary);
	background: transparent;
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-nusafdt-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.is-style-nusafdt-checklist {
	padding-left: 0;
	list-style: none;
}

.is-style-nusafdt-checklist li {
	position: relative;
	padding-left: 1.75rem;
}

.is-style-nusafdt-checklist li::before {
	content: "";
	position: absolute;
	top: 0.45em;
	left: 0.2rem;
	width: 0.45rem;
	height: 0.8rem;
	border: solid var(--wp--preset--color--primary);
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

.nusafdt-cta-band {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

.nusafdt-cta-band :where(h1, h2, h3, p) {
	color: var(--wp--preset--color--base);
}

.nusafdt-cta-band .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.nusafdt-section-title {
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 3px solid var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--large);
}

.nusafdt-section-title a {
	color: inherit;
	text-decoration: none;
}

.nusafdt-faq .wp-block-details {
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.nusafdt-faq summary {
	min-height: 44px;
	font-weight: 600;
	cursor: pointer;
}

/* ------------------------------------------------------------ Layout with sidebar */

.nusafdt-with-sidebar {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1000px) {
	.nusafdt-with-sidebar {
		grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
	}

	.nusafdt-no-sidebar .nusafdt-with-sidebar {
		grid-template-columns: minmax(0, 1fr);
		max-width: 820px;
		margin-inline: auto;
	}
}

.nusafdt-no-sidebar .nusafdt-sidebar {
	display: none;
}

.nusafdt-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

@media (min-width: 1000px) {
	.nusafdt-sidebar {
		position: sticky;
		top: calc(var(--wp--custom--header--height) + 1.5rem);
		align-self: start;
	}
}

.nusafdt-content-col > * + * {
	margin-top: var(--wp--preset--spacing--50);
}

/* ------------------------------------------------------------ Articles (news) */

.nusafdt-article {
	display: grid;
	gap: 0.6rem;
	align-content: start;
}

.nusafdt-article__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--surface);
}

.nusafdt-article__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nusafdt-article__body {
	display: grid;
	gap: 0.35rem;
	align-content: start;
}

.nusafdt-article__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.3;
}

.nusafdt-article__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.nusafdt-article__title a:hover,
.nusafdt-article__title a:focus {
	text-decoration: underline;
}

.nusafdt-article__excerpt {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

.nusafdt-article__date {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.nusafdt-kicker,
.nusafdt-kicker-terms a {
	color: var(--wp--preset--color--primary);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0;
	text-decoration: none;
}

.nusafdt-article--lead .nusafdt-article__title {
	font-size: var(--wp--preset--font-size--x-large);
}

.nusafdt-article--compact {
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 0.75rem;
}

.nusafdt-article--compact .nusafdt-article__media {
	aspect-ratio: 3 / 2;
}

.nusafdt-article--compact .nusafdt-article__title {
	font-size: 0.975rem;
}

/* Headline */
.nusafdt-headline {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

.nusafdt-headline__secondary {
	display: grid;
	gap: 1rem;
	align-content: start;
}

@media (min-width: 760px) {
	.nusafdt-headline {
		grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
	}

	.nusafdt-headline__secondary .nusafdt-article + .nusafdt-article {
		padding-top: 1rem;
		border-top: 1px solid var(--wp--preset--color--border);
	}
}

/* Latest */
.nusafdt-latest__list {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 640px) {
	.nusafdt-latest__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.nusafdt-no-sidebar .nusafdt-latest__list,
	.nusafdt-main--home .nusafdt-latest__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.nusafdt-latest .page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.nusafdt-more {
	margin-top: 1rem;
	font-weight: 600;
}

/* Category blocks */
.nusafdt-catblocks {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

.nusafdt-catblock__grid {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

.nusafdt-catblock__list {
	display: grid;
	gap: 1rem;
	align-content: start;
}

@media (min-width: 760px) {
	.nusafdt-catblock__grid {
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	}
}

/* Picks and sidebar */
.nusafdt-picks__list {
	margin: 0;
	padding: 0;
	counter-reset: pick;
	list-style: none;
}

.nusafdt-picks__list li {
	position: relative;
	padding: 0.65rem 0 0.65rem 2.25rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	counter-increment: pick;
	font-weight: 600;
	line-height: 1.35;
}

.nusafdt-picks__list li::before {
	content: counter(pick);
	position: absolute;
	top: 0.55rem;
	left: 0;
	color: var(--wp--preset--color--primary);
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1;
}

.nusafdt-picks__list a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.nusafdt-picks__list a:hover,
.nusafdt-picks__list a:focus {
	text-decoration: underline;
}

.nusafdt-sidebar-box .wp-block-categories {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nusafdt-sidebar-box .wp-block-categories li {
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Archive (news): first item is the lead story */
.nusafdt-news-archive .wp-block-post-template {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.nusafdt-news-archive .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nusafdt-news-archive .wp-block-post-template > li:first-child {
		grid-column: 1 / -1;
	}

	.nusafdt-news-archive .wp-block-post-template > li:first-child .wp-block-post-title {
		font-size: var(--wp--preset--font-size--x-large);
	}
}

.nusafdt-news-archive .wp-block-post-template > li > * + *,
.nusafdt-classic-list .wp-block-post-template > li > * + * {
	margin-top: 0.4rem;
}

.nusafdt-classic-list .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nusafdt-classic-list .wp-block-post-template > li {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--50);
	gap: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}

/* ------------------------------------------------------------ Single article */

.nusafdt-meta {
	gap: 0.35rem 1rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.nusafdt-meta > * {
	margin: 0;
}

.nusafdt-modified::before {
	content: "↻ ";
}

.nusafdt-article-body {
	font-size: 1.0625rem;
	line-height: 1.75;
}

.nusafdt-article-body > * + * {
	margin-top: 1.25em;
}

.nusafdt-tags a {
	display: inline-block;
	margin: 0 0.35rem 0.35rem 0;
	padding: 0.2rem 0.6rem;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.nusafdt-share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.nusafdt-share ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nusafdt-share a {
	display: inline-flex;
	min-height: 40px;
	align-items: center;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--sm);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.nusafdt-share a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.nusafdt-share__label {
	font-weight: 600;
}

.nusafdt-author {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: var(--wp--custom--card--padding);
	background: var(--wp--preset--color--surface);
}

.nusafdt-author__avatar {
	border-radius: 50%;
}

.nusafdt-author__name {
	margin: 0;
	font-weight: 700;
}

.nusafdt-author__bio {
	margin: 0.25rem 0 0;
	color: var(--wp--preset--color--muted);
}

.nusafdt-related__grid {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 640px) {
	.nusafdt-related__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.nusafdt-postnav {
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.nusafdt-reading-time {
	margin: 0;
}

/* ------------------------------------------------------------ Campaign detail */

.nusafdt-campaign-layout {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

@media (min-width: 960px) {
	.nusafdt-campaign-layout {
		grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
	}

	.nusafdt-campaign-aside {
		position: sticky;
		top: calc(var(--wp--custom--header--height) + 1.5rem);
		align-self: start;
	}
}

.nusafdt-campaign-aside {
	/* On small screens the progress card comes first. */
	order: -1;
}

@media (min-width: 960px) {
	.nusafdt-campaign-aside {
		order: 0;
	}
}

.nusafdt-campaign-aside {
	padding: clamp(1.25rem, 3vw, 1.75rem);
	background: var(--wp--preset--color--surface);
}

.nusafdt-donate-section {
	margin-top: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	--nusafdt-c: var(--nusafdt-cut-lg);
	clip-path: polygon(var(--nusafdt-c) 0, 100% 0, 100% calc(100% - var(--nusafdt-c)), calc(100% - var(--nusafdt-c)) 100%, 0 100%, 0 var(--nusafdt-c));
}

/* Plugin post type grids */
.nusafdt-cpt-grid .wp-block-post-template {
	gap: var(--wp--preset--spacing--40);
}

.nusafdt-cpt-grid .is-style-nusafdt-card {
	height: 100%;
	padding: 0 0 var(--wp--custom--card--padding);
	overflow: hidden;
	background: var(--wp--preset--color--surface);
}

.nusafdt-cpt-grid .is-style-nusafdt-card > *:not(.wp-block-post-featured-image) {
	padding-inline: var(--wp--custom--card--padding);
}

.nusafdt-cpt-grid .wp-block-post-featured-image {
	margin: 0 0 0.75rem;
	border-radius: 0;
}

/* ------------------------------------------------------------ Plugin blocks: brand refinements */

.nusafd-org-hero {
	padding-block: var(--wp--preset--spacing--60);
}

.nusafd-org-hero__title {
	max-width: 22ch;
	font-size: var(--wp--preset--font-size--xx-large);
}

.nusafd-org-hero__lead {
	max-width: 60ch;
	color: var(--wp--preset--color--muted);
}

.nusafd-org-hero--compact .nusafd-org-hero__title {
	font-size: var(--wp--preset--font-size--x-large);
}

.nusafd-program-grid__heading,
.nusafd-campaign-grid__heading,
.nusafd-story-list__heading,
.nusafd-impact-stats__heading,
.nusafd-training-list__heading,
.nusafd-transparency__heading {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--x-large);
}

.nusafd-impact-stats__value {
	color: var(--wp--preset--color--primary);
}

.nusafd-cta {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

.nusafd-cta .nusafd-cta__heading,
.nusafd-cta .nusafd-cta__text {
	color: var(--wp--preset--color--base);
}

.nusafd-cta .nusafd-button {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

/* ------------------------------------------------------------ Footer */

.nusafdt-footer {
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--50);
	border-top: 4px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

.nusafdt-footer a,
.nusafdt-footer .wp-block-navigation a {
	color: var(--wp--preset--color--base);
}

.nusafdt-footer--minimal {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--40);
}

.nusafdt-footer__title {
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--medium);
}

.nusafdt-footer-org__name {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

.nusafdt-footer-org__desc {
	max-width: 46ch;
	opacity: 0.92;
}

.nusafdt-footer-org__social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.nusafdt-copyright {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	font-size: var(--wp--preset--font-size--small);
}

.nusafdt-footer--minimal .nusafdt-copyright {
	margin-top: 0;
	border-top: 0;
	text-align: center;
}

/* ------------------------------------------------------------ Editor helpers */

.nusafdt-editor-empty {
	padding: 0.75rem;
	border: 1px dashed currentColor;
	border-radius: 6px;
	font-size: 0.85rem;
	opacity: 0.75;
}

/* ------------------------------------------------------------ Print */

@media print {
	.nusafdt-site-header,
	.nusafdt-site-footer,
	.nusafdt-sidebar,
	.nusafdt-share,
	.nusafd-banner {
		display: none !important;
	}
}

/* Card and hero titles from plugin blocks: no underline until hover. */
.nusafd-campaign-hero__title a,
.nusafd-training-hero__title a,
[class*="nusafd-"][class*="__title"] a {
	color: inherit;
	text-decoration: none;
}
.nusafd-campaign-hero__title a:hover,
.nusafd-training-hero__title a:hover,
[class*="nusafd-"][class*="__title"] a:hover,
[class*="nusafd-"][class*="__title"] a:focus-visible {
	text-decoration: underline;
}

/* ------------------------------------------------------------ Buttons (theme) */

.nusafdt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.65rem 1.4rem;
	border: 2px solid transparent;
	border-radius: var(--wp--custom--radius--button);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nusafdt-btn--solid {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.nusafdt-btn--solid:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.nusafdt-btn--outline {
	border-color: currentColor;
	color: var(--wp--preset--color--primary);
}

.nusafdt-btn--outline:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.nusafdt-btn--light {
	border-color: currentColor;
	color: var(--wp--preset--color--base);
}

.nusafdt-btn--light:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.nusafdt-btn--accent {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.nusafdt-btn--accent:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* ------------------------------------------------------------ Geometric identity */

/*
 * One motif, used with restraint:
 * - Chamfer: two opposite corners cut on the diagonal, taken from the facets of the
 *   eight-pointed star (khatam). Used on photos, cards and panels with a solid fill.
 *   Buttons and inputs stay plain rectangles.
 * - Lattice: a thin khatam line pattern, only on dark bands.
 * - Star: a small eight-pointed star marks where a homepage section starts.
 */
:root {
	--nusafdt-cut-sm: var(--wp--custom--cut--sm, 8px);
	--nusafdt-cut: var(--wp--custom--cut--md, 14px);
	--nusafdt-cut-lg: var(--wp--custom--cut--lg, 22px);
	--nusafdt-section-y: var(--wp--custom--section--y, clamp(3.5rem, 7vw, 6rem));
	--nusafdt-section-gap: var(--wp--custom--section--gap, clamp(1.75rem, 3.5vw, 2.75rem));
	--nusafdt-gutter: var(--wp--custom--gutter, clamp(1rem, 4vw, 2rem));
	--nusafdt-wide: var(--wp--style--global--wide-size, 1200px);
	--nusafdt-lattice: url("../img/khatam-tile.svg");
	--nusafdt-star: url("../img/star8.svg");
}

.nusafdt-chamfer,
.nusafd-card,
.nusafd-campaign-hero__media,
.nusafd-training-hero__media,
.nusafdt-about__media,
.nusafdt-hero--split .nusafdt-hero__media,
.nusafdt-hero--center .nusafdt-hero__media,
.nusafdt-article--lead .nusafdt-article__media,
.nusafdt-article--card .nusafdt-article__media,
.nusafdt-campaign-aside,
.nusafdt-author,
.is-style-nusafdt-card,
.nusafdt-card-box {
	clip-path: polygon(var(--nusafdt-c, var(--nusafdt-cut)) 0, 100% 0, 100% calc(100% - var(--nusafdt-c, var(--nusafdt-cut))), calc(100% - var(--nusafdt-c, var(--nusafdt-cut))) 100%, 0 100%, 0 var(--nusafdt-c, var(--nusafdt-cut)));
}

.nusafd-campaign-hero__media,
.nusafd-training-hero__media,
.nusafdt-about__media,
.nusafdt-hero--split .nusafdt-hero__media,
.nusafdt-hero--center .nusafdt-hero__media {
	--nusafdt-c: var(--nusafdt-cut-lg);
}

.nusafdt-article--compact .nusafdt-article__media {
	--nusafdt-c: var(--nusafdt-cut-sm);
	clip-path: polygon(var(--nusafdt-c) 0, 100% 0, 100% calc(100% - var(--nusafdt-c)), calc(100% - var(--nusafdt-c)) 100%, 0 100%, 0 var(--nusafdt-c));
}

/* Lattice on dark surfaces. */
.nusafdt-lattice,
.nusafdt-tone--dark,
.nusafdt-hero--cover,
.nusafdt-cta,
.nusafdt-footer {
	position: relative;
	isolation: isolate;
}

.nusafdt-tone--dark::before,
.nusafdt-cta::before,
.nusafdt-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--wp--preset--color--base);
	-webkit-mask: var(--nusafdt-lattice) 0 0 / 96px 96px repeat;
	mask: var(--nusafdt-lattice) 0 0 / 96px 96px repeat;
	opacity: 0.06;
	pointer-events: none;
}

/* Section marker. */
.nusafdt-hsec__title::before {
	content: "";
	display: block;
	width: 1.125rem;
	height: 1.125rem;
	margin-bottom: 0.875rem;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: var(--nusafdt-star) center / contain no-repeat;
	mask: var(--nusafdt-star) center / contain no-repeat;
}

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

.nusafdt-main--builder {
	padding: 0;
}

.nusafdt-home-wrap,
.nusafdt-home {
	margin: 0;
}

/*
 * One rhythm for every section: the same vertical padding and the same side gutter.
 * Two neighbouring sections on the same background share one gap instead of two.
 */
.nusafdt-hsec {
	padding: var(--nusafdt-section-y) var(--nusafdt-gutter);
}

.nusafdt-tone--default + .nusafdt-tone--default,
.nusafdt-tone--tinted + .nusafdt-tone--tinted {
	padding-top: 0;
}

.nusafdt-hsec__inner {
	width: 100%;
	max-width: var(--nusafdt-wide);
	margin-inline: auto;
}

.nusafdt-hsec__inner > * {
	margin-block: 0;
}

.nusafdt-hsec__inner > * + * {
	margin-top: var(--nusafdt-section-gap);
}

.nusafdt-tone--default {
	background: var(--wp--preset--color--base);
}

.nusafdt-tone--tinted {
	background: var(--wp--preset--color--surface);
}

.nusafdt-tone--dark {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

.nusafdt-tone--dark :where(h2, h3, a:not(.nusafdt-btn):not(.nusafd-button)) {
	color: inherit;
}

.nusafdt-tone--dark :where(.nusafd-card, .nusafd-campaign-hero, .nusafd-training-hero, .nusafd-transparency, .nusafd-knowledge) {
	color: var(--wp--preset--color--contrast);
}

.nusafdt-tone--dark :where(.nusafd-card, .nusafd-knowledge) a {
	color: var(--wp--preset--color--contrast);
}

/* Section heading: marker, title, short intro. Left aligned, readable measure. */
.nusafdt-hsec__head {
	max-width: 44rem;
}

.nusafdt-hsec__title {
	margin: 0;
	font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.nusafdt-hsec__intro {
	max-width: 38rem;
	margin: 0.75rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: 1.0625rem;
	line-height: 1.6;
}

.nusafdt-tone--dark .nusafdt-hsec__intro {
	color: inherit;
	opacity: 0.82;
}

.nusafdt-hsec__empty {
	margin: 0;
	padding: 1.25rem;
	border: 2px dashed var(--wp--preset--color--border);
	color: var(--wp--preset--color--muted);
	text-align: center;
}

/* Section links ("All campaigns", "More news") sit under the content, aligned left. */
.nusafdt-hsec .nusafd-more,
.nusafdt-hsec .nusafdt-more {
	margin: var(--nusafdt-section-gap) 0 0;
}

.nusafdt-hsec :where(.nusafd-more, .nusafdt-more) a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.5rem 0;
	border-bottom: 2px solid var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	text-decoration: none;
}

.nusafdt-hsec :where(.nusafd-more, .nusafdt-more) a:hover {
	border-bottom-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* ------------------------------------------------------------ Hero */

.nusafdt-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 1rem;
	color: var(--wp--preset--color--primary);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0;
}

.nusafdt-hero__eyebrow::before {
	content: "";
	flex: 0 0 auto;
	width: 0.875rem;
	height: 0.875rem;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: var(--nusafdt-star) center / contain no-repeat;
	mask: var(--nusafdt-star) center / contain no-repeat;
}

.nusafdt-hero__title {
	margin: 0;
	font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: -0.03em;
	overflow-wrap: break-word;
	text-wrap: balance;
}

.nusafdt-hero__text {
	max-width: 34rem;
	margin: 1.25rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	line-height: 1.6;
}

.nusafdt-hero__actions {
	display: grid;
	gap: 0.75rem;
	margin-top: 2rem;
}

.nusafdt-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (min-width: 520px) {
	.nusafdt-hero__actions {
		display: flex;
		flex-wrap: wrap;
	}
}

/* Hero: text beside image */
.nusafdt-hsec--hero-split,
.nusafdt-hsec--hero-center {
	padding-top: clamp(2.5rem, 6vw, 5rem);
}

.nusafdt-hero--split {
	display: grid;
	gap: var(--nusafdt-section-gap);
	align-items: center;
}

.nusafdt-hero--split .nusafdt-hero__media {
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--secondary);
}

.nusafdt-hero__art {
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--wp--preset--color--secondary);
	background-image: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
	-webkit-mask: none;
}

.nusafdt-hero--split .nusafdt-hero__media,
.nusafdt-hero--center .nusafdt-hero__media {
	position: relative;
	overflow: hidden;
}

@media (min-width: 900px) {
	.nusafdt-hero--split {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	}
}

/* Hero: centered */
.nusafdt-hero--center {
	text-align: center;
}

.nusafdt-hero--center .nusafdt-hero__body {
	max-width: 48rem;
	margin-inline: auto;
}

.nusafdt-hero--center .nusafdt-hero__eyebrow {
	justify-content: center;
}

.nusafdt-hero--center .nusafdt-hero__text {
	margin-inline: auto;
}

.nusafdt-hero--center .nusafdt-hero__actions {
	justify-content: center;
}

.nusafdt-hero--center .nusafdt-hero__media {
	margin-top: var(--nusafdt-section-gap);
	aspect-ratio: 16 / 9;
}

/* Hero: full-width photo */
.nusafdt-hsec.nusafdt-hsec--hero-cover {
	padding: 0;
	background: var(--wp--preset--color--secondary);
}

.nusafdt-hsec--hero-cover .nusafdt-hsec__inner {
	max-width: none;
}

.nusafdt-hero--cover {
	display: flex;
	align-items: flex-end;
	min-height: 0;
	padding: 3.5rem var(--nusafdt-gutter) 3rem;
	color: var(--wp--preset--color--base);
}

@media (min-width: 600px) {
	.nusafdt-hero--cover {
		min-height: clamp(32rem, 86vh, 46rem);
		padding: clamp(5rem, 12vw, 8rem) var(--nusafdt-gutter) clamp(3rem, 7vw, 5.5rem);
	}
}

.nusafdt-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--wp--preset--color--secondary);
}

.nusafdt-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(10, 22, 34, var(--nusafdt-overlay, 0.6)) 0%, rgba(10, 22, 34, calc(var(--nusafdt-overlay, 0.6) * 0.75)) 45%, rgba(10, 22, 34, calc(var(--nusafdt-overlay, 0.6) * 0.25)) 100%),
		linear-gradient(0deg, rgba(10, 22, 34, 0.55) 0%, rgba(10, 22, 34, 0) 45%);
}

/* The lattice fades in from the right edge of the photo. */
.nusafdt-hero--cover::before {
	content: "";
	position: absolute;
	inset: 0 0 0 auto;
	z-index: -1;
	width: min(46%, 40rem);
	background-color: var(--wp--preset--color--base);
	-webkit-mask: var(--nusafdt-lattice) 0 0 / 96px 96px repeat, linear-gradient(90deg, transparent, #000 70%);
	-webkit-mask-composite: source-in;
	mask: var(--nusafdt-lattice) 0 0 / 96px 96px repeat, linear-gradient(90deg, transparent, #000 70%);
	mask-composite: intersect;
	opacity: 0.16;
	pointer-events: none;
}

.nusafdt-hero--cover .nusafdt-hero__body {
	width: 100%;
	max-width: var(--nusafdt-wide);
	margin-inline: auto;
}

.nusafdt-hero--cover .nusafdt-hero__title {
	max-width: 15ch;
	color: inherit;
}

.nusafdt-hero--cover .nusafdt-hero__text {
	color: inherit;
	opacity: 0.9;
}

.nusafdt-hero--cover .nusafdt-hero__eyebrow {
	color: inherit;
}

.nusafdt-hero--cover .nusafdt-btn--solid {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.nusafdt-hero--cover .nusafdt-btn--solid:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

@media (min-width: 900px) {
	.nusafdt-hero--cover {
		align-items: center;
	}
}

/* ------------------------------------------------------------ Impact figures */

/* Figures read as one line of facts, divided by hairlines; no boxes. */
.nusafdt-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.nusafdt-tone--default .nusafdt-stats,
.nusafdt-tone--tinted .nusafdt-stats {
	border-top-color: var(--wp--preset--color--border);
}

.nusafdt-stats__item {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	gap: 0.5rem;
	padding: 1.5rem 1rem 0.25rem 0;
}

.nusafdt-stats__item:nth-child(2n) {
	padding-left: 1rem;
	border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.nusafdt-tone--default .nusafdt-stats__item:nth-child(2n),
.nusafdt-tone--tinted .nusafdt-stats__item:nth-child(2n) {
	border-left-color: var(--wp--preset--color--border);
}

.nusafdt-stats__value {
	margin: 0;
	font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

.nusafdt-tone--dark .nusafdt-stats__value {
	color: var(--wp--preset--color--base);
}

.nusafdt-tone--default .nusafdt-stats__value,
.nusafdt-tone--tinted .nusafdt-stats__value {
	color: var(--wp--preset--color--primary);
}

.nusafdt-stats__label {
	max-width: 14rem;
	font-size: 0.9375rem;
	line-height: 1.4;
	opacity: 0.85;
}

.nusafdt-stats__note {
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.75;
}

.nusafdt-hsec__inner > .nusafdt-stats + .nusafdt-stats__note {
	margin-top: 1.5rem;
}

@media (min-width: 900px) {
	.nusafdt-stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.nusafdt-stats__item,
	.nusafdt-stats__item:nth-child(2n) {
		padding: 1.75rem 1.5rem 0.25rem;
		border-left: 1px solid rgba(255, 255, 255, 0.22);
	}

	.nusafdt-stats__item:first-child {
		padding-left: 0;
		border-left: 0;
	}

	.nusafdt-tone--default .nusafdt-stats__item,
	.nusafdt-tone--tinted .nusafdt-stats__item {
		border-left-color: var(--wp--preset--color--border);
	}
}

/* Right under a photo hero the figures act as its footing: tighter, same dark ground. */
.nusafdt-hsec--hero-cover + .nusafdt-hsec--stats.nusafdt-tone--dark {
	padding-top: clamp(2rem, 4vw, 3rem);
}

.nusafdt-hsec--hero-cover + .nusafdt-hsec--stats .nusafdt-hsec__head {
	display: none;
}

.nusafdt-hsec--hero-cover + .nusafdt-hsec--stats .nusafdt-stats {
	border-top: 0;
}

.nusafdt-hsec--hero-cover + .nusafdt-hsec--stats .nusafdt-hsec__inner > .nusafdt-stats {
	margin-top: 0;
}

/* ------------------------------------------------------------ Cards (programs, campaigns, stories) */

.nusafdt-hsec .nusafd-grid {
	gap: clamp(1rem, 2.4vw, 1.75rem);
}

.nusafd-card {
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--surface);
	box-shadow: none;
}

.nusafdt-tone--tinted .nusafd-card,
.nusafdt-tone--dark .nusafd-card {
	background: var(--wp--preset--color--base);
}

.nusafd-card__media {
	aspect-ratio: 3 / 2;
	background: var(--wp--preset--color--secondary);
}

.nusafd-card__body {
	flex: 1 1 auto;
	gap: 0.75rem;
	padding: clamp(1.125rem, 2.4vw, 1.5rem);
}

.nusafd-card__title {
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

/* Campaign progress inside cards: amount, then bar, then facts. */
.nusafd-progress__raised {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.5rem;
	margin: 0 0 0.75rem;
}

.nusafd-progress__amount {
	font-size: 1.375rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

.nusafd-progress__target {
	font-size: 0.875rem;
}

.nusafd-progress__bar {
	height: 8px;
	border-radius: 0;
	background: var(--wp--preset--color--border);
}

.nusafd-progress__fill {
	border-radius: 0;
	background: var(--wp--preset--color--primary);
}

.nusafd-progress__meta {
	margin-top: 0.75rem;
	font-size: 0.875rem;
}

.nusafd-card--campaign .nusafd-card__body {
	justify-content: space-between;
}

/* Story cards: the beneficiary's words lead, name and link follow. */
.nusafd-card--story .nusafd-card__media {
	aspect-ratio: 4 / 3;
}

.nusafd-card__quote p {
	color: var(--wp--preset--color--contrast);
	font-size: 1.0625rem;
	line-height: 1.6;
}

.nusafd-card__quote cite {
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--muted);
	font-size: 0.9375rem;
}

.nusafd-card__link {
	margin: auto 0 0;
}

.nusafd-card__link a {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	text-decoration: none;
}

.nusafd-card__link a:hover {
	text-decoration: underline;
}

/* ------------------------------------------------------------ Featured campaign */

.nusafdt-hsec--featured-campaign .nusafd-campaign-hero {
	gap: 0;
	align-items: stretch;
}

.nusafd-campaign-hero__media {
	aspect-ratio: 4 / 3;
	border-radius: 0;
	background: var(--wp--preset--color--secondary);
}

.nusafd-campaign-hero__eyebrow,
.nusafd-training-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--primary);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

.nusafd-campaign-hero__eyebrow::before,
.nusafd-training-hero__eyebrow::before {
	content: "";
	width: 0.75rem;
	height: 0.75rem;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: var(--nusafdt-star) center / contain no-repeat;
	mask: var(--nusafdt-star) center / contain no-repeat;
}

.nusafd-campaign-hero__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1rem;
	padding: clamp(1.5rem, 4vw, 3rem) 0 0;
}

.nusafd-campaign-hero__title {
	margin: 0;
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.nusafd-campaign-hero__excerpt {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: 1.0625rem;
	line-height: 1.6;
}

.nusafd-campaign-hero .nusafd-progress__amount {
	font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem);
}

.nusafd-campaign-hero .nusafd-progress__bar {
	height: 10px;
}

.nusafd-campaign-hero .nusafd-progress__action {
	margin-top: 1.25rem;
}

@media (min-width: 860px) {
	.nusafdt-hsec--featured-campaign .nusafd-campaign-hero {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	}

	.nusafd-campaign-hero__media {
		aspect-ratio: auto;
		min-height: 26rem;
	}

	.nusafd-campaign-hero__body {
		padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 4.5vw, 4rem);
	}
}

/* ------------------------------------------------------------ About */

.nusafdt-about {
	display: grid;
	gap: var(--nusafdt-section-gap);
	align-items: center;
}

.nusafdt-about__body > * {
	margin-block: 0;
}

.nusafdt-about__body > * + * {
	margin-top: 1.25rem;
}

.nusafdt-about__text {
	max-width: 38rem;
	font-size: 1.0625rem;
	line-height: 1.7;
}

.nusafdt-about__text p {
	margin: 0;
}

.nusafdt-about__text p + p {
	margin-top: 0.875rem;
}

.nusafdt-about__media {
	aspect-ratio: 5 / 4;
	background: var(--wp--preset--color--secondary);
}

.nusafdt-about__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (min-width: 900px) {
	.nusafdt-about--media {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		gap: clamp(2.5rem, 6vw, 5rem);
	}
}

/* Vision, mission and values: three columns under a shared rule. */
.nusafdt-about__profile .nusafd-org-profile {
	display: grid;
	gap: 1.75rem;
	margin: 0;
	padding-top: var(--nusafdt-section-gap);
	border-top: 1px solid var(--wp--preset--color--border);
}

.nusafdt-about__profile .nusafd-org-profile__item {
	margin: 0;
}

.nusafdt-about__profile .nusafd-org-profile__title {
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--primary);
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: 0;
}

.nusafdt-about__profile :where(.nusafd-org-profile__item p) {
	margin: 0;
	line-height: 1.6;
}

.nusafdt-about__profile .nusafd-org-profile__list {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nusafdt-about__profile .nusafd-org-profile__list li {
	position: relative;
	padding-left: 1.5rem;
	line-height: 1.55;
}

.nusafdt-about__profile .nusafd-org-profile__list li::before {
	content: "";
	position: absolute;
	top: 0.38em;
	left: 0;
	width: 0.7rem;
	height: 0.7rem;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: var(--nusafdt-star) center / contain no-repeat;
	mask: var(--nusafdt-star) center / contain no-repeat;
}

@media (min-width: 760px) {
	.nusafdt-about__profile .nusafd-org-profile {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(1.5rem, 4vw, 3rem);
	}
}

/* ------------------------------------------------------------ News on the homepage */

.nusafdt-home-news {
	display: grid;
	gap: var(--nusafdt-section-gap);
}

.nusafdt-home-news__list {
	display: grid;
	align-content: start;
}

.nusafdt-home-news__list > .nusafdt-article {
	padding: 1.125rem 0;
	border-top: 1px solid var(--wp--preset--color--border);
}

.nusafdt-home-news__list > .nusafdt-article:first-child {
	padding-top: 0;
	border-top: 0;
}

@media (min-width: 640px) {
	.nusafdt-home-news--grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

	.nusafdt-home-news--magazine {
		grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
		align-items: start;
		gap: clamp(2rem, 4vw, 3.5rem);
	}
}

/* ------------------------------------------------------------ Knowledge (FAQ) on the homepage */

.nusafdt-hsec--knowledge .nusafd-faq,
.nusafdt-hsec--knowledge .nusafd-knowledge {
	max-width: 52rem;
}

.nusafd-faq__item {
	margin: 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.nusafd-faq__q {
	padding: 0.95rem 2.25rem 0.95rem 0;
}

.nusafd-faq__q::after {
	right: 0;
}

.nusafd-faq {
	gap: 0;
}

.nusafdt-tone--tinted .nusafd-faq__item {
	background: transparent;
}

.nusafd-faq__item:first-child {
	border-top: 1px solid var(--wp--preset--color--border);
}

/* ------------------------------------------------------------ Banner slots */

.nusafdt-hsec--banner-a,
.nusafdt-hsec--banner-b {
	padding-block: calc(var(--nusafdt-section-y) * 0.5);
}

.nusafdt-tone--default + .nusafdt-hsec--banner-a.nusafdt-tone--default,
.nusafdt-tone--default + .nusafdt-hsec--banner-b.nusafdt-tone--default {
	padding-top: 0;
}

.nusafdt-hsec--banner-a .nusafd-banner,
.nusafdt-hsec--banner-b .nusafd-banner {
	margin-block: 0;
}

/* A banner is a strip, never a poster: limit its height on wide screens. */
.nusafdt-hsec :where(.nusafd-banner) img {
	display: block;
	width: 100%;
	max-height: clamp(9rem, 26vw, 20rem);
	object-fit: cover;
}

/* ------------------------------------------------------------ Call to action */

.nusafdt-cta {
	display: grid;
	gap: 1.5rem;
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3.5rem);
	overflow: hidden;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	text-align: left;
	--nusafdt-c: var(--nusafdt-cut-lg);
	clip-path: polygon(var(--nusafdt-c) 0, 100% 0, 100% calc(100% - var(--nusafdt-c)), calc(100% - var(--nusafdt-c)) 100%, 0 100%, 0 var(--nusafdt-c));
}

.nusafdt-tone--dark .nusafdt-cta {
	background: transparent;
	padding-inline: 0;
	clip-path: none;
}

.nusafdt-tone--dark .nusafdt-cta::before {
	display: none;
}

.nusafdt-cta__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.nusafdt-cta__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nusafdt-cta__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(10, 22, 34, 0.72);
}

.nusafdt-cta__body {
	max-width: 40rem;
}

.nusafdt-cta__title {
	margin: 0;
	color: inherit;
	font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.nusafdt-cta__text {
	margin: 1rem 0 0;
	font-size: 1.0625rem;
	line-height: 1.6;
	opacity: 0.9;
}

.nusafdt-cta__action {
	margin: 0;
}

.nusafdt-cta .nusafdt-btn--solid,
.nusafdt-cta .nusafd-button {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.nusafdt-cta .nusafdt-btn--solid:hover,
.nusafdt-cta .nusafd-button:hover {
	border-color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--base);
}

@media (min-width: 860px) {
	.nusafdt-cta {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
		gap: 3rem;
	}
}

.nusafdt-custom > * + * {
	margin-top: 1rem;
}

/* The plugin's shared call to action gets the same treatment as the theme's own. */
.nusafd-cta {
	position: relative;
	isolation: isolate;
	display: grid;
	gap: 1rem;
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3.5rem);
	overflow: hidden;
	border-radius: 0;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	text-align: left;
	--nusafdt-c: var(--nusafdt-cut-lg);
	clip-path: polygon(var(--nusafdt-c) 0, 100% 0, 100% calc(100% - var(--nusafdt-c)), calc(100% - var(--nusafdt-c)) 100%, 0 100%, 0 var(--nusafdt-c));
}

.nusafd-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--wp--preset--color--base);
	-webkit-mask: var(--nusafdt-lattice) 0 0 / 96px 96px repeat;
	mask: var(--nusafdt-lattice) 0 0 / 96px 96px repeat;
	opacity: 0.07;
	pointer-events: none;
}

.nusafd-cta .nusafd-cta__heading {
	max-width: 22ch;
	margin: 0;
	color: inherit;
	font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.nusafd-cta .nusafd-cta__text {
	max-width: 38rem;
	margin: 0;
	color: inherit;
	font-size: 1.0625rem;
	line-height: 1.6;
	opacity: 0.9;
}

.nusafd-cta .nusafd-cta__action {
	margin: 0.5rem 0 0;
}

.nusafdt-tone--dark .nusafd-cta {
	padding-inline: 0;
	background: transparent;
	clip-path: none;
}

.nusafdt-tone--dark .nusafd-cta::before {
	display: none;
}

@media (min-width: 860px) {
	.nusafd-cta {
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 3rem;
		align-items: end;
	}

	.nusafd-cta .nusafd-cta__heading,
	.nusafd-cta .nusafd-cta__text {
		grid-column: 1;
	}

	.nusafd-cta .nusafd-cta__action {
		grid-column: 2;
		grid-row: 1 / span 2;
		margin: 0;
	}
}

/* ------------------------------------------------------------ Knowledge Center */

.nusafdt-toc-mobile {
	display: block;
}

.nusafdt-sidebar .nusafd-toc {
	display: none;
}

@media (min-width: 1000px) {
	.nusafdt-toc-mobile {
		display: none;
	}

	.nusafdt-sidebar .nusafd-toc {
		display: block;
	}

	.nusafdt-no-sidebar .nusafdt-with-sidebar--doc {
		grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
		max-width: none;
	}
}

.nusafdt-no-sidebar .nusafdt-with-sidebar--doc .nusafdt-sidebar {
	display: flex;
}

.nusafd-kc__search {
	background: var(--wp--preset--color--surface);
}



.nusafdt-article-body :where(h2, h3)[id] {
	scroll-margin-top: calc(var(--wp--custom--header--height) + 1rem);
}

/* Donation status and proof form on narrow screens */

.nusafd-manual__amount .nusafd-button--small,
.nusafd-bank__number .nusafd-button--small {
	font-size: var(--wp--preset--font-size--small);
}

/* ------------------------------------------------------------ Qur'an verses and references */

.nusafd-ayat {
	margin-inline: 0;
	padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) 1.25rem;
	border: 0;
	border-top: 3px solid var(--wp--preset--color--accent);
	border-radius: 0;
	background: var(--wp--preset--color--surface);
	font-style: normal;
}

.nusafd-ayat .nusafd-ayat__ar {
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--amiri, "Amiri"), "Scheherazade New", "Noto Naskh Arabic", "Traditional Arabic", "Geeza Pro", serif;
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
	line-height: 2.15;
	text-align: right;
	color: var(--wp--preset--color--contrast);
}

.nusafd-ayat .nusafd-ayat__id {
	margin: 0;
	font-style: italic;
}

.nusafd-ayat cite {
	display: block;
	margin-top: 0.6rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	font-weight: 600;
}

.nusafd-references {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* ------------------------------------------------------------ Page shell */

main.nusafdt-main--builder,
.wp-site-blocks > .nusafdt-main--builder {
	margin-block-start: 0;
}

.nusafdt-main--builder ~ .nusafdt-site-footer,
.nusafdt-main--builder ~ .nusafdt-site-footer .nusafdt-footer {
	margin-block-start: 0;
	margin-top: 0;
}

/* Footer menu: compact vertical list */
.nusafdt-footer-nav.wp-block-navigation {
	gap: 0.35rem;
}

.nusafdt-footer-nav .wp-block-navigation-item__content {
	padding: 0.2rem 0;
}
