/* KOKO DATA Experience 3.3.30-rc.21 — Solo TABLET táctil, vertical y horizontal.
   No se activa ni en teléfonos (incluido móvil horizontal) ni en escritorio con ratón. */
@media (hover:none) and (pointer:coarse) and (min-width:768px) and (min-height:540px) and (max-width:1599px) {
  /* El fondo del hero animado no puede ampliar horizontalmente la página. */
  .kdx-hero{overflow-x:clip!important}

  /* Capítulo 90 s: lectura real, no la antigua tarjeta vacía de tablet. */
  .kdx-story{padding:28px 0 42px!important;overflow:visible!important;background:#050506!important;color:#f5f5f5!important}
  /* Evitar el min-height de casi 100vh del modo capítulo en tablet vertical. */
  .kdx-scene-body .kdx.kdx-story{min-height:0!important;height:auto!important;padding:28px 0 42px!important}
  .kdx-story .kdx-shell{width:calc(100% - 40px)!important;max-width:1120px!important;min-width:0!important;min-height:0!important;height:auto!important;justify-content:flex-start!important;margin-inline:auto!important}
  .kdx-story .kdx-story__intro{margin:0 0 14px!important}
  .kdx-story .kdx-story__intro>p:not(.kdx-kicker){display:none!important}
  .kdx-story .kdx-story__intro h2{font-size:clamp(38px,5vw,58px)!important;line-height:.99!important;max-width:none!important;color:#fff!important}
  .kdx-story .kdx-story__intro h2 mark{color:#FEC300!important;background:transparent!important}
  .kdx-story .kdx-story__layout{display:flex!important;flex-direction:column!important;gap:7px!important;min-width:0!important;align-items:stretch!important}
  .kdx-story .kdx-story-tabs,.kdx-story .kdx-story__stage-top,.kdx-story .kdx-carousel-dots{display:none!important}
  .kdx-story .kdx-story__steps,
  .kdx-story .kdx-story__steps.kdx-mobile-track{
    display:block!important;order:0!important;position:relative!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:hidden!important;
    scroll-snap-type:none!important;scroll-behavior:auto!important;
  }
  .kdx-story .kdx-story__steps>.kdx-story__step,
  .kdx-story .kdx-story__steps.kdx-mobile-track>.kdx-story__step.kdx-mobile-card{
    display:none!important;position:static!important;float:none!important;
    min-height:0!important;width:100%!important;max-width:100%!important;
    margin:0!important;opacity:1!important;transform:none!important;
  }
  .kdx-story .kdx-story__steps>.kdx-story__step.kdx-card-active,
  .kdx-story .kdx-story__steps.kdx-mobile-track>.kdx-story__step.kdx-card-active{
    display:block!important;flex:none!important;
    padding:20px 26px 23px!important;
    background:#151518!important;border:1px solid rgba(254,195,0,.72)!important;
    border-radius:17px!important;color:#f6f6f7!important;
  }
  .kdx-story .kdx-story__step>span{display:none!important}
  .kdx-story .kdx-story__step h3{
    display:block!important;margin:0 0 9px!important;
    font-size:clamp(25px,3.1vw,34px)!important;line-height:1.11!important;
    color:#FEC300!important;
  }
  .kdx-story .kdx-story__step>p{
    display:block!important;margin:0!important;
    font-size:clamp(17px,1.65vw,20px)!important;line-height:1.47!important;
    color:#ededf0!important;max-width:100%!important;
  }
  .kdx-story .kdx-story__step details{display:block!important;margin:9px 0 0!important;color:#d5d5d8!important;font-size:13px!important}
  .kdx-story .kdx-story__step details summary{display:inline-flex!important;min-height:34px!important;align-items:center!important;font-size:12px!important;color:#FEC300!important}
  .kdx-story .kdx-story__step details p{font-size:14px!important;line-height:1.5!important}
  .kdx-story .kdx-story__step details a{color:#FEC300!important;font-size:13px!important}
  .kdx-story .kdx-story__stage{
    display:block!important;order:1!important;position:static!important;
    top:auto!important;left:auto!important;width:100%!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:13px 14px 16px!important;
    overflow:visible!important;border-radius:18px!important;
  }
  .kdx-story .kdx-story-board{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:auto!important;align-items:stretch!important;align-content:start!important;
    gap:12px!important;margin:0!important;padding:0!important;min-height:0!important;
  }
  .kdx-story .kdx-story-measure{
    display:flex!important;flex-direction:column!important;align-items:center!important;
    justify-content:flex-start!important;align-self:stretch!important;
    box-sizing:border-box!important;height:100%!important;min-height:0!important;
    gap:7px!important;margin:0!important;padding:16px 14px!important;
    border-radius:14px!important;
  }
  .kdx-story .kdx-story-measure>span{font-size:clamp(12px,1.35vw,15px)!important;line-height:1.3!important}
  .kdx-story .kdx-story-measure>strong{font-size:clamp(42px,5.2vw,66px)!important;line-height:1.06!important}
  .kdx-story .kdx-story-measure>b{font-size:clamp(16px,1.8vw,20px)!important}
  .kdx-story .kdx-story-measure>small{font-size:clamp(12px,1.4vw,14px)!important;line-height:1.4!important}
  .kdx-story .kdx-story-measure>a{margin-top:auto!important;font-size:12px!important;min-height:35px!important}
  .kdx-story .kdx-story-history{height:58px!important;min-height:0!important;max-height:65px!important}
  .kdx-story .kdx-story-board--price .kdx-story-price-territory{display:none!important}
  .kdx-story .kdx-story-board--price .kdx-story-price-meta{order:6!important}
  .kdx-story .kdx-story-board--price .kdx-story-price-yoy{order:3!important;color:#FEC300!important;font-weight:700!important}
  .kdx-story .kdx-story-board--price .kdx-story-history{order:4!important}
  .kdx-story .kdx-story-board--price .kdx-story-history-caption{order:5!important}
  .kdx-story .kdx-story-board--price .kdx-story-history-caption__full{display:none!important}
  .kdx-story .kdx-story-board--price .kdx-story-history-caption__compact{display:inline!important}
  .kdx-story .kdx-story-board--price .kdx-story-price-inspect{display:none!important}
  .kdx-story .kdx-story__caption{display:none!important}
  .kdx-story .kdx-story__stage>.kdx-context-button{display:none!important}
  .kdx-story .kdx-story__layout>.kdx-carousel-controls{display:none!important}
  .kdx-story .kdx-story__stage>.kdx-tablet-story-nav{
    display:flex!important;align-items:center!important;justify-content:center!important;
    gap:17px!important;width:max-content!important;max-width:100%!important;
    margin:14px auto 0!important;padding:0!important;color:#fff!important;
  }
  .kdx-story .kdx-tablet-story-nav button{
    display:grid!important;place-items:center!important;width:48px!important;height:48px!important;
    min-width:48px!important;min-height:48px!important;padding:0!important;
    border:1px solid #505057!important;border-radius:12px!important;
    background:#19191d!important;color:#FEC300!important;font-size:22px!important;
  }
  .kdx-story .kdx-tablet-story-nav button:disabled{opacity:.33!important}
  .kdx-story .kdx-tablet-story-nav span{min-width:52px!important;font-size:16px!important;font-weight:750!important;text-align:center!important}
  .kdx-story .kdx-tablet-story-nav button:focus-visible{outline:2px solid #FEC300!important;outline-offset:3px!important}

  /* Hogares frente a viviendas: no puede encogerse el SVG dentro de un flex
     con altura forzada. El gráfico utiliza todo el ancho legible y scroll vertical nativo. */
  .kdx-buildgap{padding:30px 0 42px!important;overflow:visible!important}
  .kdx-buildgap .kdx-shell{width:calc(100% - 40px)!important;max-width:1150px!important;min-width:0!important}
  .kdx-buildgap .kdx-buildgap__head{display:block!important;margin:0 0 10px!important}
  .kdx-buildgap .kdx-buildgap__head h2{font-size:clamp(36px,4.7vw,56px)!important;line-height:1!important}
  .kdx-buildgap .kdx-buildgap__toolbar{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:12px!important;margin:14px 0 0!important}
  .kdx-buildgap .kdx-buildgap__stage{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;align-items:start!important;gap:12px!important;
    margin-top:12px!important;width:100%!important;min-width:0!important;
  }
  .kdx-buildgap .kdx-buildgap__chart{
    position:relative!important;display:block!important;float:none!important;box-sizing:border-box!important;
    flex:none!important;min-width:0!important;width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:14px 17px 17px!important;overflow:hidden!important;
  }
  .kdx-buildgap .kdx-buildgap__charttop{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:0 0 10px!important;padding:0 0 10px!important;font-size:11px!important}
  .kdx-buildgap .kdx-buildgap__legend{gap:9px!important;font-size:10px!important}
  .kdx-buildgap .kdx-buildgap__chart svg[data-build-svg]{
    display:block!important;position:static!important;
    flex:none!important;flex-basis:auto!important;flex-grow:0!important;flex-shrink:0!important;
    width:100%!important;min-width:100%!important;max-width:100%!important;
    height:clamp(410px,49vw,630px)!important;min-height:410px!important;max-height:630px!important;
    margin:0!important;padding:0!important;overflow:visible!important;
    object-fit:contain!important;transform:none!important;
  }
  .kdx-buildgap .kdx-buildgap__chart svg[data-build-svg] text{font-size:clamp(15px,1.45vw,19px)!important}
  .kdx-buildgap .kdx-buildgap__chart [data-build-method-marker] text{font-size:14px!important}
  .kdx-buildgap .kdx-buildgap__panel{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:20px!important;
  }
  .kdx-buildgap .kdx-buildgap__panel>span{grid-column:1/-1!important}
  .kdx-buildgap .kdx-buildgap__year{grid-column:1/-1!important;font-size:clamp(42px,5vw,62px)!important;margin:0!important}
  .kdx-buildgap .kdx-buildgap__metrics{grid-column:1/-1!important;grid-row:auto!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;margin:0!important}
  .kdx-buildgap .kdx-buildgap__metrics>div,.kdx-buildgap .kdx-buildgap__metrics>div:first-child{grid-column:auto!important;min-width:0!important;padding:12px!important}
  .kdx-buildgap .kdx-buildgap__metrics span{font-size:10px!important}
  .kdx-buildgap .kdx-buildgap__metrics strong{font-size:clamp(22px,2.6vw,32px)!important}
  .kdx-buildgap .kdx-buildgap__annual,.kdx-buildgap .kdx-buildgap__cumulative{grid-column:auto!important;grid-row:auto!important;margin:0!important;padding:14px!important;display:block!important}
  .kdx-buildgap .kdx-buildgap__annual span,.kdx-buildgap .kdx-buildgap__cumulative span{font-size:10px!important}
  .kdx-buildgap .kdx-buildgap__annual strong,.kdx-buildgap .kdx-buildgap__cumulative strong{font-size:clamp(24px,3vw,37px)!important}
  .kdx-buildgap .kdx-buildgap__annual small,.kdx-buildgap .kdx-buildgap__cumulative small{font-size:10px!important;display:block!important}
  .kdx-buildgap .kdx-buildgap__bde{grid-column:1/-1!important;padding:12px!important;margin:0!important}
  .kdx-buildgap .kdx-buildgap__panel>p,.kdx-buildgap .kdx-buildgap__meta{grid-column:1/-1!important;display:block!important;margin:0!important;padding:0!important;font-size:13px!important}
  .kdx-buildgap .kdx-buildgap__panel>.kdx-context-button{grid-column:1/-1!important;justify-self:start!important}
  .kdx-buildgap .kdx-buildgap__method{font-size:11px!important}

  /* El eje y la leyenda no deben solaparse sobre tablets estrechas. */
  @supports (width: min(10px,20px)){
    .kdx-buildgap .kdx-buildgap__stage,.kdx-story .kdx-story__layout{max-width:100%!important}
  }
}
