/* ============================================================
   Zuzu — Post-signup flow (Survey + Referral Leaderboard)
   Reuses tokens, buttons, nav & backdrop from landing.css
   ============================================================ */

/* ---------- slim top progress rail ---------- */
.flow-top{
  position: sticky; top:0; z-index: 70;
  background: rgba(239,231,211,0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(228,217,188,0.7);
}
.flow-top-inner{
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  height: 64px;
}
.flow-progress-bar{
  position:absolute; left:0; bottom:-1px; height:3px;
  background: linear-gradient(90deg, var(--orange), var(--green));
  border-radius: 0 3px 3px 0; transition: width .5s cubic-bezier(.4,1.4,.5,1);
  width: 0;
}
.treat-counter{
  display:inline-flex; align-items:center; gap:8px;
  background: var(--surface); border:2px solid var(--ink); border-radius: 999px;
  padding: 7px 15px 7px 11px; font-weight: 800; font-size: 14px; color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.treat-counter .tic{
  width: 22px; height:22px; border-radius:7px; background: var(--orange-soft);
  display:grid; place-items:center; color: var(--orange-dark);
}
.treat-counter .num{ font-variant-numeric: tabular-nums; min-width: 1.4em; text-align:right; }
.treat-counter.bump{ animation: treatPop .45s cubic-bezier(.4,1.6,.5,1); }
@keyframes treatPop{ 0%{ transform: scale(1) } 40%{ transform: scale(1.12) } 100%{ transform: scale(1) } }
.treat-fly{
  position: fixed; z-index: 90; pointer-events:none; font-weight:900; font-size: 18px;
  color: var(--orange-dark); display:flex; align-items:center; gap:4px;
  animation: treatFly 1s ease-out forwards;
}
@keyframes treatFly{
  0%{ opacity:0; transform: translateY(0) scale(.6) }
  20%{ opacity:1 }
  100%{ opacity:0; transform: translateY(-70px) scale(1.1) }
}

/* ============================================================
   SURVEY
   ============================================================ */
.survey{ padding: 0 0 60px; }
.survey-grid{
  display:grid; grid-template-columns: 360px 1fr; gap: 0;
  min-height: calc(100vh - 64px);
}

/* left companion rail */
.s-rail{
  position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px);
  padding: 40px 38px; display:flex; flex-direction:column;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(420px 360px at 30% 8%, rgba(255,226,201,0.55), transparent 60%),
    var(--bg-soft);
}
.s-rail .step-tag{
  font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--green-dark);
}
.s-rail .rail-track{ height: 8px; background: var(--line); border-radius:999px; overflow:hidden; margin: 12px 0 30px; }
.s-rail .rail-fill{ height:100%; width:0; border-radius:999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  transition: width .5s cubic-bezier(.4,1.4,.5,1); }

.s-pet-stage{
  margin-top: 28px; position: relative;
  border-radius: 26px; padding: 26px 22px 0;
  background: radial-gradient(circle at 50% 30%, var(--orange-soft) 0%, #F7EBD2 60%, transparent 100%);
  display:flex; flex-direction:column; align-items:center;
}
.s-pet-stage .speech{
  background: var(--surface); border:2px solid var(--ink); border-radius: 18px;
  padding: 13px 16px; font-size: 14px; font-weight:600; color: var(--ink); line-height:1.45;
  box-shadow: 0 5px 0 var(--ink); position: relative; text-wrap:pretty; max-width: 250px;
  transition: opacity .25s;
}
.s-pet-stage .speech::after{
  content:''; position:absolute; bottom:-11px; left: 34px;
  width: 16px; height:16px; background: var(--surface);
  border-right:2px solid var(--ink); border-bottom:2px solid var(--ink);
  transform: rotate(45deg);
}
.s-pet-stage .pet{
  width: 168px; height: 168px; object-fit: contain; object-position: bottom;
  margin-top: 14px; filter: drop-shadow(0 14px 14px rgba(31,15,8,0.20));
}
/* on the final screen, drop the left-rail guide so there's only the one fox above the headline */
body.on-done .s-pet-stage{ display:none; }

/* right question pane */
.s-main{ display:flex; align-items:flex-start; justify-content:center; padding: 56px 40px; }
.q-wrap{ width: 100%; max-width: 600px; }
.q-step{ display:none; }
.q-step.active{ display:block; animation: qIn .45s cubic-bezier(.2,.7,.3,1); }
@keyframes qIn{ from{ opacity:0; transform: translateY(14px) } to{ opacity:1; transform: none } }

.q-num{ font-size: 13px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase; color: var(--orange-dark); }
.q-title{
  font-family: var(--font-disp); font-weight:800; font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08; letter-spacing:-0.02em; color: var(--ink); margin: 12px 0 0; text-wrap:balance;
}
.q-help{ font-size: 16px; color: var(--ink-soft); margin: 14px 0 0; line-height:1.55; text-wrap:pretty; }
.q-help .opt-flag{ color: var(--ink-dim); font-weight:600; }

.q-body{ margin-top: 30px; }

/* option grids */
.opt-grid{ display:grid; gap: 12px; }
.opt-grid.cols2{ grid-template-columns: 1fr 1fr; }

.opt{
  display:flex; align-items:center; gap: 14px; text-align:left; width:100%;
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px;
  padding: 16px 18px; transition: transform .12s, border-color .15s, background .15s, box-shadow .12s;
  position: relative;
}
.opt:hover{ transform: translateY(-2px); border-color: var(--ink); }
.opt .o-ic{ width: 44px; height:44px; border-radius: 13px; display:grid; place-items:center; flex:none;
  background: var(--surface-2); color: var(--orange-dark); }
.opt .o-txt b{ display:block; font-size: 16px; font-weight:800; color: var(--ink); }
.opt .o-txt span{ display:block; font-size: 13px; color: var(--ink-soft); margin-top:2px; line-height:1.4; }
.opt .o-check{
  margin-left:auto; width: 24px; height:24px; border-radius: 50%; flex:none;
  border: 2px solid var(--line); display:grid; place-items:center; color:#fff;
  transition: background .15s, border-color .15s; background: transparent;
}
.opt .o-check svg{ opacity:0; transition: opacity .12s; }
.opt.sel{ border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 4px 0 var(--orange-dark); }
.opt.sel .o-ic{ background: var(--orange); color:#fff; }
.opt.sel .o-check{ background: var(--green); border-color: var(--green); }
.opt.sel .o-check svg{ opacity:1; }
.opt.compact{ padding: 15px 18px; }
.opt.compact .o-txt b{ font-size: 15px; }

/* chips (multi-select) */
.chips{ display:flex; flex-wrap:wrap; gap: 11px; }
.chip{
  display:inline-flex; align-items:center; gap:8px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 999px;
  padding: 12px 18px; font-size: 15px; font-weight:700; color: var(--ink);
  transition: transform .12s, border-color .15s, background .15s, box-shadow .12s;
}
.chip:hover{ transform: translateY(-2px); border-color: var(--ink); }
.chip .ck{ width:18px; height:18px; border-radius:6px; border:2px solid var(--line); display:grid; place-items:center; color:#fff; transition: all .12s; }
.chip .ck svg{ opacity:0; }
.chip.sel{ border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 3px 0 var(--orange-dark); }
.chip.sel .ck{ background: var(--green); border-color: var(--green); }
.chip.sel .ck svg{ opacity:1; }
.chip.disabled{ opacity: .42; pointer-events:none; }

.pick-meter{
  display:inline-flex; align-items:center; gap:8px; margin-bottom: 18px;
  font-size: 13px; font-weight:800; color: var(--ink-soft);
  background: var(--surface-2); border:1.5px solid var(--line); border-radius:999px; padding: 6px 14px;
}
.pick-meter .pm-num{ color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.pick-meter.full{ color: var(--green-dark); background: var(--green-soft); border-color: var(--green); }

/* feature options (icon cards in a 2-col grid) */
.feat-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.feat{
  display:flex; align-items:flex-start; gap: 12px; text-align:left;
  background: var(--surface); border:2px solid var(--line); border-radius: 16px; padding: 14px;
  transition: transform .12s, border-color .15s, background .15s, box-shadow .12s;
}
.feat:hover{ transform: translateY(-2px); border-color: var(--ink); }
.feat .f-ic{ width: 34px; height:34px; border-radius:10px; flex:none; display:grid; place-items:center;
  background: var(--surface-2); color: var(--orange-dark); }
.feat .f-tx{ font-size: 13.5px; font-weight:700; color: var(--ink); line-height:1.32; padding-top:2px; }
.feat.sel{ border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 3px 0 var(--orange-dark); }
.feat.sel .f-ic{ background: var(--orange); color:#fff; }
.feat.disabled{ opacity:.4; pointer-events:none; }

/* open text field */
.q-field{
  width:100%; background: var(--surface); border:1.5px solid var(--line); border-radius: 20px;
  padding: 18px 20px; font-family: inherit; font-size: 16px; color: var(--ink); line-height:1.55;
  resize: vertical; min-height: 150px; box-shadow: 0 2px 0 rgba(31,15,8,0.07); outline:none;
  transition: border-color .15s, box-shadow .15s;
}
.q-field::placeholder{ color: var(--ink-dim); }
.q-field:focus{ border-color: var(--orange); box-shadow: 0 3px 0 rgba(255,122,31,0.25); }

/* nav buttons */
.q-nav{ display:flex; align-items:center; gap: 14px; margin-top: 36px; }
.q-nav .btn-back{
  background: transparent; border:none; box-shadow:none; color: var(--ink-soft);
  font-weight:700; font-size:15px; padding: 10px 6px; display:inline-flex; align-items:center; gap:7px;
}
.q-nav .btn-back:hover{ color: var(--ink); transform:none; box-shadow:none; }
.q-nav .spacer{ flex:1; }
.q-nav .btn-skip{ background: transparent; border:none; box-shadow:none; color: var(--ink-dim); font-weight:700; font-size:14px; }
.q-nav .btn-skip:hover{ color: var(--ink-soft); transform:none; box-shadow:none; text-decoration: underline; }
.btn[disabled]{ opacity:.4; pointer-events:none; }

/* ---------- DONE screen ---------- */
.q-done{ text-align:center; max-width: 560px; margin: 0 auto; }
.q-done .done-pet{
  width: 200px; height:200px; object-fit:contain; margin: 0 auto;
  filter: drop-shadow(0 16px 16px rgba(31,15,8,0.22));
}
.q-done h2{ font-family: var(--font-disp); font-weight:800; font-size: clamp(32px,4vw,46px);
  letter-spacing:-0.02em; color: var(--ink); margin: 18px 0 0; text-wrap:balance; }
.q-done p{ font-size: 17px; color: var(--ink-soft); margin: 16px 0 0; line-height:1.6; text-wrap:pretty; }
.done-reward{
  display:inline-flex; align-items:center; gap:12px; margin: 26px 0 0;
  background: var(--ink); color:#fff; border-radius: 999px; padding: 13px 22px;
  font-weight:800; font-size:17px; box-shadow: var(--shadow-card);
}
.done-reward .tic{ width:28px;height:28px;border-radius:9px;background:var(--orange);display:grid;place-items:center; }
.done-cta{ margin-top: 32px; display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ============================================================
   REFERRAL LEADERBOARD
   ============================================================ */
.lb{ padding: 48px 0 80px; }
.lb-grid{ display:grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items:start; }

.lb-head{ text-align:center; max-width: 720px; margin: 0 auto 44px; }
.lb-head .kicker{ justify-content:center; }
.lb-head h1{
  font-family: var(--font-disp); font-weight:800; font-size: clamp(34px,4.6vw,56px);
  line-height:1.04; letter-spacing:-0.025em; margin: 14px 0 0; color: var(--ink); text-wrap:balance;
}
.lb-head h1 em{ color: var(--orange); font-style: italic; }
.lb-head p{ font-size: 18px; color: var(--ink-soft); margin: 18px auto 0; max-width: 34em; line-height:1.55; text-wrap:pretty; }

/* position hero card */
.pos-card{
  background: var(--ink); color: var(--surface); border-radius: 30px; padding: 34px;
  position: relative; overflow:hidden; box-shadow: var(--shadow-card);
}
.pos-card::before{
  content:''; position:absolute; inset:0;
  background: radial-gradient(460px 320px at 90% 120%, rgba(255,122,31,0.34), transparent 60%),
              radial-gradient(380px 280px at -5% -10%, rgba(14,150,105,0.30), transparent 60%);
}
.pos-card > *{ position:relative; z-index:2; }
.pos-card .pc-lab{ font-size: 12px; font-weight:800; letter-spacing:1.6px; text-transform:uppercase; color: rgba(255,252,245,0.66); }
.pos-card .pc-num{ font-family: var(--font-disp); font-weight:900; font-size: 72px; line-height:1; letter-spacing:-0.03em; margin-top: 6px; }
.pos-card .pc-num small{ font-size: 34px; color: var(--orange); margin-right: 4px; vertical-align: 6px; }
.pos-card .pc-moved{
  display:inline-flex; align-items:center; gap:7px; margin-top:14px;
  background: rgba(14,150,105,0.22); color: #6FE0B0; border:1px solid rgba(14,150,105,0.5);
  border-radius:999px; padding:7px 14px; font-size:13px; font-weight:800;
}
.pos-card .pc-bar{ height: 10px; background: rgba(255,255,255,0.14); border-radius:999px; overflow:hidden; margin-top: 26px; }
.pos-card .pc-bar i{ display:block; height:100%; width:62%; border-radius:999px; background: linear-gradient(90deg, var(--orange), var(--sun)); }
.pos-card .pc-foot{ display:flex; justify-content:space-between; font-size: 12.5px; color: rgba(255,252,245,0.7); font-weight:600; margin-top:10px; }
.pos-card .pc-foot b{ color:#fff; }

/* stat tiles */
.stat-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.stat{
  background: var(--surface); border:2px solid var(--ink); border-radius: 22px; padding: 20px;
  box-shadow: 0 5px 0 var(--ink);
}
.stat .s-ic{ width: 40px; height:40px; border-radius:12px; display:grid; place-items:center; margin-bottom: 12px; }
.stat.refs .s-ic{ background: var(--green-soft); color: var(--green-dark); }
.stat.treats .s-ic{ background: var(--orange-soft); color: var(--orange-dark); }
.stat .s-num{ font-family: var(--font-disp); font-weight:800; font-size: 38px; line-height:1; color: var(--ink); letter-spacing:-0.02em; }
.stat .s-lab{ font-size: 13.5px; color: var(--ink-soft); font-weight:600; margin-top: 6px; }

/* share / invite card */
.share-card{
  background: var(--surface); border:2px solid var(--ink); border-radius: 26px; padding: 26px;
  box-shadow: 0 6px 0 rgba(31,15,8,0.14);
}
.share-card h3{ font-family: var(--font-disp); font-weight:700; font-size: 23px; margin:0; color: var(--ink); letter-spacing:-0.01em; }
.share-card .sc-sub{ font-size: 14.5px; color: var(--ink-soft); margin: 8px 0 0; line-height:1.5; }
.share-card .sc-sub b{ color: var(--orange-dark); }
.link-row{
  display:flex; gap: 10px; margin-top: 20px;
  background: var(--surface-2); border:2px solid var(--ink); border-radius: 999px; padding: 6px 6px 6px 18px;
  box-shadow: 0 4px 0 var(--ink);
}
.link-row .lk{ flex:1; display:flex; align-items:center; font-size: 14.5px; font-weight:700; color: var(--ink); min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.link-row .copy-btn{
  flex:none; border:2px solid var(--ink); background: var(--ink); color:#fff;
  border-radius: 999px; padding: 11px 20px; font-weight:800; font-size:14px;
  display:inline-flex; align-items:center; gap:8px; transition: background .15s, transform .12s;
}
.link-row .copy-btn:hover{ background: var(--green-dark); }
.link-row .copy-btn.copied{ background: var(--green); }

.share-btns{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.sbtn{
  display:flex; flex-direction:column; align-items:center; gap:7px;
  background: var(--surface); border:2px solid var(--line); border-radius: 16px; padding: 14px 8px;
  font-size: 11.5px; font-weight:700; color: var(--ink-soft);
  transition: transform .12s, border-color .15s, color .15s;
}
.sbtn:hover{ transform: translateY(-2px); border-color: var(--ink); color: var(--ink); }
.sbtn .sb-ico{ width: 34px; height:34px; border-radius:11px; display:grid; place-items:center; color:#fff; }

/* reward tiers */
.tiers{ margin-top: 22px; }
.tiers h4{ font-size: 12px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase; color: var(--ink-dim); margin: 0 0 14px; }
.tier{
  display:flex; align-items:center; gap: 14px; padding: 13px 0; border-top:1px solid var(--line-soft);
}
.tier:first-of-type{ border-top:none; }
.tier .t-badge{ width: 42px; height:42px; border-radius:13px; display:grid; place-items:center; flex:none; font-weight:900; font-size:15px; }
.tier.done .t-badge{ background: var(--green); color:#fff; }
.tier.cur .t-badge{ background: var(--orange); color:#fff; border:2px solid var(--ink); }
.tier.locked .t-badge{ background: var(--surface-2); color: var(--ink-dim); border:1.5px dashed var(--line); }
.tier .t-tx b{ display:block; font-size: 15px; font-weight:800; color: var(--ink); }
.tier .t-tx span{ display:block; font-size: 13px; color: var(--ink-soft); margin-top:1px; }
.tier .t-state{ margin-left:auto; font-size: 12px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; }
.tier.done .t-state{ color: var(--green-dark); }
.tier.cur .t-state{ color: var(--orange-dark); }
.tier.locked .t-state{ color: var(--ink-dim); }

/* founders leaderboard */
.board{
  background: var(--surface); border:2px solid var(--ink); border-radius: 26px; padding: 10px 10px 14px;
  box-shadow: 0 6px 0 rgba(31,15,8,0.14);
}
.board-head{
  display:flex; align-items:center; justify-content:space-between; padding: 18px 18px 14px;
}
.board-head .bh-t{ font-family: var(--font-disp); font-weight:700; font-size: 22px; color: var(--ink); letter-spacing:-0.01em; }
.board-head .bh-pill{
  display:inline-flex; align-items:center; gap:7px; font-size: 11.5px; font-weight:800;
  letter-spacing:.4px; text-transform:uppercase; color: var(--orange-dark);
  background: var(--orange-soft); border:1.5px solid var(--orange); border-radius:999px; padding: 6px 12px;
}
.lb-row{
  display:flex; align-items:center; gap: 14px; padding: 13px 16px; border-radius: 16px;
}
.lb-row + .lb-row{ margin-top: 2px; }
.lb-row .rank{ width: 30px; text-align:center; font-family: var(--font-disp); font-weight:800; font-size: 18px; color: var(--ink-soft); flex:none; }
.lb-row .rank.medal{ color: var(--ink); }
.lb-row .av{
  width: 44px; height:44px; border-radius:50%; flex:none; overflow:hidden;
  display:grid; place-items:end center; border:2px solid var(--ink);
}
.lb-row .av img{ width: 40px; height:40px; object-fit:contain; transform: translateY(2px); }
.lb-row .nm{ flex:1; min-width:0; }
.lb-row .nm b{ display:block; font-size: 15px; font-weight:800; color: var(--ink); }
.lb-row .nm span{ display:block; font-size: 12.5px; color: var(--ink-soft); margin-top:1px; }
.lb-row .refs{ display:flex; align-items:center; gap:7px; font-weight:800; font-size: 14px; color: var(--ink); flex:none; }
.lb-row .refs .tic{ width:20px;height:20px;border-radius:6px;background:var(--orange-soft);display:grid;place-items:center;color:var(--orange-dark); }
.lb-row.gold{ background: linear-gradient(180deg,#FDF3D2,#FBE9B8); border:1px solid #EBCB73; }
.lb-row.gold .rank{ color:#B7860B; }
.lb-row.silver{ background: linear-gradient(180deg,#F4F1EA,#ECE7DA); }
.lb-row.bronze{ background: linear-gradient(180deg,#F6E8DC,#F0DCC9); }
.lb-row.you{ background: var(--ink); position: sticky; bottom: 8px; box-shadow: 0 10px 24px -12px rgba(31,15,8,0.6); }
.lb-row.you .rank{ color: var(--orange); }
.lb-row.you .nm b{ color:#fff; }
.lb-row.you .nm span{ color: rgba(255,252,245,0.7); }
.lb-row.you .refs{ color:#fff; }
.lb-row.you .av{ border-color: var(--orange); }
.board-gap{ display:flex; align-items:center; justify-content:center; gap:6px; padding: 8px 0; color: var(--ink-dim); }
.board-gap i{ width:4px;height:4px;border-radius:50%;background:var(--ink-dim); }

.lb-foot-note{
  text-align:center; font-size: 13.5px; color: var(--ink-soft); margin: 36px auto 0; max-width: 40em;
  line-height:1.6; text-wrap:pretty;
}

/* ---------- responsive ---------- */
@media (max-width: 940px){
  .survey-grid{ grid-template-columns: 1fr; }
  .s-rail{ position: static; height:auto; flex-direction: row; align-items:center; gap: 24px;
    border-right:none; border-bottom:1px solid var(--line); padding: 24px 28px; }
  .s-rail .rail-meta{ flex:1; }
  .s-rail .rail-track{ margin-bottom: 0; }
  .s-pet-stage{ margin-top:0; padding: 0; background:none; flex-direction: row; align-items:center; gap:14px; flex:none; }
  .s-pet-stage .speech{ display:none; }
  .s-pet-stage .pet{ width: 84px; height:84px; margin-top:0; }
  .s-main{ padding: 40px 28px; }
  .lb-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
  .opt-grid.cols2, .feat-grid{ grid-template-columns: 1fr; }
  .stat-row{ grid-template-columns: 1fr; }
  .pos-card .pc-num{ font-size: 58px; }
  .share-btns{ grid-template-columns: repeat(2,1fr); }
  .s-main{ padding: 32px 20px; }
}
