/* RBG Support — reader contribution UI. Self-contained (no theme Tailwind deps). */
.rbg-support {
	--rbg-accent: #e8f651;
	--rbg-ink: #111111;
	--rbg-line: #e4e4e7;
	--rbg-muted: #6b7280;
	max-width: 760px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--rbg-ink);
}
.rbg-support *, .rbg-support *::before, .rbg-support *::after { box-sizing: border-box; }

/* Header */
.rbg-support-head { text-align: center; margin-bottom: 28px; }
.rbg-support-headline {
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 12px;
}
.rbg-support-subhead { font-size: 1.05rem; line-height: 1.55; color: var(--rbg-muted); margin: 0 auto; max-width: 56ch; }

/* Flash messages */
.rbg-support-flash {
	max-width: 760px; margin: 0 auto 20px; padding: 12px 16px;
	border-radius: 10px; font-size: .95rem; line-height: 1.5;
}
.rbg-support-flash.rbg-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.rbg-support-flash.rbg-info  { background: #f8fafc; border: 1px solid #e2e8f0; color: #334155; }

/* Monthly / one-time toggle */
.rbg-support-toggle {
	display: flex; margin: 0 auto 22px; padding: 4px;
	background: #f4f4f5; border-radius: 999px; gap: 4px;
	width: 100%; max-width: 420px;
}
.rbg-tab {
	flex: 1; border: 0; background: transparent; cursor: pointer;
	padding: 10px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem;
	color: var(--rbg-muted); transition: background .15s, color .15s;
}
.rbg-tab.is-active { background: var(--rbg-ink); color: #fff; }

/* Tier cards */
.rbg-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rbg-tier {
	position: relative; text-align: left; cursor: pointer;
	background: #fff; border: 2px solid var(--rbg-line); border-radius: 14px;
	padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 4px;
	transition: border-color .15s, box-shadow .15s, transform .05s;
}
.rbg-tier:hover { border-color: #c7c7cc; }
.rbg-tier.is-selected { border-color: var(--rbg-ink); box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.rbg-tier.is-featured { border-color: var(--rbg-accent); }
.rbg-tier.is-featured.is-selected { border-color: var(--rbg-ink); }
.rbg-badge {
	position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
	background: var(--rbg-accent); color: var(--rbg-ink); font-size: .68rem;
	font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
	padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.rbg-tier-price { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.rbg-per { font-size: .9rem; font-weight: 600; color: var(--rbg-muted); }
.rbg-tier-label { font-weight: 700; }
.rbg-tier-blurb { font-size: .82rem; color: var(--rbg-muted); line-height: 1.4; }

/* One-time presets */
.rbg-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.rbg-preset {
	cursor: pointer; background: #fff; border: 2px solid var(--rbg-line);
	border-radius: 12px; padding: 16px; font-size: 1.25rem; font-weight: 700;
	transition: border-color .15s, box-shadow .15s;
}
.rbg-preset:hover { border-color: #c7c7cc; }
.rbg-preset.is-selected { border-color: var(--rbg-ink); box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.rbg-custom { display: block; }
.rbg-custom > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.rbg-custom-input { position: relative; display: flex; align-items: center; }
.rbg-dollar { position: absolute; left: 14px; font-weight: 700; color: var(--rbg-muted); }
.rbg-custom-input input {
	width: 100%; padding: 12px 14px 12px 28px; font-size: 1.1rem; font-weight: 600;
	border: 2px solid var(--rbg-line); border-radius: 12px;
}

/* Fields */
.rbg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 16px; }
.rbg-field { display: block; }
.rbg-field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.rbg-field em { color: var(--rbg-muted); font-style: normal; font-weight: 400; }
.rbg-field input {
	width: 100%; padding: 12px 14px; font-size: 1rem;
	border: 2px solid var(--rbg-line); border-radius: 12px;
}
.rbg-field input:focus, .rbg-custom-input input:focus { outline: none; border-color: var(--rbg-ink); }

/* Custom recurring amount (small opt-in under the tiers) */
.rbg-tier-custom { margin-top: 14px; text-align: center; }
.rbg-custom-toggle {
	background: none; border: 0; padding: 4px 2px; cursor: pointer;
	font-family: inherit; font-size: 0.9rem; font-weight: 600;
	color: var(--rbg-muted); text-decoration: underline; text-underline-offset: 2px;
}
.rbg-custom-toggle:hover { color: var(--rbg-ink); }
.rbg-tier-custom .rbg-custom { margin-top: 12px; text-align: left; }
.rbg-tier-custom-per { color: var(--rbg-muted); font-style: normal; font-weight: 400; }

/* Submit */
.rbg-submit {
	width: 100%; cursor: pointer; border: 0; border-radius: 12px;
	background: var(--rbg-accent); color: var(--rbg-ink);
	padding: 16px 20px; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em;
	transition: filter .15s, transform .05s;
}
.rbg-submit:hover { filter: brightness(.95); }
.rbg-submit:active { transform: translateY(1px); }
.rbg-submit[disabled] { opacity: .6; cursor: default; }
.rbg-fineprint { text-align: center; font-size: .8rem; color: var(--rbg-muted); margin: 12px 0 0; line-height: 1.5; }

/* Thank-you */
.rbg-support-thanks { text-align: center; padding: 20px 0; }
.rbg-support-thanks h2 { font-size: 2rem; font-weight: 800; margin: 8px 0 10px; }
.rbg-support-thanks p { font-size: 1.05rem; color: #333; max-width: 52ch; margin: 0 auto 12px; }
.rbg-check {
	display: inline-flex; align-items: center; justify-content: center;
	width: 64px; height: 64px; border-radius: 999px;
	background: var(--rbg-accent); color: var(--rbg-ink); font-size: 1.8rem;
}
.rbg-back { font-weight: 600; }

@media (max-width: 560px) {
	.rbg-tiers { grid-template-columns: 1fr; }
	.rbg-tier { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 8px; }
	.rbg-tier-blurb { flex-basis: 100%; }
	.rbg-fields { grid-template-columns: 1fr; }
	.rbg-presets { grid-template-columns: repeat(3, 1fr); }
}

/* Honor roll — [rbg_supporters] (card wall) */
.rbg-supporters {
	--rbg-accent: #e8f651;
	--rbg-ink: #111111;
	--rbg-muted: #6b7280;
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 960px;
	columns: 3;
	column-gap: 18px;
}
.rbg-supporter {
	break-inside: avoid;
	margin: 0 0 18px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e8e8ec;
	border-left: 4px solid var(--rbg-accent);
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(17,17,17,.04);
}
.rbg-supporter-name {
	display: block;
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
	color: var(--rbg-ink);
	line-height: 1.25;
}
.rbg-supporter.has-note .rbg-supporter-name { margin-bottom: 7px; }
.rbg-supporter-note {
	display: block;
	position: relative;
	font-size: 0.92rem;
	line-height: 1.5;
	color: #374151;
	font-style: italic;
	padding-left: 14px;
}
.rbg-supporter-note::before {
	content: "\201C";
	position: absolute;
	left: 0; top: -2px;
	font-style: normal;
	font-weight: 800;
	color: var(--rbg-accent);
	font-size: 1.1rem;
}
.rbg-supporters-empty {
	text-align: center;
	font-size: 1.1rem;
	color: #6b7280;
	font-weight: 600;
}
@media (max-width: 760px) { .rbg-supporters { columns: 2; } }
@media (max-width: 460px) { .rbg-supporters { columns: 1; } }

/* Optional note field + anonymity checkbox in the contribution form */
.rbg-note-field textarea {
	width: 100%;
	padding: 12px 14px;
	font-size: 1rem;
	font-family: inherit;
	border: 2px solid var(--rbg-line, #e4e4e7);
	border-radius: 12px;
	resize: vertical;
	min-height: 56px;
}
.rbg-note-field textarea:focus { outline: none; border-color: var(--rbg-ink, #111); }
.rbg-anon {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 12px 0 18px;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #4b5563;
	cursor: pointer;
}
.rbg-anon input[type="checkbox"] { margin-top: 2px; width: 17px; height: 17px; flex: 0 0 auto; accent-color: #111; }
.rbg-anon a { color: #111; }

/* Unconfigured public placeholder */
.rbg-support-soon {
	text-align: center;
	background: #fafafa;
	border: 1px solid #e4e4e7;
	border-radius: 14px;
	padding: 28px 24px;
}
.rbg-soon-kicker {
	display: inline-block;
	background: #e8f651;
	color: #111;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-size: .8rem;
	padding: 5px 14px;
	border-radius: 999px;
	margin: 0 0 12px;
}
.rbg-support-soon p:last-child { color: #374151; font-size: 1.05rem; line-height: 1.6; max-width: 52ch; margin: 0 auto; }

/* Campaign card — reusable (below-story, home, sidebar). Every rule is scoped
   under .rbg-cta so it beats the theme's `prose`/content styles (which are
   specificity 0,1,0 and load after this sheet). */
.rbg-cta {
	--rbg-accent: #e8f651;
	--rbg-ink: #111111;
	container-type: inline-size;
	width: 100%;
	max-width: 760px;
	margin: 44px auto;
	background: #ffffff;
	border: 1px solid #e7e7ea;
	border-radius: 20px;
	box-shadow: 0 12px 36px rgba(17,17,17,.10), 0 2px 6px rgba(17,17,17,.05);
	overflow: hidden;
	font-family: inherit;
	color: var(--rbg-ink);
}
.rbg-cta * { box-sizing: border-box; }

/* Header band — black, white oversized headline, icon on the left */
.rbg-cta .rbg-cta-header {
	background: #0a0a0a;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 24px 18px;
	margin: 0;
}
.rbg-cta .rbg-cta-logo {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: block;
	margin: 0;
	max-width: none;
}
.rbg-cta .rbg-cta-htext { min-width: 0; }
.rbg-cta .rbg-cta-kicker {
	display: block;
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rbg-accent);
	margin: 0 0 1px;
}
.rbg-cta .rbg-cta-head {
	margin: 0;
	padding: 0;
	font-size: clamp(1.7rem, 7.5cqi, 2.35rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	color: #ffffff;
}
.rbg-cta .rbg-cta-head a { color: #ffffff; text-decoration: none; box-shadow: none; }
.rbg-cta .rbg-cta-head a:hover { text-decoration: underline; color: #ffffff; }

/* Body */
.rbg-cta .rbg-cta-body { padding: 24px 32px 26px; }
.rbg-cta .rbg-cta-text {
	margin: 0 0 22px;
	font-size: 1.06rem;
	line-height: 1.6;
	color: #3f4650;
}
.rbg-cta .rbg-cta-progress { margin: 0 0 22px; }
.rbg-cta .rbg-cta-stats {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}
.rbg-cta .rbg-cta-count { font-size: 1.02rem; color: #4b5563; }
.rbg-cta .rbg-cta-count strong { font-size: 1.6rem; font-weight: 800; color: var(--rbg-ink); letter-spacing: -0.02em; margin-right: 3px; }
.rbg-cta .rbg-cta-days {
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #111;
	background: #f3f4f6;
	padding: 5px 11px;
	border-radius: 999px;
	white-space: nowrap;
}
.rbg-cta .rbg-cta-bar {
	height: 14px;
	background: #eceef1;
	border-radius: 999px;
	overflow: hidden;
}
.rbg-cta .rbg-cta-bar > span {
	display: block;
	height: 100%;
	min-width: 14px;
	background: linear-gradient(90deg, #d7e636, var(--rbg-accent));
	border-radius: 999px;
	transition: width .5s ease;
}
.rbg-cta .rbg-cta-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rbg-cta .rbg-cta-btn {
	display: inline-block;
	background: var(--rbg-accent);
	color: var(--rbg-ink) !important;
	font-weight: 800;
	font-size: 1.08rem;
	letter-spacing: -0.01em;
	padding: 14px 28px;
	border-radius: 13px;
	text-decoration: none !important;
	box-shadow: none;
	white-space: nowrap;
	transition: filter .15s, transform .05s;
}
.rbg-cta .rbg-cta-btn:hover { filter: brightness(.95); }
.rbg-cta .rbg-cta-btn:active { transform: translateY(1px); }
.rbg-cta .rbg-cta-link { font-size: 0.95rem; color: #4b5563; font-weight: 600; }

/* Social-proof ticker */
.rbg-cta .rbg-cta-proof {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid #eef0f2;
	font-size: 0.95rem;
	color: #6b7280;
}
.rbg-cta .rbg-proof-label { font-weight: 600; }
.rbg-cta .rbg-proof-name { display: inline-block; font-weight: 800; color: var(--rbg-ink); transition: opacity .4s ease; }
.rbg-cta .rbg-proof-name.is-fading { opacity: 0; }
.rbg-cta .rbg-proof-more { color: #9aa0a8; }

/* Narrow container (sidebar, small column): tighten + stack. */
@container (max-width: 440px) {
	.rbg-cta .rbg-cta-header { padding: 14px 18px 15px; gap: 12px; }
	.rbg-cta .rbg-cta-logo { width: 44px; height: 44px; }
	.rbg-cta .rbg-cta-body { padding: 18px 20px 20px; }
	.rbg-cta .rbg-cta-text { font-size: 0.98rem; margin-bottom: 18px; }
	.rbg-cta .rbg-cta-count strong { font-size: 1.35rem; }
	.rbg-cta .rbg-cta-actions { flex-direction: column; align-items: stretch; gap: 10px; }
	.rbg-cta .rbg-cta-btn { text-align: center; }
	.rbg-cta .rbg-cta-link { text-align: center; }
}
/* Explicit compact (e.g. sidebar widget) — two classes, already beats prose. */
.rbg-cta.is-compact .rbg-cta-header { padding: 14px 18px 15px; gap: 12px; }
.rbg-cta.is-compact .rbg-cta-logo { width: 44px; height: 44px; }
.rbg-cta.is-compact .rbg-cta-body { padding: 18px 20px 20px; }
.rbg-cta.is-compact .rbg-cta-head { font-size: clamp(1.5rem, 10cqi, 2.05rem); }
.rbg-cta.is-compact .rbg-cta-text { font-size: 0.96rem; margin-bottom: 18px; }
.rbg-cta.is-compact .rbg-cta-actions { flex-direction: column; align-items: stretch; gap: 10px; }
.rbg-cta.is-compact .rbg-cta-btn { text-align: center; }
.rbg-cta.is-compact .rbg-cta-link { text-align: center; }

/* Sticky campaign bar (site-wide, floats in from the bottom) */
.rbg-bar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 99990;
	background: #ffffff;
	color: #111111;
	border-top: 1px solid #e7e7ea;
	box-shadow: 0 -6px 26px rgba(17,17,17,.12);
	transform: translateY(110%);
	transition: transform .45s cubic-bezier(.22,.61,.36,1);
	font-family: inherit;
}
.rbg-bar.is-in { transform: translateY(0); }
.rbg-bar * { box-sizing: border-box; }
.rbg-bar-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 18px;
}
.rbg-bar-text { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.rbg-bar-main { font-weight: 700; font-size: 1.05rem; letter-spacing: normal; color: #111111; }
.rbg-bar-sub { display: block; font-size: 0.8rem; color: #6b7280; margin-top: 2px; }
.rbg-bar .rbg-proof-label { color: #6b7280; }
.rbg-bar .rbg-proof-name { color: #111111; font-weight: 800; display: inline-block; transition: opacity .4s ease; }
.rbg-bar .rbg-proof-name.is-fading { opacity: 0; }
.rbg-bar .rbg-proof-more { color: #9aa0a8; }
.rbg-bar-btn {
	flex: 0 0 auto;
	background: var(--rbg-accent, #e8f651);
	color: #111 !important;
	font-weight: 800;
	font-size: 0.92rem;
	padding: 10px 20px;
	border-radius: 10px;
	text-decoration: none !important;
	box-shadow: none;
	white-space: nowrap;
	transition: filter .15s;
}
.rbg-bar-btn:hover { filter: brightness(.95); }
.rbg-bar-close {
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	color: #9aa0a8;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 2px 6px;
}
.rbg-bar-close:hover { color: #111; }
@media (max-width: 600px) {
	.rbg-bar-inner { padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
	.rbg-bar-text { flex: 1 1 100%; order: 1; }
	.rbg-bar-main { font-size: 0.9rem; }
	.rbg-bar-sub { font-size: 0.72rem; }
	.rbg-bar-btn { order: 2; flex: 1 1 auto; text-align: center; font-size: 0.86rem; padding: 9px 14px; }
	.rbg-bar-close { order: 3; }
}
