/**
 * Agrigyan Practice — Chapter Overview Page UI Enhancement
 * ═══════════════════════════════════════════════════════════
 * Modern, clean, stable UI refinements for the chapter-wise overview
 * Compatible with existing theme, dark mode, and mobile layouts
 * 
 * Sections:
 *   1. Hero Section Polish
 *   2. Quick Facts Cards Enhancement
 *   3. Question Type Chips Modernization
 *   4. PYQ Statistics Table Upgrade
 *   5. Question Group & Cards Polish
 *   6. Topic Navigator Sidebar Refinements
 *   7. Mobile Responsive Overrides
 *   8. Dark Mode Support
 */

/* ═══════════════════════════════════════════════════════════════════════════
   1. HERO SECTION — Cleaner hierarchy, refined accent, better spacing
   ═══════════════════════════════════════════════════════════════════════════ */

.agp-topic-hero {
    padding: 22px 26px 20px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    gap: 24px !important;
    margin-bottom: 18px !important;
}

/* Softer gradient accent bar */
.agp-topic-hero::before {
    height: 3px !important;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 50%, #86efac 100%) !important;
    border-radius: 14px 14px 0 0 !important;
}

/* Badge row breathing room */
.agp-topic-hero__tags {
    gap: 10px !important;
    margin-bottom: 10px !important;
}

/* Status badge refinement */
.agp-ci-status-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.045em;
    border-radius: 8px;
    padding: 3px 10px;
}

/* CTA button — slightly rounder, more tactile */
.agp-topic-cta {
    padding: 9px 20px !important;
    border-radius: 9px !important;
    font-size: 0.84375rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 1px 3px rgba(21, 128, 61, 0.22) !important;
    transition: background 0.18s ease, box-shadow 0.18s ease !important;
}

.agp-topic-cta:hover {
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.28) !important;
}

/* Meta pill beside CTA */
.agp-topic-hero__meta-pill {
    font-size: 0.6875rem !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    color: var(--agp-text-secondary, #475569) !important;
    background: var(--agp-bg-subtle, #f8fafc) !important;
    border: 1px solid var(--agp-border-light, #e2e8f0) !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. QUICK FACTS CARDS — Refined card surfaces, better icon treatment
   ═══════════════════════════════════════════════════════════════════════════ */

.agp-topic-facts {
    gap: 14px !important;
    margin-bottom: 18px !important;
}

.agp-topic-fact {
    padding: 14px 16px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    gap: 14px !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.agp-topic-fact:hover {
    border-color: rgba(21, 128, 61, 0.25) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Icon container — slightly larger, softer shape */
.agp-topic-fact__icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 9px !important;
    background: rgba(21, 128, 61, 0.07) !important;
}

/* Value text refinement */
.agp-topic-fact__val {
    font-size: 1.1875rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.015em !important;
    color: var(--agp-text, #0f172a) !important;
}

/* Label refinement */
.agp-topic-fact__label {
    margin-top: 4px !important;
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.035em !important;
    color: var(--agp-text-muted, #64748b) !important;
}

/* Sub label cleaner */
.agp-topic-fact__sub {
    margin-top: 2px !important;
    font-size: 0.6875rem !important;
    color: var(--agp-text-muted, #94a3b8) !important;
    line-height: 1.4 !important;
}

/* Trend badge polish */
.agp-topic-trend {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    padding: 1px 7px !important;
    border-radius: 6px !important;
    letter-spacing: 0.01em !important;
}

.agp-topic-trend--up {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.agp-topic-trend--down {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.agp-topic-trend--neutral {
    background: #f1f5f9 !important;
    color: #64748b !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. QUESTION TYPE JUMP CHIPS — Better pill design, cleaner spacing
   ═══════════════════════════════════════════════════════════════════════════ */

.agp-topic-jumps {
    margin-bottom: 18px !important;
    gap: 10px !important;
    padding: 0 !important;
    scrollbar-width: none !important;
}

.agp-topic-jumps::-webkit-scrollbar {
    display: none;
}

.agp-topic-jumps__label {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.045em !important;
    color: var(--agp-text-muted, #64748b) !important;
}

.agp-topic-jump-chip {
    padding: 5px 10px 5px 12px !important;
    border-radius: 10px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    background: rgba(21, 128, 61, 0.06) !important;
    border: 1px solid rgba(21, 128, 61, 0.14) !important;
    gap: 8px !important;
    transition: all 0.18s ease !important;
}

.agp-topic-jump-chip:hover {
    background: var(--agp-primary, #15803d) !important;
    color: #fff !important;
    border-color: var(--agp-primary, #15803d) !important;
    box-shadow: 0 1px 4px rgba(21, 128, 61, 0.2) !important;
}

.agp-topic-jump-chip__count {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    padding: 1px 7px !important;
    border-radius: 10px !important;
    min-width: 18px !important;
    text-align: center !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. PYQ STATISTICS TABLE — Cleaner accordion, refined table design
   ═══════════════════════════════════════════════════════════════════════════ */

.agp-topic-stats {
    border-radius: 14px !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    margin-bottom: 24px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
}

.agp-topic-stats__details {
    border: none !important;
    border-radius: 14px !important;
}

.agp-topic-stats__summary {
    padding: 16px 20px !important;
    border-radius: 14px !important;
    transition: background 0.15s ease !important;
}

.agp-topic-stats__summary:hover {
    background: rgba(248, 250, 252, 0.6) !important;
}

.agp-topic-stats__title {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
}

.agp-topic-stats__title-wrap svg {
    color: var(--agp-primary, #15803d) !important;
    opacity: 0.8 !important;
}

/* Chevron animation */
.agp-topic-stats__chevron {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.agp-topic-stats__details[open] .agp-topic-stats__chevron {
    transform: rotate(180deg) !important;
}

/* Table body */
.agp-topic-stats__body {
    padding: 0 20px 20px !important;
}

.agp-topic-stats__desc {
    font-size: 0.8125rem !important;
    color: var(--agp-text-muted, #64748b) !important;
    margin-bottom: 14px !important;
    line-height: 1.5 !important;
}

/* Table itself */
.agp-topic-stats__table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.agp-topic-stats__table th {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: var(--agp-text-muted, #64748b) !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--agp-border, #e2e8f0) !important;
    background: transparent !important;
}

.agp-topic-stats__table td {
    padding: 12px 14px !important;
    font-size: 0.875rem !important;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8) !important;
    vertical-align: middle !important;
}

.agp-topic-stats__table tr:last-child td {
    border-bottom: none !important;
}

/* Year column bold */
.agp-topic-stats__td-year b {
    font-weight: 600 !important;
    color: var(--agp-text, #1e293b) !important;
}

/* Question count pill */
.agp-topic-stats__pill {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    background: rgba(21, 128, 61, 0.07) !important;
    color: var(--agp-primary, #15803d) !important;
}

/* Progress bar track */
.agp-topic-stats__bar-track {
    height: 6px !important;
    border-radius: 4px !important;
    background: var(--agp-border-light, #e5e7eb) !important;
    overflow: hidden !important;
}

.agp-topic-stats__bar-fill {
    height: 100% !important;
    border-radius: 4px !important;
    background: linear-gradient(90deg, var(--agp-primary, #15803d), #22c55e) !important;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Percentage value */
.agp-topic-stats__pct-val {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: var(--agp-text, #1e293b) !important;
    white-space: nowrap !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. QUESTION GROUP & CARDS — Cleaner list, better card surfaces
   ═══════════════════════════════════════════════════════════════════════════ */

/* Section header */
.agp-topic-qgroup__head {
    margin-bottom: 14px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--agp-border-light, #f1f5f9) !important;
}

.agp-topic-qgroup__title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--agp-text, #0f172a) !important;
}

.agp-topic-qgroup__count {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: var(--agp-text-muted, #94a3b8) !important;
}

/* Card container */
.agp-topic-qcards {
    border-radius: 12px !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

/* Individual question row */
.agp-topic-qcard {
    padding: 14px 18px !important;
    gap: 14px !important;
    border-top-color: rgba(241, 245, 249, 0.9) !important;
    transition: background 0.15s ease !important;
}

.agp-topic-qcard:hover {
    background: rgba(248, 250, 252, 0.7) !important;
}

/* Index badge — refined circle */
.agp-topic-qcard__index {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    background: rgba(21, 128, 61, 0.07) !important;
    border: 1px solid rgba(21, 128, 61, 0.12) !important;
    color: var(--agp-primary, #15803d) !important;
    margin-top: 1px !important;
}

.agp-topic-qcard:hover .agp-topic-qcard__index {
    background: var(--agp-primary, #15803d) !important;
    color: #fff !important;
    border-color: var(--agp-primary, #15803d) !important;
}

/* Question preview text */
.agp-topic-qcard__statement {
    font-size: 0.9375rem !important;
    line-height: 1.58 !important;
    color: var(--agp-text, #1e293b) !important;
    max-height: 5.5rem !important;
}

/* Meta badge row */
.agp-topic-qcard__meta {
    gap: 6px !important;
    margin-top: 6px !important;
}

/* Tag badge refinements */
.agp-topic-qcard__tag {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    padding: 2px 9px !important;
    border-radius: 7px !important;
    letter-spacing: 0.01em !important;
}

/* Paper tag */
.agp-topic-qcard__tag--paper {
    background: rgba(2, 132, 199, 0.07) !important;
    color: #0369a1 !important;
    border-color: rgba(2, 132, 199, 0.15) !important;
}

/* Shift tag */
.agp-topic-qcard__tag--shift {
    background: rgba(180, 83, 9, 0.07) !important;
    color: #a16207 !important;
    border-color: rgba(180, 83, 9, 0.15) !important;
}

/* Type tag */
.agp-topic-qcard__tag--type {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

/* Marks badge */
.agp-topic-qcard__marks {
    background: rgba(21, 128, 61, 0.06) !important;
    color: #15803d !important;
    border-color: rgba(21, 128, 61, 0.14) !important;
}

/* Arrow chevron */
.agp-topic-qcard__arrow {
    color: #cbd5e1 !important;
}

.agp-topic-qcard:hover .agp-topic-qcard__arrow {
    color: var(--agp-primary, #15803d) !important;
    transform: translateX(3px) !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. TOPIC NAVIGATOR SIDEBAR — Cleaner header, refined items
   ═══════════════════════════════════════════════════════════════════════════ */

/* Navigator header polish */
.agp-topic-nav__header-info {
    gap: 6px !important;
}

.agp-topic-nav__exam-badge {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    padding: 3px 10px !important;
    border-radius: 7px !important;
}

/* Subject group header */
.agp-topic-nav__unit-header {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    padding: 10px 16px 6px !important;
    color: var(--agp-text-muted, #64748b) !important;
}

/* Nav items */
.agp-topic-nav__item {
    padding: 7px 16px !important;
    font-size: 0.8125rem !important;
    border-radius: 0 !important;
    transition: background 0.12s ease, color 0.12s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    color: var(--agp-text-secondary, #475569) !important;
}

.agp-topic-nav__item:hover {
    background: rgba(21, 128, 61, 0.05) !important;
    color: var(--agp-text, #1e293b) !important;
}

/* Active item */
.agp-topic-nav__item--active {
    background: var(--agp-primary, #15803d) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.agp-topic-nav__item--active:hover {
    background: var(--agp-primary-hover, #166534) !important;
    color: #ffffff !important;
}

/* Count badge in nav */
.agp-topic-nav__count {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    padding: 1px 7px !important;
    border-radius: 7px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

.agp-topic-nav__item--active .agp-topic-nav__count {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Out-of-syllabus items */
.agp-topic-nav__item--oos {
    opacity: 0.6 !important;
}

.agp-topic-nav__item--oos:hover {
    opacity: 0.8 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. MOBILE RESPONSIVE (≤ 640px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    /* Hero compact mobile */
    .agp-topic-hero {
        padding: 16px 18px 14px !important;
        border-radius: 12px !important;
        gap: 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        margin-bottom: 14px !important;
    }

    .agp-topic-hero__action-bar {
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .agp-topic-cta {
        flex: 1 !important;
        justify-content: center !important;
        padding: 10px 18px !important;
    }

    .agp-topic-hero__meta-pill {
        flex-shrink: 0 !important;
    }

    /* Facts 2x2 grid */
    .agp-topic-facts {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    .agp-topic-fact {
        padding: 12px 14px !important;
        gap: 10px !important;
    }

    .agp-topic-fact__icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
    }

    .agp-topic-fact__icon svg {
        width: 15px !important;
        height: 15px !important;
    }

    .agp-topic-fact__val {
        font-size: 1.0625rem !important;
    }

    .agp-topic-fact__sub {
        font-size: 0.625rem !important;
    }

    /* Jump chips scroll */
    .agp-topic-jumps {
        margin-bottom: 14px !important;
        gap: 8px !important;
    }

    .agp-topic-jump-chip {
        font-size: 0.75rem !important;
        padding: 4px 8px 4px 10px !important;
    }

    /* Stats card */
    .agp-topic-stats {
        border-radius: 12px !important;
        margin-bottom: 18px !important;
    }

    .agp-topic-stats__summary {
        padding: 14px 16px !important;
    }

    .agp-topic-stats__body {
        padding: 0 16px 16px !important;
    }

    .agp-topic-stats__table th {
        font-size: 0.625rem !important;
        padding: 8px 10px !important;
    }

    .agp-topic-stats__table td {
        font-size: 0.8125rem !important;
        padding: 10px !important;
    }

    /* Question cards */
    .agp-topic-qcards {
        border-radius: 10px !important;
    }

    .agp-topic-qcard {
        padding: 12px 14px !important;
        gap: 10px !important;
    }

    .agp-topic-qcard__index {
        width: 26px !important;
        height: 26px !important;
        border-radius: 8px !important;
        font-size: 0.6875rem !important;
    }

    .agp-topic-qcard__statement {
        font-size: 0.875rem !important;
        line-height: 1.55 !important;
        max-height: 4.5rem !important;
    }

    .agp-topic-qcard__meta {
        gap: 5px !important;
    }

    .agp-topic-qcard__tag {
        font-size: 0.625rem !important;
        padding: 1px 7px !important;
    }

    .agp-topic-qcard__marks {
        font-size: 0.625rem !important;
        padding: 1px 7px !important;
    }

    .agp-topic-qcard__arrow {
        display: none !important;
    }

    /* Section title */
    .agp-topic-qgroup__head {
        margin-bottom: 10px !important;
    }

    .agp-topic-qgroup__title {
        font-size: 0.9375rem !important;
    }
}

/* Medium tablets (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .agp-topic-facts {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .agp-topic-hero {
        padding: 18px 22px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. DARK MODE OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .agp-topic-hero,
.agp-dark-mode .agp-topic-hero {
    border-color: rgba(55, 65, 81, 0.6) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .agp-topic-hero::before,
.agp-dark-mode .agp-topic-hero::before {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 50%, #15803d 100%) !important;
}

[data-theme="dark"] .agp-topic-fact,
.agp-dark-mode .agp-topic-fact {
    border-color: rgba(55, 65, 81, 0.5) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="dark"] .agp-topic-fact:hover,
.agp-dark-mode .agp-topic-fact:hover {
    border-color: rgba(34, 197, 94, 0.3) !important;
}

[data-theme="dark"] .agp-topic-fact__icon,
.agp-dark-mode .agp-topic-fact__icon {
    background: rgba(34, 197, 94, 0.12) !important;
}

[data-theme="dark"] .agp-topic-fact__val,
.agp-dark-mode .agp-topic-fact__val {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .agp-topic-stats,
.agp-dark-mode .agp-topic-stats {
    border-color: rgba(55, 65, 81, 0.5) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .agp-topic-stats__summary:hover,
.agp-dark-mode .agp-topic-stats__summary:hover {
    background: rgba(31, 41, 55, 0.4) !important;
}

[data-theme="dark"] .agp-topic-stats__table th,
.agp-dark-mode .agp-topic-stats__table th {
    border-bottom-color: rgba(55, 65, 81, 0.5) !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .agp-topic-stats__table td,
.agp-dark-mode .agp-topic-stats__table td {
    border-bottom-color: rgba(55, 65, 81, 0.3) !important;
}

[data-theme="dark"] .agp-topic-stats__td-year b,
.agp-dark-mode .agp-topic-stats__td-year b {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .agp-topic-stats__pill,
.agp-dark-mode .agp-topic-stats__pill {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .agp-topic-stats__bar-track,
.agp-dark-mode .agp-topic-stats__bar-track {
    background: rgba(55, 65, 81, 0.5) !important;
}

[data-theme="dark"] .agp-topic-stats__pct-val,
.agp-dark-mode .agp-topic-stats__pct-val {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .agp-topic-qcards,
.agp-dark-mode .agp-topic-qcards {
    border-color: rgba(55, 65, 81, 0.5) !important;
}

[data-theme="dark"] .agp-topic-qcard,
.agp-dark-mode .agp-topic-qcard {
    border-top-color: rgba(55, 65, 81, 0.3) !important;
}

[data-theme="dark"] .agp-topic-qcard:hover,
.agp-dark-mode .agp-topic-qcard:hover {
    background: rgba(31, 41, 55, 0.5) !important;
}

[data-theme="dark"] .agp-topic-qcard__index,
.agp-dark-mode .agp-topic-qcard__index {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .agp-topic-qcard__statement,
.agp-dark-mode .agp-topic-qcard__statement {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .agp-topic-qcard__tag--paper,
.agp-dark-mode .agp-topic-qcard__tag--paper {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.2) !important;
}

[data-theme="dark"] .agp-topic-qcard__tag--shift,
.agp-dark-mode .agp-topic-qcard__tag--shift {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.2) !important;
}

[data-theme="dark"] .agp-topic-qcard__tag--type,
.agp-dark-mode .agp-topic-qcard__tag--type {
    background: rgba(100, 116, 139, 0.15) !important;
    color: #94a3b8 !important;
    border-color: rgba(100, 116, 139, 0.25) !important;
}

[data-theme="dark"] .agp-topic-qcard__marks,
.agp-dark-mode .agp-topic-qcard__marks {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
}

[data-theme="dark"] .agp-topic-qcard__arrow,
.agp-dark-mode .agp-topic-qcard__arrow {
    color: #4b5563 !important;
}

[data-theme="dark"] .agp-topic-qcard:hover .agp-topic-qcard__arrow,
.agp-dark-mode .agp-topic-qcard:hover .agp-topic-qcard__arrow {
    color: #4ade80 !important;
}

[data-theme="dark"] .agp-topic-jump-chip,
.agp-dark-mode .agp-topic-jump-chip {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
}

[data-theme="dark"] .agp-topic-jump-chip__count,
.agp-dark-mode .agp-topic-jump-chip__count {
    background: rgba(34, 197, 94, 0.3) !important;
}

[data-theme="dark"] .agp-topic-qgroup__head,
.agp-dark-mode .agp-topic-qgroup__head {
    border-bottom-color: rgba(55, 65, 81, 0.3) !important;
}

[data-theme="dark"] .agp-topic-qgroup__title,
.agp-dark-mode .agp-topic-qgroup__title {
    color: #f1f5f9 !important;
}

/* Dark-mode trend badges keep same scheme */
[data-theme="dark"] .agp-topic-trend--up,
.agp-dark-mode .agp-topic-trend--up {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .agp-topic-trend--down,
.agp-dark-mode .agp-topic-trend--down {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .agp-topic-hero__meta-pill,
.agp-dark-mode .agp-topic-hero__meta-pill {
    background: rgba(31, 41, 55, 0.6) !important;
    border-color: rgba(55, 65, 81, 0.5) !important;
    color: #94a3b8 !important;
}
