:root {
  --brand: #410057;
  --brand-soft: #f4ebf8;
  --ink: #1d1223;
  --muted: #64596b;
  --line: #dbcfe0;
  --line-strong: #b694c4;
  --surface: #ffffff;
  --surface-alt: #faf7fb;
  --danger: #b21e35;
  --success: #177245;
  --shadow: 0 20px 60px rgba(65, 0, 87, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #fcf8fd 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  padding: 32px 16px;
}

.page-shell--status {
  display: flex;
  align-items: center;
  justify-content: center;
}

.donation-card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid rgba(65, 0, 87, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.donation-card--status {
  max-width: 560px;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 18px 0 10px;
  color: var(--brand);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.02;
}

.intro {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.notice,
.status-card,
.checkout-panel {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.form-section + .form-section {
  margin-top: 24px;
}

.section-heading {
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand);
}

.choice-grid,
.amount-grid,
.field-grid {
  display: grid;
  gap: 12px;
}

.amount-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-card,
.amount-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.choice-card {
  position: relative;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-card:has(input:checked),
.amount-button.is-selected,
.amount-button--custom.is-selected,
.amount-button--custom:has(input:focus) {
  border-color: var(--line-strong);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(65, 0, 87, 0.08);
}

.amount-button {
  appearance: none;
  cursor: pointer;
}

.amount-button--custom {
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.currency-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(65, 0, 87, 0.1);
}

.currency-input span {
  font-weight: 800;
  color: var(--brand);
}

.currency-input input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field span {
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(65, 0, 87, 0.08);
}

.checkout-panel {
  padding: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.checkout-panel p {
  margin: 0;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
}

.field-hint,
.status-copy,
.secondary-link {
  color: var(--muted);
}

.field-hint {
  margin: 10px 0 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.form-footer {
  margin-top: 28px;
}

.form-error {
  min-height: 24px;
  margin-bottom: 10px;
  color: var(--danger);
  font-weight: 600;
}

.submit-button {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 17px 20px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.status-card {
  padding: 22px;
}

.status-pill {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
}

.status-card h2 {
  margin: 0 0 10px;
  color: var(--brand);
}

.secondary-link {
  display: inline-block;
  margin-top: 18px;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 720px) {
  .donation-card {
    padding: 22px;
    border-radius: 22px;
  }

  .field-grid,
  .amount-grid {
    grid-template-columns: 1fr;
  }
}
