/* Settings page: keep the content aligned with the app header and navigation.
   Scoped to Plan & settings so the other finance screens are unaffected. */
body[data-view="app"] section[data-view="plan"] > .shell.app.mount{
  box-sizing:border-box;
  width:100%;
  max-width:1160px;
  margin-inline:auto;
  padding-inline:24px;
  padding-block-start:28px;
}
body[data-view="app"] section[data-view="plan"] .plan-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  align-items:start;
}
body[data-view="app"] section[data-view="plan"] .plan-grid > *{
  min-width:0;
}
body[data-view="app"] section[data-view="plan"] .plan-grid .card{
  min-width:0;
}
@media (max-width:900px){
  body[data-view="app"] section[data-view="plan"] .plan-grid{
    grid-template-columns:minmax(0,1fr);
    gap:16px;
  }
}
@media (max-width:680px){
  body[data-view="app"] section[data-view="plan"] > .shell.app.mount{
    padding-inline:18px;
    padding-block-start:16px;
  }
}
@media (max-width:360px){
  body[data-view="app"] section[data-view="plan"] > .shell.app.mount{
    padding-inline:12px;
  }
}

/* Shared finance content rail. Overview, Budget, Payday and other authenticated
   screens must use the same centered content width as top navigation. */
body[data-view="app"] main > section.view[data-view] > .shell.app.mount{
  box-sizing:border-box;
  width:100%;
  max-width:1160px;
  margin-inline:auto;
  padding-inline:24px;
}
body[data-view="app"] main > section.view[data-view] > .shell.app.mount > *{
  min-width:0;
  max-width:100%;
}
@media(max-width:680px){
  body[data-view="app"] main > section.view[data-view] > .shell.app.mount{
    padding-inline:18px;
  }
}
@media(max-width:360px){
  body[data-view="app"] main > section.view[data-view] > .shell.app.mount{
    padding-inline:12px;
  }
}

/* Fix actual Budget screen: unlike other screens, Budget has .shell.app without .mount.
   Apply the same width and padding to ALL finance screen app shells. */
body[data-view="app"] main > section.view > .shell.app{
  box-sizing:border-box;
  width:100%;
  max-width:1160px !important;
  margin-inline:auto !important;
  padding-inline:24px !important;
}
body[data-view="app"] main > section.view > .shell.app > *{min-width:0;max-width:100%}
/* Keep the whole desktop nav visible: do not clip Subscriptions & Savings. */
@media(min-width:901px){
 body[data-view="app"] .subnav-wrap{max-width:1160px !important;margin-inline:auto !important;padding-inline:24px !important;box-sizing:border-box}
 body[data-view="app"] .subnav{
  display:flex;
  flex-wrap:nowrap;
  overflow:visible;
  gap:4px;
  row-gap:0;
  height:auto;
  justify-content:center;
  padding:7px;
 }
 body[data-view="app"] .subnav a{flex:0 0 auto;white-space:nowrap}
}
@media(max-width:900px){
 body[data-view="app"] main > section.view > .shell.app{padding-inline:18px !important}
}
@media(max-width:360px){
 body[data-view="app"] main > section.view > .shell.app{padding-inline:12px !important}
}

/* Budget screen: its wrapper is .b2.shell (not .shell.app), and a broader "max-width:100%" rule
   was letting it stretch to the full window. Keep it on the same rail as the navigation. */
body[data-view="app"] main > section.view > .shell.b2{
  box-sizing:border-box;
  width:100%;
  max-width:1160px !important;
  margin-inline:auto !important;
  padding-inline:24px !important;
}
@media(max-width:680px){body[data-view="app"] main > section.view > .shell.b2{padding-inline:18px !important}}
@media(max-width:360px){body[data-view="app"] main > section.view > .shell.b2{padding-inline:12px !important}}
