/* Yandex RTB placements — StroyKalk v259 */
.site-ad-v259{
  width:min(1180px,calc(100% - 32px));
  margin:34px auto;
  clear:both;
  position:relative;
  z-index:1;
}
.site-ad-v259--embedded{
  width:100%;
  margin:34px 0;
}
.site-ad-v259__label{
  display:block;
  margin:0 0 8px;
  color:#748279;
  font-size:11px;
  font-weight:700;
  line-height:1;
  letter-spacing:.08em;
  text-align:center;
  text-transform:uppercase;
}
.site-ad-v259__frame{
  width:100%;
  min-width:160px;
  min-height:min(45vh,405px);
  max-height:min(50vh,450px);
  border-radius:18px;
  background:#f7faf8;
  overflow:hidden;
  contain:layout paint;
}
.site-ad-v259.is-loading .site-ad-v259__frame::before{
  content:"";
  display:block;
  width:100%;
  min-height:inherit;
  max-height:inherit;
  height:100%;
  border:1px solid #edf3ef;
  border-radius:inherit;
  background:linear-gradient(90deg,#f7faf8 0%,#fbfdfc 50%,#f7faf8 100%);
}
.site-ad-v259.is-rendered .site-ad-v259__frame{
  min-height:0;
  background:transparent;
}
.site-ad-v259.is-empty{display:none!important;}
.site-ad-v259--after-hero{margin-top:28px;margin-bottom:38px;}
@media(max-width:767px){
  .site-ad-v259{width:calc(100% - 24px);margin-top:28px;margin-bottom:30px;}
  .site-ad-v259--embedded{width:100%;margin:30px 0;}
  .site-ad-v259__frame{min-height:min(45vh,324px);max-height:min(50vh,360px);border-radius:14px;}
  .site-ad-v259__label{margin-bottom:7px;font-size:10px;}
}

/* v260: four-position inventory with mobile overflow protection */
.site-ad-v259--content-mid,
.site-ad-v259--before-related,
.site-ad-v259--after-calculator{
  margin-top:38px;
  margin-bottom:38px;
}
.site-ad-v259__frame,
.site-ad-v259__frame > *{
  max-width:100%;
}
@media(max-width:767px){
  .site-ad-v259{
    max-width:calc(100vw - 20px);
    overflow:hidden;
  }
  .site-ad-v259--content-mid,
  .site-ad-v259--before-related,
  .site-ad-v259--after-calculator{
    margin-top:30px;
    margin-bottom:30px;
  }
}

/* v111 — desktop calculator pushed to the right with adaptive left ad rail */
@media (min-width:1200px){
  html.calc-ad-layout-v111,
  html.calc-ad-layout-v111 body{overflow-x:clip!important;}

  html.calc-ad-layout-v111 .calc-ad-shell-v111{
    box-sizing:border-box;
    width:calc(100% - clamp(12px,1.2vw,22px));
    max-width:1840px;
    margin:28px 0 42px auto;
    padding:0;
    display:grid;
    grid-template-columns:minmax(245px,300px) minmax(0,1fr);
    gap:24px;
    align-items:start;
  }

  html.calc-ad-layout-v111 .calc-ad-main-v111{
    min-width:0;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:28px;
    align-content:start;
  }

  html.calc-ad-layout-v111 .calc-ad-primary-v111,
  html.calc-ad-layout-v111 .calc-ad-ledger-carry-v111{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  html.calc-ad-layout-v111 .calc-ad-rail-v111{
    box-sizing:border-box;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:18px;
    align-content:start;
    min-width:0;
  }

  html.calc-ad-layout-v111 .calc-ad-rail-v111 .site-ad-v259{
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    margin:0;
    padding:8px;
    border:1px solid #e2e9e5;
    border-radius:18px;
    background:#fff;
    box-shadow:0 8px 24px rgba(23,42,34,.045);
    overflow:visible;
  }

  html.calc-ad-layout-v111 .calc-ad-rail-v111 .site-ad-v259__label{
    margin:0 0 7px;
    font-size:9px;
    color:#8a968f;
    letter-spacing:.09em;
  }

  html.calc-ad-layout-v111 .calc-ad-rail-v111 .site-ad-v259__frame{
    width:100%;
    min-width:0;
    min-height:240px;
    max-height:none!important;
    border-radius:13px;
    overflow:visible!important;
    contain:layout;
    background:#f7faf8;
  }

  html.calc-ad-layout-v111 .calc-ad-rail-v111 .site-ad-v259.is-rendered .site-ad-v259__frame{
    min-height:0;
    background:transparent;
  }

  html.calc-ad-layout-v111 .site-ad-v259--between-calculator-ledger{
    box-sizing:border-box;
    width:100%;
    max-width:none;
    margin:0!important;
    padding:10px;
    border:1px solid #e2e9e5;
    border-radius:18px;
    background:#fff;
    box-shadow:0 8px 24px rgba(23,42,34,.04);
    overflow:visible;
  }

  html.calc-ad-layout-v111 .site-ad-v259--between-calculator-ledger .site-ad-v259__frame{
    width:100%;
    min-height:180px;
    max-height:380px;
    border-radius:13px;
    overflow:hidden;
    background:#f7faf8;
  }

  html.calc-ad-layout-v111 .site-ad-v259--between-calculator-ledger.is-rendered .site-ad-v259__frame{
    min-height:0;
    background:transparent;
  }
}

/* v138 — deferred mobile depth ads: no blank reservation before eligibility. */
@media(max-width:767px){
  .site-ad-v259.mobile-ad-deferred-v138:not(.is-materialized-v138){
    box-sizing:border-box!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:1px!important;
    min-height:0!important;
    max-height:1px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    overflow:visible!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  .site-ad-v259.mobile-ad-deferred-v138:not(.is-materialized-v138)>.site-ad-v259__label,
  .site-ad-v259.mobile-ad-deferred-v138:not(.is-materialized-v138)>.site-ad-v259__frame{
    display:none!important;
  }
  .site-ad-v259--mobile-density-v138.is-materialized-v138{
    width:calc(100% - 24px);
    margin:30px auto;
    opacity:1;
    pointer-events:auto;
  }
}




/* v796 — compact manual-ad states across calculator/PTO pages.
   Idle/no-fill slots must never create unexplained 300–400 px holes. */
.site-ad-v259:not(.site-ad-v259--left-rail):not(.site-ad-v259--gap):not(.home-central-ad-v806).is-idle{
  min-height:2px!important;max-height:2px!important;margin-top:6px!important;margin-bottom:6px!important;
  padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important;
}
.site-ad-v259:not(.site-ad-v259--left-rail):not(.site-ad-v259--gap):not(.home-central-ad-v806).is-idle>.site-ad-v259__label{display:none!important;}
.site-ad-v259:not(.site-ad-v259--left-rail):not(.site-ad-v259--gap):not(.home-central-ad-v806).is-idle>.site-ad-v259__frame{
  min-height:2px!important;max-height:2px!important;height:2px!important;background:transparent!important;border:0!important;
}
.site-ad-v259:not(.site-ad-v259--left-rail):not(.site-ad-v259--gap):not(.home-central-ad-v806).is-loading{
  min-height:96px!important;max-height:none!important;margin-top:18px!important;margin-bottom:18px!important;
}
.site-ad-v259:not(.site-ad-v259--left-rail):not(.site-ad-v259--gap):not(.home-central-ad-v806).is-loading>.site-ad-v259__frame{min-height:96px!important;max-height:180px!important;}
.site-ad-v259.is-rendered>.site-ad-v259__frame,.site-ad-v259[data-ad-state="filled"]>.site-ad-v259__frame{
  min-height:0!important;max-height:none!important;height:auto!important;background:transparent!important;
}
.site-ad-v259.is-empty{display:none!important;margin:0!important;padding:0!important;min-height:0!important;}
@media(max-width:767px){
  .site-ad-v259:not(.site-ad-v259--left-rail):not(.site-ad-v259--gap):not(.home-central-ad-v806).is-loading{min-height:80px!important;margin-top:14px!important;margin-bottom:14px!important;}
  .site-ad-v259:not(.site-ad-v259--left-rail):not(.site-ad-v259--gap):not(.home-central-ad-v806).is-loading>.site-ad-v259__frame{min-height:80px!important;max-height:150px!important;}
}
