:root {
  --emerald: #2DC080;
  --emerald-dark: #1F8F5C;
  --emerald-light: #E6F7EE;
  --gold: #F5C842;
  --gold-dark: #E5A82A;
  --text: #16201A;
  --text-muted: #5A6B62;
  --bg: #FFFFFF;
  --bg-alt: #F7F9F7;
  --border: #E5EAE7;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(20, 60, 40, .08);
  --max: 920px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PT Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--emerald-dark); }
img { display: block; max-width: 100%; height: auto; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, #2DC080 0%, #1F8F5C 100%);
  color: #fff;
  padding: 56px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.hero::before { width: 320px; height: 320px; top: -120px; right: -80px; }
.hero::after  { width: 220px; height: 220px; bottom: -80px; left: -60px; }
.hero .container { position: relative; z-index: 1; }
.hero-icon {
  width: 120px; height: 120px;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  margin: 0 auto 20px;
}
.hero h1 {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -.5px;
}
.hero-sub {
  font-size: 19px;
  opacity: .95;
  margin: 0 auto 32px;
  max-width: 520px;
}
.hero-sub strong { color: var(--gold); font-weight: 700; }

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
  font-family: inherit;
}
.btn-primary {
  background: var(--gold);
  color: #5A3B0E;
  box-shadow: 0 4px 14px rgba(245, 200, 66, .35);
}
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,.18);
  color: rgba(255,255,255,.7);
  cursor: not-allowed;
}
.btn-secondary-active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  text-decoration: none;
}
.btn-secondary-active:hover {
  background: rgba(255, 255, 255, .22);
  transform: translateY(-1px);
}

.version {
  margin: 4px 0 28px;
  opacity: .7;
  font-size: 13px;
}

.qr {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  color: var(--text);
  padding: 14px 18px 14px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  margin-top: 8px;
  text-align: left;
}
.qr img { width: 110px; height: 110px; border-radius: 6px; }
.qr p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text-muted); }

.ref-banner {
  margin: 28px auto 0;
  max-width: 560px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  text-align: left;
}
.ref-banner strong { color: var(--gold); font-weight: 700; letter-spacing: .5px; }
.ref-icon { font-size: 22px; flex-shrink: 0; }
.ref-copy {
  background: var(--gold);
  color: #5A3B0E;
  border: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.ref-copy:hover { background: var(--gold-dark); }

/* ---------- How ---------- */
.how, .referral, .faq { padding: 64px 0; }
.how { background: var(--bg); }
.how h2, .referral h2, .faq h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 32px;
  text-align: center;
  letter-spacing: -.3px;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin-inline: auto;
}
.steps li {
  display: flex;
  gap: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 20px 22px;
  border-radius: var(--radius);
}
.step-num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--emerald);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.steps h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.steps p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- Referral ---------- */
.referral { background: var(--bg-alt); }
.referral-sub {
  text-align: center;
  color: var(--text-muted);
  margin: -16px auto 28px;
  max-width: 520px;
}
.ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}
.ref-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 28px 20px;
  border-radius: var(--radius);
  text-align: center;
}
.ref-percent {
  font-size: 56px;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.ref-card p { margin: 0; color: var(--text-muted); font-size: 15px; }
.referral-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 24px auto 0;
  max-width: 520px;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  max-width: 720px;
  margin-inline: auto;
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 22px;
  color: var(--emerald);
  font-weight: 400;
  transition: transform .15s;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  color: var(--text-muted);
  margin: 12px 0 0;
  font-size: 15px;
}

/* ---------- Footer ---------- */
.footer {
  background: #0F2218;
  color: #B6C8BE;
  padding: 40px 0 28px;
  font-size: 14px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}
.footer-icon { border-radius: 10px; margin-bottom: 8px; }
.footer-name { font-weight: 700; color: #fff; margin: 0 0 2px; font-size: 15px; }
.footer-tag { margin: 0; color: #B6C8BE; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: #B6C8BE; text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.copy { margin: 0; padding-top: 20px; border-top: 1px solid #1B3225; opacity: .55; font-size: 13px; }

/* ---------- Static pages (privacy / terms) ---------- */
.doc-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}
.doc-page .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald-dark);
  text-decoration: none;
  margin-bottom: 16px;
  font-size: 14px;
}
.doc-page h1 { font-size: 28px; margin: 0 0 8px; }
.doc-page .updated { color: var(--text-muted); font-size: 13px; margin: 0 0 24px; }
.doc-page h2 { font-size: 19px; margin: 28px 0 8px; }
.doc-page p, .doc-page li { color: var(--text); }
.doc-page ul { padding-left: 20px; }

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 34px; }
  .hero-sub { font-size: 17px; }
  .hero-icon { width: 96px; height: 96px; border-radius: 22px; }
  .qr { flex-direction: column; text-align: center; }
  .how, .referral, .faq { padding: 48px 0; }
  .how h2, .referral h2, .faq h2 { font-size: 26px; }
  .ref-grid { grid-template-columns: 1fr; }
  .ref-percent { font-size: 48px; }
  .footer-grid { flex-direction: column; }
  .ref-banner { flex-wrap: wrap; }
  .btn { width: 100%; justify-content: center; }
}
