/* Give form: the full page (give/index.html) and the embed (give/embed.html) share this sheet. Always light.
   Look: Mario's direction 2 (2026-11-18). Paper card with the church-name bar, a Cormorant heading, the amount on an
   orange rule, stone fields, orange chips, checkbox and button. Orange carries ink text, not white: white on #EE7F36
   is 2.7:1, ink is 6:1. */
:root {
  --ink: #1F201D;
  --ink-soft: #48433B;
  --mute: #6B655A;
  --paper: #FFFDF8;
  --stone: #F5F1E9;
  --stone-deep: #ECE5D8;
  --rule: #E1D8C7;
  --accent: #EE7F36;
  --accent-hover: #E2702A;
  --accent-ink: #A44C12;
  --danger: #B42318;
  --display: "Cormorant Garamond", Georgia, serif;
  --bold: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--stone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
body.embed { background: transparent; }

.page { min-height: 100vh; padding: 32px 16px 24px; display: flex; flex-direction: column; align-items: center; }

/* The paper sheet: church-name bar on top, the form card below. */
.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 32, 29, .06), 0 18px 40px -18px rgba(31, 32, 29, .3);
}
body.embed .sheet { margin: 0 auto; box-shadow: none; border: 1px solid var(--rule); }
body.embed .wrap { padding: 1px; }
.gtop {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
  font: 800 14px/1 var(--bold); letter-spacing: .06em; text-transform: uppercase;
}
.gtop img { width: 26px; height: 26px; object-fit: contain; }
a.gtop:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; border-radius: 18px 18px 0 0; }

.card { padding: 18px 22px 18px; }

/* Heading */
.title { font: 600 32px/1.05 var(--display); text-align: center; margin: 2px 0 4px; letter-spacing: -.005em; }
.lede { text-align: center; color: var(--mute); font-size: 13px; margin: 0 0 6px; }

/* Amount on an orange rule */
.amount {
  display: flex; justify-content: center; align-items: flex-start; gap: 3px;
  min-width: 180px; width: max-content; max-width: 100%; margin: 8px auto 18px; padding: 0 10px 6px;
  border-bottom: 2px solid var(--accent);
}
.amount .cur { font: 700 24px/1 var(--bold); margin-top: 11px; }
.amount input {
  border: 0; outline: 0; padding: 0; margin: 0; background: transparent; color: var(--ink);
  font: 900 64px/1.05 var(--bold); letter-spacing: -0.02em;
  width: 1.2ch; min-width: 1ch; max-width: 100%; text-align: left; caret-color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.amount input::placeholder { color: var(--ink); opacity: 1; }
.amount:focus-within { border-radius: 10px 10px 0 0; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: -6px 0 16px; }
.preset { padding: 8px 16px; border-radius: 999px; border: 0; background: var(--stone); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.preset:hover { background: var(--stone-deep); }
.preset:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Fields */
.field { margin: 0 0 12px; }
.field > label, .field > legend, .label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; padding: 0; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .field { margin-bottom: 0; }
.namebox { margin: 0 0 14px; }

select, .text {
  display: block; width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--stone); border: 1px solid var(--stone-deep); border-radius: 10px; outline: 0;
  -webkit-appearance: none; appearance: none;
}
select:hover, .text:hover { border-color: var(--rule); }
select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231F201D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
select:focus-visible, .text:focus-visible { background-color: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(238, 127, 54, .45); }
.text[aria-invalid="true"] { border-color: var(--danger); }

/* Chips: real radios, the label is the pill. Picked = solid orange. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink-soft); background: var(--stone); user-select: none;
}
.chip span:hover { background: var(--stone-deep); }
.chip input:checked + span { background: var(--accent); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.hint { font-size: 13px; color: var(--mute); margin: 6px 0 0; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 2px 0 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

#turnstile:not(:empty) { margin: 0 0 14px; display: flex; justify-content: center; }

/* Buttons: orange, full width, the total on it. */
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 18px;
  border-radius: 12px; border: 0; background: var(--accent); color: var(--ink);
  font: 800 17px/1.1 var(--bold); letter-spacing: .01em; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:disabled:hover { background: var(--accent); }
.btn.light { background: var(--stone); color: var(--ink); font: 600 16px/1.1 var(--body); }
.btn.light:hover { background: var(--stone-deep); }
.btn:focus-visible, .link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.or { display: flex; align-items: center; gap: 12px; margin: 12px 0; color: var(--mute); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.error { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
.error:empty { display: none; }

/* Pay step */
.summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 16px; padding: 0 0 12px; border-bottom: 2px solid var(--accent); }
.summary strong { display: block; font: 900 30px/1.1 var(--bold); letter-spacing: -0.01em; }
.summary span { font-size: 14px; color: var(--mute); }
#payment { margin: 0 0 16px; min-height: 40px; }

/* Thank-you */
.done { text-align: center; padding: 8px 0 4px; }
.done .mark { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.done h1 { font: 600 32px/1.1 var(--display); margin: 0 0 8px; }
.done p { margin: 0 0 16px; color: var(--ink); }

.foot { text-align: center; font-size: 12px; color: var(--mute); margin: 14px 0 0; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 420px) {
  .page { padding: 16px 12px; }
  .card { padding: 16px 16px 14px; }
  .gtop { padding: 12px 16px; font-size: 13px; }
}
@media (max-width: 380px) {
  .row2 { grid-template-columns: 1fr; }
  .row2 .field + .field { margin-top: 12px; }
}
.done h1:focus { outline: none; }
