/* ==========================================================================
   Test de Nivel · María Español
   Brand foundation + Step 0 "welcome" screen
   Ported from: .superpowers/brainstorm/167-1785668490/content/direccion-visual.html
   ========================================================================== */

:root{
  --teal:#4FB8AB;
  --teal-d:#2f9488;
  --teal-dd:#0f4d47;
  --orange:#E8511E;
  --yellow:#FFD102;
  --green:#23A455;
  --ink:#122320;
  --ink-soft:#3f524e;
  --muted:#7f918c;
  --bg:#eef6f4;
  --card:#ffffff;
  --ring:#e3efec;
  /* "Error suave" — ámbar cálido en vez de rojo, para no frustrar. */
  --warn:#F5A623;
  --warn-strong:#E0870A;
  --warn-bg:#fff6e3;
  /* Acierto — verde de marca (#2f9488) y su transparencia clara. */
  --ok:#2f9488;
  --ok-bg:rgba(47,148,136,.12);
}

*, *::before, *::after{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(79,184,171,.18), transparent 60%),
    radial-gradient(1000px 500px at -10% 110%, rgba(232,81,30,.10), transparent 55%),
    var(--bg);
  font-family:'Lato', system-ui, sans-serif;
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}

h1, h2, h3, h4, button, .cta, label{
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}

/* Brand logo — same size everywhere (matches the welcome screen: 46px), shown
   directly (the anagram is full-colour, reads on light and dark backgrounds). */
.r1-logo, .r3-logo, .gen-logo{
  height:80px;
  display:block;
  margin:0 auto 18px;
}
.r1-logo{ margin-bottom:20px; }
.gen-logo{ margin-bottom:22px; filter:drop-shadow(0 4px 12px rgba(0,0,0,.28)); }

/* --------------------------------------------------------------------------
   #app stage — centered card, holds whichever screen is active
   -------------------------------------------------------------------------- */

#app{
  max-width:780px;
  margin:0 auto;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:24px 0;
}

@media (min-width:720px){
  #app{
    padding:48px 0;
  }
}

/* The advanced report is a single-column premium layout — a comfortable
   reading width, a touch wider than the quiz screens. Desktop: +10% (820→902). */
#app[data-screen="report"]{
  max-width:902px;
}

/* Every screen <section> gets .screen. Default = visible. */
.screen{
  opacity:1;
  transform:none;
  transition:opacity .4s cubic-bezier(.22,.61,.36,1), transform .4s cubic-bezier(.22,.61,.36,1);
}
/* Apply .is-entering right before inserting a screen, then remove it on the next frame to animate in. */
.screen.is-entering{ opacity:0; transform:translateY(10px); }
/* Apply .is-leaving to fade a screen out before replacing it. */
.screen.is-leaving{ opacity:0; transform:translateY(-10px); }

/* Card shell shared by every screen rendered inside #app */
.intro,
.act,
.res,
.r1,
.gen,
.r3{
  background:var(--card);
  border-radius:26px;
  box-shadow:0 30px 70px -30px rgba(18,35,32,.35), 0 2px 0 rgba(255,255,255,.6) inset;
  overflow:hidden;
  border:1px solid #fff;
}

/* --------------------------------------------------------------------------
   Screen 1 — Bienvenida + Hiperpersonalización
   -------------------------------------------------------------------------- */

.intro{
  position:relative;
  padding:64px 40px 70px;
  text-align:center;
  background:linear-gradient(135deg, var(--teal-dd) 0%, #1a6f65 45%, var(--teal-d) 100%);
  color:#fff;
  overflow:hidden;
}

.intro .shape{
  position:absolute;
  pointer-events:none;
  opacity:.9;
}
.intro .s1{ top:-30px; left:-20px; width:150px; transform:rotate(-8deg); opacity:.35; }
.intro .s2{ bottom:-40px; right:-30px; width:220px; opacity:.28; }
.intro .s3{ top:40px; right:60px; width:60px; opacity:.9; }
.intro .s4{ bottom:60px; left:50px; width:44px; opacity:.9; }

.intro img.logo{
  height:46px;
  margin-bottom:26px;
  filter:drop-shadow(0 6px 16px rgba(0,0,0,.25));
}

.intro h2{
  font-weight:800;
  font-size:38px;
  line-height:1.08;
  margin:0 0 14px;
  letter-spacing:-.02em;
}
.intro h2 span{ color:var(--yellow); }

.intro .lead{
  font-size:17px;
  max-width:560px;
  margin:0 auto 30px;
  opacity:.92;
  line-height:1.55;
  font-family:'Lato', sans-serif;
}

.namebox{
  max-width:430px;
  margin:0 auto;
  text-align:left;
}
.namebox label{
  display:block;
  text-align:left;
  font-weight:600;
  font-size:13px;
  opacity:.85;
  margin:0 0 8px 4px;
}
.namebox input{
  width:100%;
  padding:17px 20px;
  border-radius:16px;
  border:0;
  font-size:17px;
  font-family:'Lato', sans-serif;
  box-shadow:0 10px 30px -8px rgba(0,0,0,.35);
  outline:3px solid rgba(255,255,255,.15);
}
.namebox input:focus{
  outline:3px solid rgba(241,197,0,.55);
}

.perc-q{
  opacity:.9;
  font-weight:600;
  font-size:17px;
  margin:26px 0 4px;
}

.chips{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  margin:22px 0 30px;
}
.chip{
  background:rgba(255,255,255,.12);
  border:1.5px solid rgba(255,255,255,.35);
  color:#fff;
  padding:12px 22px;
  border-radius:999px;
  font-weight:600;
  font-size:16.5px;
  backdrop-filter:blur(4px);
  transition:.2s;
  cursor:pointer;
}
.chip:hover{
  background:rgba(255,255,255,.2);
}
.chip.sel{
  background:var(--yellow);
  color:var(--ink);
  border-color:var(--yellow);
  transform:translateY(-2px);
}

.cta{
  display:inline-flex;
  align-items:center;
  gap:10px;
  /* Botón estilo María Español (home): naranja, rectángulo de esquinas suaves. */
  background:var(--orange);
  color:#fff;
  font-weight:700;
  font-size:17px;
  padding:16px 36px;
  border-radius:12px;
  border:0;
  box-shadow:none;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease;
}
.cta:hover{
  transform:translateY(-1px);
  background:#f15a2b;
}
.cta:active{
  transform:translateY(0);
}

.microcopy{
  margin-top:16px;
  font-size:15px;
  opacity:.8;
}

/* --------------------------------------------------------------------------
   Screen 2 — Actividad adaptativa
   -------------------------------------------------------------------------- */

.act-top{
  display:flex;
  align-items:center;
  gap:16px;
  padding:20px 30px;
  border-bottom:1px solid var(--ring);
}
.avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--teal), var(--teal-d));
  flex:none;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:800;
}
.prog{ flex:1; min-width:0; }
.prog .meta{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:15.5px;
  font-weight:600;
  color:var(--ink-soft);
  margin-bottom:9px;
  font-family:'Lato', sans-serif;
}
.prog .meta span:first-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.prog .meta span:last-child{
  flex:none;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
  font-weight:700;
  color:var(--teal-d);
}
.bar{
  height:12px;
  border-radius:999px;
  background:#eef2f1;
  overflow:hidden;
}
.bar>span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--teal), var(--green));
  transition:width .5s cubic-bezier(.22,.61,.36,1);
}

.act-body{
  padding:40px 46px 48px;
  position:relative;
  overflow:hidden;
}
.qlabel{
  font-weight:700;
  font-size:14px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--orange);
  margin-bottom:12px;
}
.qtitle{
  font-weight:700;
  font-size:26px;
  letter-spacing:-.01em;
  margin:0 0 6px;
}
.qhint{
  color:var(--ink-soft);
  font-size:17px;
  line-height:1.5;
  margin:0 0 26px;
  font-family:'Lato', sans-serif;
}
.qsentence{
  font-size:22px;
  line-height:1.8;
  color:var(--ink-soft);
  margin-bottom:30px;
  font-family:'Lato', sans-serif;
}
.qsentence.emoji-big{
  font-size:64px;
  text-align:center;
  line-height:1.2;
}
.gap{
  display:inline-block;
  min-width:90px;
  height:1.7em;
  vertical-align:middle;
  background:#fff8e6;
  border:2px dashed var(--yellow);
  border-radius:10px;
  padding:0 30px;
  margin:0 6px;
}

.answers{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.ans{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 20px;
  border:2px solid var(--ring);
  border-radius:16px;
  font-size:17px;
  font-weight:700;
  cursor:pointer;
  transition:.18s;
  background:#fff;
}
.ans:hover{
  border-color:var(--teal);
  transform:translateY(-2px);
  box-shadow:0 12px 26px -14px rgba(79,184,171,.7);
}
.ans .k{
  width:30px;
  height:30px;
  border-radius:9px;
  background:#eef6f4;
  color:var(--teal-d);
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:14px;
  flex:none;
}
.ans.correct{ border-color:var(--ok); background:var(--ok-bg); }
.ans.correct .k{ background:var(--ok); color:#fff; }
.ans.wrong{ border-color:var(--warn); background:var(--warn-bg); }
.ans.wrong .k{ background:var(--warn); color:#fff; }

/* cazar-error — the sentence reads as natural prose; each word invites a tap
   (dotted teal underline on hover), and the reveal uses a spell-check-style
   wavy underline for a wrongly-picked word: the universal "this is off" cue. */
.werror-line{
  font-family:'Lato', sans-serif;
  font-size:24px;
  line-height:2.05;
  color:var(--ink);
  margin:4px 0 22px;
}
.werror-word{
  display:inline-block;
  padding:1px 5px;
  margin:0 -1px;
  border-radius:7px;
  cursor:pointer;
  color:inherit;
  text-decoration:underline dotted transparent;
  text-decoration-thickness:2px;
  text-underline-offset:5px;
  transition:background .16s ease, color .16s ease, text-decoration-color .16s ease;
}
.werror-word:hover{
  background:rgba(79,184,171,.12);
  text-decoration-color:var(--teal);
}
.werror-word:focus-visible{
  outline:2px solid var(--teal);
  outline-offset:2px;
}
/* the real mistake, highlighted green */
.werror-word.is-error{
  color:var(--ok);
  font-weight:800;
  background:var(--ok-bg);
  text-decoration:none;
  animation:mae-word-pop .42s ease;
}
.werror-word.is-error.caught::after{ content:" ✓"; font-size:.7em; vertical-align:.05em; }
/* a word the user wrongly flagged — wavy amber underline, no strikethrough */
.werror-word.picked-wrong{
  color:var(--warn-strong);
  font-weight:700;
  text-decoration:underline wavy var(--warn);
  text-decoration-thickness:2.5px;
  text-underline-offset:5px;
  animation:mae-word-shake .4s ease;
}
@keyframes mae-word-pop{
  0%{ transform:scale(.82); } 60%{ transform:scale(1.12); } 100%{ transform:scale(1); }
}
@keyframes mae-word-shake{
  0%,100%{ transform:translateX(0); } 25%{ transform:translateX(-3px); } 75%{ transform:translateX(3px); }
}
@media (prefers-reduced-motion: reduce){
  .werror-word.is-error, .werror-word.picked-wrong{ animation:none; }
}

/* ordenar: tap tokens to assemble the sentence */
.order-slots{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:14px;
  border:2px dashed var(--ring);
  border-radius:14px;
  margin-bottom:18px;
  transition:.2s;
}
.order-slots.is-correct{ border-color:var(--ok); background:var(--ok-bg); }
.order-slots.is-wrong{ border-color:var(--warn); background:var(--warn-bg); }
.order-bank{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:26px;
}
.tok{
  display:inline-block;
  background:#eef6f4;
  border:2px solid var(--ring);
  color:var(--ink);
  padding:10px 16px;
  border-radius:12px;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  transition:.15s;
}
.tok:hover{ border-color:var(--teal); transform:translateY(-2px); }
.tok.used{ opacity:.35; pointer-events:none; transform:none; }
.tok.slot{ background:#fff; }
.tok.correct{ border-color:var(--ok); background:var(--ok-bg); color:var(--ok); }
.tok.wrong{ border-color:var(--warn); background:var(--warn-bg); color:var(--warn-strong); }

/* emparejar: two columns, tap left then right to link */
.match-help{
  font-size:13px;
  color:var(--muted);
  margin:0 0 14px;
  font-family:'Lato', sans-serif;
}
.match-grid{
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  margin-bottom:18px;
}
/* SVG overlay that draws the animated connector between paired items. */
.match-lines{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  overflow:visible;
  z-index:0;
}
.match-line{
  fill:none;
  stroke-width:3.5;
  stroke-linecap:round;
  filter:drop-shadow(0 2px 4px rgba(18,35,32,.12));
}
.match-col{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.match-item{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border:2px solid var(--ring);
  border-radius:14px;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  background:#fff;
  transition:border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.match-item:hover{ border-color:var(--teal); transform:translateY(-2px); box-shadow:0 10px 22px -14px rgba(79,184,171,.7); }
.match-item.active{ border-color:var(--teal); background:#eef6f4; box-shadow:0 0 0 3px rgba(79,184,171,.18); }
/* Pairing badge — a colored dot with the pair number, shown on BOTH sides so
   the connection is visible as you build it. Color is set inline per pair. */
.match-dot{
  flex:none;
  width:24px;
  height:24px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
  font-weight:800;
  font-size:12px;
  color:#fff;
  background:var(--ring);
  transition:background .2s, transform .2s;
}
.match-item.paired{ cursor:pointer; border-style:solid; }
.match-item.paired .match-dot{ transform:scale(1); }
.match-item.paired:hover{ transform:none; box-shadow:none; }
.match-item.paired .match-txt{ opacity:.92; }
.match-item.correct{ border-color:var(--ok); background:var(--ok-bg); }
.match-item.wrong{ border-color:var(--warn); background:var(--warn-bg); }
.match-item .match-fix{
  display:block;
  font-family:'Lato', sans-serif;
  font-weight:400;
  font-size:12.5px;
  color:var(--ok);
  margin-top:3px;
}
.match-item .match-fix b{ font-weight:700; }

/* Reveal of the correct solution below "ordenar" / used by matching too. */
.solution-reveal{
  margin:16px 0 26px;
  padding:14px 18px;
  border-radius:12px;
  background:var(--ok-bg);
  border:1px solid var(--ok);
  font-family:'Lato', sans-serif;
  font-size:18px;
  font-weight:700;
  color:var(--ink);
  opacity:0;
  transform:translateY(6px);
  transition:opacity .35s ease, transform .35s ease;
}
.solution-reveal.show{ opacity:1; transform:none; }
.solution-reveal .lbl{
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
  font-weight:700;
  font-size:13px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--ok);
  display:block;
  margin-bottom:3px;
}
.solution-reveal.miss{ background:#fff8e6; border-color:var(--yellow); }
.solution-reveal.miss .lbl{ color:var(--orange); }

/* Premium question-to-question slide. The quiz header (avatar + progress)
   stays put; only this card slides out/in between questions. */
.q-stage{ position:relative; }
.q-card{
  transition:opacity .34s ease, transform .38s cubic-bezier(.22,.61,.36,1);
}
.q-card.q-enter{ opacity:0; transform:translateX(42px); }
.q-card.q-leave{ opacity:0; transform:translateX(-42px); }

.cta:disabled{
  opacity:.4;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

/* --------------------------------------------------------------------------
   Screen 3 — Resultado inmediato + caramelo
   Ported from: .superpowers/brainstorm/167-1785668490/content/flujo-resultado.html (Paso 1)
   -------------------------------------------------------------------------- */

.r1{
  position:relative;
  padding:44px 40px 40px;
  text-align:center;
  background:linear-gradient(135deg, #fff 0%, #f2faf8 100%);
  overflow:hidden;
}

.r1 .shape{
  position:absolute;
  pointer-events:none;
}
/* Soft brand shapes decorating the result background (behind all content). */
.r1-bg{
  position:absolute;
  z-index:0;
  pointer-events:none;
}
.r1-bg1{ top:-40px; left:-46px; width:150px; opacity:.14; transform:rotate(-12deg); }
.r1-bg2{ bottom:-30px; right:-34px; width:130px; opacity:.16; }
.r1-bg3{ top:38%; right:-60px; width:120px; opacity:.08; }
.r1 > .r1-logo,
.r1 > .kick,
.r1 > .result-block,
.r1 > .caramelo{ position:relative; z-index:1; }

.r1 .kick{
  display:inline-flex;
  align-items:center;
  gap:11px;
  font-weight:700;
  color:var(--ink-soft);
  font-size:20px;
  margin-bottom:18px;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}

/* Ring + level + subline grouped into one premium card, like the caramelo. */
.result-block{
  position:relative;
  max-width:680px;
  margin:0 auto;
  padding:30px 32px 32px;
  background:linear-gradient(160deg, #ffffff 0%, #f1faf8 100%);
  border:1px solid var(--ring);
  border-radius:24px;
  box-shadow:0 24px 60px -34px rgba(18,35,32,.5), 0 1px 0 rgba(255,255,255,.8) inset;
}
/* Check-circle that draws itself in after the ring fills. */
.check-badge{
  display:inline-flex;
  width:30px;
  height:30px;
}
.check-badge svg{ width:30px; height:30px; overflow:visible; }
.check-badge .cb-ring{
  transform-origin:center;
  transform:scale(0);
  transition:transform .4s cubic-bezier(.2,1.4,.4,1);
}
.check-badge .cb-tick{
  stroke-dasharray:34;
  stroke-dashoffset:34;
  transition:stroke-dashoffset .45s ease .28s;
}
.check-badge.show .cb-ring{ transform:scale(1); }
.check-badge.show .cb-tick{ stroke-dashoffset:0; }
@media (prefers-reduced-motion: reduce){
  .check-badge .cb-ring{ transform:scale(1); transition:none; }
  .check-badge .cb-tick{ stroke-dashoffset:0; transition:none; }
}

/* --- Loading → reveal sequence on the result screen --------------------- */
/* Phase 1: a premium spinner ("Cargando resultados…") where the result will
   land. Phase 2 (.loading removed): loader out, level reveal + greeting +
   caramelo transition in. */
.result-loader{ display:none; }
.r1.loading .result-loader{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:20px;
  min-height:220px;
}
.rl-spinner{
  width:118px;
  height:118px;
  border-radius:50%;
  background:conic-gradient(from 90deg,
    rgba(79,184,171,0) 0deg,
    rgba(79,184,171,.14) 130deg,
    var(--ok) 300deg,
    var(--teal-d) 360deg);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
          mask:radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  animation:mae-spin .85s linear infinite;
}
@keyframes mae-spin{ to{ transform:rotate(1turn); } }
.rl-text{
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
  font-weight:600;
  font-size:16px;
  letter-spacing:.02em;
  color:var(--teal-dd);
  animation:mae-loadpulse 1.4s ease-in-out infinite;
}
@keyframes mae-loadpulse{ 0%,100%{ opacity:.5; } 50%{ opacity:1; } }

/* During loading, hide what will be revealed and stage the fade-in targets. */
.r1 .kick{ transition:opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1); }
.r1 .caramelo{ transition:opacity .6s ease .1s, transform .6s cubic-bezier(.22,.61,.36,1) .1s; }
.r1.loading .kick{ opacity:0; transform:translateY(-8px); }
.r1.loading .level-reveal,
.r1.loading .subline{ display:none; }
.r1.loading .caramelo{ opacity:0; transform:translateY(22px); pointer-events:none; }

/* Level reveal — the headline moment of the result screen. */
.level-reveal{ position:relative; margin-top:8px; opacity:0; }
.level-reveal.reveal{ opacity:1; animation:mae-fade-up .5s both; }
.level-eyebrow{
  position:relative;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
  font-weight:700;
  font-size:13.5px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:2px;
}
.level-big{
  position:relative;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
  font-weight:800;
  font-size:74px;
  line-height:1;
  letter-spacing:-.03em;
  background:linear-gradient(135deg, var(--teal-d) 0%, var(--ok) 55%, var(--teal) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.level-reveal.reveal .level-big{
  animation:mae-level-pop .8s both cubic-bezier(.2,1.35,.4,1);
}
@keyframes mae-level-pop{
  from{ opacity:0; transform:scale(.5) translateY(8px); filter:blur(6px); }
  to{ opacity:1; transform:scale(1) translateY(0); filter:blur(0); }
}
.levelname{
  position:relative;
  display:inline-block;
  font-weight:700;
  font-size:16px;
  color:var(--teal-dd);
  background:var(--ok-bg);
  padding:6px 18px;
  border-radius:999px;
  margin-top:9px;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}
.level-reveal.reveal .levelname{ animation:mae-fade-up .6s .4s both; }
@keyframes mae-fade-up{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){
  .rl-spinner{ animation-duration:1.6s; }
  .rl-text{ animation:none; opacity:1; }
  .level-reveal, .level-reveal.reveal{ opacity:1; }
  .level-big, .levelname{ animation:none; opacity:1; }
}
.subline{
  color:var(--ink-soft);
  font-size:18px;
  max-width:520px;
  margin:12px auto 0;
  line-height:1.5;
  font-family:'Lato', sans-serif;
}

.caramelo{
  margin:28px auto 0;
  max-width:680px;
  /* Deeper brand green #329488 with soft lighter-green shapes on top. */
  background:
    radial-gradient(240px 200px at 88% -20%, rgba(79,184,171,.45), rgba(79,184,171,0) 70%),
    radial-gradient(220px 180px at -8% 120%, rgba(79,184,171,.32), rgba(79,184,171,0) 70%),
    #329488;
  color:#fff;
  border-radius:24px;
  padding:32px 36px;
  text-align:left;
  position:relative;
  overflow:hidden;
}
/* Brand shape sitting in the background of the caramelo. */
.caramelo .glow{
  display:block;
  position:absolute;
  width:190px;
  top:-46px;
  right:-34px;
  opacity:.3;
  pointer-events:none;
}
.caramelo > *:not(.glow){ position:relative; z-index:1; }
.caramelo h3{
  font-weight:800;
  font-size:23px;
  line-height:1.25;
  margin:0 0 6px;
}
.caramelo h3 span{ color:#ffd000; }
.caramelo .sub{
  font-size:17.5px;
  opacity:.95;
  margin:12px 0 20px;
  font-family:'Lato', sans-serif;
}

ul.perks{
  list-style:none;
  padding:0;
  margin:0 0 22px;
}
ul.perks li{
  display:flex;
  gap:13px;
  align-items:flex-start;
  font-size:17px;
  font-weight:600;
  margin-bottom:14px;
  line-height:1.45;
  font-family:'Lato', sans-serif;
}
ul.perks li b{ font-weight:800; }
ul.perks li .ic{
  width:26px;
  height:26px;
  border-radius:8px;
  background:var(--yellow);
  color:var(--teal-dd);
  display:grid;
  place-items:center;
  font-weight:900;
  font-family:'Poppins', sans-serif;
  font-size:12px;
  flex:none;
  margin-top:1px;
}

.caramelo .cta{
  width:100%;
  justify-content:center;
  box-shadow:none;
}
.caramelo .cta:hover{ box-shadow:none; transform:translateY(-1px); }
.locked-note{
  text-align:center;
  font-size:13.5px;
  color:rgba(255,255,255,.8);
  margin-top:16px;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Screen 2b — Generación personalizada + captura de lead
   Ported from: .superpowers/brainstorm/167-1785668490/content/paso2-generacion.html
   Step states (wait/load/done) and the formcard reveal are driven live by JS
   timers in app.js, not by the mockup's fixed animation-delay staggering.
   -------------------------------------------------------------------------- */

.gen{
  position:relative;
  padding:52px 44px 54px;
  /* Brand green #399589 with soft lighter-green shapes (no dark stop). */
  background:
    radial-gradient(320px 260px at 85% -10%, rgba(79,184,171,.42), rgba(79,184,171,0) 70%),
    radial-gradient(300px 240px at -10% 110%, rgba(79,184,171,.30), rgba(79,184,171,0) 70%),
    #399589;
  color:#fff;
  overflow:hidden;
  min-height:520px;
}
.gen .shape{ position:absolute; pointer-events:none; }
.gen .g1{ top:16px; left:-30px; width:120px; opacity:.7; transform:rotate(-8deg); }
.gen .g2{ bottom:-24px; right:-24px; width:170px; opacity:.6; }

.gen .inner{
  position:relative;
  max-width:600px;
  margin:0 auto;
  text-align:center;
}

.gen .avatar{
  width:64px;
  height:64px;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  border:2px solid rgba(255,255,255,.35);
  display:grid;
  place-items:center;
  font-family:'Poppins', sans-serif;
  font-weight:800;
  font-size:20px;
  margin:0 auto 18px;
  animation:mae-pulse 2s ease-in-out infinite;
}
@keyframes mae-pulse{
  0%, 100%{ box-shadow:0 0 0 0 rgba(241,197,0,.5); }
  50%{ box-shadow:0 0 0 16px rgba(241,197,0,0); }
}

.gen h2{
  font-weight:800;
  font-size:30px;
  line-height:1.15;
  margin:0 0 6px;
  letter-spacing:-.02em;
}
.gen h2 span{ color:var(--yellow); }
.gen .subt{
  opacity:.95;
  font-size:17.5px;
  margin:0 0 30px;
  line-height:1.5;
  font-family:'Lato', sans-serif;
}

.steps{
  text-align:left;
  max-width:440px;
  margin:0 auto 30px;
}
.step{
  display:flex;
  align-items:center;
  gap:14px;
  padding:15px 18px;
  border-radius:14px;
  margin-bottom:10px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  transition:opacity .3s ease, background .3s ease;
}
.step .dot{
  width:26px;
  height:26px;
  border-radius:50%;
  flex:none;
  display:grid;
  place-items:center;
  font-family:'Poppins', sans-serif;
  font-weight:900;
  font-size:13px;
  transition:background .3s ease, border-color .3s ease;
}
.step .lbl{ font-size:16.5px; font-weight:700; }
.step .lbl small{
  display:block;
  font-weight:400;
  opacity:.7;
  font-size:12px;
  margin-top:1px;
}
/* done state */
.step.done .dot{ background:var(--yellow); color:var(--ink); }
.step.done .dot::after{ content:"\2713"; }
/* loading state (spinner) */
.step.load .dot{
  background:transparent;
  border:2.5px solid rgba(255,255,255,.25);
  border-top-color:var(--yellow);
  animation:mae-spin .8s linear infinite;
}
@keyframes mae-spin{ to{ transform:rotate(360deg); } }
/* not-yet-started state */
.step.wait{ opacity:.35; }
.step.wait .dot{ background:rgba(255,255,255,.12); }

.formcard{
  background:#fff;
  color:var(--ink);
  border-radius:20px;
  padding:32px 36px 30px;
  max-width:620px;
  margin:0 auto;
  text-align:left;
  box-shadow:0 24px 50px -20px rgba(0,0,0,.4);
  opacity:0;
  transform:translateY(14px);
  transition:opacity .5s ease, transform .5s ease;
}
.formcard[hidden]{ display:none; }
.formcard.is-visible{ opacity:1; transform:translateY(0); }
.formcard h3{ font-weight:800; font-size:22px; margin:0 0 6px; }
.formcard p{ font-size:16px; line-height:1.5; color:var(--ink-soft); margin:0 0 20px; font-family:'Lato', sans-serif; }
.formcard .field{ margin-bottom:14px; }
.formcard .field label{
  display:block;
  font-weight:700;
  font-size:14px;
  color:var(--ink-soft);
  margin:0 0 7px 3px;
}
.formcard .field input{
  width:100%;
  padding:16px 18px;
  border-radius:13px;
  border:1.5px solid var(--ring);
  font-size:17px;
  font-family:'Lato', sans-serif;
}
.formcard .field input:focus{ outline:0; border-color:var(--teal); }
.formcard .field input.is-error{ border-color:var(--orange); }
.formcard .field-error{
  font-size:14px;
  color:var(--orange);
  margin:-8px 0 12px 3px;
  font-family:'Lato', sans-serif;
}
.formcard .cta{ width:100%; justify-content:center; margin-top:8px; font-size:18px; }
.formcard .legal{
  font-size:13px;
  color:var(--muted);
  margin-top:14px;
  line-height:1.5;
  text-align:center;
  font-family:'Lato', sans-serif;
}

/* --------------------------------------------------------------------------
   Screen 3 — Informe completo + reorientación
   Ported from: .superpowers/brainstorm/167-1785668490/content/flujo-resultado.html (Paso 3)
   -------------------------------------------------------------------------- */

.r3-hero{
  position:relative;
  overflow:hidden;
  padding:42px 48px 30px;
  text-align:center;
  /* Brand green #329488 with soft lighter-green shapes. */
  background:
    radial-gradient(300px 240px at 88% -30%, rgba(79,184,171,.5), rgba(79,184,171,0) 70%),
    radial-gradient(280px 220px at -6% 130%, rgba(79,184,171,.34), rgba(79,184,171,0) 70%),
    #329488;
  color:#fff;
}
.r3-hero > *{ position:relative; z-index:1; }
/* Green decorative shapes on the r3-hero background (only greens). */
.r3-blob, .r3-ring{
  position:absolute;
  z-index:0;
  border-radius:50%;
  pointer-events:none;
}
.r3-blob1{ top:-70px; left:-50px; width:190px; height:190px; background:rgba(79,184,171,.34); }
.r3-blob2{ bottom:-90px; right:-30px; width:220px; height:220px; background:rgba(42,125,115,.45); }
.r3-blob3{ top:34%; right:12%; width:70px; height:70px; background:rgba(111,201,189,.28); }
.r3-ring1{
  bottom:-40px;
  left:16%;
  width:120px;
  height:120px;
  background:transparent;
  border:10px solid rgba(79,184,171,.28);
}
.r3-hero .done{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  font-size:15px;
  color:#fff;
  background:rgba(255,255,255,.2);
  padding:8px 16px;
  border-radius:999px;
  margin-bottom:12px;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}
.r3-hero h2{
  font-weight:800;
  font-size:30px;
  margin:0;
  color:#fff;
  letter-spacing:-.02em;
}
.r3-hero p{
  color:rgba(255,255,255,.92);
  margin:8px 0 0;
  font-size:17px;
  line-height:1.5;
  font-family:'Lato', sans-serif;
}

.report{
  padding:34px 44px;
  display:flex;
  flex-direction:column;
  gap:22px;
}
/* "Quién soy" — brief commercial intro at the top of the report. Left: media
   slot (brand shape now; a photo of María later). Right: the pitch. */
.whoami{
  display:flex;
  gap:26px;
  align-items:center;
  background:
    radial-gradient(130% 150% at 0% 0%, rgba(79,184,171,.12) 0%, rgba(79,184,171,0) 55%),
    #fbfdfc;
  border:1px solid var(--ring);
  border-radius:18px;
  padding:24px 28px;
}
.whoami-media{
  flex:none;
  width:158px;
  height:158px;
  border-radius:20px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:radial-gradient(circle at 50% 42%, rgba(79,184,171,.16), rgba(79,184,171,0) 70%);
}
.whoami-shape{ width:100%; height:100%; object-fit:contain; }
.whoami-body h4{
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-size:20px;
  margin:0 0 8px;
  letter-spacing:.01em;
}
.whoami-body p{
  font-family:'Lato', sans-serif;
  font-size:16px;
  line-height:1.6;
  color:var(--ink-soft);
  margin:0 0 10px;
}
.whoami-body p:last-child{ margin-bottom:0; }
@media (max-width:640px){
  .whoami{ flex-direction:column; text-align:center; gap:18px; padding:22px 20px; }
  .whoami-media{ width:130px; height:130px; }
}

/* Framing headline: the whole report is oriented toward the next level. */
.levelup-lead{
  text-align:center;
  padding:6px 8px 2px;
}
.levelup-lead h3{
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-weight:800;
  font-size:26px;
  line-height:1.25;
  letter-spacing:-.01em;
  color:var(--ink);
  margin:0 auto;
  max-width:660px;
}
.levelup-lead h3 span{ color:var(--teal-d); white-space:nowrap; }
.levelup-rule{
  display:block;
  width:72px;
  height:4px;
  margin:9px auto 0;
  border-radius:999px;
  background:linear-gradient(90deg, var(--ok), var(--teal-d));
}
@media (max-width:640px){
  .levelup-lead h3{ font-size:22px; }
}

/* Single-column stacked blocks — each section reads as its own card. */
.report .rcol{
  background:#fbfdfc;
  border:1px solid var(--ring);
  border-radius:18px;
  padding:26px 30px;
}
.report h4{
  font-size:17px;
  margin:0 0 4px;
  letter-spacing:.01em;
}
.report h4:first-child{ margin-top:0; }
.report h4.mt{ margin-top:26px; }
/* Small explainer line under each section heading. */
.rintro{
  font-family:'Lato', sans-serif;
  font-size:16px;
  line-height:1.55;
  color:var(--ink-soft);
  margin:0 0 16px;
}

/* --- Competencias ------------------------------------------------------- */
.skill{ margin-bottom:18px; }
.skill .row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  font-size:16.5px;
  font-weight:700;
  margin-bottom:8px;
  font-family:'Lato', sans-serif;
}
.skill .row b{ font-family:'Poppins', 'Lato', system-ui, sans-serif; font-size:16.5px; }
.skill .row .v{ font-size:15px; font-weight:800; font-family:'Poppins','Lato',system-ui,sans-serif; }
/* Value-based colour — a low score is NEVER green. */
.v-good{ color:var(--green); }
.v-mid{ color:var(--teal-d); }
.v-warn{ color:var(--warn-strong); }
.v-low{ color:var(--orange); }
.v-none{ color:var(--muted); font-weight:600; }
.sbar{
  height:14px;
  border-radius:999px;
  background:#eef2f1;
  overflow:hidden;
}
.sbar>span{
  display:block;
  height:100%;
  width:0;                      /* JS animates to the real % on mount */
  border-radius:999px;
  position:relative;
  overflow:hidden;
  transition:width 1.1s cubic-bezier(.22,.61,.36,1);
}
/* Premium sheen sweeping across the bar as it fills. */
.sbar>span::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  transform:translateX(-100%);
  animation:mae-bar-sheen 1.6s ease .5s 1;
}
@keyframes mae-bar-sheen{ to{ transform:translateX(100%); } }
@media (prefers-reduced-motion: reduce){
  .sbar>span{ transition:none; }
  .sbar>span::after{ animation:none; }
}
.sbar>span.tone-good{ background:linear-gradient(90deg, var(--teal), var(--green)); }
.sbar>span.tone-mid{ background:linear-gradient(90deg, var(--teal), var(--teal-d)); }
.sbar>span.tone-warn{ background:linear-gradient(90deg, var(--yellow), var(--warn)); }
.sbar>span.tone-low{ background:linear-gradient(90deg, var(--warn), var(--orange)); }
.sbar>span.none{ background:repeating-linear-gradient(45deg,#d7e2df,#d7e2df 6px,#eef2f1 6px,#eef2f1 12px); }

/* --- Categorías --------------------------------------------------------- */
.cats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.cat{
  font-size:15px;
  font-weight:700;
  padding:8px 15px;
  border-radius:999px;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}
.cat.ok{ background:var(--ok-bg); color:var(--ok); }
.cat.ok::before{ content:"✓ "; }
.cat.bad{ background:var(--warn-bg); color:var(--warn-strong); }
.cat.bad::before{ content:"↗ "; }
.cat-empty{ font-family:'Lato', sans-serif; font-size:15.5px; color:var(--ink-soft); }

/* --- Errores (contextual cards) ----------------------------------------- */
.errlist{ display:flex; flex-direction:column; gap:12px; }
.err-card{
  background:#fff;
  border:1px solid var(--ring);
  border-radius:14px;
  padding:15px 17px;
}
.err-cat{
  display:inline-block;
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-weight:700;
  font-size:12.5px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#363636;
  background:#ebebeb;
  padding:5px 12px;
  border-radius:999px;
  margin-bottom:11px;
}
.err-cat.ok{ color:var(--ok); background:var(--ok-bg); }
.err-q{
  font-family:'Lato', sans-serif;
  font-size:18px;
  line-height:1.55;
  color:var(--ink);
  margin:0 0 14px;
  font-style:italic;
}
.err-ab{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
}
.err-yours, .err-right{
  flex:1 1 45%;
  min-width:140px;
  border-radius:11px;
  padding:10px 14px;
  font-family:'Lato', sans-serif;
  font-size:17px;
  font-weight:700;
}
.err-yours{ background:var(--warn-bg); color:var(--warn-strong); }
.err-right{ background:var(--ok-bg); color:var(--ok); }
.err-ab .tag{
  display:block;
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-size:11.5px;
  letter-spacing:.05em;
  text-transform:uppercase;
  font-weight:700;
  opacity:.75;
  margin-bottom:3px;
}
.err-why{
  font-family:'Lato', sans-serif;
  font-size:16.5px;
  line-height:1.6;
  color:var(--ink-soft);
  margin:0;
}
.err-why b{ color:var(--ink); }
.err-none .err-why{ margin-top:4px; }
/* Note after the (capped-at-4) error cards: the full list lives in the email. */
.err-more{
  margin:12px 0 0;
  text-align:center;
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-weight:600;
  font-size:14.5px;
  color:var(--muted);
}

/* --- Siguientes pasos --------------------------------------------------- */
/* --- Tu camino al nivel X: premium "block inside the block" -------------- */
.roadmap{
  margin-top:26px;
  background:#fffdfb;
  border:1px solid #e3a86c;
  border-radius:18px;
  padding:22px 22px 24px;
  box-shadow:0 18px 40px -28px rgba(198,110,44,.55);
}
.roadmap .roadmap-title{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-weight:800;
  font-size:22px;
  line-height:1.15;
  letter-spacing:.005em;
  margin:0 0 8px;
}
.roadmap-level{
  flex:none;
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-weight:800;
  font-size:16px;
  line-height:1;
  color:#fff;
  background:linear-gradient(135deg,#e36806,#c85703);
  border-radius:999px;
  padding:8px 15px;
  box-shadow:0 6px 16px -8px rgba(198,80,4,.7);
}
.roadmap-intro{
  font-family:'Lato', sans-serif;
  font-size:16px;
  font-weight:700;
  line-height:1.55;
  color:var(--ink);
  margin:0 0 16px;
}
.nsteps{ display:flex; flex-direction:column; gap:12px; }
.nstep{
  display:flex;
  gap:14px;
  align-items:flex-start;
  background:#ffe1c7;
  border:1px solid #e3a86c;
  border-radius:14px;
  padding:15px 17px;
}
.nstep-ic{
  flex:none;
  width:42px;
  height:42px;
  border-radius:12px;
  background:#fff;
  border:1px solid #e3a86c;
  display:grid;
  place-items:center;
  color:#c85703;
  box-shadow:0 4px 12px -6px rgba(198,80,4,.4);
}
.nstep-ic svg{ width:22px; height:22px; display:block; }
.nstep b{
  font-family:'Poppins','Lato',system-ui,sans-serif;
  font-size:16.5px;
  display:block;
  margin-bottom:4px;
}
.nstep p{
  font-family:'Lato', sans-serif;
  font-size:16px;
  line-height:1.6;
  color:var(--ink-soft);
  margin:0;
}

.reorient{
  margin:0 40px 36px;
  color:#fff;
  border-radius:22px;
  padding:34px 36px;
  position:relative;
  overflow:hidden;
  text-align:center;
}
/* Color treatment per ending().color — vivid brand green, no dark/near-black stop.
   All three buckets share the same deeper-green #329488 with lighter-green shapes. */
.reorient.reorient-basico,
.reorient.reorient-intermedio,
.reorient.reorient-avanzado{
  background:
    radial-gradient(300px 240px at 88% -18%, rgba(79,184,171,.55), rgba(79,184,171,0) 70%),
    radial-gradient(260px 200px at -8% 118%, rgba(79,184,171,.38), rgba(79,184,171,0) 70%),
    #329488;
}
.reorient .g{
  position:absolute;
  width:200px;
  opacity:.32;
  bottom:-60px;
  left:-30px;
  pointer-events:none;
}
.reorient .g2{
  position:absolute;
  width:90px;
  opacity:.9;
  top:24px;
  right:36px;
  pointer-events:none;
}
/* Extra brand shape, bottom-right, translucent. */
.reorient .g3{
  position:absolute;
  width:150px;
  opacity:.5;
  bottom:-40px;
  right:-28px;
  pointer-events:none;
}
.reorient .kicker{
  font-weight:700;
  font-size:13px;
  letter-spacing:.04em;
  text-transform:uppercase;
  opacity:.85;
  margin:0 0 8px;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}
.reorient h3{
  font-weight:800;
  font-size:25px;
  line-height:1.2;
  margin:0 auto 10px;
  max-width:560px;
}
.reorient p{
  font-size:17px;
  opacity:.95;
  max-width:540px;
  margin:0 auto 22px;
  line-height:1.6;
  font-family:'Lato', sans-serif;
}
.reorient .kicker{ font-size:14px; }
.reorient .cta{ text-decoration:none; }
.reorient .cta:hover{ box-shadow:none; transform:translateY(-1px); }
.reorient .guarantee{
  font-size:14px;
  opacity:.85;
  margin-top:14px;
  font-family:'Poppins', 'Lato', system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width:720px){
  #app{ padding:0; }
  .intro,
  .act,
  .res,
  .r1,
  .gen,
  .r3{
    border-radius:0;
  }
  .intro{
    padding:48px 22px 54px;
  }
  .gen{
    padding:40px 22px 44px;
    min-height:0;
  }
  .gen h2{
    font-size:23px;
  }
  .formcard{
    padding:22px 20px 20px;
  }
  .intro h2{
    font-size:30px;
  }
  .namebox{
    max-width:100%;
  }
  .act-body{
    padding:28px 22px 34px;
  }
  .act-top{
    padding:16px 22px;
  }
  .answers{
    grid-template-columns:1fr;
  }
  /* Keep the two columns on mobile (badges convey pairing; connector lines are
     disabled below 721px), just tighten the gap. */
  .match-grid{
    gap:12px;
  }
  .match-item{ padding:12px 12px; font-size:14px; }
  .qsentence{
    font-size:19px;
  }
  .qsentence.emoji-big{
    font-size:48px;
  }
  .r1{
    padding:40px 22px 34px;
  }
  .caramelo{
    padding:24px 22px;
  }
  .r3-hero{
    padding:26px 22px 16px;
  }
  .report{
    grid-template-columns:1fr;
    padding:26px 22px;
    gap:26px;
  }
  .reorient{
    margin:0 22px 28px;
    padding:26px 22px;
  }
  /* La virgulilla superior-derecha estorba en pantallas estrechas. */
  .reorient .g2{ display:none; }
}

/* --------------------------------------------------------------------------
   "Tu camino al nivel" (roadmap) en móvil — rediseño premium.
   En pantallas estrechas los paddings anidados (report → rcol → roadmap →
   nstep + icono) dejaban el texto de cada paso en una tira de ~146px. Aquí
   recuperamos el ancho: menos padding, iconos compactos arriba y texto con
   aire, para que cada paso se lea cómodo y siga premium.
   -------------------------------------------------------------------------- */
@media (max-width:640px){
  .report .rcol{ padding:20px 15px; }

  .roadmap{
    padding:18px 15px 20px;
    border-radius:16px;
  }
  .roadmap .roadmap-title{
    font-size:19px;
    gap:9px;
    margin-bottom:6px;
  }
  .roadmap-level{
    font-size:14.5px;
    padding:6px 12px;
  }
  .roadmap-intro{
    font-size:15.5px;
    margin-bottom:14px;
  }

  .nsteps{ gap:10px; }
  /* Icono arriba, título y texto a lo ancho: el paso deja de comprimirse. */
  .nstep{
    flex-direction:column;
    gap:10px;
    padding:15px 15px;
    border-radius:14px;
  }
  .nstep-ic{
    width:40px;
    height:40px;
    border-radius:12px;
  }
  .nstep-ic svg{ width:21px; height:21px; }
  .nstep b{ font-size:16px; margin-bottom:5px; }
  .nstep p{ font-size:15.5px; line-height:1.55; }
}
