/* GoodSeed Giving — design system
   Deep forest green for trust, fresh leaf greens for life, wheat gold for harvest and Gift Aid.
   Display type: Fraunces. Interface type: Inter. Both self-hosted (no third-party requests). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --ink: #13241b;
  --ink-2: #2e4236;
  --muted: #5b6d61;
  --faint: #879789;
  --bg: #f3f6f1;
  --surface: #ffffff;
  --surface-2: #f8faf6;
  --sunken: #ecf2ea;
  --line: #dde6da;
  --line-strong: #c6d4c3;
  --forest: #17432f;
  --forest-2: #1e5139;
  --green: #1f6b47;
  --green-hover: #185a3b;
  --leaf: #3d9a66;
  --sprout: #8cc9a0;
  --mint: #e2f1e5;
  --mint-2: #cfe8d5;
  --gold: #b88728;
  --gold-ink: #7a5712;
  --gold-soft: #f7eeda;
  --wheat: #e3c37b;
  --danger: #b4312a;
  --danger-soft: #fbe9e6;
  --warn: #94600a;
  --warn-soft: #fcf2db;
  --info: #285b84;
  --info-soft: #e7f0f7;
  --on-brand: #ffffff;
  --brand: var(--green);
  --brand-hover: var(--green-hover);
  --focus: 0 0 0 3px rgba(61, 154, 102, .35);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(19, 36, 27, .06), 0 1px 1px rgba(19, 36, 27, .03);
  --shadow: 0 10px 30px -12px rgba(19, 36, 27, .18), 0 2px 6px rgba(19, 36, 27, .05);
  --shadow-lg: 0 24px 60px -20px rgba(19, 36, 27, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sidebar: 260px;
  --tabbar: 64px;
  /* Chart series: validated as a set for colour-blind separation and contrast on --surface (light and dark). */
  --series-1: #2f8a5b; --series-2: #2d78c8; --series-3: #b0800c; --series-4: #9b5bb5; --series-5: #d0603a; --series-other: #a3ada6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e6efe8;
    --ink-2: #c9d8cd;
    --muted: #9db1a3;
    --faint: #6f8576;
    --bg: #0e1812;
    --surface: #15221a;
    --surface-2: #19281f;
    --sunken: #112018;
    --line: #253a2d;
    --line-strong: #31493a;
    --forest: #0f2c1f;
    --forest-2: #143a28;
    --green: #3fa56f;
    --green-hover: #4fb87f;
    --leaf: #5bbd86;
    --mint: #17352a;
    --mint-2: #1d4434;
    --gold: #d8ad55;
    --gold-ink: #e6c27a;
    --gold-soft: #2e2715;
    --danger: #ef7d73;
    --danger-soft: #3a1c19;
    --warn: #e2b04f;
    --warn-soft: #33270f;
    --info: #8cbde3;
    --info-soft: #152a3a;
    --on-brand: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    --series-1: #3a9a68; --series-2: #4589d6; --series-3: #b3841f; --series-4: #a876c9; --series-5: #d66c48; --series-other: #5d6e63;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6efe8; --ink-2: #c9d8cd; --muted: #9db1a3; --faint: #6f8576;
  --bg: #0e1812; --surface: #15221a; --surface-2: #19281f; --sunken: #112018;
  --line: #253a2d; --line-strong: #31493a; --forest: #0f2c1f; --forest-2: #143a28;
  --green: #3fa56f; --green-hover: #4fb87f; --leaf: #5bbd86; --mint: #17352a; --mint-2: #1d4434;
  --gold: #d8ad55; --gold-ink: #e6c27a; --gold-soft: #2e2715;
  --danger: #ef7d73; --danger-soft: #3a1c19; --warn: #e2b04f; --warn-soft: #33270f;
  --info: #8cbde3; --info-soft: #152a3a;
  --series-1: #3a9a68; --series-2: #4589d6; --series-3: #b3841f; --series-4: #a876c9; --series-5: #d66c48; --series-other: #5d6e63;
}

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-hover); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 650; letter-spacing: -0.012em; }
h1, h2, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; font-optical-sizing: auto; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.25rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: var(--mint-2); }

.icon { width: 18px; height: 18px; flex: none; }
.icon-lg { width: 22px; height: 22px; flex: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; flex: none; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 720px; }
.container-tight { max-width: 480px; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.stack-sm { --gap: .5rem; }
.stack-lg { --gap: 1.75rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.split-top { align-items: start; }
.church-cell { display: flex; gap: .65rem; align-items: flex-start; }
.church-cell > .key { margin-top: .3rem; }
.card-list > li { flex-wrap: wrap; }
.card-list .grow { flex: 1 1 0; min-width: 7.5rem; }
.row-end { justify-content: flex-end; gap: .4rem; flex-wrap: nowrap; }
.row-between { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row-top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-4 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
@media (max-width: 420px) { .grid-4 { gap: .65rem; } .grid-4 .stat { padding: .9rem; } .grid-4 .stat-value { font-size: 1.5rem; } }
.split { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); } }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.25rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 42px; padding: .55rem 1rem;
  border: 1px solid var(--btn-bd); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 600; font-size: .94rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { --btn-bg: var(--surface-2); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-bd: transparent; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px var(--brand); }
.btn-primary:hover { --btn-bg: var(--brand-hover); }
.btn-forest { --btn-bg: var(--forest); --btn-fg: #fff; --btn-bd: transparent; }
.btn-forest:hover { --btn-bg: var(--forest-2); }
.btn-gold { --btn-bg: var(--gold-soft); --btn-fg: var(--gold-ink); --btn-bd: transparent; }
.btn-left { justify-content: flex-start; }
.btn .card-mark { width: 34px; height: 22px; font-size: .58rem; border-radius: 4px; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--ink-2); }
.btn-ghost:hover { --btn-bg: var(--sunken); }
.btn-danger { --btn-fg: var(--danger); --btn-bd: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { --btn-bg: var(--danger-soft); }
.btn-sm { min-height: 34px; padding: .35rem .8rem; font-size: .86rem; }
.btn-lg { min-height: 54px; padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.inline-form { display: inline; }

/* ---------- Forms ---------- */
.field { display: grid; gap: .35rem; }
.field + .field, .field + .field-row, .field-row + .field, .field-row + .field-row { margin-top: 1rem; }
.field-row > .field { margin-top: 0; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
label, .label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.hint { font-size: .84rem; color: var(--muted); margin: 0; }
.optional { font-weight: 400; color: var(--faint); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"],
input[type="tel"], input[type="url"], input[type="date"], input[type="color"], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input[type="color"] { padding: 4px; width: 64px; cursor: pointer; }
select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6d61' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.input-money { position: relative; }
.input-money > span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-money > input { padding-left: 1.75rem; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.check span { font-weight: 500; color: var(--ink); }
.check small { display: block; color: var(--muted); font-weight: 400; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 650; margin-bottom: .5rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* Segmented radio control (frequency, roles…) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); }
.segmented label { flex: 1 1 auto; position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; text-align: center; padding: .5rem .35rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); transition: background-color .15s, color .15s; white-space: nowrap; }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }

/* Amount tiles on the giving form */
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 420px) { .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.amounts label { position: relative; margin: 0; }
.amounts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.amounts span { display: grid; place-items: center; min-height: 56px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; transition: all .15s; }
.amounts input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.amounts input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- Cards & surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad, .card > .card-body { padding: 1.25rem; }
@media (min-width: 720px) { .card-pad, .card > .card-body { padding: 1.5rem; } }
.card-header { display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.05rem; font-family: var(--font); font-weight: 650; letter-spacing: -0.01em; }
.card-footer { padding: .9rem 1.25rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-tint { background: linear-gradient(160deg, var(--mint) 0%, var(--surface) 70%); }
.card-forest { background: var(--forest); color: #e9f3ec; border-color: transparent; }
.card-forest h2, .card-forest h3 { color: #fff; }
.card-forest .muted { color: #a9c7b3; }
.card-gold { background: var(--gold-soft); border-color: transparent; }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); color: inherit; transform: translateY(-1px); }
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; }

.stat { padding: 1.1rem 1.25rem; }
.stat-label { font-size: .82rem; font-weight: 600; color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.stat-value { font-family: var(--display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.stat-gold .stat-value { color: var(--gold-ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num, .table .right { text-align: right; }
a.row-link { color: inherit; text-decoration: none; font-weight: 600; }
a.row-link:hover { color: var(--green); }
.cell-sub { display: block; font-size: .82rem; color: var(--muted); font-weight: 400; }
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { padding: .15rem 0; border: 0; text-align: left !important; }
  .table-stack td[data-label]::before { content: attr(data-label) " · "; color: var(--faint); font-size: .8rem; }
}

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: .85rem; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list-link { display: flex; gap: .85rem; align-items: center; padding: .85rem 1.25rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.list-link:hover { background: var(--surface-2); color: inherit; }
.list-link:last-child { border-bottom: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .82rem; background: var(--mint); color: var(--forest); letter-spacing: .02em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: var(--sprout); } }
.avatar-gold { background: var(--gold-soft); color: var(--gold-ink); }
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .55rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Badges, alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 650; background: var(--sunken); color: var(--ink-2); white-space: nowrap; line-height: 1.4; }
.badge-green { background: var(--mint); color: var(--green); }
.badge-gold { background: var(--gold-soft); color: var(--gold-ink); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-blue { background: var(--info-soft); color: var(--info); }
.badge .icon { width: 13px; height: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: .94rem; }
.alert .icon { margin-top: 2px; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--mint); color: var(--forest); border-color: var(--mint-2); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warning { background: var(--warn-soft); color: var(--warn); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .alert-success { color: var(--sprout); } }
.flash-stack { display: grid; gap: .5rem; margin-bottom: 1.25rem; }

/* ---------- Progress ---------- */
.progress { height: 10px; border-radius: 999px; background: var(--sunken); overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--leaf), var(--brand)); min-width: 6px; }
.progress-lg { height: 14px; }
.progress-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; margin-top: .45rem; }

/* ---------- Empty states & checklists ---------- */
.empty { text-align: center; padding: 2.5rem 1.25rem; color: var(--muted); }
.empty .icon-lg { margin: 0 auto .75rem; color: var(--leaf); width: 34px; height: 34px; }
.empty h3 { color: var(--ink); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.checklist li { display: flex; gap: .85rem; align-items: center; padding: .75rem .9rem; border-radius: var(--radius-sm); }
.checklist li.done { color: var(--muted); }
.checklist .tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--line-strong); color: transparent; }
.checklist li.done .tick { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.checklist li.next { background: var(--mint); }
.checklist .tick .icon { width: 15px; height: 15px; }

/* ---------- Code snippets ---------- */
.snippet { position: relative; }
.snippet pre { margin: 0; padding: 1rem 1rem 1rem 1rem; padding-right: 5.5rem; background: #0f2219; color: #d6eadc; border-radius: var(--radius-sm); font-size: .8rem; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.snippet .btn { position: absolute; top: .5rem; right: .5rem; --btn-bg: rgba(255,255,255,.1); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.18); }
.copy-field { display: flex; gap: .5rem; }
.copy-field input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }

/* ---------- App shell (church + admin) ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .7rem 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .brand-name { font-weight: 700; }
.page { padding: 1.25rem 16px 2rem; max-width: 1180px; margin: 0 auto; }
.page-header { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1 { margin: 0; }
.page-header p { margin: .3rem 0 0; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); text-decoration: none; font-size: .9rem; margin-bottom: .6rem; }
.back-link:hover { color: var(--ink); }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); text-decoration: none; font-size: .7rem; font-weight: 600; }
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a.active { color: var(--green); }

.nav-section { font-size: .8rem; font-weight: 600; color: rgba(233, 243, 236, .55); padding: 1.1rem .9rem .35rem; }
.nav-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .9rem; border-radius: 10px; color: #cfe1d5; text-decoration: none; font-weight: 550; font-size: .93rem; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.active { background: rgba(140, 201, 160, .16); color: #fff; }
.nav-link.active .icon { color: var(--sprout); }
.nav-link .icon { opacity: .9; }
.nav-link .badge { margin-left: auto; background: rgba(227, 195, 123, .2); color: var(--wheat); }

.drawer { position: fixed; inset: 0; z-index: 50; display: none; }
.drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(9, 20, 14, .45); }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 300px); background: var(--forest); color: #e9f3ec; padding: 1rem .75rem 2rem; overflow-y: auto; box-shadow: var(--shadow-lg); }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--forest); color: #e9f3ec; padding: 1.1rem .8rem 1.25rem; }
  .main { padding-bottom: 2rem; }
  .topbar .menu-btn, .topbar .topbar-brand { display: none; }
  .tabbar { display: none; }
  .page { padding: 2rem 2.25rem 3rem; }
}
.sidebar-brand, .drawer-brand { display: flex; align-items: center; gap: .65rem; padding: .25rem .5rem 1rem; color: #fff; text-decoration: none; }
.sidebar-brand:hover { color: #fff; }
.brand-word { font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1; }
.brand-word small { display: block; font-family: var(--font); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin-top: 3px; }
.church-switch { margin: 0 .25rem .5rem; padding: .7rem .8rem; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.church-switch .name { font-weight: 650; color: #fff; font-size: .95rem; line-height: 1.25; }
.church-switch .meta { font-size: .78rem; color: #a9c7b3; display: flex; align-items: center; gap: .35rem; margin-top: 2px; }
.church-switch select { margin-top: .5rem; min-height: 34px; padding: .3rem .6rem; font-size: .85rem; background-color: rgba(0, 0, 0, .2); color: #fff; border-color: rgba(255, 255, 255, .15); }
.sidebar-foot { margin-top: auto; padding-top: 1rem; }
.mission-note { margin: 0 .25rem .75rem; padding: .85rem; border-radius: 12px; background: rgba(227, 195, 123, .1); color: #e8d6a8; font-size: .8rem; line-height: 1.45; }
.mission-note strong { color: #f3e3b9; }

/* ---------- Donor app shell ---------- */
.dhead { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.dhead-inner { display: flex; align-items: center; gap: 1rem; height: 62px; }
.dnav { display: none; gap: .25rem; margin-left: 1rem; }
.dnav a { padding: .45rem .8rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.dnav a:hover { color: var(--ink); background: var(--sunken); }
.dnav a.active { color: var(--green); background: var(--mint); }
@media (min-width: 900px) { .dnav { display: flex; } .donor-app .tabbar { display: none; } .donor-app .main { padding-bottom: 2rem; } }
.brand-link { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand-link:hover { color: var(--ink); }
.brand-link .brand-word { color: var(--forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-link .brand-word { color: var(--ink); } }

/* ---------- Public pages / auth ---------- */
.public-head { padding: 1rem 0; }
.public-foot { padding: 2rem 0 2.5rem; color: var(--muted); font-size: .85rem; }
.public-foot a { color: var(--muted); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.auth-main { display: grid; place-items: start center; padding: 1.5rem 16px 3rem; }
@media (min-width: 720px) { .auth-main { place-items: center; } }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card-body { padding: 1.75rem; }
.auth-aside { display: grid; gap: .8rem; margin-top: 1.25rem; padding: 0 .25rem; color: var(--muted); font-size: .88rem; }
.auth-aside div { display: flex; gap: .6rem; align-items: flex-start; }
.auth-aside .icon { color: var(--leaf); margin-top: 2px; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--faint); font-size: .82rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.hero-band { background: radial-gradient(1200px 400px at 10% -10%, var(--mint) 0%, transparent 60%), radial-gradient(800px 300px at 100% 0%, var(--gold-soft) 0%, transparent 60%); }

/* ---------- Giving page ---------- */
.give-body { background: var(--bg); }
.give-hero { position: relative; color: #fff; background: linear-gradient(135deg, var(--forest) 0%, color-mix(in srgb, var(--brand) 75%, var(--forest)) 100%); background-size: cover; background-position: center; }
.give-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 22, 15, .10) 0%, rgba(8, 22, 15, .55) 100%); }
.give-hero:not(.has-image)::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .14) 1px, transparent 0); background-size: 20px 20px; }
.give-hero-inner { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 2.25rem 16px 4.5rem; }
@media (min-width: 900px) { .give-hero-inner { padding: 3.25rem 16px 5rem; } }
.give-hero h1 { color: #fff; margin: 0; font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.7rem); text-shadow: 0 1px 12px rgba(0, 0, 0, .2); }
.give-hero p { margin: .4rem 0 0; color: rgba(255, 255, 255, .88); max-width: 46ch; }
.give-hero .church-id { align-items: flex-end; }
.give-hero .crumb { display: inline-flex; gap: .4rem; align-items: center; font-size: .9rem; font-weight: 650; color: rgba(255, 255, 255, .85); margin-bottom: .6rem; }
.give-wrap { max-width: 1040px; margin: -3rem auto 0; padding: 0 16px 3rem; position: relative; z-index: 2; display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "form" "about"; }
.give-form-col { grid-area: form; }
.give-about { grid-area: about; }
@media (min-width: 900px) {
  .give-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); grid-template-areas: "about form"; align-items: start; gap: 2rem; }
  .give-about { padding-top: 4.25rem; }
  .give-form-col { position: sticky; top: 16px; }
}
.church-id { display: flex; align-items: center; gap: .9rem; }
.church-logo { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; background: #fff; border: 3px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow); flex: none; }
.church-logo-fallback { display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: #fff; background: var(--brand); }
.church-logo-sm { width: 44px; height: 44px; border-radius: 12px; border-width: 2px; font-size: 1.1rem; }
.give-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.give-card-head { padding: 1.25rem 1.4rem .25rem; }
.give-card-body { padding: 1rem 1.4rem 1.4rem; }
.give-section + .give-section { margin-top: 1.25rem; }
.give-card-foot { display: flex; gap: .6rem; align-items: flex-start; margin: 0; padding: .9rem 1.4rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); font-size: .85rem; color: var(--muted); }
.give-card-foot > .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--leaf); }
.give-total { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--line-strong); font-size: .92rem; }
.give-total strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.gift-aid-box { border-radius: var(--radius); border: 1.5px solid color-mix(in srgb, var(--gold) 40%, transparent); background: var(--gold-soft); padding: .95rem 1rem; }
.gift-aid-box .check span { color: var(--gold-ink); font-weight: 650; }
.gift-aid-fields { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.gift-aid-fields[hidden] { display: none; }
.declaration { font-size: .8rem; color: var(--ink-2); line-height: 1.5; background: var(--surface); border-radius: 8px; padding: .7rem .8rem; margin: .75rem 0; border: 1px solid var(--line); }
.cover-box { border-radius: var(--radius); border: 1px solid var(--line); padding: .85rem 1rem; background: var(--surface-2); }
/* Signed-in donors: who they're giving as, and their saved cards */
details.giver { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: .7rem .9rem; }
details.giver > summary { display: flex; gap: .75rem; align-items: center; cursor: pointer; list-style: none; }
details.giver > summary::-webkit-details-marker { display: none; }
details.giver strong { display: block; line-height: 1.3; }
.giver-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
.giver-change { font-size: .82rem; font-weight: 600; color: var(--green); white-space: nowrap; }
details.giver[open] .giver-change { visibility: hidden; }
.gift-aid-on { display: flex; gap: .65rem; align-items: flex-start; color: var(--gold-ink); font-weight: 650; }
.gift-aid-on > .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.gift-aid-on small { display: block; color: var(--muted); font-weight: 400; }
.pay-options { display: grid; gap: .5rem; margin-top: .45rem; }
.pay-option { position: relative; margin: 0; }
.pay-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pay-option > span { display: flex; gap: .8rem; align-items: center; padding: .75rem .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); transition: border-color .15s, background-color .15s; }
.pay-option strong { display: block; font-weight: 650; font-variant-numeric: tabular-nums; }
.pay-option small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.pay-option input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); box-shadow: 0 0 0 1px var(--brand) inset; }
.pay-option input:focus-visible + span { box-shadow: var(--focus); }
.card-mark { display: inline-grid; place-items: center; flex: none; width: 44px; height: 30px; border-radius: 6px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: #3b4a42; }
.card-mark .icon { width: 18px; height: 18px; }
.card-mark-visa { background: #1a1f71; font-style: italic; }
.card-mark-mastercard { background: #252525; }
.card-mark-amex { background: #2e77bc; }
.card-mark-new { background: var(--sunken); color: var(--ink-2); border: 1px dashed var(--line-strong); }
.trust-row { display: flex; gap: .5rem; align-items: center; justify-content: center; font-size: .8rem; color: var(--muted); margin-top: .85rem; text-align: center; }
.trust-row .icon { width: 15px; height: 15px; color: var(--leaf); }
.give-paused { padding: 1.5rem; text-align: center; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.prose { max-width: 62ch; }
.prose p { white-space: pre-line; }
.fund-list { display: grid; gap: .5rem; }
.fund-item { padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.fund-item strong { display: block; }
.appeal-card { overflow: hidden; }
.appeal-card img { width: 100%; height: 160px; object-fit: cover; }
.thanks-hero { text-align: center; padding: 2.5rem 1.25rem 1.5rem; }
.thanks-hero .seal { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--green); }
.thanks-hero .seal .icon { width: 34px; height: 34px; }

/* Embedded (iframe) variant */
.embed-body { background: transparent; }
.embed-body .give-card { box-shadow: none; }
.embed-body.embed-flat .give-card { border: 0; border-radius: 0; background: transparent; }

/* ---------- Charts ---------- */
/* Stacked column chart (Chart::stacked): HTML so labels stay legible on phones */
.ser-1 { --ser: var(--series-1); } .ser-2 { --ser: var(--series-2); } .ser-3 { --ser: var(--series-3); }
.ser-4 { --ser: var(--series-4); } .ser-5 { --ser: var(--series-5); } .ser-other { --ser: var(--series-other); }
.key { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--ser, var(--leaf)); }
.vchart { position: relative; margin: 0; --yaxis: 3rem; }
.vchart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-bottom: 1rem; font-size: .85rem; color: var(--ink-2); }
.vchart-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.vchart-plot { position: relative; height: var(--plot, 200px); margin-top: 1.4rem; }
.vchart-grid span { position: absolute; left: var(--yaxis); right: 0; height: 0; border-top: 1px solid var(--line); }
.vchart-grid span.base { border-top-color: var(--line-strong); }
.vchart-grid em { position: absolute; right: calc(100% + .5rem); top: -.55rem; font-style: normal; font-size: .72rem; line-height: 1.1; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vchart-cols { position: absolute; inset: 0 0 0 var(--yaxis); display: flex; }
.vchart-col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; cursor: default; }
.vchart-col::before { content: ""; position: absolute; inset: -1.4rem 1px 0; border-radius: 6px; }
.vchart-col:focus-visible::before { box-shadow: var(--focus); }
.vchart-stack { width: min(24px, 62%); height: var(--h); display: flex; flex-direction: column-reverse; gap: 2px; transition: opacity .15s; }
.vchart-stack .seg { display: block; min-height: 2px; flex-basis: 0; background: var(--ser); }
.vchart-stack .seg:last-child { border-radius: 4px 4px 0 0; }
.vchart-cols:hover .vchart-col:not(:hover) .vchart-stack, .vchart-cols:focus-within .vchart-col:not(:focus) .vchart-stack { opacity: .45; }
.vchart-cap { position: absolute; bottom: calc(var(--h) + 4px); font-size: .74rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.vchart-empty { position: absolute; inset: 0 0 0 var(--yaxis); display: grid; place-items: center; margin: 0; font-size: .9rem; color: var(--muted); }
.vchart-x { display: flex; margin: .45rem 0 0 var(--yaxis); }
.vchart-x span { flex: 1 1 0; min-width: 0; text-align: center; font-size: .74rem; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.vchart-x small { display: block; font-size: .66rem; color: var(--faint); }
.vchart-tip { position: absolute; z-index: 5; min-width: 150px; max-width: 240px; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); pointer-events: none; font-size: .82rem; }
.vchart-tip-title { color: var(--muted); font-size: .76rem; }
.vchart-tip-total { font-weight: 700; font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: .2rem; }
.vchart-tip-row { display: flex; align-items: center; gap: .45rem; margin-top: .2rem; }
.vchart-tip-row strong { font-variant-numeric: tabular-nums; color: var(--ink); }
.vchart-tip-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-key { display: inline-block; flex: none; width: 12px; height: 3px; border-radius: 2px; background: var(--ser); }
@media (max-width: 520px) { .vchart { --yaxis: 2.5rem; } .vchart-x span { font-size: .68rem; } .vchart-cap { font-size: .66rem; } }
@media (forced-colors: active) { .vchart-stack .seg { forced-color-adjust: none; } }
/* Hero total on the history page */
.hero-total { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 860px) { .hero-total { grid-template-columns: minmax(0, 1fr) auto; } }
.hero-figure { font-size: clamp(2.6rem, 2rem + 2.4vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: .3rem 0 .4rem; color: var(--ink); }
.hero-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.5rem; }
.hero-side > div { min-width: 0; }
.hero-side strong { display: block; font-size: 1.2rem; margin-top: .15rem; }
@media (max-width: 520px) { .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Link-based segmented control (e.g. chart period) */
.segmented a { position: relative; display: block; text-decoration: none; }
.segmented a[aria-current="page"] span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented a:focus-visible span { box-shadow: var(--focus); }
.segmented-sm span { padding: .32rem .8rem; font-size: .82rem; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--leaf); transition: fill .15s; }
.chart .bar.current { fill: var(--green); }
.chart g:hover .bar { fill: var(--forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chart g:hover .bar { fill: var(--sprout); } }
.chart .axis { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .value { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-family: var(--font); opacity: 0; transition: opacity .15s; }
.chart g:hover .value { opacity: 1; }
.meter { display: grid; gap: .65rem; }
.meter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; align-items: center; font-size: .9rem; }
.meter-row .progress { grid-column: 1 / -1; height: 8px; }

/* ---------- Share tools ---------- */
.qr-frame { display: grid; place-items: center; padding: 1rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.qr-frame img, .qr-frame svg { width: 100%; max-width: 220px; height: auto; }
.preview-frame { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem; background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 20px 20px; }
.preview-frame iframe { width: 100%; border: 0; display: block; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--green); border-color: var(--green); }
.tabs a:hover { color: var(--ink); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters select, .filters input { min-height: 38px; width: auto; font-size: .9rem; padding-top: .4rem; padding-bottom: .4rem; }
.filters input[type="search"] { min-width: 200px; flex: 1 1 200px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.25rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }

/* ---------- Install prompt ---------- */
.install-card { display: none; }
.install-card.show { display: flex; }

/* ---------- Print (statements, receipts, posters) ---------- */
.print-body { background: #e9eee7; }
.print-toolbar { display: flex; gap: .5rem; justify-content: center; padding: 1rem; }
.sheet { width: 210mm; min-height: 297mm; margin: 0 auto 2rem; background: #fff; color: #13241b; padding: 18mm 18mm 16mm; box-shadow: var(--shadow); position: relative; }
.sheet h1 { font-size: 26px; }
.sheet .table th { background: #f4f7f2; color: #5b6d61; }
.sheet .table td, .sheet .table th { border-color: #dde6da; }
@media print {
  @page { size: A4; margin: 0; }
  body, .print-body { background: #fff !important; }
  .print-toolbar, .no-print { display: none !important; }
  .sheet { margin: 0; box-shadow: none; width: auto; min-height: auto; }
  .sheet-break { page-break-after: always; }
}
@media (max-width: 820px) { .sheet { width: auto; min-height: 0; padding: 24px 18px; margin: 0 8px 1rem; } }

/* ---------- Giving kit ---------- */
.kit > .card-header { flex-wrap: wrap; }
.kit > .card-header h2 { white-space: nowrap; }
.kit-options { display: grid; gap: 1rem 2rem; align-items: start; }
@media (min-width: 900px) { .kit-options { grid-template-columns: minmax(0, 1fr) auto; } }
.segmented-wrap { display: flex; flex-wrap: wrap; border-radius: 18px; }
.segmented-wrap label { flex: 1 1 auto; }
.segmented-wrap span { padding: .45rem .9rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; }
.kit-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.kit-heading { font-size: 1.05rem; margin-bottom: .75rem; }
.kit-gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.kit-item { margin: 0; display: flex; flex-direction: column; gap: .7rem; padding: .75rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.kit-preview { display: flex; align-items: center; justify-content: center; height: 210px; padding: .6rem; border-radius: var(--radius-sm); background: repeating-conic-gradient(var(--sunken) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; }
.kit-preview canvas { display: block; max-width: 100%; max-height: 186px; width: auto; height: auto; border-radius: 6px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); }
[data-kit]:not([data-kit-ready]) .kit-preview canvas { visibility: hidden; }
.kit-item figcaption strong { display: block; }
.kit-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.kit-print { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.kit-qr-row { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.kit-qr-row .qr-frame { flex: none; }
.kit-words { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.kit-text { white-space: pre-line; color: var(--ink-2); }
.kit-signature { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.kit-signature > .stack { flex: 1 1 260px; }
.kit-sig-preview { padding: .9rem 1.1rem; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); background: #fff; }
.kit-public { padding: 2rem 0 3rem; }
.kit-public .church-logo-sm { width: 56px; height: 56px; }

/* Table card: A4 folded in half, the top face upside down so both sides read correctly when it stands */
.print-help { max-width: 210mm; margin: 0 auto 1rem; padding: 0 16px; text-align: center; font-size: .9rem; color: var(--muted); }
.tent-sheet { width: 210mm; height: 297mm; margin: 0 auto 2rem; background: #fff; color: #13241b; box-shadow: var(--shadow); display: grid; grid-template-rows: 1fr 0 1fr; overflow: hidden; }
.tent-flip { transform: rotate(180deg); display: grid; }
.tent-face { display: grid; grid-template-columns: 1fr 62mm; gap: 8mm; align-items: center; padding: 14mm 16mm; height: 148.5mm; }
.tent-church { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--brand); }
.tent-church .church-logo { width: 40px; height: 40px; border-radius: 10px; border: 2px solid #e6ede3; box-shadow: none; }
.tent-headline { font-family: var(--display); font-size: 40px !important; line-height: 1.05; margin: 6mm 0 3mm; color: #13241b; }
.tent-sub { font-size: 15px; color: #3b4f43; margin: 0 0 4mm; }
.tent-url { font-weight: 700; font-size: 15px; color: var(--brand); margin: 0; overflow-wrap: anywhere; }
.tent-note { font-size: 12px; color: #5b6d61; margin: 2mm 0 0; }
.tent-qr { display: grid; justify-items: center; gap: 3mm; text-align: center; font-size: 12px; color: #3b4f43; }
.tent-qr svg { width: 58mm; height: 58mm; padding: 3mm; border: 1.5px solid #dde6da; border-radius: 5mm; background: #fff; }
.tent-fold { position: relative; border-top: 1px dashed #b9c6b6; }
.tent-fold span { position: absolute; right: 6mm; top: -2.2mm; padding: 0 2mm; background: #fff; font-size: 9px; color: #9aa79c; letter-spacing: .1em; text-transform: uppercase; }
/* QR cards: 10 business cards (85 x 55 mm) on A4 */
.cards-sheet { width: 210mm; height: 297mm; margin: 0 auto 2rem; padding: 11mm 20mm; background: #fff; color: #13241b; box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(2, 85mm); grid-auto-rows: 55mm; justify-content: center; align-content: start; }
.qr-card { display: grid; grid-template-columns: 1fr 34mm; gap: 3mm; align-items: center; padding: 4mm 4.5mm; outline: .2mm dashed #cfd9cc; outline-offset: -.1mm; overflow: hidden; }
.qr-card-copy { display: grid; gap: 1.5mm; min-width: 0; }
.qr-card-church { display: flex; align-items: center; gap: 2mm; font-size: 9.5px; font-weight: 700; color: var(--brand); }
.qr-card-church img { width: 7mm; height: 7mm; border-radius: 1.6mm; object-fit: cover; }
.qr-card-church span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-card-headline { font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.1; color: #13241b; }
.qr-card-scan { font-size: 8px; color: #5b6d61; }
.qr-card-url { font-size: 8.5px; font-weight: 700; color: var(--brand); overflow-wrap: anywhere; line-height: 1.25; }
.qr-card-code { width: 34mm; height: 34mm; }
@media print {
  .tent-sheet, .cards-sheet { margin: 0; box-shadow: none; }
  .print-help { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* On a phone screen, show the whole sheet; printing is unaffected. */
@media screen and (max-width: 820px) { .tent-sheet, .cards-sheet { zoom: .46; } }

/* ---------- Misc ---------- */
.kbd { font-family: ui-monospace, monospace; font-size: .8rem; padding: .1rem .35rem; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.steps li { display: flex; gap: .8rem; align-items: center; padding: .7rem .85rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.steps li.is-done { background: var(--surface-2); }
.steps li.is-done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.step-dot { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: .82rem; font-weight: 700; border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.is-done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.step-dot .icon { width: 15px; height: 15px; }
.setup-card p { margin: .3rem 0 1rem; }
.setup-card { background: linear-gradient(160deg, var(--mint) 0%, var(--surface) 65%); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ticks li { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--ink-2); }
.ticks li > .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--leaf); }
.ticks strong { color: var(--ink); }
details.disclosure { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
details.disclosure > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: "+"; font-weight: 400; color: var(--muted); font-size: 1.2rem; }
details.disclosure[open] > summary::after { content: "–"; }
details.disclosure > .disclosure-body { padding: 0 1rem 1rem; }
.swatch { width: 16px; height: 16px; border-radius: 5px; display: inline-block; vertical-align: middle; border: 1px solid rgba(0,0,0,.1); }
.pill-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.ticker { font-family: var(--display); font-size: 2.6rem; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.seed-pattern { background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--leaf) 18%, transparent) 1px, transparent 0); background-size: 18px 18px; }
.nav-button { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.dot-live { color: var(--sprout); }
.dot-setup { color: var(--wheat); }
[data-on-dark] { color: #fff; --btn-fg: #fff; --btn-bg: rgba(255, 255, 255, .06); --btn-bd: rgba(255, 255, 255, .22); }
[data-on-dark]:hover { --btn-bg: rgba(255, 255, 255, .14); color: #fff; }
@media (max-width: 560px) { .hide-sm { display: none; } }
.paused-icon { margin: 0 auto .75rem; width: 52px; height: 52px; }
.hint-error { color: var(--danger); }
.consent-text { margin: 0; color: var(--ink-2) !important; font-size: .86rem; }
.list-plain > li { padding: .4rem 0; border: 0; align-items: flex-start; gap: .6rem; }
.list-plain > li > .icon { color: var(--leaf); margin-top: 3px; }
.fund-item span { display: block; margin-top: 2px; }
.give-wrap.single { grid-template-areas: "form"; grid-template-columns: minmax(0, 640px); justify-content: center; }
.give-wrap.single .give-form-col { position: static; }
.center-block { margin-left: auto; margin-right: auto; }
.row-center { justify-content: center; }
.full-height { min-height: 100vh; }

/* ---------- A4 giving poster ---------- */
.poster { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20mm 18mm 14mm; }
.poster-top { display: flex; align-items: center; gap: 12px; }
.poster-top .church-logo { width: 54px; height: 54px; border-color: #e6ede3; box-shadow: none; }
.poster-church { font-weight: 700; font-size: 18px; color: var(--brand); }
.poster-headline { font-family: var(--display); font-size: 60px !important; line-height: 1.05; margin: 14mm 0 4mm; color: #13241b; max-width: 15ch; }
.poster-sub { font-size: 19px; color: #3b4f43; max-width: 34ch; margin: 0 0 8mm; }
.poster-qr { width: 92mm; height: 92mm; padding: 6mm; border-radius: 10mm; border: 2px solid #dde6da; background: #fff; }
.poster-qr svg { width: 100%; height: 100%; }
.poster-scan { margin: 6mm 0 1mm; font-size: 17px; color: #3b4f43; }
.poster-url { font-weight: 700; font-size: 20px; color: var(--brand); margin: 0 0 10mm; overflow-wrap: anywhere; }
.poster-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(45mm, 1fr)); gap: 6mm; width: 100%; margin-bottom: auto; }
.poster-points div { background: #f3f6f1; border-radius: 5mm; padding: 5mm 4mm; }
.poster-points strong { display: block; font-size: 16px; color: #13241b; }
.poster-points span { display: block; font-size: 13px; color: #5b6d61; margin-top: 2px; }
.poster-foot { display: flex; align-items: center; gap: 10px; margin-top: 10mm; font-size: 13px; color: #5b6d61; }
.poster-foot .logo-mark { width: 26px; height: 26px; border-radius: 8px; }
@media (max-width: 420px) { .segmented span { font-size: .8rem; padding: .5rem .2rem; } }

/* ---------- Public demo (DEMO_MODE=1) ---------- */
.demo-banner { background: #13241b; color: #e9f3ec; font-size: .86rem; line-height: 1.45; }
.demo-banner-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1.25rem; max-width: 1200px; margin: 0 auto; padding: .55rem 16px; }
.demo-banner p { margin: 0; }
.demo-banner strong { color: #e3c37b; }
.demo-banner .mono { color: #fff; }
.demo-banner-links { display: flex; gap: 1rem; }
.demo-banner a { color: #cfe8d4; font-weight: 600; }
.demo-banner a:hover { color: #fff; }
.demo-paths { display: grid; gap: .75rem; }
.demo-path { display: flex; align-items: center; gap: 1rem; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.demo-path:hover { border-color: var(--green); box-shadow: var(--shadow-sm); color: var(--ink); }
.demo-path > .stack-sm { flex: 1; min-width: 0; }
.demo-path > .icon { color: var(--faint); flex: none; }
.demo-path-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--mint); color: var(--green); }
.demo-test-cards th { width: 45%; font-weight: 600; color: var(--ink-2); }
