:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; background: #0B0B0F; color: #F4F4F7;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 64px 24px 96px; }
a { color: #9A8CFF; }
h1 { font-size: 40px; line-height: 1.15; letter-spacing: -1px; margin: 0 0 8px; }
h2 { font-size: 22px; margin: 48px 0 12px; letter-spacing: -0.3px; }
h3 { font-size: 16px; margin: 28px 0 8px; color: #F4F4F7; }
p, li { color: #C9C9D6; }
li { margin: 6px 0; }
.lead { font-size: 19px; color: #C9C9D6; margin: 0 0 8px; }
.mark { display: block; width: 44px; height: 44px; border: 5px solid #7C6CF0; border-radius: 50%; position: relative; margin-bottom: 24px; }
.mark::after { content: ""; position: absolute; inset: 7px; background: #7C6CF0; border-radius: 50%; }
pre {
  background: #15151D; border: 1px solid #2A2A38; border-radius: 12px;
  padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #E7E7F0;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; color: #9A8CFF; }
pre code { color: inherit; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #2A2A38; vertical-align: top; }
th { color: #9A9AAD; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.note { border-left: 3px solid #7C6CF0; padding: 4px 0 4px 16px; margin: 24px 0; color: #C9C9D6; }
footer { margin-top: 80px; padding-top: 24px; border-top: 1px solid #2A2A38; color: #65657A; font-size: 14px; }
footer a { color: #9A9AAD; margin-right: 18px; }
.date { color: #65657A; font-size: 14px; }
.qr { background: #fff; border-radius: 16px; padding: 14px; width: min(100%, 320px); margin: 24px 0; }
.qr svg { display: block; width: 100%; height: auto; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 34px; font-weight: 700; letter-spacing: 3px; color: #F4F4F7; margin: 4px 0 20px; }
.boton { display: inline-block; background: #7C6CF0; color: #fff; padding: 14px 26px; border-radius: 12px; font-weight: 700; text-decoration: none; }

/* --- /empresas: la guía para empresas (índice lateral, ejemplos con pestañas) --- */
.docs-page .wrap { max-width: 1120px; }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.docs .doc { min-width: 0; max-width: 760px; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.toc a { color: #9A9AAD; text-decoration: none; padding: 7px 12px; border-left: 2px solid #2A2A38; }
.toc a:hover { color: #F4F4F7; }
.toc a.on { color: #F4F4F7; border-left-color: #7C6CF0; }
h2[id], h3[id] { scroll-margin-top: 24px; }
.doc h2 { margin-top: 56px; padding-top: 8px; }
.doc table.ref td:first-child { white-space: nowrap; }
.bloque { position: relative; }
.bloque pre { margin: 12px 0; padding-right: 76px; }
.copiar {
  position: absolute; top: 20px; right: 10px; background: #22222E; color: #C9C9D6;
  border: 1px solid #34344A; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.copiar:hover { background: #2C2C3C; color: #fff; }
.copiar.ok { background: #7C6CF0; border-color: #7C6CF0; color: #fff; }
.ej { margin: 16px 0; }
.ej.js .bloque pre { margin-top: 0; border-top-left-radius: 0; }
.tabs { display: flex; gap: 4px; }
.tabs button {
  background: #15151D; color: #9A9AAD; border: 1px solid #2A2A38; border-bottom: 0;
  border-radius: 10px 10px 0 0; padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.tabs button.on { background: #7C6CF0; border-color: #7C6CF0; color: #fff; }
.ej:not(.js) pre { margin: 12px 0; }
.pastillas { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.pastillas .etiqueta { margin: 0; }
.etiqueta.gratis { border-color: #1F6B55; background: rgba(47, 168, 120, 0.14); color: #7BE0B8; }
.gratis-nota { margin: 4px 0 0; color: #E0E0EA; }
.tarjeta.calle { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 28px; align-items: center; padding: 28px; border-color: #2E2A5A; background: linear-gradient(135deg, rgba(26, 22, 64, 0.9), rgba(21, 21, 29, 0.88) 70%); }
.tarjeta.calle h3 { margin-top: 0; font-size: 22px; letter-spacing: -0.4px; }
.fuentes.chicas { margin-top: 16px; } .fuentes.chicas li { padding: 5px 13px; font-size: 14px; }
.calle-avisos { display: flex; flex-direction: column; gap: 8px; }
.calle .aviso { background: rgba(48, 48, 62, 0.9); }
@media (min-width: 861px) and (max-width: 1120px) {
  .hero h1 { font-size: 42px; letter-spacing: -1.4px; }
  .hero { gap: 24px; }
}
@media (max-width: 860px) {
  .docs-page .wrap { padding: 28px 16px 72px; }
  .docs { display: block; }
  .toc {
    position: sticky; top: 0; z-index: 5; flex-direction: row; overflow-x: auto; gap: 6px;
    margin: 0 -16px 24px; padding: 10px 16px; background: #0B0B0F; border-bottom: 1px solid #2A2A38;
    -webkit-overflow-scrolling: touch;
  }
  .toc a { white-space: nowrap; border: 1px solid #2A2A38; border-radius: 999px; padding: 6px 12px; }
  .toc a.on { border-color: #7C6CF0; }
  h1 { font-size: 32px; }
  .doc h2 { margin-top: 44px; }
  .bloque pre { padding: 44px 16px 16px; font-size: 12.5px; }
  .copiar { top: 20px; right: 8px; }
  h2[id], h3[id] { scroll-margin-top: 64px; }
}

/* --- /: la portada --- */
#fondo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.landing .wrap { max-width: 1080px; padding: 24px 24px 72px; }
.landing h2 { font-size: 32px; letter-spacing: -0.8px; line-height: 1.15; margin: 96px 0 16px; }
.landing .lead { font-size: 19px; max-width: 36em; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 48px; }
.marca { display: inline-flex; align-items: center; gap: 12px; color: #F4F4F7; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.mark.chico { width: 26px; height: 26px; border-width: 3.5px; margin: 0; }
.mark.chico::after { inset: 4px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-texto { color: #C9C9D6; text-decoration: none; font-size: 15px; }
.nav-texto:hover { color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn.prim { background: #7C6CF0; color: #fff; }
.btn.prim:hover { background: #6B5BE0; }
.btn.sec { background: rgba(11, 11, 15, 0.5); color: #F4F4F7; border-color: #3A3A50; min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn.sec:hover { border-color: #7C6CF0; }
.btn:focus-visible, .tienda:focus-visible, .codigo input:focus-visible, .marca:focus-visible, .landing a:focus-visible { outline: 2px solid #9A8CFF; outline-offset: 3px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 32px; align-items: center; }
.etiqueta { display: inline-block; margin: 0 0 16px; padding: 5px 12px; border: 1px solid #3A3466; border-radius: 999px; background: rgba(124, 108, 240, 0.12); color: #B9AFFF; font-size: 13px; font-weight: 600; }
.hero h1 { font-size: 52px; line-height: 1.06; letter-spacing: -1.8px; margin: 0 0 20px; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; align-items: center; }
.hero .acciones .btn { min-height: 56px; }
.tienda { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 12px; background: #F4F4F7; color: #0B0B0F; text-decoration: none; }
.tienda svg { width: 24px; height: 24px; flex: none; }
.tienda span { display: flex; flex-direction: column; line-height: 1.15; }
.tienda small { font-size: 11px; font-weight: 500; }
.tienda strong { font-size: 19px; letter-spacing: -0.3px; }
a.tienda:hover { background: #fff; }
.tienda.apagado { background: rgba(11, 11, 15, 0.5); color: #9A9AAD; border: 1px dashed #3A3A50; padding: 0 22px; cursor: default; }

/* El teléfono y las empresas que convergen en él: todo en el flujo, nada
   absoluto ni flotando sobre el texto. */
.escena { width: min(100%, 320px); justify-self: center; display: flex; flex-direction: column; align-items: center; }
.orgs { list-style: none; margin: 0; padding: 0; width: 300px; max-width: 100%; display: flex; justify-content: space-between; }
.orgs li { margin: 0; }
.logo { font-style: normal; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; background: linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 62%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.logo.org { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.28); animation: brilla 4.5s ease-in-out infinite; }
.orgs li:nth-child(2) .logo { animation-delay: -.75s; } .orgs li:nth-child(3) .logo { animation-delay: -1.5s; } .orgs li:nth-child(4) .logo { animation-delay: -2.25s; } .orgs li:nth-child(5) .logo { animation-delay: -3s; } .orgs li:nth-child(6) .logo { animation-delay: -3.75s; }
.glifo { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 58%; height: 58%; }
.conv { display: block; width: 300px; max-width: 100%; height: 34px; margin: 4px 0 2px; }
.conv path { fill: none; stroke: #7C6CF0; stroke-width: 1.5; stroke-opacity: .6; stroke-dasharray: 3 5; animation: fluye 1.6s linear infinite; }
@keyframes fluye { to { stroke-dashoffset: -16; } }
@keyframes brilla { 0%, 100% { filter: none; } 50% { filter: brightness(1.18); } }
.telefono { width: 300px; max-width: 100%; border-radius: 42px; padding: 10px; background: #1B1B26; border: 1px solid #34344A; box-shadow: 0 30px 90px rgba(124, 108, 240, 0.28); }
.pantalla { border-radius: 33px; padding: 22px 10px 16px; background: radial-gradient(120% 55% at 50% 0%, #2B2468 0%, #14131F 66%); overflow: hidden; }
.hora { text-align: center; font-size: 46px; font-weight: 300; letter-spacing: -2px; color: #fff; line-height: 1.1; margin: 4px 0 2px; }
.titulo-bandeja { text-align: center; font-size: 11px; color: #B9B9CC; margin-bottom: 12px; letter-spacing: 0.3px; }
/* La bandeja tiene alto fijo: entre un aviso nuevo y el siguiente la página no se mueve. Lo que no entra se desvanece a propósito. */
.feed { height: 430px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }

/* Un aviso como lo muestra iOS: la app arriba, la empresa a la izquierda. */
.aviso { flex: none; background: rgba(62, 62, 76, 0.62); border-radius: 20px; padding: 9px 11px 10px; color: #F4F4F7; line-height: 1.25; animation: entra 0.6s cubic-bezier(.2,.8,.2,1) both; }
.feed .aviso:nth-child(2) { animation-delay: 0.2s; } .feed .aviso:nth-child(3) { animation-delay: 0.4s; } .feed .aviso:nth-child(4) { animation-delay: 0.6s; } .feed .aviso:nth-child(5) { animation-delay: 0.8s; }
.av-cab { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 10.5px; letter-spacing: 0.5px; color: #C2C2D2; }
.av-cab span { font-weight: 600; }
.av-cab em { margin-left: auto; font-style: normal; letter-spacing: 0; color: #AEAEC0; }
.noti-ico { width: 20px; height: 20px; border-radius: 6px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.marca-ico { width: 28px; height: 28px; border-radius: 8px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.av-cuerpo { display: flex; gap: 10px; align-items: center; }
.av-cuerpo .logo { width: 40px; height: 40px; border-radius: 11px; }
.av-texto { min-width: 0; flex: 1; font-size: 12.5px; }
.av-texto b, .av-texto span, .av-texto small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-texto b { font-size: 11.5px; font-weight: 600; color: #C9C9D8; }
.av-texto span { font-weight: 700; }
.av-texto small { color: #C9C9D6; font-size: 11.5px; }
@keyframes entra { from { opacity: 0; transform: translateY(-12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes cae { from { opacity: 0; max-height: 0; margin-bottom: -8px; padding-top: 0; padding-bottom: 0; transform: translateY(-12px) scale(0.97); } to { opacity: 1; max-height: 120px; margin-bottom: 0; transform: none; } }
.aviso.nuevo { animation: cae 0.7s cubic-bezier(.2,.8,.2,1) both; animation-delay: 0s !important; }
.aviso.est { animation: none; }

.codigo { margin: 56px 0 0; padding: 20px 22px; background: rgba(21, 21, 29, 0.85); border: 1px solid #2A2A38; border-radius: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px 28px; align-items: center; }
.codigo label span { color: #A6A6BA; }
.codigo code { color: #9A8CFF; }
.campo { display: flex; gap: 10px; }
.codigo input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid #3A3A50; background: #0B0B0F; color: #F4F4F7; font: inherit; }
.codigo input::placeholder { color: #7A7A90; }

.fuentes { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.fuentes li { margin: 0; padding: 8px 16px; border: 1px solid #2E2A5A; border-radius: 999px; background: rgba(124, 108, 240, 0.1); color: #D5CFFF; font-size: 15px; }
.tarjetas { display: grid; gap: 16px; margin-top: 24px; }
.tarjetas.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tarjetas.cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tarjeta, .pasos li { margin: 0; padding: 24px; background: rgba(21, 21, 29, 0.85); border: 1px solid #2A2A38; border-radius: 18px; }
.tarjeta svg { width: 34px; height: 34px; fill: none; stroke: #9A8CFF; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tarjeta h3 { margin: 14px 0 8px; font-size: 19px; letter-spacing: -0.2px; }
.tarjeta p { margin: 0; }
.tarjeta.uso h3 { margin-top: 0; }
.ejemplos { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ejemplos li { margin: 0; padding: 9px 14px; border-radius: 12px; background: #1E1E2A; border-left: 3px solid #7C6CF0; color: #E7E7F0; font-size: 14.5px; font-weight: 600; }
.mas { margin: 20px 0 0; }
.pasos { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pasos h3 { margin: 12px 0 6px; font-size: 18px; letter-spacing: -0.2px; }
.pasos p { margin: 0; }
.n { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: #7C6CF0; color: #fff; font-weight: 800; font-size: 15px; }
.landing .note { margin: 28px 0 8px; }
.landing .acciones .btn { min-height: 48px; font-size: 16px; }
.landing footer { margin-top: 80px; }

@media (max-width: 860px) {
  .landing .wrap { padding: 16px 16px 56px; }
  .nav { margin-bottom: 28px; }
  .nav-texto { display: none; }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 36px; letter-spacing: -1.2px; }
  .landing h2 { font-size: 27px; margin-top: 72px; }
  .escena { width: 100%; }
  .codigo { grid-template-columns: 1fr; padding: 18px; }
  .tarjetas.tres, .tarjetas.cuatro, .pasos, .tarjeta.calle { grid-template-columns: 1fr; }
  .tarjeta.calle { padding: 22px; }
  .tienda { flex: 1 1 100%; }
  .acciones .tienda.apagado { justify-content: center; }
  .hero .acciones .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .aviso, .aviso.nuevo, .logo.org, .conv path { animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .tienda { transition: background 0.15s, border-color 0.15s; } }
