/*
Theme Name: CSG Nepal
Theme URI: http://communitysupport-group.local
Description: Custom theme for Community Support Group Nepal. Service page system: Source Serif 4 / Libre Franklin, warm paper ground, the logo's crimson as the one accent.
Author: Troverve
Version: 2.0.0
Requires PHP: 8.0
Text Domain: csg-nepal
*/

/*
  Deal (design-taste-frontend, kind: service / other)
  palette: client brand (bg #f7f4ef, ink #1f1b17, accent #a3191c from the logo)
  type: source-serif (Source Serif 4 / Libre Franklin) · radius soft · buttons solid
  hero: split (photograph slot, helpline card until one is set) · nav: nav-split
  footer: footer-columns · close: close-word head row (close-photo has no photograph) · rhythm: space
*/

:root {
	--p-bg: #f7f4ef; --p-surface: #ede7de; --p-ink: #1f1b17; --p-muted: #6b625a;
	--p-accent: #a3191c; --p-accent-ink: #f7f4ef;
	--font-display: "Source Serif 4", Georgia, serif;
	--font-text: "Libre Franklin", system-ui, sans-serif;
	--display-weight: 400;
	--display-tracking: -0.02em;
	--display-tracking-xl: -0.026em;

	--bg: var(--p-bg);
	--surface: var(--p-surface);
	--card: #fbf9f6;
	--ink: var(--p-ink);
	--muted: var(--p-muted);
	--accent: var(--p-accent);
	--action: var(--p-accent);
	--action-ink: var(--p-accent-ink);
	--line: color-mix(in oklab, var(--ink) 13%, transparent);
	--line-strong: color-mix(in oklab, var(--ink) 28%, transparent);

	--s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
	--nav: 72px; --padt: 120px; --padb: 72px; --gut: 80px; --gutter: 24px; --bar: 0px;
	--r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-btn: 8px;
	--btn-h: 44px;

	--t-h1: 64px; --t-h2: 44px; --t-h3: 26px; --t-lead: 20px; --t-card: 20px; --t-body: 16px; --t-small: 14px; --t-label: 13px; --t-big: 88px;

	--m-in: 140ms; --m-out: 200ms; --m-press: 90ms; --m-image: 600ms;
	--m-ease: cubic-bezier(.2, .8, .2, 1);
}
@media (max-width: 1023px) {
	:root { --gut: 48px; --padt: 96px; --t-h1: 52px; --t-h2: 36px; --t-big: 64px; }
}
@media (max-width: 639px) {
	:root {
		--nav: 56px; --padt: 72px; --padb: 48px; --gut: 24px; --gutter: 12px;
		--t-h1: 38px; --t-h2: 30px; --t-h3: 22px; --t-lead: 18px; --t-card: 18px; --t-big: 44px;
		--bar: calc(64px + env(safe-area-inset-bottom));
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav); }
body {
	font-family: var(--font-text);
	font-size: var(--t-body);
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	padding-top: var(--nav);
	padding-bottom: var(--bar);
	overflow-x: hidden;
}
::selection { background: color-mix(in oklab, var(--accent) 18%, var(--bg)); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }

h1, h2, h3, .display {
	font-family: var(--font-display);
	font-weight: var(--display-weight);
	letter-spacing: var(--display-tracking);
	line-height: 1.08;
	text-wrap: balance;
}
h1 { font-size: var(--t-h1); letter-spacing: var(--display-tracking-xl); line-height: 1.04; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }
strong, b { font-weight: 500; }
p { text-wrap: pretty; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { width: auto; height: auto; clip-path: none; z-index: 30; top: 12px; left: 12px; background: var(--card); padding: 8px 12px; border-radius: var(--r-sm); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-7); }
.grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 1024px) {
	.span-5 { grid-column: span 5; }
	.span-6 { grid-column: span 6; }
	.span-7 { grid-column: span 7; }
	.span-6.start-7 { grid-column: 7 / span 6; }
	.span-5.start-8 { grid-column: 8 / span 5; }
}

.muted { color: var(--muted); }
.label { font-size: var(--t-label); font-weight: 500; color: var(--muted); line-height: 1.3; }
.small { font-size: var(--t-small); }
.lead { font-size: var(--t-lead); line-height: 1.5; }

/* ---------- Links ---------- */
.link {
	color: var(--ink);
	font-weight: 500;
	background:
		linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat,
		linear-gradient(var(--line-strong), var(--line-strong)) 0 100% / 100% 1px no-repeat;
	padding-bottom: 2px;
	transition: background-size var(--m-out) var(--m-ease);
}
.link:hover { background-size: 100% 1px, 100% 1px; transition-duration: var(--m-in); }
.tel { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Buttons (solid) ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
	height: var(--btn-h); padding: 0 var(--s-5);
	border-radius: var(--r-btn); border: 1px solid transparent;
	font-size: 16px; font-weight: 500; line-height: 1; white-space: nowrap;
	transition: background-color var(--m-out) var(--m-ease), border-color var(--m-out) var(--m-ease), transform var(--m-out) var(--m-ease);
}
.btn--primary { background: var(--action); color: var(--action-ink); }
.btn--secondary { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
	.btn:hover { transform: translateY(-1px); transition-duration: var(--m-in); }
	.btn--primary:hover { background: color-mix(in oklab, var(--action) 86%, var(--ink)); }
	.btn--secondary:hover { background: color-mix(in oklab, var(--bg) 94%, var(--ink)); border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
}
.btn:active { transform: translateY(1px) scale(.985); transition-duration: var(--m-press); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.m-arrow { width: 16px; height: 16px; transition: transform var(--m-out) var(--m-ease); }
.btn:hover .m-arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn--block { width: 100%; }

/* ---------- Nav (nav-split) ---------- */
.nav {
	position: fixed; inset: 0 0 auto 0; z-index: 10;
	height: var(--nav); background: var(--bg);
	border-bottom: 1px solid var(--line);
}
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
.nav .wrap { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-5); }
.nav__words { display: flex; gap: var(--s-5); }
.nav__words a, .footer-links a {
	font-size: 15px; font-weight: 500; white-space: nowrap; padding: 6px 0; color: color-mix(in oklab, var(--ink) 80%, var(--bg));
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: color var(--m-out) var(--m-ease), background-size var(--m-out) var(--m-ease);
}
.nav__words a:hover, .footer-links a:hover { color: var(--ink); background-size: 100% 1px; transition-duration: var(--m-in); }
.nav__words a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); background: none; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); }
.brand img { height: 40px; width: auto; mix-blend-mode: multiply; }
.brand__name { font-family: var(--font-display); font-size: 20px; line-height: 1.1; letter-spacing: -0.01em; }
.brand__name small { display: block; font-family: var(--font-text); font-size: var(--t-label); color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.nav__end { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-5); }
.nav__tel { font-size: 15px; font-weight: 500; }
.nav__menu { display: none; width: 44px; height: 44px; border-radius: var(--r-btn); border: 1px solid var(--line-strong); background: var(--bg); align-items: center; justify-content: center; }
.nav__menu svg { width: 20px; height: 20px; }

@media (max-width: 1279px) { .nav__tel { display: none; } }
@media (max-width: 1023px) {
	.nav .wrap { grid-template-columns: 1fr auto; }
	.nav__words { display: none; }
	.nav__menu { display: inline-flex; }
	.nav__end { gap: var(--s-3); }
	.brand { order: -1; }
}
@media (max-width: 639px) {
	.brand img { height: 32px; }
	.brand__name { font-size: 17px; }
	.brand__name small { display: none; }
	.nav__end .btn--primary { display: none; }
}

.sheet {
	position: fixed; inset: var(--nav) 0 0 0; z-index: 9; background: var(--bg);
	display: none; overflow-y: auto; padding: var(--s-5) 0 calc(var(--s-6) + var(--bar));
}
.admin-bar .sheet { top: calc(var(--nav) + 46px); }
.sheet.is-open { display: block; }
.sheet ul { border-top: 1px solid var(--line); }
.sheet li a { display: flex; align-items: center; justify-content: space-between; height: 56px; border-bottom: 1px solid var(--line); font-size: 18px; }
.sheet li a[aria-current="page"] { color: var(--accent); }
.sheet__foot { margin-top: var(--s-6); display: grid; gap: var(--s-2); color: var(--muted); font-size: 15px; }
body.sheet-open { overflow: hidden; }

.actionbar { display: none; }
@media (max-width: 639px) {
	.actionbar {
		display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
		position: fixed; inset: auto 0 0 0; z-index: 10;
		padding: 8px var(--gut) calc(8px + env(safe-area-inset-bottom));
		background: var(--bg); border-top: 1px solid var(--line);
	}
	.actionbar .btn { height: 48px; padding: 0 var(--s-3); }
}

/* ---------- Sections (rhythm: space) ---------- */
.sec { padding: var(--padt) 0 var(--padb); }
.sec-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); max-width: 760px; }
.sec-head p { font-size: var(--t-lead); line-height: 1.5; max-width: 56ch; }
.sec-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-5); }
.sec-head--row > div { display: grid; gap: var(--s-4); max-width: 760px; }
@media (max-width: 639px) { .sec-head { margin-bottom: var(--s-6); } }

/* ---------- Hero (split) ---------- */
.hero { padding: var(--s-7) 0 var(--s-8); min-height: calc(100svh - var(--nav)); display: flex; }
.hero > .wrap { display: flex; }
.hero .grid { width: 100%; align-items: stretch; row-gap: var(--s-6); }
.hero__copy { display: flex; flex-direction: column; gap: var(--s-5); }
.hero__notice { font-size: var(--t-small); font-weight: 500; }
.hero__notice a { color: var(--accent); }
.hero__copy h1 { max-width: 14ch; }
.hero__lead { font-size: var(--t-lead); line-height: 1.5; max-width: 42ch; }
.hero__copy .btn-row { margin-top: var(--s-3); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); margin-top: auto; padding-top: var(--s-6); border-top: 1px solid var(--line); }
.facts dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.facts dd { font-family: var(--font-display); font-size: 28px; line-height: 1.15; margin-top: var(--s-1); }
.hero__visual { border-radius: var(--r-lg); overflow: hidden; min-height: 420px; }
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) {
	.hero { min-height: 0; }
	.facts { margin-top: var(--s-4); }
	.hero__visual { min-height: 0; }
}
@media (max-width: 639px) {
	.hero { padding-top: var(--s-6); }
	.hero__copy .btn-row .btn { flex: 1 1 100%; }
	.facts { gap: var(--s-3); }
	.facts dd { font-size: 22px; }
}

/* The helpline card: the hero's right side until the client's own photograph is set. */
.helpcard {
	background: var(--ink); color: var(--bg);
	border-radius: var(--r-lg); padding: var(--s-7);
	display: flex; flex-direction: column; gap: var(--s-5); height: 100%;
}
.helpcard .label { color: color-mix(in oklab, var(--bg) 70%, var(--ink)); }
.helpcard .helpcard__num { color: var(--bg); max-width: none; font-family: var(--font-display); font-size: var(--t-big); line-height: 1; letter-spacing: var(--display-tracking-xl); }
.helpcard__num a { transition: color var(--m-out) var(--m-ease); }
.helpcard__num a:hover { color: color-mix(in oklab, var(--bg) 75%, var(--accent)); }
.helpcard p { font-size: 17px; line-height: 1.6; max-width: 40ch; color: color-mix(in oklab, var(--bg) 88%, var(--ink)); }
.helpcard dl { margin-top: auto; border-top: 1px solid color-mix(in oklab, var(--bg) 20%, transparent); }
.helpcard dl > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid color-mix(in oklab, var(--bg) 20%, transparent); font-size: 15px; }
.helpcard dt { color: color-mix(in oklab, var(--bg) 72%, var(--ink)); }
.helpcard dd a { font-weight: 500; }
.helpcard dd a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 639px) { .helpcard { padding: var(--s-5); } }

/* ---------- Rows (programmes, roles) ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-3);
	padding: var(--s-6) 0; align-items: baseline; border-bottom: 1px solid var(--line);
}
.row__title { grid-column: 1 / span 4; }
.row__body { grid-column: 5 / span 5; }
.row__body p { font-size: 17px; }
.row__body p + p { margin-top: var(--s-2); }
.row__end { grid-column: 10 / span 3; justify-self: end; text-align: right; }
a.row h3 { transition: color var(--m-out) var(--m-ease); }
@media (hover: hover) and (pointer: fine) {
	a.row:hover h3 { color: var(--accent); transition-duration: var(--m-in); }
	a.row:hover .m-arrow { transform: translateX(3px); }
}
.row .m-arrow { width: 18px; height: 18px; vertical-align: -3px; margin-left: 4px; }
@media (max-width: 1023px) {
	.row__title { grid-column: 1 / span 5; }
	.row__body { grid-column: 6 / span 7; }
	.row__end { grid-column: 6 / span 7; justify-self: start; text-align: left; }
}
@media (max-width: 639px) {
	.row { padding: var(--s-5) 0; }
	.row__title, .row__body, .row__end { grid-column: 1 / -1; }
}

.kv { border-top: 1px solid var(--line); }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-5); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 500; text-align: right; }
.kv dd .sub { display: block; font-weight: 400; font-size: var(--t-small); color: var(--muted); }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-7); align-items: start; }
.split > :first-child { grid-column: 1 / span 5; }
.split > :last-child { grid-column: 7 / span 6; }
@media (max-width: 1023px) { .split > :first-child, .split > :last-child { grid-column: 1 / -1; } }
.split__text { display: grid; gap: var(--s-5); align-content: start; }
.split__text p { font-size: 17px; }

/* ---------- One card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); }
@media (max-width: 639px) { .card { padding: var(--s-5); } }

.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 1023px) { .cols-3 { grid-template-columns: 1fr; } }

.photo { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); counter-reset: step; }
.steps li { border-top: 1px solid var(--ink); padding-top: var(--s-5); display: grid; gap: var(--s-3); align-content: start; }
.steps li::before { counter-increment: step; content: counter(step); font-family: var(--font-display); font-size: 48px; line-height: 1; color: var(--accent); }
.steps p { color: var(--muted); font-size: 17px; }
@media (max-width: 1023px) { .steps { grid-template-columns: 1fr; gap: var(--s-6); } }

/* ---------- Page head ---------- */
.page-head { padding: var(--s-8) 0; border-bottom: 1px solid var(--line); }
.page-head .grid { align-items: end; row-gap: var(--s-5); }
.page-head h1 { max-width: 16ch; }
.page-head p { font-size: var(--t-lead); line-height: 1.5; max-width: 48ch; }
@media (max-width: 639px) { .page-head { padding: var(--s-6) 0; } }

/* ---------- Big type (contact) ---------- */
.bignum { font-family: var(--font-display); font-size: var(--t-big); line-height: 1; letter-spacing: var(--display-tracking-xl); }
.bignum a { transition: color var(--m-out) var(--m-ease); }
.bignum a:hover { color: var(--accent); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-4); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 639px) { .form-2 { grid-template-columns: 1fr; } }
.field label { display: block; font-size: var(--t-label); font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
	width: 100%; min-height: 48px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
	padding: 12px 14px; font-size: 16px; color: var(--ink);
	transition: border-color var(--m-in) var(--m-ease), box-shadow var(--m-in) var(--m-ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in oklab, var(--action) 16%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in oklab, var(--muted) 80%, var(--bg)); }
.check { display: flex; align-items: center; gap: var(--s-3); font-size: 15px; min-height: 44px; }
.check input { accent-color: var(--action); width: 18px; height: 18px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-prefix input { padding-left: 40px; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: var(--t-small); color: var(--muted); }
.notice { border-radius: var(--r-sm); padding: var(--s-4); font-size: 15px; font-weight: 500; border: 1px solid; }
.notice-ok { background: color-mix(in oklab, #2e6b3a 8%, var(--bg)); border-color: color-mix(in oklab, #2e6b3a 35%, transparent); color: #1f4d29; }
.notice-err { background: color-mix(in oklab, var(--accent) 7%, var(--bg)); border-color: color-mix(in oklab, var(--accent) 35%, transparent); color: var(--accent); }

/* Choice rows (donation amounts) */
.choices { border-top: 1px solid var(--line); }
.choice { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--s-4); align-items: baseline; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.choice input { accent-color: var(--action); width: 18px; height: 18px; margin: 0; align-self: center; }
.choice__name { font-family: var(--font-display); font-size: var(--t-card); line-height: 1.3; transition: color var(--m-out) var(--m-ease); }
.choice__desc { color: var(--muted); font-size: 15px; margin-top: 2px; }
.choice__amt { font-family: var(--font-display); font-size: 24px; white-space: nowrap; text-align: right; }
.choice__amt small { display: block; font-family: var(--font-text); font-size: var(--t-label); color: var(--muted); }
.choice:hover .choice__name, .choice:has(input:checked) .choice__name { color: var(--accent); }
.toggle { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: var(--r-btn); padding: 3px; gap: 3px; }
.toggle label { position: relative; display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 var(--s-4); border-radius: 6px; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle label:has(input:checked) { background: var(--ink); color: var(--bg); }
.toggle label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 639px) { .toggle { display: grid; width: 100%; } .toggle label { padding: 0 8px; font-size: 14px; } }

.copy-btn { font-size: var(--t-label); font-weight: 500; border: 1px solid var(--line-strong); background: var(--bg); border-radius: 6px; height: 32px; padding: 0 10px; margin-left: var(--s-3); transition: background-color var(--m-out) var(--m-ease); }
.copy-btn:hover { background: var(--surface); }
.qr { width: 180px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; padding: 8px; }

.split-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface); }
.split-legend { display: flex; flex-wrap: wrap; gap: var(--s-5); font-size: var(--t-small); color: var(--muted); margin-top: var(--s-3); }
.split-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: -1px; }

/* ---------- Closing + footer (footer-columns) ---------- */
.closing { padding: var(--padt) 0 var(--s-6); border-top: 1px solid var(--line); }
.close-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s-6); padding-bottom: var(--s-9); }
.close-row > div { display: grid; gap: var(--s-4); max-width: 720px; }
.close-row p { font-size: var(--t-lead); line-height: 1.5; }
.footer-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); padding-top: var(--s-7); border-top: 1px solid var(--line); }
.footer-grid > :nth-child(1) { grid-column: 1 / span 5; }
.footer-grid > :nth-child(2) { grid-column: 7 / span 3; }
.footer-grid > :nth-child(3) { grid-column: 10 / span 3; }
.footer-grid h2 { font-family: var(--font-text); font-size: var(--t-label); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: var(--s-3); }
.footer-grid p, .footer-grid li { font-size: 15px; }
.footer-grid .brand { margin-bottom: var(--s-4); }
.footer-links { display: grid; gap: var(--s-2); justify-items: start; }
.footer-links a { padding: 0; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); font-size: var(--t-label); color: var(--muted); }
@media (max-width: 1023px) {
	.footer-grid > :nth-child(1) { grid-column: 1 / -1; }
	.footer-grid > :nth-child(2) { grid-column: 1 / span 6; }
	.footer-grid > :nth-child(3) { grid-column: 7 / span 6; }
}
@media (max-width: 639px) {
	.close-row { padding-bottom: var(--s-8); }
	.close-row .btn { width: 100%; }
	.footer-grid > :nth-child(2), .footer-grid > :nth-child(3) { grid-column: 1 / -1; }
}

/* Generic content */
.entry-content { font-size: 17px; line-height: 1.75; max-width: 66ch; }
.entry-content > * + * { margin-top: 1em; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Vision: the one type moment */
.vision { margin: 0; border-left: 2px solid var(--accent); padding: var(--s-2) 0 var(--s-2) var(--s-6); display: grid; gap: var(--s-4); }
.vision__text { font-family: var(--font-display); font-size: var(--t-h2); line-height: 1.15; letter-spacing: var(--display-tracking); text-wrap: balance; }
@media (max-width: 639px) { .vision { padding-left: var(--s-5); } }

/* Committee list */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); border-top: 1px solid var(--line); }
.people li { display: grid; gap: 2px; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.people__name { font-family: var(--font-display); font-size: var(--t-card); line-height: 1.3; }
@media (max-width: 1023px) { .people { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .people { grid-template-columns: 1fr; } }

/* Objectives */
.objectives { counter-reset: obj; border-top: 1px solid var(--line); }
.objectives li { counter-increment: obj; display: grid; grid-template-columns: 32px 1fr; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.objectives li::before { content: counter(obj); font-family: var(--font-display); color: var(--accent); font-size: 18px; line-height: 1.5; }

/* Amount picker */
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.amount { position: relative; display: flex; align-items: center; justify-content: center; height: 56px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-family: var(--font-display); font-size: 20px; cursor: pointer; transition: border-color var(--m-out) var(--m-ease), background-color var(--m-out) var(--m-ease); }
.amount input { position: absolute; opacity: 0; pointer-events: none; }
.amount:hover { border-color: var(--ink); }
.amount:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.amount:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 639px) { .amounts { grid-template-columns: 1fr 1fr; } }

/* Portraits (board and management) */
.portraits { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); }
.portraits li { display: grid; gap: 4px; align-content: start; }
.portrait { aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--surface); margin-bottom: var(--s-3); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.portraits--lead { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split--wide > :first-child { grid-column: 1 / span 4; }
.split--wide > :last-child { grid-column: 6 / span 7; }
@media (max-width: 1023px) { .split--wide > :first-child, .split--wide > :last-child { grid-column: 1 / -1; } }
@media (max-width: 1023px) { .portraits { grid-template-columns: repeat(3, minmax(0, 1fr)); } .portraits--lead { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) { .portraits, .portraits--lead { grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--gutter); } }

/* Staff by district */
.districts { border-top: 1px solid var(--line); }
.district { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-4); padding: var(--s-6) 0; border-bottom: 1px solid var(--line); }
.district > h3 { grid-column: 1 / span 3; }
.district__teams { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); }
.team__name { font-weight: 500; margin-bottom: var(--s-2); }
.team__list li { display: flex; justify-content: space-between; gap: var(--s-4); padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.team__list li .muted { text-align: right; }
@media (max-width: 1023px) { .district > h3, .district__teams { grid-column: 1 / -1; } }
@media (max-width: 639px) { .district__teams { grid-template-columns: 1fr; } .team__list li { flex-direction: column; gap: 0; } .team__list li .muted { text-align: left; font-size: 14px; } }

/* Bank details: the most important block on the donate page */
.bankcard { background: var(--ink); color: var(--bg); border-radius: var(--r-lg); padding: var(--s-7); display: grid; gap: var(--s-5); align-content: start; }
.bankcard .label { color: color-mix(in oklab, var(--bg) 70%, var(--ink)); }
.bankcard__num { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); font-family: var(--font-display); font-size: 48px; line-height: 1.05; letter-spacing: -0.01em; }
.bankcard dl { border-top: 1px solid color-mix(in oklab, var(--bg) 20%, transparent); }
.bankcard dl > div { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid color-mix(in oklab, var(--bg) 20%, transparent); font-size: 16px; }
.bankcard dt { color: color-mix(in oklab, var(--bg) 72%, var(--ink)); }
.bankcard dd { font-weight: 500; text-align: right; }
.bankcard__pending { font-family: var(--font-display); font-size: var(--t-h3); line-height: 1.3; }
.bankcard__pending a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.copy-btn--inv { background: transparent; color: var(--bg); border-color: color-mix(in oklab, var(--bg) 40%, transparent); font-family: var(--font-text); }
.copy-btn--inv:hover { background: color-mix(in oklab, var(--bg) 12%, transparent); }
.bankcard .qr { margin-top: var(--s-3); }
.steps--stack { grid-template-columns: 1fr; gap: var(--s-5); }
.steps--stack li { grid-template-columns: 40px 1fr; column-gap: var(--s-4); border-top: 1px solid var(--line); }
.steps--stack li::before { grid-row: span 2; font-size: 36px; }
@media (max-width: 639px) { .bankcard { padding: var(--s-5); } .bankcard__num { font-size: 32px; } .bankcard dl > div { flex-direction: column; align-items: flex-start; gap: 2px; } .bankcard dd { text-align: left; } }
@media (max-width: 1023px) { #bank .bankcard { order: -1; } }
