:root {
  /* Gala palette. --brand-soft is #520102 mixed 50% with white, the same
     relationship the reference form used between its two blues. */
  --brand: #520102;
  --brand-soft: #a88080;
  --border: #e3dbd4;
  --text: #3a3430;
  --muted: #87796f;
  --danger: #ba2b2b;
}

* { box-sizing: border-box; }

body {
  min-width: 0;
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button, input, select { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.donation-page {
  width: 100%;
  margin: 0;
  padding: 0;
}

.donation-card { width: 100%; }
.card-content { margin: 0; padding: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

.frequency-options { display: flex; gap: 26px; margin-bottom: 33px; }
.frequency-options label { display: flex; align-items: center; gap: 3px; cursor: pointer; font-size: 15px; }
.frequency-options input, .checkbox-label input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--brand); }
.frequency-options input { width: 14px; height: 14px; }

.gift-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 34px; }
.amount-options { display: contents; }
.amount-option, .other-amount { min-width: 0; min-height: 50px; }
.amount-option {
  border: 1px solid var(--brand-soft);
  border-radius: 4px;
  background: var(--brand-soft);
  color: #fff;
  cursor: pointer;
  padding: 0 6px;
  font-size: 18px;
  font-weight: 400;
}
.amount-option:hover { filter: brightness(.96); }
.amount-option.is-selected { border-color: var(--brand); background: var(--brand); }
.other-amount { grid-column: span 2; position: relative; }
.currency-input { display: block; height: 50px; }
.currency-input::before { position: absolute; z-index: 1; top: 7px; left: 12px; color: #847f7b; content: '$'; font-size: 25px; }

input:not([type="checkbox"]):not([type="radio"]), select, .stripe-field {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.currency-input input { height: 50px; min-height: 50px; padding: 7px 12px 7px 29px; font-size: 25px; }
input::placeholder { color: #8d857f; opacity: 1; }
input:focus, select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

.contact-section { margin-top: 40px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 20px; }
.field-label { display: grid; gap: 0; color: var(--text); font-size: 15px; line-height: 1.1; }
.field-label small { color: var(--muted); font-size: 13px; }
.field-label input { padding: 6px 9px; }
.phone-input { display: flex; min-width: 0; }
.phone-input select { width: 42px; flex: 0 0 42px; padding: 4px 2px 4px 7px; border-right: 0; border-radius: 4px 0 0 4px; font-size: 16px; }
.phone-input input { border-radius: 0 4px 4px 0; }

.checkbox-label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.contact-section > .checkbox-label { margin-top: 16px; }
.legal-copy { max-width: 825px; margin: -1px 0 0 26px; font-size: 17px; line-height: 1.55; }
.email-checkbox { margin-top: 4px !important; }
.checkbox-label span { line-height: 18px; }

.payment-section { margin-top: 38px; }
.payment-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; }
.stripe-field { display: block; min-height: 38px; padding: 8px 9px; }
.stripe-field.StripeElement--focus { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.stripe-field.StripeElement--invalid { border-color: var(--danger); }
/* .field-label sets display:grid, which outranks the user-agent rule for
   [hidden]; without this the empty CVC box shows before Stripe mounts it. */
.field-label[hidden] { display: none; }
.cvc-field { width: min(212px, 100%); margin-top: 12px; }
.form-status { min-height: 0; margin: 14px 0 0; color: var(--danger); font-size: 14px; }
.form-status:empty { display: none; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 29px; }
.submit-button {
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.submit-button:hover:not(:disabled) { filter: brightness(1.25); }
.submit-button:disabled { cursor: wait; opacity: .72; }
.security-note { margin: 23px 0 0; text-align: right; font-size: 15px; }

.success-panel { padding: 80px 0; text-align: center; }
.success-panel h2 { margin: 0 0 12px; font-size: 22px; font-weight: 400; }
.success-panel p { margin: 0; color: var(--muted); }

@media (max-width: 700px) {
  .donation-page { width: min(100% - 32px, 560px); padding-top: 24px; }
  .donation-card { width: 100%; }
  .gift-grid { gap: 12px; }
  .amount-option { font-size: 15px; }
  .legal-copy { font-size: 15px; }
}

@media (max-width: 480px) {
  .frequency-options { margin-bottom: 24px; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other-amount { grid-column: span 2; }
  .contact-grid, .payment-grid { grid-template-columns: 1fr; }
  .legal-copy { margin-left: 0; }
  .form-actions, .security-note { justify-content: stretch; text-align: left; }
  .submit-button { width: 100%; }
}
