/* Vanilla baseline - minimal styling for Meta IAB */
:root {
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #374151 100%);
  color: white;
  -webkit-tap-highlight-color: transparent;
}

.bgOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 840px;
  text-align: center;
}

.panel {
  width: 100%;
  border-radius: 24px;
  padding: 22px 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.topBar[hidden] {
  display: none;
}

.topLeftSlot {
  min-width: 96px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.topRightSlot {
  min-width: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.progressWrap {
  flex: 1;
  max-width: 320px;
}

.progressTrack {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}

.progressFill {
  height: 100%;
  background: rgba(255, 90, 0, 0.9);
  width: 0%;
}

.heroKicker {
  display: inline-block;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 6px 14px;
  background: rgba(255, 90, 0, 0.15);
  border: 1px solid rgba(255, 90, 0, 0.3);
  border-radius: 999px;
  color: #ff9d6b;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.h1 {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  font-size: 64px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subhead {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: 22px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
}

.quizIntro {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  margin: 0 0 8px;
  line-height: 1.45;
}

.trustSignalsCompact {
  margin-top: 14px;
  opacity: 0.7;
}

.sectionTitle {
  margin: 0 0 10px;
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 40px;
}

.sectionSub {
  margin: 0 0 22px;
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  line-height: 1.45;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff5a00;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 14px;
  padding: 14px 24px;
  min-height: 48px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn:hover {
  box-shadow: 0 20px 56px rgba(255, 90, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn:active { transform: scale(0.98); }

.btnArrow {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.btn:hover .btnArrow {
  transform: translateX(4px);
}

.btnSecondary {
  background: rgba(255,255,255,0.12);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

/* Native radio input — visually hidden but kept in DOM for
   accessibility and native form behavior in WebViews */
.choiceRadio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.95);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  position: relative;
}

.choiceSelected {
  background: rgba(255, 90, 0, 0.16);
  border-color: rgba(255, 90, 0, 0.75);
  box-shadow: 0 18px 48px rgba(255, 90, 0, 0.10);
}

.choiceRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radio {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.45);
  background: transparent;
  flex: 0 0 auto;
  position: relative;
}

.radioDot {
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: rgba(255, 90, 0, 0.95);
  display: none;
}

.choiceSelected .radio {
  border-color: rgba(255, 90, 0, 0.95);
}

.choiceSelected .radioDot {
  display: block;
}

.row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.input {
  width: min(520px, 100%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 18px;
  padding: 14px;
  color: white;
  font-size: 16px; /* must be >=16px to prevent iOS auto-zoom */
  -webkit-appearance: none;
  appearance: none;
}

.input:focus {
  outline: none;
  border-color: rgba(255, 90, 0, 0.75);
  box-shadow: 0 0 0 6px rgba(255, 90, 0, 0.18);
}

.small {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-top: 12px;
}

/* Range slider — touch-friendly */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ff5a00;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(255, 90, 0, 0.35);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ff5a00;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(255, 90, 0, 0.35);
  cursor: pointer;
}

.sliderValue {
  font-size: 72px;
  font-weight: 900;
  color: #ff5a00;
  margin-top: 24px;
  text-align: center;
  line-height: 1;
}

.loadingContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: 32px;
  padding: 24px;
}

.loadingSpinner {
  position: relative;
  width: 80px;
  height: 80px;
}

.spinnerRing {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 4px solid transparent;
  border-top-color: #ff5a00;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinnerRing:nth-child(1) {
  animation-delay: -0.45s;
  border-top-color: rgba(255, 90, 0, 0.3);
}

.spinnerRing:nth-child(2) {
  animation-delay: -0.3s;
  border-top-color: rgba(255, 90, 0, 0.6);
}

.spinnerRing:nth-child(3) {
  animation-delay: -0.15s;
  border-top-color: #ff5a00;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loadingSteps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  width: 100%;
  max-width: 320px;
}

.loadingStep {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border-left: 3px solid rgba(255,255,255,0.1);
}

.loadingStep.active {
  color: rgba(255,255,255,0.95);
  background: rgba(255, 90, 0, 0.1);
  border-left-color: #ff5a00;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Output / results page ── */
.outLabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  margin: 0 0 6px;
}
.outTitle {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 20px;
  line-height: 1.15;
}

/* KPI strip */
.outKpiRow {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 0;
  margin-bottom: 24px;
}
.outKpiItem {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.outKpiVal {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.outKpiScore { color: #ff5a00; }
.outKpiLabel {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.outKpiDivider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* Overview */
.outOverview {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.7);
  margin: 0 0 28px;
}

/* Sections */
.outSection { margin-bottom: 28px; }
.outSectionHead {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

/* Comparison bars */
.outBarGroup { margin-bottom: 16px; }
.outBarGroup:last-child { margin-bottom: 0; }
.outBarMeta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.outBarSub { margin-top: 8px; }
.outBarName {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}
.outBarSub .outBarName {
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}
.outBarPct {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
}
.outBarSub .outBarPct { color: rgba(255,255,255,0.25); }
.outBarTrack {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}
.outBarFill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.outBarHigh { background: linear-gradient(90deg, #ff5a00, #ff9d6b); }
.outBarAvg { background: rgba(255,255,255,0.12); }

/* Why cards */
.outWhyCard {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.outWhyCard:last-child { border-bottom: none; }
.outWhyNum {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,90,0,0.12);
  color: #ff5a00;
  font-size: 12px;
  font-weight: 800;
}
.outWhyText {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
}

/* Framing tip */
.outFraming {
  background: rgba(255,90,0,0.05);
  border: 1px solid rgba(255,90,0,0.12);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
}
.outFramingLabel {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ff5a00;
  margin-bottom: 6px;
}
.outFramingText {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
  margin: 0;
  font-style: italic;
}

.pre {
  text-align: left;
  white-space: pre-wrap;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 16px;
  margin-top: 16px;
}

.unlockWrapper {
  position: relative;
  width: 100%;
}

.blurredResults {
  position: relative;
  pointer-events: none;
  user-select: none;
  filter: blur(12px);
  opacity: 0.4;
}

.unlockOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.unlockCard {
  background: rgba(28, 41, 56, 0.98);
  border: 2px solid rgba(255, 90, 0, 0.3);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.unlockIcon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: lockBounce 2s ease-in-out infinite;
}

@keyframes lockBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.trustSignals {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.trustItem {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.trustIcon {
  color: rgba(255, 179, 123, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.trustText {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

/* Sample results carousel */
.carouselSection {
  margin-top: 36px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.carouselLabel {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin: 0 0 12px 4px;
}

.carouselTrack {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;          /* Firefox */
}
.carouselTrack::-webkit-scrollbar { display: none; }

.carouselCard {
  flex: 0 0 160px;
  scroll-snap-align: start;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
}

.cardBlur {
  opacity: 0.85;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: none;
}

.cardIcon {
  font-size: 22px;
  line-height: 1;
}

.cardTitle {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.cardMeta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.prev-tag {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.prev-tagGreen {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
}

.prev-tagOrange {
  background: rgba(255, 90, 0, 0.15);
  color: #ffb37b;
}

.prev-tagBlue {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

.cardScore {
  font-size: 11px;
  font-weight: 900;
  color: #ff5a00;
}

.cardBar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
}

.cardBarFill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff5a00, #ff9d6b);
}

/* "+100 more" card */
.carouselCardMore {
  background: rgba(255,90,0,0.06);
  border-color: rgba(255,90,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardMoreInner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 14px;
  gap: 4px;
}

.cardMoreNum {
  font-size: 28px;
  font-weight: 900;
  color: #ff5a00;
  line-height: 1;
}

.cardMoreText {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.50);
  line-height: 1.3;
}

/* Testimonial */
.heroTestimonial {
  margin-top: 32px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  padding: 20px 24px;
}

.testimonialQuote {
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
  color: rgba(255,255,255,0.55);
  margin: 0 0 10px;
}

.testimonialAuthor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.testimonialName {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

.testimonialRole {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* ── Mobile-first: tablets and below ── */
@media (max-width: 760px) {
  .container {
    padding: 14px;
    align-items: flex-start;
  }
  .panel {
    padding: 16px 4px;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
  }
  .topBar { margin-bottom: 12px; }
  .topLeftSlot { min-width: 48px; }
  .topRightSlot { min-width: 48px; }

  .h1 { font-size: 32px; line-height: 1.15; }
  .heroKicker { font-size: 12px; margin-top: 12px; margin-bottom: 16px; padding: 5px 12px; }
  .subhead { font-size: 16px; margin-top: 14px; line-height: 1.45; }
  .quizIntro { font-size: 14px; margin-bottom: 6px; }
  .sectionTitle { font-size: 24px; }
  .sectionSub { font-size: 16px; margin-bottom: 16px; }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    font-size: 16px;
    min-height: 50px;
    border-radius: 12px;
  }
  .row { margin-top: 16px; }

  .trustSignals { gap: 10px; margin-top: 12px; }
  .trustIcon { font-size: 11px; }
  .trustText { font-size: 11px; }

  .grid { grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
  .choice { padding: 13px 14px; border-radius: 14px; font-size: 15px; }

  .sliderValue { font-size: 52px; margin-top: 16px; }

  .carouselSection { margin-top: 24px; }
  .carouselCard { flex: 0 0 140px; }
  .cardTitle { font-size: 12px; }
  .cardMoreNum { font-size: 24px; }

  .heroTestimonial { margin-top: 20px; }
  .testimonialQuote { font-size: 13px; }
  .testimonialName { font-size: 12px; }
  .testimonialRole { font-size: 12px; }

  .loadingContainer { margin-top: 24px; padding: 16px; gap: 24px; }
  .loadingSpinner { width: 60px; height: 60px; }
  .spinnerRing { width: 60px; height: 60px; }
  .loadingSteps { max-width: 100%; }
  .loadingStep { font-size: 14px; padding: 8px 12px; }

  .unlockCard { padding: 24px 18px; }
  .unlockIcon { font-size: 36px; margin-bottom: 12px; }
  .unlockOverlay { padding: 12px; }
  .blurredResults { filter: blur(8px); }

  .pre { padding: 14px; border-radius: 14px; }
  .input { border-radius: 12px; padding: 13px 14px; font-size: 16px; }

  .outTitle { font-size: 24px; margin-bottom: 16px; }
  .outKpiRow { padding: 14px 0; margin-bottom: 20px; }
  .outKpiVal { font-size: 15px; }
  .outOverview { font-size: 14px; }
  .outWhyText { font-size: 13px; }
  .outFramingText { font-size: 14px; }
  .outSection { margin-bottom: 24px; }
}

/* ── Small phones (iPhone SE, etc.) ── */
@media (max-width: 390px) {
  .container { padding: 10px; }
  .panel { padding: 12px 2px; }
  .h1 { font-size: 28px; }
  .subhead { font-size: 15px; }
  .sectionTitle { font-size: 22px; }
  .heroKicker { font-size: 11px; padding: 4px 10px; }
  .trustSignals { gap: 8px; }
  .trustIcon { font-size: 10px; }
  .trustText { font-size: 10px; }
  .carouselSection { margin-top: 16px; }
  .carouselCard { flex: 0 0 130px; }
  .cardBlur { padding: 14px 12px; }
  .heroTestimonial { margin-top: 16px; }
  .testimonialQuote { font-size: 12px; }
  .choice { padding: 12px; font-size: 14px; }
  .unlockCard { padding: 20px 14px; }
  .sliderValue { font-size: 44px; }
}
