/* Adapta las composiciones de escritorio y los dos móviles a una única página. */
:root { --gut: clamp(20px, 8.333vw, 120px); }
[hidden] { display: none !important; }
.wrap { max-width: 1440px; }
main > section { scroll-margin-top: 110px; }
.home-section-head { margin-bottom: 30px; }
.home-section-head .eyebrow { margin-bottom: 16px; color: var(--teal-3); }
.home-section-head h2 { max-width: 24ch; font-size: clamp(34px, 4vw, 56px); }
.home-section-head h2 span { color: var(--teal-2); }
.home-brand-mark { display: grid; place-items: center; width: 48px; height: 48px; background: #fff; border: 1.5px solid var(--ink); border-radius: 14px; flex: none; }
.brand-name { font-size: 28px; }
.site-header .wrap { gap: 20px; }
.nav { gap: 24px; }
.nav-links { gap: 20px; white-space: nowrap; }
.site-header .session-chip { max-width: 180px; }
.home-mobile-nav { display: none; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 14px; background: white; border: 2px solid var(--ink); }
.skip-link:focus { top: 10px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--teal-3); outline-offset: 4px; }
/* Las ilustraciones decorativas se recortan en su sección sin ocultar contenido útil. */
.kh-sec { padding: clamp(56px, 7.8vw, 112px) var(--gut); overflow: hidden; }
.kh-in { max-width: 1200px; margin: 0 auto; gap: clamp(28px, 3.4vw, 48px); }
.kh-design :is(h1,h2,h3,p,ul,ol) { margin: 0; }
.kh-design :is(ul,ol) { padding: 0; list-style: none; }
.kh-design :is(div,li,span,pre) { min-width: 0; }
.kh-row { flex-wrap: wrap; }
.kh-h1 { font-size: clamp(40px, 5vw, 72px) !important; }
.kh-h2 { font-size: clamp(34px, 3.9vw, 56px); }
.kh-h3 { font-size: clamp(24px, 2vw, 28px); }
.kh-lead { font-size: clamp(17px, 1.5vw, 21px); }
.kh-card { padding: clamp(20px, 2vw, 28px); }
.kh-btn { font-size: 16px; padding: 12px 24px; text-align: center; }
.kh-chip { white-space: normal; }
.home-hero > .kh-in > div:last-child { min-height: 480px; height: auto !important; }
.home-hero .kh-sway { right: -25px !important; }
.home-hero .kh-sway > svg { width: 440px; max-width: 100%; }
.home-hero .kh-bub { box-shadow: 5px 6px 0 rgba(29,59,60,.12); }
.home-products .kh-in > div:last-child > ul { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
.home-products .kh-in > div:last-child strong { flex-wrap: wrap; }
.home-jev .jev-anim { margin-top: 0; }
.home-jev .home-before-after .kh-row { justify-content: flex-end; }
.home-jev pre { overflow-wrap: anywhere; }
.home-paths .kh-in > div:last-child > ul > li { flex-wrap: wrap; }
.home-paths .kh-in > div:last-child > ul > li > div:nth-child(2) { flex-basis: 100px !important; }
.home-final > .kh-in { margin-left: max(0px, calc((100% - 1200px)/2)); }
/* La demo y el comparador mantienen todos sus paneles con el borde y sombra de la propuesta. */
.demo { padding-top: 0; padding-bottom: clamp(56px, 7.8vw, 112px); }
.demo-card { border: 1.5px solid var(--ink); border-radius: 28px; box-shadow: 10px 12px 0 rgba(29,59,60,.12); }
.tab[aria-selected="true"] { box-shadow: 0 0 0 1.5px var(--ink); }
.field { border-color: var(--ink); }
.compare { max-width: none; background: #edf1ea; padding: clamp(56px,7.8vw,112px) max(var(--gut),calc((100% - 1200px)/2)); }
.compare > h2 { max-width: 24ch !important; }
.compare-widget { border-radius: 24px; }
.compare-widget.is-jev { border: 1.5px solid var(--ink); box-shadow: 7px 8px 0 rgba(29,59,60,.12); }
/* Mantiene el contenido de cada formulario dentro del viewport, incluso con teclado móvil. */
.chooser { padding: 16px; }
.chooser-card { max-height: calc(100dvh - 32px); }
.chooser-live-stage .demo-body { gap: 16px; }
.chooser-live-stage .field { margin-top: auto; }
@media (max-width: 1199px) {
    .nav-links { display: none; }
    .home-mobile-nav { display: flex; gap: 22px; overflow-x: auto; white-space: nowrap; padding: 12px var(--gut); border-bottom: 1px solid var(--line); font-size: 14px; }
    .home-hero > .kh-in { grid-template-columns: minmax(0,1fr) minmax(0,.8fr) !important; }
    .home-hero .kh-sway > svg { width: 340px; }
    .home-hero > .kh-in > div:last-child > div:nth-child(2) { width: 100% !important; }
    .home-products .kh-in > ul { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 14px !important; }
    .home-paths .kh-in > div:last-child { grid-template-columns: 1fr !important; }
}
@media (max-width: 759px) {
    :root { --gut: 20px; }
    main > section { scroll-margin-top: 100px; }
    .site-header .wrap { padding-top: 12px; padding-bottom: 12px; gap: 10px; flex-wrap: wrap; }
    .home-brand-mark { width: 38px; height: 38px; border-radius: 11px; }
    .brand-name { font-size: 24px; }
    .nav { flex: 1; justify-content: flex-end; }
    .nav-actions { gap: 8px; }
    .session-chip { max-width: 140px !important; }
    .session-chip strong { font-size: 11px; }
    .btn-ghost { font-size: 12px; padding: 8px 10px; }
    .kh-sec { padding: 56px var(--gut); }
    .home-hero { padding-top: 40px !important; padding-bottom: 40px !important; }
    .home-hero > .kh-in { display: flex !important; gap: 28px !important; }
    .home-hero > .kh-in > div:first-child { gap: 22px !important; }
    .home-hero > .kh-in > div:last-child { width: 100%; min-height: 340px; }
    .home-hero .kh-sway { right: 0 !important; }
    .home-hero .kh-sway > svg { width: 310px; height: 300px; }
    .home-hero > .kh-in > div:last-child > div:nth-child(2) { max-width: 300px; }
    .home-hero > .kh-in > div:last-child > div:last-child { right: 0 !important; top: 100px !important; }
    .kh-h1 { font-size: 42px !important; line-height: 1.04; }
    .kh-h2 { font-size: 34px; line-height: 1.08; }
    .kh-lead { font-size: 17px; }
    .kh-btn { min-height: 50px; padding: 12px 20px; font-size: 15px; }
    .kh-design .kh-deco { opacity: .2 !important; }
    .kh-in > ul, .kh-in > div[style*="grid-template-columns"], .home-products .kh-in > ul,
    .home-products .kh-in > div:last-child > ul, .home-paths .kh-soft > ul { grid-template-columns: minmax(0,1fr) !important; }
    .home-before-after { gap: 22px; }
    .home-before-after > div:nth-child(2) { transform: rotate(90deg); height: 30px; }
    .home-before-after li { flex-wrap: wrap; }
    .home-before-after li > span:last-child { flex: 1 1 170px; }
    .home-paths .kh-in > div:last-child { padding: 20px !important; gap: 22px !important; }
    .home-paths .kh-card > div[style*="position: absolute"] { opacity: .3 !important; }
    .demo-card { border-radius: 22px; box-shadow: 5px 6px 0 rgba(29,59,60,.12); }
    .demo-bar { padding: 16px; }
    .demo .tabs { max-width: none; }
    .compare-grid.has-woo { grid-template-columns: minmax(0,1fr); }
    .compare-composer .compare-live { white-space: normal; }
    #compare-field .field-btn { padding: 0 12px; font-size: 13px; }
    .home-final { padding-bottom: 220px !important; }
    .home-final .kh-in { margin-left: 0; }
    .home-final .kh-deco { opacity: .6 !important; }
    footer .wrap { flex-direction: column; align-items: flex-start; }
    .chooser { padding: 8px; }
    .chooser-card { max-height: calc(100dvh - 16px); padding: 18px; }
}
@media (max-width: 380px) {
    .kh-h1 { font-size: 38px !important; }
    .home-hero .kh-btn { width: 100%; }
    .session-chip { display: none !important; }
    .results { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
/* La descripción textual hace accesible el flujo ilustrativo sin narrar cada frame. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo { padding-left: var(--gut); padding-right: var(--gut); }
@media (min-width: 1200px) and (max-width: 1439px) {
    .site-header .nav-links { gap: 14px; font-size: 14px; }
    .site-header .nav { flex: 1; justify-content: space-between; }
    .site-header .session-chip { max-width: 140px; }
    .site-header .session-chip small { display: none; }
    .site-header .nav-actions { max-width: 315px; }
}
/* La identidad y las acciones caben en dos filas en teléfonos con sesión iniciada. */
@media (min-width: 381px) and (max-width: 759px) {
    .site-header .nav-actions { display: grid; grid-template-columns: auto auto; }
    .site-header .session-chip { grid-column: 1 / -1; justify-self: end; }
    .site-header .btn-ghost { font-size: 11px; padding: 8px; }
    .site-header #kahos-start-cta { font-size: 13px; padding: 10px 12px; }
}
/* El diálogo del catálogo mantiene consulta, resultados y acciones en zonas separadas. */
.chooser[data-live="1"] .chooser-card { width: min(900px, 100%); height: min(700px, calc(100dvh - 32px)); padding: 26px; gap: 0; }
.chooser[data-live="1"] .chooser-head { align-items: center; margin-bottom: 18px; }
.chooser[data-live="1"] .chooser-head h2 { font-size: clamp(25px, 3vw, 30px); }
.chooser[data-live="1"] .chooser-back { font-size: 12px; padding-bottom: 10px; }
#chooser-live { gap: 16px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catalog-toolbar .chooser-live-switch { display: inline-flex; flex-wrap: nowrap; gap: 4px; padding: 4px; background: #E7ECE8; border: 1px solid #DDE3E0; border-radius: 14px; }
.catalog-toolbar .chooser-live-switch button { min-height: 42px; border: 0; border-radius: 10px; font-size: 14px; padding: 10px 16px; background: transparent; font-weight: 600; }
.catalog-toolbar .chooser-live-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px #173e4018; }
.catalog-context { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted-2); font-size: 12px; }
.chooser[data-live="1"] .chooser-live-stage { display: flex; overflow: hidden; border-color: #D4DEDA; border-radius: 20px; }
.chooser[data-live="1"] .chooser-live-stage > .demo-body { width: 100%; height: 100%; min-height: 0; padding: 24px; gap: 20px; }
.catalog-composer { flex: 0 0 auto; margin: 0; }
.catalog-composer label { display: block; margin-bottom: 9px; font-size: 15px; font-weight: 600; }
.chooser-live-stage .catalog-composer .field { margin-top: 0; background: #FAFAF7; border-color: #8AA3A0; padding: 5px 5px 5px 14px; border-radius: 14px; }
/* Un único indicador suave en el campo completo evita duplicar el foco dentro del input. */
.field:focus-within { border-color: #5D8582; box-shadow: 0 0 0 2px rgba(60, 159, 160, .10); }
.catalog-composer .field input { padding: 10px 0; }
.catalog-composer .field-btn { min-width: 100px; padding: 0 16px; gap: 8px; border-radius: 10px; }
.catalog-composer .field-btn span { display: inline; }
.catalog-composer > p:not(.hint) { margin: 8px 0 0; color: var(--muted-2); font-size: 12px; }
.catalog-composer .hint { margin-left: 0; font-size: 13px; }
#live-search-out { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#live-search-out[aria-busy="true"] { cursor: progress; }
.catalog-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 22px 12px; text-align: center; background: radial-gradient(ellipse at center, #F0F6F3 0%, #fff 70%); border-radius: 14px; }
.catalog-empty-symbol { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 20px; background: #E4EFEA; transform: rotate(-5deg); }
.catalog-empty .eyebrow { margin: 4px 0 0; font-size: 10px; color: var(--teal-3); }
.catalog-empty h3 { margin: 0; max-width: 24ch; font: 650 clamp(22px, 3vw, 28px)/1.12 'Bricolage Grotesque', sans-serif; letter-spacing: -.025em; }
.catalog-empty > p:not(.eyebrow) { margin: 0; max-width: 40ch; font-size: 14px; line-height: 1.5; color: var(--muted-2); }
.catalog-empty-tags { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.catalog-empty-tags span { padding: 5px 9px; border: 1px solid #DDE3E0; border-radius: 999px; background: #fff; color: var(--muted-2); font-size: 11px; }
.catalog-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.catalog-footer > span { font-size: 12px; color: var(--muted-2); }
.catalog-footer > div { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.catalog-footer a, .catalog-footer button { color: var(--ink); font: 600 13px 'Instrument Sans', sans-serif; text-decoration: none; }
.catalog-footer button { padding: 8px 0; background: transparent; border: 0; cursor: pointer; color: #9C302A; }
.catalog-footer a:hover { text-decoration: underline; }
.chooser[data-live="1"] [data-live-panel="whatsapp"] .chooser-live-log { padding: 4px 0; }
.chooser[data-live="1"] [data-live-panel="whatsapp"] .field-btn { min-width: 72px; padding: 0 12px; }
@media (max-width: 599px) {
    .chooser[data-live="1"] .chooser-card { height: min(710px, calc(100dvh - 20px)); padding: 18px; border-radius: 22px; }
    .chooser[data-live="1"] .chooser-head { margin-bottom: 14px; }
    .chooser[data-live="1"] .chooser-head h2 { font-size: 26px; }
    #chooser-live { gap: 12px; }
    .catalog-toolbar { gap: 8px; }
    .catalog-toolbar .chooser-live-switch { width: 100%; }
    .catalog-toolbar .chooser-live-switch button { flex: 1; font-size: 12px; padding: 9px 6px; }
    .catalog-context { display: none; }
    .chooser[data-live="1"] .chooser-live-stage > .demo-body { padding: 16px; gap: 16px; }
    .catalog-composer label { font-size: 14px; }
    .catalog-composer .field input { font-size: 16px; }
    .catalog-composer .field-btn { min-width: 72px; padding: 0 10px; font-size: 13px; }
    .catalog-composer .field-btn span { display: none; }
    .catalog-empty { padding: 18px 4px; gap: 10px; }
    .catalog-empty-symbol { width: 52px; height: 52px; border-radius: 16px; }
    .catalog-empty-symbol svg { width: 32px; height: 32px; }
    .catalog-empty h3 { font-size: 24px; }
    .catalog-empty > p:not(.eyebrow) { font-size: 13px; }
    .catalog-empty-tags span { font-size: 10px; padding: 5px 7px; }
    .catalog-footer { gap: 4px; }
    .catalog-footer > span { flex-basis: 100%; font-size: 11px; }
    .catalog-footer > div { width: 100%; justify-content: space-between; gap: 10px; }
}
@media (max-height: 650px) {
    .catalog-empty-tags, .catalog-empty-symbol { display: none; }
    .catalog-empty { padding: 10px; }
    .catalog-empty h3 { font-size: 21px; }
    .chooser[data-live="1"] .chooser-card { padding: 14px; }
}
/* El estado inicial cabe también en portátiles; el foco se dibuja en el campo completo. */
@media (min-width: 600px) {
    .catalog-empty { padding: 8px 12px; gap: 8px; }
    .catalog-empty-symbol { width: 48px; height: 48px; border-radius: 16px; }
    .catalog-empty-symbol svg { width: 32px; height: 32px; }
    .catalog-empty h3 { max-width: 34ch; font-size: 24px; }
    .catalog-empty-tags span { padding: 4px 8px; font-size: 10px; }
}
/* Demo, comparador y popup comparten el foco exterior sin duplicarlo dentro del input. */
.field input:focus,
.field input:focus-visible { outline: none; outline-offset: 0; box-shadow: none; }

/* El símbolo oficial conserva sus colores sobre fondo claro, también en avatares dinámicos. */
.kahos-av { width: 34px; height: 34px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.kahos-av svg { display: block; width: 26px; height: 26px; flex: none; }
