/* LF-SITE-MI-FAMILY-SHELL-AND-NEWS-TICKER-REPAIR
   Approved scope: five MI page shell geometry, ticker continuity, desktop width.
   Radar intelligence/runtime behavior is intentionally untouched here. */
body:is([data-page="radar"],[data-page="market-weather"],[data-page="personal-dashboard"],[data-page="market-explainer"],[data-page="strategy-lab"]){
  --mi-family-gutter:clamp(16px,1.65vw,32px);
  --mi-shell:100%;
}

/* Compact MI chrome participates in normal flow. Do not reserve its height twice. */
body:is([data-page="radar"],[data-page="market-weather"],[data-page="personal-dashboard"],[data-page="market-explainer"],[data-page="strategy-lab"]) .mi-compact-stack{
  position:relative!important;
  inset:auto!important;
}
body:is([data-page="radar"],[data-page="market-weather"],[data-page="personal-dashboard"],[data-page="market-explainer"],[data-page="strategy-lab"]) .mi-page-root{
  padding-top:0!important;
  margin-top:0!important;
  transform:none!important;
}
body[data-page="market-weather"]{--mw-fixed-chrome-h:0px!important;scroll-padding-top:0!important}
body[data-page="market-weather"] .mi-page-root{padding-top:0!important}

/* One full-width desktop family shell with controlled edge protection. */
.mi-compact-shell{
  width:100%!important;
  max-width:none!important;
  padding-left:var(--mi-family-gutter)!important;
  padding-right:var(--mi-family-gutter)!important;
}
.mi-hero-inner{
  width:calc(100% - (2 * var(--mi-family-gutter)))!important;
  max-width:none!important;
}
body[data-page="market-weather"] .mw21-site{
  width:100%!important;
  max-width:none!important;
  padding-left:var(--mi-family-gutter)!important;
  padding-right:var(--mi-family-gutter)!important;
}
body[data-page="personal-dashboard"] .market-strip{
  margin-left:var(--mi-family-gutter)!important;
  margin-right:var(--mi-family-gutter)!important;
}
body[data-page="personal-dashboard"] .dashboard-shell{
  margin-left:var(--mi-family-gutter)!important;
  margin-right:var(--mi-family-gutter)!important;
}
body[data-page="market-explainer"] .filters,
body[data-page="market-explainer"] .workspace{
  margin-left:var(--mi-family-gutter)!important;
  margin-right:var(--mi-family-gutter)!important;
  max-width:none!important;
}
body[data-page="strategy-lab"] .sl-app .app-shell{
  width:calc(100% - (2 * var(--mi-family-gutter)))!important;
  max-width:none!important;
}

/* Keep the news ribbon alive after refresh/reflow; avoid legacy hover/focus pause rules. */
body:is([data-page="radar"],[data-page="market-weather"],[data-page="personal-dashboard"],[data-page="market-explainer"],[data-page="strategy-lab"]) .market-news-ribbon.ready .market-news-track{
  animation-name:marketNewsCrawl!important;
  animation-timing-function:linear!important;
  animation-iteration-count:infinite!important;
  animation-play-state:running!important;
  transform:translate3d(0,0,0);
  backface-visibility:hidden;
}
body:is([data-page="radar"],[data-page="market-weather"],[data-page="personal-dashboard"],[data-page="market-explainer"],[data-page="strategy-lab"]) .market-news-ribbon.detail-open .market-news-track{
  animation-play-state:paused!important;
}

@media(max-width:760px){
  body:is([data-page="radar"],[data-page="market-weather"],[data-page="personal-dashboard"],[data-page="market-explainer"],[data-page="strategy-lab"]){--mi-family-gutter:12px}
  .mi-compact-shell{padding-left:12px!important;padding-right:12px!important}
  .mi-hero-inner{width:calc(100% - 24px)!important}
}

/* Live-band recovery: keep the news status tape moving slowly even when the
   platform requests reduced motion. This override is limited to this compact
   information ribbon and does not re-enable unrelated page animation. */
@media(prefers-reduced-motion:reduce){
  body:is([data-page="radar"],[data-page="market-weather"],[data-page="personal-dashboard"],[data-page="market-explainer"],[data-page="strategy-lab"]) .market-news-ribbon.ready .market-news-track{
    animation-name:marketNewsCrawl!important;
    animation-duration:120s!important;
    animation-timing-function:linear!important;
    animation-iteration-count:infinite!important;
    animation-play-state:running!important;
  }
}
