
.dk-ad-slot {
    --ad-ink: var(--color-ink, #101317);
    --ad-muted: var(--color-muted, #64748b);
    --ad-line: var(--color-rule, rgba(0, 89, 138, .14));
    --ad-paper: var(--color-paper, #fff);
    --ad-accent: var(--color-accent, #00598a);
    --ad-radius: 14px;
    position: relative;
    margin: 0 0 1.5rem;
}
.dk-ad-slot.is-lazy:empty { display: none; }
/* A wrapper put around a slot (a grid cell, a column) disappears with an empty slot. */
[data-ad-host]:not(:has(.dk-ad-slot)), [data-ad-host].is-vacant { display: none !important; }
.course--sponsored .dk-ad-slot, .home-ad { margin-bottom: 0; }
.home-ad { margin-top: 2rem; }
.dk-ad-unit[hidden] { display: none !important; }
.dk-ad-unit {
    overflow: hidden;
    border: 1px solid var(--ad-line);
    border-radius: var(--ad-radius);
    background: var(--ad-paper);
    animation: dk-ad-in .3s ease-out;
}
@keyframes dk-ad-in { from { opacity: 0; } }

.dk-ad-top {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2rem;
    padding: .375rem .75rem;
    border-bottom: 1px solid var(--ad-line);
    font-size: .6875rem;
    line-height: 1.2;
}
.dk-ad-label {
    padding: .125rem .4rem;
    border-radius: 4px;
    background: rgba(100, 116, 139, .12);
    color: var(--ad-muted);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.dk-ad-brand-name { min-width: 0; overflow: hidden; color: var(--ad-muted); text-overflow: ellipsis; white-space: nowrap; }
.dk-ad-dismiss {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ad-muted);
    cursor: pointer;
}
.dk-ad-dismiss:hover, .dk-ad-dismiss:focus-visible { background: rgba(100, 116, 139, .14); color: var(--ad-ink); outline: none; }

.dk-ad-slot a, .dk-ad-slot a:hover { text-decoration: none !important; }
.dk-ad-slot img { max-width: 100%; margin: 0 !important; border-radius: 0; box-shadow: none; }
.dk-ad-slot .dk-ad-brand img { border-radius: 6px; }
.prose .dk-ad-slot, .dp-prose .dk-ad-slot { font-size: 1rem; line-height: 1.5; }
.prose .dk-ad-slot :where(span, a) { font-weight: inherit; }

.dk-ad-banner { display: block; line-height: 0; }
.dk-ad-banner img { display: block; width: 100%; height: auto; }

.dk-ad-native { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.dk-ad-native:hover, .dk-ad-native:focus-visible { color: inherit; text-decoration: none; outline: none; }
.dk-ad-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: rgba(100, 116, 139, .08); }
.dk-ad-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.dk-ad-native:hover .dk-ad-media img { transform: scale(1.02); }
.dk-ad-copy { display: flex; flex-direction: column; gap: .375rem; padding: .875rem 1rem 1rem; }
.dk-ad-brand { display: flex; align-items: center; gap: .5rem; color: var(--ad-muted); font-size: .75rem; font-weight: 600; }
.dk-ad-brand img { width: 1.5rem; height: 1.5rem; border-radius: 6px; object-fit: contain; background: #fff; }
.dk-ad-headline { color: var(--ad-ink); font-size: 1.0625rem; font-weight: 800; line-height: 1.3; }
.dk-ad-native:hover .dk-ad-headline { color: var(--ad-accent); }
.dk-ad-body { color: var(--ad-muted); font-size: .875rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dk-ad-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .375rem; }
.dk-ad-cta {
    display: inline-flex;
    align-items: center;
    padding: .5rem .875rem;
    border-radius: 999px;
    background: var(--ad-accent);
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
}
.dk-ad-domain { min-width: 0; overflow: hidden; color: var(--ad-muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }

.dk-ad--native_inline { margin: 2rem 0; }
@media (min-width: 640px) {
    .dk-ad--native_inline .dk-ad-native { flex-direction: row; }
    .dk-ad--native_inline .dk-ad-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 11rem; }
    .dk-ad--native_inline .dk-ad-copy { justify-content: center; }
}

@media (min-width: 768px) {
    .dk-ad--billboard .dk-ad-native { flex-direction: row; }
    .dk-ad--billboard .dk-ad-media { flex: 0 0 46%; aspect-ratio: 16 / 7; }
    .dk-ad--billboard .dk-ad-copy { justify-content: center; padding: 1.25rem 1.5rem; }
    .dk-ad--billboard .dk-ad-headline { font-size: 1.375rem; }
}

.dk-ad--half_page .dk-ad-unit { height: 100%; }
.dk-ad--half_page .dk-ad-media { aspect-ratio: 1 / 1; }

.dk-ad--medium_rectangle .dk-ad-media, .dk-ad--sidebar_panel .dk-ad-media { aspect-ratio: 6 / 5; }

.dk-ad-frame { display: block; width: 100%; min-height: 250px; border: 0; }

.dk-ad-dots { display: flex; justify-content: center; gap: .375rem; margin-top: .5rem; }
.dk-ad-dot { width: .5rem; height: .5rem; padding: 0; border: 0; border-radius: 999px; background: rgba(100, 116, 139, .35); cursor: pointer; }
.dk-ad-dot.is-active { width: 1.25rem; background: var(--ad-accent); }

.dk-ad-slot.is-fallback img { display: block; width: 100%; height: auto; border-radius: var(--ad-radius); }

/* Panel pages: match the dk-card look */
.dk-ad--panel { --ad-radius: 1rem; }

@media (prefers-reduced-motion: reduce) {
    .dk-ad-unit { animation: none; }
    .dk-ad-media img { transition: none; }
}
@media (prefers-color-scheme: dark) {
    html[data-theme="dark"] .dk-ad-slot { --ad-paper: #111827; --ad-ink: #f1f5f9; --ad-line: rgba(148, 163, 184, .25); }
}
