/* Le Chonk NVDA rewards: the /rewards/ dashboard and the home page card.
 * Builds on the tokens in style.css. NVDA amounts are lime, the brand's live colour; actions stay orange. */

/* ---------- hero: what it is, and the big live total ---------- */
.rw-page { padding-block: clamp(28px, 5vw, 56px) clamp(64px, 9vw, 120px); display: grid; gap: clamp(18px, 2.4vw, 26px); }
.rw-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: end;
}
.rw-hero > * { min-width: 0; }
.rw-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--lime);
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rw-hero h1 {
  font-size: clamp(52px, 9vw, 112px);
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.rw-lede { margin-top: 16px; color: var(--muted); font-size: clamp(16px, 1.7vw, 19px); max-width: 52ch; }

.rw-total {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-xl);
  border-color: rgba(74, 222, 128, 0.35);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(74, 222, 128, 0.2), rgba(74, 222, 128, 0) 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(255, 122, 0, 0.14), rgba(255, 122, 0, 0) 60%),
    rgba(255, 255, 255, 0.05);
}
.rw-total-label { color: var(--muted); font-weight: 700; font-size: 15px; }
.rw-total-nvda {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 110%;
  font-size: clamp(46px, 7.4vw, 92px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.rw-total-nvda > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rw-unit { font-size: 0.36em; color: var(--lime); letter-spacing: 0.02em; }
.rw-total-usd { margin-top: 8px; font-size: clamp(18px, 2vw, 24px); font-weight: 800; color: var(--lime); min-height: 1.3em; }
.rw-total-foot { margin-top: 14px; font-size: 12.5px; color: var(--faint); }
.rw-total.is-bump .rw-total-nvda { animation: rw-bump 1.2s var(--ease); }
@keyframes rw-bump {
  0% { text-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  30% { text-shadow: 0 0 34px rgba(74, 222, 128, 0.7); }
  100% { text-shadow: 0 0 0 rgba(74, 222, 128, 0); }
}

/* ---------- the four numbers ---------- */
.rw-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rw-stats .stat { min-width: 0; }
.rw-stat-sub { margin-top: 4px; font-size: 13px; color: var(--faint); overflow-wrap: anywhere; }
.rw-stat-pot { border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.06); }
.rw-stat-pot .stat-value { color: var(--lime); }

/* ---------- shared card parts ---------- */
.rw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(14px, 2vw, 20px); align-items: start; }
.rw-grid > * { min-width: 0; }
.rw-check, .rw-feed, .rw-board, .rw-proof { padding: clamp(18px, 2.6vw, 28px); border-radius: var(--radius-xl); display: grid; gap: 14px; min-width: 0; }
.rw-check h2, .rw-feed h2, .rw-board h2, .rw-proof h2 { font-size: clamp(22px, 2.4vw, 28px); }
.rw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.rw-sub { color: var(--muted); font-size: 15px; max-width: 62ch; }
.rw-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--lime); font-size: 12.5px; font-weight: 800;
}
.rw-empty { list-style: none; padding: 16px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.25); color: var(--faint); font-size: 14px; }
.rw-addr {
  color: var(--cream);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95em;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 249, 240, 0.35);
}
.rw-addr:hover { color: var(--orange-hi); border-bottom-color: var(--orange-hi); }
.rw-tx {
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04);
  color: var(--cream); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.rw-tx:hover { border-color: var(--border-warm); color: var(--orange-hi); }
.rw-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border-warm); color: var(--orange-hi);
  font-size: 11.5px; font-weight: 800; white-space: nowrap;
}
.rw-tag-me { border-color: rgba(74, 222, 128, 0.5); color: var(--lime); }

/* ---------- wallet check ---------- */
.rw-form { display: flex; gap: 10px; }
.rw-form input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font: 600 15px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.rw-form input::placeholder { color: var(--faint); font-family: var(--font); }
.rw-form input:focus { outline: none; border-color: var(--orange-hi); box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.3); }
.rw-form .btn { min-height: 52px; flex: none; }
.rw-error, .rw-home-error { margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 107, 107, 0.55); background: rgba(255, 107, 107, 0.12); font-size: 14px; font-weight: 700; }
.rw-result { display: grid; gap: 12px; padding-top: 4px; }
.rw-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rw-pill { padding: 5px 12px; border-radius: 999px; background: rgba(255, 122, 0, 0.14); border: 1px solid var(--border-warm); color: var(--orange-hi); font-size: 13px; font-weight: 800; }
.rw-result-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rw-result-total b { font-family: var(--font-display); font-weight: 900; font-stretch: 110%; font-size: clamp(36px, 5vw, 54px); line-height: 1; color: var(--lime); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rw-result-total span { color: var(--muted); font-weight: 700; }
.rw-result-usd { color: var(--cream); font-weight: 800; font-size: 18px; margin-top: -4px; }
.rw-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.rw-facts div { padding: 12px 14px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); min-width: 0; }
.rw-facts dt { font-size: 12.5px; color: var(--faint); font-weight: 700; }
.rw-facts dd { margin: 4px 0 0; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rw-result-sub { font-size: 17px; margin-top: 4px; }
.rw-payouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.rw-payouts li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: "round when amt tx" "share share share share";
  align-items: center;
  gap: 2px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
}
.rw-p-round { grid-area: round; font-weight: 800; }
.rw-p-when { grid-area: when; color: var(--faint); }
.rw-p-amt { grid-area: amt; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rw-p-amt b { color: var(--lime); }
.rw-p-amt small { margin-left: 6px; color: var(--faint); }
.rw-p-share { grid-area: share; color: var(--faint); font-size: 12.5px; }
.rw-payouts .rw-tx { grid-area: tx; }

/* ---------- latest payout rounds ---------- */
.rw-epochs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 640px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.rw-epoch {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(74, 222, 128, 0.6);
}
.rw-epoch.is-new { animation: rw-arrive 2.4s var(--ease); }
@keyframes rw-arrive {
  0% { background: rgba(74, 222, 128, 0.28); transform: translateY(-6px); }
  100% { background: rgba(255, 255, 255, 0.04); transform: none; }
}
.rw-epoch-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.rw-epoch-name { font-weight: 800; }
.rw-epoch-top time { color: var(--faint); }
.rw-epoch-amt { font-family: var(--font-display); font-weight: 900; font-size: 24px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rw-epoch-amt b { color: var(--lime); }
.rw-epoch-amt small { margin-left: 8px; font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--muted); }
.rw-epoch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.rw-epoch-meta > span { margin-right: auto; }

/* ---------- leaderboard ---------- */
.rw-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rw-row {
  --w: 0%;
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr) auto 7.5em;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(74, 222, 128, 0.13) 0 var(--w), rgba(255, 255, 255, 0.03) var(--w) 100%);
  font-size: 15px;
}
.rw-row.is-me { border-color: rgba(74, 222, 128, 0.7); box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25); }
.rw-rank {
  display: grid; place-items: center;
  width: 2.2em; height: 2.2em; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900; font-variant-numeric: tabular-nums; font-size: 14px;
}
.rw-row.is-top1 .rw-rank { background: linear-gradient(180deg, #ffe066, #f5b700); color: #2a1c00; box-shadow: 0 0 16px rgba(255, 214, 10, 0.45); }
.rw-row.is-top2 .rw-rank { background: linear-gradient(180deg, #f1f3f6, #b9c0ca); color: #1d2129; }
.rw-row.is-top3 .rw-rank { background: linear-gradient(180deg, #f3b47a, #c47a3b); color: #2a1404; }
.rw-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.rw-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rw-amt b { font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--lime); }
.rw-amt-unit { color: var(--muted); font-weight: 700; font-size: 13px; }
.rw-amt small { display: block; color: var(--faint); font-size: 12.5px; }
.rw-n { text-align: right; color: var(--faint); font-size: 13px; white-space: nowrap; }

/* ---------- how it works and the addresses ---------- */
.rw-how { padding-top: clamp(16px, 3vw, 32px); }
.rw-steps .step h3 { font-size: 20px; }
.rw-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.rw-links li { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); }
.rw-links span { font-size: 12.5px; color: var(--faint); font-weight: 700; }
.rw-links a { color: var(--cream); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.rw-links a:hover { color: var(--orange-hi); }

/* ---------- home page card ---------- */
.rw-home-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(18px, 3vw, 36px);
  padding: clamp(22px, 3.4vw, 40px);
  border-radius: var(--radius-xl);
  border-color: rgba(74, 222, 128, 0.32);
  background:
    radial-gradient(80% 90% at 0% 0%, rgba(74, 222, 128, 0.16), rgba(74, 222, 128, 0) 60%),
    radial-gradient(70% 80% at 100% 100%, rgba(255, 122, 0, 0.14), rgba(255, 122, 0, 0) 60%),
    rgba(255, 255, 255, 0.04);
}
.rw-home-card > * { min-width: 0; }
.rw-home-copy { display: grid; gap: 14px; align-content: start; }
.rw-home-copy h2 { font-size: clamp(30px, 4.2vw, 50px); }
.rw-home-copy > p { color: var(--muted); font-size: clamp(15px, 1.5vw, 17px); max-width: 52ch; }
.rw-home-total {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  font-family: var(--font-display); font-weight: 900; font-stretch: 110%;
  font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.rw-home-total .rw-unit { font-size: 0.4em; }
.rw-home-total small { font-family: var(--font); font-size: clamp(16px, 1.8vw, 20px); font-weight: 800; color: var(--lime); letter-spacing: 0; }
.rw-home-total.is-bump > span:first-child { animation: rw-bump 1.2s var(--ease); }
.rw-home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rw-home-stats div { padding: 12px 14px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); min-width: 0; }
.rw-home-stats dt { font-size: 12.5px; color: var(--faint); font-weight: 700; }
.rw-home-stats dd { margin: 4px 0 0; font-weight: 900; font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-home-board { display: grid; gap: 10px; align-content: start; }
.rw-home-board h3 { font-size: 20px; }
.rw-home-board .rw-row { grid-template-columns: 2.4em minmax(0, 1fr) auto; padding: 10px 14px; }
.rw-home-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rw-home-note { font-size: 12.5px; color: var(--faint); }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .rw-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .rw-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rw-grid { grid-template-columns: minmax(0, 1fr); }
  .rw-home-card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .rw-row { grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; font-size: 14px; }
  .rw-n { display: none; }
  .rw-rank { width: 2em; height: 2em; font-size: 13px; }
  .rw-form { flex-direction: column; }
  .rw-form .btn { width: 100%; }
  .rw-facts { grid-template-columns: minmax(0, 1fr); }
  .rw-payouts li { grid-template-columns: 1fr auto; grid-template-areas: "round amt" "when tx" "share share"; }
  .rw-home-stats { grid-template-columns: minmax(0, 1fr); }
  .rw-home-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .rw-home-stats dd { margin: 0; }
  .rw-home-actions .btn { width: 100%; }
}
@media (max-width: 380px) {
  .rw-stats { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .rw-total.is-bump .rw-total-nvda, .rw-home-total.is-bump > span:first-child, .rw-epoch.is-new { animation: none; }
}
.rw-home-copy .new-pill { justify-self: start; }
