.reading-progress{position:fixed;top:0;left:0;height:3px;background:linear-gradient(90deg,var(--color-teal),#2dd4a8);width:0%;z-index:9999;transition:width .1s linear}
        .article-hero{padding:var(--space-2xl) 0 var(--space-xl);text-align:center}
        .article-hero__breadcrumb{font-size:.85rem;color:#64748b;margin-bottom:var(--space-lg)}
        .article-hero__breadcrumb a{color:var(--color-teal);text-decoration:none}
        .article-hero__breadcrumb a:hover{text-decoration:underline}
        .article-hero__badge{display:inline-block;padding:.3rem 1rem;border-radius:100px;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;margin-bottom:var(--space-md);background:rgba(124,58,237,.1);color:#581c87}
        .article-hero h1{font-size:clamp(1.75rem,4vw,2.5rem);font-weight:800;color:var(--color-navy);max-width:720px;margin:0 auto var(--space-md);line-height:1.25}
        .article-hero__meta{display:flex;align-items:center;justify-content:center;gap:var(--space-md);color:#64748b;font-size:.85rem;flex-wrap:wrap}
        .article-hero__dot{width:4px;height:4px;border-radius:50%;background:#cbd5e1}
        .article-content{max-width:720px;margin:0 auto;padding:0 var(--space-lg) var(--space-3xl)}
        .article-content h2{font-size:1.4rem;color:var(--color-navy);margin:var(--space-xl) 0 var(--space-md);padding-bottom:var(--space-xs);border-bottom:2px solid var(--color-teal);display:inline-block}
        .article-content h3{font-size:1.15rem;color:var(--color-navy);margin:var(--space-lg) 0 var(--space-sm)}
        .article-content p,.article-content li{color:#475569;line-height:1.8;margin-bottom:var(--space-sm);font-size:1rem}
        .article-content ul,.article-content ol{padding-left:var(--space-lg);margin-bottom:var(--space-md)}
        .article-content li{margin-bottom:var(--space-xs)}
        .article-content a{color:var(--color-teal);text-decoration:underline}
        .article-content strong{color:var(--color-navy)}
        .key-takeaways{background:linear-gradient(135deg,rgba(20,184,166,.06) 0%,rgba(20,184,166,.02) 100%);border:1px solid rgba(20,184,166,.15);border-left:4px solid var(--color-teal);border-radius:var(--radius-lg);padding:var(--space-lg);margin-bottom:var(--space-xl)}
        .key-takeaways h3{font-size:1rem;color:var(--color-teal);margin:0 0 var(--space-sm)}
        .key-takeaways ul{margin:0;padding-left:var(--space-lg)}
        .key-takeaways li{color:#475569;line-height:1.7;margin-bottom:var(--space-xs);font-size:.95rem}
        .toc{background:#f8fafc;border:1px solid rgba(0,0,0,.06);border-radius:var(--radius-lg);padding:var(--space-lg);margin-bottom:var(--space-xl)}
        .toc h3{font-size:.9rem;color:var(--color-navy);margin:0 0 var(--space-sm);text-transform:uppercase;letter-spacing:.5px}
        .toc ol{margin:0;padding-left:var(--space-lg)}
        .toc li{margin-bottom:var(--space-xs)}
        .toc a{color:var(--color-teal);text-decoration:none;font-size:.9rem;line-height:1.6}
        .toc a:hover{text-decoration:underline}
        .worked-example{background:#f8fafc;border:1px solid rgba(0,0,0,.06);border-left:4px solid #7c3aed;border-radius:var(--radius-lg);padding:var(--space-lg);margin:var(--space-md) 0 var(--space-lg)}
        .worked-example__title{font-size:.95rem;font-weight:700;color:#581c87;margin:0 0 var(--space-sm)}
        .worked-example p{margin-bottom:var(--space-xs)}
        .worked-example .step{display:flex;gap:var(--space-sm);margin-bottom:var(--space-xs)}
        .worked-example .step-label{font-weight:700;color:var(--color-navy);white-space:nowrap;min-width:50px}
        .worked-example .answer{background:rgba(20,184,166,.08);border-radius:var(--radius-md);padding:var(--space-xs) var(--space-sm);font-weight:700;color:var(--color-navy);display:inline-block;margin-top:var(--space-xs)}
        .warning-box{background:rgba(239,68,68,.05);border:1px solid rgba(239,68,68,.15);border-left:4px solid #ef4444;border-radius:var(--radius-lg);padding:var(--space-md) var(--space-lg);margin:var(--space-md) 0 var(--space-lg)}
        .warning-box__title{font-size:.85rem;font-weight:700;color:#ef4444;text-transform:uppercase;letter-spacing:.5px;margin-bottom:var(--space-xs)}
        .warning-box p{margin:0;font-size:.95rem}
        .method-box{background:linear-gradient(135deg,rgba(20,184,166,.06) 0%,rgba(20,184,166,.02) 100%);border:1px solid rgba(20,184,166,.15);border-radius:var(--radius-lg);padding:var(--space-lg);margin:var(--space-md) 0 var(--space-lg)}
        .method-box h3{font-size:1rem;color:var(--color-teal);margin:0 0 var(--space-sm)}
        .method-box ol,.method-box ul{margin:0;padding-left:var(--space-lg)}
        .method-box li{color:#475569;line-height:1.7;margin-bottom:var(--space-xs);font-size:.95rem}
        .article-cta{background:linear-gradient(135deg,var(--color-navy) 0%,#1a3a4a 100%);border-radius:var(--radius-lg);padding:var(--space-xl);text-align:center;margin-top:var(--space-2xl)}
        .article-cta h3{color:#fff;font-size:1.25rem;margin:0 0 var(--space-sm)}
        .article-cta p{color:rgba(255,255,255,.7);margin:0 0 var(--space-md);font-size:.95rem}
        .article-cta__links{display:flex;gap:var(--space-sm);justify-content:center;flex-wrap:wrap}
        .article-cta__link{display:inline-flex;align-items:center;gap:var(--space-xs);padding:.6rem 1.25rem;border-radius:var(--radius-md);background:var(--color-teal);color:#fff;text-decoration:none;font-weight:600;font-size:.9rem;transition:all .2s ease}
        .article-content .article-cta__link{color:#fff;text-decoration:none}
        .article-cta__link:hover{background:var(--color-teal-dark);transform:translateY(-2px)}
        .article-cta__link--outline{background:transparent;border:1.5px solid rgba(255,255,255,.25)}
        .article-cta__link--outline:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.5)}

/* Fix text color for links missing <strong> tags */
.article-content a.article-related__link {
    color: #f8fafc !important;
}

/* Fix text color for related reading title overridden by article-content h3 */
.article-content .article-related__title {
    color: #2dd4bf !important;
}

/* Enhanced Inline Links */
.article-content p a:not(.article-related__link), 
.article-content li a:not(.article-related__link) {
    color: var(--color-teal);
    text-decoration: underline;
    text-decoration-color: rgba(20, 184, 166, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}
.article-content p a:not(.article-related__link):hover, 
.article-content li a:not(.article-related__link):hover {
    text-decoration-color: var(--color-teal);
    background: rgba(20, 184, 166, 0.08);
    border-radius: 2px;
}


/* ============================================================
   Global Lab Dark Mode Overrides
   ============================================================ */

/* Typography & Headings */
html[data-theme="dark"] .article-hero h1,
html[data-theme="dark"] .article-content h2,
html[data-theme="dark"] .article-content h3,
html[data-theme="dark"] .article-content strong,
html[data-theme="dark"] .blog__step h4,
html[data-theme="dark"] .blog__table th,
html[data-theme="dark"] .blog__table td:first-child,
html[data-theme="dark"] .toc h3,
html[data-theme="dark"] .mistake-box h3,
html[data-theme="dark"] .key-takeaways h3,
html[data-theme="dark"] .article-cta h3,
html[data-theme="dark"] .tip-box p strong,
html[data-theme="dark"] .theme-card h4 {
    color: #f1f5f9 !important;
}

/* Body text & subtle text */
html[data-theme="dark"] .article-hero__breadcrumb,
html[data-theme="dark"] .article-hero__meta,
html[data-theme="dark"] .article-content p,
html[data-theme="dark"] .article-content li,
html[data-theme="dark"] .blog__step p,
html[data-theme="dark"] .blog__table td,
html[data-theme="dark"] .blog__tag,
html[data-theme="dark"] .mistake-box__why,
html[data-theme="dark"] .mistake-box__wrong,
html[data-theme="dark"] .mistake-box__right,
html[data-theme="dark"] .mistake-box__topic,
html[data-theme="dark"] .toc li a,
html[data-theme="dark"] .tip-box p,
html[data-theme="dark"] .assessment-table td,
html[data-theme="dark"] .theme-card p,
html[data-theme="dark"] .theme-card li {
    color: #cbd5e1 !important;
}

/* Links */
html[data-theme="dark"] .article-content p a:not(.article-related__link),
html[data-theme="dark"] .article-content li a:not(.article-related__link) {
    color: #2dd4bf !important;
    text-decoration-color: rgba(45, 212, 191, 0.3) !important;
}
html[data-theme="dark"] .article-content p a:not(.article-related__link):hover,
html[data-theme="dark"] .article-content li a:not(.article-related__link):hover {
    text-decoration-color: #2dd4bf !important;
    background: rgba(45, 212, 191, 0.15) !important;
}

/* Badges */
html[data-theme="dark"] .article-hero__badge {
    background: rgba(45, 212, 191, 0.15) !important;
    color: #2dd4bf !important;
}

/* Components */
html[data-theme="dark"] .toc {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .key-takeaways {
    background: rgba(45, 212, 191, 0.06) !important;
    border-color: rgba(45, 212, 191, 0.15) !important;
}

/* Worked Example */
html[data-theme="dark"] .worked-example {
    background: rgba(124, 58, 237, 0.05) !important;
    border-color: rgba(124, 58, 237, 0.15) !important;
    border-left-color: #a78bfa !important;
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .worked-example__title {
    color: #ddd6fe !important;
}
html[data-theme="dark"] .worked-example .step-label {
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .worked-example .answer {
    background: rgba(45, 212, 191, 0.15) !important;
    color: #5eead4 !important;
}

/* Method Box */
html[data-theme="dark"] .method-box {
    background: rgba(20, 184, 166, 0.05) !important;
    border-color: rgba(20, 184, 166, 0.15) !important;
}
html[data-theme="dark"] .method-box h3 {
    color: #5eead4 !important;
}

/* Warning Box */
html[data-theme="dark"] .warning-box {
    background: rgba(239, 68, 68, 0.05) !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
    border-left-color: #ef4444 !important;
}
html[data-theme="dark"] .warning-box__title {
    color: #fca5a5 !important;
}

/* Mistake Box */
html[data-theme="dark"] .mistake-box {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .mistake-box__wrong {
    background: rgba(239, 68, 68, 0.15) !important;
    border-left-color: #ef4444 !important;
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .mistake-box__right {
    background: rgba(16, 185, 129, 0.15) !important;
    border-left-color: #10b981 !important;
    color: #cbd5e1 !important;
}

/* Tip Box */
html[data-theme="dark"] .tip-box {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.15) !important;
}

/* Theme Card */
html[data-theme="dark"] .theme-card {
    background: rgba(45, 212, 191, 0.04) !important;
    border-color: rgba(45, 212, 191, 0.12) !important;
}

/* Practice Card & State Symbol Card */
html[data-theme="dark"] .practice-card,
html[data-theme="dark"] .state-symbol-card {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .practice-card h4 {
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .state-symbol-card__symbol {
    color: #5eead4 !important;
}

/* Equation Display */
html[data-theme="dark"] .equation-display {
    background: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}

/* Tables & Steps */
html[data-theme="dark"] .blog__step {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .blog__table th,
html[data-theme="dark"] .assessment-table th {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .blog__table td,
html[data-theme="dark"] .assessment-table td {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}
html[data-theme="dark"] .blog__table tbody tr:hover,
html[data-theme="dark"] .assessment-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}
html[data-theme="dark"] .blog__tag {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* App Nudge Card (ChemEasy promo) */
.app-nudge-card {
    margin: 2.5rem 0 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: rgba(45, 212, 191, 0.06);
    border: 1px solid rgba(45, 212, 191, 0.15);
}
.app-nudge-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}
.app-nudge-card strong {
    color: #0f172a;
}
.app-nudge-card a {
    color: var(--color-teal);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}
.app-nudge-card a:hover {
    text-decoration: underline;
}

/* App Nudge Card — Dark Mode */
html[data-theme="dark"] .app-nudge-card {
    background: rgba(45, 212, 191, 0.06) !important;
    border-color: rgba(45, 212, 191, 0.15) !important;
}
html[data-theme="dark"] .app-nudge-card p {
    color: #94a3b8 !important;
}
html[data-theme="dark"] .app-nudge-card strong {
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .app-nudge-card a {
    color: rgba(45, 212, 191, 0.85) !important;
}

/* Connection Box (syllabus cross-links) */
.connection-box {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.04) 0%, rgba(20, 184, 166, 0.01) 100%);
    border: 1px solid rgba(20, 184, 166, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-md) 0 var(--space-lg);
}
.connection-box h3 {
    font-size: 1rem;
    color: var(--color-teal);
    margin: 0 0 var(--space-md);
}
.connection-box__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}
.connection-box__item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}
.connection-box__topic {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-navy);
    margin-bottom: var(--space-xs);
}
.connection-box__desc {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 0;
}

/* Connection Box — Dark Mode */
html[data-theme="dark"] .connection-box {
    background: rgba(20, 184, 166, 0.04) !important;
    border-color: rgba(20, 184, 166, 0.15) !important;
}
html[data-theme="dark"] .connection-box h3 {
    color: #5eead4 !important;
}
html[data-theme="dark"] .connection-box__item {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .connection-box__topic {
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .connection-box__desc {
    color: #cbd5e1 !important;
}

/* Tip Box (light mode base) */
.tip-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-left: 4px solid #3b82f6;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0 var(--space-lg);
}
.tip-box p {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.7;
}
.tip-box p strong {
    color: var(--color-navy);
}

