:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #101114;
  --muted: #626872;
  --muted-2: #858b94;
  --line: #dfe2e7;
  --accent: #111318;
  --soft: #eef0f3;
  --soft-2: #f8f9fa;
  --success: #42644a;
  --danger: #9b1c1c;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(12, 18, 28, .075);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 14% -8%, rgba(255,255,255,.98) 0, rgba(255,255,255,.72) 24rem, transparent 47rem),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 3px; }
button, input, textarea, select { font-family: inherit; }

.shell {
  width: min(940px, calc(100% - 34px));
  margin: 0 auto;
  padding: 26px 0 44px;
}

.brand-bar {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -.015em;
  text-decoration: none;
}
.brand-mark { width: 38px; height: 38px; display: block; }
.brand-tag {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero {
  padding: 48px 4px 34px;
  max-width: 790px;
}
.hero.compact { padding-bottom: 24px; }
.eyebrow {
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
h1 {
  font-size: clamp(42px, 6.5vw, 66px);
  line-height: 1.035;
  letter-spacing: -.022em;
  margin: 0;
  font-weight: 740;
}
h1 span { color: #50565f; }
h2 {
  font-size: clamp(25px, 3.5vw, 30px);
  line-height: 1.15;
  letter-spacing: -.022em;
  margin: 0 0 9px;
  font-weight: 720;
}
h3 {
  margin: 7px 0 9px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.015em;
}
p { line-height: 1.58; }
.lede {
  color: #4f5660;
  font-size: 18px;
  max-width: 680px;
  margin: 19px 0 0;
}

.card {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 38px);
  margin-bottom: 20px;
}
.primary-card { background: #fff; }
.action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 34px;
  align-items: center;
}
.action-copy > p:not(.step), .submit-card > div > p:not(.step) {
  color: var(--muted);
  max-width: 620px;
  margin: 0;
}
.action-copy strong { color: var(--ink); }
.step {
  margin: 0 0 9px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.action-button-wrap {
  min-width: 226px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}
.microcopy {
  color: var(--muted-2);
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
}
.full-width { grid-column: 1 / -1; margin: -4px 0 0; }

.button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(17,19,24,.16); outline-offset: 3px; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 7px 18px rgba(17,19,24,.14);
}
.button-primary:hover { box-shadow: 0 9px 23px rgba(17,19,24,.18); }
.button-secondary { background: #fff; }
.button-large { min-height: 52px; padding-inline: 24px; }

.result {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hidden { display: none; }
.qr-wrap {
  width: 174px;
  height: 174px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
}
#qrcode img, #qrcode canvas { display: block; }
.label { color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 7px; }
#referralLink { overflow-wrap: anywhere; font-weight: 650; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.result-note { color: var(--muted); font-size: 12px; margin: 13px 0 0; }

.submit-card { padding-bottom: 32px; }
form { margin-top: 22px; }
label { display: block; font-weight: 700; margin: 15px 0 8px; }
label span { color: var(--muted); font-weight: 500; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 14px 15px;
  color: var(--ink);
  font: inherit;
  outline: none;
}
input::placeholder, textarea::placeholder { color: #989da5; }
input:focus, textarea:focus, select:focus {
  border-color: #858b94;
  box-shadow: 0 0 0 3px rgba(17,19,24,.07);
}
form .button { margin-top: 14px; }
.form-note { color: var(--muted-2); font-size: 12px; margin: 12px 0 0; }
.form-note a { color: var(--ink); font-weight: 650; }
.removal-note { margin-top: 6px; }
.status { min-height: 1.4em; font-size: 14px; color: var(--success) !important; }
.status.error { color: var(--danger) !important; }

/* Prominent confirmation after a referral is successfully submitted. */
#submitStatus.success-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 0;
  margin: 18px 0 0;
  padding: 15px 16px;
  border: 1px solid #b9ddc4;
  border-radius: 14px;
  background: #f0faf3;
  color: #17632f !important;
}
.success-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}
.success-copy strong {
  color: #125426;
  font-size: 15px;
}
.success-copy span {
  color: #397248;
  font-size: 13px;
}

.turnstile-wrap { margin: 15px 0 2px; min-height: 65px; }

.content-section {
  padding: 54px 4px 36px;
  border-bottom: 1px solid var(--line);
}
.section-heading { max-width: 690px; }
.section-intro {
  max-width: 800px;
  color: var(--muted);
  font-size: 17px;
  margin: 15px 0 0;
}
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.info-card {
  background: rgba(255,255,255,.64);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.info-card p { color: var(--muted); margin: 0; }
.info-kicker {
  display: inline-block;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.terms-callout {
  color: var(--muted);
  font-size: 13px;
  margin: 17px 2px 0;
}
.terms-callout a { font-weight: 650; }
.contact-strip {
  margin-top: 24px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.64);
}
.contact-strip h3 { margin-top: 6px; }
.contact-strip p { color: var(--muted); margin: 0; max-width: 760px; }
.contact-strip a { color: var(--ink); font-weight: 650; }

.trust-section { padding-bottom: 50px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 30px;
  margin-top: 27px;
}
.trust-grid article {
  padding: 23px 0;
  border-top: 1px solid var(--line);
}
.trust-grid p { color: var(--muted); margin: 0; }
.trust-number { color: var(--muted-2); font-size: 11px; font-weight: 800; letter-spacing: .12em; }

footer {
  padding: 30px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); margin-bottom: 14px; }
.footer-mark { display: block; }
footer p { max-width: 850px; margin: 8px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 15px; }
.footer-links a { font-weight: 650; }

/* Admin */
.token-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.admin-toolbar { display: flex; gap: 18px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.admin-toolbar select { width: auto; }
.review-list { display: grid; gap: 12px; }
.review-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.review-item a { overflow-wrap: anywhere; }
.review-meta { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.review-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: end; }
.button.small { padding: 8px 12px; font-size: 13px; }
.button.danger { color: var(--danger); }

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 940px); padding-top: 17px; }
  .brand-tag { display: none; }
  .hero { padding: 37px 2px 26px; }
  h1 { font-size: clamp(39px, 11.5vw, 52px); letter-spacing: -.015em; line-height: 1.045; }
  .lede { font-size: 16px; margin-top: 16px; }
  .action-card { grid-template-columns: 1fr; gap: 20px; }
  .action-button-wrap { min-width: 0; }
  .microcopy { text-align: left; margin-left: 3px; }
  .result { grid-template-columns: 1fr; }
  .qr-wrap { width: 174px; height: 174px; }
  .benefit-grid, .trust-grid { grid-template-columns: 1fr; }
  .content-section { padding-top: 44px; }
  .review-item { grid-template-columns: 1fr; }
  .review-actions { justify-content: start; }
  .token-row { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .shell { width: min(100% - 20px, 940px); }
  .brand { font-size: 15px; }
  .brand-mark { width: 35px; height: 35px; }
  .hero { padding-top: 31px; }
  .card { border-radius: 19px; padding: 23px 20px; }
  .button-large { width: 100%; }
  .actions .button { flex: 1 1 auto; }
  .info-card { padding: 21px; }
}
