:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --ink: #17201d;
  --muted: #64706a;
  --line: #d9ddd4;
  --panel: #fffdf8;
  --accent: #d92f45;
  --accent-dark: #ad1f31;
  --mint: #2c8c74;
  --gold: #d6a237;
  --sky: #4c7899;
  --shadow: 0 22px 70px rgba(38, 48, 43, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 16%, rgba(216, 162, 55, 0.22), transparent 28%),
    linear-gradient(135deg, #fffaf1 0%, #f4f7f4 44%, #f6efe9 100%);
}

button,
input,
textarea {
  font: inherit;
}

svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.hero {
  min-height: calc(100vh - 124px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: center;
  gap: 42px;
}

.hero-copy {
  position: relative;
  padding: 42px 0 42px 8px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 12% auto auto 34%;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(44, 140, 116, 0.22);
  border-radius: 999px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: white;
  background: linear-gradient(145deg, var(--mint), var(--sky));
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(44, 140, 116, 0.22);
}

.brand-mark svg {
  width: 36px;
  height: 36px;
}

.eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 12px 0 16px;
  font-size: clamp(3rem, 7vw, 6.3rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin: 0;
  color: #43504a;
  font-size: 1.2rem;
  line-height: 1.65;
}

.help-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.help-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  color: #26332f;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 32, 29, 0.08);
  border-radius: 8px;
}

.donation-panel {
  width: 100%;
  padding: 24px;
  background: color-mix(in srgb, var(--panel) 94%, white);
  border: 1px solid rgba(23, 32, 29, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-head h2 {
  margin: 4px 0 0;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.panel-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--mint);
  background: #e9f3ef;
  border-radius: 8px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.amount-grid label {
  min-width: 0;
}

.amount-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.amount-grid span {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 10px 8px;
  color: #293631;
  background: #f5f1e9;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

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

.field {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.field span {
  color: #48544f;
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(44, 140, 116, 0.14);
}

.primary-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 16px;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.status-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 13px;
  background: #f7faf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--sky);
  background: #e8f1f5;
  border-radius: 8px;
}

.status-card p {
  margin: 0 0 4px;
  font-weight: 900;
}

.status-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.status-card[data-state="paid"] .status-icon {
  color: var(--mint);
  background: #e8f6ef;
}

.status-card[data-state="failed"],
.status-card[data-state="cancelled"],
.status-card[data-state="expired"] {
  border-color: rgba(217, 47, 69, 0.28);
}

.donations-section {
  margin-top: -18px;
  padding-bottom: 28px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 5px 0 0;
  font-size: 1.65rem;
  letter-spacing: 0;
}

.donation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.donation-entry,
.empty-donation {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(23, 32, 29, 0.08);
  border-radius: 8px;
}

.donation-entry {
  display: grid;
  gap: 12px;
}

.donation-entry header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.donor-name {
  color: #293631;
  font-weight: 900;
}

.donation-amount {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.donation-comment {
  min-height: 44px;
  margin: 0;
  color: #43504a;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.donation-date,
.empty-donation span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-donation {
  grid-column: 1 / -1;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 20px;
  }

  .hero-copy {
    padding: 18px 0 6px;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 5rem);
  }

  .donation-panel {
    max-width: 560px;
  }

  .donations-section {
    margin-top: 18px;
  }

  .donation-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding: 12px 0;
  }

  .hero-copy::before {
    display: none;
  }

  .donation-panel {
    padding: 16px;
  }

  .amount-grid {
    grid-template-columns: 1fr;
  }

  .help-row span {
    width: 100%;
  }
}
