/*
 * Only Funds front end.
 * Themeable through CSS variables. Set them on :root or any wrapper:
 * --of-primary, --of-accent, --of-ink, --of-paper, --of-muted, --of-line,
 * --of-radius, --of-font. Brand colors from settings are printed inline.
 */

:root {
	--of-primary: #0F5B4A;
	--of-accent: #F2A62B;
	--of-ink: #1E2328;
	--of-paper: #FFFFFF;
	--of-muted: color-mix(in srgb, var(--of-ink) 62%, var(--of-paper));
	--of-line: color-mix(in srgb, var(--of-ink) 14%, var(--of-paper));
	--of-soft: color-mix(in srgb, var(--of-primary) 7%, var(--of-paper));
	--of-tint: color-mix(in srgb, var(--of-primary) 14%, var(--of-paper));
	--of-on-primary: #FFFFFF;
	--of-danger: #B42318;
	--of-radius: 14px;
	--of-radius-sm: calc(var(--of-radius) * 0.6);
	--of-font: inherit;
	--of-touch: 44px;
	--of-gap: 16px;
	--of-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 6px 18px rgba(16, 24, 40, 0.06);
	--of-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Fallbacks for browsers without color-mix(). */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
	:root {
		--of-muted: #5D6670;
		--of-line: #DDE1E5;
		--of-soft: #F1F6F4;
		--of-tint: #E2EEEA;
	}
}

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

.of-form-wrap,
.of-progress,
.of-countdown,
.of-wall,
.of-leaderboard,
.of-board,
.of-items,
.of-match,
.of-milestones,
.of-sponsors,
.of-cards,
.of-orgstats,
.of-check-instructions,
.of-thanks,
.of-pledge-pay,
.of-campaign {
	font-family: var(--of-font);
	color: var(--of-ink);
	box-sizing: border-box;
	line-height: 1.5;
}

.of-form-wrap *,
.of-campaign *,
.of-items *,
.of-cards *,
.of-thanks * {
	box-sizing: border-box;
}

.of-form-wrap :where(p, ul, ol, dl, h2, h3, fieldset),
.of-items :where(p, ul, ol, h3, fieldset),
.of-thanks :where(p, h2),
.of-progress :where(p, ul),
.of-match :where(p, h3, ul),
.of-milestones :where(p, ol),
.of-wall :where(p, ul),
.of-leaderboard :where(p, ol),
.of-board :where(p, ul),
.of-cards :where(p, h3),
.of-sponsors :where(ul, h3),
.of-countdown :where(p),
.of-check-instructions :where(h3, dl, p),
.of-pledge-pay :where(h2, ul, p) {
	margin: 0;
	padding: 0;
}

.of-icon {
	flex: none;
	vertical-align: -0.2em;
}

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

.of-hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

[hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ */
/* Buttons, badges, notes                                             */
/* ------------------------------------------------------------------ */

.of-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--of-touch);
	padding: 10px 18px;
	border: 1.5px solid var(--of-primary);
	border-radius: var(--of-radius-sm);
	background: var(--of-paper);
	color: var(--of-primary);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s var(--of-ease), color 0.15s var(--of-ease), transform 0.1s var(--of-ease);
}

.of-btn:hover {
	background: var(--of-soft);
	color: var(--of-primary);
}

.of-btn:active {
	transform: translateY(1px);
}

.of-btn--primary {
	background: var(--of-primary);
	color: var(--of-on-primary);
}

.of-btn--primary:hover {
	background: color-mix(in srgb, var(--of-primary) 88%, #000);
	color: var(--of-on-primary);
}

.of-btn--block {
	display: flex;
	width: 100%;
}

.of-btn--small {
	min-height: 36px;
	padding: 6px 12px;
	font-size: 0.875em;
}

.of-btn[disabled],
.of-btn[aria-busy="true"] {
	opacity: 0.65;
	cursor: progress;
}

.of-btn--primary.of-btn--block {
	min-height: 52px;
	font-size: 1.0625em;
}

.of-link {
	color: var(--of-primary);
	font-weight: 600;
}

.of-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--of-tint);
	color: var(--of-primary);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.6;
	text-transform: uppercase;
}

.of-badge--muted {
	background: var(--of-line);
	color: var(--of-muted);
}

.of-note,
.of-notice {
	padding: 12px 14px;
	border-radius: var(--of-radius-sm);
	background: var(--of-soft);
	color: var(--of-ink);
	font-size: 0.9375em;
}

.of-note--editor {
	border: 1px dashed var(--of-line);
	background: transparent;
	color: var(--of-muted);
}

.of-notice--error {
	background: color-mix(in srgb, var(--of-danger) 9%, var(--of-paper));
	color: var(--of-danger);
}

.of-hint {
	color: var(--of-muted);
	font-size: 0.8125rem;
	margin-top: 4px;
}

.of-loading {
	color: var(--of-muted);
	font-size: 0.875rem;
	padding: 12px 0;
}

:where(.of-form-wrap, .of-items, .of-thanks, .of-cards, .of-board, .of-leaderboard, .of-campaign) :focus-visible {
	outline: 3px solid color-mix(in srgb, var(--of-primary) 55%, transparent);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Donation form                                                      */
/* ------------------------------------------------------------------ */

.of-form-wrap {
	max-width: 560px;
	margin-inline: auto;
}

.of-form {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 20px;
	border: 1px solid var(--of-line);
	border-radius: var(--of-radius);
	background: var(--of-paper);
	box-shadow: var(--of-shadow);
}

@media (min-width: 600px) {
	.of-form {
		padding: 28px;
	}
}

.of-form--compact {
	gap: 16px;
	padding: 16px;
	box-shadow: none;
}

.of-form__heading {
	margin: 0 0 12px;
	font-size: 1.375rem;
}

.of-fieldset {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.of-legend {
	float: left;
	width: 100%;
	margin: 0 0 2px;
	padding: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--of-ink);
}

.of-legend + * {
	clear: both;
}

.of-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.of-field > label,
.of-need__name {
	font-size: 0.875rem;
	font-weight: 600;
}

.of-req {
	color: var(--of-danger);
}

.of-row {
	display: grid;
	gap: 12px;
}

@media (min-width: 480px) {
	.of-row {
		grid-template-columns: 1fr 1fr;
	}

	.of-row--3 {
		grid-template-columns: 2fr 1fr 1fr;
	}
}

.of-form input[type="text"],
.of-form input[type="email"],
.of-form input[type="tel"],
.of-form input[type="number"],
.of-form select,
.of-form textarea {
	width: 100%;
	min-height: var(--of-touch);
	margin: 0;
	padding: 10px 12px;
	border: 1.5px solid var(--of-line);
	border-radius: var(--of-radius-sm);
	background: var(--of-paper);
	color: var(--of-ink);
	font: inherit;
	font-size: 16px; /* Prevents iOS zoom on focus. */
	line-height: 1.3;
	box-shadow: none;
	transition: border-color 0.15s var(--of-ease);
}

.of-form textarea {
	min-height: 84px;
	resize: vertical;
}

.of-form input:focus,
.of-form select:focus,
.of-form textarea:focus {
	border-color: var(--of-primary);
	outline: 3px solid color-mix(in srgb, var(--of-primary) 22%, transparent);
	outline-offset: 0;
}

.of-form [aria-invalid="true"] {
	border-color: var(--of-danger) !important;
}

/* Amount chips */

.of-amounts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

@media (min-width: 480px) {
	.of-amounts__grid {
		grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	}
}

.of-chip,
.of-segment__opt,
.of-tab {
	position: relative;
	display: block;
	cursor: pointer;
}

.of-chip input,
.of-segment__opt input,
.of-tab input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.of-chip__label {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 8px;
	border: 1.5px solid var(--of-line);
	border-radius: var(--of-radius-sm);
	background: var(--of-paper);
	font-size: 1.125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	transition: border-color 0.15s var(--of-ease), background-color 0.15s var(--of-ease), color 0.15s var(--of-ease);
}

.of-chip--other .of-chip__label {
	font-size: 1rem;
	font-weight: 600;
}

.of-chip:hover .of-chip__label {
	border-color: var(--of-primary);
}

.of-chip input:checked + .of-chip__label {
	border-color: var(--of-primary);
	background: var(--of-primary);
	color: var(--of-on-primary);
}

.of-chip input:focus-visible + .of-chip__label,
.of-segment__opt input:focus-visible + span,
.of-tab input:focus-visible + .of-tab__label,
.of-radio input:focus-visible,
.of-check input:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--of-primary) 45%, transparent);
	outline-offset: 2px;
}

.of-money-input {
	position: relative;
}

.of-money-input__sign {
	position: absolute;
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
	color: var(--of-muted);
	font-weight: 700;
	pointer-events: none;
}

.of-form .of-money-input input {
	padding-left: 28px;
	font-size: 1.125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* Frequency segmented control */

.of-segment {
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: var(--of-radius-sm);
	background: var(--of-soft);
}

.of-segment__opt {
	flex: 1 1 0;
}

.of-segment__opt span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 6px 10px;
	border-radius: calc(var(--of-radius-sm) - 2px);
	color: var(--of-muted);
	font-weight: 600;
	text-align: center;
	transition: background-color 0.15s var(--of-ease), color 0.15s var(--of-ease);
}

.of-segment__opt input:checked + span {
	background: var(--of-paper);
	color: var(--of-primary);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.14);
}

.of-segment--small .of-segment__opt span {
	min-height: 36px;
	font-size: 0.875rem;
}

/* Toggles (tribute, address) */

.of-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: var(--of-touch);
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--of-primary);
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.of-toggle__icon {
	position: relative;
	width: 20px;
	height: 20px;
	flex: none;
	border: 1.5px solid currentColor;
	border-radius: 50%;
}

.of-toggle__icon::before,
.of-toggle__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 1.5px;
	background: currentColor;
	transform: translate(-50%, -50%);
	transition: transform 0.2s var(--of-ease);
}

.of-toggle__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.of-toggle[aria-expanded="true"] .of-toggle__icon::after {
	transform: translate(-50%, -50%) rotate(0deg);
}

.of-tribute__fields,
.of-address {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border-radius: var(--of-radius-sm);
	background: var(--of-soft);
}

.of-donor .of-address {
	margin-top: 0;
}

/* Radios and checkboxes */

.of-radios {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.of-radio,
.of-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-height: var(--of-touch);
	padding: 10px 0;
	cursor: pointer;
	font-size: 0.9375rem;
}

.of-radio input,
.of-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--of-primary);
}

.of-check--fee {
	padding: 12px 14px;
	border: 1.5px solid var(--of-line);
	border-radius: var(--of-radius-sm);
	background: var(--of-paper);
}

.of-check--fee:has(input:checked) {
	border-color: var(--of-primary);
	background: var(--of-soft);
}

.of-check--fee span,
[data-of-fee-text] {
	font-variant-numeric: tabular-nums;
}

/* Payment method tabs */

.of-tabs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
	grid-auto-flow: column;
	gap: 8px;
}

.of-tab__label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 60px;
	padding: 8px 6px;
	border: 1.5px solid var(--of-line);
	border-radius: var(--of-radius-sm);
	color: var(--of-muted);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	transition: border-color 0.15s var(--of-ease), color 0.15s var(--of-ease), background-color 0.15s var(--of-ease);
}

@media (min-width: 480px) {
	.of-tab__label {
		flex-direction: row;
		min-height: 52px;
		font-size: 0.875rem;
	}
}

.of-tab input:checked + .of-tab__label {
	border-color: var(--of-primary);
	background: var(--of-soft);
	color: var(--of-primary);
}

.of-tab input:disabled + .of-tab__label {
	opacity: 0.45;
	cursor: not-allowed;
}

.of-method-single {
	font-weight: 600;
}

.of-pane {
	padding-top: 4px;
}

.of-stripe {
	min-height: 120px; /* Reserve room so the Payment Element does not shift the layout. */
}

.of-paypal {
	min-height: 104px;
}

.of-check-preview,
.of-check-instructions {
	padding: 14px;
	border-radius: var(--of-radius-sm);
	background: var(--of-soft);
}

.of-check-preview p + .of-dl,
.of-check-instructions__title + .of-dl {
	margin-top: 10px;
}

.of-check-instructions__title {
	font-size: 1.0625rem;
}

.of-dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	font-size: 0.9375rem;
}

.of-dl dt {
	color: var(--of-muted);
}

.of-dl dd {
	margin: 0;
	font-weight: 600;
}

/* Summary, errors, trust */

.of-summary {
	padding: 14px 16px;
	border-radius: var(--of-radius-sm);
	background: var(--of-soft);
	font-size: 1rem;
	text-align: center;
}

.of-summary strong {
	font-size: 1.25rem;
	font-variant-numeric: tabular-nums;
}

.of-errors:empty {
	display: none;
}

.of-errors {
	padding: 12px 14px;
	border-left: 4px solid var(--of-danger);
	border-radius: var(--of-radius-sm);
	background: color-mix(in srgb, var(--of-danger) 8%, var(--of-paper));
	color: var(--of-danger);
	font-weight: 600;
}

.of-errors:focus {
	outline: none;
}

.of-trust {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: var(--of-muted);
	font-size: 0.8125rem;
	text-align: center;
}

.of-trust__line {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.of-turnstile {
	min-height: 65px;
}

.of-closed {
	padding: 24px;
	border: 1px solid var(--of-line);
	border-radius: var(--of-radius);
	background: var(--of-soft);
	text-align: center;
}

.of-closed__title {
	font-size: 1.125rem;
	font-weight: 700;
}

.of-closed__body {
	color: var(--of-muted);
}

/* Type section hooks (types render inside the form) */

.of-type-section {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

[data-of-item] {
	cursor: pointer;
}

[data-of-item].is-selected,
[data-of-item][aria-pressed="true"] {
	border-color: var(--of-primary) !important;
	background: var(--of-soft);
}

/* ------------------------------------------------------------------ */
/* Progress                                                           */
/* ------------------------------------------------------------------ */

.of-progress {
	display: flex;
	gap: 20px;
	align-items: center;
}

.of-progress__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.of-progress__figure {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}

.of-progress__raised {
	font-size: clamp(2rem, 6vw, 2.75rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	color: var(--of-ink);
}

.of-progress__goal {
	color: var(--of-muted);
	font-weight: 600;
}

.of-bar {
	position: relative;
	height: 14px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--of-tint);
}

.of-bar--thin {
	height: 8px;
}

.of-bar__fill {
	display: block;
	height: 100%;
	min-width: 6px;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--of-primary), color-mix(in srgb, var(--of-primary) 72%, var(--of-accent)));
	transition: width 0.8s var(--of-ease);
}

.of-bar__fill--accent {
	background: var(--of-accent);
}

.of-stats-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	list-style: none;
	color: var(--of-muted);
	font-size: 0.875rem;
}

.of-stats-row strong {
	color: var(--of-ink);
	font-size: 1.0625rem;
	font-variant-numeric: tabular-nums;
}

.of-progress__match,
.of-progress__goal-hit,
.of-progress__ended {
	font-size: 0.875rem;
	font-weight: 600;
}

.of-progress__match {
	color: var(--of-muted);
}

.of-progress__goal-hit {
	color: var(--of-primary);
}

.of-progress__ended {
	color: var(--of-muted);
}

.of-progress--numbers .of-stats-row strong {
	font-size: 1.5rem;
}

/* Thermometer, drawn with CSS */

.of-thermo {
	position: relative;
	flex: none;
	width: 44px;
	height: 220px;
	padding-bottom: 36px;
}

.of-thermo__tube {
	position: relative;
	width: 22px;
	height: 100%;
	margin: 0 auto;
	overflow: hidden;
	border: 3px solid var(--of-line);
	border-bottom: 0;
	border-radius: 999px 999px 0 0;
	background: var(--of-paper);
}

.of-thermo__fill {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--of-primary);
	transition: height 0.8s var(--of-ease);
}

.of-thermo__tick {
	position: absolute;
	right: 0;
	width: 6px;
	height: 2px;
	background: var(--of-line);
}

.of-thermo__bulb {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 44px;
	height: 44px;
	border: 3px solid var(--of-line);
	border-radius: 50%;
	background: var(--of-primary);
	transform: translateX(-50%);
	box-shadow: inset 0 0 0 4px var(--of-paper);
}

/* Ring */

.of-ring {
	position: relative;
	flex: none;
	width: 128px;
	height: 128px;
}

.of-ring svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.of-ring__track,
.of-ring__fill {
	fill: none;
	stroke-width: 12;
}

.of-ring__track {
	stroke: var(--of-tint);
}

.of-ring__fill {
	stroke: var(--of-primary);
	stroke-linecap: round;
	transition: stroke-dashoffset 0.8s var(--of-ease);
}

.of-ring__pct {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.625rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
	.of-progress--ring {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ------------------------------------------------------------------ */
/* Countdown                                                          */
/* ------------------------------------------------------------------ */

.of-countdown {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.of-countdown__heading {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--of-muted);
}

.of-countdown__units {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	max-width: 360px;
}

.of-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 4px;
	border-radius: var(--of-radius-sm);
	background: var(--of-ink);
	color: var(--of-paper);
}

.of-countdown__num {
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.of-countdown__label {
	margin-top: 4px;
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}

.of-countdown__when,
.of-countdown__ended {
	color: var(--of-muted);
	font-size: 0.875rem;
}

/* ------------------------------------------------------------------ */
/* Donor wall                                                         */
/* ------------------------------------------------------------------ */

.of-wall__list {
	display: flex;
	flex-direction: column;
	list-style: none;
}

.of-wall--grid .of-wall__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.of-wall__item {
	display: flex;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--of-line);
}

.of-wall--grid .of-wall__item {
	padding: 14px;
	border: 1px solid var(--of-line);
	border-radius: var(--of-radius-sm);
}

.of-wall__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--of-tint);
	color: var(--of-primary);
	font-weight: 700;
}

.of-wall__main {
	min-width: 0;
	flex: 1;
}

.of-wall__line {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.of-wall__name {
	font-weight: 700;
	overflow-wrap: anywhere;
}

.of-wall__amount {
	font-weight: 700;
	color: var(--of-primary);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.of-wall__tribute,
.of-wall__ago {
	color: var(--of-muted);
	font-size: 0.8125rem;
}

.of-wall__comment {
	margin-top: 2px;
	font-size: 0.9375rem;
	overflow-wrap: anywhere;
}

.of-wall__empty {
	color: var(--of-muted);
}

/* ------------------------------------------------------------------ */
/* Leaderboard                                                        */
/* ------------------------------------------------------------------ */

.of-leaderboard__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	list-style: none;
}

.of-leaderboard__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--of-line);
	border-radius: var(--of-radius-sm);
	background: var(--of-paper);
}

.of-leaderboard__row.is-leader {
	border-color: var(--of-accent);
	box-shadow: inset 4px 0 0 var(--of-accent);
}

.of-leaderboard__rank {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--of-soft);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.is-leader .of-leaderboard__rank {
	background: var(--of-accent);
	color: var(--of-ink);
}

.of-leaderboard__img {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

.of-leaderboard__main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.of-leaderboard__line {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.of-leaderboard__name {
	font-weight: 700;
	overflow-wrap: anywhere;
}

.of-leaderboard__amt {
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.of-leaderboard__votes {
	color: var(--of-muted);
	font-size: 0.8125rem;
}

/* ------------------------------------------------------------------ */
/* Fill the board                                                     */
/* ------------------------------------------------------------------ */

.of-board__count {
	margin-bottom: 10px;
	font-weight: 700;
}

.of-board__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	gap: 6px;
	list-style: none;
}

.of-square {
	aspect-ratio: 1 / 1;
}

.of-square__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 4px;
	border: 1.5px solid var(--of-line);
	border-radius: var(--of-radius-sm);
	background: var(--of-paper);
	color: var(--of-ink);
	text-align: center;
	text-decoration: none;
	line-height: 1.15;
	overflow: hidden;
}

a.of-square__inner:hover {
	border-color: var(--of-primary);
	background: var(--of-soft);
}

.of-square__label {
	font-size: 1.125rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.of-square__amt {
	font-size: 0.75rem;
	color: var(--of-muted);
}

.of-square__name {
	font-size: 0.6875rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.of-square.is-claimed .of-square__inner {
	border-color: var(--of-primary);
	background: var(--of-primary);
	color: var(--of-on-primary);
}

.of-square.is-closed .of-square__inner {
	opacity: 0.4;
}

/* ------------------------------------------------------------------ */
/* Items                                                              */
/* ------------------------------------------------------------------ */

.of-items {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.of-items__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	list-style: none;
}

.of-item {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--of-line);
	border-radius: var(--of-radius);
	background: var(--of-paper);
}

.of-item.is-closed {
	opacity: 0.7;
}

.of-item__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.of-item__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
}

.of-item__name {
	font-size: 1.0625rem;
	font-weight: 700;
}

.of-item__price {
	font-size: 1.5rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.of-item__price small {
	color: var(--of-muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.of-item__desc,
.of-item__fmv,
.of-item__qty {
	font-size: 0.875rem;
}

.of-item__fmv,
.of-item__qty {
	color: var(--of-muted);
}

.of-item__benefits {
	padding-left: 1.1em !important;
	font-size: 0.875rem;
}

.of-item__foot {
	padding: 0 16px 16px;
}

.of-needs {
	display: flex;
	flex-direction: column;
	list-style: none;
}

.of-need {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--of-line);
}

.of-need__main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.of-stepper {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: none;
}

.of-form .of-stepper input {
	width: 84px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.of-stepper__unit {
	color: var(--of-muted);
	font-size: 0.8125rem;
}

.of-dropoff p {
	margin: 0 0 6px;
}

/* ------------------------------------------------------------------ */
/* Match and milestones                                               */
/* ------------------------------------------------------------------ */

.of-match {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px;
	border: 1.5px solid var(--of-accent);
	border-radius: var(--of-radius);
	background: color-mix(in srgb, var(--of-accent) 9%, var(--of-paper));
}

.of-match__eyebrow {
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.of-match__title {
	font-size: 1.25rem;
	font-weight: 800;
}

.of-match__done {
	font-weight: 600;
}

.of-milestones__list {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	list-style: none;
}

.of-milestone {
	position: relative;
	display: flex;
	gap: 14px;
	padding: 10px 0;
}

.of-milestone:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 34px;
	bottom: -14px;
	left: 11px;
	width: 2px;
	background: var(--of-line);
}

.of-milestone.is-reached:not(:last-child)::before {
	background: var(--of-primary);
}

.of-milestone__dot {
	position: relative;
	z-index: 1;
	flex: none;
	width: 24px;
	height: 24px;
	margin-top: 2px;
	border: 3px solid var(--of-line);
	border-radius: 50%;
	background: var(--of-paper);
}

.of-milestone.is-reached .of-milestone__dot {
	border-color: var(--of-primary);
	background: var(--of-primary);
	box-shadow: inset 0 0 0 3px var(--of-paper);
}

.of-milestone.is-next .of-milestone__dot {
	border-color: var(--of-accent);
}

.of-milestone__main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.of-milestone__line {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	align-items: baseline;
}

.of-milestone__goal {
	font-size: 1.125rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.of-milestone__label {
	font-weight: 600;
}

.of-milestone.is-locked {
	color: var(--of-muted);
}

.of-milestone__unlock {
	font-size: 0.9375rem;
}

/* ------------------------------------------------------------------ */
/* Sponsors                                                           */
/* ------------------------------------------------------------------ */

.of-sponsors__tier {
	margin: 16px 0 10px !important;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--of-muted);
}

.of-sponsors__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	list-style: none;
}

.of-sponsor {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 88px;
	padding: 12px;
	border: 1px solid var(--of-line);
	border-radius: var(--of-radius-sm);
	background: var(--of-paper);
	text-align: center;
}

.of-sponsor__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.of-sponsor__logo {
	max-width: 100%;
	max-height: 64px;
	object-fit: contain;
}

.of-sponsor__name {
	font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Campaign cards                                                     */
/* ------------------------------------------------------------------ */

.of-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 640px) {
	.of-cards {
		grid-template-columns: repeat(min(2, var(--of-cols, 3)), minmax(0, 1fr));
	}
}

@media (min-width: 960px) {
	.of-cards {
		grid-template-columns: repeat(var(--of-cols, 3), minmax(0, 1fr));
	}
}

.of-cards__empty {
	color: var(--of-muted);
}

.of-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--of-line);
	border-radius: var(--of-radius);
	background: var(--of-paper);
	box-shadow: var(--of-shadow);
}

.of-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--of-tint);
}

.of-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s var(--of-ease);
}

.of-card:hover .of-card__img {
	transform: scale(1.03);
}

.of-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--of-tint), color-mix(in srgb, var(--of-accent) 22%, var(--of-paper)));
}

.of-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
}

.of-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.of-card__title {
	font-size: 1.1875rem;
	font-weight: 800;
	line-height: 1.25;
}

.of-card__title a {
	color: inherit;
	text-decoration: none;
}

.of-card__title a:hover {
	color: var(--of-primary);
}

.of-card__excerpt {
	color: var(--of-muted);
	font-size: 0.9375rem;
}

.of-card__progress {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: auto !important;
}

.of-card__figures strong {
	font-size: 1.375rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.of-card__figures span,
.of-card__donors {
	color: var(--of-muted);
	font-size: 0.875rem;
}

.of-card--ended {
	opacity: 0.85;
}

/* ------------------------------------------------------------------ */
/* Org stats                                                          */
/* ------------------------------------------------------------------ */

.of-orgstats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
}

.of-orgstats__item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px;
	border-radius: var(--of-radius);
	background: var(--of-soft);
}

.of-orgstats__num {
	font-size: clamp(1.75rem, 5vw, 2.25rem);
	font-weight: 800;
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
	color: var(--of-primary);
}

.of-orgstats__label {
	color: var(--of-muted);
	font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Thank you, pledge pay                                              */
/* ------------------------------------------------------------------ */

.of-thanks,
.of-pledge-pay {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 560px;
	margin-inline: auto;
	text-align: center;
}

.of-pledge-pay {
	text-align: left;
}

.of-pledge-pay__head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.of-thanks__mark {
	position: relative;
	width: 64px;
	height: 64px;
	margin: 0 auto;
	border-radius: 50%;
	background: var(--of-primary);
}

.of-thanks__mark::after {
	content: "";
	position: absolute;
	top: 18px;
	left: 24px;
	width: 14px;
	height: 26px;
	border: solid var(--of-on-primary);
	border-width: 0 4px 4px 0;
	transform: rotate(45deg);
}

.of-thanks--pending .of-thanks__mark,
.of-thanks--check .of-thanks__mark {
	background: var(--of-accent);
}

.of-thanks--pending .of-thanks__mark::after {
	top: 18px;
	left: 30px;
	width: 4px;
	height: 18px;
	border-width: 0 0 0 4px;
	transform: none;
	box-shadow: 8px 14px 0 -0px transparent;
}

.of-thanks--failed .of-thanks__mark {
	background: var(--of-danger);
}

.of-thanks--failed .of-thanks__mark::after {
	top: 14px;
	left: 30px;
	width: 4px;
	height: 36px;
	border: 0;
	background: var(--of-on-primary);
	transform: rotate(45deg);
	box-shadow: none;
}

.of-thanks__title {
	font-size: 1.625rem;
	font-weight: 800;
}

.of-thanks__lead {
	font-size: 1.125rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.of-thanks__status {
	color: var(--of-muted);
}

.of-thanks__check,
.of-thanks__custom {
	text-align: left;
}

.of-thanks__ref {
	color: var(--of-muted);
	font-size: 0.8125rem;
}

.of-thanks__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.of-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid var(--of-line);
	border-top-color: var(--of-primary);
	border-radius: 50%;
	vertical-align: -2px;
	animation: of-spin 0.8s linear infinite;
}

@keyframes of-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ------------------------------------------------------------------ */
/* Single campaign layout                                             */
/* ------------------------------------------------------------------ */

.of-campaign {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.of-campaign__hero {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	border-radius: var(--of-radius);
	background: var(--of-soft);
}

.of-campaign__jump {
	display: block;
}

@media (min-width: 900px) {
	.of-campaign__jump {
		display: none;
	}
}

.of-campaign__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
}

@media (min-width: 900px) {
	.of-campaign__grid {
		grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
		align-items: start;
	}

	.of-campaign__side {
		position: sticky;
		top: 24px;
	}
}

.of-campaign__main {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}

.of-campaign__h {
	margin: 0 0 8px;
	font-size: 1.25rem;
}

.of-block {
	margin-block: 1em;
}

/* ------------------------------------------------------------------ */
/* Motion preferences                                                 */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.of-form-wrap *,
	.of-progress *,
	.of-card *,
	.of-campaign *,
	.of-thanks *,
	.of-items *,
	.of-btn,
	.of-bar__fill,
	.of-thermo__fill,
	.of-ring__fill {
		transition: none !important;
		animation: none !important;
	}

	.of-card:hover .of-card__img {
		transform: none;
	}
}
