/* r2611zAB (12 Nov 2026): no thumbnail resizer; fixed content width and
   automatic 3 / 2 / 1 card columns, matching the WordPress blogs
   (masoretes.online/wordpress theme: --wide 1180px, container
   calc(var(--wide) + 72px) = 1252px with 36px padding, 18px below 900px;
   .posts-grid: 3 columns, 2 at max-width 1180px, 1 at 640px, gaps 30/24/22). */

/* If a cached copy of the old slider script still runs, hide it. */
.mso-cols-ctl,
#mso-cols-range { display: none !important; }

/* Do not let the homepage grow past the WordPress container on very wide screens. */
body.home-v2 { --hv2-max: 1324px !important; }
@media (min-width: 1600px) { body.home-v2 { --hv2-max: 1324px !important; } }
@media (min-width: 2200px) { body.home-v2 { --hv2-max: 1324px !important; } }

/* Content column: same outer cap and side padding as .site-main-header on the journal. */
body.home-v2 .hv2-hero,
body.home-v2 .hv2-section,
body.home-v2 .hub-hero-lower {
  width: 100% !important;
  max-width: 1324px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  padding-left: 36px !important;
  padding-right: 36px !important;
}
@media (max-width: 900px) {
  body.home-v2 .hv2-hero,
  body.home-v2 .hv2-section,
  body.home-v2 .hub-hero-lower {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* Banner fills the padded column; do not add a second inset. */
body.home-v2 .hv2-banner {
  width: 100% !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}
body.home-v2 .hv2-home-head { max-width: none; }

html body.home-v2.hub-page #modules-grid#modules-grid.hub-grid.hub-modules-gallery,
html.mas-editorial body.home-v2.hub-page #modules-grid#modules-grid.hub-grid.hub-modules-gallery,
html body.home-v2.hub-page #modules-grid.hub-grid.hub-modules-gallery.tidy-alpha,
html.mas-editorial body.home-v2.hub-page #modules-grid.hub-grid.hub-modules-gallery.tidy-alpha {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 30px !important;
  max-width: none !important;
  width: 100% !important;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

@media (max-width: 1180px) {
  html body.home-v2.hub-page #modules-grid#modules-grid.hub-grid.hub-modules-gallery,
  html.mas-editorial body.home-v2.hub-page #modules-grid#modules-grid.hub-grid.hub-modules-gallery,
  html body.home-v2.hub-page #modules-grid.hub-grid.hub-modules-gallery.tidy-alpha,
  html.mas-editorial body.home-v2.hub-page #modules-grid.hub-grid.hub-modules-gallery.tidy-alpha {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
}

@media (max-width: 640px) {
  html body.home-v2.hub-page #modules-grid#modules-grid.hub-grid.hub-modules-gallery,
  html.mas-editorial body.home-v2.hub-page #modules-grid#modules-grid.hub-grid.hub-modules-gallery,
  html body.home-v2.hub-page #modules-grid.hub-grid.hub-modules-gallery.tidy-alpha,
  html.mas-editorial body.home-v2.hub-page #modules-grid.hub-grid.hub-modules-gallery.tidy-alpha {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
}

/* Keep cards equal height and titles from colliding, without the old column slider. */
html body.home-v2.hub-page #modules-grid#modules-grid .module-card {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  height: 100% !important;
}
html body.home-v2.hub-page #modules-grid#modules-grid .module-card .card-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
html body.home-v2.hub-page #modules-grid#modules-grid .module-card .card-foot {
  margin-top: auto !important;
  flex: 0 0 auto !important;
}

/* Historical-context series page: same cap and padding for the card column. */
html.mas-editorial body.home-v2.hub-page.note-page main#main-content.site-main-body,
html.mas-editorial body.home-v2.hub-page .site-main-body {
  max-width: 1324px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  padding-left: 36px !important;
  padding-right: 36px !important;
}
@media (max-width: 900px) {
  html.mas-editorial body.home-v2.hub-page.note-page main#main-content.site-main-body,
  html.mas-editorial body.home-v2.hub-page .site-main-body {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}
