@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/contenedores/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/contenedores/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/contenedores/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/contenedores/fonts/inter-700.woff2") format("woff2"); }

:root {
  --crema: #faf9f5;
  --tinta: #1c1917;
  --gris: #57534e;
  --gris2: #a8a29e;
  --borde: #e7e5e4;
  --naranja: #f97316;
  --naranja-osc: #c2410c;
  --naranja-suave: #fff3e8;
  --oscuro: #141210;
  --verde: #15803d;
  --rojo: #b91c1c;
  --radio: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--crema);
  color: var(--tinta);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
/* Foco visible y del mismo color en todos los botones (antes, cada uno el del navegador). */
:is(button, a):focus-visible { outline: 3px solid var(--naranja-osc); outline-offset: 2px; }
.cab :is(button, a):focus-visible { outline-color: #fdba74; }

/* Texto corrido: justificado y con partición de palabras (lang="es"). */
.just, .ayuda, .intro p, .aviso p, .nota { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* ── Cabecera ─────────────────────────────────────────── */
.cab { background: var(--oscuro); color: #fff; }
.cab-in { max-width: 920px; margin: auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.cab img { height: 40px; width: auto; display: block; }
.cab .marcas { display: flex; align-items: center; gap: 14px; flex: none; }
.cab .marcas .sep { width: 1px; height: 30px; background: #44403c; }
.cab img.telecomo { height: 36px; }
/* El logo de Telecomo solo en su versión (clase puesta en <html> según la dirección). */
.cab .marcas .sep, .cab img.telecomo { display: none; }
.m-telecomo .cab .marcas .sep, .m-telecomo .cab img.telecomo { display: block; }
.cab .nombre { display: none; font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: -.01em; color: #fff; }
.cab .lema { font-size: 13px; color: #d6d3d1; border-left: 1px solid #44403c; padding-left: 14px; line-height: 1.3; }
.cab .guardado { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: #a8a29e; white-space: nowrap; transition: color .3s; }
.cab .guardado.vivo { color: #fdba74; }

/* ── Pasos ────────────────────────────────────────────── */
.pasos { position: sticky; top: 0; z-index: 20; background: rgba(250, 249, 245, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--borde); }
.pasos ol { max-width: 920px; margin: auto; padding: 10px 14px; display: flex; gap: 6px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.pasos ol::-webkit-scrollbar { display: none; }
.pasos button {
  border: 0; background: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px; border-radius: 999px; white-space: nowrap; font-size: 14px; color: var(--gris);
}
.pasos button:hover { background: #f1efe9; }
.pasos .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; background: #ece9e2; color: var(--gris); flex: none; }
.pasos [aria-current="step"] { color: var(--tinta); font-weight: 600; background: #fff; box-shadow: 0 0 0 1px var(--borde); }
.pasos [aria-current="step"] .num { background: var(--naranja); color: var(--tinta); }
.pasos .hecho .num { background: var(--tinta); color: #fff; }

/* ── Contenido ────────────────────────────────────────── */
main { max-width: 920px; margin: auto; padding: 28px 20px 120px; }
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; margin-bottom: 14px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--naranja-osc); } /* sobre crema: el naranja daba 2,66:1 */
h2 { font-size: 26px; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 6px; }
.sub { color: var(--gris); margin-bottom: 22px; max-width: 720px; }

.intro { display: grid; gap: 22px; }
.intro p { color: #3f3a36; font-size: 17px; max-width: 720px; }
.ventajas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 8px 0; }
.ventajas div { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; }
.ventajas b { display: block; margin-bottom: 4px; }
.ventajas span { color: var(--gris); font-size: 14px; display: block; text-align: justify; hyphens: auto; }
.ventajas i { display: block; width: 26px; height: 26px; margin-bottom: 8px; color: var(--naranja-osc); }
.ventajas i svg, .ico svg, .ico-final svg { display: block; width: 100%; height: 100%; }
.ico { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.15em; }
.ico-final { width: 56px; height: 56px; margin: 0 auto 10px; color: var(--verde); }

.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px 22px 8px; margin-bottom: 16px; }
.tarjeta > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--naranja-osc); margin-bottom: 14px; display: flex; justify-content: space-between; gap: 10px; }
.tarjeta > h3 small { text-transform: none; letter-spacing: 0; color: var(--gris); font-weight: 500; font-size: 12px; }

.preg { margin-bottom: 20px; }
.preg > label, .preg > .tit { display: block; font-weight: 600; margin-bottom: 8px; line-height: 1.35; }
.preg .req { color: var(--naranja-osc); }
.ayuda { font-size: 14px; color: var(--gris); margin: -4px 0 10px; }
.sub-preg { margin-left: 14px; padding-left: 14px; border-left: 3px solid var(--naranja-suave); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; border: 1.5px solid var(--borde); border-radius: 10px; padding: 11px 13px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--naranja-osc); box-shadow: 0 0 0 3px #fed7aa; }
.error-campo { border-color: var(--rojo) !important; }
.msg-error { color: var(--rojo); font-size: 14px; margin-top: 6px; }

.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Pastillas (opción única o varias) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--borde);
  background: #fff; font-size: 15px; line-height: 1.25; cursor: pointer; user-select: none; transition: all .12s;
}
.chip:hover span { border-color: #d6d3d1; background: #fdfcfa; }
.chip input:checked + span { border-color: var(--naranja); background: var(--naranja-suave); color: #7c2d12; font-weight: 500; }
.chip input:checked + span::before { content: "✓"; font-weight: 700; color: var(--naranja); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px #fed7aa; outline: 2px solid var(--naranja-osc); outline-offset: 2px; }
.chip.nose span { border-style: dashed; color: var(--gris); }

/* ── Botones ──────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 22px; font-weight: 600; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: all .15s; }
.btn-pri { background: var(--naranja); color: var(--tinta); }
.btn-pri:hover { background: #ea580c; }
.btn-pri[disabled] { opacity: .55; cursor: wait; }
.btn-sec { background: #fff; border-color: var(--borde); color: var(--tinta); }
.btn-sec:hover { border-color: var(--gris2); }
.btn-txt { background: none; border: 0; color: var(--gris); padding: 8px 10px; font-size: 14px; font-weight: 500; cursor: pointer; border-radius: 8px; }
.btn-txt:hover { background: #f1efe9; color: var(--tinta); }
.btn-txt.peligro:hover { color: var(--rojo); background: #fef2f2; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.nav .der { margin-left: auto; }

/* ── Inventario ───────────────────────────────────────── */
.contador { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contador button { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--borde); background: #fff; font-size: 22px; cursor: pointer; }
.contador button:hover { border-color: var(--naranja); color: var(--naranja); }
.contador input { width: 86px; text-align: center; font-size: 22px; font-weight: 700; }
.inv { display: grid; gap: 10px; margin-top: 6px; }
.inv-fila { display: grid; grid-template-columns: 34px 1.4fr 1fr 1fr 34px; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 10px; }
.inv-fila .n { width: 30px; height: 30px; border-radius: 50%; background: var(--tinta); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.inv-cab { display: grid; grid-template-columns: 34px 1.4fr 1fr 1fr 34px; gap: 8px; padding: 0 10px; font-size: 13px; color: var(--gris); font-weight: 600; }
.quitar { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--gris); font-size: 20px; cursor: pointer; }
.quitar:hover { background: #fef2f2; color: var(--rojo); }
.confirma { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--rojo); }

/* ── Selector de aplicaciones ─────────────────────────── */
.selector { position: sticky; top: var(--alto-pasos, 58px); z-index: 15; background: rgba(250, 249, 245, .97); backdrop-filter: blur(6px); margin: 0 -20px 18px; padding: 10px 20px; border-bottom: 1px solid var(--borde); }
.selector .tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.tab { flex: none; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--borde); background: #fff; border-radius: 12px; padding: 7px 12px 7px 8px; cursor: pointer; max-width: 230px; text-align: left; }
.tab .n { width: 24px; height: 24px; border-radius: 50%; background: #ece9e2; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.tab .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.tab .pc { font-size: 12px; color: var(--gris); flex: none; }
.tab[aria-selected="true"] { border-color: var(--naranja); background: var(--naranja-suave); }
.tab[aria-selected="true"] .n { background: var(--naranja); color: var(--tinta); }
.tab:focus-visible { outline-offset: -3px; } /* la fila de pestañas recorta lo que sale por fuera */
.tab.mas { color: var(--naranja-osc); font-weight: 600; font-size: 14px; padding: 7px 14px; border-style: dashed; }

.app-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.app-cab .acciones { display: flex; gap: 4px; flex-wrap: wrap; }
.barra { height: 6px; background: #ece9e2; border-radius: 99px; overflow: hidden; margin-top: 10px; width: min(320px, 100%); }
.barra i { display: block; height: 100%; background: var(--naranja); border-radius: 99px; transition: width .3s; }

/* ── Revisión y final ─────────────────────────────────── */
.resumen { display: grid; gap: 8px; }
.res-app { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; }
.res-app b { font-weight: 600; }
.res-app small { color: var(--gris); }
.aviso { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; font-size: 14px; color: #44403c; }
.aviso p + p { margin-top: 8px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-weight: 500; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--naranja); flex: none; }
.consent.secundario { font-weight: 400; font-size: 14px; color: var(--gris); margin-top: -6px; }
.aviso a { color: var(--naranja-osc); font-weight: 600; }
/* Por qué pedimos correo y WhatsApp: pequeño, pero que se vea. */
.por-que { font-size: 13.5px; line-height: 1.45; color: #5b3a1e; background: var(--naranja-suave); border: 1px solid #fed7aa; border-radius: 10px; padding: 9px 12px; margin: -6px 0 18px; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.por-que b { color: #7c2d12; }
.cab a.marca-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nota { background: var(--naranja-suave); border-left: 4px solid var(--naranja); padding: 12px 14px; border-radius: 8px; font-size: 15px; margin: 14px 0; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.folio { font-size: clamp(30px, 7vw, 46px); font-weight: 700; letter-spacing: .02em; color: var(--naranja-osc); margin: 6px 0 14px; }
.final { text-align: center; padding-top: 30px; }
.final .just { max-width: 560px; margin: 0 auto 10px; }
.final .nav { justify-content: center; }
.pie { text-align: center; color: var(--gris); font-size: 13px; margin-top: 50px; }

#impresion { display: none; }

@media (max-width: 720px) {
  main { padding: 20px 16px 100px; }
  .cab-in { padding: 12px 16px; }
  .cab .lema { display: none; }
  .cab .nombre { display: block; }
  .m-telecomo .cab .nombre { display: none; } /* Telecomo, como estaba */
  .fila2 { grid-template-columns: 1fr; }
  .tarjeta { padding: 18px 16px 4px; }
  .selector { margin: 0 -16px 16px; padding: 10px 16px; }
  .inv-cab { display: none; }
  .inv-fila { grid-template-columns: 30px 1fr 32px; }
  .inv-fila .nom { grid-column: 2; }
  .inv-fila .quitar { grid-column: 3; grid-row: 1; }
  .inv-fila .tec, .inv-fila .cri { grid-column: 2 / 4; }
  .pasos .lbl { display: none; }
  .pasos [aria-current="step"] .lbl { display: inline; }
  .chip span { font-size: 14.5px; padding: 8px 12px; }
}

/* Bienvenida en el celular (también de lado): el botón para empezar sube antes de las ventajas (antes quedaba bajo la
   primera pantalla); el aviso de no escribir contraseñas sigue delante del botón. */
@media (max-width: 720px), (max-height: 500px) {
  .intro > :first-child { order: 1; }
  .intro > .nota { order: 2; margin: 0; }
  .intro > .nav { order: 3; margin-top: 0; }
  .intro > .ventajas { order: 4; }
}

/* Pantallas bajas (navegador de Instagram, celular con barras): la barra de pasos deja de ir fija y solo se queda fijo
   el selector de aplicaciones. Las dos juntas ocupaban el 20 % de una pantalla de 620 px. */
@media (max-width: 720px) and (max-height: 700px), (max-height: 500px) {
  html { scroll-padding-top: 80px; } /* solo queda fijo el selector de aplicaciones (~69 px) */
  .pasos { position: static; }
  .selector { top: 0; }
}

/* Zonas para el dedo de 44 px en pantallas táctiles. Las pastillas y botones de texto crecen; los pasos y el botón de
   quitar amplían solo su zona de toque (::after), para no mover el diseño. */
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .chip span, .btn-txt, .tab { min-height: 44px; }
  .btn-txt { display: inline-flex; align-items: center; gap: .35em; } /* el flex se come el espacio tras el icono */
  .pasos button, .quitar { position: relative; }
  .pasos button::after { content: ""; position: absolute; inset: -3px -1px; } /* 42×38 → 44×44 */
  .quitar::after { content: ""; position: absolute; inset: -6px; }
}

@media print {
  .cab, .pasos, main, .pie { display: none !important; }
  body { background: #fff; }
  #impresion { display: block; padding: 0 6mm; font-size: 11pt; }
  #impresion h1 { font-size: 18pt; margin-bottom: 4px; }
  #impresion h2 { font-size: 14pt; margin: 18px 0 6px; border-bottom: 2px solid var(--naranja); }
  #impresion h3 { font-size: 10pt; text-transform: uppercase; color: var(--naranja-osc); margin: 10px 0 4px; }
  #impresion table { width: 100%; border-collapse: collapse; }
  #impresion th, #impresion td { text-align: left; vertical-align: top; padding: 3px 6px; border-bottom: 1px solid #eee; }
  #impresion th { width: 42%; font-weight: 500; color: #57534e; }
  #impresion section { break-inside: auto; }
  @page { size: letter; margin: 14mm; }
}
