/* Site Background (v2) — CANONICAL
   Purpose:
   - grey page background
   - transparent wrappers so rails can show on desktop
   - masthead paint policy:
     <1300: keep masthead white
     >=1300: allow gutters transparent; header “block” stays white via header CSS
*/

html, body{
  background: var(--cte-bg) !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

/* Let wrappers be transparent so grey shows through */
.site,
.site-content,
.content-bg,
.content-wrap,
.entry-content-wrap,
.content-container.site-container{
  background: transparent !important;
}

/* ============================================================
   Masthead paint policy
   ============================================================ */

/* Mobile/tablet: solid white masthead */
@media (max-width:1299px){
  #masthead,
  #masthead .site-header-wrap,
  #masthead .site-header-inner-wrap,
  #masthead .site-header-upper-wrap,
  #masthead .site-header-upper-inner-wrap,
  #masthead .site-header-row-container,
  #masthead .site-header-row-container-inner,
  #masthead .site-container,
  #masthead .site-header-row,
  #masthead .site-top-header-wrap,
  #masthead .site-top-header-inner-wrap,
  #masthead .site-header-upper-inner-wrap{
    background: #fff !important;
  }
}

/* Desktop rails breakpoint: do NOT paint the whole masthead white */
@media (min-width:1300px){
  #masthead,
  #masthead .site-header-wrap,
  #masthead .site-header-inner-wrap,
  #masthead .site-header-upper-wrap,
  #masthead .site-header-upper-inner-wrap,
  #masthead .site-header-row-container,
  #masthead .site-header-row-container-inner,
  #masthead .site-container,
  #masthead .site-header-row,
  #masthead .site-top-header-wrap,
  #masthead .site-top-header-inner-wrap,
  #masthead .site-header-upper-inner-wrap{
    background: transparent !important;
  }
}

/* ============================================================
   Homepage: keep outside grey, cards white
   ============================================================ */
body.home .site-content,
body.home .content-area,
body.home .entry-content,
body.home .cte-homepage-display{
  background: transparent !important;
}
