.quiz-page{
  width:min(980px, calc(100% - 44px));
  margin: 20px auto 80px;
}
.quiz-shell{
  border-radius: 22px;
  border:1px solid var(--stroke2);
  background: rgba(10,14,30,.62);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding-bottom: 92px;
}

.overlay-dock{
  position:absolute;
  right:16px;
  bottom:16px;
  z-index: 6;
  width:min(340px, calc(100% - 32px));
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  pointer-events:none;
}

.music-toggle{
  position:relative;
  border-radius: 999px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  cursor: pointer;
  pointer-events:auto;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.music-toggle:hover{
  border-color: rgba(139,92,246,.55);
  transform: translateY(-1px);
}
.music-toggle.is-on{
  border-color: rgba(34,197,94,.5);
  background: rgba(34,197,94,.12);
}
.quiz-shell::before{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  border-radius:50%;
  left:-150px;
  top:-180px;
  background: radial-gradient(circle at center, rgba(99,102,241,.25), rgba(99,102,241,0));
  pointer-events:none;
}
.quiz-shell::after{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  border-radius:50%;
  right:-170px;
  bottom:-180px;
  background: radial-gradient(circle at center, rgba(29,214,242,.20), rgba(29,214,242,0));
  pointer-events:none;
}

.quiz-stage{
  position: relative;
  z-index:2;
  min-height: 596px;
}

.screen{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  visibility:hidden;
  z-index:0;
  opacity:0;
  pointer-events:none;
  transform: translateX(34px) scale(.99);
  transition: transform .24s ease, opacity .24s ease;
}
.screen.is-active{
  visibility:visible;
  z-index:2;
  opacity:1;
  pointer-events:auto;
  transform: translateX(0) scale(1);
}

.hook{
  justify-content:center;
  align-items:center;
  text-align:center;
  padding: 24px;
  gap:18px;
}
.hook h1{
  margin:0;
  font-size: clamp(36px, 5.1vw, 58px);
  line-height:1.04;
  letter-spacing:-.7px;
  max-width: 12ch;
}
.hook p{
  margin:0;
  color:var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 36ch;
  line-height:1.55;
}
.cred-list{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:6px;
}
.cred-pill{
  border-radius: 999px;
  border:1px solid rgba(99,102,241,.35);
  color:#c7d2fe;
  background: rgba(255,255,255,.03);
  font-size: 13px;
  font-weight:700;
  padding: 8px 12px;
}

.quiz-cta{
  position: relative;
  z-index: 3;
  margin-top: 12px;
  font-size:16px;
  padding:14px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #5b3bff 0%, #4a2bd6 100%);
  border:1px solid rgba(125,112,255,.7);
  color:#fff;
  font-weight:900;
  cursor:pointer;
  box-shadow:
    0 12px 28px rgba(74,43,214,.45),
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 0 30px rgba(99,102,241,.42);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, box-shadow .16s ease;
}
.quiz-cta:hover{
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px rgba(74,43,214,.48),
    0 0 0 1px rgba(255,255,255,.14) inset,
    0 0 44px rgba(99,102,241,.58);
}

.question-screen{
  padding:16px;
  gap:18px;
}
.quiz-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.question-screen #riskLive,
.question-screen #hackerDifficulty,
.question-screen #feedbackChip{
  display:none !important;
}
.quiz-progress-track{
  width:100%;
  height:12px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid var(--stroke2);
  overflow:hidden;
  margin-top:6px;
}
.quiz-progress-fill{
  width:0;
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, #2f7df6, #8b5cf6, #1dd6f2);
  box-shadow: 0 0 22px rgba(99,102,241,.45);
  transition: width .2s ease;
}
.hacker-difficulty{
  margin-top: 8px;
  font-size:12px;
  color:#d5ddff;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 800;
}
.question-title{
  margin:12px 0 2px;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing:-.4px;
  max-width: 22ch;
  line-height:1.18;
}

.answer-grid{
  display:grid;
  gap:12px;
  margin-top: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.answer-card{
  border-radius:16px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
  color:var(--text);
  text-align:left;
  padding:16px;
  min-height: 86px;
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  font-size:16px;
  font-weight:700;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.answer-card .emoji{font-size:22px; line-height:1;}
.answer-card:hover{
  transform: scale(1.02);
  border-color: rgba(139,92,246,.6);
  background: rgba(255,255,255,.06);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,.22);
}
.answer-card:active{transform: translateY(0);}
.answer-card.selected{
  border-color:#22c55e;
  box-shadow:0 0 20px rgba(34,197,94,.45), 0 10px 24px rgba(0,0,0,.25);
  transform: scale(1.02);
}
.answer-card.bad-answer{
  animation: shake .3s;
}

@keyframes shake{
  0%{transform:translateX(0)}
  25%{transform:translateX(-4px)}
  50%{transform:translateX(4px)}
  75%{transform:translateX(-3px)}
  100%{transform:translateX(0)}
}

.feedback-chip{
  align-self:flex-start;
  margin-top: 4px;
  border-radius: 999px;
  border:1px solid rgba(99,102,241,.45);
  background: rgba(255,255,255,.04);
  color:#d6ddff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight:700;
  opacity:0;
  transform: translateY(4px);
  transition: opacity .22s ease, transform .22s ease;
  line-height: 1.35;
  text-align: left;
}
.feedback-chip.is-visible{
  opacity:1;
  transform: translateY(0);
}
.feedback-chip.good{
  border-color: rgba(34,197,94,.4);
  background: rgba(34,197,94,.13);
}
.feedback-chip.medium{
  border-color: rgba(234,179,8,.45);
  background: rgba(234,179,8,.13);
}
.feedback-chip.bad{
  border-color: rgba(239,68,68,.5);
  background: rgba(239,68,68,.14);
}

.mid-screen,
.analysis-screen,
.email-screen{
  justify-content:center;
  align-items:center;
  overflow:hidden;
  padding: 20px;
  text-align:center;
  gap:16px;
}
.result-screen{
  justify-content:flex-start;
  align-items:stretch;
  overflow-y:auto;
  padding: 0 20px 36px;
  text-align:center;
  gap:16px;
}
.result-screen.is-active{
  position:relative;
}
.result-screen .result-card{
  margin: 0 auto 8px;
  min-height: 0;
}
.mid-card,
.analysis-card,
.email-card,
.result-card{
  width:min(700px, 100%);
  border-radius: 18px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
  padding: 24px;
  box-shadow: 0 22px 44px rgba(0,0,0,.32);
}
.result-card{
  width:min(600px, 100%);
  margin:0 auto;
  padding:0 8px 24px;
  border:none;
  background: transparent;
  box-shadow:none;
  text-align:center;
}
.result-hero{
  min-height: auto;
  display:block;
  align-items:flex-start;
  justify-content:center;
  padding: 0;
}
.result-hook{
  text-align:center;
  margin: 0 auto;
  max-width:600px;
}
.result-details{
  width:min(560px, 100%);
  margin:0 auto;
  padding-top: 10px;
  opacity:1;
  transform:none;
  pointer-events:auto;
  transition: opacity .45s ease, transform .45s ease;
}
.result-screen.details-visible .result-details{
  opacity:1;
  transform:none;
  pointer-events:auto;
}
.result-screen.details-visible .result-hero{
  min-height: auto;
  padding-bottom: 0;
}
.hook-label{
  font-size:12px;
  letter-spacing:.15em;
  text-transform:uppercase;
  opacity:.78;
  margin-bottom:16px;
}
.hook-headline{
  font-size: clamp(40px, 5vw, 56px);
  font-weight:800;
  line-height:1.18;
  max-width:560px;
  margin:0 auto;
  letter-spacing:-.02em;
}
.hook-headline span{
  font-size: clamp(92px, 16vw, 156px);
  font-weight:900;
  color:#22c55e;
  display:block;
  margin:14px 0 12px;
  line-height:1;
  letter-spacing:-.03em;
}
.hook-sub{
  opacity:.9;
  font-size:15px;
  margin-top:14px;
}
.result-hero-image{
  display:block;
  width:min(460px, 92%);
  height:auto;
  margin: 14px auto 6px;
  border-radius: 14px;
  opacity:1;
  transform:none;
  transition: opacity .45s ease, transform .45s ease;
}
.result-screen.details-visible .result-hero-image{
  opacity:1;
  transform:none;
}
.mid-card p,
.analysis-card p,
.email-card p,
.result-card p{
  margin: 10px auto 0;
  color:var(--muted);
  line-height:1.55;
  max-width: 54ch;
}
.mid-card h2,
.analysis-card h2,
.email-card h2,
.result-card h2{
  margin:0;
  letter-spacing:-.3px;
}

.next-btn,
.unlock-btn,
.share-btn{
  margin-top: 16px;
  border-radius: 13px;
  border:1px solid rgba(125,112,255,.7);
  background: linear-gradient(180deg, #5b3bff 0%, #4a2bd6 100%);
  color:#fff;
  cursor:pointer;
  font-weight:800;
  padding:12px 16px;
  transition: transform .14s ease, box-shadow .14s ease;
  box-shadow: 0 10px 26px rgba(74,43,214,.36), 0 0 24px rgba(99,102,241,.28);
}
.next-btn:hover,
.unlock-btn:hover,
.share-btn:hover{transform: translateY(-1px);}

.analysis-list{
  display:grid;
  gap:8px;
  text-align:left;
  margin: 16px auto 0;
  max-width: 430px;
  color:#d2daff;
  font-size:14px;
}
.analysis-item{
  opacity:.42;
  transition: opacity .2s ease, transform .2s ease;
  transform: translateX(-4px);
}
.analysis-item.is-active{
  opacity:1;
  transform: translateX(0);
}
.loading-track{
  width:100%;
  height:10px;
  margin-top:16px;
  border-radius:999px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.05);
  overflow:hidden;
}
.loading-fill{
  width:0;
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, #2f7df6, #8b5cf6, #1dd6f2);
  transition: width .2s ease;
}

.email-form,
.code-form{
  display:grid;
  gap:10px;
  margin-top:14px;
  max-width: 420px;
  margin-left:auto;
  margin-right:auto;
}
.email-input,
.code-input{
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.94);
  color:#0a1020;
  font-size:15px;
  padding: 12px 13px;
  outline:none;
}
.email-status,
.code-status{
  font-size:13px;
  min-height: 18px;
  color:#c7d2fe;
}
.code-help-row{
  margin-top: 8px;
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.code-help-btn{
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
  color:var(--text);
  border-radius: 12px;
  padding: 8px 11px;
  cursor:pointer;
  font-weight:700;
  transition: border-color .15s ease, transform .15s ease;
}
.code-help-btn:hover{
  border-color: rgba(139,92,246,.55);
  transform: translateY(-1px);
}

.result-score{
  font-size: clamp(48px, 8vw, 64px);
  line-height:1;
  font-weight:700;
  letter-spacing:-1px;
  margin: 8px 0;
  text-shadow: 0 0 26px rgba(99,102,241,.35);
  transition: color .18s ease;
}
.score-sub{
  color:var(--muted2);
  font-size:13px;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity:.6;
}
.result-header{
  text-align:center;
  margin:0 auto;
  max-width:560px;
}
.result-header .eyebrow{
  margin:0 auto 4px;
  font-size:13px;
  opacity:.88;
  width:100%;
  text-align:center;
}
.result-header h2{
  margin:6px 0 0;
  font-size: clamp(38px, 4.8vw, 50px);
  line-height:1.2;
  letter-spacing:-.02em;
}
.result-insights{
  display:grid;
  justify-items:center;
  text-align:center;
  gap:12px;
  margin:0 auto;
  max-width:520px;
}
.result-insights.compact{
  margin-bottom:0;
}
.hacker-rating{
  margin-top: 0;
  font-size: 14px;
  font-weight: 800;
  color: #dbe5ff;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.rank-line{
  margin-top: 0;
  font-size: 18px;
  font-weight: 700;
  color: #d9e2ff;
}
.norm-line{
  margin-top: 0;
  font-size: 15px;
  color: #b9c6ea;
}
.top-secure-badge{
  margin: 4px auto 0;
  display: inline-flex;
  align-items:center;
  gap:8px;
  border-radius: 999px;
  border:none;
  background: rgba(34,197,94,.16);
  color:#dcfce7;
  padding: 9px 14px;
  font-size:13px;
  font-weight:700;
}
.result-roast{
  color:#e0e7ff;
  font-size: 17px;
  max-width:500px;
  margin: 22px auto 0;
  line-height:1.9;
  opacity:.98;
  white-space: pre-wrap;
  text-align:center;
}
.reveal-analysis{
  display:none;
}
.analysis-hidden{
  max-height:none;
  overflow:visible;
  opacity:1;
  transition:none;
}
.analysis-hidden.is-open{
  max-height:none;
  opacity:1;
}

.result-meta{
  margin: 2px auto 0;
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  max-width:560px;
}
.meta-pill{
  border-radius:999px;
  border:none;
  color:#dbe5ff;
  padding: 9px 14px;
  font-size:13px;
  font-weight:600;
  background: rgba(255,255,255,.07);
}

.fix-list{
  margin-top: 0;
  margin-bottom: 0;
  display:grid;
  gap:14px;
  text-align:left;
  max-width: 560px;
  margin-left:auto;
  margin-right:auto;
}
.fix-item{
  border-radius: 14px;
  border:none;
  background: rgba(255,255,255,.06);
  padding: 14px 16px;
  color:#dbe4ff;
  font-size:15px;
}
.fix-item.is-actionable{
  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:flex-start;
  gap:12px;
  cursor:pointer;
  transition: background .15s ease;
}
.fix-item.is-actionable:hover{
  background: rgba(255,255,255,.08);
}
.fix-item.is-actionable input{
  margin-top: 2px;
  width:17px;
  height:17px;
  accent-color: #5b3bff;
  cursor:pointer;
}
.fix-item.is-actionable.is-done{
  background: rgba(34,197,94,.10);
}
.fix-item-copy{
  text-align:left;
  line-height:1.4;
  color:#dbe4ff;
}
.fix-impact{
  font-size:13px;
  border-radius:999px;
  border:none;
  color:#d9e4ff;
  padding:6px 10px;
  white-space:nowrap;
  background: rgba(99,102,241,.20);
}
.projection-box{
  margin: 16px auto 0;
  max-width: 560px;
  border-radius: 14px;
  border:none;
  background: rgba(99,102,241,.14);
  padding: 14px 16px;
  color:#e2e9ff;
  font-size:15px;
  line-height:1.6;
}
.projection-score{
  font-weight:900;
  color:#fff;
}
.fix-links,
.share-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
  max-width:560px;
  margin-left:auto;
  margin-right:auto;
}
.fix-links{
  margin: 0 auto;
}
.share-row{
  margin-top:14px;
}
.fix-links .btn,
.share-row .btn{
  padding: 11px 16px;
  border-radius: 13px;
}
.share-challenge{
  margin-top: 16px;
  color: #ced8f2;
  font-size: 14px;
  font-weight: 600;
}

.share-copy{
  width:100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 14px;
  border:none;
  background: rgba(255,255,255,.06);
  color:#dde6ff;
  padding: 14px 16px;
  font-size:14px;
  opacity:1;
  line-height:1.6;
  text-align:center;
}
.result-card .section-title-mini{
  margin: 34px auto 12px;
  font-size:14px;
  letter-spacing:.08em;
  opacity:.9;
  text-transform:uppercase;
  color:#e9edff;
  max-width:560px;
  text-align:center;
  font-weight:700;
}
.result-details .section-title-mini:first-child{
  margin-top:0;
}
.share-challenge{
  margin:18px auto 0;
  max-width:560px;
  text-align:center;
}

.live-activity{
  position:relative;
  z-index:1;
  pointer-events:none;
  border:1px solid rgba(99,102,241,.40);
  background: rgba(7,11,28,.9);
  color:#d9e2ff;
  border-radius: 14px;
  padding: 10px 12px;
  width:100%;
  max-width: 340px;
  font-size:13px;
  font-weight:700;
  opacity:0;
  transform: translateY(12px);
  transition: opacity .24s ease, transform .24s ease;
}
.live-activity.is-visible{
  opacity:1;
  transform: translateY(0);
}

@media (max-width: 860px){
  .quiz-shell{padding: 14px 14px 86px; min-height: 680px;}
  .overlay-dock{right:12px; bottom:12px; width:min(280px, calc(100% - 24px));}
  .quiz-stage{min-height: 650px;}
  .answer-grid{grid-template-columns: 1fr;}
  .question-title{max-width: 100%;}
  .live-activity{max-width: 280px;}
  .result-screen{padding: 12px 14px 20px;}
  .result-card{padding:0 0 20px;}
  .result-hero{min-height: clamp(390px, calc(100dvh - 280px), 560px); padding: clamp(12px, 3vh, 22px) 0 0;}
  .result-details{padding-top: 8px;}
  .hook-headline{font-size: clamp(34px, 9vw, 44px);}
  .hook-headline span{font-size: clamp(76px, 22vw, 118px);}
  .result-hero-image{width:min(360px, 92%); margin-top:14px;}
  .result-card .section-title-mini{margin:30px auto 12px;}
  .result-roast{font-size:16px;}

  .fix-links,
  .share-row{
    width: min(420px, 100%);
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    justify-items: stretch;
  }

  .fix-links .btn,
  .share-row .btn{
    width: 100%;
    min-width: 0;
    margin: 0;
    text-align: center;
  }

  .fix-links .btn:nth-child(odd):last-child,
  .share-row .btn:nth-child(odd):last-child{
    grid-column: 1 / -1;
    max-width: 220px;
    justify-self: center;
  }

  .share-copy,
  .share-challenge{
    width: min(420px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
}

@media (prefers-reduced-motion: reduce){
  .screen,
  .answer-card,
  .quiz-progress-fill,
  .feedback-chip,
  .result-details,
  .loading-fill,
  .next-btn,
  .unlock-btn,
  .share-btn,
  .quiz-cta,
  .live-activity{transition: none !important;}
}
