/* ==========================================================================
   TESSER — LANDING
   Estetica de estado de cuenta: reglas finas, cifras tabulares,
   dorado reservado solo para dinero y acciones.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TIPOGRAFIA AUTOALOJADA (sin CDN)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Plex Sans';
    src: url('fonts/IBMPlexSans-var.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plex Mono';
    src: url('fonts/IBMPlexMono-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   TOKENS
   -------------------------------------------------------------------------- */
:root {
    --gold: #F4B41A;
    --gold-deep: #d99e10;
    --bg: #F1F5F9;
    --surface: #FFFFFF;
    --ink: #0F172A;
    --ink-soft: #1C2941;
    --slate: #475569;
    --slate-mute: #64748B;
    --line: #E2E8F0;
    --line-dark: rgba(255, 255, 255, 0.14);
    --ok: #059669;
    --danger: #DC2626;

    --sans: 'Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'Plex Mono', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;

    /* escala tipografica: 1.25 en movil, se abre en escritorio via clamp */
    --t-xs: 0.75rem;
    --t-sm: 0.875rem;
    --t-base: 1rem;
    --t-md: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
    --t-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
    --t-xl: clamp(1.625rem, 1.35rem + 1.3vw, 2.25rem);
    --t-2xl: clamp(2.125rem, 1.6rem + 2.6vw, 3.5rem);
    --t-3xl: clamp(2.625rem, 1.55rem + 4.9vw, 5rem);

    --gap: 1.5rem;
    --pad-section: clamp(3.5rem, 8vw, 6.5rem);
    --radius: 4px;
}

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

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--sans);
    font-size: var(--t-base);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

a {
    color: inherit;
}

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

ul,
ol {
    list-style: none;
    padding: 0;
}

input,
button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 0.75rem 1rem;
    z-index: 99;
}

.skip-link:focus {
    left: 0;
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.wrap--narrow {
    max-width: 760px;
}

/* --------------------------------------------------------------------------
   BARRA SUPERIOR
   -------------------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(10px);
}

.topbar__inner {
    max-width: 1120px;
    margin-inline: auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--ink);
}

.brand__mark {
    color: var(--gold);
    flex: none;
}

.brand__name {
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}

.topbar__nav {
    display: none;
    margin-left: auto;
    gap: 1.5rem;
    font-size: var(--t-sm);
}

.topbar__nav a {
    color: var(--slate);
    text-decoration: none;
    padding-block: 0.25rem;
    border-bottom: 1px solid transparent;
}

.topbar__nav a:hover {
    color: var(--ink);
    border-bottom-color: var(--gold);
}

.topbar .btn {
    margin-left: auto;
}

.topbar__nav+.btn {
    margin-left: 0;
}

/* --------------------------------------------------------------------------
   BOTONES
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.375rem;
    font-size: var(--t-base);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn--gold {
    background: var(--gold);
    color: var(--ink);
}

.btn--gold:hover {
    background: var(--gold-deep);
}

.btn--ghost {
    border-color: var(--ink);
    color: var(--ink);
    background: transparent;
}

.btn--ghost:hover {
    background: var(--ink);
    color: #fff;
}

.btn--lg {
    padding: 1rem 1.9rem;
    font-size: var(--t-md);
}

.btn--sm {
    padding: 0.5rem 0.9rem;
    font-size: var(--t-sm);
    flex: none;
}

.btn--block {
    width: 100%;
}

/* --------------------------------------------------------------------------
   PIEZAS COMUNES
   -------------------------------------------------------------------------- */
.eyebrow {
    font-family: var(--mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate-mute);
    margin-bottom: 1rem;
}

.eyebrow--dark {
    color: var(--gold);
}

.section {
    padding-block: var(--pad-section);
}

.section--tint {
    background: var(--surface);
    border-block: 1px solid var(--line);
}

.shead {
    max-width: 40ch;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.shead__title {
    font-size: var(--t-xl);
}

.shead__desc {
    margin-top: 1rem;
    color: var(--slate);
    font-size: var(--t-md);
    max-width: 60ch;
}

.shead--dark .shead__title {
    color: #fff;
}

.shead--dark .shead__desc {
    color: #94A3B8;
}

.lede {
    font-size: var(--t-md);
    color: var(--slate);
    max-width: 58ch;
}

/* --------------------------------------------------------------------------
   HERO
   Centrado y concreto. El argumento va arriba y debajo, sin metaforas, el
   panel real de la aplicacion: tabla de cartera, montos tabulares y el estado
   del agente. Es HTML y CSS, no una captura, asi que no pesa ni se pixelea.
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    text-align: center;
    padding-top: clamp(3rem, 8vw, 5.5rem);
    padding-bottom: clamp(2.25rem, 5vw, 3.25rem);
    /* cierra en el color del cuerpo para que no se vea el corte con la seccion siguiente */
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFD 30%, #E8EEF7 72%, var(--bg) 100%);
}

/* Reglas de libro de cuentas: la textura de la marca, ahora al minimo */
.hero__field {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(38rem 22rem at 50% 0%, rgba(244, 180, 26, 0.13), transparent 70%),
        repeating-linear-gradient(to bottom,
            rgba(15, 23, 42, 0.028) 0 1px,
            transparent 1px 2.75rem),
        repeating-linear-gradient(to right,
            rgba(15, 23, 42, 0.022) 0 1px,
            transparent 1px 8.5rem);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 78%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 78%);
}

.hero__inner>* {
    animation: heroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__eyebrow {
    color: var(--slate-mute);
    margin-bottom: 1.25rem;
    animation-delay: 0.04s;
}

.hero__inner>.hero__title {
    font-size: var(--t-3xl);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.035em;
    max-width: 18ch;
    margin-inline: auto;
    animation-delay: 0.1s;
}

/* El unico dorado del titular: un trazo bajo la promesa */
.hero__mark {
    position: relative;
    display: inline-block;
}

.hero__mark::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.015em;
    height: 0.055em;
    background: var(--gold);
    transform-origin: left center;
    animation: ruleIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.hero__lede {
    margin-top: 1.25rem;
    font-size: var(--t-md);
    color: var(--slate);
    max-width: 46ch;
    margin-inline: auto;
    animation-delay: 0.18s;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem 2rem;
    margin-top: clamp(1.5rem, 3vw, 2rem);
    font-size: var(--t-sm);
    animation-delay: 0.26s;
}

.checks__item {
    position: relative;
    padding-left: 1.65rem;
    text-align: left;
    color: var(--ink);
    font-weight: 500;
}

.checks__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: rgba(244, 180, 26, 0.18);
    border: 1px solid rgba(244, 180, 26, 0.55);
}

.checks__item::after {
    content: "";
    position: absolute;
    left: 0.4rem;
    top: 0.32em;
    width: 0.26rem;
    height: 0.5rem;
    border: solid var(--gold-deep);
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(45deg);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin-top: clamp(2rem, 4vw, 2.5rem);
    animation-delay: 0.34s;
}

.hero__link {
    font-weight: 600;
    font-size: var(--t-sm);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
}

.hero__link::after {
    content: " →";
}

.hero__link:hover {
    border-bottom-color: var(--ink);
}

.hero__note {
    margin: clamp(1.75rem, 3vw, 2.25rem) auto 0;
    max-width: 56ch;
    font-size: var(--t-sm);
    color: var(--slate-mute);
    animation-delay: 0.42s;
}

/* --------------------------------------------------------------------------
   PANEL DEL PRODUCTO
   -------------------------------------------------------------------------- */
.hero__app {
    max-width: 1240px;
    margin: clamp(2.5rem, 6vw, 4rem) auto 0;
    padding-inline: 1.25rem;
    animation: appIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.app {
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 40px 80px -45px rgba(15, 23, 42, 0.55);
}

.app__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--line);
    background: #FAFCFE;
}

.app__dots {
    display: flex;
    gap: 0.3rem;
    flex: none;
}

.app__dots i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #D7DEE8;
}

.app__url {
    margin-inline: auto;
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--slate-mute);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 0.15rem 0.8rem;
}

.app__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.app__side {
    display: none;
    padding: 0.9rem 0.7rem;
    border-right: 1px solid var(--line);
    background: #FBFCFE;
}

.app__brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
}

.app__brand svg {
    color: var(--gold);
    flex: none;
}

.app__nav {
    display: grid;
    gap: 0.1rem;
}

.app__nav span {
    position: relative;
    padding: 0.4rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--slate);
}

.app__nav .is-on {
    background: #EDF1F7;
    color: var(--ink);
    font-weight: 600;
}

.app__nav .is-on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 2px;
    border-radius: 2px;
    background: var(--gold);
}

.app__main {
    min-width: 0;
    padding: 0.95rem 1rem 1.1rem;
}

.app__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.app__head h3 {
    font-size: 1rem;
}

.app__cta {
    flex: none;
    background: var(--gold);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
}

.app__kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.kpi {
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.kpi__label {
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--slate-mute);
}

.kpi__value {
    font-family: var(--mono);
    font-size: 0.9375rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.kpi__value--bad {
    color: var(--danger);
}

.kpi__value--ok {
    color: var(--ok);
}

/* --- Tabla de cartera ----------------------------------------------------- */
.app__table {
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.75rem 5.5rem;
    gap: 0.9rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
}

.row:first-child {
    border-top: 0;
}

.row--head {
    background: #F8FAFC;
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--slate-mute);
}

/* El renglon que el agente esta trabajando en este momento */
.row--focus {
    background: rgba(244, 180, 26, 0.08);
    box-shadow: inset 3px 0 0 var(--gold);
}

.row__id,
.row__due,
.row__ai {
    display: none;
}

.row__who {
    display: grid;
    min-width: 0;
    font-weight: 600;
}

.row__who em {
    font-style: normal;
    font-weight: 400;
    font-size: 0.6875rem;
    color: var(--slate-mute);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row__num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    text-align: right;
    letter-spacing: -0.02em;
}

.tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    background: #EDF1F7;
    color: var(--slate);
    white-space: nowrap;
}

.tag--warn {
    background: rgba(244, 180, 26, 0.2);
    color: #8A6400;
}

.tag--bad {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.tag--ok {
    background: rgba(5, 150, 105, 0.12);
    color: var(--ok);
}

.pulse {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: currentColor;
    flex: none;
    animation: pulseDot 2.4s ease-out infinite;
}

@keyframes pulseDot {

    0%,
    70%,
    100% {
        box-shadow: 0 0 0 0 rgba(244, 180, 26, 0);
    }

    25% {
        box-shadow: 0 0 0 0.28rem rgba(244, 180, 26, 0.3);
    }
}

.hero__disclaimer {
    margin-top: 0.9rem;
    text-align: center;
    font-size: var(--t-xs);
    color: var(--slate-mute);
}

/* --- Anchos intermedios y escritorio -------------------------------------- */
@media (min-width: 48rem) {
    .app__kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .row {
        grid-template-columns: 3.6rem minmax(0, 1fr) 6.5rem 5.5rem 6rem;
    }

    .row__id,
    .row__due {
        display: block;
    }

    .row__id {
        font-family: var(--mono);
        color: var(--slate-mute);
    }

    .row__due {
        color: var(--slate);
    }
}

@media (min-width: 64rem) {
    .app__body {
        grid-template-columns: 11rem minmax(0, 1fr);
    }

    .app__side {
        display: block;
    }

    .app__main {
        padding: 1.1rem 1.25rem 1.35rem;
    }

    .row {
        grid-template-columns: 3.6rem minmax(0, 1fr) 6.75rem 5.5rem 6rem 9.75rem;
        padding: 0.62rem 0.9rem;
    }

    .row__ai {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        color: var(--slate);
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .row__ai .pulse {
        color: var(--gold-deep);
    }
}

/* --- Movimiento ----------------------------------------------------------- */
@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(0.9rem);
    }
}

@keyframes appIn {
    from {
        opacity: 0;
        transform: translateY(2.5rem) scale(0.985);
    }
}

@keyframes ruleIn {
    from {
        transform: scaleX(0);
    }
}

/* --------------------------------------------------------------------------
   RENGLON DE DEUDA (la pieza que recorre la pagina)
   -------------------------------------------------------------------------- */
.ledger {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ledger__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
    border-bottom: 2px solid var(--ink);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ledger__id {
    font-family: var(--mono);
    color: var(--slate-mute);
    letter-spacing: 0;
}

.ledger__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.ledger__label {
    font-size: var(--t-sm);
    color: var(--slate-mute);
}

.ledger__value {
    font-size: var(--t-sm);
    font-weight: 600;
    text-align: right;
}

.ledger__money {
    font-family: var(--mono);
    font-size: var(--t-lg);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.ledger__note {
    margin-top: 0.9rem;
    font-size: var(--t-xs);
    color: var(--slate-mute);
}

/* --------------------------------------------------------------------------
   BLOQUE DEL DINERO (la objecion que mata la venta)
   -------------------------------------------------------------------------- */
.money {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    display: grid;
    gap: 1.5rem;
}

.money__title {
    font-size: var(--t-lg);
    line-height: 1.2;
}

.money__title em {
    font-style: normal;
    color: var(--slate-mute);
}

.money__body p {
    color: var(--slate);
    max-width: 62ch;
}

.money__list {
    margin-top: 1.25rem;
    display: grid;
    gap: 0.6rem;
    font-size: var(--t-sm);
}

.money__list li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--ink);
}

.money__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.55rem;
    height: 0.55rem;
    background: var(--gold);
}

/* --------------------------------------------------------------------------
   EL HILO DEL COBRO (seccion oscura, unica apuesta visual)
   -------------------------------------------------------------------------- */
.thread {
    background: var(--ink);
    color: #E2E8F0;
    padding-block: var(--pad-section);
}

.thread__grid {
    display: grid;
    gap: 2rem;
}

/* En celular el renglon se reduce a una barra fina: el saldo que cambia es lo
   unico que necesita estar a la vista mientras se leen los pasos. La ficha
   completa aparece hasta escritorio, donde sobra ancho. */
.thread__panel {
    position: sticky;
    top: 3.35rem;
    z-index: 2;
}

.ledger--live {
    background: var(--ink-soft);
    border-color: var(--line-dark);
    color: #fff;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
}

.ledger--live .ledger__row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0;
    border: 0;
}

.ledger--live .ledger__head,
.ledger--live .ledger__row--cliente,
.ledger--live .ledger__note,
.ledger--live .sms {
    display: none;
}

.ledger--live .ledger__money {
    font-size: var(--t-md);
}

.ledger--live .ledger__head {
    border-bottom-color: var(--gold);
}

.ledger--live .ledger__label,
.ledger--live .ledger__id,
.ledger--live .ledger__note {
    color: #94A3B8;
}

.ledger--live .ledger__money {
    color: var(--gold);
    transition: color 0.3s ease;
}

/* al liquidarse, el saldo cambia de color: es el unico verde de la pagina */
.ledger--live[data-step="4"] .ledger__money,
.ledger--live[data-step="4"] #ledger-state {
    color: #34D399;
}

.sms {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
}

@keyframes smsIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.sms__from {
    display: block;
    font-family: var(--mono);
    font-size: var(--t-xs);
    color: #94A3B8;
    margin-bottom: 0.4rem;
}

.sms__text {
    font-size: var(--t-sm);
    line-height: 1.5;
}

.sms__text strong {
    font-family: var(--mono);
    font-weight: 500;
    color: var(--gold);
}

.sms__link {
    color: #93C5FD;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sms__meta {
    display: block;
    margin-top: 0.5rem;
    font-size: var(--t-xs);
    color: #94A3B8;
}

.ledger--live[data-step="4"] .sms {
    opacity: 0.5;
}

.ledger--live[data-step="4"] .sms__text {
    text-decoration: line-through;
    text-decoration-color: #64748B;
}

/* pasos */
.steps {
    display: grid;
    gap: 0;
}

.step {
    padding-block: clamp(1.75rem, 5vw, 2.5rem);
    border-top: 1px solid var(--line-dark);
    color: #94A3B8;
    transition: color 0.3s ease;
}

.step:first-child {
    border-top: 0;
}

.step.is-live {
    color: #CBD5E1;
}

.step__num {
    display: block;
    font-family: var(--mono);
    font-size: var(--t-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748B;
    margin-bottom: 0.6rem;
}

.step.is-live .step__num {
    color: var(--gold);
}

.step__title {
    font-size: var(--t-lg);
    color: #fff;
    margin-bottom: 0.75rem;
}

.step p {
    max-width: 60ch;
}

.step__caveat {
    margin-top: 0.9rem;
    font-size: var(--t-xs);
    color: #64748B;
}

.step__card-callout {
    margin-top: 0.85rem;
    padding: 0.85rem 1.1rem;
    background: rgba(244, 180, 26, 0.08);
    border: 1px solid rgba(244, 180, 26, 0.28);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
    color: #F8FAFC;
    font-size: var(--t-sm);
    line-height: 1.45;
    max-width: 60ch;
}

.step__card-callout strong {
    color: var(--gold);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   DUO: WHATSAPP ENTRANTE + BANDEJA + ASISTENTE IA
   -------------------------------------------------------------------------- */
.shead--wide {
    max-width: 62ch;
}

.wa-showcase {
    display: grid;
    gap: 1.75rem;
}

/* El telefono simulado */
.wa-phone {
    background: #0B141A;
    border-radius: 16px;
    border: 1px solid #222E35;
    box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 460px;
    width: 100%;
    margin-inline: auto;
}

/* Header auténtico de WhatsApp */
.wa-phone__header {
    background: #202C33;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid #2A3942;
    color: #AEBAC1;
}

.wa-phone__back {
    display: flex;
    align-items: center;
    color: #AEBAC1;
    cursor: default;
}

.wa-phone__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6B7C85;
    color: #E9EDEF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-phone__meta {
    flex-grow: 1;
    min-width: 0;
}

.wa-phone__name {
    color: #E9EDEF;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
}

.wa-phone__verified {
    display: inline-flex;
    align-items: center;
}

.wa-phone__status {
    color: #8696A0;
    font-size: 0.75rem;
    line-height: 1.2;
    margin-top: 1px;
}

.wa-phone__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #AEBAC1;
}

/* Chat Canvas */
.wa-phone__chat {
    background: #0B141A;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 16px 16px;
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wa-date-pill {
    align-self: center;
    background: #182229;
    color: #8696A0;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Burbujas */
.wa-bubble {
    max-width: 86%;
    padding: 0.55rem 0.75rem 0.4rem;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.42;
    position: relative;
    word-break: break-word;
}

/* Mensajes entrantes (Bot a la izquierda en gris) */
.wa-bubble--in {
    align-self: flex-start;
    background: #202C33;
    color: #E9EDEF;
    border-top-left-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* Mensajes salientes (Cliente a la derecha en verde WhatsApp) */
.wa-bubble--out {
    align-self: flex-end;
    background: #005C4B;
    color: #E9EDEF;
    border-top-right-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.wa-bubble__text {
    margin: 0;
    color: #E9EDEF;
}

.wa-bubble__text strong {
    color: #fff;
    font-weight: 600;
}

.wa-clabe {
    display: inline-block;
    background: #182229;
    color: #53BDEB;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    user-select: all;
}

.wa-link {
    color: #53BDEB;
    text-decoration: underline;
}

/* Preview de link nativo de WhatsApp */
.wa-preview {
    margin-top: 0.5rem;
    background: #182229;
    border-left: 3px solid #00A884;
    border-radius: 4px;
    padding: 0.5rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.wa-preview__site {
    font-size: 0.7rem;
    color: #8696A0;
}

.wa-preview__title {
    font-size: 0.78rem;
    color: #E9EDEF;
    line-height: 1.25;
}

.wa-preview__desc {
    font-size: 0.7rem;
    color: #8696A0;
    line-height: 1.35;
}

/* Comprobante bancario simulado (screenshot móvil del cliente) */
.wa-voucher {
    background: #0F172A;
    border: 1px solid #1E293B;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    display: grid;
    gap: 0.35rem;
}

.wa-voucher__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-voucher__bank {
    font-family: var(--sans);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: #38BDF8;
}

.wa-voucher__badge {
    font-size: 0.68rem;
    color: #25D366;
    font-weight: 600;
}

.wa-voucher__amount {
    font-family: var(--mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.wa-voucher__meta {
    display: grid;
    gap: 0.2rem;
    font-size: 0.7rem;
    border-top: 1px solid #1E293B;
    padding-top: 0.35rem;
    color: #94A3B8;
}

.wa-voucher__meta span {
    color: #64748B;
}

.wa-voucher__meta strong {
    color: #E2E8F0;
}

/* Hora y ticks de WhatsApp */
.wa-bubble__time {
    display: block;
    text-align: right;
    font-size: 0.65rem;
    color: rgba(233, 237, 239, 0.6);
    margin-top: 0.25rem;
}

.wa-ticks {
    color: #53BDEB;
    font-weight: 700;
    margin-left: 2px;
}

/* Footer de WhatsApp (barra de entrada falsa) */
.wa-phone__footer {
    background: #202C33;
    padding: 0.5rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wa-input-fake {
    flex-grow: 1;
    background: #2A3942;
    border-radius: 20px;
    padding: 0.45rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8696A0;
    font-size: 0.85rem;
}

.wa-input-fake span {
    flex-grow: 1;
    margin-left: 0.6rem;
    font-size: 0.82rem;
}

.wa-mic-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #00A884;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.duo {
    display: grid;
    gap: 1.25rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3.5vw, 2rem);
    display: grid;
    gap: 1rem;
    align-content: start;
}

.panel p {
    color: var(--slate);
    max-width: 58ch;
}

.panel__title {
    font-size: var(--t-lg);
}

.panel__caveat {
    font-size: var(--t-sm);
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.panel--accent {
    background: var(--ink);
    border-color: var(--ink);
    color: #E2E8F0;
}

.panel--accent .panel__title {
    color: #fff;
}

.panel--accent p {
    color: #CBD5E1;
}

.panel__claim {
    font-size: var(--t-md);
    font-weight: 600;
    color: #fff !important;
}

.panel__bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
    font-size: var(--t-sm);
}

.panel__bullets li {
    padding-left: 1.35rem;
    position: relative;
    line-height: 1.45;
}

.panel__bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--ok);
    font-weight: bold;
}

.panel__bullets--light li::before {
    color: #38BDF8;
}

.panel__bullets li strong {
    color: var(--ink);
}

.panel--accent .panel__bullets li strong {
    color: #fff;
}

/* --------------------------------------------------------------------------
   TARJETAS DE CARTERA
   -------------------------------------------------------------------------- */
.cards {
    display: grid;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.card {
    background: var(--surface);
    padding: clamp(1.25rem, 3.5vw, 1.75rem);
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.card__title {
    font-size: var(--t-md);
}

.card p {
    color: var(--slate);
    font-size: var(--t-sm);
    max-width: 46ch;
}

.buckets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.bucket {
    font-family: var(--mono);
    font-size: var(--t-xs);
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--line);
    color: var(--slate);
}

.bucket--hot {
    border-color: var(--danger);
    color: var(--danger);
}

/* --------------------------------------------------------------------------
   FICHA DEL PRODUCTO (ALCANCE / PEAK MINIMALISMO)
   -------------------------------------------------------------------------- */
.spec {
    display: grid;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.spec__group {
    background: var(--surface);
    padding: clamp(1.25rem, 3.5vw, 2rem);
    display: grid;
    gap: 1.25rem;
    align-content: start;
}

.spec__head {
    font-family: var(--mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate-mute);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.spec__list {
    display: grid;
    gap: 0.85rem;
    font-size: var(--t-sm);
}

.spec__list li {
    padding-left: 1.35rem;
    position: relative;
    color: var(--slate);
    line-height: 1.5;
}

.spec__list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--slate-mute);
    font-family: var(--mono);
}

.spec__list li strong {
    color: var(--ink);
}

.spec__card-opt {
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 0.85rem 1rem !important;
    border-radius: var(--radius);
    margin-block: 0.25rem;
}

.spec__card-opt::before {
    display: none !important;
}

.spec__mono-tag {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-deep);
    display: block;
    margin-bottom: 0.25rem;
}

.spec__soon {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    font-size: var(--t-sm);
    color: var(--slate-mute);
    max-width: 64ch;
}

/* --------------------------------------------------------------------------
   ALTA ACOMPAÑADA
   -------------------------------------------------------------------------- */
.onboard {
    display: grid;
    gap: 1px;
    background: var(--line);
    border-block: 1px solid var(--line);
}

.onboard__item {
    background: var(--bg);
    padding: 1.5rem 0;
    display: grid;
    gap: 0.4rem;
}

.onboard__num {
    font-family: var(--mono);
    font-size: var(--t-xs);
    color: var(--gold-deep);
    letter-spacing: 0.08em;
}

.onboard__item h3 {
    font-size: var(--t-md);
}

.onboard__item p {
    color: var(--slate);
    font-size: var(--t-sm);
    max-width: 52ch;
}

/* --------------------------------------------------------------------------
   PLANES Y PILOTO SIN RIESGO
   -------------------------------------------------------------------------- */
.pricing-grid {
    display: grid;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 2rem;
}

.price-card {
    background: var(--surface);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
}

.price-card__tag {
    font-family: var(--mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-deep);
    display: block;
    margin-bottom: 0.5rem;
}

.price-card__title {
    font-family: var(--mono);
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.price-card__promise {
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
    margin-top: 0.5rem;
    line-height: 1.35;
}

.price-card__desc {
    color: var(--slate);
    font-size: var(--t-sm);
    line-height: 1.5;
    margin-top: 0.5rem;
}

.price-card__list-title {
    font-family: var(--mono);
    font-size: var(--t-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate-mute);
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
}

.price-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
    font-size: var(--t-sm);
    flex-grow: 1;
}

.price-card__features li {
    padding-left: 1.25rem;
    position: relative;
    color: var(--slate);
    line-height: 1.45;
}

.price-card__features li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--slate-mute);
    font-family: var(--mono);
}

.price-card__features li strong {
    color: var(--ink);
}

.price-card__note {
    font-size: var(--t-xs);
    color: var(--slate-mute);
    margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   PREGUNTAS
   -------------------------------------------------------------------------- */
.faq {
    border-top: 1px solid var(--line);
}

.faq__item {
    border-bottom: 1px solid var(--line);
}

.faq__item summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1.25rem 0;
    font-size: var(--t-md);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq__item summary::-webkit-details-marker {
    display: none;
}

.faq__item summary::after {
    content: "+";
    font-family: var(--mono);
    font-weight: 500;
    color: var(--gold-deep);
    flex: none;
}

.faq__item[open] summary::after {
    content: "–";
}

.faq__body {
    padding-bottom: 1.25rem;
}

.faq__body p {
    color: var(--slate);
    max-width: 62ch;
    line-height: 1.5;
}

.faq__body p+p {
    margin-top: 0.65rem;
}

.faq__body ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
    display: grid;
    gap: 0.5rem;
    max-width: 62ch;
}

.faq__body li {
    padding-left: 1.25rem;
    position: relative;
    color: var(--slate);
    font-size: var(--t-sm);
    line-height: 1.45;
}

.faq__body li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--gold-deep);
    font-family: var(--mono);
}

.faq__body li strong {
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   CIERRE Y FORMULARIO (GANCHO MINIMALISTA)
   -------------------------------------------------------------------------- */
.close {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-block: clamp(3.5rem, 7vw, 6rem);
}

.close__grid {
    display: grid;
    gap: 3rem;
}

.close__title {
    font-size: var(--t-xl);
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 1rem;
    max-width: 24ch;
}

.close__desc {
    color: var(--slate);
    font-size: var(--t-md);
    line-height: 1.5;
    margin-bottom: 1.75rem;
    max-width: 52ch;
}

.close__pillars {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: grid;
    gap: 1.15rem;
    font-size: var(--t-sm);
}

.close__pillar {
    padding-left: 1.35rem;
    position: relative;
    color: var(--slate);
    line-height: 1.45;
}

.close__pillar::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--gold-deep);
    font-family: var(--mono);
}

.close__pillar strong {
    color: var(--ink);
    display: block;
    margin-bottom: 0.15rem;
}

.close__note {
    font-family: var(--mono);
    font-size: var(--t-xs);
    color: var(--slate-mute);
}

.close__card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

.close__card-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.close__card-tag {
    font-family: var(--mono);
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate-mute);
    display: block;
    margin-bottom: 0.35rem;
}

.close__card-title {
    font-size: var(--t-lg);
    color: var(--ink);
}

.close__card-sub {
    font-size: var(--t-sm);
    color: var(--slate);
    margin-top: 0.25rem;
}

.form {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field label {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ink);
}

.field input {
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--sans);
    font-size: var(--t-sm);
    color: var(--ink);
    transition: border-color 0.15s ease;
}

.field input:focus {
    outline: none;
    border-color: var(--ink);
}

.form__error {
    color: var(--danger);
    font-size: var(--t-sm);
    font-weight: 600;
    border: 1px solid var(--danger);
    background: #FEF2F2;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
}

.form__note {
    font-size: var(--t-xs);
    color: var(--slate-mute);
    line-height: 1.45;
}

.close__alt {
    font-size: var(--t-sm);
    color: var(--slate);
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.close__alt a {
    color: var(--ink);
    font-weight: 600;
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   PIE
   -------------------------------------------------------------------------- */
.foot {
    background: var(--ink);
    color: #94A3B8;
    padding-top: 3rem;
    font-size: var(--t-sm);
}

.foot__inner {
    display: grid;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.brand--light {
    color: #fff;
    margin-bottom: 0.75rem;
}

.foot__brand p {
    max-width: 34ch;
}

.foot__nav,
.foot__contact {
    display: grid;
    gap: 0.6rem;
    align-content: start;
}

.foot a {
    text-decoration: none;
    color: #CBD5E1;
}

.foot a:hover {
    color: var(--gold);
}

.foot__legal {
    border-top: 1px solid var(--line-dark);
    padding-block: 1.25rem;
    font-size: var(--t-xs);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    color: var(--slate);
}

.foot__legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.foot__legal-links a {
    color: var(--slate);
    text-decoration: none;
    transition: color 0.15s ease;
}

.foot__legal-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.foot__legal-sep {
    color: var(--slate-mute);
    opacity: 0.5;
}

/* --------------------------------------------------------------------------
   ESCRITORIO
   -------------------------------------------------------------------------- */
@media (min-width: 48rem) {
    .duo {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .wa-showcase {
        grid-template-columns: minmax(340px, 440px) 1fr;
        align-items: stretch;
        gap: 2rem;
    }

    .wa-showcase .duo {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .spec {
        grid-template-columns: 1fr;
    }

    .onboard {
        grid-template-columns: 1fr 1fr;
    }

    .onboard__item {
        padding: 1.75rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr 1fr;
    }

    .money {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 2.5rem;
        align-items: start;
    }

    .close__grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: start;
        gap: 3.5rem;
    }

    .foot__inner {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (min-width: 64rem) {
    .topbar__nav {
        display: flex;
    }

    .thread__grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 4rem;
        align-items: start;
    }

    .thread__panel {
        top: 6rem;
    }

    /* en escritorio el renglon vuelve a ser la ficha completa */
    .ledger--live {
        display: block;
        padding: 1.25rem;
    }

    .ledger--live .ledger__head,
    .ledger--live .ledger__row--cliente {
        display: flex;
    }

    .ledger--live .ledger__note {
        display: block;
    }

    .ledger--live .ledger__row {
        justify-content: space-between;
        padding-block: 0.7rem;
        border-bottom: 1px solid var(--line-dark);
    }

    .ledger--live .ledger__money {
        font-size: var(--t-lg);
    }

    .ledger--live .sms {
        display: none;
    }

    .ledger--live[data-step="3"] .sms,
    .ledger--live[data-step="4"] .sms {
        display: block;
        animation: smsIn 0.35s ease both;
    }

    .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .spec {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --------------------------------------------------------------------------
   MOVIMIENTO
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* --------------------------------------------------------------------------
   PÁGINAS LEGALES (TYC Y ADP)
   -------------------------------------------------------------------------- */
.wrap--legal {
    max-width: 900px;
}

.legal-page {
    padding-block: clamp(2rem, 5vw, 4rem);
    background: var(--bg);
    min-height: calc(100vh - 80px);
}

.legal-nav-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--t-sm);
    color: var(--slate);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.legal-back:hover {
    color: var(--ink);
}

.legal-switch {
    display: inline-flex;
    flex-wrap: wrap;
    background: #e2e8f0;
    padding: 3px;
    border-radius: var(--radius);
    gap: 2px;
}

.legal-switch__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    font-size: var(--t-xs);
    font-family: var(--mono);
    text-decoration: none;
    color: var(--slate);
    border-radius: 2px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.legal-switch__btn:hover {
    color: var(--ink);
}

.legal-switch__btn--active {
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.legal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: clamp(1.75rem, 5vw, 3.5rem);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.legal-header {
    border-bottom: 1px solid var(--line);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.legal-header__badge {
    display: inline-block;
    background: rgba(244, 180, 26, 0.12);
    color: #92400e;
    font-family: var(--mono);
    font-size: var(--t-xs);
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.legal-title {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.legal-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    font-size: var(--t-sm);
}

@media (min-width: 40rem) {
    .legal-meta {
        grid-template-columns: 1fr 1fr;
    }
}

.legal-meta__item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.legal-meta__key {
    font-family: var(--mono);
    font-size: var(--t-xs);
    color: var(--slate-mute);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.legal-meta__val {
    color: var(--ink);
    font-weight: 500;
}

.legal-meta__val a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 2px;
}

.legal-meta__val a:hover {
    color: var(--gold-deep);
}

.legal-toc {
    background: #fafbfd;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2.5rem;
}

.legal-toc__title {
    font-family: var(--mono);
    font-size: var(--t-xs);
    color: var(--slate-mute);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.legal-toc__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    font-size: var(--t-sm);
}

@media (min-width: 44rem) {
    .legal-toc__list {
        grid-template-columns: 1fr 1fr;
    }
}

.legal-toc__list a {
    color: var(--slate);
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
}

.legal-toc__list a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.legal-toc__num {
    font-family: var(--mono);
    font-size: var(--t-xs);
    color: var(--gold-deep);
    font-weight: 600;
}

.legal-body {
    color: var(--ink-soft);
    line-height: 1.75;
}

.legal-section {
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.legal-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-section__title {
    font-size: var(--t-lg);
    color: var(--ink);
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.legal-section__num {
    font-family: var(--mono);
    font-size: var(--t-sm);
    color: var(--gold-deep);
    background: rgba(244, 180, 26, 0.1);
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.legal-body p {
    margin-bottom: 1rem;
}

.legal-body p:last-child {
    margin-bottom: 0;
}

.legal-body h3 {
    font-size: var(--t-base);
    font-weight: 600;
    color: var(--ink);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-body ul,
.legal-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.25rem;
}

.legal-body ul {
    list-style: disc;
}

.legal-body ol {
    list-style: decimal;
}

.legal-body li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.legal-body strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-callout {
    background: #fafbfd;
    border-left: 3px solid var(--gold);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-block: 1.25rem;
    font-size: var(--t-sm);
    color: var(--slate);
}

.legal-callout strong {
    color: var(--ink);
}

.legal-table-wrap {
    overflow-x: auto;
    margin-block: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--t-sm);
    text-align: left;
    min-width: 580px;
}

.legal-table th {
    background: var(--bg);
    padding: 0.85rem 1rem;
    font-family: var(--mono);
    font-size: var(--t-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate);
    border-bottom: 1px solid var(--line);
}

.legal-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    color: var(--ink-soft);
    line-height: 1.5;
}

.legal-table tr:last-child td {
    border-bottom: none;
}

.legal-table tr:hover td {
    background: rgba(241, 245, 249, 0.4);
}

.legal-table td:nth-child(1) {
    font-weight: 600;
    color: var(--ink);
    width: 28%;
}

.legal-table td:nth-child(3) {
    font-family: var(--mono);
    font-size: var(--t-xs);
    width: 32%;
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

/* Soporte de Impresión */
@media print {
    .topbar,
    .foot,
    .legal-nav-bar,
    .legal-toc,
    .legal-actions,
    .legal-switch {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 10.5pt;
        line-height: 1.5;
    }

    .legal-page {
        padding: 0 !important;
        min-height: auto !important;
    }

    .wrap--legal {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .legal-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .legal-section {
        page-break-inside: avoid;
        break-inside: avoid;
        border-bottom: 1px solid #ccc !important;
    }

    .legal-table-wrap {
        border: 1px solid #000 !important;
    }

    .legal-table th,
    .legal-table td {
        border-color: #ccc !important;
        color: #000 !important;
    }
}