:root {
  --bg: #f3f6f2;
  --bg-elevated: #ffffff;
  --ink: #102418;
  --muted: #5b6b60;
  --line: #d5e0d6;
  --green: #0f6b3b;
  --green-deep: #0a4d2a;
  --saffron: #e07a2f;
  --saffron-soft: #fff1e4;
  --live: #1f8f4e;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(16, 36, 24, 0.08);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(224, 122, 47, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 107, 59, 0.10), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.shell { width: min(56rem, calc(100% - 2rem)); margin: 0 auto; }
.fill-ink { fill: var(--ink); }
.fill-green { fill: var(--green); }
.fill-saffron { fill: var(--saffron); }
.fill-flag-white { fill: #ffffff; }

.site-header { padding: 1.25rem 0 0.5rem; }
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 700; letter-spacing: -0.04em; font-size: 1.35rem;
}
.logo-mark { width: auto; height: 1.35rem; }
.brand .dot { color: var(--saffron); }
.site-header nav ul {
  display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; font-size: 0.92rem;
}
.nav-link { color: var(--muted); font-weight: 600; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); }

.page { padding: 0.5rem 0 4rem; }
.hero { text-align: center; padding: 1.25rem 0 0.5rem; }
.hero-compact { padding-bottom: 0.5rem; }
.eyebrow {
  margin: 0 0 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.75rem; font-weight: 700; color: var(--green);
}
.hero h1 {
  margin: 0; font-family: var(--display); font-size: clamp(2.2rem, 7vw, 3.6rem);
  letter-spacing: -0.04em; line-height: 0.95;
}
.hero h1 .dot { color: var(--saffron); }
.hero-lead {
  max-width: 40rem; margin: 1.5rem auto 0; color: var(--muted);
  font-size: 1.12rem; line-height: 1.55; text-wrap: balance;
}
.hero-lead strong { color: var(--saffron); font-weight: 700; }

.live-pill {
  display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: center;
  padding: 0.35rem 0.85rem; border-radius: 999px; background: rgba(255,255,255,0.85);
  border: 1px solid var(--line); color: var(--muted); font-size: 0.86rem;
}
.live-pill strong { color: var(--live); }
.live-stats { color: var(--ink); }
.pulse-wrap { position: relative; width: 0.55rem; height: 0.55rem; display: inline-block; }
.pulse-wrap.small { width: 0.4rem; height: 0.4rem; }
.pulse-core, .pulse {
  position: absolute; inset: 0; border-radius: 50%; background: var(--live);
}
.pulse { animation: ping 1.2s cubic-bezier(0,0,0.2,1) infinite; opacity: 0.55; }
@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.claim-card, .leaderboard, .stat-card, .empty-board, .revenue-band, .activity-panel {
  background: var(--bg-elevated); border: 1px solid var(--line); box-shadow: var(--shadow);
}

.claim-section {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  text-align: center;
  scroll-margin-top: 1.5rem;
}
.claim-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.75rem;
  font-size: clamp(1.55rem, 5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.claim-amount-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.claim-amount {
  display: inline-flex;
  align-items: baseline;
  color: var(--saffron);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 2px;
  font-weight: 800;
}
.claim-amount .rupee { margin-right: 0.05rem; }
.claim-amount input {
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  width: 5ch;
  min-width: 3ch;
  padding: 0;
  font-variant-numeric: tabular-nums;
}
.claim-help {
  margin: 0.7rem auto 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.claim-form { margin-top: 1.1rem; }
.claim-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
}
.claim-form-row select,
.claim-form-row #identity {
  height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  outline: none;
  padding: 0 0.9rem;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}
.claim-form-row select {
  width: 8.5rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.claim-form-row #identity { flex: 1 1 12rem; }
.claim-form-row .btn-primary {
  height: 2.85rem;
  margin: 0;
  padding: 0 1.35rem;
  white-space: nowrap;
}
.claim-hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.claim-form .form-error,
.claim-form .form-success {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
}

.activity-panel {
  margin: 1.75rem auto 0;
  max-width: 40rem;
  border-radius: 1.2rem;
  padding: 0.95rem 1.1rem 0.7rem;
}
.panel-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.panel-title.trending {
  font-size: 1.05rem;
}
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-list a {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.4rem 0;
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}
.activity-list li:first-child a { border-top: 0; }
.activity-name { font-weight: 700; }
.activity-rank { color: var(--muted); }
.activity-list time { margin-left: auto; color: var(--muted); white-space: nowrap; }
.activity-empty {
  margin: 0.4rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.stepper, .btn-primary, .btn-ghost, .claim-chip {
  border: 0; border-radius: 999px; cursor: pointer; font-weight: 700;
}
.stepper {
  width: 1.7rem; height: 1.7rem;
  display: inline-grid; place-items: center;
  background: var(--saffron-soft); color: var(--saffron);
  font-size: 1rem; line-height: 1;
}
.stepper:hover { background: #ffe3c8; }
.btn-primary {
  background: var(--green); color: #fff; padding: 0.8rem 1.2rem;
}
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost {
  background: transparent; border: 1px solid var(--line); padding: 0.35rem 0.8rem; font-size: 0.85rem;
}
.form-error { color: var(--danger); }
.form-success { color: var(--green); }

.board-section { margin-top: 1.75rem; }
.board-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.65rem;
}
.leaderboard { border-radius: 1.4rem; padding: 0.4rem 0.8rem; }
.empty-board { border-radius: 1.4rem; padding: 2.5rem 1.5rem; text-align: center; }
.empty-board h2 { margin: 0 0 0.5rem; font-family: var(--display); }
.empty-board p { margin: 0; color: var(--muted); }

@media (max-width: 720px) {
  .claim-form-row .btn-primary { width: 100%; }
  .claim-form-row select { width: 100%; }
}

.rank-row { position: relative; border-top: 1px solid var(--line); }
.rank-row:first-child { border-top: 0; }
.rank-1, .rank-2, .rank-3 {
  margin: 0.55rem 0; border: 2px solid transparent; border-radius: 1rem; border-top-style: solid;
}
.rank-1 { border-color: var(--saffron); background: rgba(224,122,47,0.08); }
.rank-2 { border-color: rgba(15,107,59,0.35); background: rgba(15,107,59,0.05); }
.rank-3 { border-color: rgba(15,107,59,0.18); background: rgba(15,107,59,0.03); }
.rank-link {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.95rem 0.2rem;
}
.rank-badge { min-width: 2.2rem; font-weight: 700; color: var(--muted); }
.rank-1 .rank-badge, .rank-2 .rank-badge, .rank-3 .rank-badge {
  background: var(--green); color: #fff; border-radius: 999px; text-align: center; padding: 0.1rem 0.4rem;
}
.rank-1 .rank-badge { background: var(--saffron); }
.rank-avatar {
  width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; display: grid; place-items: center;
  background: #e8f0ea; font-weight: 700;
}
.rank-main { min-width: 0; flex: 1; }
.rank-name { margin: 0; font-weight: 700; }
.rank-desc {
  margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-meta { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.8rem; }
.rank-bid { margin: 0; font-weight: 800; color: var(--green); }
.claim-chip {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  background: var(--saffron); color: #fff; padding: 0.2rem 0.7rem; font-size: 0.78rem;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.rank-row:hover .claim-chip { opacity: 1; pointer-events: auto; }

.pager { margin-top: 1rem; text-align: center; }
.pager-controls { display: flex; justify-content: center; gap: 0.35rem; flex-wrap: wrap; }
.pager-page {
  min-width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 999px;
  color: var(--green); font-weight: 700;
}
.pager-page.is-active { background: var(--green); color: #fff; }
.pager-range { color: var(--muted); font-size: 0.88rem; }

.revenue-band {
  margin: 2.5rem auto 0; max-width: 28rem; text-align: center; border-radius: 1.4rem; padding: 1.4rem;
}
.revenue-band p { margin: 0; color: var(--muted); }
.revenue-amount {
  margin: 0.4rem 0 !important; font-family: var(--display); font-size: clamp(2rem, 6vw, 3.2rem);
  color: var(--ink) !important; font-weight: 700;
}

.prose { max-width: 42rem; margin: 1rem auto 0; }
.prose h2 { font-family: var(--display); margin-top: 2rem; }
.prose p, .prose li { color: var(--muted); line-height: 1.65; font-size: 1.05rem; }
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.4rem 0;
}
.stat-card { border-radius: 1rem; padding: 1rem; }
.stat-value { margin: 0; font-family: var(--display); font-size: 1.4rem; font-weight: 700; }
.stat-label { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.85rem; }

.site-footer { padding: 2rem 0 2.5rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.site-footer a { color: var(--green); font-weight: 700; }
.footer-credit { margin: 0.55rem 0 0; font-size: 0.8rem; color: var(--muted); }
.footer-credit a { font-weight: 600; }

@media (max-width: 640px) {
  .amount-row { align-items: stretch; }
  .btn-primary { width: 100%; margin-left: 0; }
  .stat-grid { grid-template-columns: 1fr; }
}
