/* ═══════════════════════════════════════════════════════════
   ORBITECH AI Academy — orbitech.css
   UNIFIED CSS: articles + nav + accessibility widget
   Dark theme · SpaceX-inspired · Apple polish
   ═══════════════════════════════════════════════════════════ */

/* ═══ NAV + FLAGS ═══ */
@font-face{font-family:"Twemoji Country Flags";unicode-range:U+1F1E6-1F1FF,U+1F3F4,U+E0062-E0063,U+E0065,U+E0067,U+E006C,U+E006E,U+E0073-E0074,U+E0077,U+E007F;src:url("https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2") format("woff2");font-display:swap}
body,*{font-family:"Twemoji Country Flags","Inter","DM Sans",sans-serif}
.world-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250,250,249,0.55);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(0,0,0,0.06);
}
@media (prefers-color-scheme: dark) {
    .world-nav { background: rgba(10,10,10,0.6); border-color: rgba(255,255,255,0.08); }
}
.world-nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.world-nav-logo { font-family: 'DM Sans', sans-serif; font-size: 18px; font-weight: 800; color: #6366f1; text-decoration: none; }
.world-nav-logo span { color: var(--text, #1a1a1a); font-weight: 600; }
.world-nav-links { display: flex; gap: 4px; align-items: center; }
.world-nav-link {
    font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
    color: var(--text-muted, #6b6b6b); text-decoration: none;
    padding: 8px 14px; border-radius: 10px; transition: all 0.2s;
}
.world-nav-link:hover { background: rgba(99,102,241,0.08); color: #6366f1; }
.world-nav-link.active { background: rgba(99,102,241,0.12); color: #6366f1; }
.world-nav-link.cta { background: #6366f1; color: #fff; }
.world-nav-link.cta:hover { background: #5558e6; }
@media (max-width: 640px) {
    .world-nav-links { gap: 2px; }
    .world-nav-link { font-size: 11px; padding: 6px 8px; }
}



/* ═══ VIEW TRANSITIONS — SPA-like navigation, zero JS ═══ */
@view-transition{navigation:auto}
::view-transition-old(root){animation:vt-fade-out 150ms ease}
::view-transition-new(root){animation:vt-fade-in 150ms ease}
@keyframes vt-fade-out{from{opacity:1}to{opacity:0}}
@keyframes vt-fade-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){::view-transition-old(root),::view-transition-new(root){animation:none}}

/* ═══ RESET & BASE ═══ */
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;background:#000;color:#e4e4e7;min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
a{color:#6366f1;text-decoration:none;transition:color .2s}
a:hover{color:#818cf8}
img{max-width:100%;border-radius:8px}
::selection{background:rgba(99,102,241,0.3);color:#f5f5f7}

/* ═══ HERO ═══ */
.article-hero{background:linear-gradient(160deg,#1a1040 0%,#0d0820 60%,#000 100%);padding:80px 24px 56px;text-align:center;position:relative;overflow:hidden}
.article-hero::before{content:'';position:absolute;top:-50%;left:50%;transform:translateX(-50%);width:600px;height:600px;background:radial-gradient(circle,rgba(99,102,241,0.08) 0%,transparent 70%);pointer-events:none}
.article-hero::after{content:'';position:absolute;bottom:0;left:0;right:0;height:100px;background:linear-gradient(transparent,#000);pointer-events:none}
.hero-container{max-width:760px;margin:0 auto;position:relative;z-index:1}
.back-to-blog{display:inline-flex;align-items:center;gap:8px;color:#a1a1aa;font-size:13px;border:1px solid rgba(255,255,255,0.1);padding:8px 18px;border-radius:100px;margin-bottom:24px;transition:all .2s;backdrop-filter:blur(8px)}
.back-to-blog:hover{border-color:rgba(99,102,241,0.4);color:#fff;background:rgba(99,102,241,0.08)}
.breadcrumb{font-size:12px;color:#71717a;margin-bottom:16px}
.breadcrumb a{color:#a1a1aa;transition:color .2s}
.breadcrumb a:hover{color:#6366f1}
.breadcrumb-sep{margin:0 8px;color:#3f3f46}
.article-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;font-size:13px;color:#a1a1aa;margin-bottom:20px}
.type-badge{display:inline-flex;align-items:center;gap:5px;font-weight:700;padding:6px 16px;border-radius:10px;font-size:12px;letter-spacing:.4px;text-transform:uppercase;box-shadow:0 0 20px rgba(99,102,241,0.08)}
.type-cours{color:#818cf8;background:rgba(99,102,241,0.12)}
.type-quiz{color:#fbbf24;background:rgba(245,158,11,0.12)}
.type-exercice,.type-exercices{color:#4ade80;background:rgba(34,197,94,0.12)}
.type-fiche,.type-fiches{color:#38bdf8;background:rgba(59,130,246,0.12)}
.type-flashcards{color:#c084fc;background:rgba(192,132,252,0.12)}
.type-formules{color:#60a5fa;background:rgba(96,165,250,0.12)}
.type-glossaire{color:#fb923c;background:rgba(251,146,60,0.12)}
.type-annales{color:#f87171;background:rgba(248,113,113,0.12)}
.article-title{font-size:clamp(1.6rem,5vw,2.6rem);font-weight:900;line-height:1.15;color:#f5f5f7;letter-spacing:-1px;margin-bottom:16px}
.article-subtitle{font-size:17px;color:#a1a1aa;line-height:1.6;max-width:600px;margin:0 auto}

/* ═══ TABLE OF CONTENTS ═══ */.toc{max-width:760px;margin:24px auto 32px;padding:20px 24px;background:rgba(99,102,241,0.04);border:1px solid rgba(99,102,241,0.1);border-radius:16px;backdrop-filter:blur(8px)}.toc ol{list-style:none;margin:0;padding:0;columns:2;column-gap:24px}.toc li{margin:0 0 8px;padding:0;break-inside:avoid}.toc li a{display:flex;align-items:center;gap:8px;font-size:13px;color:#a1a1aa;padding:6px 12px;border-radius:8px;transition:all .2s;text-decoration:none;border:1px solid transparent}.toc li a:hover{color:#818cf8;background:rgba(99,102,241,0.08);border-color:rgba(99,102,241,0.15);transform:translateX(3px)}.toc li a::before{content:counter(toc-item);counter-increment:toc-item;display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;background:rgba(99,102,241,0.12);color:#818cf8;border-radius:6px;font-size:11px;font-weight:700}.toc ol{counter-reset:toc-item}@media(max-width:600px){.toc ol{columns:1}.toc{margin:16px 12px 0;padding:16px}}
/* ═══ DISCLAIMER ═══ */
.disclaimer-banner{max-width:760px;margin:20px auto 0;padding:10px 16px;background:rgba(99,102,241,0.04);border-left:2px solid rgba(99,102,241,0.3);border-radius:0 8px 8px 0;font-size:12px;color:#71717a;line-height:1.5}
.disclaimer-banner i{color:rgba(99,102,241,0.5);margin-right:6px;font-size:11px}

/* ═══ CONTENT ═══ */
.article-content{max-width:760px;margin:0 auto;padding:48px 24px 60px}
.article-container{max-width:100%}

/* Headings */
.article-content h2,h2{font-size:1.35rem;font-weight:800;color:#f5f5f7;margin:48px 0 18px;padding-bottom:12px;border-bottom:1px solid rgba(99,102,241,0.12);letter-spacing:-.3px;position:relative}
.article-content h2::before{content:'';position:absolute;bottom:-1px;left:0;width:40px;height:2px;background:#6366f1;border-radius:2px}
.article-content h3,h3{font-size:1.1rem;font-weight:700;color:#d4d4d8;margin:28px 0 12px}

/* Text */
.article-content p,p{font-size:15px;line-height:1.85;color:#a1a1aa;margin-bottom:16px}
.article-content p:first-of-type{font-size:17px;line-height:1.8;color:#d4d4d8}
strong{color:#e4e4e7}

/* Lists */
ul,ol{margin:16px 0 20px 32px;color:#a1a1aa;font-size:15px;line-height:1.85}
li{margin-bottom:10px;padding-left:4px}
li::marker{color:#6366f1;font-weight:700}

/* ═══ BOXES — Enhanced ═══ */
.highlight-box,.definition-box,.example-box,.warning-box,.formula-box,.step-box,.theorem-box{border-radius:0 12px 12px 0;padding:18px 20px;margin:22px 0;font-size:14px;line-height:1.75;color:#d4d4d8;position:relative;transition:transform .15s,box-shadow .15s}
.highlight-box:hover,.definition-box:hover,.example-box:hover,.warning-box:hover,.formula-box:hover{transform:translateX(3px)}
.highlight-box{background:rgba(99,102,241,0.07);border-left:3px solid #6366f1}
.definition-box{background:rgba(139,92,246,0.07);border-left:3px solid #8b5cf6}
.example-box{background:rgba(34,197,94,0.06);border-left:3px solid #22c55e}
.warning-box{background:rgba(239,68,68,0.06);border-left:3px solid #ef4444}
.formula-box{background:rgba(59,130,246,0.06);border-left:3px solid #3b82f6}
.step-box{background:rgba(245,158,11,0.06);border-left:3px solid #f59e0b}
.theorem-box{background:rgba(139,92,246,0.06);border-left:3px solid #a78bfa}
.highlight-box p,.definition-box p,.example-box p,.warning-box p,.formula-box p,.step-box p,.theorem-box p{margin-bottom:6px;color:#d4d4d8;font-size:14px}
.highlight-box strong{color:#818cf8}
.definition-box strong{color:#a78bfa}
.example-box strong{color:#4ade80}
.warning-box strong{color:#f87171}
.formula-box strong{color:#60a5fa}
.step-box strong{color:#fbbf24}
.theorem-box strong{color:#c084fc}

/* ═══ TABLE — Enhanced ═══ */
table{width:100%;border-collapse:collapse;margin:24px 0;font-size:14px;border-radius:12px;overflow:hidden;border:1px solid rgba(255,255,255,0.06)}
th{background:rgba(99,102,241,0.1);padding:13px 16px;text-align:left;font-weight:700;color:#e4e4e7;font-size:12px;text-transform:uppercase;letter-spacing:.6px}
td{padding:12px 16px;border-bottom:1px solid rgba(255,255,255,0.04);color:#a1a1aa;transition:background .15s}
tr:nth-child(even) td{background:rgba(255,255,255,0.015)}
tr:hover td{background:rgba(99,102,241,0.04)}

/* ═══ CODE ═══ */
code{background:rgba(255,255,255,0.06);padding:2px 7px;border-radius:5px;font-size:13px;font-family:'JetBrains Mono',monospace;color:#a78bfa}
pre{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.08);border-radius:12px;padding:20px;margin:20px 0;overflow-x:auto}
pre code{background:none;padding:0}

/* ═══ KATEX ═══ */
.katex{font-size:1.05em}
.katex-display{margin:24px 0;overflow-x:auto;padding:12px 0}

/* ═══ CTA EXPLORE ═══ */
.cta-explore{max-width:760px;margin:32px auto 0;padding:28px 32px;background:linear-gradient(135deg,rgba(99,102,241,0.06) 0%,rgba(139,92,246,0.04) 100%);border:1px solid rgba(99,102,241,0.1);border-radius:16px;text-align:center;transition:border-color .2s}
.cta-explore:hover{border-color:rgba(99,102,241,0.25)}
.cta-explore p{font-size:14px;color:#a1a1aa;margin:0}
.cta-explore a{color:#818cf8;font-weight:700;transition:all .2s;padding:6px 16px;border-radius:8px}
.cta-explore a:hover{color:#fff;background:rgba(99,102,241,0.15);text-decoration:none}

/* ═══ SMOOTH SCROLL ═══ */
html{scroll-behavior:smooth}

/* ═══ REVEAL SYSTEM (click/tap to reveal) ═══ */
/* Flashcards — blur to clear */
.format-flashcards li.revealed,.format-flashcards li.revealed p{color:#d4d4d8!important;text-shadow:none!important}
.format-flashcards li.revealed{border-color:rgba(192,132,252,0.3)!important;background:linear-gradient(135deg,rgba(192,132,252,0.08) 0%,rgba(139,92,246,0.04) 100%)!important;box-shadow:0 8px 30px rgba(192,132,252,0.12)!important}
.format-flashcards li.revealed::after{opacity:0!important}

/* Quiz — blur only the LAST ol (answer options), not educational ol */
.format-quiz li{cursor:pointer;position:relative}
.format-quiz ol:last-of-type>li:not(.revealed){color:transparent;text-shadow:0 0 8px rgba(251,191,36,0.3)}
.format-quiz ol:last-of-type>li:not(.revealed) strong{text-shadow:none;color:#fbbf24}
.format-quiz ol:last-of-type>li:not(.revealed)::after{content:'tap to reveal';position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:10px;color:rgba(251,191,36,0.25);letter-spacing:.5px;text-shadow:none}
.format-quiz ol:last-of-type>li:hover,.format-quiz ol:last-of-type>li.revealed{color:#d4d4d8!important;text-shadow:none!important;border-color:rgba(251,191,36,0.3)!important;background:rgba(251,191,36,0.08)!important;box-shadow:0 0 20px rgba(251,191,36,0.08)!important}
.format-quiz ol:last-of-type>li:hover::after,.format-quiz ol:last-of-type>li.revealed::after{opacity:0!important}
/* Other lists = no blur, just click highlight */
.format-quiz li.revealed{border-color:rgba(251,191,36,0.3)!important;background:rgba(251,191,36,0.08)!important}
.format-quiz ul>li.revealed::after{content:'✓';position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:16px;color:#fbbf24}

/* Exercices — blur only the LAST ol (exercise section), not educational ol */
.format-exercices li{cursor:pointer;position:relative}
.format-exercices ol:last-of-type>li:not(.revealed){color:transparent;text-shadow:0 0 8px rgba(34,197,94,0.3)}
.format-exercices ol:last-of-type>li:not(.revealed) strong{text-shadow:none;color:#4ade80}
.format-exercices ol:last-of-type>li:not(.revealed)::after{content:'tap to reveal';position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:10px;color:rgba(34,197,94,0.25);letter-spacing:.5px;text-shadow:none}
.format-exercices ol:last-of-type>li:hover,.format-exercices ol:last-of-type>li.revealed{color:#d4d4d8!important;text-shadow:none!important;border-color:rgba(34,197,94,0.3)!important;background:rgba(34,197,94,0.06)!important}
.format-exercices ol:last-of-type>li:hover::after,.format-exercices ol:last-of-type>li.revealed::after{opacity:0!important}
/* Other lists = no blur, just click highlight */
.format-exercices li.revealed{border-color:rgba(34,197,94,0.3)!important;background:rgba(34,197,94,0.06)!important;box-shadow:0 0 20px rgba(34,197,94,0.08)!important}

/* Annales — no blur (mixed educational + exercise content), click highlight only */
.format-annales li{cursor:pointer;position:relative}
.format-annales li.revealed{border-color:rgba(248,113,113,0.3)!important;background:rgba(248,113,113,0.06)!important;box-shadow:0 0 20px rgba(248,113,113,0.08)!important}
.format-annales li.revealed::after{content:'✓';position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:16px;color:#f87171}

/* ═══ FOOTER CARD ═══ */
.article-footer-card{max-width:760px;margin:0 auto;padding:24px;border-top:1px solid rgba(255,255,255,0.06);text-align:center}
.footer-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px;justify-content:center}
.footer-action-btn{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);color:#a1a1aa;padding:10px 18px;border-radius:10px;font-size:13px;font-family:inherit;cursor:pointer;transition:all .2s}
.footer-action-btn:hover{border-color:rgba(99,102,241,0.3);color:#6366f1;transform:translateY(-1px)}
.article-license{font-size:12px;color:#3f3f46;text-align:center;margin-top:8px}

/* ═══ FOOTER ═══ */
footer{text-align:center;padding:40px 24px;font-size:13px;color:#52525b;border-top:1px solid rgba(255,255,255,0.04)}
footer a{color:#71717a;text-decoration:none}
footer a:hover{color:#6366f1}

/* ═══ COLORBLIND ═══ */
#colorblind-filters{display:none}


/* ═══════════════════════════════════════════════════════════
   FORMAT-SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════ */

/* ═══ COURS — Rich educational article (default) ═══ */
.format-cours .article-hero{background:linear-gradient(160deg,#1a1040 0%,#0d0820 60%,#000 100%)}

/* ═══ FICHES — Compact revision sheet ═══ */
.format-fiches .article-hero{background:linear-gradient(160deg,#0a1628 0%,#071020 60%,#000 100%)}
.format-fiches .article-hero::before{background:radial-gradient(circle,rgba(56,189,248,0.08) 0%,transparent 70%)}
.format-fiches .article-content{padding:28px 24px 48px;max-width:820px}
.format-fiches .article-content h2{font-size:1.05rem;margin:24px 0 10px;border-bottom-color:rgba(56,189,248,0.2);color:#38bdf8;text-transform:uppercase;letter-spacing:.8px;font-size:12px}
.format-fiches .article-content h2::before{background:#38bdf8}
.format-fiches .article-content p{font-size:13.5px;line-height:1.65;margin-bottom:10px;color:#94a3b8}
.format-fiches .article-content p:first-of-type{font-size:14px;color:#94a3b8}
.format-fiches .highlight-box,.format-fiches .definition-box,.format-fiches .example-box,.format-fiches .warning-box{padding:12px 16px;margin:12px 0;font-size:12.5px;line-height:1.6;border-radius:0 10px 10px 0}
.format-fiches .highlight-box{border-left-color:#38bdf8;background:rgba(56,189,248,0.05)}
.format-fiches .highlight-box strong{color:#38bdf8}
.format-fiches .definition-box{border-left-color:#818cf8;background:rgba(99,102,241,0.05)}
.format-fiches .definition-box strong{color:#818cf8}
.format-fiches .example-box strong{color:#4ade80}
.format-fiches .warning-box strong{color:#f87171}
.format-fiches table{font-size:12px;border-color:rgba(56,189,248,0.1)}
.format-fiches th{padding:8px 12px;font-size:11px;background:rgba(56,189,248,0.08);color:#38bdf8}
.format-fiches td{padding:8px 12px}
.format-fiches ul,.format-fiches ol{font-size:13.5px;line-height:1.65;margin:10px 0 14px 24px}
.format-fiches li{margin-bottom:4px;padding-left:2px}
.format-fiches li strong{color:#38bdf8}
.format-fiches strong{color:#cbd5e1}

/* ═══ QUIZ — Question/answer feel ═══ */
.format-quiz .article-hero{background:linear-gradient(160deg,#1a1400 0%,#0d0a00 60%,#000 100%)}
.format-quiz .article-hero::before{background:radial-gradient(circle,rgba(251,191,36,0.08) 0%,transparent 70%)}
.format-quiz .article-content h2{border-bottom-color:rgba(251,191,36,0.2);color:#fbbf24}
.format-quiz .article-content h2::before{background:#fbbf24}
.format-quiz .highlight-box{background:rgba(251,191,36,0.06);border-left:4px solid #f59e0b;border-radius:0 14px 14px 0;padding:20px 24px}
.format-quiz .highlight-box strong{color:#fbbf24}
.format-quiz .example-box{background:rgba(34,197,94,0.06);border-left:4px solid #22c55e;border-radius:0 14px 14px 0;padding:20px 24px}
.format-quiz .example-box strong{color:#4ade80}
.format-quiz .definition-box{background:rgba(251,191,36,0.05);border-left:4px solid #fbbf24;border-radius:0 14px 14px 0;padding:20px 24px}
.format-quiz .warning-box{border-left:4px solid #ef4444;border-radius:0 14px 14px 0;padding:20px 24px}
.format-quiz ol{counter-reset:quiz-counter;margin-left:0;padding-left:0}
.format-quiz ol>li{counter-increment:quiz-counter;list-style:none;position:relative;padding:16px 20px 16px 56px;margin-bottom:12px;background:rgba(251,191,36,0.03);border:1px solid rgba(251,191,36,0.08);border-radius:12px;transition:all .2s}
.format-quiz ol>li:hover{border-color:rgba(251,191,36,0.2);background:rgba(251,191,36,0.06)}
.format-quiz ol>li::before{content:"Q" counter(quiz-counter);position:absolute;left:16px;top:16px;color:#000;background:#fbbf24;font-weight:800;font-size:11px;padding:3px 8px;border-radius:6px;letter-spacing:.5px}
.format-quiz ul>li{padding:12px 16px;margin-bottom:8px;background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.06);border-radius:10px;list-style:none;transition:all .2s;cursor:default}
.format-quiz ul>li:hover{border-color:rgba(251,191,36,0.2);background:rgba(251,191,36,0.04)}
.format-quiz ul>li::marker{content:""}
.format-quiz .article-content p:first-of-type{font-size:15px;color:#a1a1aa}
.format-quiz .article-content h2:last-of-type{color:#22c55e;border-bottom-color:rgba(34,197,94,0.2)}
.format-quiz .article-content h2:last-of-type::before{background:#22c55e}


/* ═══ EXERCICES — Practice / workout ═══ */
.format-exercices .article-hero{background:linear-gradient(160deg,#0a1a0a 0%,#050d05 60%,#000 100%)}
.format-exercices .article-hero::before{background:radial-gradient(circle,rgba(34,197,94,0.08) 0%,transparent 70%)}
.format-exercices .article-content h2{border-bottom-color:rgba(74,222,128,0.2);color:#4ade80}
.format-exercices .article-content h2::before{background:#22c55e}
.format-exercices .highlight-box{background:rgba(34,197,94,0.06);border-left:4px solid #22c55e;border-radius:0 14px 14px 0}
.format-exercices .highlight-box strong{color:#4ade80}
.format-exercices .example-box{background:rgba(59,130,246,0.06);border-left:4px solid #3b82f6;border-radius:0 14px 14px 0}
.format-exercices .definition-box{background:rgba(34,197,94,0.04);border-left:4px solid #22c55e}
.format-exercices ol{counter-reset:exo-counter;margin-left:0;padding-left:0}
.format-exercices ol>li{counter-increment:exo-counter;list-style:none;position:relative;padding:18px 20px 18px 60px;margin-bottom:12px;background:rgba(34,197,94,0.03);border:1px solid rgba(34,197,94,0.08);border-radius:12px;transition:all .2s}
.format-exercices ol>li:hover{border-color:rgba(34,197,94,0.2);background:rgba(34,197,94,0.06)}
.format-exercices ol>li::before{content:"" counter(exo-counter);position:absolute;left:16px;top:18px;color:#000;background:#4ade80;font-weight:800;font-size:12px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:50%}
.format-exercices .article-content p:first-of-type{font-size:15px;color:#a1a1aa}
.format-exercices ul{list-style:none;margin-left:0;padding-left:0}
.format-exercices ul>li{padding:14px 18px;margin-bottom:10px;background:rgba(34,197,94,0.02);border:1px solid rgba(34,197,94,0.06);border-radius:10px;transition:all .2s;position:relative;padding-left:20px}
.format-exercices ul>li:hover{border-color:rgba(34,197,94,0.15);background:rgba(34,197,94,0.05)}
.format-exercices ul>li::marker{content:""}
.format-exercices ul>li strong{color:#4ade80}
.format-exercices .warning-box{border-left:4px solid #ef4444;border-radius:0 14px 14px 0;background:rgba(239,68,68,0.06)}
.format-exercices table{border-color:rgba(34,197,94,0.1)}
.format-exercices th{background:rgba(34,197,94,0.1);color:#4ade80;font-size:11px}
.format-exercices .article-content h2:nth-last-of-type(2){color:#fff;background:linear-gradient(135deg,rgba(34,197,94,0.12) 0%,rgba(34,197,94,0.04) 100%);margin-left:-24px;margin-right:-24px;padding:20px 24px 14px;border-radius:16px 16px 0 0;border-bottom:2px solid #22c55e;font-size:1.4rem;letter-spacing:-.5px}
.format-exercices .article-content h2:nth-last-of-type(2)::before{display:none}

/* ═══ FLASHCARDS — Card-like blocks ═══ */
.format-flashcards .article-hero{background:linear-gradient(160deg,#1a0a28 0%,#0d0518 60%,#000 100%)}
.format-flashcards .article-hero::before{background:radial-gradient(circle,rgba(192,132,252,0.1) 0%,transparent 70%)}
.format-flashcards .article-content h2{font-size:1rem;border-bottom:none;margin:36px 0 16px;color:#c084fc;text-transform:uppercase;letter-spacing:1px;font-size:11px;padding-bottom:0}
.format-flashcards .article-content h2::before{display:none}
.format-flashcards .article-content h2::after{content:'';display:block;width:30px;height:2px;background:#c084fc;margin-top:8px;border-radius:2px}
.format-flashcards .article-content p{font-size:14px;line-height:1.7}
.format-flashcards .article-content p:first-of-type{font-size:14px;color:#a1a1aa}
.format-flashcards .highlight-box,.format-flashcards .definition-box{background:rgba(192,132,252,0.04);border:1px solid rgba(192,132,252,0.12);border-left:4px solid #c084fc;border-radius:16px;padding:24px;margin:16px 0;transition:all .25s cubic-bezier(.4,0,.2,1)}
.format-flashcards .highlight-box:hover,.format-flashcards .definition-box:hover{transform:translateY(-4px) scale(1.005);box-shadow:0 12px 40px rgba(192,132,252,0.15);border-color:rgba(192,132,252,0.3)}
.format-flashcards .highlight-box strong{color:#c084fc}
.format-flashcards .definition-box strong{color:#a78bfa}
.format-flashcards .example-box{background:rgba(34,197,94,0.03);border:1px solid rgba(34,197,94,0.1);border-left:4px solid #22c55e;border-radius:16px;padding:24px;margin:16px 0;transition:all .25s cubic-bezier(.4,0,.2,1)}
.format-flashcards .example-box:hover{transform:translateY(-4px);box-shadow:0 12px 40px rgba(34,197,94,0.1)}
.format-flashcards .example-box strong{color:#4ade80}
.format-flashcards .warning-box{border:1px solid rgba(239,68,68,0.1);border-left:4px solid #ef4444;border-radius:16px;padding:24px;margin:16px 0;transition:all .25s}
.format-flashcards .warning-box:hover{transform:translateY(-2px)}
.format-flashcards .warning-box strong{color:#f87171}
.format-flashcards .formula-box{background:rgba(59,130,246,0.03);border:1px solid rgba(59,130,246,0.1);border-left:4px solid #3b82f6;border-radius:16px;padding:24px;margin:16px 0;transition:all .25s}
.format-flashcards .formula-box:hover{transform:translateY(-2px)}
.format-flashcards ul{list-style:none;margin:12px 0;padding:0}
.format-flashcards ul>li{padding:18px 22px;margin-bottom:12px;background:linear-gradient(135deg,rgba(192,132,252,0.04) 0%,rgba(139,92,246,0.02) 100%);border:1px solid rgba(192,132,252,0.1);border-radius:14px;transition:all .3s cubic-bezier(.4,0,.2,1);cursor:pointer;position:relative;color:transparent;text-shadow:0 0 8px rgba(192,132,252,0.3)}
.format-flashcards ul>li::after{content:'hover to reveal';position:absolute;right:18px;top:50%;transform:translateY(-50%);font-size:10px;color:rgba(192,132,252,0.25);letter-spacing:.5px;text-shadow:none;transition:opacity .3s}
.format-flashcards ul>li strong{color:#c084fc;text-shadow:none;font-size:15px}
.format-flashcards ul>li:hover,.format-flashcards ul>li.revealed{color:#d4d4d8;text-shadow:none;border-color:rgba(192,132,252,0.3);background:linear-gradient(135deg,rgba(192,132,252,0.08) 0%,rgba(139,92,246,0.04) 100%);box-shadow:0 8px 30px rgba(192,132,252,0.12);transform:translateY(-3px)}
.format-flashcards ul>li:hover::after,.format-flashcards ul>li.revealed::after{opacity:0}
.format-flashcards ul>li p{color:inherit;text-shadow:inherit}
.format-flashcards ol{list-style:none;counter-reset:fc-counter;margin:12px 0;padding:0}
.format-flashcards ol>li{counter-increment:fc-counter;padding:18px 22px 18px 52px;margin-bottom:12px;background:linear-gradient(135deg,rgba(192,132,252,0.04) 0%,rgba(139,92,246,0.02) 100%);border:1px solid rgba(192,132,252,0.1);border-radius:14px;position:relative;transition:all .3s cubic-bezier(.4,0,.2,1);cursor:pointer;color:transparent;text-shadow:0 0 8px rgba(192,132,252,0.3)}
.format-flashcards ol>li::before{content:counter(fc-counter);position:absolute;left:16px;top:18px;width:24px;height:24px;background:#c084fc;color:#000;font-weight:800;font-size:12px;display:flex;align-items:center;justify-content:center;border-radius:50%;text-shadow:none}
.format-flashcards ol>li::after{content:'hover to reveal';position:absolute;right:18px;top:50%;transform:translateY(-50%);font-size:10px;color:rgba(192,132,252,0.25);letter-spacing:.5px;text-shadow:none;transition:opacity .3s}
.format-flashcards ol>li strong{color:#c084fc;text-shadow:none;font-size:15px}
.format-flashcards ol>li:hover,.format-flashcards ol>li.revealed{color:#d4d4d8;text-shadow:none;border-color:rgba(192,132,252,0.3);background:linear-gradient(135deg,rgba(192,132,252,0.08) 0%,rgba(139,92,246,0.04) 100%);box-shadow:0 8px 30px rgba(192,132,252,0.12);transform:translateY(-3px)}
.format-flashcards ol>li:hover::after,.format-flashcards ol>li.revealed::after{opacity:0}
.format-flashcards ol>li p{color:inherit;text-shadow:inherit}
.format-flashcards table{border-color:rgba(192,132,252,0.1)}
.format-flashcards th{background:rgba(192,132,252,0.08);color:#c084fc;font-size:11px}

/* ═══ FORMULES — Clean, math-focused ═══ */
.format-formules .article-hero{background:linear-gradient(160deg,#0a0a1a 0%,#050518 60%,#000 100%)}
.format-formules .article-hero::before{background:radial-gradient(circle,rgba(59,130,246,0.08) 0%,transparent 70%)}
.format-formules .article-content{max-width:700px}
.format-formules .article-content h2{border-bottom-color:rgba(96,165,250,0.15);color:#60a5fa;font-size:1.1rem}
.format-formules .article-content h2::before{background:#3b82f6}
.format-formules .article-content p{font-size:14px;line-height:1.7;color:#94a3b8}
.format-formules .article-content p:first-of-type{font-size:14px;color:#94a3b8}
.format-formules .katex-display{background:rgba(59,130,246,0.04);border:1px solid rgba(59,130,246,0.12);border-radius:14px;padding:24px 20px;margin:28px 0;text-align:center;box-shadow:0 4px 20px rgba(59,130,246,0.06)}
.format-formules .formula-box{background:rgba(59,130,246,0.06);border:1px solid rgba(59,130,246,0.12);border-left:4px solid #3b82f6;border-radius:0 14px 14px 0;padding:24px;font-size:15px;transition:all .2s}
.format-formules .formula-box:hover{box-shadow:0 4px 20px rgba(59,130,246,0.1);transform:translateX(3px)}
.format-formules .formula-box strong{color:#60a5fa}
.format-formules .highlight-box{background:rgba(96,165,250,0.04);border-left-color:#60a5fa}
.format-formules .highlight-box strong{color:#60a5fa}
.format-formules .definition-box{border-left-color:#818cf8}
.format-formules .definition-box strong{color:#818cf8}
.format-formules ul,.format-formules ol{font-size:14px}
.format-formules li strong{color:#60a5fa}
.format-formules table{border-color:rgba(59,130,246,0.1)}
.format-formules th{background:rgba(59,130,246,0.08);color:#60a5fa;font-size:11px}

/* ═══ GLOSSAIRE — Dictionary / Encyclopedia ═══ */
.format-glossaire .article-hero{background:linear-gradient(160deg,#1a1410 0%,#0d0a08 60%,#000 100%)}
.format-glossaire .article-hero::before{background:radial-gradient(circle,rgba(251,146,60,0.1) 0%,transparent 70%)}
.format-glossaire .article-content h2{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;border-bottom:2px solid rgba(251,146,60,0.12);color:#fb923c;margin:36px 0 16px;padding-bottom:12px}
.format-glossaire .article-content h2::before{background:#fb923c;height:3px;width:50px}
.format-glossaire .article-content h2::after{content:'§';float:right;color:rgba(251,146,60,0.2);font-size:16px;text-transform:none;letter-spacing:0}
.format-glossaire .article-content p{font-size:14px;line-height:1.7}
.format-glossaire .article-content p:first-of-type{font-size:14px;color:#a1a1aa}
.format-glossaire .definition-box{background:linear-gradient(135deg,rgba(251,146,60,0.05) 0%,rgba(251,146,60,0.02) 100%);border:1px solid rgba(251,146,60,0.1);border-left:4px solid #fb923c;border-radius:0 16px 16px 0;padding:22px 26px;margin:16px 0;transition:all .25s cubic-bezier(.4,0,.2,1)}
.format-glossaire .definition-box:hover{border-color:rgba(251,146,60,0.3);box-shadow:0 8px 30px rgba(251,146,60,0.08);transform:translateY(-2px)}
.format-glossaire .definition-box strong{color:#fb923c;font-size:13px;text-transform:uppercase;letter-spacing:.5px}
.format-glossaire .highlight-box{background:rgba(251,146,60,0.03);border-left-color:#f97316}
.format-glossaire .highlight-box strong{color:#fb923c}
.format-glossaire ul{list-style:none;margin-left:0;padding:0}
.format-glossaire ul>li{padding:18px 22px;margin-bottom:10px;border:1px solid rgba(251,146,60,0.06);border-left:3px solid rgba(251,146,60,0.2);border-radius:0 14px 14px 0;font-size:14px;transition:all .25s cubic-bezier(.4,0,.2,1);background:rgba(251,146,60,0.02)}
.format-glossaire ul>li:hover{border-left-color:#fb923c;background:rgba(251,146,60,0.06);transform:translateX(6px);box-shadow:0 4px 20px rgba(251,146,60,0.06)}
.format-glossaire ul>li strong{color:#fb923c;font-size:15px;display:block;margin-bottom:6px;letter-spacing:.2px}
.format-glossaire ol{list-style:none;counter-reset:glossary-counter;margin-left:0;padding:0}
.format-glossaire ol>li{counter-increment:glossary-counter;padding:18px 22px 18px 52px;margin-bottom:10px;border:1px solid rgba(251,146,60,0.06);border-radius:14px;font-size:14px;position:relative;transition:all .25s;background:rgba(251,146,60,0.02)}
.format-glossaire ol>li:hover{border-color:rgba(251,146,60,0.2);background:rgba(251,146,60,0.05);box-shadow:0 4px 20px rgba(251,146,60,0.06)}
.format-glossaire ol>li::before{content:counter(glossary-counter);position:absolute;left:16px;top:18px;width:24px;height:24px;background:linear-gradient(135deg,#fb923c,#f97316);color:#000;font-weight:800;font-size:11px;display:flex;align-items:center;justify-content:center;border-radius:8px}
.format-glossaire ol>li strong{color:#fb923c}
.format-glossaire table{border:1px solid rgba(251,146,60,0.1);border-radius:14px;overflow:hidden}
.format-glossaire th{background:linear-gradient(135deg,rgba(251,146,60,0.1),rgba(251,146,60,0.06));color:#fb923c;font-size:11px;letter-spacing:.8px}
.format-glossaire td{border-bottom-color:rgba(251,146,60,0.06)}
.format-glossaire td strong{color:#fb923c}
.format-glossaire tr:hover td{background:rgba(251,146,60,0.03)}

/* ═══ ANNALES — Exam paper style ═══ */
.format-annales .article-hero{background:linear-gradient(160deg,#1a0a0a 0%,#0d0505 60%,#000 100%)}
.format-annales .article-hero::before{background:radial-gradient(circle,rgba(248,113,113,0.08) 0%,transparent 70%)}
.format-annales .article-content h2{border-bottom-color:rgba(248,113,113,0.15);color:#f87171}
.format-annales .article-content h2::before{background:#ef4444}
.format-annales .article-content p:first-of-type{font-size:15px;color:#a1a1aa}
.format-annales .highlight-box{background:rgba(248,113,113,0.04);border:1px solid rgba(248,113,113,0.1);border-left:4px solid #f87171;border-radius:0 14px 14px 0;padding:20px 24px}
.format-annales .highlight-box strong{color:#f87171}
.format-annales .warning-box{background:rgba(248,113,113,0.06);border:1px solid rgba(248,113,113,0.12);border-left:4px solid #dc2626;border-radius:0 14px 14px 0;padding:20px 24px;font-weight:600}
.format-annales .warning-box strong{color:#ef4444}
.format-annales .example-box{background:rgba(34,197,94,0.04);border:1px solid rgba(34,197,94,0.1);border-left:4px solid #22c55e;border-radius:0 14px 14px 0;padding:20px 24px}
.format-annales .example-box strong{color:#4ade80}
.format-annales .definition-box{border-left-color:#f87171}
.format-annales .definition-box strong{color:#f87171}
.format-annales ol{counter-reset:exam-counter;list-style:none;margin-left:0;padding:0}
.format-annales ol>li{counter-increment:exam-counter;position:relative;padding:18px 22px 18px 64px;margin-bottom:12px;background:rgba(248,113,113,0.03);border:1px solid rgba(248,113,113,0.08);border-radius:12px;transition:all .2s;cursor:pointer}
.format-annales ol>li:hover{border-color:rgba(248,113,113,0.2);background:rgba(248,113,113,0.06)}
.format-annales ol>li::before{content:"Ex." counter(exam-counter);position:absolute;left:14px;top:18px;color:#000;background:#f87171;font-weight:800;font-size:10px;padding:4px 8px;border-radius:6px;letter-spacing:.5px;text-shadow:none}
.format-annales ol>li strong{color:#f87171}
.format-annales ul{list-style:none;margin-left:0;padding:0}
.format-annales ul>li{padding:14px 20px;margin-bottom:8px;background:rgba(248,113,113,0.02);border:1px solid rgba(248,113,113,0.06);border-radius:10px;transition:all .2s}
.format-annales ul>li:hover{border-color:rgba(248,113,113,0.15);transform:translateX(4px)}
.format-annales ul>li strong{color:#f87171}
.format-annales table{border-color:rgba(248,113,113,0.1)}
.format-annales th{background:rgba(248,113,113,0.08);color:#f87171;font-size:11px}

/* ═══ FORUM (QA) — Reddit/StackOverflow inspired ═══ */
.format-qa .banner{background:linear-gradient(90deg,rgba(99,102,241,0.08),rgba(139,92,246,0.04));border-bottom:1px solid rgba(99,102,241,0.1);padding:10px 20px;text-align:center;font-size:12px;color:#71717a}
.format-qa .banner b{color:#6366f1}
.format-qa .back-link{display:inline-flex;align-items:center;gap:8px;color:#a1a1aa;font-size:13px;text-decoration:none;border:1px solid rgba(255,255,255,0.08);padding:8px 18px;border-radius:100px;margin-bottom:20px;transition:all .2s}
.format-qa .back-link:hover{border-color:rgba(99,102,241,0.4);color:#fff;background:rgba(99,102,241,0.08)}
.format-qa .container{max-width:780px;margin:0 auto;padding:40px 20px 60px}
.format-qa .qa-tags{margin-bottom:16px;display:flex;gap:8px}
.format-qa .qa-tag{display:inline-block;font-size:10px;font-weight:700;color:#6366f1;background:rgba(99,102,241,0.1);padding:5px 14px;border-radius:100px;letter-spacing:.5px;text-transform:uppercase;border:1px solid rgba(99,102,241,0.15)}
.format-qa h1{font-size:clamp(1.4rem,3vw,2.2rem);font-weight:900;line-height:1.25;margin-bottom:16px;color:#f5f5f7;letter-spacing:-.5px}
.format-qa .qa-meta{display:flex;flex-wrap:wrap;gap:16px;font-size:12px;color:#71717a;margin-bottom:28px;padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,0.04)}
/* Original question */
.format-qa .container>p:first-of-type,.format-qa .container>div.qa-meta+p{font-size:16px;line-height:1.7;color:#d4d4d8;padding:20px 24px;background:rgba(99,102,241,0.03);border:1px solid rgba(99,102,241,0.08);border-radius:16px;margin-bottom:24px}
/* Replies */
.format-qa .qa-reply{background:rgba(255,255,255,0.015);border:1px solid rgba(255,255,255,0.05);border-radius:18px;padding:24px 28px;margin-bottom:16px;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;border-left:3px solid transparent}
.format-qa .qa-reply:hover{border-color:rgba(255,255,255,0.08);border-left-color:rgba(99,102,241,0.4);background:rgba(99,102,241,0.02);transform:translateY(-2px);box-shadow:0 12px 40px rgba(0,0,0,0.25)}
/* Best answer — green glow */
.format-qa .qa-reply.best{background:linear-gradient(135deg,rgba(34,197,94,0.04) 0%,rgba(34,197,94,0.01) 100%);border:1px solid rgba(34,197,94,0.12);border-left:3px solid #22c55e}
.format-qa .qa-reply.best:hover{border-color:rgba(34,197,94,0.25);border-left-color:#22c55e;box-shadow:0 12px 40px rgba(34,197,94,0.1)}
.format-qa .qa-reply.best::before{content:"✓ Best Answer";display:inline-block;font-size:10px;font-weight:800;color:#22c55e;background:rgba(34,197,94,0.1);padding:5px 16px;border-radius:100px;margin-bottom:16px;letter-spacing:.5px;text-transform:uppercase;border:1px solid rgba(34,197,94,0.15)}
/* Header */
.format-qa .qa-reply-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.format-qa .qa-username{font-size:13px;font-weight:800;color:#818cf8;letter-spacing:.2px;padding-left:28px;position:relative}
.format-qa .qa-username::before{content:"";position:absolute;left:0;top:1px;width:20px;height:20px;background:linear-gradient(135deg,#6366f1,#818cf8);border-radius:50%}
.format-qa .qa-time{font-size:11px;color:#3f3f46;font-style:italic}
/* Body */
.format-qa .qa-reply-body{font-size:15px;line-height:1.8;color:#d4d4d8}
.format-qa .qa-reply-body p{margin-bottom:10px}
/* Votes */
.format-qa .qa-reply-votes{margin-top:14px;font-size:12px;color:#52525b;display:inline-flex;align-items:center;gap:6px;padding:4px 12px;background:rgba(255,255,255,0.03);border-radius:100px;border:1px solid rgba(255,255,255,0.04);transition:all .2s}
.format-qa .qa-reply-votes:hover{border-color:rgba(99,102,241,0.2);color:#818cf8}
.format-qa .qa-reply-votes::before{content:"▲";font-size:10px;color:#6366f1}
.format-qa .highlight-box{background:rgba(99,102,241,0.06);border-left:3px solid #6366f1;border-radius:0 10px 10px 0;padding:14px 16px;margin:12px 0;font-size:14px;color:#d4d4d8}
.format-qa .example-box{background:rgba(34,197,94,0.05);border-left:3px solid #22c55e;border-radius:0 10px 10px 0;padding:14px 16px;margin:12px 0;font-size:14px;color:#d4d4d8}
.format-qa .warning-box{background:rgba(239,68,68,0.05);border-left:3px solid #ef4444;border-radius:0 10px 10px 0;padding:14px 16px;margin:12px 0;font-size:14px;color:#d4d4d8}
.format-qa .formula-box{background:rgba(59,130,246,0.05);border-left:3px solid #3b82f6;border-radius:0 10px 10px 0;padding:14px 16px;margin:12px 0;font-size:14px;color:#d4d4d8}
.format-qa table{width:100%;border-collapse:collapse;margin:12px 0;font-size:14px}
.format-qa th{background:rgba(99,102,241,0.1);padding:10px 14px;text-align:left;font-weight:700;color:#e4e4e7}
.format-qa td{padding:10px 14px;border-bottom:1px solid rgba(255,255,255,0.05);color:#a1a1aa}
.format-qa strong{color:#e4e4e7}


/* ═══ RESPONSIVE ═══ */
@media(max-width:640px){
    .article-hero{padding:60px 16px 36px}
    .article-hero::before{width:300px;height:300px}
    .article-content{padding:28px 16px 48px}
    .article-content h2{font-size:1.2rem;margin:36px 0 14px}
    .article-meta{font-size:11px;gap:8px}
    .article-title{font-size:1.4rem;letter-spacing:-.5px}
    .article-subtitle{font-size:15px}
    .type-badge{padding:4px 12px;font-size:11px}
    .highlight-box,.definition-box,.example-box,.warning-box,.formula-box{padding:14px 16px;margin:16px 0;font-size:13px}
    table{font-size:13px}
    th,td{padding:10px 12px}
    .footer-actions{flex-direction:column}
    .cta-explore{padding:20px 16px;margin:24px 16px 0}
    .related-grid{grid-template-columns:1fr!important}
    .format-qa .container{padding:30px 16px 48px}
    .format-qa .qa-meta{font-size:11px;gap:10px}
    .format-qa .qa-reply{padding:16px;border-radius:12px}
}

/* ═══ PRINT ═══ */
@media print{
    body{background:#fff;color:#1a1a1a}
    .article-hero{background:#fff!important;padding:20px 0}
    .article-title{color:#1a1a1a}
    .disclaimer-banner,.back-to-blog,.footer-actions,.cta-explore,footer,.banner,.back-link{display:none}
    .article-content{padding:0}
    .highlight-box,.definition-box,.example-box,.warning-box,.formula-box{border:1px solid #ddd;background:#f9f9f9;color:#333}
    a{color:#333}
    table{border:1px solid #ddd}
    th{background:#f0f0f0;color:#333}
    td{color:#333;border-color:#ddd}
}
aside{max-width:800px !important;margin-left:auto !important;margin-right:auto !important;padding:28px 24px;box-sizing:border-box}

/* ═══ SMOOTH SCROLL + SCROLL MARGIN ═══ */
html{scroll-behavior:smooth}
h2[id]{scroll-margin-top:80px}

/* ═══ READING PROGRESS BAR ═══ */
.progress-bar{position:fixed;top:0;left:0;width:0;height:3px;background:linear-gradient(90deg,#6366f1,#818cf8,#a78bfa);z-index:99999;transition:width 50ms linear;box-shadow:0 0 10px rgba(99,102,241,0.5)}

/* ═══ BACK TO TOP ═══ */
.back-to-top{position:fixed;bottom:24px;right:24px;width:44px;height:44px;background:#1c1c1e;border:1px solid rgba(99,102,241,0.2);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#6366f1;font-size:18px;cursor:pointer;opacity:0;transform:translateY(20px);transition:all .3s cubic-bezier(.4,0,.2,1);z-index:9998;box-shadow:0 4px 20px rgba(0,0,0,0.4)}
.back-to-top.visible{opacity:1;transform:translateY(0)}
.back-to-top:hover{background:#2c2c2e;border-color:rgba(99,102,241,0.4);transform:translateY(-3px);box-shadow:0 8px 30px rgba(99,102,241,0.15)}

/* ═══ ACTIVE SECTION HIGHLIGHT IN TOC ═══ */
.toc li a.active{color:#818cf8;background:rgba(99,102,241,0.1);border-color:rgba(99,102,241,0.2)}

/* ═══ LIGHT MODE TOGGLE ═══ */
body.light-mode{background:#f5f5f7;color:#1d1d1f}
body.light-mode .article-hero{background:linear-gradient(160deg,#e8e0f0 0%,#f5f5f7 60%,#fff 100%)}
body.light-mode .article-content p,body.light-mode p{color:#4a4a4a}
body.light-mode h2{color:#1d1d1f;border-bottom-color:rgba(99,102,241,0.2)}
body.light-mode h3{color:#333}
body.light-mode strong{color:#1d1d1f}
body.light-mode .highlight-box{background:rgba(99,102,241,0.06)}
body.light-mode .definition-box{background:rgba(139,92,246,0.06)}
body.light-mode .example-box{background:rgba(34,197,94,0.05)}
body.light-mode .warning-box{background:rgba(239,68,68,0.05)}
body.light-mode .formula-box{background:rgba(59,130,246,0.05)}
body.light-mode table{border-color:rgba(0,0,0,0.1)}
body.light-mode th{background:rgba(99,102,241,0.08);color:#333}
body.light-mode td{color:#4a4a4a;border-bottom-color:rgba(0,0,0,0.06)}
body.light-mode tr:hover td{background:rgba(99,102,241,0.03)}
body.light-mode .toc{background:rgba(99,102,241,0.03);border-color:rgba(99,102,241,0.1)}
body.light-mode .toc li a{color:#666}
body.light-mode .toc li a:hover{color:#6366f1;background:rgba(99,102,241,0.06)}
body.light-mode .disclaimer-banner{background:rgba(99,102,241,0.03)}
body.light-mode .back-to-top{background:#fff;border-color:rgba(0,0,0,0.1);box-shadow:0 4px 20px rgba(0,0,0,0.1)}
body.light-mode code{background:rgba(0,0,0,0.05);color:#6366f1}
body.light-mode .article-title{color:#1d1d1f}
body.light-mode .article-subtitle{color:#666}
body.light-mode .article-meta{color:#666}


/* ═══ ACCESSIBILITY WIDGET ═══ */
.a11y-toggle{position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:9999;width:40px;height:40px;background:#1c1c1e;border:1px solid rgba(99,102,241,0.2);border-right:none;border-radius:12px 0 0 12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:-2px 0 20px rgba(0,0,0,0.3)}
.a11y-toggle:hover{width:48px;background:#2c2c2e;border-color:rgba(99,102,241,0.4)}
.a11y-toggle svg{width:20px;height:20px;color:#6366f1;transition:transform .3s}
.a11y-toggle:hover svg{transform:scale(1.1)}
.a11y-panel{position:fixed;right:-320px;top:0;width:300px;height:100vh;background:#0a0a0a;border-left:1px solid rgba(99,102,241,0.15);z-index:10000;transition:right .35s cubic-bezier(.4,0,.2,1);overflow-y:auto;padding:0;box-shadow:-8px 0 40px rgba(0,0,0,0.5)}
.a11y-panel.open{right:0}
.a11y-header{padding:20px 20px 16px;border-bottom:1px solid rgba(255,255,255,0.06);display:flex;justify-content:space-between;align-items:center}
.a11y-title{font-size:14px;font-weight:700;color:#f5f5f7;letter-spacing:.3px}
.a11y-close{background:none;border:none;color:#71717a;cursor:pointer;font-size:18px;padding:4px 8px;border-radius:6px;transition:all .2s}
.a11y-close:hover{color:#f5f5f7;background:rgba(255,255,255,0.06)}
.a11y-section{padding:16px 20px;border-bottom:1px solid rgba(255,255,255,0.04)}
.a11y-label{font-size:11px;font-weight:600;color:#71717a;text-transform:uppercase;letter-spacing:.8px;margin-bottom:12px}
.a11y-options{display:flex;flex-direction:column;gap:8px}
.a11y-btn{display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);border-radius:10px;padding:12px 16px;color:#a1a1aa;font-size:13px;font-family:inherit;cursor:pointer;transition:all .2s;width:100%}
.a11y-btn:hover{border-color:rgba(99,102,241,0.2);background:rgba(99,102,241,0.04);color:#d4d4d8}
.a11y-btn.active{border-color:rgba(99,102,241,0.4);background:rgba(99,102,241,0.08);color:#818cf8}
.a11y-btn .a11y-icon{font-size:16px;margin-right:10px}
.a11y-btn .a11y-check{font-size:14px;color:#22c55e;opacity:0;transition:opacity .2s}
.a11y-btn.active .a11y-check{opacity:1}
.a11y-size{display:flex;gap:6px}
.a11y-size button{flex:1;padding:10px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);border-radius:8px;color:#a1a1aa;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;transition:all .2s}
.a11y-size button:hover{border-color:rgba(99,102,241,0.2);color:#d4d4d8}
.a11y-size button.active{border-color:rgba(99,102,241,0.4);background:rgba(99,102,241,0.08);color:#818cf8}
.a11y-reset{margin:16px 20px 20px;padding:10px;background:none;border:1px solid rgba(239,68,68,0.2);border-radius:10px;color:#71717a;font-size:12px;font-family:inherit;cursor:pointer;width:calc(100% - 40px);transition:all .2s;text-align:center}
.a11y-reset:hover{border-color:rgba(239,68,68,0.4);color:#f87171;background:rgba(239,68,68,0.04)}
.a11y-footer{padding:16px 20px;text-align:center;font-size:11px;color:#3f3f46}
@media(max-width:640px){.a11y-panel{width:280px;right:-300px}.a11y-toggle{width:36px;height:36px}.a11y-toggle svg{width:18px;height:18px}}

/* Accessibility modes — article-specific selectors (for generated article pages) */
body.a11y-large-text .article-content p,body.a11y-large-text .article-content li,body.a11y-large-text .qa-reply-body{font-size:18px!important;line-height:2!important}
body.a11y-larger-text .article-content p,body.a11y-larger-text .article-content li,body.a11y-larger-text .qa-reply-body{font-size:21px!important;line-height:2.1!important}
body.a11y-high-contrast .article-content,body.a11y-high-contrast .article-hero,body.a11y-high-contrast .qa-reply{filter:contrast(1.4)!important}
body.a11y-dyslexia .article-content *,body.a11y-dyslexia .article-hero *,body.a11y-dyslexia .qa-reply *{font-family:OpenDyslexic,Comic Sans MS,sans-serif!important}
body.a11y-reduce-motion .article-content *,body.a11y-reduce-motion .article-hero *{animation:none!important;transition:none!important}
body.a11y-highlight-links a{outline:2px solid #fbbf24!important;outline-offset:2px;text-decoration:underline!important}
body.a11y-text-spacing .article-content p,body.a11y-text-spacing .article-content li{letter-spacing:1px!important;word-spacing:4px!important;line-height:2.2!important}
body.a11y-large-cursor,body.a11y-large-cursor *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%236366f1' opacity='0.3'/%3E%3Ccircle cx='16' cy='16' r='4' fill='%236366f1'/%3E%3C/svg%3E") 16 16,auto!important}
body.a11y-protanopia .article-content,body.a11y-protanopia .article-hero{filter:saturate(0.8) hue-rotate(-20deg)!important}
body.a11y-deuteranopia .article-content,body.a11y-deuteranopia .article-hero{filter:saturate(0.8) hue-rotate(40deg)!important}
body.a11y-tritanopia .article-content,body.a11y-tritanopia .article-hero{filter:saturate(0.8) hue-rotate(-40deg) brightness(1.1)!important}
body.a11y-grayscale .article-content,body.a11y-grayscale .article-hero{filter:grayscale(1)!important}
body.a11y-invert .article-content,body.a11y-invert .article-hero{filter:invert(1) hue-rotate(180deg)!important}
body.a11y-saturation .article-content,body.a11y-saturation .article-hero{filter:saturate(2)!important}
body.a11y-adhd .disclaimer-banner,body.a11y-adhd .article-meta,body.a11y-adhd .cta-explore,body.a11y-adhd .article-footer-card,body.a11y-adhd .banner,body.a11y-adhd footer{display:none!important}
body.a11y-adhd .article-content{max-width:640px!important}
body.a11y-adhd .article-content p{font-size:17px!important;line-height:2!important}
body.a11y-seizure-safe .article-content *,body.a11y-seizure-safe .article-hero *{animation:none!important;transition:none!important}
body.a11y-seizure-safe .article-content img,body.a11y-seizure-safe .article-content video{opacity:0.3!important}
body.a11y-seizure-safe .article-content,body.a11y-seizure-safe .article-hero{filter:saturate(0.6)!important}
body.a11y-cognitive .article-meta,body.a11y-cognitive .breadcrumb,body.a11y-cognitive .cta-explore,body.a11y-cognitive .article-footer-card,body.a11y-cognitive .banner{display:none!important}
body.a11y-cognitive .article-content p{font-size:18px!important;line-height:2.2!important;max-width:600px!important}
body.a11y-cognitive .article-content{max-width:640px!important}
body.a11y-hide-images .article-content img,body.a11y-hide-images .article-content video{display:none!important}
body.a11y-line-height .article-content p,body.a11y-line-height .article-content li,body.a11y-line-height .qa-reply-body{line-height:2.5!important}
/* Accessibility modes — global selectors (for main site pages without .article-content) */
body.a11y-large-text p,body.a11y-large-text li{font-size:18px!important;line-height:2!important}
body.a11y-larger-text p,body.a11y-larger-text li{font-size:21px!important;line-height:2.1!important}
body.a11y-high-contrast{filter:contrast(1.4)!important}
body.a11y-dyslexia *{font-family:OpenDyslexic,Comic Sans MS,sans-serif!important}
body.a11y-reduce-motion *{animation:none!important;transition:none!important}
body.a11y-text-spacing p,body.a11y-text-spacing li{letter-spacing:1px!important;word-spacing:4px!important;line-height:2.2!important}
body.a11y-protanopia{filter:saturate(0.8) hue-rotate(-20deg)!important}
body.a11y-deuteranopia{filter:saturate(0.8) hue-rotate(40deg)!important}
body.a11y-tritanopia{filter:saturate(0.8) hue-rotate(-40deg) brightness(1.1)!important}
body.a11y-grayscale{filter:grayscale(1)!important}
body.a11y-invert{filter:invert(1) hue-rotate(180deg)!important}
body.a11y-saturation{filter:saturate(2)!important}
body.a11y-adhd footer{display:none!important}
body.a11y-adhd p{font-size:17px!important;line-height:2!important}
body.a11y-seizure-safe *{animation:none!important;transition:none!important}
body.a11y-seizure-safe img,body.a11y-seizure-safe video{opacity:0.3!important}
body.a11y-seizure-safe{filter:saturate(0.6)!important}
body.a11y-cognitive p{font-size:18px!important;line-height:2.2!important;max-width:600px!important}
body.a11y-hide-images img,body.a11y-hide-images video{display:none!important}
body.a11y-line-height p,body.a11y-line-height li{line-height:2.5!important}
body.a11y-keyboard-nav *:focus{outline:3px solid #6366f1!important;outline-offset:3px!important}
body.a11y-keyboard-nav a:focus,body.a11y-keyboard-nav button:focus{box-shadow:0 0 0 3px rgba(99,102,241,0.4)!important}
.a11y-reading-mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9997;pointer-events:none;display:none}
.a11y-reading-mask-top,.a11y-reading-mask-bottom{position:absolute;left:0;right:0;background:rgba(0,0,0,0.85);pointer-events:none}
.a11y-reading-mask-top{top:0}
.a11y-reading-mask-bottom{bottom:0}
body.a11y-reading-mask .a11y-reading-mask{display:block}
.a11y-reading-guide{position:fixed;left:0;right:0;height:40px;background:rgba(99,102,241,0.06);border-top:2px solid rgba(99,102,241,0.3);border-bottom:2px solid rgba(99,102,241,0.3);pointer-events:none;z-index:9998;display:none}
body.a11y-reading-guide .a11y-reading-guide{display:block}
hr{display:none}
