/* guia.css — paginas de "Como funciona" (general, herramientas, ban y carcel) */

.guia-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); width: fit-content; max-width: 100%; }
.guia-tabs a { height: 38px; padding: 0 16px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background-color .18s ease, color .18s ease; }
.guia-tabs a:hover { color: var(--text); opacity: 1; }
.guia-tabs a.on { background: var(--text); color: var(--bg); }

.guia { display: flex; flex-direction: column; gap: 28px; max-width: 1000px; }
.guia h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.guia h2 .marca-cat { width: 10px; height: 10px; border-radius: 50%; }
.guia h3 { margin: 0; font-size: 16px; font-weight: 600; }
.guia p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text); }
.guia p.sub { color: var(--muted); }
.guia a.enlace { color: var(--verde); text-decoration: underline; text-underline-offset: 3px; }
.guia section { display: flex; flex-direction: column; gap: 14px; animation: aparece .4s cubic-bezier(.2,.8,.2,1) both; }
.guia code, .guia kbd { font-family: inherit; font-size: 13px; font-weight: 600; padding: 2px 7px; border-radius: 7px; background: var(--tile); border: 1px solid var(--border); white-space: nowrap; }
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } }

/* Formas de activar: cinco cajitas */
.formas { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.forma { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.forma .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: var(--tile); }
.forma b { font-size: 15px; }
.forma span { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Tarjetas de pasos / reglas */
.pasos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; counter-reset: paso; }
.paso { position: relative; padding: 16px 16px 16px 54px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; line-height: 1.55; }
.paso::before { counter-increment: paso; content: counter(paso); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 9px; background: var(--verde); color: #07140E; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.paso > b:first-child { display: block; margin-bottom: 2px; }

/* Avisos destacados */
.destacado { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; line-height: 1.55; }
.destacado .ico { font-size: 20px; line-height: 1.2; }
.destacado.verde { border-color: color-mix(in srgb, var(--verde) 45%, var(--border)); background: color-mix(in srgb, var(--verde) 7%, var(--surface)); }
.destacado.naranja { border-color: color-mix(in srgb, #F2711C 45%, var(--border)); background: color-mix(in srgb, #F2711C 7%, var(--surface)); }

/* Tablas */
.tabla { width: 100%; overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.tabla table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.tabla th, .tabla td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabla th { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla td .nota { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.tabla .icono-t { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; vertical-align: middle; margin-right: 8px; }

/* Herramientas: iconos */
.herr-ej { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.herr-ej figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.herr-ej img { width: 64px; height: 64px; border-radius: 12px; }

.ir-pad { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .guia h2 { font-size: 20px; }
  .guia-tabs { width: 100%; }
  .guia-tabs a { flex: 1; justify-content: center; padding: 0 10px; font-size: 13px; }
}

/* ── Simulaciones (guia-demo.js) ── */
.demo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); }
.demo-escena { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 250px; padding: 18px; border-radius: 16px; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--text) 5%, transparent), transparent 70%), var(--tile); overflow: hidden; }
.demo-chat { display: flex; flex-direction: column; gap: 8px; min-height: 250px; justify-content: flex-start; }
.demo-msg { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--tile); font-size: 13px; line-height: 1.45; animation: msgEntra .35s cubic-bezier(.2,.9,.25,1.1) both; }
.demo-msg b:first-child { margin-right: 6px; }
.demo-msg.sistema { background: transparent; border-style: dashed; color: var(--muted); }
.demo-msg.rojo { border-color: color-mix(in srgb, var(--rojo) 45%, var(--border)); }
.demo-msg.verde { border-color: color-mix(in srgb, var(--verde) 50%, var(--border)); }
.demo-msg.naranja { border-color: color-mix(in srgb, #F2711C 50%, var(--border)); }
@keyframes msgEntra { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.demo-botones { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.demo-botones .boton { height: 40px; padding: 0 16px; font-size: 13px; }
.demo-botones .nota { margin-left: auto; }
.demo-flota { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-size: 18px; font-weight: 700; pointer-events: none; animation: flota 1.4s ease-out both; white-space: nowrap; }
.demo-flota.mas { color: var(--rojo); }
.demo-flota.menos { color: var(--verde); }
@keyframes flota { from { opacity: 0; transform: translate(-50%, 10px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -34px); } }

/* Herramientas: icono, estado y barra con signo (escudo ← 0 → bloqueada) */
.demo-herr { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 18px; }
.demo-herr img { width: 96px; height: 96px; border-radius: 16px; transition: transform .3s ease, filter .3s ease; filter: saturate(.6) brightness(.9); }
#demoHerr.bloqueada .demo-herr img { filter: none; }
#demoHerr.escudo .demo-herr img { filter: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--verde) 55%, transparent), 0 0 28px color-mix(in srgb, var(--verde) 40%, transparent); }
#demoHerr.golpe .demo-herr img { animation: golpe .35s ease; }
@keyframes golpe { 40% { transform: scale(1.12) rotate(-4deg); } }
.demo-estado { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transition: color .2s ease; }
#demoHerr.bloqueada .demo-estado { color: var(--rojo); }
#demoHerr.escudo .demo-estado { color: var(--verde); }
.demo-herr b { font-size: 26px; font-variant-numeric: tabular-nums; }
.demo-barra { position: relative; width: 100%; max-width: 360px; height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.demo-barra .cero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--text); opacity: .5; }
.demo-barra .fill { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; background: var(--rojo); border-radius: 6px; }
#demoHerr.escudo .demo-barra .fill { background: var(--verde); }
.demo-escala { width: 100%; max-width: 360px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; }

/* Ban: la foto entre rejas, su cuenta atrás y el globo de la cárcel */
.demo-preso { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 22px; }
.demo-cara { position: relative; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: #6C6C75; color: #fff; font-size: 42px; font-weight: 700; overflow: hidden; transition: box-shadow .3s ease; }
.demo-rejas { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(20,20,24,.85) 14px 19px); transform: translateY(-105%); transition: transform .55s cubic-bezier(.5,0,.2,1.3); }
#demoBan.preso .demo-rejas { transform: translateY(0); }
#demoBan.preso .demo-cara { box-shadow: 0 0 0 4px var(--rojo); }
#demoBan:not(.preso) .demo-cara { box-shadow: 0 0 0 4px var(--verde); }
#demoBan .demo-estado { color: var(--verde); }
#demoBan.preso .demo-estado { color: var(--rojo); }
.demo-preso b { font-size: 24px; font-variant-numeric: tabular-nums; }
.demo-globo { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #18181c, #2a1a10); border: 2px solid #F2711C; color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(14px); pointer-events: none; }
.demo-globo.ver { animation: globo 4s ease both; }
@keyframes globo { 0% { opacity: 0; transform: translateY(14px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(8px); } }
.ondas { display: inline-flex; gap: 2px; align-items: center; height: 14px; }
.ondas i { width: 3px; border-radius: 2px; background: #F2711C; animation: onda .6s ease-in-out infinite; }
.ondas i:nth-child(2) { animation-delay: .15s; } .ondas i:nth-child(3) { animation-delay: .3s; }
@keyframes onda { 0%, 100% { height: 4px; } 50% { height: 14px; } }

@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; padding: 12px; }
  .demo-chat, .demo-escena { min-height: 0; }
  .demo-escena { min-height: 230px; }
  .demo-botones .nota { margin-left: 0; width: 100%; }
}
