:root {
  --bg: #ffffff;
  --bg-muted: #f5f5f5;
  --text: #232323;
  --text-muted: #6f6f6f;
  --green: #4a9d44;
  --green-dark: #274a34;
  --green-light: #ccf88e;
  --green-deeper: #012d19;
  --border: #d8d8d8;
  --border-soft: #e9e9e9;
  --shadow-soft: rgba(0, 0, 0, 0.1) 0px 2px 6px 0px;
  --radius: 12px;
  --radius-pill: 999px;
  --font: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --max-width: 480px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--bg);
}

.logo {
  display: flex;
  justify-content: center;
  text-decoration: none;
}

.site-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 56px;
  max-width: min(240px, 70vw);
  object-fit: contain;
}

.site-brand-text {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green-dark);
  line-height: 1.2;
}

.logo.site-header__logo--text {
  text-decoration: none;
}

.content {
  padding: 24px 30px 120px;
}

/* Thank you */
.thank-you {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

.thank-you__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 32px;
}

.thank-you__title {
  margin: 0 0 16px;
  font-size: clamp(26px, 6vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.thank-you__text {
  margin: 0 0 12px;
  max-width: 36ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
}

.thank-you__amount {
  margin: 0 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.thank-you__cta {
  width: 100%;
  max-width: 320px;
  margin-bottom: 16px;
  text-decoration: none;
  text-align: center;
}

.thank-you__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Hero */
.hero {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  text-align: center;
}

.hero__title {
  margin: 0 0 8px;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0;
  max-width: 34em;
  margin-inline: auto;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
}

.stats__donors {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 12px 0 0;
  min-height: 1.25em;
  font-size: clamp(11px, 3.1vw, 13px);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.stats__donors-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1;
}

.stats__donors-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.35s ease;
}

.stats__donors.is-fading .stats__donors-text {
  opacity: 0;
}

/* Frequency */
.frequency {
  margin-bottom: 24px;
}

.frequency__tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
}

.frequency__tab {
  flex: 1;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--green-dark);
  color: #ccf88e;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.frequency__tab:not(.is-active) {
  display: none;
}

.frequency__tabs:has(.frequency__tab.is-active[data-frequency="once"]) {
  display: block;
}

.frequency__tab.is-active[data-frequency="once"] {
  width: 100%;
  display: block;
}

.frequency__boost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--green);
  text-decoration: none;
}

.frequency__boost__label {
  background: linear-gradient(90deg, #333, #77ca59 25%, #333 50%);
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 150% 100%;
  color: transparent;
  position: relative;
  will-change: background-position;
  animation: frequency-boost-shine 4s linear infinite;
}

.frequency__boost svg {
  flex-shrink: 0;
  color: var(--green);
}

@keyframes frequency-boost-shine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.frequency__boost:hover .frequency__boost__label {
  text-decoration: underline;
}

/* Amount grid */
.amounts {
  margin-bottom: 24px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.amount-chip {
  position: relative;
  min-height: 58px;
  height: 58px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.amount-chip:hover {
  border-color: var(--text-muted);
}

.amount-chip.is-selected {
  padding-left: calc(8px * 1.3);
  padding-right: calc(8px * 1.3);
  background-color: #274a34;
  border-color: #0000;
  color: #ccf88e;
  box-shadow: none;
}

.amount-chip.is-suggested {
  overflow: visible;
  padding-bottom: 18px;
}

.suggested-donation-tile_tag__xRBex {
  bottom: -5px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  transform-origin: center bottom;
}

.suggested-donation-tag_tag__dIdH1 {
  white-space: nowrap;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #ccf88e;
  color: #1f5e27;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.suggested-donation-tag_icon__RKI_k {
  font-size: 11px;
  line-height: 1;
}

/* Currency selector */
.checkout-currency {
  margin-bottom: 16px;
}

.checkout-currency__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.checkout-currency__wrap {
  position: relative;
}

.checkout-currency__select {
  width: 100%;
  appearance: none;
  padding: 14px 44px 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
}

.checkout-currency__select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(74, 157, 68, 0.25);
}

.checkout-currency__icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Custom amount */
.custom-amount {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  min-height: 88px;
}

.custom-amount__currency {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  line-height: 1;
  color: var(--text-muted);
}

.custom-amount__symbol {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.custom-amount__code {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.custom-amount__value-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
}

.custom-amount__input {
  width: auto;
  max-width: 100%;
  border: 0;
  background: transparent;
  font-size: clamp(38px, 10vw, 50px);
  font-weight: 700;
  line-height: 1;
  text-align: right;
  padding: 0;
  outline: none;
  letter-spacing: -0.02em;
}

.custom-amount__suffix {
  font-size: clamp(38px, 10vw, 50px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

/* Cards & sections */
.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  background: var(--bg);
}

.card--plain {
  border: 0;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}

.section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

/* Payment */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
}

.payment-option:last-of-type {
  border-bottom: 0;
}

.payment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-option__radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.payment-option input:checked + .payment-option__radio {
  border-color: var(--green);
}

.payment-option input:checked + .payment-option__radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.payment-option__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 12px;
}

.payment-option__name {
  font-size: 16px;
  font-weight: 600;
}

.payment-option__logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.payment-option__logo--gpay {
  line-height: 0;
}

.payment-option__gpay-icon {
  display: block;
  height: 22px;
  width: auto;
}

.payment-option__logo--card {
  font-size: 22px;
  color: #5f6368;
}

.card-form {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-muted);
}

.card-form.is-hidden {
  display: none;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 400;
  color: #30313d;
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  outline: none;
}

.field__input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(74, 157, 68, 0.2);
}

.field__input:disabled {
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.75;
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: #a3acb9;
}

.field__select {
  appearance: none;
  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 1l5 5 5-5' stroke='%236f6f6f' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row .field {
  margin-bottom: 12px;
}

/* Checkboxes */
.preferences {
  margin-bottom: 16px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}

.checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.checkbox input:checked {
  background-color: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 6px #e8f5e6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2 6.5 11.2 12.5 4.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

.checkbox input:focus-visible {
  outline: 2px solid rgba(74, 157, 68, 0.45);
  outline-offset: 4px;
}

.checkbox--info {
  align-items: flex-start;
}

.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  cursor: help;
}

.info-btn svg {
  display: block;
}

.stripe-inline {
  margin-top: 8px;
  padding: 12px 0;
}

.card-visual-form {
  margin-left: 5%;
  margin-right: 5%;
  margin-bottom: 10px;
}

.card-visual-form .field__input {
  background: transparent;
  border: 1px solid #aeb3b8;
  border-radius: 12px;
  padding: 0.75rem 0.75rem;
  font-size: 16px;
  color: #3c4043;
}

.card-visual-form .field__stripe {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 16px;
}

.card-visual-form .field__input::placeholder {
  color: #5f6368;
  opacity: 1;
}

.card-step {
  display: grid;
  gap: 10px;
}

.card-step#card-step-identity {
  gap: 0;
}

.card-step + .card-step {
  margin-top: 8px;
}

#card-step-identity .field__input {
  border-radius: 5px;
  border: 1px solid #e6e6e6;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(0, 0, 0, 0.02);
}

.stripe-inline__element {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text-muted);
}

.stripe-inline__element.is-wallet-loading {
  min-height: 120px;
}

.stripe-inline__element--wallet {
  padding: 8px;
  min-height: 56px;
}

.stripe-inline__status {
  margin: 8px 0 0;
  font-size: 13px;
  color: #c5221f;
  min-height: 20px;
}

/* Summary */
.summary-list {
  margin: 0 0 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  font-size: 16px;
}

.summary-row dt {
  font-weight: 400;
  color: var(--text);
}

.summary-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.summary-row--total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.summary-row--total dt,
.summary-row--total dd {
  font-weight: 700;
  font-size: 17px;
}

.btn-donate {
  width: 100%;
  padding: 14px 24px;
  border: 0;
  border-radius: 624.9375rem;
  background: var(--green-light);
  color: var(--green-deeper);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
}

.summary-googlepay {
  width: 100%;
}

.summary-googlepay__button {
  min-height: 56px;
}

.btn-donate:hover {
  filter: brightness(0.96);
}

.btn-donate:active {
  filter: brightness(0.92);
}

.legal {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: left;
}

.legal a {
  color: var(--text-muted);
}

/* Guarantee */
.guarantee {
  background: transparent;
  border: 0;
}

.guarantee__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
}

.guarantee__icon {
  flex-shrink: 0;
  margin-top: 0;
  width: 36px;
  height: 36px;
}

.guarantee__copy {
  min-width: 0;
}

.guarantee__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.guarantee__text {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.guarantee__text a {
  color: var(--text-muted);
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 0 0 14px;
}

.legal--inline {
  margin-top: 16px;
}

.checkout-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.checkout-sticky .btn-donate {
  max-width: var(--max-width);
  margin: 0 auto;
  display: block;
}

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

.field__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  resize: vertical;
  min-height: 88px;
}

.field__textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

/* Payment bottom sheet */
.payment-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.payment-sheet:not([hidden]) {
  pointer-events: auto;
}

.payment-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.payment-sheet.is-open .payment-sheet__backdrop {
  opacity: 1;
}

.payment-sheet__panel {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.payment-sheet.is-open .payment-sheet__panel {
  transform: translateY(0);
}

.payment-sheet__header {
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 8px;
  flex-shrink: 0;
}

.payment-sheet__back {
  display: none;
  grid-column: 1;
  grid-row: 1;
}

.payment-sheet__heading {
  grid-column: 1;
  grid-row: 1;
  text-align: center;
  min-width: 0;
}

.payment-sheet__close {
  grid-column: 2;
  grid-row: 1;
}

.payment-sheet.is-step-two .payment-sheet__header {
  grid-template-columns: 40px 1fr 40px;
}

.payment-sheet.is-step-two .payment-sheet__back {
  display: flex;
  grid-column: 1;
}

.payment-sheet.is-step-two .payment-sheet__heading {
  grid-column: 2;
}

.payment-sheet.is-step-two .payment-sheet__close {
  grid-column: 3;
}

.payment-sheet__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.payment-sheet__back,
.payment-sheet__close {
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.payment-sheet__close {
  display: flex;
}

.payment-sheet__back:hover,
.payment-sheet__close:hover {
  background: var(--bg-muted);
}

.payment-sheet__back .bi,
.payment-sheet__close .bi {
  font-size: 1.1rem;
}

.payment-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 24px;
}

.payment-sheet__step {
  display: none;
}

.payment-sheet__step.is-active {
  display: block;
}

.payment-sheet__copy {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.payment-sheet__amount {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.payment-sheet__step.is-active .checkbox {
  margin: 4px 0 16px;
}

body.payment-sheet-open {
  overflow: hidden;
}

@media (min-width: 520px) {
  .content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .amount-grid {
    gap: 10px;
  }
}
