:root{
  --dark:#080E1B; --dark-deep:#050A12; --dark-soft:#0D1728;
  --cream:#F4F1EC; --cream-2:#EAE5DC; --line:#DDD8CF;
  --ink:#1A1E26; --ink-soft:#5A6070;
  --gold:#C9A86A; --gold-lite:#DFC18A; --gold-deep:#A98A4A;
  --white:#fff;
  --shadow:0 24px 60px -22px rgba(4,8,18,.60);
  --r:16px;
  --serif:"Fraunces",Georgia,serif;
  --sans:"Hanken Grotesk",-apple-system,sans-serif;
}
*{margin:0;padding:0;box-sizing:border-box}
button,a{touch-action:manipulation}
html,body{height:100%}
body{font-family:var(--sans);background:var(--dark);color:var(--ink);
  -webkit-font-smoothing:antialiased;overflow:hidden}

.grain{position:fixed;inset:0;z-index:9;pointer-events:none;opacity:.05;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}

/* ===== screen system ===== */
.screen{position:fixed;inset:0;display:flex;align-items:flex-start;justify-content:center;
  padding:clamp(14px,4vw,40px);opacity:0;visibility:hidden;transform:translateY(14px);
  transition:opacity .5s ease,transform .5s ease,visibility .5s;overflow-y:auto;z-index:1}
.intro-wrap,.lead-wrap,.result-wrap,.calc-wrap{margin-block:auto}
.screen.is-active{opacity:1;visibility:visible;transform:none;z-index:2}
.screen--dark{background:
  radial-gradient(120% 90% at 50% -10%, #0D1B30 0%, var(--dark) 46%, var(--dark-deep) 100%);
  color:var(--cream)}
.screen--cream{background:
  radial-gradient(120% 100% at 50% 0%, #fdfaf5 0%, var(--cream) 60%, var(--cream-2) 100%);
  color:var(--ink)}

/* ===== type ===== */
.display{font-family:var(--serif);font-weight:400;line-height:1.04;letter-spacing:-.015em;
  font-optical-sizing:auto}
.display em{font-style:italic;color:var(--gold-lite)}
.screen--cream .display em{color:var(--gold-deep)}
.eyebrow{font-size:.72rem;letter-spacing:.32em;text-transform:uppercase;font-weight:600;
  color:var(--gold-lite)}
.screen--cream .eyebrow{color:var(--gold-deep)}
.lede{font-size:clamp(1rem,2.4vw,1.18rem);line-height:1.55;color:rgba(247,242,234,.78);
  max-width:46ch;margin-inline:auto}
.screen--cream .lede{color:var(--ink-soft)}

/* logo + brand text */
.logo-w{width:240px;height:auto;opacity:.95;filter:brightness(0) invert(1)}
.logo-text{font-family:var(--serif);font-size:1.4rem;letter-spacing:.12em;font-weight:300;
  color:var(--cream);text-transform:uppercase;opacity:.92}

/* ===== buttons ===== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.55em;
  font-family:var(--sans);font-weight:600;font-size:1.02rem;letter-spacing:.01em;
  padding:1.05em 1.9em;border:none;border-radius:100px;cursor:pointer;
  transition:transform .25s cubic-bezier(.2,.8,.3,1),box-shadow .25s,background .25s;
  text-decoration:none}
.btn .arr{transition:transform .25s}
.btn:hover .arr{transform:translateX(4px)}
.btn--gold{background:linear-gradient(180deg,var(--gold-lite),var(--gold));color:#fff;
  box-shadow:0 14px 30px -10px rgba(201,168,106,.6)}
.btn--gold:hover{transform:translateY(-2px);box-shadow:0 20px 40px -10px rgba(201,168,106,.7)}
.btn--ghost{background:transparent;color:var(--cream);border:1.5px solid rgba(247,242,234,.32)}
.btn--ghost:hover{background:rgba(247,242,234,.08);border-color:var(--gold-lite);transform:translateY(-2px)}
.btn.full{width:100%}

/* ===== INTRO ===== */
.intro-wrap{max-width:680px;text-align:center;display:flex;flex-direction:column;
  align-items:center;gap:1.5rem;animation:rise .8s ease both}
#intro .display{font-size:clamp(2.3rem,7vw,4.1rem);margin-top:.3rem}
#intro .eyebrow{margin-bottom:-.4rem}
.meta-row{list-style:none;display:flex;gap:.7rem;flex-wrap:wrap;justify-content:center;
  font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;color:rgba(247,242,234,.6)}
.meta-row .dot{color:var(--gold)}
.credit{font-size:.8rem;color:rgba(247,242,234,.45);max-width:40ch;line-height:1.5}
@keyframes rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
.d-br{display:none}
@media(min-width:640px){.d-br{display:inline}}

/* ===== QUIZ ===== */
#quiz{flex-direction:column;justify-content:flex-start;padding-top:0}
.quiz-top{width:100%;max-width:720px;margin:0 auto;display:flex;align-items:center;gap:1rem;
  padding:clamp(18px,4vw,30px) 4px}
.logo-c{width:34px;height:34px;object-fit:contain;
  filter:brightness(0) saturate(100%) invert(35%) sepia(55%) saturate(900%) hue-rotate(10deg);opacity:.85}
.progress{flex:1;height:5px;background:var(--line);border-radius:100px;overflow:hidden}
.progress-fill{display:block;height:100%;width:10%;border-radius:100px;
  background:linear-gradient(90deg,var(--gold),var(--gold-lite));
  transition:width .5s cubic-bezier(.2,.8,.3,1)}
.counter{font-size:.78rem;letter-spacing:.15em;font-weight:600;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.quiz-stage{flex:1;width:100%;max-width:640px;margin:0 auto;display:flex;flex-direction:column;
  justify-content:center;padding:1rem 0 2rem}

/* multiple-choice question layout */
.question-wrap{display:flex;flex-direction:column;gap:1.2rem;animation:rise .35s ease both}
.q-text{font-family:var(--serif);font-weight:400;font-size:clamp(1.45rem,4vw,2rem);
  line-height:1.15;letter-spacing:-.01em;color:var(--ink)}
.options{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}
.option{background:rgba(255,255,255,.7);border:1.5px solid var(--line);border-radius:14px;
  padding:.9em 1em;font-family:var(--sans);font-size:.97rem;font-weight:500;color:var(--ink);
  cursor:pointer;text-align:left;line-height:1.35;
  transition:background .18s,border-color .18s,transform .18s,color .18s;
  touch-action:manipulation}
.option:hover{background:#fff;border-color:var(--gold);transform:translateY(-2px)}
.option.selected{background:linear-gradient(180deg,rgba(223,193,138,.22),rgba(201,168,106,.14));
  border-color:var(--gold);color:var(--ink)}

.back{position:fixed;left:clamp(16px,4vw,34px);bottom:clamp(16px,4vw,30px);
  background:none;border:none;color:var(--ink-soft);font-family:var(--sans);font-size:.9rem;
  font-weight:600;cursor:pointer;transition:color .2s;touch-action:manipulation}
.back:hover{color:var(--gold-deep)}

/* ===== LEAD ===== */
.lead-wrap{max-width:480px;width:100%;text-align:center;display:flex;flex-direction:column;
  align-items:center;gap:1.1rem;animation:rise .6s ease both}
.seal{font-size:.72rem;letter-spacing:.28em;text-transform:uppercase;font-weight:600;
  color:#fff;background:linear-gradient(180deg,var(--gold-lite),var(--gold));
  padding:.5em 1.2em;border-radius:100px}
#lead .display.sm{font-size:clamp(1.7rem,5vw,2.5rem)}
#leadForm{width:100%;display:flex;flex-direction:column;gap:.8rem;margin-top:.6rem;text-align:left}
.field{display:flex;flex-direction:column;gap:.4rem}
.field span{font-size:.82rem;font-weight:600;letter-spacing:.02em;color:rgba(247,242,234,.8)}
.field span i{font-weight:400;font-style:normal;color:rgba(247,242,234,.5)}
.field input{font-family:var(--sans);font-size:1.05rem;padding:.95em 1.1em;border-radius:12px;
  border:1.5px solid rgba(247,242,234,.18);background:rgba(247,242,234,.06);color:var(--cream);
  transition:border-color .2s,background .2s}
.field input::placeholder{color:rgba(247,242,234,.38)}
.field input:focus{outline:none;border-color:var(--gold-lite);background:rgba(247,242,234,.1)}
.field input.err{border-color:#e07840}
.fineprint{font-size:.78rem;color:rgba(247,242,234,.5);text-align:center;margin-top:.2rem}
.field .hint{font-size:.72rem;color:rgba(247,242,234,.45);margin-top:.1rem}
.ac-wrap{position:relative;width:100%;display:block}
.ac-box{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:30;list-style:none;
  background:var(--dark-soft);border:1px solid rgba(247,242,234,.16);border-radius:12px;
  box-shadow:var(--shadow);overflow:hidden;display:none;max-height:240px;overflow-y:auto}
.ac-box li{padding:.7em .95em;font-size:.92rem;color:rgba(247,242,234,.82);cursor:pointer;
  border-top:1px solid rgba(247,242,234,.07)}
.ac-box li:first-child{border-top:none}
.ac-box li.on,.ac-box li:hover{background:rgba(201,168,106,.2);color:var(--cream)}

/* ===== CALC ===== */
.calc-wrap{text-align:center;display:flex;flex-direction:column;align-items:center;gap:1.6rem}
.ring{width:120px;height:120px}
.ring svg{transform:rotate(-90deg)}
.ring circle{fill:none;stroke-width:6;stroke-linecap:round}
.ring-bg{stroke:rgba(247,242,234,.12)}
.ring-fg{stroke:var(--gold-lite);stroke-dasharray:327;stroke-dashoffset:327;
  animation:fill 2s cubic-bezier(.5,0,.2,1) forwards}
@keyframes fill{to{stroke-dashoffset:40}}
.calc-text{font-family:var(--serif);font-style:italic;font-size:1.3rem;color:rgba(247,242,234,.85)}

/* ===== RESULT ===== */
.result-wrap{max-width:620px;width:100%;text-align:center;display:flex;flex-direction:column;
  align-items:center;gap:1.2rem;padding:1.4rem 0 2.4rem;animation:rise .6s ease both}

/* score card */
.score-card{width:100%;background:rgba(255,255,255,.04);border:1px solid rgba(247,242,234,.1);
  border-radius:20px;padding:1.6rem 1.4rem 1.4rem;display:flex;flex-direction:column;align-items:center;gap:.5rem}
.score-big{font-family:var(--serif);font-weight:300;line-height:1;display:flex;align-items:baseline;
  justify-content:center;gap:.1em;margin:.2rem 0}
#scoreNum{font-size:clamp(5rem,20vw,8.5rem);color:var(--gold-lite);font-variant-numeric:tabular-nums}
.score-den{font-size:clamp(1.4rem,5vw,2rem);color:rgba(247,242,234,.4)}
.tier-badge-wrap{margin:.2rem 0}
.tier-pill{font-size:clamp(1.5rem,5vw,2.2rem);color:var(--gold-lite)}
.tier-desc{color:rgba(247,242,234,.72);line-height:1.6;max-width:46ch;font-size:.97rem;margin:.2rem auto 0}
.leaks{width:100%;text-align:left;background:rgba(255,255,255,.04);
  border:1px solid rgba(247,242,234,.1);border-radius:20px;padding:1.3rem 1.4rem}
.leaks-head{font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;font-weight:600;
  color:var(--gold-lite);margin-bottom:.9rem;text-align:center}
.leak-list{list-style:none;display:flex;flex-direction:column;gap:.75rem}
.leak-item{display:flex;flex-direction:column;gap:.2rem;padding:.7rem .9rem;
  background:rgba(247,242,234,.04);border-radius:12px;border-left:3px solid var(--gold)}
.leak-area{font-size:.82rem;font-weight:700;letter-spacing:.04em;color:var(--gold-lite);
  text-transform:uppercase}
.leak-tip{font-size:.9rem;line-height:1.5;color:rgba(247,242,234,.7)}

.book-embed{width:100%;background:rgba(255,255,255,.04);border:1px solid rgba(247,242,234,.1);
  border-radius:20px;padding:1.4rem}
.book-embed .eyebrow{display:block;margin-bottom:.6rem}
.book-head{display:flex;align-items:flex-start;gap:14px;text-align:left;margin-bottom:.8rem}
.agent-photo{width:68px;height:68px;border-radius:50%;object-fit:cover;object-position:center top;
  flex:none;border:2px solid var(--gold)}
.book-h{font-size:clamp(1.2rem,3.6vw,1.7rem);line-height:1.1;color:var(--cream);margin:.1rem 0}
.book-h em{font-style:italic;color:var(--gold-lite)}
.book-embed .book-sub{font-family:var(--sans);font-size:.88rem;color:rgba(247,242,234,.65);margin:0;line-height:1.5}
.book-proof{font-family:var(--sans);font-size:.8rem;color:var(--gold-lite);
  text-align:center;margin:.2rem 0 .9rem;letter-spacing:.02em}

/* Calendly embed */
.cal-wrap{border-top:1px solid rgba(247,242,234,.1);padding-top:.8rem;border-radius:14px;overflow:hidden;margin-top:.2rem}
.bw-step{display:flex;flex-direction:column;gap:.6rem}
.bw-hidden{display:none!important}
.bw-label{font-size:.75rem;letter-spacing:.18em;text-transform:uppercase;font-weight:600;
  color:rgba(247,242,234,.55)}
.bw-tz{font-weight:400;letter-spacing:.05em;text-transform:none;color:rgba(247,242,234,.35)}
.bw-days{display:grid;grid-template-columns:repeat(7,1fr);gap:.4rem}
.bw-day{background:rgba(247,242,234,.06);border:1.5px solid rgba(247,242,234,.12);
  border-radius:12px;padding:.5rem .2rem;display:flex;flex-direction:column;align-items:center;
  gap:.15rem;cursor:pointer;transition:background .18s,border-color .18s;touch-action:manipulation}
.bw-day:hover{background:rgba(201,168,106,.12);border-color:rgba(201,168,106,.4)}
.bw-day.active{background:linear-gradient(180deg,rgba(223,193,138,.2),rgba(201,168,106,.15));
  border-color:var(--gold)}
.bw-dn{font-size:.6rem;letter-spacing:.08em;text-transform:uppercase;color:rgba(247,242,234,.5);font-weight:600}
.bw-dd{font-family:var(--serif);font-size:1.1rem;color:var(--cream);line-height:1}
.bw-dm{font-size:.58rem;color:rgba(247,242,234,.4);text-transform:uppercase;letter-spacing:.06em}
.bw-times{display:grid;grid-template-columns:repeat(3,1fr);gap:.45rem}
.bw-time{background:rgba(247,242,234,.06);border:1.5px solid rgba(247,242,234,.12);
  border-radius:10px;padding:.55rem;font-family:var(--sans);font-size:.88rem;font-weight:600;
  color:var(--cream);cursor:pointer;transition:background .18s,border-color .18s;touch-action:manipulation;text-align:center}
.bw-time:hover:not(.taken){background:rgba(201,168,106,.12);border-color:rgba(201,168,106,.4)}
.bw-time.active{background:linear-gradient(180deg,var(--gold-lite),var(--gold));border-color:var(--gold);color:#fff}
.bw-time.taken{opacity:.3;cursor:not-allowed;text-decoration:line-through}
.bw-confirm-info{background:rgba(201,168,106,.1);border:1px solid rgba(201,168,106,.3);
  border-radius:12px;padding:.8rem 1rem;font-size:.92rem;color:var(--cream);
  line-height:1.5;margin-bottom:.6rem;display:flex;flex-direction:column;gap:.35rem}
.bw-confirm-row{display:flex;justify-content:space-between;align-items:center}
.bw-ci-label{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:rgba(247,242,234,.45);font-weight:600}
.bw-ci-val{font-weight:600;color:var(--gold-lite)}
.bw-fields{display:flex;flex-direction:column;gap:.65rem;margin-bottom:.8rem}
.bw-back-btn{background:none;border:none;font-family:var(--sans);font-size:.82rem;
  color:rgba(247,242,234,.45);cursor:pointer;margin-top:.4rem;text-align:center}
.bw-back-btn:hover{color:var(--gold-lite)}
.bw-success{align-items:center;text-align:center;padding:1.2rem 0}
.bw-check{width:56px;height:56px;border-radius:50%;background:linear-gradient(180deg,var(--gold-lite),var(--gold));
  display:grid;place-items:center;font-size:1.6rem;color:#fff}
.bw-success-title{font-family:var(--serif);font-size:1.6rem;color:var(--cream);margin:.4rem 0 .1rem}
.bw-success-sub{font-size:.92rem;color:var(--gold-lite);font-weight:600}
.bw-success-note{font-size:.85rem;color:rgba(247,242,234,.5);max-width:28ch;line-height:1.5}

.guide-note{font-family:var(--sans);font-size:.9rem;color:var(--cream);opacity:.8;
  text-align:center;max-width:30rem}
.guide-note a{color:var(--gold-lite);text-decoration:underline;cursor:pointer}
.foot{width:110px;margin-top:1rem;opacity:.8;filter:brightness(0) invert(1)}
#result .credit{color:rgba(247,242,234,.38);font-size:.78rem}

/* ===== MOBILE ===== */
@media(max-width:560px){
  body{overflow:hidden;-webkit-overflow-scrolling:touch}
  .screen{padding:20px 16px;-webkit-overflow-scrolling:touch}

  /* intro */
  .logo-w{width:200px}
  #intro .display{font-size:clamp(1.9rem,8vw,2.6rem)}
  .intro-wrap{gap:1.1rem}
  .lede{font-size:.97rem}

  /* quiz */
  .quiz-stage{justify-content:flex-start;padding:.6rem 0 5rem}
  .q-text{font-size:1.3rem}
  .options{grid-template-columns:1fr}
  .option{padding:.8em 1em;font-size:.94rem}

  /* lead */
  .lead-wrap{gap:.85rem;padding-bottom:5rem}
  #lead .display.sm{font-size:1.6rem}
  .field input{font-size:16px}

  /* result */
  .result-wrap{padding:.4rem 0 calc(2rem + env(safe-area-inset-bottom,0px));gap:.5rem}
  #scoreNum{font-size:4rem}
  .tier-desc{font-size:.9rem}
  .score-card{padding:1.2rem 1rem 1rem}
  .book-embed{padding:1rem}
  .book-head{gap:10px}
  .agent-photo{width:54px;height:54px}
  .book-h{font-size:1.15rem}
  .bw-days{gap:.3rem}
  .bw-day{padding:.4rem .15rem}
  .bw-dn{font-size:.6rem}
  .bw-dd{font-size:1rem}
  .bw-times{grid-template-columns:repeat(3,1fr)}
  .bw-time{font-size:.85rem;padding:.5rem .3rem}
  .foot{width:100px}
}

@media(max-width:380px){
  .logo-w{width:170px}
  #intro .display{font-size:1.75rem}
  .option{font-size:.88rem;padding:.7em .85em}
  .bw-days{gap:.2rem}
  .bw-day{padding:.3rem .1rem}
  .bw-dn{font-size:.55rem}
  .bw-dd{font-size:.88rem}
  .bw-time{font-size:.8rem}
}

/* iPhone home bar safe area */
@supports(padding:env(safe-area-inset-bottom)){
  .back{bottom:calc(clamp(16px,4vw,30px) + env(safe-area-inset-bottom))}
  .lead-wrap{padding-bottom:calc(5rem + env(safe-area-inset-bottom))}
}

@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
