/* Donation/support UI - intentionally isolated from the quiz bundle. */
.site-shell .topbar {
  justify-content: flex-start;
  gap: 14px;
}
.site-shell .topbar > .header-link {
  margin-right: auto;
}

.donation-trigger {
  appearance: none;
  border: 1px solid rgba(141, 48, 32, .22);
  background: #fff7f3;
  color: var(--rust, #8d3020);
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.donation-trigger:hover {
  background: #fff;
  border-color: var(--rust, #8d3020);
  transform: translateY(-1px);
}
.donation-trigger:focus-visible,
.donation-close:focus-visible {
  outline: 3px solid rgba(198, 78, 50, .28);
  outline-offset: 3px;
}
.donation-trigger svg { width: 18px; height: 18px; flex: none; }

.donation-modal[hidden] { display: none !important; }
.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 21, 16, .62);
  backdrop-filter: blur(5px);
}
.donation-dialog {
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--card, #fffdf7);
  color: var(--ink, #17241f);
  border: 1px solid var(--line, #ded8ca);
  border-radius: 22px 7px;
  box-shadow: 0 30px 90px rgba(7, 18, 14, .28);
  position: relative;
}
.donation-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line, #ded8ca);
  border-radius: 11px 4px;
  background: #fff;
  color: var(--ink, #17241f);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.donation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, .95fr);
  gap: 34px;
  align-items: center;
  padding: 54px 48px 46px;
}
.donation-copy { text-align: right; }
.donation-kicker {
  color: var(--rust, #8d3020);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}
.donation-copy h2 {
  margin: 8px 0 16px;
  font-family: "Frank Ruhl Libre", serif;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
}
.donation-copy p {
  margin: 0;
  color: var(--muted, #666056);
  font-size: 17px;
  line-height: 1.85;
}
.donation-copy .donation-thanks {
  margin-top: 14px;
  color: var(--ink, #17241f);
  font-weight: 700;
}
.donation-qr-wrap {
  background: #f6f7f8;
  border: 1px solid var(--line, #ded8ca);
  border-radius: 18px 6px;
  padding: 16px;
  text-align: center;
}
.donation-qr-wrap img {
  display: block;
  width: 100%;
  max-width: 330px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}
.donation-qr-wrap strong {
  display: block;
  margin-top: 12px;
  font-size: 15px;
}
.donation-qr-wrap span {
  display: block;
  margin-top: 4px;
  color: var(--muted, #666056);
  font-size: 12px;
}
body.donation-open { overflow: hidden; }

@media (max-width: 680px) {
  .site-shell .topbar { gap: 8px; }
  .site-shell .topbar > .header-link { margin-right: auto; }
  .donation-trigger {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    font-size: 0;
  }
  .donation-trigger svg { width: 20px; height: 20px; }
  .donation-modal { padding: 14px; }
  .donation-dialog { max-height: calc(100vh - 28px); }
  .donation-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 58px 20px 24px;
  }
  .donation-copy h2 { font-size: 38px; }
  .donation-copy p { font-size: 15px; }
  .donation-qr-wrap { padding: 12px; }
  .donation-qr-wrap img { max-width: 290px; }
}

@media (prefers-reduced-motion: reduce) {
  .donation-trigger { transition: none; }
}


/* PayPal option displayed inside the same support dialog. */
.paypal-support-button {
  margin: 16px auto 0;
  min-height: 44px;
  width: min(100%, 330px);
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: #FFD140;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Rubik", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(17, 17, 17, .10);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.paypal-support-button strong {
  display: inline;
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.paypal-support-button:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 17, 17, .14);
}
.paypal-support-button:focus-visible {
  outline: 3px solid rgba(0, 48, 135, .28);
  outline-offset: 3px;
}
.donation-qr-wrap .paypal-support-note {
  margin-top: 7px;
  font-size: 11px;
}

@media (prefers-reduced-motion: reduce) {
  .paypal-support-button { transition: none; }
}
