/* ═══════════════════════════════════════════════════════════════
   AI Updates — Component Styles
   Uses design tokens from tokens.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── Pulse Badge (live indicator) ────────────────────────── */
.ai-pulse-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    font-weight: 500;
}

.ai-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22d3ee;
    animation: ai-pulse 2s ease-in-out infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 211, 238, 0); }
}

/* ── Digest Banner (glass card) ──────────────────────────── */
.ai-digest-banner {
    max-width: 650px;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    margin-top: 1.5rem;
}

/* ── Trending Bar ────────────────────────────────────────── */
.ai-trending-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: thin;
}

.ai-trending-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pill-color, #6366f1) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--pill-color, #6366f1) 25%, transparent);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.ai-trending-pill:hover {
    background: color-mix(in srgb, var(--pill-color, #6366f1) 18%, transparent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.ai-trend-score {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: var(--pill-color, #6366f1);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.ai-trend-delta {
    font-size: 0.72rem;
    font-weight: 700;
}

.ai-trend-delta.up { color: #22c55e; }
.ai-trend-delta.down { color: #ef4444; }

/* ── Featured Card ───────────────────────────────────────── */

/* Hero section — extend bottom so dark bg breaks near digest card middle */
.ai-hero-section {
    padding-bottom: 10rem;
}

.ai-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(91, 45, 142, 0.1);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.ai-featured-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(91, 45, 142, 0.15),
        0 0 100px rgba(26, 107, 122, 0.08);
}

/* Overlapping variant — sits at the bottom of the hero, poking below */
.ai-featured-overlap {
    position: relative;
    z-index: 3;
    margin-bottom: -10rem;
}

/* Spacer below the hero that accounts for the overlap */
.ai-digest-spacer {
    height: 10rem;
}

.ai-featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

.ai-featured-image {
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.ai-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.ai-featured-card:hover .ai-featured-image img {
    transform: scale(1.05);
}

/* Gradient overlay on the image for depth + glow bleed */
.ai-featured-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.7) 0%,
        rgba(15, 23, 42, 0.1) 40%,
        transparent 70%
    );
    pointer-events: none;
}

/* Bottom-edge glow accent under the card */
.ai-featured-overlap::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 10%;
    right: 10%;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(91, 45, 142, 0.25), transparent 70%);
    filter: blur(8px);
    pointer-events: none;
}

.ai-featured-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 4rem;
}

/* ── Digest CTA row — button container ────────────────────── */
.ai-digest-cta-row {
    display: flex;
}

.ai-news-tabs {
    gap: 0.5rem;
}

.ai-news-tabs .nav-link {
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    background: var(--surface-raised);
}

.ai-news-tabs .nav-link.active {
    border-color: color-mix(in srgb, var(--brand-primary) 55%, transparent);
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
}

.ai-video-poster {
    position: relative;
}

.ai-video-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center calc(50% + 80px);
}

.ai-video-play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.ai-video-card:hover .ai-video-play-badge {
    background: var(--brand-accent);
}

@media (max-width: 767.98px) {
    .ai-hero-section {
        padding-bottom: 6rem;
    }

    .ai-featured-card {
        grid-template-columns: 1fr;
    }

    .ai-featured-image {
        min-height: 180px;
        order: -1;
    }

    .ai-featured-content {
        padding: 1rem 1.25rem 1.25rem;
    }

    .ai-featured-content h2 {
        font-size: 1.1rem;
        line-height: 1.35;
        margin-bottom: 0.5rem;
    }

    .ai-featured-content p {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    .ai-featured-content .badge {
        font-size: 0.65rem;
    }

    .ai-featured-content .small {
        font-size: 0.75rem;
    }

    .ai-featured-content .btn-sm {
        font-size: 0.78rem;
        padding: 0.35rem 0.8rem;
    }

    .ai-featured-overlap {
        margin-bottom: -6rem;
    }

    .ai-digest-spacer {
        height: 4rem;
    }

    .ai-digest-cta-row {
        display: flex;
    }

    .ai-digest-read-btn {
        width: 100%;
        text-align: center;
    }
}

/* ── Badges ──────────────────────────────────────────────── */
.ai-badge-featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.ai-badge-topic {
    background: color-mix(in srgb, var(--topic-color, #6366f1) 15%, transparent);
    color: var(--topic-color, #6366f1);
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--topic-color, #6366f1) 30%, transparent);
    line-height: 1;
    padding: 0.45rem 0.75rem;
}

.ai-news-badge-row .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 1.55rem;
    line-height: 1;
    padding: 0.28rem 0.78rem;
    vertical-align: middle;
}

/* ── Content Origin Badges ───────────────────────────────── */
.ai-badge-origin-aigenerated {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-size: 0.7rem;
    font-weight: 600;
}

.ai-heidi-badge {
    --heidi-avatar-size: 2.25rem;
    --heidi-avatar-overlap: 0.9rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    overflow: visible;
    background: rgba(99, 102, 241, 0.12);
    color: #b8bbff;
    border: 1px solid rgba(99, 102, 241, 0.45);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.32rem 0.78rem 0.32rem calc(var(--heidi-avatar-size) - var(--heidi-avatar-overlap) + 0.45rem);
    isolation: isolate;
}

.ai-heidi-avatar {
    width: var(--heidi-avatar-size, 1.625rem);
    height: var(--heidi-avatar-size, 1.625rem);
    position: absolute;
    left: calc(-1 * var(--heidi-avatar-overlap));
    top: 50%;
    transform: translateY(-50%);
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.75), 0 2px 10px rgba(91, 45, 142, 0.35);
    z-index: 1;
}

.ai-heidi-badge--sm {
    --heidi-avatar-size: 1.9rem;
    --heidi-avatar-overlap: 0.7rem;
    min-height: 1.55rem;
    font-size: 0.68rem;
    padding: 0.24rem 0.58rem 0.24rem calc(var(--heidi-avatar-size) - var(--heidi-avatar-overlap) + 0.34rem);
}

.ai-heidi-badge--lg {
    --heidi-avatar-size: 2.5rem;
    --heidi-avatar-overlap: 1rem;
    min-height: 2.05rem;
    font-size: 0.86rem;
    padding: 0.38rem 0.88rem 0.38rem calc(var(--heidi-avatar-size) - var(--heidi-avatar-overlap) + 0.5rem);
}

.ai-heidi-badge--footer {
    flex-shrink: 0;
}

.ai-sentiment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 1.55rem;
    line-height: 1;
    padding: 0.28rem 0.78rem 0.28rem 0.52rem;
    vertical-align: middle;
}

.ai-sentiment-badge .bi {
    font-size: 1.05rem;
    line-height: 1;
}

.ai-article-hero-badges {
    align-items: center;
}

.ai-search-term-badge,
.ai-content-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: 0.28rem 0.78rem;
    line-height: 1;
    vertical-align: middle;
}

.ai-search-term-badge {
    background: color-mix(in srgb, var(--topic-color, #6366f1) 15%, transparent);
    color: var(--topic-color, #6366f1);
    border: 1px solid color-mix(in srgb, var(--topic-color, #6366f1) 35%, transparent);
    font-size: 0.78rem;
    font-weight: 700;
}

.ai-search-term-badge:hover {
    color: var(--topic-color, #6366f1);
    border-color: color-mix(in srgb, var(--topic-color, #6366f1) 55%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--topic-color, #6366f1) 20%, transparent);
}

.ai-content-type-badge {
    background: rgba(148, 163, 184, 0.22);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.28);
    font-size: 0.78rem;
    font-weight: 700;
}

.ai-heidi-bio-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem 1rem 1.45rem;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.24);
}

.ai-heidi-badge--bio {
    flex-shrink: 0;
}

.ai-heidi-bio-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

@media (max-width: 575.98px) {
    .ai-heidi-bio-card {
        align-items: flex-start;
        flex-direction: column;
        padding-left: 1rem;
    }
}

.ai-badge-origin-humanauthored {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
    font-size: 0.7rem;
    font-weight: 600;
}

.ai-badge-origin-aiassisted {
    background: rgba(168, 85, 247, 0.12);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.25);
    font-size: 0.7rem;
    font-weight: 600;
}

.ai-badge-origin-curated {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-size: 0.7rem;
    font-weight: 600;
}

.ai-badge-origin-imported {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.25);
    font-size: 0.7rem;
    font-weight: 600;
}

.ai-badge-origin-system {
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ── Topic Chips ─────────────────────────────────────────── */
.ai-topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--chip-color, #6366f1) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--chip-color, #6366f1) 20%, transparent);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.ai-topic-chip:hover {
    background: color-mix(in srgb, var(--chip-color, #6366f1) 15%, transparent);
    color: var(--text-primary);
}

.ai-topic-count {
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--chip-color, #6366f1) 20%, transparent);
    font-size: 0.68rem;
    font-weight: 700;
}

/* ── Article Card ────────────────────────────────────────── */
.ai-article-card {
    position: relative;
    background: var(--surface-raised) !important;
    border: 1px solid var(--surface-border) !important;
    border-radius: 16px !important;
    display: flex;
    flex-direction: column;
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
    /* No overflow:hidden — required so ::before border can extend outside */
}

/* Rotating gradient border on hover — matches hscroll-card / payment-card */
.ai-article-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--glow-angle), #5B2D8E, #1A6B7A, #a78bfa, #22d3ee, #5B2D8E);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    z-index: 0;
    animation: glow-border-spin 3s linear infinite;
}

.ai-article-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: var(--surface-raised);
    z-index: 0;
}

.ai-article-card > * {
    position: relative;
    z-index: 1;
}

/* Neutralize Bootstrap card-body/card-footer inside custom card */
.ai-article-card .card-body {
    flex: 1;
    padding: 1rem 1.25rem 0.75rem !important;
    background: transparent !important;
    position: relative;
    z-index: 1;
}

.ai-article-card .card-footer {
    padding: 0.6rem 1.25rem 1rem !important;
    border-top: 1px solid var(--surface-border) !important;
    background: transparent !important;
    position: relative;
    z-index: 1;
    border-radius: 0 0 14px 14px;
}

.ai-article-card:hover::before {
    opacity: 1;
}

.ai-article-card:hover {
    transform: translateY(-4px);
    border-color: transparent !important;
    box-shadow: 0 0 20px rgba(91, 45, 142, 0.3), 0 0 40px rgba(26, 107, 122, 0.15);
}

.ai-card-image {
    overflow: hidden;
    /* Match card inner radius: 16px card - 1px border = 15px inner top corners */
    border-radius: 15px 15px 0 0;
    max-height: 200px;
    position: relative;
    z-index: 1;
}

.ai-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--duration-normal) var(--ease-out);
}

.ai-article-card:hover .ai-card-image img {
    transform: scale(1.05);
}

/* ── Dark Card Variant ───────────────────────────────────── */
.ai-card-dark {
    position: relative;
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}

/* Rotating gradient border on hover — matches ai-article-card */
.ai-card-dark::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--glow-angle), #5B2D8E, #1A6B7A, #a78bfa, #22d3ee, #5B2D8E);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
    z-index: 0;
    animation: glow-border-spin 3s linear infinite;
}

.ai-card-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 0;
}

.ai-card-dark > * {
    position: relative;
    z-index: 1;
}

.ai-card-dark:hover::before {
    opacity: 1;
}

.ai-card-dark:hover {
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(91, 45, 142, 0.3), 0 0 40px rgba(26, 107, 122, 0.15);
}

/* ── Video Card Overlay ──────────────────────────────────── */
.ai-video-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    border-radius: 12px;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    transition: opacity var(--duration-fast) var(--ease-out);
}

.ai-card-dark:hover .ai-video-card-overlay {
    opacity: 0.8;
}

/* ── Topic Gradient Placeholder ──────────────────────────── */
.ai-topic-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--placeholder-color, #6366f1) 25%, #0f172a),
        color-mix(in srgb, var(--placeholder-color, #6366f1) 60%, #1e293b),
        color-mix(in srgb, var(--placeholder-color, #6366f1) 20%, #0f172a));
    position: relative;
    overflow: hidden;
}

.ai-topic-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%,
        color-mix(in srgb, var(--placeholder-color, #6366f1) 15%, transparent),
        transparent 70%);
}

.ai-topic-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.25);
    position: relative;
    z-index: 1;
}

.ai-card-image .ai-topic-placeholder {
    height: 200px;
    border-radius: 12px 12px 0 0;
}

.ai-featured-image .ai-topic-placeholder {
    height: 100%;
    min-height: 250px;
    border-radius: 12px;
}

.ai-card-dark .ai-topic-placeholder {
    border-radius: 12px;
    height: 180px;
    margin-bottom: 0.75rem;
}

.ai-topic-placeholder--hero {
    height: 350px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.ai-topic-placeholder--hero i {
    font-size: 5rem;
}

/* ── Article Content Typography ──────────────────────────── */
.ai-article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.ai-article-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.ai-article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--brand-accent);
    background: var(--surface-muted);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.ai-article-content code {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: var(--surface-muted);
    font-size: 0.88em;
    font-family: var(--font-mono);
}

.ai-article-content ul,
.ai-article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.ai-article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* ── Source Card ──────────────────────────────────────────── */
.ai-source-card {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(91, 45, 142, 0.07);
    border: 1px solid rgba(91, 45, 142, 0.25);
    border-left: 3px solid var(--brand-accent);
}

/* ── Search Bar ──────────────────────────────────────────── */
.ai-search-bar .input-group {
    border-radius: 16px;
    overflow: hidden;
}

.ai-search-bar .form-control:focus {
    box-shadow: 0 0 0 3px rgba(91, 45, 142, 0.25);
    border-color: var(--brand-accent);
}

/* ── Filter Chips ────────────────────────────────────────── */
.ai-filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
    overflow: hidden;
}

.ai-filter-chip::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--glow-angle), #5B2D8E, #1A6B7A, #a78bfa, #22d3ee, #5B2D8E);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
    z-index: 0;
    animation: glow-border-spin 3s linear infinite;
}

.ai-filter-chip::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: calc(999px - 2px);
    background: var(--surface-bg);
    z-index: 0;
}

.ai-filter-chip > * {
    position: relative;
    z-index: 1;
}

.ai-filter-chip span, .ai-filter-chip i {
    position: relative;
    z-index: 1;
}

.ai-filter-chip:hover::before {
    opacity: 1;
}

.ai-filter-chip:hover {
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(91, 45, 142, 0.25);
    transform: translateY(-1px);
}

.ai-filter-chip.active {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
}

.ai-filter-chip.active::before,
.ai-filter-chip.active::after {
    display: none;
}

/* ── Article Tag Pills ───────────────────────────────────── */
.ai-tag-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-accent) 30%, transparent);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
    overflow: hidden;
}

.ai-tag-pill::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--glow-angle), #5B2D8E, #1A6B7A, #a78bfa, #22d3ee, #5B2D8E);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
    z-index: 0;
    animation: glow-border-spin 3s linear infinite;
}

.ai-tag-pill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: calc(999px - 2px);
    background: var(--surface-bg);
    z-index: 0;
}

.ai-tag-pill span {
    position: relative;
    z-index: 1;
}

.ai-tag-pill:hover::before {
    opacity: 1;
}

.ai-tag-pill:hover {
    border-color: transparent;
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(91, 45, 142, 0.2);
}

/* ── Share Buttons ────────────────────────────────────────── */
.ai-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    text-decoration: none;
    transition: transform var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
    cursor: pointer;
}

.ai-share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.ai-share-btn--x:hover     { background: #000;     border-color: #000; }
.ai-share-btn--linkedin:hover { background: #0A66C2; border-color: #0A66C2; }
.ai-share-btn--reddit:hover   { background: #FF4500; border-color: #FF4500; }
.ai-share-btn--instagram:hover { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); border-color: transparent; }
.ai-share-btn--tiktok:hover   { background: #000; border-color: #000; color: #fff; }

.ai-share-btn--copy:hover  { background: var(--brand-accent); border-color: var(--brand-accent); }

/* ── CTA Card ────────────────────────────────────────────── */
.ai-cta-card {
    padding: 3rem 2rem;
    border-radius: 20px;
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

/* ── Article Filters Layout ───────────────────────────────── */
.ai-news-search-row {
    max-width: 100%;
}

/* ── Clear Button — high-contrast purple for dark surfaces ── */
.ai-clear-btn {
    color: #c084fc !important;
    font-weight: 600;
    opacity: 1;
    transition: color var(--duration-fast, 0.15s) ease;
}

.ai-clear-btn:hover,
.ai-clear-btn:focus {
    color: #e9d5ff !important;
    text-decoration: underline !important;
}

.ai-news-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ai-news-date-input {
    max-width: 180px;
}

@media (max-width: 767.98px) {
    .ai-news-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ai-news-date-filters {
        flex-wrap: wrap;
    }

    .ai-news-date-input {
        max-width: none;
        flex: 1 1 0;
        min-width: 0;
    }
}

/* ── Pager Bar (matches admin grid pager) ────────────────── */
.ai-news-pager-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
}

.ai-news-pager .page-link {
    background: transparent;
    border-color: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
    transition: all 0.15s ease;
}

.ai-news-pager .page-link:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    color: #e9d5ff;
}

.ai-news-pager .page-item.active .page-link {
    background: rgba(139, 92, 246, 0.6);
    border-color: rgba(139, 92, 246, 0.7);
    color: #fff;
}

.ai-news-pager .page-item.disabled .page-link {
    background: transparent;
    border-color: rgba(139, 92, 246, 0.1);
    color: rgba(139, 92, 246, 0.3);
}

@media (max-width: 575.98px) {
    .ai-news-pager-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Longform Daily Briefing — Immersive Magazine Styles
   21st-century web aesthetics: glass, glow, kinetic type, parallax
   ═══════════════════════════════════════════════════════════════ */

/* ── Base article typography ─────────────────────────────── */
.longform-article {
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--text-primary);
}

.longform-article > *:first-child {
    margin-top: 0;
}

.longform-article p {
    margin-bottom: 1.35rem;
}

.longform-article h2 {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 3.5rem 0 1rem;
    padding-top: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.longform-article h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2.25rem 0 0.85rem;
    color: var(--text-primary);
}

.longform-article strong {
    font-weight: 700;
    color: var(--text-primary);
}

.longform-article a {
    color: var(--brand-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color var(--duration-fast) var(--ease-out);
}

.longform-article a:hover {
    color: var(--brand-secondary);
}

/* Standard lists inside the article */
.longform-article ul:not(.lf-takeaways),
.longform-article ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.longform-article ul:not(.lf-takeaways) li,
.longform-article ol li {
    margin-bottom: 0.4rem;
}

/* Standard blockquotes (non-lf-quote) */
.longform-article blockquote:not(.lf-quote) {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--brand-accent);
    background: rgba(91, 45, 142, 0.04);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* ── Hero Section — full-bleed background image ──────────── */
.lf-hero {
    position: relative;
    margin: 0 0 2.5rem;
    padding: 4rem 2.5rem 3rem;
    border-radius: 16px;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
}

.lf-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-img) center / cover no-repeat;
    opacity: 0.3;
    filter: saturate(1.2) brightness(0.55);
    animation: lf-slow-zoom 30s ease-in-out infinite alternate;
}

.lf-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.2) 0%,
        rgba(15, 23, 42, 0.75) 50%,
        rgba(15, 23, 42, 0.95) 100%
    );
}

.lf-hero-content {
    position: relative;
    z-index: 1;
    color: #f1f5f9;
}

.lf-hero-content p {
    color: rgba(241, 245, 249, 0.88);
    font-size: 1.1rem;
}

.lf-hero-content p:first-child::first-line {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

@keyframes lf-slow-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}

/* ── Section Image Panels ────────────────────────────────── */
.lf-img-panel {
    position: relative;
    margin: 2.5rem 0;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    overflow: hidden;
}

.lf-img-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--panel-img) center / cover no-repeat;
    opacity: 0.18;
    filter: saturate(1.15);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.lf-img-panel:hover::before {
    opacity: 0.26;
    transform: scale(1.015);
}

.lf-img-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(91, 45, 142, 0.08) 0%,
        rgba(15, 23, 42, 0.92) 45%,
        rgba(26, 107, 122, 0.1) 100%
    );
    border-radius: inherit;
}

.lf-img-panel-content {
    position: relative;
    z-index: 1;
    color: #f1f5f9;
}

.lf-img-panel-content h2 {
    color: #fff;
    margin-top: 0;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.lf-img-panel-content p {
    color: rgba(241, 245, 249, 0.85);
}

.lf-img-panel-content strong {
    color: #fff;
}

.lf-img-panel-content a {
    color: #a78bfa !important;
}

.lf-img-panel-content a:hover {
    color: #c4b5fd !important;
}

/* ── Glow Section (no image fallback) ────────────────────── */
.lf-section-glow {
    position: relative;
    margin: 2.5rem 0;
    padding: 2.25rem 2rem;
    border-radius: 14px;
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    overflow: hidden;
}

.lf-section-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from var(--glow-angle),
        transparent 0%,
        rgba(91, 45, 142, 0.05) 25%,
        transparent 50%,
        rgba(26, 107, 122, 0.05) 75%,
        transparent 100%
    );
    animation: glow-border-spin 8s linear infinite;
    pointer-events: none;
}

.lf-section-glow h2 {
    margin-top: 0;
}

/* ── Neon Glow Blockquotes ───────────────────────────────── */
.lf-quote {
    position: relative;
    margin: 2rem 0;
    padding: 1.5rem 1.75rem 1.5rem 2rem;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        rgba(91, 45, 142, 0.06) 0%,
        rgba(26, 107, 122, 0.04) 100%
    );
    border: none;
    border-left: 3px solid var(--brand-accent);
    box-shadow:
        -3px 0 16px rgba(91, 45, 142, 0.1),
        0 0 24px rgba(91, 45, 142, 0.03);
}

.lf-quote p {
    font-size: 1.1rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.lf-quote p:last-of-type {
    margin-bottom: 0;
}

.lf-quote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 600;
    color: var(--brand-accent);
    letter-spacing: 0.02em;
}

/* ── Stat Callout Cards ──────────────────────────────────── */
.lf-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin: 2rem auto;
    padding: 1.75rem 2.5rem;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        rgba(91, 45, 142, 0.08) 0%,
        rgba(26, 107, 122, 0.06) 100%
    );
    border: 1px solid rgba(91, 45, 142, 0.12);
    text-align: center;
    max-width: 280px;
    box-shadow: 0 0 24px rgba(91, 45, 142, 0.06);
    animation: lf-stat-pulse 5s ease-in-out infinite;
}

.lf-stat-number {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #5B2D8E, #1A6B7A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.lf-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    max-width: 200px;
}

@keyframes lf-stat-pulse {
    0%, 100% { box-shadow: 0 0 24px rgba(91, 45, 142, 0.06); }
    50% { box-shadow: 0 0 32px rgba(91, 45, 142, 0.12), 0 0 48px rgba(26, 107, 122, 0.06); }
}

/* ── Kinetic Typography ──────────────────────────────────── */
.lf-kinetic {
    position: relative;
    display: inline;
    background: linear-gradient(
        135deg,
        var(--text-primary) 0%,
        #5B2D8E 40%,
        #1A6B7A 60%,
        var(--text-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lf-gradient-shift 6s ease-in-out infinite;
}

@keyframes lf-gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* ── Data Table (Key Numbers) ────────────────────────────── */
.lf-data-table {
    margin: 2.5rem 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.lf-data-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.lf-data-table thead tr {
    background: linear-gradient(135deg, rgba(91, 45, 142, 0.08), rgba(26, 107, 122, 0.06));
}

.lf-data-table th {
    padding: 0.85rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--surface-border);
    text-align: left;
}

.lf-data-table td {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--surface-border);
    font-size: 0.92rem;
    color: var(--text-primary);
}

.lf-data-table tbody tr {
    transition: background var(--duration-fast) var(--ease-out);
}

.lf-data-table tbody tr:hover {
    background: rgba(91, 45, 142, 0.04);
}

.lf-data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Section Divider ─────────────────────────────────────── */
.lf-divider {
    margin: 2.5rem auto;
    width: 80px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #5B2D8E, #1A6B7A, transparent);
    opacity: 0.4;
}

/* ── Source Link ──────────────────────────────────────────── */
.lf-source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-accent) !important;
    text-decoration: none !important;
    border-bottom: 1px dashed rgba(91, 45, 142, 0.25);
    transition: all var(--duration-fast) var(--ease-out);
}

.lf-source-link:hover {
    color: var(--brand-secondary) !important;
    border-bottom-color: var(--brand-secondary);
}

/* ── Takeaway Lists ──────────────────────────────────────── */
.lf-takeaways {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 1.5rem;
}

.lf-takeaways li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.75rem;
    border-bottom: 1px solid rgba(91, 45, 142, 0.06);
    font-weight: 500;
    font-size: 0.98rem;
}

.lf-takeaways li:last-child {
    border-bottom: none;
}

.lf-takeaways li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--brand-accent);
    font-weight: 700;
    font-size: 1em;
}

/* ── Panel-scoped overrides for light-on-dark content ────── */
.lf-img-panel-content ul,
.lf-img-panel-content li {
    color: rgba(241, 245, 249, 0.85);
}

.lf-img-panel-content .lf-takeaways li {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.lf-img-panel-content .lf-takeaways li::before {
    color: #22d3ee;
}

.lf-img-panel-content .lf-quote {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #22d3ee;
    box-shadow: -3px 0 16px rgba(34, 211, 238, 0.1);
}

.lf-img-panel-content .lf-quote p {
    color: rgba(241, 245, 249, 0.92);
}

.lf-img-panel-content .lf-quote cite {
    color: #22d3ee;
}

.lf-img-panel-content .lf-stat-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.lf-img-panel-content .lf-stat-number {
    background: linear-gradient(135deg, #a78bfa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lf-img-panel-content .lf-stat-label {
    color: rgba(241, 245, 249, 0.6);
}

.lf-img-panel-content .lf-source-link {
    color: #a78bfa !important;
    border-bottom-color: rgba(167, 139, 250, 0.3);
}

.lf-img-panel-content .lf-source-link:hover {
    color: #c4b5fd !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .lf-hero {
        padding: 3rem 1.5rem 2rem;
        min-height: 260px;
    }

    .lf-img-panel {
        margin: 2rem 0;
        padding: 2rem 1.5rem;
    }

    .lf-section-glow {
        margin: 2rem 0;
        padding: 1.75rem 1.25rem;
    }

    .lf-stat-card {
        padding: 1.25rem 2rem;
        max-width: 240px;
    }

    .lf-stat-number {
        font-size: 2rem;
    }

    .longform-article h2 {
        font-size: 1.35rem;
        margin-top: 2.5rem;
    }

    .lf-quote {
        padding: 1.25rem 1.25rem 1.25rem 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Swipeable Daily Briefing Navigation
   ═══════════════════════════════════════════════════════════════ */

.ai-briefing-swipe-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.ai-briefing-swipe-container .ai-featured-card {
    flex: 1;
    min-width: 0;
    transition: opacity 0.3s ease;
}

.ai-briefing-nav {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--duration-fast, 0.15s) ease;
    z-index: 4;
}

.ai-briefing-nav:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(91, 45, 142, 0.3);
}

.ai-briefing-nav:active:not(.disabled) {
    transform: scale(0.95);
}

.ai-briefing-nav.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .ai-briefing-swipe-container {
        gap: 0;
    }

    .ai-briefing-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        z-index: 5;
    }

    .ai-briefing-nav-prev {
        left: 0.5rem;
    }

    .ai-briefing-nav-next {
        right: 0.5rem;
    }

    .ai-briefing-nav:hover:not(.disabled) {
        transform: translateY(-50%) scale(1.08);
    }

    .ai-briefing-nav:active:not(.disabled) {
        transform: translateY(-50%) scale(0.95);
    }
}

/* ═══════════════════════════════════════════════════════════════
   Admin AI News — Glass Badges & Compact Grid Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Glass (outline) Badge — replaces solid bg-secondary ─── */
.ai-badge-glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    font-weight: 600;
}

/* ── Glass Status Variants ───────────────────────────────── */
.ai-badge-glass-success {
    background: rgba(34, 197, 94, 0.1);
    backdrop-filter: blur(6px);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 0.72rem;
    font-weight: 600;
}

.ai-badge-glass-secondary {
    background: rgba(148, 163, 184, 0.08);
    backdrop-filter: blur(6px);
    color: rgba(203, 213, 225, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.72rem;
    font-weight: 600;
}

.ai-badge-glass-info {
    background: rgba(34, 211, 238, 0.08);
    backdrop-filter: blur(6px);
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, 0.25);
    font-size: 0.72rem;
    font-weight: 600;
}

.ai-badge-glass-warning {
    background: rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(6px);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.72rem;
    font-weight: 600;
}

/* ── Run History Detail Modal — Stat Cards ───────────────── */
.ai-detail-stat-card {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-detail-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.25rem;
}

.ai-detail-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* ── Clickable Table Rows ────────────────────────────────── */
.cursor-pointer {
    cursor: pointer;
}

/* ── Improved Origin Badge Readability ────────────────────── */
.ai-badge-origin-aigenerated {
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.1);
}

.ai-badge-origin-aiassisted {
    color: #c4b5fd;
    border-color: rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.1);
}

/* -- AI News Videos  tall poster card (matches /admin/heygen video cards) -- */
.ai-video-tall-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 1.15rem;
    background:
        linear-gradient(180deg, rgba(15,23,42,.5), rgba(15,23,42,.86)),
        rgba(15,23,42,.78);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 .75rem 1.75rem rgba(0,0,0,.2);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.ai-video-tall-card:hover {
    transform: translateY(-3px);
    border-color: rgba(139,92,246,.4);
    box-shadow: 0 1rem 2.25rem rgba(0,0,0,.28);
}

.ai-video-tall-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5.85;
    background: linear-gradient(135deg, rgba(91,45,142,.28), rgba(26,107,122,.18));
    border-radius: inherit;
}

.ai-video-tall-poster img,
.ai-video-tall-poster-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform .35s ease, filter .35s ease;
}

.ai-video-tall-card:hover .ai-video-tall-poster img {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.04);
}

.ai-video-tall-poster-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.45);
    font-size: 2.5rem;
}

.ai-video-tall-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2,6,23,.28) 0%, rgba(2,6,23,.02) 24%, rgba(2,6,23,.18) 56%, rgba(2,6,23,.94) 100%);
    pointer-events: none;
}

.ai-video-tall-top {
    position: absolute;
    z-index: 3;
    top: .6rem;
    left: .65rem;
    right: .65rem;
    display: flex;
    justify-content: space-between;
    gap: .4rem;
    pointer-events: none;
}

.ai-video-tall-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .22rem .5rem;
    color: #fff;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ai-video-tall-play {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255,255,255,.18);
    font-size: 2.1rem;
    line-height: 1;
    box-shadow: 0 12px 32px rgba(0,0,0,.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ai-video-tall-play:hover,
.ai-video-tall-play:focus-visible {
    background: linear-gradient(135deg, #5B2D8E, #1A6B7A);
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 14px 38px rgba(91,45,142,.45);
    outline: none;
}

.ai-video-tall-overlay {
    position: absolute;
    z-index: 3;
    left: .8rem;
    right: .8rem;
    bottom: .8rem;
    padding: .8rem .9rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15,23,42,.78), rgba(15,23,42,.46)),
        rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: .9rem;
    box-shadow: 0 .8rem 1.6rem rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.1);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.ai-video-tall-title {
    color: #fff;
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.25;
    text-shadow: 0 1px .4rem rgba(0,0,0,.55);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.ai-video-tall-title a {
    color: inherit;
}

.ai-video-tall-summary {
    color: rgba(255,255,255,.82);
    font-size: .8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.ai-video-tall-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    color: rgba(255,255,255,.78);
    font-size: .76rem;
    font-weight: 600;
    min-width: 0;
    flex-wrap: wrap;
    align-content: center;
}

/* Ensure the Heidi avatar (negative-left positioned) isn't clipped inside the
   tall video card overlay, and the badge text stays on one line. */
.ai-video-tall-meta .ai-heidi-badge {
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: visible;
}

/* Ensure the meta row doesn't cause the date to wrap or overflow */
.ai-video-tall-meta .ai-video-tall-date {
    flex-shrink: 1;
    min-width: 0;
}
