.ad-slot {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-height: 90px;
    margin: 18px 0;
    border: 1px dashed #c9dcd9;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbfefd, #f4faf8);
    color: #83969b;
    overflow: hidden;
}

.ad-slot-media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-height: inherit;
    aspect-ratio: var(--ad-ratio, 970 / 90);
    max-height: 250px;
    text-align: center;
}

.ad-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    min-height: inherit;
    padding: 10px;
}

.ad-slot-grid .ad-slot-media {
    min-width: 0;
    border-radius: 10px;
    overflow: hidden;
}
.ad-slot-label {
    color: #58777b;
    font-size: 11px;
    font-weight: 800;
}

.ad-slot-media small {
    color: #93a5a8;
    font-size: 9px;
}

.ad-slot-live { position: relative; padding: 0; background: #fff; }
.ad-slot-live img { display: block; width: 100%; height: 100%; max-height: inherit; object-fit: cover; }
.ad-slot-live a { display: block; width: 100%; height: 100%; }
.ad-slot-sponsor { position: absolute; right: 8px; bottom: 6px; padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.86); color: #536b70; font-size: 9px; }

.ad-slot-homepage-top,
.ad-slot-market-inline {
    min-height: 90px;
}

.ad-slot-homepage-bottom {
    min-height: 180px;
}

.ad-slot-market-asset-sidebar {
    min-height: 250px;
}

@media (max-width: 700px) {
    .ad-slot {
        margin: 14px 0;
    }

    .ad-slot-homepage-top,
    .ad-slot-market-inline {
        min-height: 64px;
    }

    .ad-slot-homepage-bottom {
        min-height: 110px;
    }

    .ad-slot-market-asset-sidebar {
        min-height: 180px;
    }

    .ad-slot-media {
        max-height: 180px;
    }
}

/* Compact portal-style inventory: ads support the content instead of pushing it below the fold. */
.ad-slot { min-height: 64px; margin: 10px 0; border-radius: 8px; background: #fff; }
.ad-slot-media { min-height: inherit; max-height: 120px; aspect-ratio: 970 / 70; }
.ad-slot-grid { gap: 6px; padding: 6px; }
.ad-slot-grid .ad-slot-media { border-radius: 6px; }
.ad-slot-homepage-hero { min-height: 96px; }
.ad-slot-homepage-top, .ad-slot-market-top, .ad-slot-market-inline { min-height: 70px; }
.ad-slot-homepage-tools, .ad-slot-homepage-bottom { min-height: 100px; }
.ad-slot-article-inline { min-height: 70px; }
.ad-slot-market-asset-sidebar { min-height: 180px; }
.ad-slot-sponsor { right: 5px; bottom: 4px; font-size: 8px; }
@media (max-width: 700px) {
  .ad-slot { margin: 8px 0; min-height: 56px; }
  .ad-slot-homepage-hero { min-height: 72px; }
  .ad-slot-homepage-top, .ad-slot-market-top, .ad-slot-market-inline, .ad-slot-article-inline { min-height: 56px; }
  .ad-slot-homepage-tools, .ad-slot-homepage-bottom { min-height: 76px; }
  .ad-slot-market-asset-sidebar { min-height: 140px; }
}

/* Keep every placement bounded: oversized creative dimensions must never size the slot. */
.ad-slot { box-sizing: border-box; height: 70px; min-height: 0; }
.ad-slot-homepage-hero { height: 96px; }
.ad-slot-homepage-top, .ad-slot-market-top, .ad-slot-market-inline, .ad-slot-article-inline { height: 70px; }
.ad-slot-homepage-tools, .ad-slot-homepage-bottom { height: 100px; }
.ad-slot-market-asset-sidebar { height: 180px; }
.ad-slot-grid { box-sizing: border-box; height: 100%; min-height: 0; grid-auto-rows: minmax(0, 1fr); overflow: hidden; }
.ad-slot-grid .ad-slot-media { box-sizing: border-box; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; }
.ad-slot-live { min-width: 0; overflow: hidden; }
.ad-slot-live > a, .ad-slot-live > img { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.ad-slot-live > img { object-fit: cover; }
.ad-slot-live > a img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; }
@media (max-width: 700px) {
  .ad-slot { height: 56px; min-height: 0; }
  .ad-slot-homepage-hero { height: 72px; }
  .ad-slot-homepage-tools, .ad-slot-homepage-bottom { height: 76px; }
  .ad-slot-market-asset-sidebar { height: 140px; }
  .ad-slot-homepage-top, .ad-slot-market-top, .ad-slot-market-inline, .ad-slot-article-inline { height: 56px; }
}
