/* ============================================================
   Quiz Funnel — "Método Freezer Inteligente"
   Editorial style matched to the host page (Fraunces + Inter,
   cream/forest/terracotta/ochre, sharp .25rem radius, grain).
   ============================================================ */

.qz {
  --cream: 38 45% 92%;
  --paper: 36 30% 97%;
  --ink: 25 25% 10%;
  --forest: 150 60% 22%;
  --sage: 145 45% 38%;
  --terracotta: 14 65% 55%;
  --ochre: 38 75% 58%;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background-color: hsl(var(--cream));
  color: hsl(var(--ink));
  font-family: Inter, system-ui, sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}
.qz.qz-open { opacity: 1; visibility: visible; }
.qz * { box-sizing: border-box; }

/* grain overlay, identical recipe to the host page */
.qz::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.qz-shell {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 48px) clamp(20px, 5vw, 40px) 64px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ---- top bar: label + progress + close ---- */
.qz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}
.qz-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: hsl(var(--ink) / .55);
}
.qz-close {
  appearance: none;
  border: 1px solid hsl(var(--ink) / .25);
  background: transparent;
  color: hsl(var(--ink) / .7);
  width: 38px;
  height: 38px;
  border-radius: .25rem;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s ease;
  flex: none;
}
.qz-close:hover { background: hsl(var(--ink)); color: hsl(var(--cream)); border-color: hsl(var(--ink)); }

.qz-progress {
  height: 2px;
  width: 100%;
  background: hsl(var(--ink) / .15);
  position: relative;
  margin-bottom: clamp(28px, 6vh, 64px);
}
.qz-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: hsl(var(--forest));
  width: 0;
  transition: width .5s cubic-bezier(.65,0,.35,1);
}

/* ---- step body ---- */
.qz-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.qz-step { animation: qzIn .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes qzIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qz-fig {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: hsl(var(--terracotta));
  font-weight: 600;
  margin-bottom: 14px;
}
.qz-q {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 8px;
  color: hsl(var(--ink));
}
.qz-sub {
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.5;
  color: hsl(var(--ink) / .6);
  margin: 0 0 30px;
  max-width: 52ch;
}

/* ---- options ---- */
.qz-options { display: grid; gap: 12px; }
.qz-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  appearance: none;
  cursor: pointer;
  background: hsl(var(--paper));
  border: 1px solid hsl(var(--ink) / .18);
  border-radius: .25rem;
  padding: 18px 20px;
  color: hsl(var(--ink));
  font-family: inherit;
  font-size: clamp(15px, 2.3vw, 17px);
  font-weight: 500;
  line-height: 1.35;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.qz-opt:hover {
  border-color: hsl(var(--forest));
  transform: translateX(4px);
  box-shadow: -4px 4px 0 hsl(var(--forest) / .12);
}
.qz-opt-mark {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid hsl(var(--ink) / .3);
  display: grid;
  place-items: center;
  transition: all .18s ease;
}
.qz-opt:hover .qz-opt-mark { border-color: hsl(var(--forest)); }
.qz-opt.qz-sel .qz-opt-mark { background: hsl(var(--forest)); border-color: hsl(var(--forest)); }
.qz-opt-mark svg { width: 14px; height: 14px; stroke: hsl(var(--cream)); opacity: 0; transition: opacity .18s; }
.qz-opt.qz-sel .qz-opt-mark svg { opacity: 1; }
.qz-opt.qz-sel { border-color: hsl(var(--forest)); background: hsl(var(--forest) / .06); }
.qz-opt-emoji { flex: none; font-size: 22px; line-height: 1; width: 26px; text-align: center; }
.qz-opt-txt { flex: 1; }
.qz-opt-hint { display: block; font-weight: 400; font-size: 13px; color: hsl(var(--ink) / .5); margin-top: 2px; }

/* multi-select footer continue */
.qz-continue {
  margin-top: 24px;
  align-self: flex-start;
  appearance: none;
  cursor: pointer;
  border: none;
  background: hsl(var(--forest));
  color: hsl(var(--cream));
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  padding: 15px 32px;
  border-radius: .25rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background .25s ease, gap .25s ease, opacity .2s ease;
}
.qz-continue:hover { background: hsl(var(--terracotta)); gap: 16px; }
.qz-continue:disabled { opacity: .35; cursor: not-allowed; background: hsl(var(--ink) / .4); }
.qz-continue svg { width: 18px; height: 18px; stroke: currentColor; }

.qz-back {
  margin-top: 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: hsl(var(--ink) / .45);
  padding: 4px 0;
  align-self: flex-start;
  transition: color .2s;
}
.qz-back:hover { color: hsl(var(--ink)); }
.qz-back[hidden] { display: none; }

/* ---- loading / building plan ---- */
.qz-loading { text-align: center; padding: 40px 0; }
.qz-spinner {
  width: 54px; height: 54px; margin: 0 auto 28px;
  border: 2px solid hsl(var(--ink) / .15);
  border-top-color: hsl(var(--forest));
  border-radius: 50%;
  animation: qzSpin 1s linear infinite;
}
@keyframes qzSpin { to { transform: rotate(360deg); } }
.qz-loading .qz-q { font-size: clamp(24px, 4vw, 34px); }
.qz-load-line {
  font-size: 15px; color: hsl(var(--ink) / .6);
  margin: 6px 0; opacity: 0; animation: qzFade .4s ease forwards;
}
@keyframes qzFade { to { opacity: 1; } }

/* ---- result ---- */
.qz-result { animation: qzIn .6s cubic-bezier(.16,1,.3,1) both; }
.qz-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: hsl(var(--forest)); color: hsl(var(--cream));
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 20px; white-space: nowrap;
}
.qz-result-name {
  font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: clamp(30px, 6vw, 52px); line-height: 1.05; letter-spacing: -.015em;
  margin: 0 0 14px;
}
.qz-result-name em { font-style: italic; color: hsl(var(--terracotta)); }
.qz-result-lede { font-size: clamp(16px, 2.4vw, 18px); line-height: 1.55; color: hsl(var(--ink) / .72); margin: 0 0 28px; max-width: 54ch; }

.qz-card {
  border: 1px solid hsl(var(--ink) / .2);
  border-radius: .25rem;
  background: hsl(var(--paper));
  padding: clamp(22px, 4vw, 32px);
  margin-bottom: 22px;
}
.qz-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid hsl(var(--ink) / .12); padding-bottom: 18px; margin-bottom: 18px; }
.qz-card-tag { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: hsl(var(--ink) / .55); font-weight: 600; }
.qz-card-name { font-family: Fraunces, Georgia, serif; font-size: clamp(22px, 3.5vw, 28px); font-weight: 600; margin: 4px 0 0; }
.qz-price { text-align: right; }
.qz-price-old { font-size: 14px; color: hsl(var(--ink) / .45); text-decoration: line-through; display: block; }
.qz-price-now { font-family: Fraunces, Georgia, serif; font-size: clamp(28px, 5vw, 38px); font-weight: 600; color: hsl(var(--forest)); line-height: 1; }
.qz-price-now small { font-size: 14px; font-weight: 500; color: hsl(var(--ink) / .5); }

.qz-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.qz-feats li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: hsl(var(--ink) / .85); }
.qz-feats svg { flex: none; width: 18px; height: 18px; margin-top: 1px; stroke: hsl(var(--forest)); }
.qz-feats li.qz-feat-star { color: hsl(var(--ink)); font-weight: 600; }
.qz-feats li.qz-feat-star svg { stroke: hsl(var(--ochre)); }

.qz-cta {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; appearance: none; cursor: pointer; border: none;
  background: hsl(var(--forest)); color: hsl(var(--cream));
  font-family: inherit; font-weight: 600; font-size: clamp(16px, 2.6vw, 19px);
  letter-spacing: .01em; padding: 20px 28px; border-radius: .25rem;
  transition: background .25s ease, gap .25s ease;
  text-decoration: none;
}
.qz-cta:hover { background: hsl(var(--terracotta)); gap: 18px; }
.qz-cta svg { width: 20px; height: 20px; stroke: currentColor; }

.qz-assure { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; margin-top: 18px; }
.qz-assure span { font-size: 12.5px; color: hsl(var(--ink) / .6); display: inline-flex; align-items: center; gap: 6px; }
.qz-assure svg { width: 14px; height: 14px; stroke: hsl(var(--sage)); }

.qz-alt { text-align: center; margin-top: 22px; }
.qz-alt button {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; color: hsl(var(--ink) / .55); text-decoration: underline; text-underline-offset: 3px;
  transition: color .2s;
}
.qz-alt button:hover { color: hsl(var(--ink)); }

.qz-scarcity {
  margin-top: 26px; text-align: center; font-size: 13px; line-height: 1.5;
  color: hsl(var(--terracotta)); font-weight: 500;
  border-top: 1px solid hsl(var(--ink) / .12); padding-top: 20px;
}

@media (max-width: 560px) {
  .qz-opt { padding: 16px; gap: 12px; }
  .qz-card-top { flex-direction: column; }
  .qz-price { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .qz, .qz-step, .qz-result, .qz-progress-bar, .qz-opt, .qz-continue, .qz-cta { transition: none !important; animation: none !important; }
}
