:root {
  --ink: #17212b;
  --muted: #51606f;
  --gold: #ffbd2d;
  --mint: #7ee6b8;
  --blue: #a8dcff;
  --panel: rgba(255,255,255,.9);
  --line: #d9e2ea;
  --shadow: 0 22px 50px rgba(33, 82, 42, .16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,189,45,.42), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(126,230,184,.38), transparent 24%),
    linear-gradient(135deg, #e7f6ff, #fff8dd 58%, #f3fff4);
}

.rewards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.brand,
nav a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand { font-size: 22px; }
nav { display: flex; flex-wrap: wrap; gap: 14px; }

.rewards-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.hero,
.ledger,
.badge-card,
.wallet-card {
  background: var(--panel);
  border: 3px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: stretch;
  padding: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #237945;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 23px; }

p,
li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.wallet-card {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  background: linear-gradient(160deg, #fff, #fff0b6);
}

.wallet-card span {
  display: block;
  font-size: 64px;
  font-weight: 900;
}

.wallet-card small,
.pill {
  color: #7a5200;
  font-weight: 900;
  text-transform: uppercase;
}

button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  padding: 12px 16px;
}

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

.primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 0 rgba(23,33,43,.16);
}

.secondary {
  background: white;
  color: var(--ink);
  border: 2px solid rgba(23,33,43,.12);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 14px;
}

.pill {
  background: #fff0b6;
  border-radius: 999px;
  padding: 10px 13px;
  white-space: nowrap;
}

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

.badge-card {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 20px;
}

.badge-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #13506b;
  font-size: 24px;
  font-weight: 900;
}

.badge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-meta span {
  background: #eef8fb;
  border-radius: 999px;
  color: #1c5d78;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 9px;
}

.badge-card p { margin: 0; }
.badge-card button { align-self: end; }

.ledger {
  padding: 24px;
  margin-top: 28px;
}

#transactionList {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

#transactionList li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.earn { color: #1d7a44; font-weight: 900; }
.spend { color: #9a5610; font-weight: 900; }

@media (max-width: 880px) {
  .hero,
  .badge-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .rewards-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .rewards-shell {
    width: min(100% - 16px, 1120px);
  }

  .hero,
  .ledger {
    padding: 18px;
  }
}
