/* MetStat r100 — English-language LTR layout, appended AFTER r99 rules.
   No selectors touch layer symbols, model state colours or forecast/map data.
   Persian RTL and the desktop-scaled viewport remain unchanged. */
html[lang="en"][dir="ltr"] body{
 direction:ltr!important;
}
html[lang="en"][dir="ltr"] body :is(
  .wrap,.panel,.card,.mtPage,aside,main,header,fieldset,form,nav,
  .flGrid,.saGrid,.sfGrid,.obGrid,.mtBar,.apGrid,.caCard
){direction:ltr!important}
html[lang="en"][dir="ltr"] body :is(
  .panel,.card,aside,main,fieldset,label,legend,h1,h2,h3,h4,p
){text-align:start}
/* Always keep the legacy desktop viewport; no English mobile breakpoint. */
html[lang="en"][dir="ltr"]:not(.nvfOn),
html[lang="en"][dir="ltr"]:not(.nvfOn) body{min-width:1240px!important;max-width:none!important}
/* Main application workspaces: the controls move to the LEFT and the map/content to the RIGHT. */
html[lang="en"][dir="ltr"] body :is(
  #app,#dsApp,#cvApp,#wnApp,#ltApp,#onApp,#anAuto,#labApp,#synApp
):not([hidden]):has(>aside){
 display:grid!important;
 grid-template-columns:var(--ms97-panel,320px) minmax(0,1fr)!important;
 direction:ltr!important;
}
html[lang="en"][dir="ltr"] body :is(
  #app,#dsApp,#cvApp,#wnApp,#ltApp,#onApp,#anAuto,#labApp,#synApp
):not([hidden]) > aside{
 grid-column:1!important;grid-row:1!important;
 direction:ltr!important;max-width:100%!important;min-width:0!important;
}
html[lang="en"][dir="ltr"] body :is(
  #app,#dsApp,#cvApp,#wnApp,#ltApp,#onApp,#anAuto,#labApp,#synApp
):not([hidden]) > main{
 grid-column:2!important;grid-row:1!important;
 direction:ltr!important;max-width:100%!important;min-width:0!important;
}
/* Standard flex-column shells nested inside a larger section. */
html[lang="en"][dir="ltr"] body :is(#anAuto,#labApp,#synApp):not([hidden]):has(>aside){
 grid-template-columns:var(--ms97-panel,320px) minmax(0,1fr)!important;
}
/* Satellite, seasonal outlook, flash-flood and live stations. */
html[lang="en"][dir="ltr"] body #saApp:not([hidden]) #saMain.saGrid,
html[lang="en"][dir="ltr"] body #sfApp:not([hidden]) #sfMain .sfGrid,
html[lang="en"][dir="ltr"] body #obApp:not([hidden]) #obMain .obGrid{
 display:grid!important;
 grid-template-columns:var(--ms97-panel,320px) minmax(0,1fr)!important;
 direction:ltr!important;
}
html[lang="en"][dir="ltr"] body #flApp:not([hidden]) #flMain .flGrid{
 display:grid!important;grid-template-columns:275px minmax(0,1fr)!important;direction:ltr!important;
}
html[lang="en"][dir="ltr"] body #saMain.saGrid > .saTop,
html[lang="en"][dir="ltr"] body #sfMain .sfGrid > .sfSide,
html[lang="en"][dir="ltr"] body #obMain .obGrid > :is(.obControls,.p17-ob-side),
html[lang="en"][dir="ltr"] body #flMain .flGrid > :is(.flR,.p17-fl-side){
 grid-column:1!important;grid-row:1!important;direction:ltr!important;
 max-width:100%!important;min-width:0!important;
}
html[lang="en"][dir="ltr"] body #saMain.saGrid > .saCard,
html[lang="en"][dir="ltr"] body #sfMain .sfGrid > .sfBody,
html[lang="en"][dir="ltr"] body #obMain .obGrid > .obCol,
html[lang="en"][dir="ltr"] body #flMain .flGrid > .flL{
 grid-column:2!important;grid-row:1!important;direction:ltr!important;
 max-width:100%!important;min-width:0!important;
}
/* Climate atlas has two separate filter columns that must group on the left. */
html[lang="en"][dir="ltr"] body #caApp:not([hidden]){
 display:grid!important;grid-template-columns:345px minmax(0,1fr)!important;
 direction:ltr!important;
}
html[lang="en"][dir="ltr"] body #caApp:not([hidden]) > :is(#caAside,#caAside2){
 grid-column:1!important;direction:ltr!important;max-width:100%!important;
}
html[lang="en"][dir="ltr"] body #caApp:not([hidden]) > #caAside2{grid-row:1!important}
html[lang="en"][dir="ltr"] body #caApp:not([hidden]) > #caAside{grid-row:2!important}
html[lang="en"][dir="ltr"] body #caApp:not([hidden]) > main{
 grid-column:2!important;grid-row:1 / span 2!important;direction:ltr!important;
 max-width:100%!important;min-width:0!important;
}
/* Meteogram — summary settings on the left; graph / analyses on the right. */
html[lang="en"][dir="ltr"] body #mtApp:not([hidden]) #mtMain.mtPage{
 display:grid!important;grid-template-columns:var(--ms97-panel,320px) minmax(0,1fr)!important;
 direction:ltr!important;
}
html[lang="en"][dir="ltr"] body #mtApp #mtMain > :is(.mtTop,.card:not(.mtDet):not(.mtTop)){
 grid-column:1!important;direction:ltr!important;min-width:0!important;
}
html[lang="en"][dir="ltr"] body #mtApp #mtMain > .mtTop{grid-row:2!important}
html[lang="en"][dir="ltr"] body #mtApp #mtMain > .card:not(.mtTop):not(.mtDet){grid-row:3!important}
html[lang="en"][dir="ltr"] body #mtApp #mtMain > .mtDet{
 grid-column:2!important;grid-row:2 / span 2!important;direction:ltr!important;
 min-width:0!important;max-width:100%!important;
}
/* Layout direction inside navigation; maintain the r99 one-row / no-horizontal-scroll guarantee. */
html[lang="en"][dir="ltr"] body #msNav :is(#msNavR1,#msNavR2){direction:ltr!important}
html[lang="en"][dir="ltr"] body #msNav :is(#msNavR1,#msNavR2) > :is(button,a){
 direction:ltr!important;writing-mode:horizontal-tb!important;min-width:0!important;
 white-space:nowrap!important;word-break:keep-all!important;
}
/* English control labels are often longer: preserve each button's available width. */
html[lang="en"][dir="ltr"] body :is(#caApp,#apApp,#mtApp,#sfApp,#flApp,#saApp,#obApp,#onApp) :is(
  button,select,input,textarea
){max-width:100%;box-sizing:border-box;word-break:keep-all}
/* Same-origin framed tools inherit this only when intentionally injected. */
html.ms100-frame[lang="en"] body{direction:ltr!important}
/* r100 QA: v29 observation and r97 flood overrides have two IDs and trumped the
   generic direction rule. Win only for the English UI, leaving Persian intact. */
html[lang="en"][dir="ltr"] body #obApp:not([hidden]) #obMain .obGrid > :is(.obControls,.p17-ob-side),
html[lang="en"][dir="ltr"] body #flApp:not([hidden]) #flMain .flGrid > :is(.flR,.p17-fl-side){
 grid-column:1!important;grid-row:1!important;direction:ltr!important;
 width:100%!important;min-width:0!important;max-width:100%!important;
}
html[lang="en"][dir="ltr"] body #obApp:not([hidden]) #obMain .obGrid > .obCol,
html[lang="en"][dir="ltr"] body #flApp:not([hidden]) #flMain .flGrid > .flL{
 grid-column:2!important;grid-row:1!important;direction:ltr!important;
 width:100%!important;min-width:0!important;max-width:100%!important;
}
