/* Keep the primary content centered even when sidebar blocks render empty.
 * Sidebar content remains available below the main reading area. */
#content > .container {
  margin-inline: auto;
}
#content .content-main-inner > .row > #page-main-content,
#content .content-main-inner > .row > .sidebar {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  left: auto;
  right: auto;
}
#content .content-main-inner > .row > #page-main-content {
  order: 0;
}
#content .content-main-inner > .row > .sidebar {
  order: 1;
}

/* The parent theme caps the header width; distribute the remaining space
 * equally instead of letting RTL alignment push the frame to the right. */
@media (min-width: 992px) {
  #header.header-default .header-main .header-main-inner {
    margin-inline: auto !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
  }
}
