/* GSE FAQ and universal layout v6 — shared across all 750 tool routes and homepage. */
@media(min-width:1121px){
 body>main>.gse-ad-frame,body>main>.site-columns.gse-ad-frame{grid-template-columns:minmax(0,728px) 300px!important;max-width:1043px!important;gap:15px!important;align-items:stretch!important;}
 .gse-ad-primary{width:728px!important;max-width:728px!important;min-width:0!important;}
}
.gse-ad-primary{box-sizing:border-box!important;min-width:0!important;display:flex!important;flex-direction:column!important;gap:15px!important;}
.gse-ad-primary>*{box-sizing:border-box;min-width:0;max-width:100%;}
.gse-ad-primary>.gse-ad-inline-slot{margin:0!important;padding:0!important;width:100%!important;flex:none!important;}
.gse-ad-primary>.gse-ad-inline-slot>.gse-ad-horizontal{width:728px!important;height:90px!important;box-sizing:border-box!important;padding:12px!important;}
.gse-ad-primary>.gse-ad-inline-slot>.gse-ad-mobile{width:300px!important;height:120px!important;box-sizing:border-box!important;padding:12px!important;}
.gse-ad-primary>.gse-master-faq{margin:0!important;width:100%!important;max-width:100%!important;flex:none!important;}
.gse-ad-primary>.gse-ad-inline-slot+section,.gse-ad-primary>section:has(+.gse-ad-inline-slot){margin-block:0!important;}
.gse-ad-primary>.gse-ad-inline-slot+.gse-master-faq,.gse-ad-primary>.gse-master-faq+.gse-ad-inline-slot{margin:0!important;}
.gse-ad-frame{margin-bottom:15px!important;}
body:has(main[data-gse-ad-layout="ready"])>main{padding-bottom:15px!important;}
body:has(main[data-gse-ad-layout="ready"])>footer.site-footer{margin-top:0!important;}
.gse-ad-rail-stack{gap:15px!important;}
.gse-ad-rail-stack>.gse-ad-unit{width:300px!important;}
@media(max-width:1120px){.gse-ad-primary{width:100%!important;max-width:100%!important}.gse-ad-primary>.gse-ad-inline-slot>.gse-ad-horizontal{display:none!important}.gse-ad-primary>.gse-ad-inline-slot>.gse-ad-mobile{display:flex!important}}

/* 2026-10-25 reconciliation: direct children use one 15px gap, no inherited margins. */
.gse-ad-frame>.gse-ad-primary{gap:15px!important;align-content:start!important;align-items:stretch!important;}
.gse-ad-frame>.gse-ad-primary>*{margin-top:0!important;margin-bottom:0!important;flex-shrink:0!important;}
.gse-ad-frame>.gse-ad-primary>.gse-ad-inline-slot{margin:0!important;}
.gse-ad-frame>.gse-ad-primary>.gse-master-faq{margin:0!important;}
.gse-ad-frame>.gse-ad-rail{align-self:start!important;}
.gse-ad-rail-stack{height:auto!important;justify-content:flex-start!important;align-items:stretch!important;}
.gse-ad-rail-stack>.gse-ad-unit{flex:0 0 auto!important;}
.gse-ad-rail-stack>.gse-ad-fill{display:none!important;}
/* Eliminate internal bottom whitespace of the page grid, not the footer. */
.gse-ad-frame{margin-bottom:0!important;}
body:has(main[data-gse-ad-layout="ready"])>main{padding-bottom:15px!important;}

/* Final reconciliation: exactly 15px between the two columns and every direct block. */
@media(min-width:1121px){body>main>.gse-ad-frame,body>main>.site-columns.gse-ad-frame{column-gap:15px!important;gap:15px!important;}}
.gse-ad-home>.gse-ad-primary{gap:15px!important}
.gse-ad-home>.gse-ad-primary>.gse-ad-inline-slot:last-child{margin-bottom:0!important}
.gse-ad-frame{margin-bottom:0!important}

/* v9: exact column gap, eliminate nested legacy primary margins. */
@media(min-width:1121px){
 body>main .site-columns.gse-ad-frame{display:grid!important;grid-template-columns:minmax(0,728px) 300px!important;column-gap:15px!important;gap:15px!important;max-width:1043px!important;width:1043px!important;padding:0!important;margin-inline:auto!important;}
 body>main .site-columns.gse-ad-frame>.gse-ad-primary{grid-column:1!important;width:728px!important;max-width:728px!important;margin:0!important;padding:0!important;}
 body>main .site-columns.gse-ad-frame>.gse-ad-rail{grid-column:2!important;width:300px!important;margin:0!important;padding:0!important;}
}
.gse-ad-frame>.gse-ad-primary{display:flex!important;flex-direction:column!important;gap:15px!important;}
.gse-ad-frame>.gse-ad-primary>*{margin-block:0!important;}
.gse-ad-frame>.gse-ad-primary>.gse-ad-inline-slot{margin:0!important;padding:0!important;height:90px!important;min-height:90px!important;}
.gse-ad-frame>.gse-ad-primary>.gse-ad-inline-slot>.gse-ad-horizontal{height:90px!important;}
.gse-ad-frame>.gse-ad-primary>.gse-master-faq-root{margin:0!important;}
.gse-ad-frame>.gse-ad-primary>.gse-master-faq-root>*{margin-block:0!important;}
.gse-ad-rail-stack{gap:15px!important;margin:0!important;padding:0!important;}
body:has(main[data-gse-ad-layout="ready"])>main{padding-bottom:15px!important;}

/* Root cause: global main max-width 1120 + 22px padding squeezes a 1043px grid.
   Homepage category rules also override grid gap with higher specificity. */
@media (min-width:1121px){
 body:has(>main .gse-ad-frame)>main{box-sizing:border-box!important;max-width:1103px!important;width:100%!important;padding-left:30px!important;padding-right:30px!important;margin-left:auto!important;margin-right:auto!important;}
 body>main .site-columns.gse-ad-frame,
 body:has(.category-panel[data-category])>main .site-columns.gse-ad-frame{
  display:grid!important;grid-template-columns:minmax(0,728px) 300px!important;
  gap:15px!important;column-gap:15px!important;row-gap:15px!important;
  width:1043px!important;max-width:100%!important;margin:0 auto!important;padding:0!important;
 }
 body>main .site-columns.gse-ad-frame>.gse-ad-primary{min-width:0!important;max-width:728px!important;width:728px!important;}
 body>main .site-columns.gse-ad-frame>.gse-ad-rail{min-width:300px!important;width:300px!important;}
}
/* Vertical rhythm: only one 15px gap between neighboring primary blocks. */
.gse-ad-frame>.gse-ad-primary{gap:15px!important;}
.gse-ad-frame>.gse-ad-primary>.gse-ad-inline-slot{margin:0!important;}
.gse-ad-frame>.gse-ad-primary>.gse-master-faq-root{display:flex!important;flex-direction:column!important;gap:15px!important;}
.gse-ad-frame>.gse-ad-primary>.gse-master-faq-root>*{margin:0!important;}
body:has(>main[data-gse-ad-layout="ready"])>main{padding-bottom:15px!important;margin-bottom:0!important;min-height:0!important;}
body:has(>main[data-gse-ad-layout="ready"])>footer.site-footer{margin-top:0!important;}

/* v11: calculator wrappers carry legacy bottom padding (34px business, 36px financial)
   plus outer margins; these stack with the universal 15px flex gap. */
@media (min-width:1121px) {
 body:has(.gse-biz-wrap) .gse-ad-frame>.gse-ad-primary .gse-biz-wrap,
 body:has(.gse-fin-wrap) .gse-ad-frame>.gse-ad-primary .gse-fin-wrap {
   margin-top:0!important;
   margin-bottom:0!important;
   padding-bottom:0!important;
   max-width:100%!important;
 }
 body:has(.gse-biz-wrap) .gse-ad-frame>.gse-ad-primary>.gse-ad-inline-slot,
 body:has(.gse-fin-wrap) .gse-ad-frame>.gse-ad-primary>.gse-ad-inline-slot {
   margin-top:0!important;
   margin-bottom:0!important;
 }
}

/* FINAL targeted calculator-only left-column spacing correction.
   Right ad rail, homepage, and other tool categories are deliberately untouched. */
@media (min-width:1121px) {
  body:has(.gse-biz-wrap) .gse-ad-primary,
  body:has(.gse-fin-wrap) .gse-ad-primary { row-gap:15px!important; }
  body:has(.gse-biz-wrap) .gse-ad-primary > *:has(.gse-biz-wrap),
  body:has(.gse-fin-wrap) .gse-ad-primary > *:has(.gse-fin-wrap) {
    margin-bottom:0!important;
    padding-bottom:0!important;
  }
  body:has(.gse-biz-wrap) .gse-ad-primary .gse-biz-wrap,
  body:has(.gse-fin-wrap) .gse-ad-primary .gse-fin-wrap {
    margin-bottom:0!important;
    padding-bottom:0!important;
  }
  body:has(.gse-biz-wrap) .gse-ad-primary > .gse-ad-inline-slot,
  body:has(.gse-fin-wrap) .gse-ad-primary > .gse-ad-inline-slot {
    margin-block:0!important;
  }
}
