/* YRSRH public giving page — donor-facing campaign shell (spec 14 Â§5.5).
   Conversion layout (UX v2 P0): no navigation chrome, one sticky CTA, minimal
   footer. Token block shared with the portal/office shells: Breuer's black-and-gold: old gold for school, brass/gold for development dollars. Light + dark. System fonts only
   (no webfont CDN — CSP/offline). Demo-quality; the R2 build ships the DS. */

:root {
  color-scheme: light dark;
  --ink: #251e11;
  --muted: #6e654e;
  --faint: #978c6d;
  --paper: #f6f2e7;
  --card: #fffdf6;
  --card-2: #f8f4e8;
  --line: #e3dcc7;
  --hairline: #ece5d2;

  /* old gold — the Breuer's brand primary */
  --brand: #7a5a16;
  --brand-strong: #5e4510;
  --brand-soft: #f0e6c8;
  --brand-ink: #6f5312;

  /* gold — DEVELOPMENT / fundraising (kept in the same family) */
  --gold: #96731f;
  --gold-strong: #74570f;
  --gold-soft: #f3ecd8;
  --gold-ink: #6f5312;

  --ok: #1f7a4d;
  --ok-soft: #e0f0e7;
  --danger: #a63232;
  --danger-soft: #f6e2e2;

  --shadow: 0 1px 2px rgba(40, 32, 16, 0.05), 0 6px 20px rgba(40, 32, 16, 0.05);
  --on-brand: #fffdf4;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1ead7;
    --muted: #b7ab8a;
    --faint: #8d8264;
    --paper: #14110a;
    --card: #1e1910;
    --card-2: #241e12;
    --line: #3a311c;
    --hairline: #2e2715;

    --brand: #d9b263;
    --brand-strong: #e6c67e;
    --brand-soft: #382d15;
    --brand-ink: #e6cd8f;

    --gold: #cfa452;
    --gold-strong: #e0bd76;
    --gold-soft: #2b2413;
    --gold-ink: #e2c07c;
    --on-brand: #1b150a;

    --ok: #57c98d;
    --ok-soft: #14301f;
    --danger: #e08585;
    --danger-soft: #331a1a;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans Hebrew", sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 0.9rem; }
.faint { color: var(--faint); font-size: 0.8rem; }
.error { color: var(--danger); font-size: 0.9rem; }
.loading { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 2rem 0; }

/* ------------------------------------------------------------- masthead ----
   A quiet identity strip, NOT a navbar: non-clickable mark + name, nothing
   else (Â§5.5 P0 "no global navigation"). */
.masthead {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.7rem 1rem 0.55rem;
}
.masthead img { display: block; }
.masthead-name {
  font-size: 0.86rem; letter-spacing: 0.05em; color: var(--muted);
  text-transform: uppercase; font-weight: 600;
}

/* ---------------------------------------------------------------- layout --- */
main { flex: 1; width: min(680px, 100% - 1.6rem); margin: 0 auto 1.6rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

h1, h2 {
  margin: 0 0 0.45rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}
h2 { font-size: 1.12rem; }

/* -------------------------------------------------------------------- hero -- */
.hero { text-align: center; padding: 1.5rem 1.25rem 1.35rem; }
.hero .campaign-title { font-size: 1.7rem; line-height: 1.15; margin-bottom: 0.2rem; }
.hero .campaign-title-he {
  font-size: 1.25rem; margin: 0 0 0.3rem;
  font-family: "Iowan Old Style", "Noto Serif Hebrew", Palatino, Georgia, serif;
}
.hero .lede { color: var(--muted); font-size: 0.95rem; margin: 0.3rem 0 0; }

.pill {
  display: inline-block; padding: 0.14rem 0.65rem; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-ink); font-size: 0.76rem;
  font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
}
.pill.live::before {
  content: ""; display: inline-block; width: 0.45rem; height: 0.45rem;
  border-radius: 50%; background: currentColor; margin-inline-end: 0.35rem;
  vertical-align: middle;
}
.pill.ended { background: var(--brand-soft); color: var(--brand-ink); }

/* countdown */
.countdown {
  display: flex; justify-content: center; gap: 0.55rem; margin-top: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.countdown .unit {
  min-width: 3.4rem; padding: 0.45rem 0.3rem 0.4rem; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line);
}
.countdown .unit b {
  display: block; font-size: 1.35rem; line-height: 1.05;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
}
.countdown .unit span {
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
/* PU-5 — the calm pre-final-72h face of the countdown host: one quiet line */
.countdown .ends-line {
  margin: 0; font-size: 0.95rem; color: var(--muted); font-weight: 600;
}

/* ------------------------------------------------------------ thermometer -- */
.thermo-track {
  position: relative; height: 1.7rem; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line); overflow: hidden;
  margin-top: 0.7rem;
}
.thermo-fill {
  height: 100%; border-radius: 999px; min-width: 0.4rem;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-strong) 100%);
  transition: width 0.6s ease;
}
.thermo-labels {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.6rem; margin-top: 0.45rem; font-size: 0.86rem; color: var(--muted);
  font-variant-numeric: tabular-nums; flex-wrap: wrap;
}
.thermo-labels .raised {
  font-size: 1.25rem; color: var(--gold-ink); font-weight: 700;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
}
.match-story {
  margin-top: 0.75rem; padding: 0.7rem 0.85rem; border-radius: 10px;
  background: var(--gold-soft); color: var(--gold-ink); font-size: 0.92rem;
}
.match-story b { font-variant-numeric: tabular-nums; }
.stat-row { display: flex; gap: 1.2rem; margin-top: 0.6rem; flex-wrap: wrap; }
.stat-row .stat { font-size: 0.84rem; color: var(--muted); }
.stat-row .stat b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- give form --- */
.amount-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.2rem; }
button.chip {
  background: var(--card); color: var(--ink); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 0.6rem 1rem; font-size: 1.02rem; cursor: pointer;
  font-family: inherit; font-weight: 600; font-variant-numeric: tabular-nums;
  flex: 1 1 auto; min-width: 5.2rem;
}
button.chip[aria-pressed="true"] {
  background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink);
}
button.chip .becomes { display: block; font-size: 0.7rem; font-weight: 500; color: var(--muted); }
button.chip[aria-pressed="true"] .becomes { color: var(--gold-ink); }

.field { display: block; margin: 0.75rem 0; font-size: 0.88rem; }
.field > span { display: block; margin-bottom: 0.25rem; color: var(--muted); font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 0.6rem 0.65rem; border: 1px solid var(--line);
  border-radius: 9px; background: var(--card); color: var(--ink);
  font-size: 1rem; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 3.6rem; }
.field input[type="number"] { font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; margin: 0.7rem 0; }
.check input { width: auto; }

.impact-line { font-size: 0.9rem; color: var(--gold-ink); margin: 0.5rem 0 0; font-weight: 600; }

/* THE single CTA — sticky at the viewport bottom while the form is on screen
   (Â§5.5 P0 "single sticky CTA"); no other calls to action exist on the page. */
.cta-bar {
  position: sticky; bottom: 0; padding: 0.7rem 0 0.85rem; margin-top: 0.4rem;
  background: linear-gradient(180deg, transparent 0%, var(--card) 34%);
}
button.cta {
  width: 100%; border: 0; border-radius: 12px; cursor: pointer;
  padding: 0.85rem 1.2rem; font-size: 1.08rem; font-weight: 700;
  font-family: inherit; color: var(--on-brand);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-strong) 100%);
  box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}
button.cta:disabled { opacity: 0.55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
}

.wallet-note { font-size: 0.78rem; color: var(--faint); text-align: center; margin: 0.15rem 0 0; }

/* "How giving works" — a quiet reassurance link + 3-step overlay (no chrome) */
button.how-link {
  background: none; border: 0; padding: 0; margin-inline-start: 0.3rem;
  font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer;
}
dialog.how-dialog {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem 1.25rem; width: min(92vw, 26rem);
}
dialog.how-dialog::backdrop { background: rgba(10, 15, 30, 0.55); }
.how-head { display: flex; align-items: center; justify-content: space-between; }
.how-head h2 { margin: 0; font-size: 1.15rem; }
button.how-close {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 1.5rem; line-height: 1; padding: 0.1rem 0.3rem;
}
.how-steps { margin: 0.8rem 0 1rem; padding-inline-start: 1.2rem; }
.how-steps li { margin: 0.55rem 0; line-height: 1.5; font-size: 0.95rem; }
button.how-cta { width: 100%; }

.form-msg { margin: 0.6rem 0 0; font-size: 0.9rem; }
.form-msg.error { color: var(--danger); }

/* confirmation */
.confirm {
  border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line));
  background: var(--ok-soft); border-radius: 12px; padding: 1rem 1.1rem;
  margin-top: 0.6rem;
}
.confirm h2 { color: var(--ok); margin-bottom: 0.3rem; }
.confirm .stub-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }

/* Test mode (audit §12.5): the processor cannot settle funds here, so the
   page says so BEFORE the amount chips — quiet, never alarming. Nothing is
   broken; the school is mid-setup. */
#give-testmode .stub-note {
  margin: 0.6rem 0 0; padding: 0.7rem 0.9rem; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 0.85rem; line-height: 1.45;
}

.ended-note {
  margin-top: 0.6rem; padding: 0.8rem 0.95rem; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 0.95rem;
  font-weight: 600;
}

/* ------------------------------------------------------- ticker + wall ----- */
.ticker-list, .wall-list { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.ticker-list li, .wall-list li {
  display: flex; justify-content: space-between; gap: 0.8rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--hairline);
  font-size: 0.92rem; align-items: baseline;
}
.ticker-list li:last-child, .wall-list li:last-child { border-bottom: 0; }
.wall-who { min-width: 0; }
.wall-name { font-weight: 600; }
.wall-msg { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 0.1rem; }
.wall-amt {
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-ink);
  white-space: nowrap;
}
button.more {
  margin-top: 0.7rem; width: 100%; background: var(--card-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; padding: 0.5rem;
  font-size: 0.9rem; cursor: pointer; font-family: inherit;
}

/* --------------------------------------------------------------- footer ---- */
.legal {
  text-align: center; padding: 1.1rem 1rem 1.4rem; color: var(--faint);
  font-size: 0.78rem;
}
.legal a { color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 480px) {
  .card { padding: 0.95rem 1rem; }
  .hero .campaign-title { font-size: 1.45rem; }
  .countdown .unit { min-width: 3rem; }
  .masthead-name { font-size: 0.72rem; }
}

/* ---- W3.8 Zelle / offline giving ---------------------------------------- */
.zelle-box {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.6rem 0.75rem; margin: 0.5rem 0 0.2rem;
  border: 1px dashed var(--line, #d9d2c0); border-radius: 10px;
  background: var(--brand-soft, #f7f1e3);
}
.zelle-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted);
}
.zelle-address { font-weight: 700; font-size: 1.05rem; word-break: break-all; flex: 1; }
button.copy-btn {
  border: 1px solid var(--line, #d9d2c0); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 0.3rem 0.7rem; font-size: 0.82rem; cursor: pointer;
}
button.copy-btn:hover { background: var(--brand-soft, #f7f1e3); }
fieldset.dedication {
  border: 1px solid var(--line, #e5dfcf); border-radius: 10px;
  padding: 0.6rem 0.8rem 0.2rem; margin: 0.8rem 0 0.2rem;
}
fieldset.dedication legend { font-size: 0.82rem; font-weight: 600; color: var(--muted); padding: 0 0.3rem; }
.dedication-kind { display: flex; gap: 0.9rem; flex-wrap: wrap; margin: 0.2rem 0; }
.dedication-kind .check { margin: 0.2rem 0; }
.zelle-steps { margin: 0.8rem 0 0.4rem; }
.zelle-instructions { font-size: 0.9rem; color: var(--muted); margin: 0.6rem 0 0; white-space: pre-line; }
