/*  ══ LOS PLANES ══════════════════════════════════════════════════════

    El diseño de la eleccion de plan. Lo usan DOS pantallas:
      · login.html  — el paso 2 del registro
      · index.html  — la seccion de precios de la pagina de venta

    Estaba solo en login.css, y por eso la pagina de venta tenia su propio
    diseño y sus propios descuentos: cotizaba trimestral -7%% y anual -15%%
    cuando el registro cobra -10%% y -20%%. Un precio en la pagina y otro al
    pagar.

    Si se cambia algo aqui, cambia en las dos. Esa es la idea.

    Las cuentas viven en planes.js, al lado.                              */

/* ═══════════════════════════════════════════════════════════════════════════
   Bloque de PLANES — la pantalla de elegir plan
   ---------------------------------------------------------------------------
   Diseño entregado por Sergio el 28-ago-2026 (carpeta "Selección de Plan").
   Se respeta tal cual: cáscara con degradado y cápsula blanca, características
   sobre el degradado con tooltip, pie fijo con el total.

   Sustituye al bloque `ps-` anterior, que era la versión vieja de esta misma
   pantalla. Se borra en vez de dejarlo: dos hojas para la misma pantalla es
   la forma más segura de que alguien arregle la que no se ve.

   Todo cuelga de #plan-root. `goStep('plan')` en login.js esconde el resto de
   la página y muestra esto; no hace falta que flote por encima de nada.
   ═══════════════════════════════════════════════════════════════════════════ */

#plan-root[hidden] { display: none !important; }
.p2-root [hidden] { display: none !important; }

.p2-root {
  width: 100%; min-height: 100vh; box-sizing: border-box;
  background: #F1F2F4; font-family: 'DM Sans', system-ui, sans-serif; color: #14161D;
  display: flex; justify-content: center;
  padding: clamp(12px,2.2vh,24px) clamp(14px,2.2vw,26px);
}
.p2-root * { box-sizing: border-box; }
.p2-shell { width: 100%; max-width: 1220px; align-content: start; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: clamp(8px,1.4vh,16px); min-height: 0; }
@media (prefers-reduced-motion: no-preference) {
  .p2-shell { animation: p2In .4s cubic-bezier(.2,.8,.2,1); }
  @keyframes p2In { from { transform: translateY(8px); opacity: .6 } to { transform: none; opacity: 1 } }
}

/* ── cabecera ── */
.p2-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.p2-brand { display: flex; align-items: center; gap: 10px; }
.p2-logo { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #303680; }
.p2-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p2-brand-name { font-size: 13px; font-weight: 700; color: #14161D; }
.p2-brand-sub { font-size: 11px; color: #8A8F9C; font-weight: 500; }
.p2-title { font-size: clamp(19px,2.7vh,25px); font-weight: 700; letter-spacing: -.03em; margin: 0; text-align: center; color: #14161D; }
.p2-title em { font-style: normal; font-weight: 500; color: #6C77F2; }
.p2-step { font-size: 11px; font-weight: 600; color: #4453E6; background: #fff; border: 1px solid #E3E5EA; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

/* ── controles ── */
.p2-controls { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.p2-branchbar { display: flex; align-items: center; gap: 11px; padding: 5px 6px 5px 13px; background: #fff; border: 1px solid #E5E7EC; border-radius: 999px; }
.p2-branch-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #4A505E; }
.p2-branch-title span { color: #4453E6; display: flex; }
.p2-presets { display: flex; gap: 4px; }
.p2-chip { min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px; border: 1px solid #E5E7EC; background: #fff; color: #5A6070; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; font-variant-numeric: tabular-nums; }
.p2-chip:hover { border-color: #C3C7D1; color: #14161D; }
.p2-chip.on { background: #14161D; border-color: #14161D; color: #fff; }
.p2-stepper { display: inline-flex; align-items: center; gap: 2px; }
.p2-stepper button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #E5E7EC; background: #fff; color: #5A6070; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.p2-stepper button:hover { background: #14161D; border-color: #14161D; color: #fff; }
.p2-count { min-width: 24px; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.p2-billing { display: inline-flex; padding: 4px; background: #fff; border: 1px solid #E5E7EC; border-radius: 999px; }
.p2-bill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 15px; border-radius: 999px; border: none; background: transparent; color: #5A6070; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.p2-bill:hover { color: #14161D; }
.p2-bill.on { background: #14161D; color: #fff; }
.p2-bill-save { font-size: 10px; font-weight: 700; color: #1B7F4F; }
.p2-bill.on .p2-bill-save { color: #7BE3AC; }
.p2-off { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; font-size: 12px; font-weight: 600; color: #1B7F4F; background: #E8F8EF; border: 1px solid #C9EDD9; border-radius: 999px; }
.p2-off strong { font-weight: 800; }

/* ── tarjeta: cáscara con degradado + cápsula blanca ── */
.p2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px,1.4vw,20px); }
.p2-card { position: relative; text-align: left; font-family: inherit; cursor: pointer; display: flex; flex-direction: column; min-height: 0; border-radius: 24px; padding: 7px; transition: transform .18s, box-shadow .18s;
  background: linear-gradient(112deg,#4A5069 0%, #343A52 26%, #222739 58%, #14161F 100%); box-shadow: 0 22px 44px -28px rgba(20,22,29,.6); }
.p2-card:hover { transform: translateY(-2px); }
.p2-card.pro { background: linear-gradient(112deg,#7B3FE4 0%, #5B2BC4 22%, #38197F 48%, #1B0E3C 74%, #0A0713 100%); box-shadow: 0 26px 52px -24px rgba(59,25,127,.75); }
.p2-card.on { box-shadow: 0 0 0 2.5px #14161D, 0 26px 52px -26px rgba(20,22,29,.6); }
.p2-card.pro.on { box-shadow: 0 0 0 2.5px #7B3FE4, 0 26px 52px -22px rgba(59,25,127,.8); }

.p2-panel { background: #fff; border-radius: 18px; padding: clamp(14px,2vh,20px) clamp(16px,1.6vw,22px); }
.p2-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p2-eyebrow { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #4453E6; }
.p2-eyebrow::before, .p2-eyebrow::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #4453E6; }
.p2-savepill { font-size: 10.5px; font-weight: 700; color: #1B7F4F; background: #E8F8EF; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.p2-headline { font-weight: 700; font-size: clamp(19px,2.8vh,26px); line-height: 1.16; letter-spacing: -.035em; color: #14161D; margin: clamp(8px,1.3vh,13px) 0 0; }
.p2-headline em { display: block; font-style: normal; font-weight: 500; color: #6C77F2; }
.p2-card:not(.pro) .p2-headline em { color: #6B7280; }
.p2-pricerow { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: clamp(9px,1.5vh,15px); }
.p2-price { display: flex; align-items: baseline; gap: 3px; font-size: clamp(26px,4vh,38px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; color: #14161D; }
.p2-per { font-size: 13px; font-weight: 600; color: #8A8F9C; letter-spacing: 0; }
.p2-strike { font-size: 12.5px; color: #A9AEBA; text-decoration: line-through; padding-bottom: 2px; }
.p2-price-sub { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9AA0AC; margin-top: 6px; }
.p2-cta-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: clamp(10px,1.6vh,16px); }
.p2-choose { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; height: 42px; padding: 0 20px; border-radius: 999px; border: none; font-family: inherit; font-size: 13.5px; font-weight: 700; color: #fff; background: #14161D; cursor: pointer; transition: all .15s; box-shadow: 0 10px 22px -12px rgba(20,22,29,.9); }
.p2-choose:hover { background: #23262F; }
.p2-card.pro .p2-choose { background: linear-gradient(90deg,#1B0E3C,#7B3FE4); }
.p2-card.on .p2-choose { background: #0E9F6E; }
.p2-note { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 14px; background: #F5F6FA; border: 1px solid #EBEDF3; }
.p2-card.pro .p2-note { background: #F1F2FE; border-color: #E2E5FE; }
.p2-note-ic { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(140deg,#5B6BFF,#2C36A8); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p2-note-txt { font-size: 11px; font-weight: 600; line-height: 1.3; color: #4A505E; max-width: 17ch; }
.p2-note-btn { font-family: inherit; font-size: 11.5px; font-weight: 700; color: #14161D; background: #fff; border: 1px solid #E3E5EA; border-radius: 999px; padding: 7px 13px; cursor: pointer; white-space: nowrap; transition: all .15s; text-decoration: none; display: inline-flex; align-items: center; }
.p2-note-btn:hover { border-color: #B9BEC9; }

/* ── características sobre el degradado ── */
.p2-feats { flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: clamp(9px,1.4vh,15px) clamp(16px,1.6vw,26px); padding: clamp(15px,2.2vh,24px) clamp(14px,1.3vw,20px) clamp(12px,1.8vh,18px); }
.p2-feat { position: relative; display: flex; align-items: center; gap: 10px; font-size: clamp(12.5px,1.75vh,14.5px); font-weight: 600; line-height: 1.25; color: rgba(255,255,255,.92); white-space: nowrap; transition: color .15s; }
.p2-feat.hl { color: #FFE1A6; font-weight: 700; text-shadow: 0 0 18px rgba(240,196,106,.35); }
.p2-feat:hover { color: #fff; }
.p2-tick { width: 19px; height: 19px; border-radius: 50%; border: 1px solid rgba(255,255,255,.42); color: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.p2-feat.hl .p2-tick { background: linear-gradient(140deg,#FFD98A,#E0A94A); border-color: rgba(255,226,170,.9); color: #3A2405; box-shadow: 0 0 0 3px rgba(240,196,106,.16), 0 0 16px -2px rgba(240,196,106,.55); }
.p2-card:not(.pro) .p2-feat.hl .p2-tick { color: #3A2405; }
.p2-feat:hover .p2-tick { background: rgba(255,255,255,.9); border-color: #fff; color: #4A1E9E; }
.p2-tip { position: absolute; left: 25px; top: calc(100% + 6px); width: max(210px, 104%); padding: 8px 10px; font-size: 11px; font-weight: 500; line-height: 1.45; white-space: normal; color: #E8EAF2; background: #14161D; border-radius: 9px; box-shadow: 0 18px 36px -16px rgba(0,0,0,.6); opacity: 0; transform: translateY(-3px); pointer-events: none; transition: opacity .15s, transform .15s; z-index: 8; }
.p2-feat:hover .p2-tip, .p2-feat:focus-within .p2-tip { opacity: 1; transform: none; }
.p2-limits { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 clamp(14px,1.3vw,20px) clamp(14px,2vh,20px); }
.p2-limit { white-space: nowrap; font-size: clamp(11px,1.5vh,12.5px); font-weight: 600; color: rgba(255,255,255,.82); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: 6px 13px; border-radius: 999px; }

/* ── franja de canales dentro de la tarjeta ── */
.p2-works { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 clamp(14px,1.3vw,20px) clamp(13px,1.8vh,18px); padding-top: clamp(11px,1.6vh,15px); border-top: 1px solid rgba(255,255,255,.14); }
.p2-works-label { font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.p2-works-list { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.p2-work { display: inline-flex; align-items: center; gap: 6px; font-size: clamp(11px,1.45vh,12.5px); font-weight: 600; color: rgba(255,255,255,.88); }
.p2-work::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.45); }
.p2-card.pro .p2-work::before { background: #C9A45E; }

/* ── preguntas de una línea ── */
.p2-faq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 22px; padding: 0 4px; }
.p2-faq-item { display: flex; align-items: baseline; gap: 7px; font-size: 12px; color: #6C727F; }
.p2-faq-q { font-weight: 700; color: #14161D; white-space: nowrap; }

/* ── pie ── */
.p2-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: clamp(9px,1.3vh,13px) clamp(13px,1.3vw,18px); background: #fff; border: 1px solid #E5E7EC; border-radius: 18px; }
.p2-foot-label { font-size: 12px; color: #6C727F; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p2-foot-label strong { color: #14161D; font-weight: 700; }
.p2-foot-off { font-size: 10.5px; font-weight: 700; color: #1B7F4F; }
.p2-foot-total { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.p2-foot-amount { font-size: clamp(19px,2.6vh,24px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #14161D; }
.p2-foot-cycle, .p2-foot-eq { font-size: 11.5px; color: #9AA0AC; font-weight: 500; }
.p2-foot-right { display: flex; align-items: center; gap: 14px; }
.p2-trust { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #9AA0AC; }
.p2-actions { display: flex; gap: 9px; }
.p2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: clamp(42px,5.2vh,50px); padding: 0 8px 0 24px; border-radius: 999px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .15s; white-space: nowrap; }
.p2-btn.ghost { background: #fff; color: #5A6070; border: 1px solid #E3E5EA; padding: 0 22px; }
.p2-btn.ghost:hover:not(:disabled) { color: #14161D; border-color: #B9BEC9; }
.p2-btn.primary { background: linear-gradient(90deg,#0E1130 0%, #2A34A8 55%, #5B6BFF 100%); color: #fff; border: none; box-shadow: 0 18px 34px -18px rgba(61,73,216,.9); }
.p2-btn.primary .p2-badge { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #1B2160; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p2-btn.primary:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.p2-btn:disabled { cursor: default; }

@media (max-height: 740px) { .p2-faq { display: none } }
@media (max-height: 700px) { .p2-note-txt { display: none } .p2-trust { display: none } .p2-price-sub { display: none } .p2-works { display: none } }
@media (max-width: 760px) { .p2-faq { grid-template-columns: 1fr } }
/* El diseno original pasaba .p2-root a position:static en pantallas angostas
   para que la pagina creciera sola. Aqui NO puede: debajo esta el modal oscuro
   del resto del registro, y en static las dos pantallas se veian una tras
   otra. Se queda fija y desplaza por dentro, que ya lo permite (overflow:auto). */
@media (max-width: 980px) { .p2-grid { grid-template-columns: 1fr } }
@media (max-width: 620px) { .p2-feats { grid-template-columns: 1fr } .p2-cta-row { flex-direction: column; align-items: stretch } }
