/* ============================================
   Article Premium Dark Mode
   Applied on top of bpc-premium.css for article pages.
   Override inline light styles from article templates.
   ============================================ */

/* --- Layout --- */
.article-layout {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
}

/* --- Article body text --- */
.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.75) !important;
}

.article-body p {
    margin-bottom: 24px;
    color: rgba(255,255,255,0.75) !important;
}

.article-body .lead {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.6) !important;
    font-weight: 500;
}

/* --- Headings --- */
.article-body h2 {
    font-size: 1.8rem;
    color: #FFFFFF !important;
    margin-top: 48px;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.article-body h3 {
    color: #F5F5F5 !important;
    font-weight: 700;
}

/* --- Article header --- */
.article-layout header h1 {
    color: #FFFFFF !important;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.article-layout header span[style*="background:#E0F2FE"],
.article-layout header span[style*="background: #E0F2FE"] {
    background: rgba(220,38,38,0.12) !important;
    color: #EF4444 !important;
    border: 1px solid rgba(220,38,38,0.2);
}

.article-layout header div[style*="color:#64748B"],
.article-layout header div[style*="color: #64748B"] {
    color: rgba(255,255,255,0.4) !important;
}

/* --- Blockquotes --- */
.article-body blockquote {
    border-left: 4px solid #DC2626 !important;
    padding: 20px 24px;
    margin: 32px 0;
    font-style: italic;
    color: rgba(255,255,255,0.7) !important;
    background: rgba(220,38,38,0.06) !important;
    border-radius: 0 12px 12px 0;
    font-size: 1.15rem;
}

.article-body blockquote strong {
    color: #EF4444 !important;
    font-style: normal;
}

/* --- Key takeaway --- */
.key-takeaway {
    background: rgba(255,255,255,0.04) !important;
    border-left: 4px solid #DC2626 !important;
    padding: 24px;
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
    color: rgba(255,255,255,0.75) !important;
}

.key-takeaway strong {
    color: #FFFFFF !important;
}

/* --- Sidebar --- */
.sidebar-card {
    background: var(--bpc-surface-card, #141414) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.sidebar-card h4 {
    color: #EF4444 !important;
    margin-bottom: 16px;
}

.sidebar-card p {
    color: rgba(255,255,255,0.6) !important;
}

.btn-sidebar {
    display: block;
    background: var(--bpc-gradient, linear-gradient(135deg, #DC2626, #B91C1C)) !important;
    color: white !important;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    border: none;
}

.btn-sidebar:hover {
    box-shadow: 0 8px 25px rgba(220,38,38,0.4) !important;
    transform: translateY(-2px);
}

/* --- FAQ / Details --- */
details {
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 12px;
    padding: 16px;
    background: var(--bpc-surface-card, #141414) !important;
    transition: border-color 0.2s ease;
}

details:hover {
    border-color: rgba(255,255,255,0.15) !important;
    box-shadow: none !important;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    color: #F5F5F5 !important;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
    content: '+';
    font-size: 1.5rem;
    color: #EF4444 !important;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details[open] summary {
    margin-bottom: 12px;
    color: #EF4444 !important;
}

details p {
    margin: 0;
    color: rgba(255,255,255,0.6) !important;
    line-height: 1.6;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding-left: 28px;
    margin: 32px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #DC2626, rgba(220,38,38,0.3)) !important;
    border-radius: 2px;
}

.timeline-item::before {
    background: #DC2626 !important;
    border-color: var(--bpc-surface, #0A0A0A) !important;
}

.timeline-year {
    color: #EF4444 !important;
}

.timeline-text {
    color: rgba(255,255,255,0.7) !important;
}

/* --- Lists --- */
.article-body ul li,
.article-body ol li {
    color: rgba(255,255,255,0.75) !important;
}

.article-body ul li::marker {
    color: #DC2626;
}

/* --- Tables --- */
.article-body table {
    border-color: rgba(255,255,255,0.08) !important;
}

.article-body th {
    background: rgba(255,255,255,0.04) !important;
    color: #F5F5F5 !important;
    border-color: rgba(255,255,255,0.08) !important;
}

.article-body td {
    border-color: rgba(255,255,255,0.06) !important;
    color: rgba(255,255,255,0.7) !important;
}

/* --- Links in body --- */
.article-body a {
    color: #EF4444 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body a:hover {
    color: #fff !important;
}

/* --- Images --- */
.article-body img {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

/* --- FAQ section border --- */
#faq {
    border-top-color: rgba(255,255,255,0.08) !important;
}

/* --- Inline style overrides for common patterns --- */
[style*="color:#0F172A"],
[style*="color: #0F172A"] {
    color: #FFFFFF !important;
}

[style*="color:#334155"],
[style*="color: #334155"] {
    color: rgba(255,255,255,0.75) !important;
}

[style*="color:#475569"],
[style*="color: #475569"] {
    color: rgba(255,255,255,0.6) !important;
}

[style*="color:#64748B"],
[style*="color: #64748B"] {
    color: rgba(255,255,255,0.4) !important;
}

[style*="background:#F0F9FF"],
[style*="background: #F0F9FF"] {
    background: rgba(255,255,255,0.04) !important;
}

[style*="background:#FEF2F2"],
[style*="background: #FEF2F2"] {
    background: rgba(220,38,38,0.06) !important;
}

[style*="background:#E0F2FE"],
[style*="background: #E0F2FE"] {
    background: rgba(220,38,38,0.12) !important;
}

[style*="background: white"],
[style*="background:white"],
[style*="background: #fff"],
[style*="background:#fff"],
[style*="background: #F8FAFC"],
[style*="background:#F8FAFC"] {
    background: var(--bpc-surface-card, #141414) !important;
}

[style*="border-top:1px solid #e2e8f0"],
[style*="border-top: 1px solid #e2e8f0"] {
    border-top-color: rgba(255,255,255,0.08) !important;
}

[style*="border:1px solid #e2e8f0"],
[style*="border: 1px solid #e2e8f0"],
[style*="border:1px solid #E2E8F0"],
[style*="border: 1px solid #E2E8F0"] {
    border-color: rgba(255,255,255,0.08) !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .article-layout {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        margin: 40px 16px !important;
        padding: 0 !important;
    }
    aside { order: 2; }
    article { order: 1; }
}
