/* Giving Store prototype. Colours are placeholders until visual identity (#5) is decided. */
:root {
  --bg: #f6f4f9;
  --surface: #ffffff;
  --surface-2: #f1edf7;
  --text: #1d1a24;
  --muted: #5f5a6b;
  --line: #e2dcea;
  --accent: #5a2d82;
  --accent-ink: #ffffff;
  --accent-soft: #ece3f5;
  --accent-2: #b68ad8;
  --gold: #c8922b;
  --gold-soft: #fbf1dc;
  --ok: #1f7a4d;
  --ok-soft: #e2f3ea;
  --err: #b3261e;
  --err-soft: #fbe7e5;
  --shadow: 0 1px 2px rgba(30, 20, 50, .06), 0 6px 20px rgba(30, 20, 50, .06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15121b; --surface: #1f1b27; --surface-2: #29233450; --text: #f0ecf6; --muted: #b0a8be;
    --line: #3a3346; --accent: #b98be6; --accent-ink: #1a1222; --accent-soft: #33264a; --accent-2: #6f4b96;
    --gold: #e0b55e; --gold-soft: #3a2f1a; --ok: #6cd3a0; --ok-soft: #1d3a2c; --err: #ff8f86; --err-soft: #43201e;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15121b; --surface: #1f1b27; --surface-2: #29233450; --text: #f0ecf6; --muted: #b0a8be;
  --line: #3a3346; --accent: #b98be6; --accent-ink: #1a1222; --accent-soft: #33264a; --accent-2: #6f4b96;
  --gold: #e0b55e; --gold-soft: #3a2f1a; --ok: #6cd3a0; --ok-soft: #1d3a2c; --err: #ff8f86; --err-soft: #43201e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.test-banner {
  background: var(--gold-soft); color: var(--text); text-align: center;
  font-size: 13px; padding: 6px 16px; border-bottom: 1px solid var(--line);
}

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 18px;
}
.brand-text { font-size: 15px; }

/* Campaign */
.campaign { background: linear-gradient(160deg, var(--accent) 0%, #3b1a5a 100%); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .campaign { background: linear-gradient(160deg, #3d2459, #1e1229); } }
.campaign .wrap { padding-top: 28px; padding-bottom: 28px; }
.campaign.compact .wrap { padding-top: 12px; padding-bottom: 12px; }
.campaign .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; opacity: .8; margin: 0 0 6px; }
.campaign h1 { font-size: clamp(22px, 5vw, 32px); }
.campaign .desc { opacity: .9; margin: 0 0 18px; max-width: 56ch; }
.figures { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.figures .raised { font-size: clamp(28px, 7vw, 40px); font-weight: 700; letter-spacing: -.01em; }
.figures .goal { opacity: .85; }
.bar { position: relative; height: 12px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.bar span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; }
.bar .b-raised { background: #fff; z-index: 2; }
.bar .b-pledged { background: rgba(255,255,255,.45); z-index: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; opacity: .9; margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.match-callout {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.12);
  display: flex; gap: 10px; align-items: flex-start; font-size: 14px;
}
.match-callout .star { color: var(--gold); font-size: 18px; line-height: 1.2; }
.compact-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.compact-row .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-row .bar { flex: 0 0 30%; height: 8px; }

/* Wizard */
.wizard {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  margin: 20px 0; padding: 22px 20px 20px; border: 1px solid var(--line);
}
@media (min-width: 640px) { .wizard { padding: 30px 32px 26px; margin: 28px 0; } }
.steps { display: flex; gap: 4px; margin-bottom: 8px; }
.steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.steps span.on { background: var(--accent); }
.step-label { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.wizard h2 { font-size: clamp(21px, 4.6vw, 26px); }
.lead { color: var(--muted); margin: 0 0 18px; }

.choices { display: grid; gap: 12px; }
@media (min-width: 640px) { .choices.two { grid-template-columns: 1fr 1fr; } .choices.three { grid-template-columns: repeat(3, 1fr); } }
.choice {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 16px;
  transition: border-color .15s, background .15s, transform .05s;
}
.choice:hover { border-color: var(--accent-2); }
.choice:active { transform: scale(.995); }
.choice:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.choice .icon { font-size: 26px; line-height: 1; margin-bottom: 8px; display: block; }
.choice .title { font-weight: 650; display: block; }
.choice .sub { color: var(--muted); font-size: 14px; display: block; margin-top: 2px; }
.choice.big { padding: 22px 18px; }
.choice.big .title { font-size: 19px; }
.chip {
  display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; margin: 6px 6px 0 0;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.chip.gold { background: var(--gold-soft); border-color: transparent; color: var(--text); }

/* Ministry picker */
.search { position: relative; margin-bottom: 14px; }
.search input { padding-left: 40px; }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); font-size: 20px; color: var(--muted); }
.group-label { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 16px 0 8px; }
.list { display: grid; gap: 8px; }
.list .choice { padding: 12px 14px; }
@media (min-width: 640px) { .list.national { grid-template-columns: 1fr 1fr; } }
.empty { color: var(--muted); padding: 12px 0; }

/* Ministry note */
.ministry-note {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
}
.ministry-note h3 { font-size: 17px; margin-bottom: 2px; }
.ministry-note .where { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.ministry-note p:last-child { margin-bottom: 0; }
.closure {
  margin-top: 10px; font-size: 13.5px; color: var(--muted); border-left: 3px solid var(--gold); padding: 2px 0 2px 10px;
}
.closure strong { color: var(--text); }

/* Forms */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.req::after { content: " *"; color: var(--err); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.invalid { border-color: var(--err) !important; }
.row { display: grid; gap: 0 12px; }
@media (min-width: 560px) { .row.two { grid-template-columns: 1fr 1fr; } .row.addr { grid-template-columns: 2fr 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { display: flex; gap: 8px; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-weight: 500; }
.radio-row input { accent-color: var(--accent); }
.radio-row label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
@media (min-width: 560px) { .amounts { grid-template-columns: repeat(6, 1fr); } }
.amt {
  font: inherit; font-weight: 600; padding: 12px 0; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
}
.amt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money input { padding-left: 26px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.seg button { font: inherit; border: 0; padding: 9px 16px; background: var(--surface); color: var(--text); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.panel { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.panel.gold { background: var(--gold-soft); border-color: transparent; }
.panel.ok { background: var(--ok-soft); border-color: transparent; }
.panel.warn { background: var(--err-soft); border-color: transparent; }
.panel p { margin: 0 0 6px; } .panel p:last-child { margin: 0; }
.subtle { color: var(--muted); font-size: 14px; }
.errors { background: var(--err-soft); color: var(--err); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

/* Review */
.summary { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.summary .srow { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.summary .srow:first-child { border-top: 0; }
.summary dt { flex: 0 0 34%; color: var(--muted); font-size: 14px; }
.summary dd { margin: 0; flex: 1; }
.summary .edit { background: none; border: 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.total-line { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; padding: 6px 2px 14px; }

/* Nav */
.nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 22px; }
.btn {
  font: inherit; font-weight: 650; border-radius: 12px; padding: 13px 22px; cursor: pointer; border: 1.5px solid transparent;
  min-height: 48px;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.nav .btn.primary { margin-left: auto; }
@media (max-width: 559px) {
  .nav.sticky {
    position: sticky; bottom: 0; margin: 22px -20px -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  }
  .nav .btn.primary { flex: 1; }
}

/* Done */
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 30px; margin-bottom: 12px; }
details.record { margin-top: 18px; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
details.record summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.record pre { overflow-x: auto; font-size: 12px; line-height: 1.45; background: var(--surface-2); padding: 12px; border-radius: 8px; margin: 10px 0 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Modal (simulated checkout) */
.modal { position: fixed; inset: 0; background: rgba(15, 10, 25, .55); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal[hidden] { display: none; }
.modal-card { background: var(--surface); color: var(--text); border-radius: 16px; max-width: 420px; width: 100%; padding: 22px; box-shadow: var(--shadow); }
.modal-card .fake-stripe { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 14px 0; background: var(--surface-2); font-size: 14px; }

.site-footer { color: var(--muted); font-size: 13px; padding-bottom: 40px; }
.loading { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.match-callout .bar.thin { height: 6px; margin-top: 10px; max-width: 320px; }
.match-figures { font-size: 13px; opacity: .85; margin-top: 4px; }
.chosen { border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.chosen .title { display: block; font-weight: 650; font-size: 18px; }
.chosen .sub { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.linklike { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.more { margin: 8px 2px 0; }
details.browse { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
details.browse summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.search input[type=search] { padding-left: 40px; }
.list.national { grid-template-columns: 1fr 1fr; }

/* Transfer letter */
.letter { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 8px; padding: 22px; margin-top: 10px; font: 15px/1.55 Georgia, "Times New Roman", serif; }
.letter p { margin: 0 0 12px; }
.letter .indent { padding-left: 24px; }
.letter .blank { display: inline-block; min-width: 200px; border-bottom: 1px solid #555; height: 1.1em; color: #888; font-size: 12px; }
.letter .blank.wide { min-width: 240px; }
.letter .sigs { display: flex; flex-wrap: wrap; gap: 24px; margin: 28px 0 10px; }
.letter .sigs div { flex: 1 1 220px; font-size: 13px; }
.letter .line { display: block; border-bottom: 1px solid #333; height: 34px; margin-bottom: 4px; }
.letter-test { font: 12px/1.4 system-ui, sans-serif; color: #8a5a00; background: #fbf1dc; padding: 6px 8px; border-radius: 6px; }
@media print {
  body.print-letter * { visibility: hidden; }
  body.print-letter #letter, body.print-letter #letter * { visibility: visible; }
  body.print-letter #letter { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
  body.print-letter details.record { display: block; }
}

/* Split gifts */
.lines { display: grid; gap: 8px; margin-bottom: 6px; }
.line-row { display: grid; grid-template-columns: 1fr 120px auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.line-name { min-width: 0; }
.line-name strong { display: block; font-size: 15px; }
.line-name .sub { display: block; color: var(--muted); font-size: 13px; }
.line-amt input { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 420px) { .line-row { grid-template-columns: 1fr 100px; } .line-row .linklike { grid-column: 1 / -1; justify-self: start; } }
.chosen.slim { padding: 10px 14px; margin-bottom: 14px; }
.chosen.slim .title { font-size: 16px; }
.add-line { width: 100%; margin: 2px 0 4px; border-style: dashed; }
.add-line + .subtle { margin: 0 0 12px; font-size: 13px; }
.pay-list { margin: 6px 0; padding-left: 20px; }
.line-item { padding: 2px 0 8px; }
.line-item .chip { margin-top: 2px; }

/* d/b/a footnote marker and note */
sup.fn { font-size: 0.7em; margin-left: 1px; color: var(--muted); }
.chip sup.fn { color: inherit; }
.dba-note { font-size: 12px; }

/* "About NLCM" under the d/b/a footnote */
.about-org { font-size: 13px; margin: 4px 0 12px; }
.about-org summary { cursor: pointer; color: var(--accent, #4b2e83); text-decoration: underline; width: fit-content; }
.about-org p { margin: 8px 0 0; max-width: 60ch; }

.about-row { display: flex; flex-wrap: wrap; gap: 0 24px; }
.about-row .about-org { flex: 1 1 100%; }
.about-row .about-org:not([open]) { flex: 0 0 auto; }

/* A link that opens the store part-way through: what it filled in */
.landing { margin: 4px 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.landing-lead { margin: 0 0 10px; }
