/* Advertising slots use their own aspect ratios and do not affect news cards. */
.ad-carousel{position:relative;width:100%;overflow:hidden;isolation:isolate;background:#e7ebf0;border-radius:6px;aspect-ratio:728/90}
.ad-slot-home_banner{aspect-ratio:1200/180}.ad-slot-sidebar{aspect-ratio:300/250}.ad-slot-article_bottom{aspect-ratio:728/90}
.ad-slides,.ad-slide,.ad-slide-inner,.ad-slide-inner>a,.ad-slide-inner>div{position:absolute;inset:0;width:100%;height:100%}
.ad-slide{opacity:0;pointer-events:none;transition:opacity .35s ease}.ad-slide.is-active{opacity:1;pointer-events:auto;z-index:1}
.ad-slide img{width:100%;height:100%;display:block;object-fit:contain;background:#e9eef3}
.ad-disclosure{position:absolute;z-index:3;top:5px;right:7px;background:#101827b3;color:#fff;font:9px Inter,system-ui,sans-serif;letter-spacing:.08em;padding:3px 5px;border-radius:3px}
.ad-arrow{position:absolute;z-index:4;top:50%;transform:translateY(-50%);border:0;border-radius:50%;background:#101827aa;color:white;font-size:20px;width:30px;height:30px;display:grid;place-items:center;opacity:0;transition:opacity .2s;line-height:1;cursor:pointer}
.ad-prev{left:8px}.ad-next{right:8px}.ad-carousel:hover .ad-arrow,.ad-carousel:focus-within .ad-arrow{opacity:1}
.ad-dots{position:absolute;z-index:4;bottom:6px;left:50%;transform:translateX(-50%);display:flex;gap:5px;background:#10182766;border-radius:12px;padding:4px 7px}
.ad-dot{width:7px;height:7px;border-radius:50%;background:#fff8;border:0;padding:0;cursor:pointer}.ad-dot.is-active{background:#ef3d3c;width:17px;border-radius:8px}
.ad-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:var(--soft,#f7f8fa);color:var(--muted,#77808e);border:1px dashed var(--line,#d8dfe7);width:100%;height:100%;min-height:85px;text-align:center;padding:10px;font-size:13px}.ad-placeholder small{letter-spacing:.15em;font:9px Inter,system-ui,sans-serif}
.header-ad{position:relative;padding:0;overflow:hidden}.header-ad .ad-carousel{border-radius:0;height:100%;aspect-ratio:auto}.header-ad .ad-placeholder{min-height:100%}
.ad-banner-container{padding:0!important;display:block!important;border:0!important;background:transparent!important;min-height:0!important;overflow:hidden}
.sidebar-ad{display:block!important;position:relative!important;background:transparent!important;height:auto!important;aspect-ratio:300/250;overflow:visible!important;padding:0!important}
.sidebar-ad:after{display:none!important}.sidebar-ad .ad-placeholder{height:100%;min-height:0}
.article-ad-slot{margin:36px auto;max-width:728px}.article-ad-slot .ad-placeholder{min-height:95px}
.admin-ad-preview{max-width:728px}.admin-ad-preview.ad-preview-sidebar{max-width:300px}.admin-ad-preview.ad-preview-wide{max-width:100%}
.ad-empty{color:#718096;font-size:13px}.ad-help{font-size:13px;color:#64748b}.ad-image-thumb{width:130px;max-width:100%;height:60px;object-fit:contain;border-radius:5px;background:#e7ebf0}
@media(max-width:800px){.header-ad{display:none}.ad-arrow{opacity:1}.ad-disclosure{font-size:8px}.ad-banner-container{margin-top:18px;margin-bottom:30px}}
@media(prefers-reduced-motion:reduce){.ad-slide{transition:none}}

/* Keep the header advertisement visible on every public page, including phones. */
.site-header .header-ad{display:flex}
@media(max-width:800px){
  .site-header .brand-row{flex-wrap:wrap;column-gap:12px;row-gap:0;padding-top:12px;padding-bottom:14px}
  .site-header .brand-row>.brand{order:0}
  .site-header .brand-row>.header-actions,
  .site-header .brand-row>[data-theme-toggle]{order:1}
  .site-header .brand-row>.header-ad{
    order:2;display:block;width:100%;flex:0 0 100%;max-width:100%;
    height:clamp(68px,19vw,96px);margin-top:13px;
    background:var(--soft,#f7f8fa);
  }
  .site-header .header-ad .ad-carousel{height:100%;width:100%}
  .site-header .header-ad .ad-slide img{object-fit:contain}
  .site-header .header-ad .ad-arrow{width:25px;height:25px;font-size:18px}
}
@media(max-width:540px){
  .site-header .brand-row{min-height:0}
  .site-header .header-ad .ad-disclosure{top:2px;right:3px;font-size:7px}
}

/* Keep the header banner centered in the same position on all public pages. */
@media (min-width:801px){
  .site-header .brand-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,580px) minmax(0,1fr);
    align-items:center;
    column-gap:18px;
  }
  .site-header .brand-row>.brand{justify-self:start;min-width:0}
  .site-header .brand-row>.header-ad{
    justify-self:center;
    width:100%;max-width:580px;
    min-width:0;height:85px;margin:0;
  }
  .site-header .brand-row>.header-actions,
  .site-header .brand-row>[data-theme-toggle]{justify-self:end;margin-left:0!important}
}
@media (min-width:801px) and (max-width:1100px){
  .site-header .brand-row{grid-template-columns:minmax(0,1fr) minmax(0,1.65fr) auto;column-gap:12px}
}
@media (max-width:800px){
  .site-header .brand-row>.header-ad{margin-left:auto;margin-right:auto}
}
