:root {
  --page: #fffcf2;
  --ink: #000;
  --muted: #5c5c5c;
  --brand-yellow: #f7c01f;
  --brand-yellow-soft: #fce49d;
  --brand-green: #015b21;
  --surface: #f2f1ed;
  --border: #8c8c8c;
  --error: #a4161a;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

/* Header */

.site-header {
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.logo {
  width: 134px;
  height: auto;
}

/* Donation form */

.donate {
  width: min(566px, calc(100% - 32px));
  margin: 90px auto 0;
  scroll-margin-top: 24px;
}

h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
}

h1:focus {
  outline: none;
}

.lede {
  margin: 0 0 24px;
}

fieldset {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

legend,
.field label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
}

.options {
  display: grid;
  gap: 8px;
}

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

.options-network {
  grid-template-columns: repeat(2, 1fr);
}

.option {
  position: relative;
  display: block;
  cursor: pointer;
}

.option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.option:hover span {
  border-color: var(--ink);
}

.option input:checked + span {
  border-color: var(--brand-green);
  background: var(--brand-yellow-soft);
}

.option input:focus-visible + span {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.field {
  margin-bottom: 24px;
}

.field input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  transition: border-color 150ms ease;
}

.field input:hover {
  border-color: var(--ink);
}

.field input::placeholder {
  color: var(--muted);
}

.form-error {
  margin: 0 0 16px;
  color: var(--error);
  font-size: 15px;
}

.donate-button {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: var(--brand-yellow);
  color: #242323;
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease;
}

.donate-button:hover:not(:disabled) {
  background: #e8b212;
}

.donate-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

/* Payment status */

.status-panel p {
  margin: 0 0 16px;
}

.status-reference {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.status-indicator {
  height: 3px;
  margin: 8px 0 20px;
  overflow: hidden;
  background: var(--surface);
}

.status-indicator span {
  display: block;
  width: 35%;
  height: 100%;
  background: var(--brand-yellow);
  animation: progress 1.4s ease-in-out infinite alternate;
}

@keyframes progress {
  to {
    transform: translateX(186%);
  }
}

.secondary-button {
  display: inline-block;
  min-height: 48px;
  padding: 11px 28px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.secondary-button:hover {
  background: var(--brand-yellow-soft);
}

/* Footer */

.site-footer {
  padding: 64px 16px 32px;
}

.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 960px) {
  .site-header {
    padding: 20px 16px;
  }

  .donate {
    margin-top: 40px;
  }
}

@media (max-width: 560px) {
  .options-amount {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .status-indicator span {
    width: 100%;
    animation: none;
  }
}
