/*
 * WB1 Template System 1.0.0
 * The only geometry source for Classic Pages.
 */
:root{
  --wb1-page-shell:1440px;
  --wb1-page-reading:1180px;
  --wb1-page-gutter:32px;
  --wb1-page-gutter-tablet:24px;
  --wb1-page-gutter-mobile:16px;
}

.wb1-page-template{
  box-sizing:border-box;
  width:min(calc(100% - (var(--wb1-page-gutter) * 2)),var(--wb1-page-shell))!important;
  max-width:var(--wb1-page-shell)!important;
  margin:0 auto!important;
  padding:64px 0 60px!important;
}

.wb1-page-template__reading{
  box-sizing:border-box;
  width:min(100%,var(--wb1-page-reading))!important;
  max-width:var(--wb1-page-reading)!important;
  margin:0 auto!important;
}

.wb1-page-template__reading > .entry-header,
.wb1-page-template__reading > .entry-content{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

.wb1-page-template__reading .entry-content > *{
  max-width:none!important;
}

.wb1-page-template .entry-header h1{
  margin:0 0 26px!important;
}

/* Gallery/discovery is never constrained by reading width. */
.wb1-page-template__gallery{
  box-sizing:border-box;
  width:100%!important;
  max-width:none!important;
  margin:48px auto 0!important;
}
.wb1-page-template__gallery .wb1-structured-discovery,
.wb1-page-template__gallery .epr-project-discovery,
.wb1-page-template__gallery .wb1-portfolio-grid{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Explicit variants. */
.wb1-page-template--wide .wb1-page-template__reading{
  width:min(100%,1320px)!important;
  max-width:1320px!important;
}
.wb1-page-template--full{
  width:calc(100% - (var(--wb1-page-gutter) * 2))!important;
  max-width:none!important;
}
.wb1-page-template--full .wb1-page-template__reading,
.wb1-page-template--full .wb1-page-template__gallery{
  width:100%!important;
  max-width:none!important;
}

/* Tablet */
@media(max-width:1024px){
  .wb1-page-template{
    width:calc(100% - (var(--wb1-page-gutter-tablet) * 2))!important;
    padding:50px 0 50px!important;
  }
  .wb1-page-template__gallery{margin-top:40px!important}
}

/* Mobile */
@media(max-width:760px){
  .wb1-page-template{
    width:calc(100% - (var(--wb1-page-gutter-mobile) * 2))!important;
    padding:36px 0 42px!important;
  }
  .wb1-page-template__gallery{margin-top:32px!important}
}
