/* Estilos del cuestionario: copiados TAL CUAL del prototipo aprobado (referencia-cuestionario.html). */
/* Layout: una columna tipo celular (lo que se ve al escanear el QR en góndola): inicio → 5 preguntas → resultado.
   Tema fijo por archivo (no cambia con el modo oscuro del celular), igual que la landing. */
:root{
  /* Tema claro fijo: fondo crema, letras marrones (paleta de la landing) */
  --bg:#FAF5EB; --surface:#FFFEFB; --chip:#F3EAD9; --sel:#F6EDDD; --track:#EFE5D3;
  --line:#E6D9C2; --fg:#5C4433; --muted:#8C7358; --accent:#B87F4E;
  --btn-bg:#5C4433; --btn-fg:#FAF5EB; --shadow:rgba(92,68,51,.18);
  --c-catuai:#6B4A35; --c-caramel:#C08A3E; --c-picaflor:#D9783A; --c-popayan:#CFA431; --c-rwanda:#A8434F;
  color-scheme:light;
  --brand:"Unbounded", "Arial Black", system-ui, sans-serif;
  --display:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body:"Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*{box-sizing:border-box}
html,body{background:var(--bg);color:var(--fg)}
body{font-family:var(--body);font-size:16px;line-height:1.5;padding-inline:16px;padding-block:20px 40px;-webkit-font-smoothing:antialiased}
.app{max-width:440px;margin:0 auto;display:flex;flex-direction:column;gap:22px}

/* marca (igual que la landing) */
.brand{display:flex;flex-direction:column;align-items:center;gap:6px;padding-block:6px 14px;border-bottom:1px solid var(--line)}
.brand .wm{font-family:var(--brand);font-weight:800;font-size:clamp(24px,7.4vw,30px);letter-spacing:0;line-height:1.05;text-align:center}
.brand .tag{font-size:10.5px;letter-spacing:.22em;text-transform:uppercase;color:var(--muted)}

.screen{display:flex;flex-direction:column;gap:20px;animation:in .45s ease both}
@keyframes in{from{opacity:.001;transform:translateY(8px)}to{opacity:1;transform:none}}

h1,h2{font-family:var(--display);font-weight:700;letter-spacing:-.01em;text-wrap:balance;margin:0}
h1{font-size:clamp(28px,7.6vw,34px);line-height:1.12}
h2{font-size:24px;line-height:1.2}
p{margin:0}
.lead{color:var(--muted);font-size:16.5px}
.eyebrow{font-size:11.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);font-weight:600}

/* inicio */
.hero{display:flex;flex-direction:column;gap:14px;padding-top:4px}
.facts{display:flex;gap:8px;flex-wrap:wrap}
.fact{border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:13.5px;color:var(--muted)}
.beans{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.bean{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;font-size:12px;color:var(--muted);line-height:1.2}
.dot{width:14px;height:14px;border-radius:50%}

.btn{appearance:none;border:1.5px solid var(--btn-bg);cursor:pointer;font:inherit;font-weight:500;letter-spacing:.03em;font-size:16.5px;border-radius:14px;padding:16px 20px;background:var(--btn-bg);color:var(--btn-fg);width:100%;text-align:center;text-decoration:none;display:block;transition:transform .15s ease,box-shadow .15s ease}
.btn:hover{transform:translateY(-2px);box-shadow:0 10px 22px var(--shadow)}
.btn:active{transform:scale(.98)}
.btn.outline{background:transparent;color:var(--fg);border-color:var(--fg)}
.btn:focus-visible,.opt:focus-visible,.ghost:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.ghost{appearance:none;background:none;border:0;color:var(--muted);font:inherit;font-size:14.5px;cursor:pointer;padding:8px 0;text-decoration:underline;text-underline-offset:3px}
.small{font-size:13px;color:var(--muted);text-align:center}

/* pregunta */
.progress{display:flex;align-items:center;gap:12px}
.track{flex:1;height:4px;background:var(--line);border-radius:4px;overflow:hidden}
.track i{display:block;height:100%;background:var(--accent);border-radius:4px;transition:width .4s ease}
.count{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.help{color:var(--muted);font-size:15px;margin-top:-8px}
.opts{display:flex;flex-direction:column;gap:10px}
.opt{appearance:none;font:inherit;color:var(--fg);text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px 16px;display:flex;align-items:center;gap:14px;cursor:pointer;transition:border-color .15s,background .15s,transform .12s}
.opt:hover{border-color:var(--muted)}
.opt:active{transform:scale(.985)}
.opt.sel{border-color:var(--accent);background:var(--sel)}
.opt .ic{flex:none;width:40px;height:40px;border-radius:12px;background:var(--chip);display:grid;place-items:center}
.opt .ic svg{width:22px;height:22px;stroke:var(--fg);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.opt .t{display:flex;flex-direction:column;min-width:0}
.opt .t b{font-weight:600;font-size:16px}
.opt .t span{color:var(--muted);font-size:13.5px}

/* resultado */
.winner{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:22px 20px;display:flex;flex-direction:column;gap:16px}
.win-top{display:flex;align-items:center;gap:18px}
.ring{flex:none;position:relative;width:104px;height:104px}
.ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.ring .num{position:absolute;inset:0;display:grid;place-items:center;font-family:var(--display);font-weight:700;font-size:26px;font-variant-numeric:tabular-nums}
.ring .num small{font-size:15px}
.win-name{display:flex;flex-direction:column;gap:4px;min-width:0}
.win-name h2{font-size:25px}
.origin{color:var(--accent);font-size:12px;letter-spacing:.1em;text-transform:uppercase}
.notes{display:flex;flex-wrap:wrap;gap:6px}
.note{font-size:13px;padding:5px 10px;border-radius:999px;background:var(--chip);color:var(--fg)}
.why{font-size:15.5px;color:var(--fg)}
.scales{display:grid;gap:8px}
.scale{display:grid;grid-template-columns:86px 1fr;align-items:center;gap:10px;font-size:13.5px;color:var(--muted)}
.pips{display:flex;gap:5px}
.pips i{height:8px;flex:1;border-radius:4px;background:var(--line)}
.pips i.on{background:var(--fg)}

.bars{display:flex;flex-direction:column;gap:14px}
.bar-row{display:grid;gap:6px}
.bar-head{display:flex;justify-content:space-between;font-size:15px;gap:12px}
.bar-head b{font-weight:600}
.bar-head span{font-variant-numeric:tabular-nums;color:var(--muted)}
.bar{height:12px;background:var(--track);border-radius:8px;overflow:hidden}
.bar i{display:block;height:100%;border-radius:8px;width:0;transition:width .9s cubic-bezier(.2,.7,.2,1)}
.bar-row.top .bar-head span{color:var(--fg);font-weight:600}

.section{display:flex;flex-direction:column;gap:12px}
.recs{display:flex;flex-direction:column}
.rec{display:grid;grid-template-columns:36px 1fr;gap:12px;align-items:start;padding:14px 0;border-top:1px solid var(--line)}
.rec:first-child{border-top:0;padding-top:4px}
.rec .ic{width:36px;height:36px;border-radius:10px;background:var(--chip);display:grid;place-items:center}
.rec .ic svg{width:20px;height:20px;stroke:var(--accent);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rec b{display:block;font-weight:600;margin-bottom:2px}
.rec p{color:var(--muted);font-size:14.5px}

.contact{border:1px dashed var(--line);border-radius:16px;padding:20px 18px;display:flex;flex-direction:column;gap:10px}
.contact b{font-family:var(--display);font-weight:700;font-size:19px}
.contact p{color:var(--muted);font-size:14.5px}
.contact .handle{color:var(--fg);font-weight:600;user-select:all}
.contact .btn{margin-top:4px;display:flex;align-items:center;justify-content:center;gap:10px}
.contact .btn svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7}

/* qué es café de especialidad */
.what{border:1px solid var(--line);border-radius:14px;background:var(--surface);padding:0 16px}
.what summary{list-style:none;cursor:pointer;padding:14px 0;display:flex;justify-content:space-between;align-items:center;gap:12px;font-weight:600;font-size:15px}
.what summary::-webkit-details-marker{display:none}
.what summary::after{content:"+";font-size:20px;line-height:1;color:var(--accent);transition:transform .2s}
.what[open] summary::after{transform:rotate(45deg)}
.what .body{display:flex;flex-direction:column;gap:10px;padding-bottom:16px;color:var(--muted);font-size:14.5px}
.what .body b{color:var(--fg);font-weight:600}
.what .vs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.what .vs div{background:var(--chip);border-radius:10px;padding:10px 12px;font-size:13.5px;line-height:1.4}
.what .vs strong{display:block;color:var(--fg);font-weight:600;margin-bottom:2px}

/* tips de cafetera */
.tips-toggle{appearance:none;font:inherit;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--chip);color:var(--fg);border:1px solid var(--line);border-radius:14px;padding:15px 16px;cursor:pointer;text-align:left;font-weight:600;font-size:15.5px;transition:border-color .15s}
.tips-toggle:hover{border-color:var(--muted)}
.tips-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.tips-toggle .l{display:flex;align-items:center;gap:12px}
.tips-toggle svg{width:22px;height:22px;stroke:var(--accent);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tips-toggle .chev{transition:transform .25s;stroke:var(--fg)}
.tips-toggle[aria-expanded="true"] .chev{transform:rotate(180deg)}
.tips{display:flex;flex-direction:column;gap:0;padding:4px 4px 0}
.tips p.intro{color:var(--muted);font-size:14px;padding:6px 0 4px}
.tip{display:grid;grid-template-columns:28px 1fr;gap:12px;padding:12px 0;border-top:1px solid var(--line);font-size:14.5px;color:var(--fg)}
.tip:first-of-type{border-top:0}
.tip .n{width:28px;height:28px;border-radius:50%;border:1px solid var(--accent);color:var(--accent);display:grid;place-items:center;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.tip span{color:var(--muted)}
.tip span b{color:var(--fg);font-weight:600}

.contact .row{display:flex;gap:10px;flex-wrap:wrap}
.contact .row .btn{flex:1 1 160px}


.opt.multi .check{margin-left:auto;flex:none;width:22px;height:22px;border-radius:6px;border:1.5px solid var(--muted);display:grid;place-items:center;transition:background .15s,border-color .15s}
.opt.multi.sel .check{background:var(--fg);border-color:var(--fg)}
.opt.multi.sel .check::after{content:"";width:6px;height:11px;border:solid var(--bg);border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.btn:disabled{opacity:.4;cursor:not-allowed;transform:none;box-shadow:none}
.tip-group{display:flex;flex-direction:column;padding-top:10px}
.tip-group + .tip-group{margin-top:8px;border-top:1px solid var(--line)}
.tip-head{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:700;font-size:16px;margin:4px 0 2px}
.tip-head svg{width:20px;height:20px;stroke:var(--accent);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tip:first-of-type{border-top:0}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Añadido (no visible): campo trampa para robots, fuera de la pantalla */
.hp{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* Corrección: .tips usa display:flex, que anulaba el atributo hidden y dejaba los tips siempre abiertos */
.tips[hidden]{display:none}
