:root {
  --maroon: #6b1025;
  --maroon-dark: #3e0816;
  --green: #175b3b;
  --green-dark: #0d432c;
  --gold: #d7a62d;
  --gold-soft: #f1d98c;
  --cream: #fff8e7;
  --paper: #fffdf8;
  --ink: #35241d;
  --muted: #786a62;
  --line: #dfd3bf;
  --danger: #a51f35;
  --success: #147344;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(215, 166, 45, 0.18), transparent 22rem),
    radial-gradient(circle at 95% 15%, rgba(107, 16, 37, 0.1), transparent 25rem),
    var(--cream);
  font-family: Arial, Helvetica, sans-serif;
}

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

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 22px 16px 42px;
}

.page-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(62, 8, 22, 0.14));
}

.eyebrow,
.section-kicker,
.step-label {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  margin-bottom: 0;
  color: var(--maroon);
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1;
}

h2 {
  margin-bottom: 9px;
  color: var(--maroon);
  font-size: clamp(1.55rem, 5.5vw, 2.15rem);
  line-height: 1.12;
}

.welcome-card,
.login-card,
.collection-card,
.success-card {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(215, 166, 45, 0.62);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 16px 38px rgba(62, 8, 22, 0.09);
}

.welcome-card {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.welcome-image {
  min-height: 190px;
  background-image: linear-gradient(to top, rgba(62, 8, 22, 0.18), transparent 45%), url("../images/prabhupada.jpg");
  background-position: center 27%;
  background-size: cover;
}

.welcome-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

.welcome-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-card,
.collection-card,
.success-card {
  padding: clamp(22px, 5vw, 34px);
}

.helper,
.signed-in {
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
}

.access-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input,
select {
  min-height: 48px;
  padding: 10px 13px;
}

textarea {
  min-height: 88px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(215, 166, 45, 0.18);
}

.button {
  min-height: 48px;
  padding: 11px 20px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}

.button--primary {
  color: var(--cream);
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  box-shadow: 0 8px 18px rgba(107, 16, 37, 0.2);
}

.button--secondary {
  border: 1px solid var(--maroon);
  color: var(--maroon);
  background: white;
  box-shadow: none;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.signed-in-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.signed-in {
  margin-bottom: 20px;
}

.signed-in strong {
  color: var(--green-dark);
}

.text-button {
  flex: 0 0 auto;
  padding: 5px 0;
  border: 0;
  color: var(--maroon);
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.type-picker {
  display: grid;
  gap: 9px;
  margin: 0 0 26px;
}

.type-option {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  background: white;
}

.type-option:has(input:checked) {
  border-color: var(--gold);
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(215, 166, 45, 0.14);
}

.type-option input {
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--maroon);
}

.type-option span {
  display: grid;
  gap: 3px;
}

.type-option strong {
  color: var(--ink);
}

.type-option small,
.field-help {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.custom-pledge-amount {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.custom-pledge-amount label {
  font-size: 0.78rem;
}

.pledge-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-message {
  min-height: 1.2em;
  margin: 9px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.pledge-results {
  display: grid;
  gap: 9px;
}

.pledge-result {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: white;
}

.pledge-result:has(input:checked) {
  border-color: var(--gold);
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(215, 166, 45, 0.14);
}

.pledge-result input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--maroon);
}

.pledge-result span {
  display: grid;
  gap: 3px;
}

.pledge-result strong {
  color: var(--green-dark);
}

.pledge-result small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.form-panel {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  margin-bottom: 18px;
}

.field--wide {
  grid-column: 1 / -1;
}

.optional {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.money-input {
  position: relative;
}

.money-input > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  color: var(--green-dark);
  font-weight: 800;
  transform: translateY(-50%);
}

.money-input input {
  padding-left: 31px;
}

.payment-details {
  margin: 0 0 18px;
  padding: 16px 16px 0;
  border: 1px dashed var(--gold);
  border-radius: 14px;
  background: #fffaf0;
}

.submission-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.submission-footer p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.form-message {
  min-height: 1.2em;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 700;
}

.form-message.is-success {
  color: var(--success);
}

.registration-invite {
  margin: 24px 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.registration-invite a,
.back-link {
  color: var(--maroon);
  font-weight: 800;
  text-underline-offset: 3px;
}

.registration-intro {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.consent-field {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 3px 0 20px;
  padding: 14px;
  border-radius: 12px;
  background: #f7f2e8;
  cursor: pointer;
}

.consent-field input {
  flex: 0 0 auto;
  width: 19px;
  min-height: 19px;
  margin: 1px 0 0;
  accent-color: var(--maroon);
}

.consent-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
}

.registration-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.success-card {
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border: 4px solid rgba(20, 115, 68, 0.14);
  border-radius: 50%;
  color: white;
  background: var(--success);
  font-size: 2rem;
  font-weight: 900;
}

.success-card > p:not(.section-kicker) {
  color: var(--muted);
}

.success-card > .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.submission-reference {
  margin: 22px 0;
  padding: 16px;
  border-radius: 14px;
  background: #f7f2e8;
}

.submission-reference dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.submission-reference dd {
  overflow-wrap: anywhere;
  margin: 0 0 14px;
  color: var(--maroon);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
}

.submission-reference dd:last-child {
  margin-bottom: 0;
}

footer {
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .page-shell {
    padding: 16px 12px 34px;
  }

  .welcome-card {
    grid-template-columns: 105px 1fr;
  }

  .welcome-image {
    min-height: 170px;
  }

  .welcome-copy {
    padding: 18px 16px;
  }

  .welcome-copy h2 {
    font-size: 1.32rem;
  }

  .welcome-copy p:last-child {
    font-size: 0.84rem;
  }

  .access-row,
  .pledge-search-row,
  .field-grid,
  .submission-footer {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .button--submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
