:root {
  --danger: #b3261e;
}

.give-hero {
  padding: 4rem 0 3rem;
  background:
    radial-gradient(760px 420px at 88% 20%, rgba(6, 42, 87, 0.08), transparent 70%),
    radial-gradient(520px 320px at 2% 100%, rgba(217, 160, 58, 0.12), transparent 70%),
    var(--white);
}

.give-hero .container::before {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin-bottom: 1.75rem;
  background: var(--gold-line);
}

.give-hero h1 {
  font-size: clamp(2.8rem, 5.6vw, 4.4rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.1rem;
}

.give-hero p {
  max-width: 36rem;
  margin: 0;
  font-size: 1.2rem;
  color: var(--muted);
}

.give {
  padding: 3rem 0 6.5rem;
  background: var(--mist);
}

.give-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}

.wizard {
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 1rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 34px 60px -34px rgba(3, 27, 59, 0.3);
}

.wizard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-line);
}

.stepper {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 1.75rem 2rem 1.1rem;
  gap: 0.5rem;
}

.stepper-item {
  flex: 1;
}

.stepper-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.stepper-btn:disabled {
  cursor: default;
}

.stepper-num {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-size: 0.95rem;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.stepper-item.is-done .stepper-num {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  font-size: 0;
}

.stepper-item.is-done .stepper-num::before {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.stepper-item.is-current .stepper-num {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(217, 160, 58, 0.28);
}

.stepper-item.is-current .stepper-btn,
.stepper-item.is-done .stepper-btn {
  color: var(--navy);
}

.stepper-item.is-done .stepper-btn:hover .stepper-label {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stepper-bar {
  height: 3px;
  margin: 0 2rem;
  border-radius: 3px;
  background: var(--mist-deep);
  overflow: hidden;
}

.stepper-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: var(--gold-line);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.step {
  padding: 2.25rem 2rem 0.5rem;
}

.step[hidden] {
  display: none;
}

.step.is-entering {
  animation: step-in 0.45s var(--ease);
}

.step.is-entering.is-back {
  animation-name: step-in-back;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}

@keyframes step-in-back {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
}

.step h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.9rem, 3.4vw, 2.4rem);
}

.step h2:focus {
  outline: none;
}

.step-help {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

.step-note {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.choice,
.amount {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice input,
.amount input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 100%;
  padding: 1rem 2.8rem 1rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.3s var(--ease);
}

.choice:hover .choice-card {
  border-color: var(--royal);
  transform: translateY(-2px);
}

.choice input:checked + .choice-card {
  border-color: var(--navy);
  background: var(--mist);
  box-shadow: 0 0 0 1px var(--navy);
}

.choice input:focus-visible + .choice-card,
.amount input:focus-visible + span {
  outline: 3px solid var(--royal);
  outline-offset: 3px;
}

.choice-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid transparent;
  border-radius: 50%;
  background: var(--mist);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.choice input:checked + .choice-card .choice-icon {
  border-color: var(--gold);
  background: var(--white);
}

.choice-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-text {
  display: grid;
  gap: 0.1rem;
  line-height: 1.3;
}

.choice-text strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}

.choice-text small {
  font-size: 0.88rem;
  color: var(--muted);
}

.choice-check {
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease);
}

.choice input:checked + .choice-card .choice-check {
  border-color: var(--navy);
  background: var(--navy);
  transform: scale(1.08);
}

.choice input:checked + .choice-card .choice-check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.amount span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.05rem 0.5rem;
  white-space: nowrap;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  text-align: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease);
}

.amount:hover span {
  border-color: var(--royal);
  transform: translateY(-2px);
}

.amount input:checked + span {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.other-field {
  margin-top: 1.25rem;
  animation: step-in 0.35s var(--ease);
}

.other-field[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.field label,
.field .label {
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--navy);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.input-prefix input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(6, 42, 87, 0.28);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.field input:focus,
.field textarea:focus,
.input-prefix:focus-within {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(27, 74, 140, 0.18);
}

.field [aria-invalid="true"],
.input-prefix.is-invalid {
  border-color: var(--danger);
}

.input-prefix {
  display: flex;
  align-items: stretch;
  border: 1.5px solid rgba(6, 42, 87, 0.28);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-prefix span {
  display: grid;
  place-items: center;
  padding: 0 1rem;
  background: var(--mist);
  font-weight: 500;
  color: var(--navy);
}

.field .input-prefix input[type="text"] {
  border: 0;
  border-radius: 0;
  font-size: 1.25rem;
  box-shadow: none;
}

.field .input-prefix input[type="text"]:focus {
  outline: none;
  box-shadow: none;
}

.field small,
.counter {
  font-size: 0.88rem;
  color: var(--muted);
}

.counter {
  text-align: right;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem 1rem;
}

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

.field-error {
  min-height: 0;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

.step > .field-error {
  margin-top: 1rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.25rem;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0.2rem 0 0;
  accent-color: var(--navy);
}

.review {
  margin: 0 0 0.5rem;
  border-top: 1px solid var(--line);
}

.review-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.review-row[hidden] {
  display: none;
}

.review dt {
  font-size: 0.92rem;
  color: var(--muted);
}

.review dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

.link-btn {
  padding: 0.2rem 0.3rem;
  border: 0;
  background: none;
  color: var(--royal);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.secure {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  background: var(--mist);
  font-size: 0.92rem;
  color: var(--muted);
}

.secure svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-alert {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(179, 38, 30, 0.35);
  border-radius: 10px;
  background: #fdf1f0;
  font-size: 0.95rem;
  color: #7d1913;
}

.form-alert[hidden] {
  display: none;
}

.form-alert.is-info {
  border-color: var(--line);
  background: var(--mist);
  color: var(--navy);
}

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 2rem 2rem;
}

.wizard-nav [hidden] {
  display: none;
}

.wizard-nav .btn {
  min-width: 8.5rem;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}

.wizard-nav [data-next],
.wizard-nav [data-pay] {
  margin-left: auto;
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.btn.is-loading::before {
  -webkit-mask: none;
  mask: none;
  width: 14px;
  height: 14px;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.success {
  padding: 3.5rem 2rem 3rem;
  text-align: center;
}

.tick {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.5rem;
}

.tick circle {
  fill: var(--mist);
  stroke: var(--gold);
  stroke-width: 2;
}

.tick path {
  fill: none;
  stroke: var(--navy);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 0;
  animation: draw 0.6s 0.25s var(--ease) both;
}

@keyframes draw {
  from {
    stroke-dashoffset: 50;
  }
}

.success h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.success h2:focus {
  outline: none;
}

.success p {
  max-width: 30rem;
  margin: 0 auto 0.9rem;
  font-size: 1.1rem;
}

.success .ref {
  font-size: 0.95rem;
  color: var(--muted);
}

.success code {
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--mist);
  font-size: 0.95rem;
  color: var(--navy);
}

.success .actions {
  justify-content: center;
  margin-top: 1.75rem;
}

.success[hidden] {
  display: none;
}

.gift-summary {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  padding: 2rem 1.75rem;
  border-radius: 14px;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(27, 74, 140, 0.5), transparent 70%),
    var(--navy-deep);
  color: var(--white);
}

.gift-summary::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-bottom: 1.5rem;
  background: var(--gold-line);
}

.gift-summary :focus-visible {
  outline-color: var(--gold-light);
}

.sum-label {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.sum-amount {
  margin: 0;
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sum-programme {
  margin: 0.9rem 0 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

.sum-programme.is-empty,
.sum-amount.is-empty {
  color: rgba(255, 255, 255, 0.45);
}

.sum-donor {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.sum-donor[hidden] {
  display: none;
}

.sum-trust {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 0.7rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.86);
}

.sum-trust li {
  position: relative;
  padding-left: 1.6rem;
}

.sum-trust li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.35rem;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--gold-light);
  border-bottom: 2px solid var(--gold-light);
  transform: rotate(45deg);
}

.sum-help {
  margin: 1.5rem 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.sum-help a {
  color: var(--white);
  text-underline-offset: 3px;
}

@media (max-width: 960px) {
  .give-grid {
    grid-template-columns: 1fr;
  }

  .gift-summary {
    position: static;
    order: -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.25rem 1rem;
    padding: 1.1rem 1.4rem;
  }

  .gift-summary::before,
  .sum-label,
  .sum-donor,
  .sum-trust,
  .sum-help {
    display: none;
  }

  .sum-amount {
    grid-column: 2;
    grid-row: 1;
    font-size: 2rem;
  }

  .sum-programme {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }
}

@media (max-width: 600px) {
  .give-hero {
    padding: 3rem 0 2rem;
  }

  .give {
    padding: 1.5rem 0 4.5rem;
  }

  .stepper {
    padding: 1.4rem 1.25rem 1rem;
    gap: 0.4rem;
  }

  .stepper-item:not(.is-current) .stepper-label {
    display: none;
  }

  .stepper-item:not(.is-current) {
    flex: 0 0 auto;
  }

  .stepper-item.is-current {
    flex: 1;
  }

  .stepper-bar {
    margin: 0 1.25rem;
  }

  .step {
    padding: 1.75rem 1.25rem 0.25rem;
  }

  .choices,
  .fields {
    grid-template-columns: 1fr;
  }

  .amounts {
    gap: 0.6rem;
  }

  .amount span {
    padding: 1rem 0.25rem;
    font-size: 1.1rem;
  }

  .review-row {
    grid-template-columns: 1fr auto;
    gap: 0.15rem 1rem;
  }

  .review dt {
    grid-column: 1 / -1;
  }

  .wizard-nav {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .wizard-nav .btn {
    min-width: 0;
    flex: 1;
  }

  .success {
    padding: 2.5rem 1.25rem 2.25rem;
  }
}
