/* Donate — content only; nav/footer/sheet from bd-ios + style.v2 (light site theme) */

body.bd-v2.donate-view {
  margin: 0 !important;
}

body.bd-v2.donate-view .bd-site-sheet {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body.bd-v2 #donate.page.active {
  display: block;
  padding: 0;
}

.donate-page {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 108px 0 120px;
}

.donate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 48px 64px;
  align-items: start;
  padding-bottom: 24px;
  min-height: calc(100svh - 140px);
  min-height: calc(100dvh - 140px);
  box-sizing: border-box;
}

.donate-copy {
  padding-top: 12px;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.donate-copy .bd-eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.12em;
}

.donate-copy .bd-headline {
  margin: 0 0 18px;
  font-size: clamp(2.35rem, 5vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.donate-lead {
  margin: 0 0 28px;
  max-width: 26rem;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: var(--bd-a-muted, #424245);
}

.donate-copy__body {
  width: 100%;
  margin: 0 0 28px;
  padding: 22px 0 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.donate-aside {
  margin: 0 0 16px;
  max-width: 26rem;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--bd-a-subtle, #6e6e73);
}

.donate-uses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.donate-uses li {
  position: relative;
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--bd-a-ink, #1d1d1f);
}

.donate-uses li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #355cff;
  opacity: 0.85;
}

.donate-thanks-line {
  margin: 0;
  max-width: 26rem;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--bd-a-muted, #424245);
}

.donate-card {
  margin: 0;
  padding: 26px 24px 24px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 36px rgba(15, 35, 80, 0.08),
    0 2px 8px rgba(15, 35, 80, 0.04);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.donate-identity {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(53, 92, 255, 0.07) 0%, rgba(53, 92, 255, 0.04) 100%);
  border: 1px solid rgba(53, 92, 255, 0.12);
}

.donate-identity__status {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--bd-a-muted, #424245);
}

.donate-anon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  color: var(--bd-a-ink, #1d1d1f);
  cursor: pointer;
  user-select: none;
}

.donate-anon input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #355cff;
}

.donate-card__amount {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donate-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 22px 16px;
  min-height: 88px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8f9fc 0%, #f0f2f8 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    border-radius 0.35s ease,
    box-shadow 0.4s ease;
}

.donate-amount.is-focused {
  border-color: rgba(53, 92, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(53, 92, 255, 0.1);
  background: linear-gradient(180deg, #f7f8ff 0%, #eef1fb 100%);
}

.donate-amount.is-settling:not(.is-invalid) .donate-amount__prefix,
.donate-amount.is-settling:not(.is-invalid) .donate-amount__input {
  color: #355cff;
}

.donate-amount.is-invalid {
  background: rgba(215, 0, 21, 0.05);
  border-color: rgba(215, 0, 21, 0.2);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}

.donate-amount.is-invalid .donate-amount__prefix,
.donate-amount.is-invalid .donate-amount__input {
  color: #d70015;
  caret-color: #d70015;
}

.donate-amount-error {
  display: grid;
  grid-template-rows: 0fr;
  margin: -10px 0 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    grid-template-rows 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.28s ease;
}

.donate-amount-error > span {
  overflow: hidden;
  min-height: 0;
  display: block;
  padding: 0 12px;
  border-radius: 0 0 14px 14px;
  border: 1px solid transparent;
  border-top: 0;
  background: rgba(215, 0, 21, 0.07);
  color: #c00012;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-align: center;
  box-sizing: border-box;
  transition: padding 0.28s ease, border-color 0.28s ease;
}

.donate-amount-error.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  margin: -10px 0 0;
  pointer-events: auto;
}

.donate-amount-error.is-visible > span {
  padding: 8px 12px;
  border-color: rgba(215, 0, 21, 0.2);
}

.donate-amount__prefix,
.donate-amount__input {
  font-size: clamp(3.35rem, 8vw, 4.35rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--bd-a-ink, #1d1d1f);
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  transition: color 0.45s ease;
}

.donate-amount__prefix {
  opacity: 0.88;
  margin-right: -0.04em;
}

.donate-amount__input {
  flex: 0 0 auto;
  width: 3ch;
  min-width: 2ch;
  max-width: 9ch;
  border: 0;
  outline: none;
  background: transparent;
  caret-color: #355cff;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  font-size: clamp(3.35rem, 8vw, 4.35rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--bd-a-ink, #1d1d1f);
  font-family: inherit;
  transition: width 0.4s ease, color 0.45s ease;
}

.donate-amount__input::-webkit-outer-spin-button,
.donate-amount__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.donate-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.donate-preset {
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: var(--bd-a-ink, #1d1d1f);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}

.donate-preset:hover {
  border-color: rgba(53, 92, 255, 0.35);
  color: #355cff;
}

.donate-preset:active {
  background: #f5f7ff;
}

.donate-preset.is-active {
  background: #355cff;
  border-color: #355cff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(53, 92, 255, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  .donate-amount,
  .donate-amount__prefix,
  .donate-amount__input,
  .donate-amount-error,
  .donate-amount-error > span,
  .donate-preset {
    transition: none !important;
  }
}

.donate-mode {
  display: flex;
  width: 100%;
  padding: 4px;
  margin: 0;
  border-radius: 14px;
  background: #eceef4;
  gap: 4px;
  box-sizing: border-box;
}

.donate-mode__btn {
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #6e6e73;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.donate-mode__btn:hover:not(.is-active) {
  color: var(--bd-a-ink, #1d1d1f);
}

.donate-mode__btn.is-active {
  background: #355cff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(53, 92, 255, 0.24);
}

.donate-field {
  display: block;
  margin: 0;
}

.donate-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f7f8fb;
  padding: 14px 15px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bd-a-ink, #1d1d1f);
  resize: none;
  overflow: hidden;
  min-height: 92px;
  field-sizing: content;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.donate-textarea::placeholder {
  color: rgba(29, 29, 31, 0.38);
}

.donate-textarea:focus {
  outline: none;
  background: #fff;
  border-color: rgba(53, 92, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(53, 92, 255, 0.12);
}

.donate-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: #355cff;
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(53, 92, 255, 0.28);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.donate-submit:hover:not(:disabled) {
  background: #2f54ef;
  box-shadow: 0 10px 24px rgba(53, 92, 255, 0.34);
}

.donate-submit:active:not(:disabled) {
  transform: scale(0.985);
}

.donate-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.donate-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--bd-a-subtle, #6e6e73);
  text-align: center;
}

.donate-faq {
  margin: 48px 0 0;
  padding-top: 48px;
  max-width: none;
  width: 100%;
}

body.bd-v2.donate-view .donate-faq.bd-faq-wrap {
  padding: 48px 0 0;
}

body.bd-v2.donate-view .donate-faq .bd-headline {
  text-align: left;
  margin-bottom: 24px;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

body.bd-v2.donate-view .donate-faq .faq-list {
  max-width: 40rem;
}

body.bd-v2.donate-view .donate-faq .faq-question {
  font-size: clamp(16px, 2vw, 18px);
  padding: 18px 20px;
}

body.bd-v2.donate-view .donate-faq .faq-answer p {
  font-size: 15px;
}

.donate-alt {
  margin: 28px 0 0;
  max-width: 40rem;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bd-a-subtle, #6e6e73);
  text-align: center;
}

.donate-alt a {
  color: #355cff;
  text-decoration: none;
}

.donate-alt a:hover {
  text-decoration: underline;
}

/* Thanks */
.donate-page.donate-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 140px);
  min-height: calc(100dvh - 140px);
  padding-top: 96px;
  padding-bottom: 96px;
  box-sizing: border-box;
}

.donate-thanks__stage {
  position: relative;
  width: min(34rem, 100%);
  margin: 0 auto;
  padding: 8px 0 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donate-thanks__pulse {
  position: absolute;
  top: -40px;
  left: 50%;
  width: min(420px, 90vw);
  height: 220px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(53, 92, 255, 0.14), transparent 68%);
  pointer-events: none;
  opacity: 0.9;
}

.donate-thanks__check {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  margin: 0 0 22px;
  color: #355cff;
  opacity: 0.35;
  transform: scale(0.92);
  transition: opacity 0.45s ease, transform 0.45s ease, color 0.35s ease;
}

.donate-thanks__check svg {
  display: block;
  width: 100%;
  height: 100%;
}

.donate-thanks__tick {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}

.donate-thanks__stage.is-success .donate-thanks__check {
  opacity: 1;
  transform: scale(1);
  color: #355cff;
}

.donate-thanks__stage.is-success .donate-thanks__tick {
  stroke-dashoffset: 0;
}

.donate-thanks__stage.is-pending .donate-thanks__check {
  opacity: 0.55;
  color: #86868b;
}

.donate-thanks__stage.is-confirming .donate-thanks__check {
  animation: donate-thanks-breathe 1.4s ease-in-out infinite;
}

.donate-thanks__stage .bd-eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.12em;
}

.donate-thanks__stage .bd-headline {
  margin: 0 0 16px;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.donate-thanks__amount {
  margin: 0 0 10px;
  font-size: clamp(2.75rem, 7vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--bd-a-ink, #1d1d1f);
}

.donate-thanks__stage .donate-lead {
  margin: 0 0 10px;
  max-width: 26rem;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--bd-a-muted, #424245);
}

.donate-thanks__ref {
  margin: 0 0 28px;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--bd-a-subtle, #6e6e73);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.donate-thanks__body {
  width: 100%;
  max-width: 26rem;
  margin: 0 0 28px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.donate-thanks__body .donate-aside {
  margin: 0;
  max-width: none;
  text-align: center;
}

.donate-thanks__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 22px;
}

.donate-thanks__actions .donate-submit {
  width: auto;
  min-width: 148px;
  text-decoration: none;
}

.donate-thanks .donate-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: var(--bd-a-ink, #1d1d1f);
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.donate-thanks .donate-ghost:hover {
  border-color: rgba(15, 23, 42, 0.18);
  background: #f8f9fc;
}

.donate-thanks__alt {
  margin: 0;
  max-width: 26rem;
}

@keyframes donate-thanks-breathe {
  0%, 100% { opacity: 0.28; transform: scale(0.94); }
  50% { opacity: 0.5; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .donate-thanks__stage.is-confirming .donate-thanks__check {
    animation: none;
  }

  .donate-thanks__tick {
    transition: none;
    stroke-dashoffset: 0;
  }

  .donate-thanks__check {
    transition: none;
  }
}

@media (max-width: 820px) {
  .donate-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .donate-card {
    max-width: 400px;
  }

  .donate-copy {
    padding-top: 0;
    max-width: none;
  }

  .donate-lead,
  .donate-aside,
  .donate-thanks-line {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .donate-page {
    width: min(960px, calc(100% - 32px));
    padding-top: 96px;
  }

  .donate-amount__prefix,
  .donate-amount__input {
    font-size: 2.85rem;
  }

  .donate-card {
    padding: 22px 18px 18px;
    max-width: none;
  }
}
