/* JAISANDAR 309 — desktop lead balance + mobile demography/fullscreen */
@media(min-width:901px){
  body.home[data-jai-rubric="home"] .home-editorial{max-width:none!important;width:100%!important}
  body.home[data-jai-rubric="home"] .home-editorial>.home-lead-layout{
    grid-column:1/-1!important;
    width:calc(100vw - 48px)!important;
    max-width:1680px!important;
    margin-left:calc(50% - 50vw + 24px)!important;
    margin-right:24px!important;
    grid-template-columns:minmax(0,1fr) 300px!important;
    gap:18px!important;
  }
  body.home[data-jai-rubric="home"] .home-editorial-slider{min-width:0!important;width:100%!important}
  body.home[data-jai-rubric="home"] .home-economy-panel{width:300px!important;justify-self:end!important;margin-right:0!important}
}

@media(max-width:900px){
  /* Demography: compact controls, readable chart, no squeezed video area. */
  body.home [data-economy-window="demography"] .migration-flow-shell{border-radius:0!important;border-left:0!important;border-right:0!important;background:transparent!important;box-shadow:none!important}
  body.home [data-economy-window="demography"] .migration-flow-head{padding:12px 14px 8px!important}
  body.home [data-economy-window="demography"] .migration-flow-head h2{font-size:1.35rem!important;line-height:1.08!important}
  body.home [data-economy-window="demography"] .migration-flow-controls{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding:8px 12px 10px!important}
  body.home [data-economy-window="demography"] .migration-flow-playback{display:flex!important;gap:7px!important;overflow-x:auto!important;padding:2px 1px 5px!important;scroll-snap-type:x proximity!important}
  body.home [data-economy-window="demography"] .migration-flow-playback>*{flex:0 0 auto!important;scroll-snap-align:start!important}
  body.home [data-economy-window="demography"] .migration-flow-visual{min-height:0!important;height:min(72dvh,680px)!important;max-height:680px!important;background:transparent!important;overflow:hidden!important}
  body.home [data-economy-window="demography"] .migration-flow-chart,
  body.home [data-economy-window="demography"] .migration-flow-dots{background:transparent!important}
  body.home [data-economy-window="demography"] .jai309-enlarge{position:absolute!important;z-index:12!important;right:12px!important;top:12px!important;display:inline-flex!important;align-items:center!important;gap:7px!important;min-height:42px!important;padding:0 12px!important;border:1px solid rgba(7,92,66,.2)!important;border-radius:12px!important;background:rgba(255,255,255,.93)!important;color:#075c42!important;font-weight:900!important;box-shadow:0 8px 22px rgba(7,42,33,.13)!important;backdrop-filter:blur(10px)!important}

  /* No white placeholder when animated charts leave/re-enter viewport. */
  .migration-flow-visual,.migration-flow-chart,.migration-flow-dots,
  .economy-chart,.economy-chart-shell,.chart-shell,.chart-stage,[data-chart-shell]{background-color:transparent!important}
}

.jai309-fullscreen{position:fixed;inset:0;z-index:99999;display:none;flex-direction:column;background:#f4f7f6;color:#111}
.jai309-fullscreen.is-open{display:flex}
.jai309-fullscreen-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:8px 12px calc(8px + env(safe-area-inset-top));background:#fff;border-bottom:1px solid #dde5e2}
.jai309-fullscreen-head strong{font-size:.9rem}.jai309-fullscreen-close{width:42px;height:42px;border:0;border-radius:12px;background:#edf3f1;font-size:24px;line-height:1;cursor:pointer}
.jai309-fullscreen-body{position:relative;flex:1;min-height:0;overflow:auto;padding:10px 10px calc(10px + env(safe-area-inset-bottom))}
.jai309-fullscreen-body>.migration-flow-visual{height:calc(100dvh - 78px)!important;max-height:none!important;min-height:480px!important;width:100%!important;background:transparent!important}
body.jai309-fullscreen-open{overflow:hidden!important}

/* Economy subviews: remove repeated visible title/kicker, keep description and KPI. */
body.home [data-economy-window]>.economy-hero .economy-kicker,
body.home [data-economy-window]>.economy-hero h2{display:none!important}
body.home [data-economy-window]>.economy-hero p{margin-top:0!important}
