/* Rails: desktop ≥1160 only when a real creative (iframe) is present.
   Mobile top banner: <1160. Bottom: always when filled. */
.page-frame > .ad-rail { display: none; }
.mobile-top-ad{display:none;width:100%;max-width:100%;margin:0;padding:8px 12px;text-align:center;background:#f3f1e7;border-bottom:1px solid rgba(24,59,51,.08);min-height:50px;box-sizing:border-box;overflow:hidden}
.mobile-top-ad .ad-unit{margin:0 auto;display:inline-block;max-width:100%}
.bottom-ad-slot:not(:empty){display:flex;flex-direction:column;align-items:center;gap:22px;max-width:100%;min-height:90px;margin:20px auto;overflow:hidden;text-align:center}
.ad-unit{max-width:100%;line-height:0;overflow:hidden}
.ad-unit iframe{display:block;max-width:100%;border:0}
.ad-rail .ad-unit{width:160px}
.bottom-ad-slot .ad-unit--300x250{width:min(300px,100%);margin-inline:auto}
@media(max-width:1159px){
  .mobile-top-ad:not(:empty){display:block}
  .page-frame > .ad-rail{display:none!important}
}
@media(min-width:1160px){
  /* Default (no ad iframes / adblocked): single centered column, no blank 160px tracks */
  .page-frame{
    width:min(1120px, calc(100% - 40px));
    max-width:1120px;
    margin-inline:auto;
    grid-template-columns:minmax(0, 1fr);
    justify-content:center;
    align-items:start;
    gap:24px;
    padding:0 0 42px;
  }
  .page-frame > .ad-rail{display:none}
  .mobile-top-ad{display:none!important}
  .content-column{width:100%;margin:0;min-width:0}

  /* Real creative present: expand to 3-col with sticky 160px rails */
  .page-frame:has(> .ad-rail iframe){
    width:min(1480px, calc(100% - 40px));
    max-width:1480px;
    grid-template-columns:160px minmax(0, 1fr) 160px;
    padding:0 0 42px;
  }
  .page-frame:has(> .ad-rail iframe) > .ad-rail{
    display:flex;
    justify-content:center;
    align-items:flex-start;
    width:160px;
    max-width:160px;
    min-height:600px;
    position:sticky;
    top:20px;
    overflow:hidden;
    margin-top:120px;
  }
}
