:root {
  --grey: #3a3938;
  --blue: #2e85c7;
  --teal: #38b6ab;
  --yellow: #f7a81c;
  --red: #ea5160;
  --line: #dedede;
  --soft: #f7f7f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--soft);
  color: var(--grey);
  -webkit-font-smoothing: antialiased;
}

.page-bg { min-height: 100vh; padding: 16px; display: flex; justify-content: center; }

.widget {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--line);
}

/* ===== Hero ===== */
.hero {
  background: var(--grey);
  color: #fff;
  padding: 20px 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.hero .logo { height: 42px; width: auto; display: block; }
.step-pill { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #c4c4c3; font-weight: 700; }

.progress { height: 4px; background: var(--line); }
.progress-bar { height: 100%; width: 0%; background: var(--blue); transition: width 300ms ease; }

/* ===== Wizard main ===== */
main { padding: 36px 28px 20px; min-height: 320px; }

.step-label {
  display: inline-block;
  background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
}
.q { font-weight: 700; font-size: 26px; color: var(--grey); line-height: 1.2; margin: 14px 0 6px; }
.helper { font-size: 13px; color: #6b6b6a; font-style: italic; margin-bottom: 22px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .choices { grid-template-columns: 1fr; } }

.choice {
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
  padding: 16px 18px; cursor: pointer; transition: all 150ms;
  display: flex; gap: 12px; align-items: flex-start;
  text-align: left; font: inherit; color: inherit; width: 100%;
}
.choice:hover { border-color: var(--blue); background: #f0f7fc; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(46, 133, 199, 0.12); }
.choice.selected { border-color: var(--blue); background: #eaf3fa; }
.choice .icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.choice .lbl { font-weight: 700; font-size: 15px; color: var(--grey); line-height: 1.2; display: block; }
.choice .sub { font-size: 12px; color: #6b6b6a; margin-top: 3px; display: block; font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px;
  cursor: pointer; background: #fff; font: inherit; color: inherit;
}
.chip.selected { border-color: var(--blue); background: #eaf3fa; }

.fields { display: grid; gap: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 13px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 10px; font: inherit; background: #fff;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); }

/* ===== Footer ===== */
.step-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px 24px; border-top: 1px solid var(--line); gap: 12px;
}
.btn-back {
  background: #fff; border: 1.5px solid var(--line); color: #6b6b6a;
  padding: 10px 18px; border-radius: 8px;
  font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.btn-back:hover:not(:disabled) { border-color: var(--grey); color: var(--grey); }
.btn-back:disabled { opacity: 0.4; cursor: not-allowed; }

.trust-chip { font-size: 11px; color: #6b6b6a; display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.3px; }
.mono-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}

/* ===== Primary & secondary buttons ===== */
.btn-primary {
  background: var(--yellow); color: var(--grey);
  padding: 13px 22px; border-radius: 8px; border: none;
  font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer;
  transition: all 150ms;
}
.btn-primary:hover { background: #e59a15; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(247, 168, 28, 0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== Loading ===== */
.loading { text-align: center; padding: 40px 20px; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--line); border-top-color: var(--blue);
  border-radius: 50%; margin: 0 auto 16px;
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Error ===== */
.error { text-align: center; padding: 30px; color: var(--red); }

/* ===== Result hero ===== */
.result-hero {
  background: var(--grey); color: #fff;
  padding: 28px 28px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 4px solid var(--blue);
}
.result-hero .logo { height: 34px; margin-bottom: 10px; display: block; }
.result-title { font-weight: 700; font-size: 24px; margin: 0; line-height: 1.2; }
.result-sub { font-size: 11px; color: #c4c4c3; margin-top: 4px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.expert-pill {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.expert-pill .avatar-lg {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.expert-pill .name { font-size: 14px; }
.expert-pill .role { font-size: 10px; color: #c4c4c3; font-weight: 400; letter-spacing: 0.3px; margin-top: 1px; }
@media (max-width: 600px) {
  .result-hero { flex-direction: column; align-items: flex-start; }
}

/* ===== Result body ===== */
.result-body { padding: 20px; background: var(--soft); }

.expert-note {
  background: #fff; border-left: 3px solid var(--blue);
  padding: 14px 16px; margin: 0 0 14px;
  font-size: 13px; color: var(--grey); line-height: 1.5;
  border-radius: 0 8px 8px 0;
  display: flex; gap: 14px;
}
.expert-note .note-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.expert-note strong { color: var(--blue); }
.expert-note .signed { font-size: 11px; color: #6b6b6a; margin-top: 6px; font-weight: 700; letter-spacing: 0.3px; }

/* ===== Product card ===== */
.card {
  background: #fff; border-radius: 12px; overflow: hidden;
  margin-bottom: 14px; border: 1px solid var(--line);
  display: grid; grid-template-columns: 160px 1fr;
  transition: all 150ms;
}
.card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.06); }
.card.top { border: 2px solid var(--blue); }

.card .media { background: #f4f4f3; position: relative; display: flex; align-items: center; justify-content: center; font-size: 54px; color: #b5b5b4; }
.card .media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.badges-top { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.badge { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 4px; letter-spacing: 1px; text-transform: uppercase; }
.badge.rank { background: var(--blue); color: #fff; }
.badge.rank.best { background: var(--teal); }
.badge.urgency { background: var(--red); color: #fff; }

.card-body { padding: 16px 18px 18px; }
.brand-line { font-size: 11px; letter-spacing: 2px; color: #6b6b6a; font-weight: 700; text-transform: uppercase; }
.card-title { font-weight: 700; font-size: 19px; color: var(--grey); margin: 2px 0 10px; line-height: 1.2; }

.why-title {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--blue); font-weight: 700; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.why-list { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--grey); line-height: 1.55; }
.why-list li { margin-bottom: 3px; }
.why-list li::marker { color: var(--teal); font-weight: 700; }

.price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.price-block { display: flex; align-items: baseline; gap: 8px; }
.price { font-weight: 700; font-size: 22px; color: var(--grey); letter-spacing: -0.5px; }
.price-sale { color: var(--red); }
.price-original { font-size: 15px; color: #aaa; text-decoration: line-through; }
.stock { font-size: 11px; color: var(--teal); font-weight: 700; letter-spacing: 0.5px; }

.upsell {
  background: #eef9f8; border: 1px dashed var(--teal); border-radius: 8px;
  padding: 10px 12px; margin-top: 10px;
  display: flex; align-items: center; gap: 10px; font-size: 12px;
}
.upsell .gift { font-size: 20px; }
.upsell .txt strong { color: var(--grey); }
.upsell .txt { color: #4b4b4a; line-height: 1.4; }

.cta-row { display: flex; gap: 8px; margin-top: 12px; }
.cta-primary {
  flex: 1; background: var(--yellow); color: var(--grey);
  padding: 13px 16px; border-radius: 8px; border: none;
  font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer;
  text-align: center; text-decoration: none; display: inline-block;
  transition: all 150ms;
}
.cta-primary:hover { background: #e59a15; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(247, 168, 28, 0.4); }
.cta-secondary {
  background: #fff; color: var(--grey); padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 8px;
  font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer;
}
.cta-secondary:hover { border-color: var(--grey); }

@media (max-width: 480px) {
  .card { grid-template-columns: 1fr; }
  .card .media { height: 180px; }
}

/* ===== Social proof ===== */
.social-proof-strip {
  display: flex; justify-content: space-around;
  padding: 18px 20px; background: #fff;
  border-top: 1px solid var(--line); text-align: center;
}
.sp-item .num { font-weight: 700; font-size: 20px; color: var(--blue); }
.sp-item .lbl { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #6b6b6a; margin-top: 2px; font-weight: 700; }

.result-actions {
  text-align: center; padding: 14px;
}
.result-actions .btn-restart {
  background: transparent; border: 1.5px solid var(--line); color: #6b6b6a;
  padding: 10px 20px; border-radius: 8px;
  font-weight: 700; font-size: 13px; font-family: inherit; cursor: pointer;
}

/* ===== Hero scan-CTA (v2b refinement, steps 4 & 5) ===== */
.hero-scan {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: #fff; padding: 18px; border-radius: 12px;
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center;
  margin: 6px 0 14px;
}
@media (max-width: 560px) {
  .hero-scan { grid-template-columns: 1fr; text-align: center; }
  .hero-scan .hs-actions { justify-self: center; }
}
.hero-scan .hs-icon { font-size: 36px; line-height: 1; }
.hero-scan .hs-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.2; }
.hero-scan .hs-desc { margin: 0; font-size: 12px; opacity: 0.92; line-height: 1.4; }
.hero-scan .hs-actions { display: flex; flex-direction: column; gap: 6px; }
.hero-scan .hs-btn-white {
  background: #fff; color: var(--grey); padding: 8px 14px; border-radius: 6px;
  font-weight: 700; font-size: 12px; border: none; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.hero-scan .hs-btn-white:hover { background: #f4f4f3; transform: translateY(-1px); }
.hero-scan .hs-btn-ghost {
  background: transparent; color: #fff; padding: 7px 14px; border-radius: 6px;
  font-weight: 700; font-size: 11px; border: 1px solid rgba(255,255,255,0.5);
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.hero-scan .hs-btn-ghost:hover { background: rgba(255,255,255,0.12); }
.hero-scan .hs-privacy {
  grid-column: 1 / -1;
  font-size: 10px; opacity: 0.85;
  text-align: center; margin-top: 2px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.scan-divider {
  display: flex; align-items: center; gap: 12px;
  color: #9b9b9a; font-size: 11px; text-transform: uppercase;
  letter-spacing: 2px; margin: 16px 0 10px; font-weight: 700;
}
.scan-divider::before, .scan-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* Compact "mini" choice/field tiles gebruikt bij stap 4 en 5 als handmatige fallback */
.mini-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .mini-choices { grid-template-columns: 1fr; } }
.mini-choice {
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; transition: all 150ms;
  text-align: left; font: inherit; color: inherit;
}
.mini-choice:hover { border-color: var(--blue); background: #f0f7fc; }
.mini-choice.selected { border-color: var(--blue); background: #eaf3fa; }
.mini-choice .mc-label { font-size: 13px; font-weight: 700; color: var(--grey); display: block; }
.mini-choice .mc-sub { font-size: 11px; color: #6b6b6a; display: block; margin-top: 2px; font-weight: 400; }

.mini-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 560px) { .mini-fields { grid-template-columns: 1fr; } }
.mini-field {
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 8px 12px;
}
.mini-field label { display: block; font-size: 10px; font-weight: 700; color: #6b6b6a; letter-spacing: 0.3px; margin-bottom: 2px; }
.mini-field input, .mini-field select {
  width: 100%; border: none; outline: none; font: inherit;
  background: transparent; padding: 2px 0; color: var(--grey); font-weight: 700;
}

.scan-applied-chip {
  background: #eef9f8; border: 1px solid var(--teal); border-radius: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--grey);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.scan-applied-chip button {
  background: none; border: none; color: #6b6b6a; font-size: 12px;
  cursor: pointer; text-decoration: underline; font-family: inherit;
}
.scan-applied-chip button:hover { color: var(--grey); }

/* ===== Wizard main layout: content + trust-strip onderaan ===== */
main { display: flex; flex-direction: column; }
.step-content { flex: 1; }

.wizard-trust-strip {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.wizard-trust-strip .wts-note {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: #9b9b9a; font-weight: 700; margin-bottom: 8px;
}
.wizard-trust-strip .wts-items {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.wizard-trust-strip .wts-num {
  font-weight: 700; font-size: 16px; color: var(--blue);
}
.wizard-trust-strip .wts-lbl {
  font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  color: #6b6b6a; margin-top: 2px; font-weight: 700;
}
