/* LF-SITE-MOBILE-COMPATIBILITY-AND-RADAR-PERFORMANCE-001
   Mobile/tablet-only containment layer. Desktop/laptop >= 901px is untouched. */
@media (max-width:900px){
  html,body{max-width:100%;overflow-x:hidden}
  *,*::before,*::after{min-width:0}
  img,svg,video,canvas{max-width:100%}
  iframe{max-width:100%;border:0}
  main,section,article,aside,header,footer,nav,div{min-width:0}
  .mi-page-root,.mw21-site,.app{width:100%;max-width:100%;overflow-x:hidden}
  .mi-universal-hero{height:auto!important;min-height:0!important}
  .mi-universal-hero .mi-hero-inner{width:100%!important;max-width:none!important;display:grid!important;grid-template-columns:1fr!important;gap:14px!important;padding:26px 18px 22px!important}
  .mi-universal-hero .mi-hero-copy{max-width:100%!important}
  .mi-universal-hero h1{font-size:clamp(34px,9vw,54px)!important;line-height:1.02!important;overflow-wrap:anywhere}
  .mi-universal-hero p{max-width:100%!important;font-size:14px!important;line-height:1.5!important}
  .mi-hero-actions{justify-self:start!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  .mi-hero-action{min-height:42px!important;white-space:normal!important;text-align:center!important}
  .mw21-frame,.mw21-frame iframe{width:100%!important;max-width:100%!important}
  .mw21-frame{overflow:hidden!important}
  table{max-width:100%}
}

/* Homepage five-card containment: allow complete copy on phones/tablets without altering desktop geometry. */
@media (max-width:900px){
  body[data-page="home"] .ep-mi-grid{align-items:stretch!important}
  body[data-page="home"] .ep-mi-card{height:auto!important;min-height:0!important;overflow:hidden!important}
  body[data-page="home"] .ep-mi-body{height:auto!important;min-height:0!important;overflow:visible!important;flex:1 1 auto!important}
  body[data-page="home"] .ep-mi-title-row,
  body[data-page="home"] .ep-mi-copy{min-width:0!important;overflow:visible!important}
  body[data-page="home"] .ep-mi-title-row strong{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  body[data-page="home"] .ep-mi-description{display:block!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;text-overflow:clip!important;-webkit-line-clamp:unset!important;line-clamp:unset!important}
  body[data-page="home"] .ep-mi-features{position:static!important;flex:0 0 auto!important}
  body[data-page="home"] .ep-mi-open{position:static!important;flex:0 0 auto!important;margin-top:auto!important}
}
@media (max-width:759px){
  body[data-page="home"] .ep-mi-suite{padding-left:14px!important;padding-right:14px!important}
  body[data-page="home"] .ep-mi-grid{grid-template-columns:1fr!important;gap:14px!important}
  body[data-page="home"] .ep-mi-visual{height:auto!important;min-height:190px!important;flex:0 0 auto!important;aspect-ratio:1.55/1!important}
  body[data-page="home"] .ep-mi-body{padding:15px 16px 16px!important;gap:8px!important}
  body[data-page="home"] .ep-mi-title-row strong{font-size:23px!important;line-height:1.02!important}
  body[data-page="home"] .ep-mi-description{font-size:14px!important;line-height:1.45!important}
  body[data-page="home"] .ep-mi-features span{font-size:10px!important;padding:5px 8px!important}
  body[data-page="home"] .ep-mi-open{min-height:48px!important;padding:9px 11px!important}
}

/* Generic mobile app safeguards for the three dense MI workspaces. */
@media (max-width:760px){
  body[data-page="market-explainer"] .filters{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  body[data-page="market-explainer"] .categories,
  body[data-page="market-explainer"] .period{max-width:100%!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:3px!important}
  body[data-page="market-explainer"] .categories button,
  body[data-page="market-explainer"] .period button{flex:0 0 auto!important}
  body[data-page="market-explainer"] .workspace{grid-template-columns:1fr!important;gap:12px!important}
  body[data-page="market-explainer"] .feed,
  body[data-page="market-explainer"] .center,
  body[data-page="market-explainer"] .rail{width:100%!important;max-width:100%!important}
  body[data-page="market-explainer"] .rail{display:grid!important;grid-template-columns:1fr!important}
  body[data-page="personal-dashboard"] .dashboard-main,
  body[data-page="personal-dashboard"] .dashboard-grid,
  body[data-page="strategy-lab"] .strategy-grid,
  body[data-page="strategy-lab"] .strategy-main{max-width:100%!important;overflow-x:hidden!important}
}

/* =====================================================================
   LF-SITE-MOBILE-COMPATIBILITY-AND-RADAR-PERFORMANCE-001A
   Runtime-evidence correction: homepage MI card readable reflow.
   Mobile/tablet only. Desktop >= 901px remains untouched.
   ===================================================================== */
@media (max-width:900px){
  body[data-page="home"] .ep-mi-grid{
    align-items:start!important;
  }
  body[data-page="home"] .ep-mi-card{
    display:flex!important;
    flex-direction:column!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  body[data-page="home"] .ep-mi-visual{
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:1.62/1!important;
    overflow:hidden!important;
  }
  /* Give edge-positioned labels in native SVG previews breathing room. */
  body[data-page="home"] .ep-mi-live-native>svg{
    width:96%!important;
    height:96%!important;
    margin:2% auto!important;
    transform:none!important;
    transform-origin:center!important;
    overflow:visible!important;
  }
  body[data-page="home"] .ep-mi-card-dashboard .ep-mi-live-native>svg,
  body[data-page="home"] .ep-mi-card-strategy .ep-mi-live-native>svg{
    transform:none!important;
  }
  body[data-page="home"] .ep-mi-body{
    display:flex!important;
    flex:1 0 auto!important;
    height:auto!important;
    min-height:max-content!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body[data-page="home"] .ep-mi-copy{
    flex:0 0 auto!important;
    overflow:visible!important;
  }
  body[data-page="home"] .ep-mi-description{
    display:block!important;
    white-space:normal!important;
    overflow:visible!important;
    max-height:none!important;
    -webkit-line-clamp:unset!important;
    line-clamp:unset!important;
  }
  body[data-page="home"] .ep-mi-features{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:flex-start!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body[data-page="home"] .ep-mi-features span{
    flex:0 0 auto!important;
    max-width:100%!important;
    white-space:normal!important;
  }
  body[data-page="home"] .ep-mi-open{
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    min-height:50px!important;
    flex:0 0 auto!important;
    margin-top:4px!important;
    box-sizing:border-box!important;
  }
}

/* At true mobile widths use one readable card per row instead of squeezing two. */
@media (max-width:820px){
  body[data-page="home"] .ep-mi-grid{grid-template-columns:1fr!important;gap:16px!important}
  body[data-page="home"] .ep-mi-card{width:100%!important}
  body[data-page="home"] .ep-mi-visual{aspect-ratio:1.72/1!important}
  body[data-page="home"] .ep-mi-title-row strong{font-size:clamp(22px,6.2vw,27px)!important;line-height:1.04!important}
  body[data-page="home"] .ep-mi-description{font-size:clamp(14px,3.8vw,16px)!important;line-height:1.5!important}
  body[data-page="home"] .ep-mi-features span{font-size:11px!important;line-height:1.2!important;padding:6px 9px!important}
  body[data-page="home"] .ep-mi-open-label>span{font-size:14px!important}
  body[data-page="home"] .ep-mi-open small{font-size:9px!important}
}

@media (max-width:430px){
  body[data-page="home"] .ep-mi-suite{padding-left:12px!important;padding-right:12px!important}
  body[data-page="home"] .ep-mi-visual{aspect-ratio:1.58/1!important}
  body[data-page="home"] .ep-mi-live-native>svg{width:94%!important;height:94%!important;margin:3% auto!important}
  body[data-page="home"] .ep-mi-body{padding:16px!important;gap:10px!important}
  body[data-page="home"] .ep-mi-open{min-height:52px!important;padding:10px 12px!important}
}

/* =====================================================================
   LF-SITE-MOBILE-COMPATIBILITY-AND-RADAR-PERFORMANCE-001B
   Authoritative mobile card reflow. New asset filename intentionally
   invalidates stale mobile browser caches. Desktop >= 901px untouched.
   ===================================================================== */
@media (max-width:900px){
  body[data-page="home"] .ep-mi-suite{overflow:visible!important}
  body[data-page="home"] .ep-mi-shell{width:100%!important;max-width:100%!important;padding-inline:12px!important;box-sizing:border-box!important}
  body[data-page="home"] .ep-mi-grid{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;gap:18px!important;align-items:start!important;
    width:100%!important;max-width:100%!important;overflow:visible!important;
  }
  body[data-page="home"] .ep-mi-card,
  body[data-page="home"] .ep-mi-grid .ep-mi-card{
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
  }
  body[data-page="home"] .ep-mi-visual,
  body[data-page="home"] .ep-mi-grid .ep-mi-visual{
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    flex:0 0 auto!important;aspect-ratio:1.72 / 1!important;overflow:hidden!important;
  }
  body[data-page="home"] .ep-mi-live-native>svg{
    width:92%!important;height:92%!important;margin:4% auto!important;
    display:block!important;transform:none!important;overflow:visible!important;
  }
  body[data-page="home"] .ep-mi-card-explainer .lf-ai-board{
    width:94%!important;height:94%!important;margin:3% auto!important;
    transform:none!important;transform-origin:center!important;
  }
  body[data-page="home"] .ep-mi-body,
  body[data-page="home"] .ep-mi-grid .ep-mi-body{
    display:flex!important;flex-direction:column!important;width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    padding:16px!important;gap:11px!important;overflow:visible!important;box-sizing:border-box!important;
  }
  body[data-page="home"] .ep-mi-title-row,
  body[data-page="home"] .ep-mi-grid .ep-mi-title-row{
    display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;
    gap:11px!important;align-items:start!important;height:auto!important;min-height:0!important;
  }
  body[data-page="home"] .ep-mi-copy,
  body[data-page="home"] .ep-mi-grid .ep-mi-copy{
    display:flex!important;flex-direction:column!important;gap:7px!important;
    height:auto!important;min-height:0!important;grid-template-rows:none!important;overflow:visible!important;
  }
  body[data-page="home"] .ep-mi-title-row strong,
  body[data-page="home"] .ep-mi-grid .ep-mi-title-row strong{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
    white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
    font-size:clamp(23px,5.8vw,28px)!important;line-height:1.06!important;
  }
  body[data-page="home"] .ep-mi-description,
  body[data-page="home"] .ep-mi-grid .ep-mi-description{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
    white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
    -webkit-line-clamp:unset!important;line-clamp:unset!important;
    font-size:clamp(14px,3.7vw,16px)!important;line-height:1.48!important;
  }
  body[data-page="home"] .ep-mi-features,
  body[data-page="home"] .ep-mi-grid .ep-mi-features{
    display:flex!important;flex-wrap:wrap!important;height:auto!important;min-height:0!important;max-height:none!important;
    gap:7px!important;overflow:visible!important;margin:0!important;
  }
  body[data-page="home"] .ep-mi-features span,
  body[data-page="home"] .ep-mi-grid .ep-mi-features span{
    white-space:normal!important;height:auto!important;min-height:28px!important;
    padding:6px 9px!important;font-size:11.5px!important;line-height:1.25!important;
  }
  body[data-page="home"] .ep-mi-open,
  body[data-page="home"] .ep-mi-grid .ep-mi-open{
    position:static!important;inset:auto!important;width:100%!important;height:auto!important;
    min-height:54px!important;max-height:none!important;margin:2px 0 0!important;padding:10px 12px!important;
    flex:0 0 auto!important;box-sizing:border-box!important;
  }
  body[data-page="home"] .ep-mi-grid .ep-mi-open small{font-size:9.5px!important}
  body[data-page="home"] .ep-mi-grid .ep-mi-open-label>span{font-size:14px!important}
}

@media (max-width:430px){
  body[data-page="home"] .ep-mi-shell{padding-inline:10px!important}
  body[data-page="home"] .ep-mi-visual,
  body[data-page="home"] .ep-mi-grid .ep-mi-visual{aspect-ratio:1.56 / 1!important}
}

/* =====================================================================
   LF-SITE-MOBILE-COMPATIBILITY-AND-RADAR-PERFORMANCE-001C
   FINAL MOBILE CARD OWNERSHIP. Desktop >= 901px untouched.
   The preview viewport uses the native 320x230 artwork ratio so SVGs using
   preserveAspectRatio="slice" no longer crop labels or graph endpoints.
   ===================================================================== */
@media (max-width:900px){
  body[data-page="home"] .ep-mi-shell{padding-inline:14px!important;overflow:visible!important}
  body[data-page="home"] .ep-mi-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:20px!important;width:100%!important;overflow:visible!important}
  body[data-page="home"] .ep-mi-card{display:flex!important;flex-direction:column!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
  body[data-page="home"] .ep-mi-visual{display:grid!important;place-items:center!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:320/230!important;overflow:hidden!important;background:#041f1a!important}
  body[data-page="home"] .ep-mi-live-native>svg{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;margin:0!important;transform:none!important;transform-origin:center!important}
  body[data-page="home"] .ep-mi-card-explainer .lf-ai-board{width:100%!important;height:100%!important;margin:0!important;transform:none!important}
  body[data-page="home"] .ep-mi-body{display:flex!important;flex-direction:column!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;padding:18px!important;gap:12px!important;overflow:visible!important;box-sizing:border-box!important}
  body[data-page="home"] .ep-mi-title-row{display:grid!important;grid-template-columns:46px minmax(0,1fr)!important;gap:12px!important;align-items:start!important;height:auto!important;min-height:0!important}
  body[data-page="home"] .ep-mi-copy{display:flex!important;flex-direction:column!important;gap:8px!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  body[data-page="home"] .ep-mi-title-row strong{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;white-space:normal!important;overflow:visible!important;font-size:clamp(24px,6.4vw,30px)!important;line-height:1.08!important}
  body[data-page="home"] .ep-mi-description{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;white-space:normal!important;overflow:visible!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;font-size:clamp(15px,4vw,17px)!important;line-height:1.5!important}
  body[data-page="home"] .ep-mi-features{display:flex!important;flex-wrap:wrap!important;height:auto!important;min-height:0!important;max-height:none!important;gap:8px!important;margin:0!important;overflow:visible!important}
  body[data-page="home"] .ep-mi-features span{height:auto!important;min-height:30px!important;max-width:100%!important;white-space:normal!important;padding:7px 10px!important;font-size:12px!important;line-height:1.25!important}
  body[data-page="home"] .ep-mi-open{position:static!important;inset:auto!important;display:flex!important;width:100%!important;height:auto!important;min-height:58px!important;max-height:none!important;margin-top:2px!important;padding:11px 13px!important;box-sizing:border-box!important}
  body[data-page="home"] .ep-mi-open-label>span{font-size:15px!important;line-height:1.15!important}
  body[data-page="home"] .ep-mi-open small{font-size:9.5px!important}
}
@media (max-width:430px){
  body[data-page="home"] .ep-mi-shell{padding-inline:10px!important}
  body[data-page="home"] .ep-mi-body{padding:16px!important}
  body[data-page="home"] .ep-mi-title-row{grid-template-columns:44px minmax(0,1fr)!important;gap:11px!important}
}

/* =====================================================================
   LF-SITE-MOBILE-COMPATIBILITY-AND-RADAR-PERFORMANCE-001D
   COMPONENT-WIDTH OWNERSHIP
   Fixes homepage MI card clipping without changing the five-across desktop
   grid. Removes legacy fixed copy-row heights and gives preview edge labels
   a safe inset. Other homepage sections are untouched.
   ===================================================================== */
body[data-page="home"] .ep-mi-grid{
  align-items:stretch!important;
}
body[data-page="home"] .ep-mi-grid .ep-mi-card{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
body[data-page="home"] .ep-mi-grid .ep-mi-body{
  height:auto!important;
  min-height:214px!important;
  max-height:none!important;
  overflow:visible!important;
  display:flex!important;
  flex-direction:column!important;
}
body[data-page="home"] .ep-mi-grid .ep-mi-copy{
  grid-template-rows:auto auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}
body[data-page="home"] .ep-mi-grid .ep-mi-title-row,
body[data-page="home"] .ep-mi-grid .ep-mi-title-row strong,
body[data-page="home"] .ep-mi-grid .ep-mi-description{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
body[data-page="home"] .ep-mi-grid .ep-mi-description{
  display:block!important;
  white-space:normal!important;
  -webkit-line-clamp:unset!important;
  line-clamp:unset!important;
}
body[data-page="home"] .ep-mi-grid .ep-mi-features{
  height:auto!important;
  min-height:24px!important;
  max-height:none!important;
  overflow:visible!important;
  flex-wrap:wrap!important;
  margin-top:8px!important;
}
body[data-page="home"] .ep-mi-grid .ep-mi-open{
  position:static!important;
  inset:auto!important;
  margin-top:auto!important;
  flex:0 0 auto!important;
}
/* Weather labels and Strategy graph endpoints were touching the preview edge. */
body[data-page="home"] .ep-mi-card-weather .ep-mi-live-native,
body[data-page="home"] .ep-mi-card-strategy .ep-mi-live-native{
  box-sizing:border-box!important;
  padding-inline:9px!important;
}
body[data-page="home"] .ep-mi-card-weather .ep-mi-live-native>svg,
body[data-page="home"] .ep-mi-card-strategy .ep-mi-live-native>svg{
  width:100%!important;
  max-width:100%!important;
  transform:none!important;
  transform-origin:center!important;
}
