/* =====================================================================
   TrámiteSimple — sistema visual «expediente»
   -----------------------------------------------------------------
   Mobile first real: el layout se diseña para 375–430 px y recién
   después se adapta a desktop (spec V2 §3).

   Dirección: institucional / administrativa. Una sola familia sans
   para títulos y texto, esquinas rectas y filetes en lugar de tarjetas
   redondeadas. Azul marino como color de marca y un azul claro como
   acento, sobre fondo gris frío. Transmite seriedad y oficialidad sin
   imitar portales estatales (spec V2 §27/§49): sin escudos, sin el
   celeste de Argentina.gob.ar ni su estructura de página.

   Regla de composición: el formulario es una hoja blanca apoyada sobre
   una banda azul marino; el resto del sitio es claro. El azul claro
   solo va en detalles (filetes, kickers, numerales sobre la banda),
   nunca en botones ni en texto largo.
   ===================================================================== */

:root {
    /* Superficies y fondo ------------------------------------------- */
    --bg: #f3f5f8;            /* gris frío muy claro */
    --surface: #ffffff;
    --surface-alt: #f7f9fc;

    /* Azul marino institucional ------------------------------------- */
    --brand: #0b2d55;
    --brand-800: #08223f;     /* banda de la primera pantalla */
    --brand-700: #123a6b;
    --brand-600: #1d5aa6;     /* azul intermedio: links, foco, selección */
    --brand-100: #d2e0f0;
    --brand-050: #edf3fa;

    /* Acentos (los nombres --gold se conservan por compatibilidad) --- */
    --gold: #2a5c99;          /* kickers sobre blanco (AA) */
    --gold-line: #7fb0e6;     /* azul claro: filetes; texto solo sobre la banda */

    /* Texto sobre la banda azul marino ------------------------------- */
    --on-dark: #ffffff;
    --on-dark-soft: #c9d6e8;
    --on-dark-mute: #9fb2cc;

    /* Acción positiva ----------------------------------------------- */
    --green: #1e7a46;
    --green-050: #e8f4ec;

    /* Semánticos ----------------------------------------------------- */
    --amber: #a4650a;
    --amber-050: #fdf3e3;
    --red: #b3271e;
    --red-050: #fdeeec;
    --violet: #5b39ad;
    --violet-050: #f0ecfb;

    /* Texto ---------------------------------------------------------- */
    --ink: #1a2330;           /* carbón azulado */
    --ink-soft: #4d5868;
    --ink-mute: #66717f;

    /* Líneas --------------------------------------------------------- */
    --line: #dde3eb;
    --line-strong: #c3ccd8;

    /* Formas: rectas, como un documento ------------------------------ */
    --r-card: 4px;
    --r-card-lg: 4px;
    --r-field: 3px;
    --r-pill: 3px;

    /* Profundidad: mínima en el papel, marcada sobre la banda --------- */
    --shadow-xs: 0 1px 2px rgba(11, 45, 85, .06);
    --shadow-sm: 0 2px 8px rgba(11, 45, 85, .07);
    --shadow-md: 0 10px 28px rgba(11, 45, 85, .10);
    --shadow-sheet: 0 22px 48px rgba(3, 15, 32, .32), 0 2px 6px rgba(3, 15, 32, .18);

    --container: 1160px;
    --form-col: 480px;
    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-heading: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

/* Varios componentes fijan `display` por clase, y una regla de autor le gana
   siempre a la del user-agent: sin esto, `hidden` deja de ocultar (los
   errores de campo aparecían como un "!" rojo suelto). */
[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    font-family: var(--font-heading);
    line-height: 1.2;
    letter-spacing: -.015em;
    font-weight: 600;
}
h1 { font-size: 1.85rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand-600); text-underline-offset: 3px; text-decoration-thickness: 1px; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 18px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--brand); color: #fff; padding: 12px 16px;
    text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 2px;
}

/* =====================================================================
   Header — 56–64 px, sin navegación completa en mobile (spec V2 §5)
   ===================================================================== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40;
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; min-height: 60px;
}
.brand {
    display: inline-flex; align-items: center; gap: 11px;
    text-decoration: none; color: inherit;
}
.brand__mark { display: flex; flex: 0 0 auto; }
.brand__text { padding-left: 11px; border-left: 1px solid var(--line-strong); }
.brand__text strong {
    display: block; font-family: var(--font-heading);
    font-size: 1.1rem; font-weight: 700; letter-spacing: -.005em;
    line-height: 1.1; color: var(--brand);
}
.brand__text small {
    display: block; margin-top: 2px;
    font-size: .62rem; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink-mute); line-height: 1.3;
}
.header-contact {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: .84rem; font-weight: 600; color: var(--brand);
    text-decoration: none; padding: 8px 13px; border-radius: var(--r-field);
    border: 1px solid var(--brand); background: var(--surface);
    white-space: nowrap;
    transition: background-color .14s ease, color .14s ease;
}
.header-contact:hover { background: var(--brand); color: #fff; }
.header-contact svg { flex: 0 0 auto; }
.site-nav { display: none; align-items: center; gap: 26px; }
.site-nav a {
    color: var(--ink-soft); text-decoration: none;
    font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brand); border-bottom-color: var(--gold-line); }

/* Acceso al portal de descarga en mobile (en tablet+ va en .site-nav).
   Se funde con la banda azul marino de la primera pantalla. */
.portal-strip {
    display: block; padding: 9px 16px; text-align: center;
    font-size: .82rem; color: var(--on-dark-soft); text-decoration: none;
    background: var(--brand-700); border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.portal-strip strong { color: var(--gold-line); font-weight: 600; }
.portal-strip:hover { background: var(--brand); }

/* Franja institucional sobre el header (no sticky: se va al hacer scroll). */
.utility-bar {
    background: var(--brand-800); color: var(--on-dark-mute);
    font-size: .7rem; letter-spacing: .02em; line-height: 1.4;
}
.utility-bar__inner {
    display: flex; justify-content: center; gap: 16px;
    padding-top: 6px; padding-bottom: 6px; text-align: center;
}
.utility-bar__contact { display: none; }
.utility-bar a { color: var(--on-dark-soft); text-decoration: none; }
.utility-bar a:hover { color: #fff; text-decoration: underline; }

/* Descargo en barra (spec §2/§44). Solo en páginas sin hero. */
.topbar-disclaimer {
    margin: 0; padding: 8px 18px; text-align: center;
    background: var(--surface-alt); border-bottom: 1px solid var(--line);
    color: var(--ink-mute); font-size: .72rem; line-height: 1.4;
}

/* =====================================================================
   Bloque de conversión — primera pantalla (spec V2 §4/§26)
   Banda azul marino con una trama muy tenue, tipo papel de seguridad.
   En mobile el encabezado es compacto para que la hoja del formulario
   asome en la primera pantalla.
   ===================================================================== */
.convert {
    padding: 16px 0 28px;
    color: var(--on-dark);
    background-color: var(--brand-800);
    background-image:
        radial-gradient(ellipse at 15% -10%, rgba(127, 176, 230, .13), transparent 55%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 10px),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 10px);
    border-bottom: 3px solid var(--gold-line);
}
.convert__grid { display: grid; gap: 16px; }

/* --- Encabezado compacto (spec V2 §6) ------------------------------ */
.lead__eyebrow {
    display: flex; align-items: center; gap: 10px; margin: 0 0 8px;
    font-size: .7rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--gold-line);
}
.lead__eyebrow::before {
    content: ""; width: 26px; height: 1px; background: currentColor; flex: 0 0 auto;
}
.lead h1 {
    font-size: 1.5rem; font-weight: 600; line-height: 1.15;
    margin: 0 0 8px; max-width: 22ch; color: var(--on-dark);
}
.lead__sub {
    font-size: .92rem; line-height: 1.5; color: var(--on-dark-soft); margin: 0 0 10px; max-width: 44ch;
}

/* Apoyo de confianza: solo desktop, donde sobra espacio en la columna izquierda.
   Con dos clases para ganarle a `.trust { display: grid }`, que viene después. */
.lead .lead__aside { display: none; }
.convert .trust { gap: 0; margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); max-width: 420px; }
.convert .trust li {
    padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .12);
    color: var(--on-dark-soft); font-size: .9rem;
}
.convert .trust svg { color: var(--gold-line); }

/* La leyenda bajo el formulario también vive sobre la banda */
.convert .text-muted { color: var(--on-dark-mute); }

/* --- Hoja principal ------------------------------------------------- */
.checkout-card {
    background: var(--surface);
    border-top: 4px solid var(--gold-line);
    border-radius: var(--r-card-lg);
    box-shadow: var(--shadow-sheet);
    padding: 20px 18px 22px;
    color: var(--ink);
}

/* Encabezado de la hoja, como el de un formulario impreso */
.checkout-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: -20px -18px 18px; padding: 13px 18px 12px;
    background: var(--surface-alt); border-bottom: 1px solid var(--line);
}
.checkout-card__kicker {
    margin: 0; font-size: .64rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--gold);
}
.checkout-card__title {
    margin: 2px 0 0; font-family: var(--font-heading); font-size: .98rem;
    font-weight: 600; line-height: 1.25; color: var(--brand);
}
.checkout-card__secure {
    display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
    font-size: .7rem; font-weight: 600; color: var(--ink-mute); white-space: nowrap;
}

.block-label {
    display: block; margin: 0 0 10px;
    font-size: .7rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-mute);
}

/* --- Selector de modalidad (spec V2 §8/§9) --------------------------
   Lista vertical de casillas, como un formulario impreso: cada opción
   es una fila con su radio a la izquierda y el precio alineado a la
   derecha. El input real sigue cubriendo toda la fila.
   ------------------------------------------------------------------ */
.seg {
    display: grid; grid-template-columns: 1fr; gap: 0;
    background: var(--surface);
    border: 1px solid var(--line-strong); border-radius: var(--r-field);
    overflow: hidden;
}
.seg__opt { position: relative; display: block; }
.seg__opt + .seg__opt { border-top: 1px solid var(--line); }
.seg__opt input {
    position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
    margin: 0; cursor: pointer; z-index: 1;
}
.seg__box {
    position: relative;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 50px; padding: 10px 15px 10px 46px;
    font-size: .95rem; font-weight: 500; color: var(--ink);
    transition: background-color .15s ease, box-shadow .15s ease;
}
.seg__box::before {
    content: ""; position: absolute; left: 16px; top: 50%;
    width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
    border: 1.5px solid var(--line-strong); background: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.seg__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.seg__main { display: flex; align-items: center; gap: 6px; }
.seg__note { font-size: .76rem; font-weight: 400; color: var(--ink-mute); }
.seg__opt input:checked + .seg__box .seg__note { color: var(--brand-600); }
/* Exprés fuera de su ventana horaria: visible, pero no seleccionable. */
.seg__opt.is-disabled input { cursor: not-allowed; }
.seg__opt.is-disabled .seg__box { background: var(--surface-alt); color: var(--ink-mute); }
.seg__opt.is-disabled .seg__price { color: var(--ink-mute); }
.seg__opt.is-disabled .seg__box::before { opacity: .5; }
.seg__price {
    font-size: .95rem; font-weight: 600; color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}
.seg__opt:hover .seg__box { background: var(--surface-alt); }
.seg__opt input:checked + .seg__box {
    background: var(--brand-050);
    box-shadow: inset 3px 0 0 var(--brand);
    font-weight: 600; color: var(--brand);
}
.seg__opt input:checked + .seg__box::before {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 4px var(--surface);
    background: var(--brand);
}
.seg__opt input:checked + .seg__box .seg__price { color: var(--brand); }
.seg__opt input:focus-visible + .seg__box {
    outline: 2px solid var(--brand-600); outline-offset: -2px;
}
/* El radio dibujado ya marca la elección: el tilde sobra. */
.seg__check,
.seg__opt input:checked + .seg__box .seg__check { display: none; }

/* Detalle de la modalidad elegida: una línea de comprobante */
.mode {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 12px; padding: 12px 14px;
    border-left: 3px solid var(--gold-line);
    background: var(--surface-alt);
}
.mode__name {
    margin: 0; font-size: .78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft);
}
.mode__meta { margin: 4px 0 0; font-size: .8rem; color: var(--ink-mute); }
.mode__detail { margin: 8px 0 0; font-size: .8rem; color: var(--ink-mute); }
.mode__detail[hidden] { display: none; }
.mode__price {
    margin: 0; font-family: var(--font-heading);
    font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em;
    white-space: nowrap; color: var(--brand); font-variant-numeric: tabular-nums;
}
.tag {
    display: inline-block; padding: 1px 6px; border-radius: var(--r-pill);
    border: 1px solid var(--gold-line); color: var(--gold);
    font-size: .64rem; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; vertical-align: 1px;
}

/* Resumen persistente cuando el selector se colapsa (spec V2 §18) */
.recap {
    display: none; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-left: 3px solid var(--gold-line); background: var(--surface-alt);
}
.recap.is-visible { display: flex; }
.recap__name { margin: 0; font-size: .9rem; font-weight: 600; flex: 1 1 auto; }
.recap__price {
    margin: 0; font-family: var(--font-heading);
    font-size: 1.15rem; font-weight: 700; color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.recap__change {
    flex: 0 0 auto; background: none; border: none; padding: 4px 2px;
    font: inherit; font-size: .8rem; font-weight: 600; color: var(--brand-600);
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.picker.is-hidden { display: none; }

/* Sugerencia de pasar a la modalidad siguiente (copy desde config/services.php) */
.upsell {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; padding: 10px 14px;
    border: 1px dashed var(--brand-600); border-radius: var(--r-field);
    background: var(--brand-050);
}
.upsell[hidden] { display: none; }
.upsell__text { margin: 0; font-size: .85rem; color: var(--ink); flex: 1 1 220px; }
.upsell__btn {
    flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--brand);
    border-radius: var(--r-pill); background: var(--surface);
    font: inherit; font-size: .8rem; font-weight: 600; color: var(--brand); cursor: pointer;
}
.upsell__btn:hover { background: var(--brand); color: var(--surface); }

.card-rule { border: 0; border-top: 1px dashed var(--line-strong); margin: 20px 0 18px; }

/* =====================================================================
   Formulario progresivo (spec V2 §11–§17)
   ===================================================================== */
.wizard__progress {
    display: grid; gap: 7px; margin: 0 0 16px;
    font-size: .7rem; font-weight: 600; color: var(--ink-mute);
    letter-spacing: .12em; text-transform: uppercase;
}
/* Barra segmentada: se llenan los pasos ya recorridos */
.dots { display: flex; gap: 3px; }
.dots i {
    flex: 1 1 0; height: 4px; display: block;
    background: var(--line);
    transition: background-color .2s ease;
}
.dots i.is-on { background: var(--brand); }

/* Base = sin JavaScript: todos los pasos visibles y apilados.
   El modo por pasos lo activa app.js agregando .is-progressive. */
.step + .step { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
/* Con dos clases para ganarle a los `display` que los componentes declaran
   más abajo: sin JS no hay a dónde navegar, así que no se muestran. */
.wizard .step__actions, .wizard .step__back { display: none; }

.wizard.is-progressive .step { display: none; }
.wizard.is-progressive .step + .step { margin-top: 0; padding-top: 0; border-top: 0; }
.wizard.is-progressive .step.is-active { display: block; animation: step-in .2s ease-out; }
.wizard.is-progressive .step__actions { display: flex; }
.wizard.is-progressive .step__back { display: grid; }
@keyframes step-in {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: none; }
}

.step__head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.step__back {
    flex: 0 0 auto; width: 32px; height: 32px;
    display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--r-field);
    color: var(--ink-soft); cursor: pointer;
}
.step__back:hover { border-color: var(--brand); color: var(--brand); }
.step__q {
    margin: 0; font-family: var(--font-heading);
    font-size: 1.3rem; font-weight: 600; letter-spacing: -.005em; color: var(--ink);
}

.step__actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 14px; margin-top: 16px;
}
.btn-next {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 46px; padding: 10px 20px;
    border: 1px solid var(--brand); border-radius: var(--r-field);
    background: var(--surface); color: var(--brand);
    font: inherit; font-size: .9rem; font-weight: 600; letter-spacing: .02em;
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease;
}
.btn-next:hover { background: var(--brand); color: #fff; }

/* --- Campos (spec V2 §33) ------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
    font-size: .72rem; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink-soft);
}
.field .hint { margin: 0; font-size: .8rem; color: var(--ink-mute); line-height: 1.45; }
.field__wrap { position: relative; display: block; }

.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="date"], .field input[type="password"], .field input[type="number"],
.field select, .field textarea {
    width: 100%;
    font: inherit;
    font-size: 16px;                 /* evita el zoom automático en iOS */
    min-height: 54px;
    padding: 14px 44px 14px 14px;
    color: var(--ink);
    background: var(--surface-alt);
    border: 1px solid var(--line-strong);
    border-bottom: 2px solid #9ea9b8;
    border-radius: var(--r-field);
    transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.field textarea { min-height: 128px; padding-right: 14px; resize: vertical; line-height: 1.5; }
.field select { padding-right: 14px; }
.field ::placeholder { color: #95a0ad; }

.field input:hover, .field textarea:hover { border-color: #b3bdca; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand-600);
    border-bottom-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26, 95, 91, .14);
}

/* Estado válido: marca discreta, nunca una alerta verde grande (§35) */
.field__ok {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    display: none; pointer-events: none;
}
.field.is-valid .field__ok { display: block; }
.field.is-valid input { border-bottom-color: var(--green); }

.field.is-invalid input, .field--error input,
.field--error select, .field--error textarea { border-color: var(--red); border-bottom-color: var(--red); }
.field.is-invalid input:focus, .field--error input:focus {
    box-shadow: 0 0 0 3px rgba(179, 39, 30, .14);
}
.field__error {
    margin: 0; font-size: .82rem; font-weight: 500; color: var(--red);
    display: flex; align-items: flex-start; gap: 6px;
}
.field__error::before { content: "!"; font-weight: 700; flex: 0 0 auto; }

/* --- Sugerencias de dominio de email -------------------------------
   La lista se cuelga de <body> con position:fixed (ver app.js): los
   pasos inactivos del wizard están ocultos y un dropdown posicionado
   dentro del campo quedaría recortado. Sin JavaScript nunca aparece.
   ------------------------------------------------------------------ */
.email-ac {
    position: fixed; z-index: 60; display: none;
    margin: 0; padding: 4px; list-style: none;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-field);
    box-shadow: var(--shadow-md);
    max-height: 250px; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.email-ac li {
    padding: 12px; border-radius: 2px;
    font-size: 16px; font-weight: 500; line-height: 1.2; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer;
}
.email-ac li.is-active { background: var(--brand-050); box-shadow: inset 3px 0 0 var(--brand); }
.email-ac b { font-weight: 700; color: var(--brand-600); }  /* prefijo que coincide */
.email-ac i { font-style: normal; color: var(--ink-mute); } /* lo que ya escribió */

/* --- Selector de nacionalidad (§11) --------------------------------
   Sin JavaScript se ve el <select> nativo con las 198 opciones y todo
   funciona. Con JavaScript, app.js le agrega `.is-enhanced` y pone un
   buscador encima: un display:none sigue enviando su valor con el
   formulario, así que el control real nunca deja de ser el <select>.
   ------------------------------------------------------------------ */
.field select.is-enhanced { display: none; }

/* El buscador es un input[type=text] dentro de .field: ya hereda el alto, el
   foco, el tilde de válido y el borde de error del resto de los campos. */

.picker-ac li {
    white-space: normal;
    display: flex; align-items: baseline; gap: 2px;
}
/* Nombre del país detrás del gentilicio: ayuda a decidir, no compite. */
.picker-ac i {
    font-style: normal; font-weight: 500;
    color: var(--ink-mute); font-size: .88em;
}

/* --- Consentimiento único (spec V2 §23) ---------------------------- */
.consent {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: .86rem; line-height: 1.5; color: var(--ink-soft);
    padding: 14px 15px; border: 1px solid var(--line-strong);
    border-left: 3px solid var(--brand);
    border-radius: var(--r-field); background: var(--surface-alt);
    cursor: pointer;
}
.consent input[type="checkbox"] {
    width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto;
    accent-color: var(--brand); cursor: pointer;
}
.consent a { font-weight: 600; }
.consents { display: grid; gap: 12px; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =====================================================================
   Barra de pago siempre visible (spec V2 §19–§24)
   ===================================================================== */
.paybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--surface);
    border-top: 3px solid var(--brand);
    box-shadow: 0 -6px 24px rgba(11, 45, 85, .12);
    padding: 11px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    color: var(--ink);
}
.paybar__inner { max-width: var(--container); margin: 0 auto; }
.paybar__total {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 9px;
}
.paybar__label {
    font-size: .7rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-mute);
}
.paybar__amount {
    font-family: var(--font-heading);
    font-size: 1.4rem; font-weight: 700; color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.paybar__hint {
    margin: 8px 0 0; text-align: center; font-size: .76rem; color: var(--ink-mute);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.paybar__hint.is-ready { color: var(--green); font-weight: 600; }

.btn-pay {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 56px; padding: 14px 20px;
    font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: .01em;
    color: #fff; background: var(--brand);
    border: 1px solid var(--brand); border-radius: var(--r-field);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
    cursor: pointer; text-decoration: none;
    transition: background-color .14s ease, transform .1s ease;
}
.btn-pay:hover:not(:disabled) { background: var(--brand-700); }
.btn-pay:active:not(:disabled) { transform: translateY(1px); }
.btn-pay:disabled {
    /* Menor contraste pero perfectamente legible (spec V2 §20) */
    background: #9aa6b5; border-color: #9aa6b5; color: #fff;
    box-shadow: none; cursor: not-allowed;
}
.btn-pay svg { flex: 0 0 auto; }

/* Deja lugar para la barra fija */
.has-paybar { padding-bottom: 172px; }

/* =====================================================================
   Contenido secundario (debajo del flujo comercial, spec V2 §58)
   ===================================================================== */
.section { padding: 44px 0; }
.section--tint { background: var(--bg); }
.section--plain { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 62ch; margin-bottom: 26px; }
.section__head p:not(.section__kicker) { margin: 0; color: var(--ink-soft); }
.section__kicker {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 10px; font-size: .7rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--gold);
}
.section__kicker::before {
    content: ""; width: 26px; height: 1px; background: var(--gold-line); flex: 0 0 auto;
}
.narrow .section__head { text-align: left; }

/* Cómo funciona (spec V2 §37): numerales grandes sobre un filete */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: s; }
.steps li {
    display: flex; flex-direction: column; gap: 6px;
    padding-top: 14px; border-top: 2px solid var(--brand);
    font-size: .93rem; color: var(--ink-soft);
}
.steps li::before {
    counter-increment: s; content: counter(s, decimal-leading-zero);
    font-family: var(--font-heading); font-size: 2rem; font-weight: 600;
    line-height: 1; color: #2f6fbf;   /* numeral azul: 4.9:1 sobre blanco */
}
.steps strong {
    display: block; margin-bottom: 3px;
    font-family: var(--font-heading); font-size: 1.08rem; font-weight: 600; color: var(--ink);
}

/* Acordeón: plazos y preguntas frecuentes (spec V2 §38/§39).
   Lista con filetes, como el índice de un documento. */
.accordion { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.accordion details {
    background: transparent; border-bottom: 1px solid var(--line-strong);
    padding: 0 2px;
}
.accordion summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 17px 0; cursor: pointer; list-style: none;
    font-family: var(--font-heading); font-size: 1.04rem; font-weight: 600; color: var(--ink);
}
.accordion summary:hover { color: var(--brand); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
    content: "+"; flex: 0 0 auto;
    width: 26px; height: 26px; display: grid; place-items: center;
    border: 1px solid var(--line-strong); border-radius: var(--r-field);
    font-family: var(--font); font-size: 1.05rem; font-weight: 500; line-height: 1;
    color: var(--brand);
}
.accordion details[open] summary::after {
    content: "−"; background: var(--brand); border-color: var(--brand); color: #fff;
}
.accordion details > *:not(summary) { margin-top: 0; }
.accordion p, .accordion ul {
    color: var(--ink-soft); font-size: .92rem; margin: 0 0 16px; max-width: 72ch;
}
.accordion ul { padding-left: 1.15em; }
.accordion li { margin-bottom: .35em; }
.faq { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }  /* alias heredado */
.faq details { border-bottom: 1px solid var(--line-strong); padding: 0 2px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 0; cursor: pointer; list-style: none; font-family: var(--font-heading); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--ink-soft); font-size: .92rem; }

/* Señales de confianza reales (spec V2 §50) */
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.trust li {
    display: flex; gap: 11px; align-items: flex-start;
    font-size: .88rem; color: var(--ink-soft);
}
.trust svg { flex: 0 0 auto; margin-top: 2px; color: var(--green); }

.payment-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.payment-methods li {
    border: 1px solid var(--line-strong); border-radius: var(--r-field); padding: 6px 12px;
    font-size: .8rem; font-weight: 500; color: var(--ink-soft); background: var(--surface);
}

/* =====================================================================
   Componentes compartidos con el resto de las páginas
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; letter-spacing: .01em;
    text-decoration: none; cursor: pointer;
    min-height: 52px; padding: 14px 24px; text-align: center;
    border: 1px solid transparent; border-radius: var(--r-field);
    transition: background-color .14s ease, color .14s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.btn--primary:hover { background: var(--brand-700); }
.btn--success { background: var(--green); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16); }
.btn--success:hover { background: #18653a; }
.btn--ghost { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-050); }
.btn--block { width: 100%; }
.btn--sm { min-height: 42px; padding: 9px 16px; font-size: .87rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .62; pointer-events: none; }

.form-card {
    background: var(--surface); border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: var(--r-card-lg); padding: 22px 18px; box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }

.notice {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--r-card);
    border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
    background: var(--surface-alt);
    font-size: .88rem; color: var(--ink-soft);
}
.notice strong { color: var(--ink); }
.notice p:last-child { margin-bottom: 0; }
.steps-note { margin-top: 32px; }
.steps-note svg { flex: 0 0 auto; margin-top: 3px; color: var(--brand); }
.notice--info { background: var(--brand-050); border-color: var(--brand-100); border-left-color: var(--brand); }
.notice--success { background: var(--green-050); border-color: #c2e0cc; border-left-color: var(--green); }
.notice--warning { background: var(--amber-050); border-color: #f0dcb6; border-left-color: var(--amber); }
.notice--error { background: var(--red-050); border-color: #f3cbc7; border-left-color: var(--red); color: #8d1f18; }

.summary {
    display: grid; margin: 0 0 20px; overflow: hidden;
    border: 1px solid var(--line-strong); border-radius: var(--r-card);
}
.summary__row {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .93rem;
}
.summary__row:last-child { border-bottom: none; }
.summary__row dt { margin: 0; color: var(--ink-mute); }
.summary__row dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.summary__row--total { background: var(--surface-alt); border-top: 2px solid var(--brand); }
.summary__row--total dd {
    font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700;
    color: var(--brand); font-variant-numeric: tabular-nums;
}

.selected-plan {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding: 15px 16px;
    background: var(--surface-alt); border-left: 3px solid var(--gold-line);
    border-radius: 0;
}
.selected-plan__name { margin: 0; font-weight: 600; }
.selected-plan__meta { margin: 0; font-size: .82rem; color: var(--ink-mute); }
.selected-plan__price {
    margin: 0; font-family: var(--font-heading);
    font-size: 1.5rem; font-weight: 700; color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.checklist li {
    display: flex; gap: 9px; align-items: flex-start;
    font-size: .89rem; color: var(--ink-soft);
}
.checklist li::before { content: "✓"; color: var(--green); font-weight: 700; flex: 0 0 auto; }

.status-card {
    background: var(--surface); border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: var(--r-card-lg); padding: 26px 20px; box-shadow: var(--shadow-sm);
}
.status-card__icon {
    width: 52px; height: 52px; border-radius: 50%;
    display: grid; place-items: center; margin-bottom: 16px;
}
.status-card__icon--success { background: var(--green-050); }
.status-card__icon--pending { background: var(--amber-050); }
.status-card__icon--error { background: var(--red-050); }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: var(--r-pill);
    font-size: .72rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap;
    background: #eef1f5; color: var(--ink-soft);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--green { background: var(--green-050); color: var(--green); }
.badge--amber { background: var(--amber-050); color: var(--amber); }
.badge--blue { background: var(--brand-050); color: var(--brand-600); }
.badge--violet { background: var(--violet-050); color: var(--violet); }
.badge--orange { background: #fdf0e4; color: #a85a10; }
.badge--red { background: var(--red-050); color: var(--red); }
.badge--slate { background: #eef1f5; color: var(--ink-mute); }

/* Páginas legales */
.legal { max-width: 76ch; padding: 36px 0 52px; }
.legal h1 { padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.legal h2 { margin-top: 1.9em; font-size: 1.22rem; }
.legal h3 { margin-top: 1.5em; font-size: 1.02rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul, .legal ol { padding-left: 1.2em; }
.legal li { margin-bottom: .45em; }
.legal__updated { font-size: .84rem; color: var(--ink-mute); }

/* =====================================================================
   Footer (spec V2 §40/§43/§44)
   ===================================================================== */
.site-footer {
    background: #071d36; color: #b6c4d8;
    border-top: 3px solid var(--gold-line);
    padding: 38px 0 26px; margin-top: 0;
}
.site-footer a { color: #e3eaf4; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; gap: 28px; }
.site-footer__brand {
    margin: 0 0 8px; font-family: var(--font-heading);
    font-weight: 700; color: #fff; font-size: 1.2rem;
}
.site-footer__legal { margin: 0; font-size: .84rem; color: #91a4bd; line-height: 1.6; }
.site-footer__col h3 {
    margin: 0 0 12px; font-family: var(--font); font-size: .7rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: var(--gold-line);
}
.site-footer__links { display: flex; flex-direction: column; gap: 9px; }
.site-footer__links a { font-size: .89rem; }
.site-footer__id {
    margin: 26px 0 0; padding-top: 18px; border-top: 1px solid #18375c;
    font-size: .82rem; color: #91a4bd; line-height: 1.6;
}
.site-footer__id dt { display: inline; font-weight: 600; color: #b6c4d8; }
.site-footer__id dd { display: inline; margin: 0 0 0 4px; }
.site-footer__id div { margin-bottom: 4px; }
.site-footer__disclaimer {
    margin: 18px 0 0; padding: 13px 15px; border-radius: var(--r-field);
    background: #0d2a4c; border-left: 3px solid var(--gold-line);
    font-size: .82rem; color: #b6c4d8; line-height: 1.55;
}
.site-footer__copy {
    margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #18375c;
    font-size: .76rem; letter-spacing: .02em; color: #8da0ba;
}

/* =====================================================================
   Utilidades
   ===================================================================== */
.text-muted { color: var(--ink-mute); }
.text-small { font-size: .85rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 22px; }
.center { text-align: center; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: 15px; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =====================================================================
   Breakpoints — el diseño base ES el de 390 px
   ===================================================================== */

/* Teléfonos grandes: algo más de aire */
@media (min-width: 420px) {
    .container { padding: 0 22px; }
    .checkout-card { padding: 22px 22px 24px; }
    .checkout-card__head { margin: -22px -22px 20px; padding: 14px 22px 13px; }
    .lead h1 { font-size: 1.65rem; }
}

/* Tablets */
@media (min-width: 768px) {
    h1 { font-size: 2.3rem; }
    h2 { font-size: 1.7rem; }
    .site-header__inner { min-height: 68px; }
    .utility-bar__inner { justify-content: space-between; text-align: left; }
    .utility-bar__contact { display: inline; }
    .site-nav { display: flex; }
    .portal-strip { display: none; }
    .convert { padding: 44px 0 52px; }
    /* Todavía una sola columna: se centra en una medida legible en vez de
       estirar el formulario a lo ancho de la tablet. */
    .convert__grid { max-width: 620px; margin-inline: auto; }
    .lead__eyebrow { margin-bottom: 12px; }
    .lead h1 { font-size: 2.5rem; max-width: 18ch; margin-bottom: 12px; }
    .lead__sub { font-size: 1.06rem; line-height: 1.6; margin-bottom: 14px; }
    .convert__grid { gap: 22px; }
    .section { padding: 64px 0; }
    .form-card { padding: 30px; }
    .form-grid--2 { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
    .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}

/* Desktop: información a la izquierda, conversión a la derecha (§36) */
@media (min-width: 1024px) {
    .convert { padding: 64px 0 72px; }
    .convert__grid {
        grid-template-columns: minmax(0, 1fr) var(--form-col);
        gap: 72px; align-items: start;
        max-width: none; margin-inline: 0;
    }
    .lead { padding-top: 18px; }
    .lead h1 { font-size: 3rem; max-width: 14ch; }
    .lead__sub { font-size: 1.1rem; max-width: 40ch; }
    .lead .lead__aside { display: grid; margin-top: 34px; }
    .checkout-col { position: sticky; top: 88px; }

    /* La barra deja de ser fija y vive dentro de la columna del formulario,
       como el pie de la misma hoja. */
    .paybar {
        position: static; box-shadow: 0 24px 40px -14px rgba(3, 15, 32, .45);
        border-top: 1px dashed var(--line-strong);
        border-radius: 0 0 var(--r-card-lg) var(--r-card-lg);
        margin-top: 0; padding: 18px 22px 20px;
    }
    .checkout-card { border-radius: var(--r-card-lg) var(--r-card-lg) 0 0; box-shadow: var(--shadow-sheet); }
    .has-paybar { padding-bottom: 0; }
    .steps { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
    .container { padding: 0 28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Títulos de grupo entre acordeones (Preguntas frecuentes) */
.narrow > .accordion + h2 { margin-top: 40px; }
