/* Una sola página adapta las dos láminas de escritorio a la composición móvil de 390 px. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: #F5F3EE; color: #1D3B3C; font-family: 'Instrument Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
[data-krax-landing] { overflow-x: clip; }
main { display: block; }
button, input { font-family: inherit; }
button:disabled, input:disabled { cursor: not-allowed; }
button:disabled { opacity: .72; }
input:disabled { opacity: .68; }
img { max-width: 100%; }
section[id], #guia { scroll-margin-top: 96px; }
.kl-skip { position: fixed; top: 8px; left: 8px; padding: 12px 20px; z-index: 100; transform: translateY(-150%); background: #fff; border-radius: 12px; }
.kl-skip:focus { transform: none; }
.kl-pending { display: block; margin: 0; color: #F2C468; font-size: 13px; line-height: 1.5; }
.kl-noscript { padding-top: 16px; padding-bottom: 16px; }
.kl-mobile-plant { display: none !important; }
.kl-mobile-bar { display: none; }
.kl-navigation { gap: 16px !important; }
.kl-navigation .kl-nav-links { gap: clamp(12px, 1.6vw, 24px); font-size: 14px; }
.kl-navigation > a { flex-shrink: 0; }
.kl-hero-art { min-width: 0; }
.kl-hero-art > svg { max-width: 100%; }
[role="tab"] { touch-action: manipulation; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #3C9FA0; outline-offset: 4px; }

/* Las tablas se desplazan en su tarjeta sin ampliar el viewport ni recortar las etiquetas. */
.kl-srch-grid > article { min-width: 0; }
.kl-srch-grid table { min-width: 680px; }
.kl-srch-grid article > div:has(> table) { overflow-x: auto; overscroll-behavior-inline: contain; }

@media (max-width: 1180px) {
    .kl-navigation .kl-nav-links { display: none; }
}
@media (max-width: 960px) {
    #caso > .kl-wrap { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 720px) {
    html { scroll-padding-top: 84px; }
    .kl-wrap { padding-left: 20px; padding-right: 20px; }
    .kl-sec { padding: 36px 0; }
    .kl-h2 { font-size: 32px; line-height: 1.06; }
    .kl-lead { font-size: 17px; line-height: 1.5; }
    .kl-site-header nav { min-height: 68px !important; gap: 12px !important; }
    .kl-site-header img { height: 26px !important; }
    .kl-site-header .kl-btn { padding: 0 18px; min-height: 44px; font-size: 14px; }
    .kl-site-header a:first-child { gap: 8px !important; }
    .kl-site-header a:first-child span { font-size: 11px !important; padding: 5px 8px !important; }
    .kl-hero { position: relative; padding-top: 28px !important; padding-bottom: 40px; isolation: isolate; overflow: hidden; }
    .kl-hero > .kl-grid-2 { display: flex; flex-direction: column; align-items: stretch; gap: 18px; position: relative; z-index: 1; }
    .kl-hero .kl-grid-2 > div:first-child { display: contents !important; }
    .kl-hero h1 { font-size: 46px !important; line-height: 1 !important; max-width: 100%; order: 1; }
    .kl-hero .kl-lead { max-width: 38ch; }
    .kl-hero .kl-lead { order: 2; }
    .kl-hero .kl-eyebrow { font-size: 11px; }
    .kl-hero .kl-grid-2 > div:first-child > div:first-child { gap: 10px !important; }
    .kl-hero .kl-grid-2 > div:first-child > div:nth-of-type(2) { order: 4; flex-direction: column; align-items: stretch; }
    .kl-hero .kl-grid-2 > div:first-child > p:last-of-type { order: 5; }
    .kl-hero .kl-grid-2 > div:first-child > div:last-child { order: 6; gap: 14px !important; padding-top: 18px !important; }
    .kl-hero .kl-grid-2 > div:first-child > div:last-child > p { font-size: 40px !important; }
    .kl-hero .kl-btn { min-height: 54px; width: 100%; font-size: 17px; }
    .kl-hero .kl-btn-ghost { background: rgba(245,243,238,.8); }
    .kl-hero-art { display: contents; }
    .kl-hero-art > svg { display: none !important; }
    .kl-hero-card { position: relative; left: auto; bottom: auto; width: 100%; margin-top: 0; order: 3; }
    .kl-hero-card > div { padding: 12px !important; border-radius: 18px !important; }
    .kl-hero-card img { width: 40px !important; height: 40px !important; }
    .kl-hero-card li { gap: 10px !important; padding: 7px 4px !important; }
    .kl-hero-card li > span { font-size: 13px !important; }
    .kl-hero-card li > strong { font-size: 14px !important; }
    .kl-mobile-plant { display: block !important; z-index: 0 !important; top: -34px !important; opacity: .18; }
    .kl-grid-2, .kl-grid-3, .kl-grid-4 { grid-template-columns: minmax(0,1fr); gap: 24px; }
    .kl-results { grid-template-columns: minmax(0,1fr); }
    .kl-results article { display: grid !important; grid-template-columns: 80px minmax(0,1fr); align-items: start; }
    .kl-results article > div:first-child { height: 80px !important; grid-row: span 2; }
    .kl-results article h4 { font-size: 15px !important; }
    .kl-results article > div:nth-child(2) { flex-wrap: wrap; }
    .kl-field { gap: 6px; padding-left: 12px; }
    .kl-field-btn { min-height: 46px; padding: 0 14px; }
    .kl-chip { min-height: 44px; }
    .kl-cmp { gap: 14px; }
    #busquedas [role="tablist"] { flex-wrap: nowrap !important; overflow-x: auto; padding: 2px 0 8px; }
    #busquedas [role="tablist"] button { flex: none; white-space: nowrap; }
    #busquedas .kl-wrap > div { min-width: 0; }
    /* Cada fila se presenta como tarjeta legible, siguiendo la referencia móvil. */
    #busquedas .kl-srch-grid table { display: block; min-width: 0 !important; font-size: 14px !important; }
    #busquedas .kl-srch-grid thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    #busquedas .kl-srch-grid tbody { display: block; padding: 0 14px 14px; }
    #busquedas .kl-srch-grid tr { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px 6px; padding: 14px 0; }
    #busquedas .kl-srch-grid td { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 0 !important; text-align: left !important; }
    #busquedas .kl-srch-grid td:first-child, #busquedas .kl-srch-grid td:last-child { display: none; }
    #busquedas .kl-srch-grid td:nth-child(2) { grid-column: 1 / -1; }
    #busquedas .kl-srch-grid td:nth-child(n+3)::before { font-size: 10px; color: #5B6E6E; font-weight: 400; }
    #busquedas .kl-srch-grid td:nth-child(3)::before { content: 'VECES'; }
    #busquedas .kl-srch-grid td:nth-child(4)::before { content: 'CLICS'; }
    #busquedas .kl-srch-grid td:nth-child(5)::before { content: 'COMPRA'; }
    #busquedas .kl-srch-grid td:nth-child(6)::before { content: 'INGRESOS'; }
    #busquedas .kl-srch-grid td:nth-child(4) > span > span:first-child { display: none !important; }
    #caso .kl-grid-3 article { display: grid !important; grid-template-columns: minmax(100px,.8fr) minmax(0,1.2fr); align-items: center; gap: 16px !important; }
    #caso .kl-grid-3 article > p:first-child { font-size: 32px !important; }
    .kl-und { grid-template-columns: minmax(0,1fr); }
    #instalar svg { max-width: 100%; }
    #cleo .kl-grid-2 > div { min-width: 0; }
    #descargar .kl-wrap { padding: 0 16px; }
    #descargar .kl-wrap > div { gap: 24px !important; padding: 28px 20px !important; border-radius: 24px !important; }
    #descargar .kl-wrap > div > div > div { padding: 20px 18px !important; }
    #descargar .kl-btn { width: 100%; min-height: 54px; }
    #descargar .kl-input { flex-basis: 100%; width: 100%; }
    .kl-faq summary { padding: 18px; font-size: 17px; min-height: 56px; }
    footer > .kl-wrap { padding-top: 22px !important; padding-bottom: 22px !important; }
    footer > .kl-wrap > div { flex-wrap: wrap; }
    .kl-mobile-bar { position: sticky; bottom: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(245,243,238,.96); border-top: 1px solid #DDE3E0; backdrop-filter: blur(8px); }
    .kl-mobile-bar strong, .kl-mobile-bar small { display: block; }
    .kl-mobile-bar strong { font-size: 14px; }
    .kl-mobile-bar small { font-size: 13px; color: #435859; }
    .kl-mobile-bar .kl-btn { min-height: 46px; padding: 0 20px; font-size: 15px; }
}
@media (max-width: 359px) {
    .kl-site-header a:first-child span { display: none; }
    .kl-hero h1 { font-size: 40px !important; }
    .kl-mobile-bar .kl-btn { padding: 0 14px; font-size: 14px; }
}
/* El modo de movimiento reducido también detiene el filtro SVG, no sólo las transiciones CSS. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    svg [filter] { filter: none !important; }
}

/* La tarjeta del hero crece al revelar la interpretación y cada producto del ejemplo. */
.kl-hero-word { display: inline-flex; align-items: center; min-width: 8ch; min-height: 1.5em; white-space: nowrap; }
.kl-hero-card.is-animating .kl-hero-word { text-decoration-color: transparent; }
.kl-hero-card.is-animating.is-correcting .kl-hero-word { text-decoration-color: #C0392B; }
.kl-hero-card.is-animating [data-hero-reveal] { max-height: 0; padding-top: 0 !important; padding-bottom: 0 !important; border-top-width: 0 !important; overflow: hidden; opacity: 0; transform: translateY(8px); transition: max-height 420ms ease, padding 420ms ease, border-width 420ms ease, opacity 360ms ease, transform 360ms ease; }
.kl-hero-card.is-animating [data-hero-reveal].is-visible { max-height: var(--hero-reveal-height); padding-top: var(--hero-reveal-pad) !important; padding-bottom: var(--hero-reveal-pad) !important; opacity: 1; transform: translateY(0); }
.kl-hero-card.is-animating li[data-hero-reveal].is-visible { border-top-width: 1.5px !important; }
@media (min-width: 721px) {
    .kl-hero-card.is-animating { top: var(--hero-top); bottom: auto; }
}
.kl-hero-card[data-hero-stage="typing"] .kl-hero-word::after { content: ""; width: 1.5px; height: 1em; margin-left: 2px; background: #1D3B3C; animation: klHeroCaret 800ms step-end infinite; }
@keyframes klHeroCaret { 50% { opacity: 0; } }

/* Una preferencia de movimiento reducido muestra el ejemplo completo incluso durante un cambio de ajuste. */
@media (prefers-reduced-motion: reduce) {
    .kl-hero-card.is-animating [data-hero-reveal] { max-height: none; padding-top: var(--hero-reveal-pad) !important; padding-bottom: var(--hero-reveal-pad) !important; opacity: 1; transform: none; }
    .kl-hero-card.is-animating .kl-hero-word { text-decoration-color: #C0392B; }
    .kl-hero-card .kl-hero-word::after { display: none; }
}

/* Los escenarios reservan su tamaño completo; sólo cambia el contenido animado dentro de ellos. */
html { scrollbar-gutter: stable; }
.kl-hero-slot { display: contents; }
[data-layout-stage] { min-height: var(--stable-height, 0px); }
[data-layout-chips] { min-height: var(--stable-chips-height, 0px); align-content: flex-start; }
[data-layout-status] { min-height: var(--stable-status-height, 0px); align-content: flex-start; }
[data-layout-probe], [data-layout-probe] * { animation: none !important; transition: none !important; }
@media (max-width: 720px) {
    .kl-hero-slot { display: block; width: 100%; min-height: var(--hero-slot-height, 0px); order: 3; }

}

/* Cada panel conserva su propia altura para mantener quieto el segundo comparador en pantallas estrechas. */
.kl-cmp { align-content: start; }
.kl-cmp > [data-layout-panel]:nth-of-type(1) { min-height: var(--stable-panel-1-height, 0px); }
.kl-cmp > [data-layout-panel]:nth-of-type(2) { min-height: var(--stable-panel-2-height, 0px); }

/* Los productos conservan su lugar para que el scroll pueda detectar cada tarjeta antes de revelarla. */
.kl-demo-search[data-demo-animating="true"] [data-visible="aShowSummary"][hidden] { display: flex !important; visibility: hidden; }
.kl-demo-search[data-demo-animating="true"] .kl-results > article,
.kl-cmp[data-comparison-animating="true"] .kl-pop > li,
.kl-anim.is-playing .kl-sug { opacity: 0; transform: translateY(10px); transition: opacity 420ms ease, transform 420ms ease; }
.kl-cmp .kl-pop > li { animation: none; }
.kl-cmp:not([data-comparison-animating="true"]) .kl-pop > li { opacity: 1; transform: none; }
.kl-demo-search[data-demo-animating="true"] .kl-results > article.is-scroll-visible,
.kl-cmp[data-comparison-animating="true"] .kl-pop > li.is-scroll-visible,
.kl-anim.is-playing .kl-sug.is-scroll-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .kl-demo-search .kl-results > article, .kl-cmp .kl-pop > li, .kl-anim .kl-sug { opacity: 1 !important; transform: none !important; }
}
