:root{
  --primary:#414BD6;
  --text:#101140;
  --muted:#6b7290;
  --bg:#ffffff;
  --card:#ffffff;
  --border:#e6e8f0;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
}
.app{min-height:100%;display:flex;flex-direction:column;align-items:center;padding:16px}
.header{width:100%;display:flex;justify-content:center;padding:26px 0 20px}
.brand-logo{max-width:200px;max-height:56px;width:auto;height:auto;object-fit:contain}

/* Card width */
.card{
  width:min(560px,92vw);
  background:var(--card);
  border:1px solid var(--border);
  border-radius:20px;
  padding:22px 22px 26px;
  box-shadow:0 18px 40px rgba(20,24,40,.06);
}

.progress{position:relative;height:8px;background:#f2f3f8;border-radius:999px;overflow:hidden;margin-bottom:10px}
.progress #progressBar{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--primary)}
#progressText{font-size:12px;color:var(--muted);margin-bottom:12px;text-align:right}

h2{margin:0 0 12px;font-size:22px}
.field{display:grid;gap:12px}
.grid2{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}

/* Inputs focus style */
.input{
  width:100%;padding:12px 14px;border-radius:12px;border:1px solid #dfe3ff;background:#fff;color:var(--text);
  transition:border .12s ease;
}
.input:focus{outline:none;border-color:#9199e9;box-shadow:none}

.hint{font-size:12px;color:var(--muted);margin-top:2px}
.error{font-size:12px;color:#c62828;margin-top:6px}

.opt{
  display:flex;align-items:center;gap:12px;
  background:#fafbff;
  border:1px solid var(--border);
  padding:14px 16px;border-radius:14px;
  transition:.15s ease;cursor:pointer;
}
.opt:hover{border-color:#cfd5ea;background:#fff}
.opt.selected{border-color:var(--primary);box-shadow:0 0 0 3px rgba(65,75,214,.12)}

.opt input{transform:scale(1.05)}

.other{margin-top:8px}

.nav{display:flex;gap:12px;margin-top:18px}
.btn{
  background:var(--primary);
  color:#fff;border:none;border-radius:14px;padding:12px 18px;font-weight:700;cursor:pointer;
  box-shadow:0 6px 16px rgba(65,75,214,.22);
}
.btn.ghost{background:#f1f3ff;color:var(--primary);border:1px solid #dfe3ff;box-shadow:none}
.btn:disabled{opacity:.6;cursor:not-allowed;box-shadow:none}

.step{display:none}
.step.active{display:block}

.result{margin-top:4px}

.hidden{display:none}
.resultBox{margin-bottom:18px;
  background:#fafbff;border:1px solid var(--border);border-radius:14px;padding:14px;white-space:normal
}

.foot{color:var(--muted);margin:18px auto 0;font-size:12px;text-align:center}

@media (max-width:520px){
  .brand-logo{max-width:120px}
  .nav{gap:10px;margin-top:32px}
  .two{grid-template-columns:1fr}
}


/* === Visual refresh to match Version B (no width/logic changes) === */
:root{
  --lavender:#F1EFFF; /* light fill for selected cards */
  --primary-600:#3A43C6;
  --shadow-soft:0 6px 18px rgba(20,24,40,.08);
}

/* Progress bar thicker + fully rounded */
.progress{height:8px;border-radius:9999px;overflow:hidden;background:#F3F4F8}
.progress #progressBar{background:var(--primary)}

/* Bigger title */
h2{font-size:28px;line-height:1.2;letter-spacing:-0.01em;margin:0 0 16px}

/* Option cards */
.opt{
  background:#fff;
  border:1px solid var(--border);
  padding:18px 18px;
  border-radius:16px;
  box-shadow:var(--shadow-soft);
  transition:background .2s ease, box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.opt:hover{border-color:#CBD2E9;box-shadow:0 10px 24px rgba(20,24,40,.10)}
.opt input{appearance:auto;transform:scale(1.05)}
.opt.selected{
  background:var(--lavender);
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(65,75,214,.14), 0 10px 24px rgba(20,24,40,.10);
  position:relative;
}
/* Right-aligned check icon */
.opt.selected::after{
  content:"✓";
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  width:24px;height:24px;line-height:24px;
  text-align:center;
  font-weight:700;
  color:#fff;
  background:var(--primary);
  border-radius:9999px;
  box-shadow:0 2px 8px rgba(65,75,214,.35);
}

/* Accessible focus ring */
.opt:focus-within{outline:none;box-shadow:0 0 0 3px rgba(65,75,214,.18)}

/* Buttons */
.nav{gap:12px;margin-top:22px}
.btn{
  background:var(--primary);
  color:#fff;
  border:none;
  border-radius:9999px;
  padding:14px 22px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(65,75,214,.25);
  transition:transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(65,75,214,.28)}
.btn:active{transform:translateY(0);box-shadow:0 8px 18px rgba(65,75,214,.25)}
.btn.ghost{
  background:#EEF0FF;
  color:var(--primary);
  border:1px solid #D9DEFF;
  box-shadow:none;
}
/* Disabled Next — solid gray pill (logic unchanged) */
.btn:disabled{
  background:#D6DAE8 !important;
  color:#fff !important;
  opacity:1;
  cursor:not-allowed;
  box-shadow:none;
}

/* Spacing & rhythm */
.field{gap:14px}
.grid2{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));row-gap:14px}
.card{padding:26px 26px 30px;border-radius:22px}

/* Result box slightly softer */
.resultBox{
  background:#fafbff;border:1px solid var(--border);border-radius:16px;padding:16px;
}

/* Keep widths intact — no changes */


/* === Adjustments per latest feedback === */
/* Page background */
body{background:#F9FAFA;}

/* Title spacing (more air above/below on every step) */
h2{margin-top:28px;margin-bottom:22px;}

/* Option cards: white cards, radio moved to the RIGHT */
.opt{position:relative;background:#FFFFFF;padding-right:48px;padding-left:18px;}
.opt input[type="radio"]{
  position:absolute;right:14px;top:50%;transform:translateY(-50%);
  width:22px;height:22px;accent-color:var(--primary);
  margin:0;
}
/* Remove previous right check bubble; rely on native radio at right */
.opt.selected::after{display:none}

/* Buttons row: align to container edges, rounded already */
.nav{display:flex;justify-content:space-between;align-items:center;width:100%;padding-top:10px;}
.nav .btn{min-width:120px}

/* Consistent gaps between question blocks and options */
.field{margin-top:10px;margin-bottom:6px}


/* === V3 feedback fixes === */
/* Remove big white card "plaque" and all shadows */
.card{background:transparent !important;border:none !important;box-shadow:none !important}

/* No shadows anywhere on option items */
.opt,.opt:hover,.opt.selected{box-shadow:none !important}
/* White cards */
.opt{background:#FFFFFF !important}
/* Selected state: only border + subtle lavender fill, no shadow */
.opt.selected{background:var(--lavender) !important;border-color:var(--primary) !important}

/* Title spacing doubled relative to options */
.step h2{margin-bottom:36px !important}

/* Hide radios by default; show only when selected (right side position preserved from v2) */
.opt input[type="radio"]{opacity:0 !important}
.opt.selected input[type="radio"]{opacity:1 !important}

/* Increase vertical gap between options slightly */
.field{gap:16px !important}

/* Make Start button full width like inputs */
#startBtn{width:100% !important}


/* V4 tweaks */
/* Make "Other country" input match option card height */
.other .input{
  padding:14px 16px !important;
  border-radius:14px !important;
  border:1px solid var(--border) !important;
  background:#FFFFFF !important;
  box-shadow:none !important;
}

/* Increase space beneath h2 globally a bit more */
.step h2{margin-bottom:40px !important}


/* === Minimal overrides (center headings, other-country height, result title size) === */
.step h2{ text-align:center !important; }
.opt{ min-height:56px; } /* establish a visual reference height for cards */
.other .input{
  height:56px !important;
  padding:14px 16px !important;
  border:1px solid var(--border) !important;
  border-radius:14px !important;
  background:#FFFFFF !important;
}
.result h3{
  font-size:28px !important;
  line-height:1.2 !important;
  letter-spacing:-0.01em;
  text-align:center !important;
}


/* === Other-country behaves as full option card === */
.opt{position:relative; min-height:56px;}
.opt-other{display:flex; align-items:center; gap:12px;}
.opt-other .input-inline{
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
  height:auto !important;
  line-height:1.3 !important;
  flex:1 1 auto;
}
/* position radio to the right */
.opt input[type="radio"]{ position:absolute; right:14px; top:50%; transform:translateY(-50%); }
/* placeholder color */
.opt-other .input-inline::placeholder{ color:#6b7290; }


/* Ensure Start button spans full width */
#startBtn{
  width:100% !important;
  flex:1 1 auto !important;
  display:block;
}

/* Split Back/Next to edges */
.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* Small caption under logo */
.header{display:flex;flex-direction:column;align-items:center;gap:6px}
.header-kicker{font-size:12px;line-height:1;color:#101140;opacity:.85}


/* === Mobile Start screen tune (no zoom, bigger targets) === */
@media (max-width: 520px){
  #startScreen h2{ font-size:34px; line-height:1.15; letter-spacing:-0.01em; text-align:center; }
  #startScreen .input{ font-size:18px; padding:16px 18px; border-radius:14px; }
  #startHint, #emailError{ font-size:14px; }
  #startBtn{ font-size:18px; height:56px; border-radius:16px; width:100%; }
}
/* iOS: enforce >=16px to avoid auto-zoom on focus */
@supports (-webkit-touch-callout: none){
  #startScreen .input{ font-size:18px; }
}


/* Mobile: larger Back/Next buttons */
@media (max-width:520px){
  .nav .btn{ 
    height:52px; 
    padding:0 22px; 
    font-size:16px; 
    border-radius:16px;
  }
}
/* Result: full-width Start Over button */
#restartBtn{ width:100%; display:block; }


/* === Instant hide of start screen when skip-quiz flag present on <html> === */
.skip-quiz #startScreen{ display:none !important; }


/* Lead-capture step */
#leadStep h2{ text-align:center; }
#leadStep .two{ grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:520px){
  #leadStep .two{ grid-template-columns:1fr; }
  #getResultsBtn, #leadBackBtn{ height:52px; }
}


/* Force Name + Email on two rows (all breakpoints) */
#leadStep .two{ display:grid; grid-template-columns:1fr; gap:12px; }

/* Avoid iOS zoom on focus: use >=16px font-size for inputs */
input, select, textarea { font-size:16px; }


/* Lead step — center sublines, slightly larger font, and more space before inputs */
#leadStep h2{ text-align:center; font-size:32px; }
#leadStep .lead-sub{ text-align:center; font-size:18px; margin:6px 0; }
#leadStep .lead-sub:last-of-type{ margin-bottom:18px; }
#leadStep .field{ margin-top:12px; }
#leadStep .two{ margin-top:6px; }
/* Ensure the extra hint stays small and centered */
#leadExtra{ text-align:center; }


/* Center the 'no spam' hint as well */
#leadHint{ text-align:center; }
/* Increase gap from 'Enter your email...' to inputs */
#leadStep .lead-sub:last-of-type{ margin-bottom:28px; } /* was 18px */

/* === Result block overrides (spacing + bold/size for first line) === */
#onScreen{
  font-size: 19px;      /* крупнее текст результата */
  line-height: 1.85;    /* больше расстояние между строками */
  letter-spacing: 0.01em;
}

#onScreen::first-line{ font-weight: inherit; font-size: inherit; letter-spacing: inherit; }


/* === HARD paragraph spacing inside result box === */
.resultBox > * + * { margin-top: 26px !important;  /* space between ANY two consecutive children */
}
.res-paragraph { margin: 26px 0 !important; display:block; }


/* === Compact bottom spacing for the last paragraph === */
.resultBox > *:last-child {
  margin-bottom: 6px !important; /* smaller space after the final line */
}

/* Slightly tighter spacing on small screens */
@media (max-width: 480px){
  .resultBox > * + * { margin-top: 20px !important; }
  .resultBox > *:last-child { margin-bottom: 4px !important; }
}


/* enforce bold in result */
.resultBox strong{ font-weight: 800; }


/* remove underline from CTA */
a.cta-wide, a.cta-wide:link, a.cta-wide:visited, a.cta-wide:hover, a.cta-wide:active{
  text-decoration: none !important;
}


/* === DreamLife custom result ticks & CTA === */
.dl-check{ display:inline-flex; vertical-align:middle; margin-right:10px; }
.dl-check svg{ width:18px; height:18px; stroke:#414BD6; fill:none; }
a.cta-wide, a.cta-wide:link, a.cta-wide:visited, a.cta-wide:hover, a.cta-wide:active{ text-decoration:none !important; }
.resultBox strong{ font-weight:800; }
.cta-wide{ display:block; text-align:center; margin-top:12px; width:100%; }


/* Email note under result buttons */
.email-note{ text-align:center; color:var(--text); font-size:16px; font-weight:700; margin:22px auto 0; }
