/* Ad System Styles */
.ad-slot { margin: 24px 0;margin-inline:auto; text-align: center; position: relative; }
.ad-slot:empty { margin:0px;padding:0px; }
.piplix-home-ad-rail { width:100%; display:grid; place-items:center; padding:26px 16px; }
.piplix-home-ad-rail:empty{padding:0px !important;}
.piplix-home-ad-rail .ad-slot { width:min(970px, 100%); max-width:970px; margin:0; }
.ad-slot-banner { max-width:970px; }
.ad-slot-banner { text-align: left;margin-inline:auto; }
.ad-slot-banner .ad-direct,
.ad-slot-banner .ad-self-promo,
.ad-slot-banner .ad-html-creative { width: 100%; max-width: 100%; box-sizing: border-box; }
.ad-slot-banner .ad-html-creative > div,
.ad-slot-banner .ad-html-creative > * { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
.ad-label { position: absolute; top: -8px; right: 8px; font-size: 10px; color: #9CA3AF; text-transform: uppercase; letter-spacing: 0.5px; background: #fff; padding: 0 4px; }
.ad-disclaimer { font-size: 11px; color: #9CA3AF; margin-top: 4px; text-align: center; }
.ad-direct img { max-width: 100%; height: auto; border-radius: 8px; }
.ad-adsense { min-height: 90px; display: flex; align-items: center; justify-content: center; }

/* Self-promotion cards */
.ad-self-promo { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: linear-gradient(135deg, #F0FAFA 0%, #F8FAFC 100%); border: 1px solid #E2E8F0; border-radius: 12px; }
.ad-slot .ad-self-promo.piplix-house-ad-shell { display:block; width:100%; max-width:960px; margin:0 auto; padding:0; overflow:hidden; background:#07111f; border:0; border-radius:18px; text-align:left; }
.piplix-house-ad { position:relative; isolation:isolate; display:flex; align-items:center; min-height:154px; overflow:hidden; padding:24px 36px; background:#07111f; }
.piplix-house-ad::after { position:absolute; z-index:1; inset:0; content:""; pointer-events:none; background:linear-gradient(90deg,rgba(7,17,31,1) 0%,rgba(7,17,31,.98) 43%,rgba(7,17,31,.48) 69%,rgba(7,17,31,.08) 100%); }
.piplix-house-ad__copy { position:relative; z-index:2; display:flex; flex:1 1 57%; flex-direction:column; align-items:flex-start; gap:7px; max-width:510px; color:#fff; }
.piplix-house-ad__eyebrow { color:#f9a43a; font-size:10px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.piplix-house-ad__copy strong { font-size:clamp(19px,2.15vw,27px); line-height:1.15; letter-spacing:-.025em; }
.piplix-house-ad__copy > span:not(.piplix-house-ad__eyebrow) { color:#bdc9d8; font-size:14px; line-height:1.42; }
.piplix-house-ad__cta { display:inline-flex; align-items:center; min-height:35px; margin-top:4px; padding:7px 14px; border:1px solid #fb9b28; border-radius:999px; background:#fb9b28; color:#101b2b; font-size:12px; font-weight:800; text-decoration:none; }
.piplix-house-ad__cta:hover { background:#ffb34d; border-color:#ffb34d; color:#07111f; }
.piplix-house-ad__art { position:absolute; z-index:0; top:50%; right:0; width:54%; height:100%; object-fit:cover; object-position:right center; transform:translateY(-50%); }
.ad-slot .piplix-house-ad-shell .ad-label { z-index:3; top:10px; right:12px; color:#f9a43a; background:rgba(7,17,31,.78); border:1px solid rgba(249,164,58,.35); border-radius:999px; padding:3px 7px; }
.ad-slot-rect .ad-self-promo.piplix-house-ad-shell { max-width:300px; border-radius:16px; }
.ad-slot-rect .piplix-house-ad { min-height:250px; padding:18px; align-items:flex-end; }
.ad-slot-rect .piplix-house-ad::after { background:linear-gradient(180deg,rgba(7,17,31,.05) 0%,rgba(7,17,31,.82) 48%,rgba(7,17,31,1) 100%); }
.ad-slot-rect .piplix-house-ad__copy { max-width:100%; gap:5px; }
.ad-slot-rect .piplix-house-ad__copy strong { font-size:19px; }
.ad-slot-rect .piplix-house-ad__copy > span:not(.piplix-house-ad__eyebrow) { font-size:12px; }
.ad-slot-rect .piplix-house-ad__art { width:100%; height:100%; top:0; transform:none; object-position:70% top; }
/* News products use one compact horizontal house banner. */
.ad-slot-week-ahead-sidebar,.ad-slot-story-listing-feed{width:min(970px,100%)}
.ad-slot-week-ahead-sidebar .ad-self-promo.piplix-house-ad-shell,.ad-slot-story-listing-feed .ad-self-promo.piplix-house-ad-shell{max-width:970px;border-radius:14px;box-shadow:0 8px 24px rgba(7,17,31,.12)}
.ad-slot-week-ahead-sidebar .piplix-house-ad,.ad-slot-story-listing-feed .piplix-house-ad{min-height:104px;padding:16px 26px}
.ad-slot-week-ahead-sidebar .piplix-house-ad__copy,.ad-slot-story-listing-feed .piplix-house-ad__copy{gap:4px}
.ad-slot-week-ahead-sidebar .piplix-house-ad__copy strong,.ad-slot-story-listing-feed .piplix-house-ad__copy strong{font-size:20px}
.ad-slot-week-ahead-sidebar .piplix-house-ad__copy>span:not(.piplix-house-ad__eyebrow),.ad-slot-story-listing-feed .piplix-house-ad__copy>span:not(.piplix-house-ad__eyebrow){font-size:12px}
.ad-slot-week-ahead-sidebar .piplix-house-ad__art,.ad-slot-story-listing-feed .piplix-house-ad__art{width:48%}
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad-shell { max-width:none; border-radius:0; }
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad { min-height:62px; padding:7px 42px 7px 12px; border-radius:0; }
.ad-slot[data-placement="mobile_sticky"] .ad-label { display:none; }
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad__art,
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad__eyebrow,
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad__copy > span:not(.piplix-house-ad__eyebrow) { display:none; }
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad__copy { display:flex; flex:1; flex-direction:row; align-items:center; justify-content:space-between; max-width:none; gap:10px; }
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad__copy { min-width:0; }
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad__copy strong { flex:1 1 auto; min-width:0; max-width:138px; font-size:12px; line-height:1.18; }
.ad-slot[data-placement="mobile_sticky"] .piplix-house-ad__cta { flex:0 0 auto; min-height:34px; max-width:78px; margin:0; padding:5px 9px; font-size:11px; line-height:1.1; text-align:center; }
.ad-slot[data-placement="mobile_sticky"] .ad-close { position:absolute; z-index:10; top:50%; right:6px; display:grid; width:30px; height:30px; padding:0; place-items:center; transform:translateY(-50%); border:1px solid rgba(255,255,255,.3); border-radius:50%; background:#fff; color:#182433; font-size:20px; line-height:1; box-shadow:0 2px 10px rgba(0,0,0,.22); cursor:pointer; }
.ad-slot[data-placement="mobile_sticky"] .ad-close:hover { background:#f9a43a; color:#07111f; }
.ad-slot[data-placement="mobile_sticky"] .ad-close:focus-visible { outline:3px solid #f9a43a; outline-offset:2px; }
.promo-icon { font-size: 28px; flex-shrink: 0; }
.promo-content { flex: 1; }
.promo-title { font-size: 15px; font-weight: 600; color: #1F2937; margin: 0; }
.promo-subtitle { font-size: 13px; color: #6B7280; margin: 4px 0 0; }
.promo-cta { padding: 8px 20px; background: #00A896; color: #fff; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.promo-cta:hover { background: #009688; color: #fff; }
.promo-upgrade { background: linear-gradient(135deg, #FFF7ED, #FFFBF0); border-color: #F0A500; }

/* Financial disclaimer */
.financial-disclaimer { font-size: 12px; color: #9CA3AF; max-width: 900px; margin: 0 auto; padding: 24px; border-top: 1px solid #E5E7EB; line-height: 1.6; }

@media (max-width: 768px) {
    .ad-self-promo { flex-direction: column; text-align: center; }
    .ad-slot-banner .piplix-house-ad-shell { max-width:100%; border-radius:14px; }
    .piplix-house-ad { min-height:245px; padding:19px; align-items:flex-end; }
    .piplix-house-ad::after { background:linear-gradient(180deg,rgba(7,17,31,.06) 0%,rgba(7,17,31,.78) 45%,rgba(7,17,31,1) 100%); }
    .piplix-house-ad__copy { max-width:100%; }
    .piplix-house-ad__copy strong { font-size:22px; }
    .piplix-house-ad__art { width:100%; height:100%; top:0; transform:none; object-position:70% top; }
    /* The public homepage placement is a short mobile banner, not a squeezed desktop card. */
    .piplix-home-ad-rail { padding:14px 16px 18px; }
    .piplix-home-ad-rail .piplix-house-ad { min-height:180px; padding:17px; align-items:center; }
    .piplix-home-ad-rail .piplix-house-ad::after { background:linear-gradient(90deg,rgba(7,17,31,1) 0%,rgba(7,17,31,.96) 49%,rgba(7,17,31,.38) 77%,rgba(7,17,31,.08) 100%); }
    .piplix-home-ad-rail .piplix-house-ad__copy { max-width:66%; gap:5px; text-align:left; }
    .piplix-home-ad-rail .piplix-house-ad__copy strong { font-size:18px; line-height:1.14; }
    .piplix-home-ad-rail .piplix-house-ad__copy > span:not(.piplix-house-ad__eyebrow) { font-size:11px; line-height:1.34; }
    .piplix-home-ad-rail .piplix-house-ad__cta { align-self:flex-start; min-height:31px; padding:5px 10px; font-size:11px; }
    .piplix-home-ad-rail .piplix-house-ad__art { width:62%; height:100%; top:50%; transform:translateY(-50%); object-position:right center; }
}
