@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--ink:#232339;--muted:#6b6b80;--purple:#5141b6;--pale:#efedfb;--line:#e5e5ee;--bg:#f7f8fc;--green:#267d68;--radius:20px;--shadow:0 10px 30px #23233907;font-family:'DM Sans',Arial,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button{color:inherit}button:disabled{cursor:default;opacity:.65}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #9f91eb;outline-offset:4px}button,input,select,textarea{border-radius:10px}button{border:0}svg{display:block}h1,h2,h3,h4,p{margin-top:0}h1,h2,h3,h4{font-family:Manrope,'DM Sans',Arial,sans-serif}h1{font-size:2.35rem;line-height:1.23;letter-spacing:-1.4px}h2{font-size:1.45rem;letter-spacing:-.5px}h3{font-size:1.1rem;line-height:1.45}p{line-height:1.65}small{font-size:.875rem}code{font-size:.9em}::selection{background:#d9d1ff} .skip-link{position:fixed;left:20px;top:-80px;z-index:100;background:white;padding:15px}.skip-link:focus{top:15px}.icon{width:20px;height:20px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh}.sidebar{background:white;border-right:1px solid var(--line);padding:30px 20px;position:fixed;inset:0 auto 0 0;width:244px;display:flex;flex-direction:column;z-index:30;overflow:auto}.brand{display:flex;gap:11px;align-items:center;padding:0 8px 28px;font:800 1.35rem Manrope,sans-serif;letter-spacing:-.7px}.brand-mark{display:grid;place-items:center;color:white;background:var(--purple);width:38px;height:38px;border-radius:12px;font:bold 1.8rem Georgia,serif}.brand-mark .icon{width:23px;height:23px}.brand small{display:block;font:500 .75rem 'DM Sans',sans-serif;letter-spacing:1.5px;color:var(--muted);margin-top:3px}.nav-label{font-size:.75rem;font-weight:700;letter-spacing:1.5px;color:#8a8a9a;padding:25px 13px 11px}.nav-item{display:flex;align-items:center;gap:13px;min-height:45px;padding:11px 13px;border-radius:10px;font-size:.94rem;color:#656578;margin:4px 0}.nav-item:hover{background:#f6f5fb}.nav-item.active{color:var(--purple);background:var(--pale);font-weight:700}.nav-item .nav-count{margin-left:auto;font-size:.8rem;background:white;border-radius:5px;padding:2px 6px}.subject-dot{width:9px;height:9px;border-radius:3px;background:var(--accent);flex-shrink:0}.sidebar-foot{margin-top:auto;padding-top:30px}.study-note{padding:18px 15px;background:#f7f8fc;border:1px solid var(--line);border-radius:14px}.study-note strong{font-size:.88rem}.study-note p{font-size:.8rem;margin:8px 0 0;color:var(--muted);line-height:1.6}.content-shell{grid-column:2;min-width:0}.topbar{height:85px;background:#ffffffd9;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;gap:20px;position:sticky;top:0;z-index:20;backdrop-filter:blur(14px)}.crumb{font-size:.88rem;color:var(--muted)}.crumb strong{font-weight:500;color:var(--ink)}.top-actions{display:flex;align-items:center;gap:20px}.search-form{display:flex;align-items:center;gap:10px;background:#f4f5f9;border:1px solid #ececf2;padding:10px 13px;border-radius:10px;width:280px;color:#7b7b8d}.search-form input{border:0;background:transparent;outline:none;width:100%;font-size:.88rem;min-width:0}.search-form button{background:transparent;padding:0}.avatar{height:35px;width:35px;border-radius:50%;display:grid;place-items:center;background:#efe9dc;color:#806a46;font-weight:600;font-size:.8rem}.mobile-menu{display:none;background:transparent;padding:7px}.main{max-width:1460px;margin:auto;padding:35px 42px 60px}.eyebrow{font-size:.75rem;letter-spacing:1.6px;text-transform:uppercase;font-weight:700;color:var(--purple);margin:0 0 12px}.welcome{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:15px}.welcome h1{font-size:1.8rem;margin:0 0 8px;letter-spacing:-.8px}.welcome p{margin:0;color:var(--muted);font-size:.94rem}.badge{display:inline-flex;align-items:center;gap:7px;font-size:.8rem;font-weight:600;border:1px solid var(--line);border-radius:50px;padding:8px 13px;background:white;white-space:nowrap}.badge .icon{width:15px;height:15px}.hero{position:relative;overflow:hidden;display:grid;grid-template-columns:1.25fr 1fr;align-items:center;background:#343065;color:white;border-radius:var(--radius);padding:38px 36px;min-height:288px}.hero:before{content:'';position:absolute;width:480px;height:480px;border:1px solid #ffffff0c;border-radius:50%;right:-50px;top:-120px}.hero-copy{position:relative;z-index:1}.hero .eyebrow{color:#b8b1f1;font-size:.7rem}.hero h2{font-family:Georgia,serif;font-weight:400;font-size:2.7rem;line-height:1.15;letter-spacing:-1.2px;margin:0 0 16px}.hero h2 em{color:#c9c0ff;font-weight:400}.hero p{color:#d0cde5;max-width:390px;font-size:.93rem;line-height:1.7;margin-bottom:23px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:43px;padding:11px 17px;border-radius:10px;background:var(--purple);color:white;font-size:.88rem;font-weight:600;border:1px solid transparent;line-height:1.25}.btn:hover{filter:brightness(.96)}.btn-light{background:white;color:var(--purple)}.btn-ghost{background:white;border:1px solid var(--line);color:var(--ink)}.btn-soft{background:var(--pale);color:var(--purple)}.btn-small{min-height:35px;padding:8px 12px;font-size:.8rem}.btn .icon{width:17px;height:17px}.hero-art{position:relative;height:225px;min-width:0}.art-orbit{position:absolute;inset:10px 5px;border:1px solid #ffffff13;border-radius:50%;transform:rotate(-15deg)}.art-book{position:absolute;background:#a99bed;width:170px;height:185px;right:62px;top:15px;border-radius:9px 18px 18px 9px;transform:rotate(11deg);box-shadow:12px 14px 0 #27234f,0 0 0 1px #d6ccff55;overflow:hidden}.art-book:before{content:'';position:absolute;inset:0 auto 0 0;width:14px;background:#8573cc}.book-label{padding:24px 25px;color:#35305c;font:700 .75rem Manrope;letter-spacing:1.4px}.book-doodle{width:92px;height:70px;border:2px solid #453a7970;border-radius:40px;margin:0 auto;transform:rotate(-25deg);position:relative}.book-doodle:before,.book-doodle:after{content:'';position:absolute;width:28px;height:28px;border:2px solid #453a7970;border-radius:50%;top:18px}.book-doodle:before{left:12px}.book-doodle:after{right:12px}.art-label{position:absolute;border:1px solid #ffffff30;background:#ffffffed;color:var(--ink);box-shadow:0 12px 25px #1e173b30;border-radius:11px;padding:12px 15px;font-size:.8rem;display:flex;align-items:center;gap:9px;z-index:2}.art-label.one{left:5px;top:35px;transform:rotate(-5deg)}.art-label.two{right:2px;bottom:16px;transform:rotate(4deg)}.art-label .icon{color:var(--green);width:18px;height:18px}.art-spark{position:absolute;right:30px;top:5px;color:#f5d9a0;font-size:2rem}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:22px 0 34px}.stat{display:flex;align-items:center;gap:13px;background:white;border:1px solid var(--line);border-radius:14px;padding:18px 20px}.stat-icon{background:#f0edfb;color:var(--purple);padding:11px;border-radius:11px}.stat:nth-child(2) .stat-icon{background:#eaf5ef;color:var(--green)}.stat:nth-child(3) .stat-icon{background:#fff1e8;color:#ba7845}.stat strong{font:800 1.35rem Manrope;display:block;margin-bottom:3px}.stat span{font-size:.8rem;color:var(--muted)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:26px 0 19px}.section-head h2{margin:0 0 5px;font-size:1.3rem}.section-head p{color:var(--muted);font-size:.85rem;margin:0}.text-link{color:var(--purple);font-size:.84rem;font-weight:700}.subject-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.subject-card{position:relative;display:flex;flex-direction:column;background:white;border:1px solid var(--line);border-radius:16px;padding:22px;transition:transform .18s,box-shadow .18s;min-width:0}.subject-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px #29264a0b;border-color:#d3cdea}.card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.subject-icon{color:var(--accent);background:var(--tint);width:44px;height:44px;border-radius:13px;display:grid;place-items:center}.subject-icon .icon{width:23px;height:23px}.course-tag{font-size:.7rem;color:var(--muted);letter-spacing:.2px}.subject-card h3{font-size:1.03rem;margin-bottom:8px}.subject-card p{font-size:.83rem;color:var(--muted);line-height:1.65;margin-bottom:20px;flex:1}.card-meta{display:flex;gap:13px;flex-wrap:wrap;font-size:.74rem;color:var(--muted);margin-bottom:14px}.card-meta span{display:flex;align-items:center;gap:5px}.card-meta .icon{width:14px;height:14px}.progress-track{background:#efeff5;height:5px;border-radius:4px;overflow:hidden}.progress-fill{height:100%;background:var(--accent,var(--purple));border-radius:4px;transition:width .2s}.card-progress{display:flex;justify-content:space-between;font-size:.72rem;color:var(--muted);margin:8px 0 0}.practice-card{background:#eeedf8;border-color:#e3dff4;justify-content:center}.practice-card .subject-icon{background:white;color:var(--purple)}.practice-card p{flex:0}.practice-card .btn{align-self:flex-start}.bottom-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;margin-top:30px}.panel{background:white;border:1px solid var(--line);border-radius:16px;padding:24px}.panel h3{font-size:1rem;margin:0 0 18px}.steps{display:flex;gap:15px;justify-content:space-between}.step{flex:1;position:relative}.step-icon{background:var(--pale);color:var(--purple);width:33px;height:33px;border-radius:10px;display:grid;place-items:center;margin-bottom:10px}.step-icon .icon{width:17px;height:17px}.step strong{font-size:.82rem;display:block}.step p{font-size:.75rem;line-height:1.6;color:var(--muted);margin:5px 0 0}.note-panel{background:#f0f6f3;border-color:#e0ebe5}.note-panel .eyebrow{color:var(--green);font-size:.7rem}.note-panel p{font-size:.88rem;margin-bottom:14px;color:#4f6b60}.page-footer{display:flex;justify-content:space-between;gap:15px;margin-top:38px;padding-top:23px;border-top:1px solid var(--line);color:#828294;font-size:.76rem}.page-heading{margin-bottom:28px}.page-heading h1{margin-bottom:12px}.page-heading p{color:var(--muted);max-width:750px}.subject-banner{display:flex;gap:22px;align-items:center;background:var(--tint);border:1px solid var(--line);border-radius:18px;padding:29px;margin-bottom:24px}.subject-banner .subject-icon{background:white;width:64px;height:64px;border-radius:17px}.subject-banner .subject-icon .icon{width:32px;height:32px}.subject-banner h1{font-size:1.8rem;margin:5px 0 8px}.subject-banner p{font-size:.9rem;color:var(--muted);margin:0}.subject-banner .eyebrow{color:var(--accent);margin:0}.subject-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.topic-list{display:grid;gap:10px}.topic-row{display:flex;gap:15px;align-items:center;background:white;border:1px solid var(--line);padding:17px 20px;border-radius:12px;transition:border-color .15s}.topic-row:hover{border-color:#b3a8e3}.topic-row .topic-number{display:grid;place-items:center;width:34px;height:34px;background:#f5f5fa;border-radius:9px;color:var(--muted);font-size:.8rem;flex-shrink:0}.topic-row.done .topic-number{background:#e7f3ed;color:var(--green)}.topic-row h3{font-size:.95rem;margin:0 0 4px}.topic-row p{font-size:.76rem;color:var(--muted);margin:0}.topic-row .row-label{margin-left:auto;font-size:.74rem;color:var(--purple);background:var(--pale);padding:5px 9px;border-radius:6px;white-space:nowrap}.notice{background:#fff6e6;border:1px solid #efdfb9;padding:16px 18px;border-radius:12px;color:#79602a;font-size:.88rem;line-height:1.65;margin:20px 0}.lesson-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:26px;align-items:start}.lesson-title{font-size:1.9rem;margin:10px 0 15px}.lesson-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.lesson-actions{display:flex;gap:8px}.icon-btn{background:white;border:1px solid var(--line);padding:10px;border-radius:10px}.icon-btn.selected{color:var(--purple);background:var(--pale)}.lesson-mode{display:flex;gap:5px;background:#ededf5;padding:5px;border-radius:12px;margin:23px 0}.mode-button{flex:1;padding:11px 10px;background:transparent;font-size:.86rem;color:var(--muted);font-weight:600;display:flex;justify-content:center;align-items:center;gap:7px}.mode-button.active{background:white;color:var(--purple);box-shadow:0 2px 5px #26224008}.mode-button .icon{width:17px;height:17px}.reader{background:white;border:1px solid var(--line);border-radius:16px;padding:30px;min-width:0}.prose{font-size:1rem;line-height:1.85;color:#414154;overflow-wrap:anywhere}.prose p{line-height:1.85;margin:0 0 18px}.prose h1,.prose h2,.prose h3,.prose h4{font-size:1.2rem;color:var(--ink);margin:25px 0 13px;letter-spacing:-.2px}.prose ul,.prose ol{padding-left:24px;margin:12px 0 22px}.prose li{padding-left:4px;margin:9px 0;line-height:1.85}.prose a{color:var(--purple);text-decoration:underline;text-underline-offset:3px}.prose strong{color:#292939}.prose code{background:#f0eef8;padding:2px 5px;border-radius:4px;color:#5e4790}.prose pre{background:#24253a;border-radius:12px;padding:21px;overflow:auto;line-height:1.75;font-size:.86rem;white-space:pre;color:#e0e4f5;margin:20px 0}.prose pre code{color:inherit;background:none;padding:0}.table-wrap{overflow:auto;margin:20px 0}.prose table{border-collapse:collapse;width:100%;font-size:.9rem}.prose td,.prose th{border:1px solid var(--line);padding:10px 13px;vertical-align:top;text-align:left;min-width:110px}.prose th{background:#f5f4fb;font-weight:600}.reader-label{font-size:.73rem;letter-spacing:1.1px;font-weight:700;color:var(--muted);margin-bottom:20px;display:flex;align-items:center;gap:8px}.reader-label .icon{width:16px;height:16px}.aside-card{background:white;border:1px solid var(--line);padding:20px;border-radius:14px;margin-bottom:16px}.aside-card h3{font-size:.88rem;margin-bottom:12px}.aside-card p{font-size:.8rem;color:var(--muted);margin:0;line-height:1.7}.aside-card ul{list-style:none;padding:0;margin:0}.aside-card li{border-top:1px solid #f0f0f5;padding:11px 0;font-size:.79rem;line-height:1.5}.aside-card li:first-child{border-top:0;padding-top:0}.aside-card li.current{color:var(--purple);font-weight:700}.aside-sticky{position:sticky;top:110px}.diagram{margin:24px 0;background:#f8f7fd;border:1px solid #e5e0f3;border-radius:14px;padding:22px}.diagram h3{font-size:.94rem;margin:0 0 19px}.diagram-flow{display:flex;gap:17px;align-items:stretch;flex-wrap:wrap}.diagram-node{flex:1 1 110px;border:1px solid #d9d1ee;background:white;padding:14px;border-radius:10px;position:relative;min-width:0}.diagram-node strong{font-size:.84rem;display:block;color:var(--purple);line-height:1.5}.diagram-node span{font-size:.77rem;line-height:1.6;display:block;margin-top:6px;color:var(--muted)}.diagram-flow:not(.compare) .diagram-node:not(:last-child):after{content:'';position:absolute;right:-18px;top:27px;width:17px;height:1px;background:#a697d3}.diagram-flow.layers{display:flex;flex-direction:column;gap:9px;max-width:480px;margin:auto}.diagram-flow.layers .diagram-node{flex:auto;display:flex;gap:16px;align-items:center;padding:12px 15px}.diagram-flow.layers .diagram-node strong{min-width:100px}.diagram-flow.layers .diagram-node span{margin:0}.diagram-flow.layers .diagram-node:not(:last-child):after{width:1px;height:10px;top:auto;bottom:-10px;right:50%}.diagram-caption{font-size:.8rem;color:var(--muted);line-height:1.65;margin:16px 0 0}.diagram-flow.compare .diagram-node:nth-child(2){background:#f0f7f3;border-color:#cde4d6}.exam-question{font-size:1.1rem;line-height:1.65;margin:0 0 22px}.model-answer{margin-top:20px;border-top:1px solid var(--line);padding-top:22px}.marking{background:#f0f7f3;padding:20px;border-radius:12px;margin-top:20px}.marking h3{color:var(--green);font-size:.95rem}.marking ul{padding-left:20px;margin:0;color:#426453;font-size:.9rem;line-height:1.8}.writing-space{margin-top:25px}.writing-space label{font-size:.9rem;font-weight:600;display:block;margin-bottom:10px}.writing-space textarea{width:100%;min-height:190px;resize:vertical;border:1px solid var(--line);padding:15px;line-height:1.7;color:var(--ink);background:#fcfcfe}.field-hint{font-size:.76rem;color:var(--muted);margin-top:8px}.lesson-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}.lesson-navigation{display:flex;justify-content:space-between;gap:15px;margin-top:25px}.lesson-navigation a{font-size:.85rem;color:var(--purple);max-width:48%;line-height:1.5}.lesson-navigation small{font-size:.7rem;display:block;letter-spacing:.6px;color:var(--muted);margin-bottom:4px}.empty{padding:60px 25px;text-align:center;border:1px dashed #ccc9de;border-radius:18px;background:white}.empty .icon{height:35px;width:35px;color:var(--purple);margin:0 auto 20px}.empty h2{font-size:1.3rem}.empty p{font-size:.92rem;color:var(--muted)}.search-summary{color:var(--muted);font-size:.9rem;margin-bottom:20px}.filter-row{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:22px}.filter-chip{padding:9px 15px;border:1px solid var(--line);background:white;border-radius:50px;font-size:.85rem}.filter-chip.active{color:white;background:var(--purple);border-color:var(--purple)}.quiz-setup{max-width:740px}.quiz-options-form{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:25px 0}.field label{display:block;font-size:.87rem;font-weight:600;margin-bottom:9px}.field select{width:100%;appearance:none;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%236b6b80' stroke-width='2' d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;border:1px solid var(--line);padding:12px 35px 12px 12px;font-size:.95rem}.quiz-card{max-width:840px;margin:auto}.quiz-top{display:flex;align-items:center;justify-content:space-between;margin:0 0 17px;font-size:.85rem;color:var(--muted)}.quiz-card h2{font-size:1.35rem;line-height:1.6;margin:25px 0}.answer-options{display:grid;gap:12px}.answer-option{padding:16px 18px;text-align:left;border:1px solid var(--line);background:white;display:flex;align-items:center;gap:13px;font-size:.97rem;line-height:1.5}.answer-option:hover:not(:disabled){background:#faf9fe;border-color:#baafe5}.option-letter{border:1px solid var(--line);border-radius:7px;min-width:30px;height:30px;display:grid;place-items:center;font-size:.8rem}.answer-option.correct{border-color:#59a184;background:#edf8f2;color:#226d53;opacity:1}.answer-option.incorrect{border-color:#d99a97;background:#fff0ee;color:#914b47;opacity:1}.quiz-explanation{margin-top:20px;background:#f4f4fa;padding:18px;border-radius:12px;font-size:.93rem;line-height:1.7}.quiz-controls{display:flex;justify-content:space-between;align-items:center;margin-top:25px;gap:15px}.score-circle{width:125px;height:125px;border:9px solid #e2ddf7;border-top-color:var(--purple);border-right-color:var(--purple);border-radius:50%;display:grid;place-items:center;margin:10px auto 25px;font:800 2rem Manrope;color:var(--purple)}.results{text-align:center}.results p{color:var(--muted)}.review-list{text-align:left;margin-top:30px}.review-item{border-top:1px solid var(--line);padding:18px 0}.review-item h3{font-size:.95rem;margin-bottom:8px}.review-item p{font-size:.85rem;margin:6px 0}.review-item.correct h3{color:var(--green)}.review-item.incorrect h3{color:#a55750}.resource-group{background:white;border:1px solid var(--line);border-radius:16px;padding:25px;margin-bottom:20px}.resource-group h2{font-size:1.2rem}.source-links{display:grid;gap:9px;margin-top:15px}.source-links a{color:var(--purple);font-size:.9rem;text-decoration:underline;text-underline-offset:3px;line-height:1.6;overflow-wrap:anywhere}.bibliography{font-size:.88rem;color:var(--muted);line-height:1.8;padding-left:20px}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;transition:.2s;background:#29273d;color:white;font-size:.9rem;padding:13px 20px;border-radius:12px;z-index:100;max-width:90vw;box-shadow:0 6px 24px #18132725}.toast.visible{opacity:1;transform:translate(-50%,0)}.boot{max-width:600px;margin:20vh auto;padding:30px;text-align:center}.boot .brand-mark{margin:0 auto 24px}.boot h1{font-size:1.5rem}.boot p{color:var(--muted)}.screen-shade{display:none}.status-message{padding:15px;background:#f3f1fd;border-radius:10px;font-size:.85rem;color:var(--purple);margin-top:20px}.storage-note{background:#fff6e6;color:#79602a;font-size:.8rem;padding:10px 15px;text-align:center}.source-note{font-size:.8rem;line-height:1.7;color:var(--muted);margin-top:22px}.diagram-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0;background:transparent;text-align:left}.diagram-toggle h3{margin-bottom:0}.diagram-body{margin-top:18px}.diagram.collapsed .diagram-body{display:none}.progress-summary{font-size:.8rem;color:var(--muted);margin-top:10px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.print-only{display:none}
@media(min-width:1600px){.main{padding:42px 60px}.topbar{padding:0 60px}.hero{padding:45px}.hero h2{font-size:3.2rem}.subject-card{padding:26px}}
@media(max-width:1180px){.shell{grid-template-columns:215px minmax(0,1fr)}.sidebar{width:215px;padding:28px 15px}.main{padding:28px}.topbar{padding:0 28px}.hero{padding:30px}.hero h2{font-size:2.3rem}.hero-art{transform:scale(.9);transform-origin:right center}.subject-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.lesson-layout{grid-template-columns:minmax(0,1fr)}.aside-sticky{display:none}.bottom-grid{grid-template-columns:1fr 1fr}.steps{gap:10px}.search-form{width:230px}}
@media(max-width:850px){.shell{display:block}.sidebar{transform:translateX(-100%);transition:transform .2s;width:255px}.sidebar.open{transform:translateX(0)}.screen-shade.visible{display:block;position:fixed;inset:0;background:#18162755;z-index:25}.content-shell{width:100%}.mobile-menu{display:block}.topbar{padding:0 22px;height:72px;gap:12px}.crumb{margin-right:auto}.top-actions{gap:12px}.search-form{width:220px}.main{padding:25px 22px 45px}.hero-art{transform:scale(.85)}.welcome h1{font-size:1.65rem}}
@media(max-width:600px){h1{font-size:1.85rem}.topbar{padding:0 15px;height:65px}.crumb{display:none}.top-actions{flex:1;justify-content:space-between}.search-form{width:100%;max-width:300px}.avatar{display:none}.main{padding:25px 17px 40px}.welcome{align-items:flex-start}.welcome h1{font-size:1.55rem}.welcome p{font-size:.85rem;max-width:220px}.welcome .badge{padding:7px 9px;font-size:.68rem}.welcome .badge .icon{display:none}.hero{grid-template-columns:1fr;padding:28px;min-height:0}.hero h2{font-size:2.45rem}.hero p{font-size:.9rem}.hero-art{display:none}.hero .btn{margin-top:0}.stats{gap:8px;margin:16px 0 29px}.stat{display:block;padding:14px 10px}.stat-icon{width:30px;height:30px;padding:6px;border-radius:8px;margin-bottom:9px}.stat-icon .icon{width:18px;height:18px}.stat strong{font-size:1.15rem}.stat span{font-size:.7rem}.section-head{margin-bottom:15px}.section-head h2{font-size:1.15rem}.section-head p{font-size:.8rem}.text-link{font-size:.77rem}.subject-grid{gap:12px}.subject-card{padding:16px}.card-top{margin-bottom:13px}.course-tag{font-size:.6rem;max-width:68px;text-align:right}.subject-icon{width:36px;height:36px;border-radius:10px}.subject-icon .icon{width:19px;height:19px}.subject-card h3{font-size:.92rem;line-height:1.5}.subject-card p{font-size:.76rem;margin-bottom:16px}.card-meta{font-size:.67rem;gap:8px}.card-meta .icon{width:12px;height:12px}.card-progress{font-size:.65rem}.practice-card .btn{font-size:.75rem;padding:9px 12px}.bottom-grid{grid-template-columns:1fr;gap:15px;margin-top:22px}.panel{padding:21px}.step strong{font-size:.76rem}.step p{font-size:.71rem}.page-footer{flex-direction:column;font-size:.72rem;gap:8px}.subject-banner{padding:22px;gap:15px;align-items:flex-start}.subject-banner .subject-icon{width:44px;height:44px;flex-shrink:0}.subject-banner .subject-icon .icon{width:25px;height:25px}.subject-banner h1{font-size:1.35rem;letter-spacing:-.6px}.subject-banner p{font-size:.81rem}.subject-banner .eyebrow{font-size:.65rem}.subject-toolbar{align-items:flex-start;flex-wrap:wrap}.topic-row{padding:14px;gap:12px}.topic-row h3{font-size:.87rem}.topic-row .row-label{font-size:.66rem;padding:5px 6px}.lesson-title{font-size:1.55rem;letter-spacing:-.7px;line-height:1.4}.lesson-top{align-items:flex-start}.lesson-top .text-link{max-width:210px;line-height:1.5}.lesson-mode{gap:3px;margin:20px 0}.mode-button{font-size:.75rem;padding:10px 5px;gap:4px}.mode-button .icon{width:14px;height:14px}.reader{padding:21px 18px}.prose{font-size:.96rem}.prose p,.prose li{line-height:1.85}.prose pre{padding:15px;font-size:.8rem}.diagram{padding:17px}.diagram-flow{flex-direction:column;gap:13px}.diagram-node{flex:auto;padding:13px}.diagram-flow:not(.compare) .diagram-node:not(:last-child):after{width:1px;height:14px;right:50%;top:auto;bottom:-14px}.diagram-flow.layers .diagram-node{display:block}.diagram-flow.layers .diagram-node span{margin-top:4px}.lesson-bottom{flex-wrap:wrap}.lesson-bottom .btn{font-size:.8rem}.quiz-options-form{grid-template-columns:1fr}.quiz-card h2{font-size:1.15rem}.quiz-controls{align-items:flex-start}.answer-option{font-size:.9rem;padding:13px}.page-heading h1{font-size:1.7rem}.notice{font-size:.8rem}.reader-label{font-size:.65rem}.exam-question{font-size:1rem}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
@media print{.sidebar,.topbar,.page-footer,.lesson-mode,.lesson-actions,.aside-sticky,.lesson-bottom,.lesson-navigation,.writing-space,.btn,.toast,.screen-shade,.quiz-controls{display:none!important}.shell,.content-shell,.lesson-layout{display:block}.main{padding:0;max-width:none}.reader{border:0;padding:0}.prose{font-size:11pt;color:#000}.print-only{display:block}.diagram{break-inside:avoid}.prose pre{white-space:pre-wrap;background:#f3f3f3;color:#000}.model-answer[hidden]{display:block!important}body{background:white}.subject-grid{grid-template-columns:1fr 1fr}a[href^="http"]:after{content:' (' attr(href) ')';font-size:9pt}}
.resource-divider{border:0;border-top:1px solid var(--line);margin:26px 0}.diagram-toggle h3{display:flex;gap:9px;align-items:center}.diagram-toggle h3 .icon{width:17px;height:17px}.worked-visual{margin:28px 0;padding:24px;border-radius:14px;background:#f8f7fd;border:1px solid #e4def4}.worked-visual h3{font-size:1.05rem;margin-bottom:24px}.worked-visual .eyebrow{font-size:.7rem;margin-bottom:10px}.handshake{display:grid;grid-template-columns:1fr 1fr;gap:18px 70px;position:relative;padding:0 10px}.endpoint{background:#e7e1f8;border:1px solid #cfc3e9;border-radius:9px;padding:11px;text-align:center;font-weight:600;font-size:.9rem}.exchange{grid-column:1/-1;padding:4px 30px 8px;position:relative;text-align:center;font-size:.83rem;color:#5b4a88;line-height:1.6}.signal{height:2px;background:#9a84c7;margin-top:10px;position:relative}.signal:after{content:'';position:absolute;right:0;top:-4px;border-left:9px solid #9a84c7;border-top:5px solid transparent;border-bottom:5px solid transparent}.to-client .signal:after{right:auto;left:0;border-left:0;border-right:9px solid #9a84c7}.connected{grid-column:1/-1;text-align:center;font-size:.85rem;background:#e7f1eb;color:#33745e;border-radius:7px;padding:9px}.subnet-strip{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.subnet-strip>div{border:1px solid #d4cbe8;background:white;border-radius:10px;padding:14px}.subnet-strip strong{display:block;color:#65508f;margin-bottom:8px;font-size:.96rem}.subnet-strip span{font-size:.8rem;line-height:1.9;color:var(--muted)}.formula-box{margin-top:20px;padding:15px;background:#ece7f7;border-radius:10px;text-align:center;line-height:1.8;font-size:.9rem;color:#5a4489}.matrix-example{display:flex;align-items:center;gap:25px}.pixel-grid{display:grid;grid-template-columns:repeat(3,48px);gap:4px}.pixel-grid span{background:#eeebf6;min-height:45px;display:grid;place-items:center;font-size:.9rem;border-radius:5px;color:#695887}.pixel-grid .hot{background:#f3d5b7;color:#855b31}.matrix-label{font-size:.75rem;color:var(--muted);text-align:center;margin:12px 0 0}.matrix-results{display:grid;gap:15px;flex:1}.matrix-results>div{padding:15px;background:white;border:1px solid #dfd8ed;border-radius:10px}.matrix-results span,.matrix-results strong,.matrix-results small{display:block;line-height:1.6}.matrix-results span{font-size:.75rem;color:var(--muted)}.matrix-results strong{font-size:.91rem;color:#645084;margin:5px 0}.matrix-results small{font-size:.77rem;color:var(--muted)}.stereo-svg{width:100%;max-width:600px;height:auto}.argument-map{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.argument-map>div{border-left:3px solid #a89acb;padding:12px 15px;background:white}.argument-map strong,.argument-map span{display:block;line-height:1.6}.argument-map strong{font-size:.9rem}.argument-map span{font-size:.8rem;color:var(--muted)}.recall-card{max-width:900px;margin:auto;padding:32px}.recall-card h2{font-size:1.35rem;line-height:1.65;margin-top:18px}.recall-prompt{padding:48px 20px;text-align:center;background:#f7f5fc;border:1px dashed #d4cce8;border-radius:14px;color:#88769f;font:italic 1.2rem Georgia,serif;margin:25px 0}.recall-card .quiz-controls{flex-wrap:wrap}.worked-visual .diagram-caption{margin-bottom:0}
@media(max-width:600px){.worked-visual{padding:16px}.matrix-example{flex-direction:column;align-items:stretch;gap:18px}.pixel-grid{justify-content:center}.matrix-results{gap:10px}.handshake{padding:0;gap:15px 40px}.exchange{padding:3px 6px 8px;font-size:.76rem}.subnet-strip>div{padding:11px}.subnet-strip span{font-size:.73rem}.formula-box{font-size:.8rem}.recall-card{padding:21px 17px}.recall-card h2{font-size:1.1rem}.recall-card .btn{font-size:.76rem;padding:9px 11px}.argument-map{grid-template-columns:1fr}.stereo-svg{min-height:170px}.recall-prompt{padding:35px 16px}}
.prose,.subject-card p,.hero p,.welcome p,.page-heading p,.subject-banner p,.notice,.exam-question,.quiz-explanation{font-size:1rem}.diagram-node span,.diagram-caption,.step p,.aside-card p,.matrix-results small,.argument-map span,.subnet-strip span,.exchange,.formula-box{font-size:.875rem}.diagram-node strong,.mode-button,.topic-row h3,.answer-option{font-size:1rem}.subject-card h3{font-size:1.08rem}.step strong,.btn-small,.filter-chip,.text-link{font-size:.875rem}
@media(max-width:600px){.subject-grid{grid-template-columns:1fr}.subject-card{padding:21px}.subject-card p{margin-bottom:18px}.course-tag{max-width:130px;font-size:.75rem}.mode-button{font-size:.8rem}.welcome{flex-wrap:wrap}.welcome p{max-width:none}.diagram-flow.layers .diagram-node strong{min-width:0}.lesson-top .text-link{font-size:.875rem}}
/* Eight-part lessons and verified past papers */
.study-map{display:flex;flex-wrap:wrap;gap:8px;padding:18px;background:var(--pale);border-radius:14px;margin:18px 0 28px}.study-map button{background:white;color:var(--purple);padding:9px 12px;font-size:.875rem;border:1px solid #ded8f4;text-align:left}.study-map button:hover{background:#e2dcfa}.study-section{padding:24px 0;border-top:1px solid var(--line);scroll-margin-top:100px}.study-section>h2{color:var(--purple);font-size:1.35rem;margin-bottom:22px}.study-qa{padding:16px 0}.study-qa+.study-qa{border-top:1px dashed var(--line)}.study-qa h3,.study-mcq h3{font-size:1.05rem;line-height:1.6}.study-mcq{border:1px solid var(--line);border-radius:14px;padding:20px;margin:18px 0}.study-mcq li{padding:6px 10px}.marked-answer{background:#eaf6ef;color:#195b41;border-radius:8px}.marked-answer strong{font-size:.875rem}.revision-section{background:#f2f0fc;border:1px solid #ddd7f4;padding:24px;border-radius:16px;margin-top:20px}.prose .table-wrap{max-width:100%;overflow:auto}.study-section:focus{outline:2px solid #a69adb;outline-offset:6px}.paper-summary{display:flex;gap:16px;flex-wrap:wrap;padding:20px;background:var(--pale);border-radius:16px;margin-bottom:24px}.paper-summary span{font-size:1rem;color:var(--muted)}.papers-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.paper-card{background:white;border:1px solid var(--line);border-radius:20px;overflow:hidden}.paper-preview{display:block;height:230px;overflow:hidden;background:#e9e7f2;padding:18px 24px 0}.paper-preview img{display:block;width:100%;height:auto;box-shadow:0 5px 20px #23233918}.paper-card-body{padding:24px}.paper-card h2{font-size:1.3rem;margin:18px 0 12px}.paper-card p{color:var(--muted)}.paper-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:22px 0}.paper-scope{margin-top:28px}.paper-question{padding:22px 0;border-top:1px solid var(--line)}.paper-question p{margin:12px 0 0;font-size:1rem}.paper-scan{background:white;border:1px solid var(--line);border-radius:14px;padding:20px;margin:24px 0}.paper-scan summary{font-weight:700;cursor:pointer;padding:8px}.paper-scan img{display:block;width:100%;max-width:1000px;height:auto;margin:20px auto}.home-papers{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:24px 0}.home-papers p:last-child{margin-bottom:0}.lesson-layout>div{min-width:0}.study-section pre{max-width:100%;overflow:auto}
@media(max-width:650px){.papers-grid{grid-template-columns:1fr}.paper-card-body{padding:20px}.study-map{padding:12px;gap:7px}.study-map button{font-size:.875rem;flex:1 1 40%;padding:10px}.study-mcq,.revision-section{padding:16px}.home-papers{align-items:flex-start;flex-direction:column}.paper-summary{gap:8px}.study-section>h2{font-size:1.2rem}.paper-scan{padding:10px}.paper-actions .btn{font-size:.875rem}.paper-card .badge{white-space:normal}}
@media print{.study-map,.paper-actions,.home-papers{display:none}.study-section{break-inside:auto}.paper-scan img{width:100%}.study-mcq,.study-qa{break-inside:avoid}.marked-answer{color:#000;background:#eee}}


/* --- Gatekeeper & Admin Dashboard Styles --- */
.gatekeeper-wrap {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gatekeeper-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(35, 35, 57, 0.08);
  text-align: center;
}
.gatekeeper-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pale);
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.gatekeeper-card h1 {
  font-size: 1.6rem;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.25;
}
.gatekeeper-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 24px;
}
.gatekeeper-input-group {
  margin-bottom: 18px;
  text-align: left;
}
.gatekeeper-input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.gatekeeper-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  background: #fdfdfd;
  transition: all 0.2s ease;
}
.gatekeeper-input:focus {
  border-color: var(--purple);
  outline: none;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(81, 65, 182, 0.12);
}
.gatekeeper-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--purple);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.gatekeeper-btn:hover {
  background: #4333a3;
  transform: translateY(-1px);
}
.gatekeeper-footer {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--muted);
}
.gatekeeper-footer a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}
.gatekeeper-footer a:hover {
  text-decoration: underline;
}

/* Admin Dashboard Specific */
.admin-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.admin-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(35, 35, 57, 0.04);
}
.admin-box h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--ink);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  text-align: left;
  padding: 12px 14px;
  background: #f4f4fa;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid var(--line);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-active { background: #e6f7f0; color: #15803d; }
.status-claimed { background: #e0f2fe; color: #0284c7; }
.status-revoked { background: #fee2e2; color: #b91c1c; }
.code-display {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  background: #f3f3f9;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--purple);
}
.action-btn-sm {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}
.action-btn-sm:hover {
  background: #f4f4fa;
}
.action-btn-danger {
  color: #dc2626;
  border-color: #fecaca;
}
.action-btn-danger:hover {
  background: #fee2e2;
}
.new-code-banner {
  background: #eef2ff;
  border: 2px dashed #6366f1;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  text-align: center;
}


/* Tab Switcher & Request Access Styles */
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}
.auth-tab-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-tab-btn.active {
  background: #ffffff;
  color: var(--purple);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-weight: 700;
}
.pending-badge {
  background: #fef3c7;
  color: #b45309;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.approved-badge {
  background: #dcfce7;
  color: #15803d;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.action-btn-approve {
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}
.action-btn-approve:hover {
  background: #15803d;
}


/* --- Quran Arabic & Quran.com Audio Player Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

.quran-player-container {
  margin-bottom: 32px;
}
.quran-audio-bar {
  background: #ffffff;
  border: 1.5px solid var(--purple);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(81, 65, 182, 0.08);
  margin-bottom: 24px;
  position: sticky;
  top: 16px;
  z-index: 20;
}
.quran-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.quran-audio-badge {
  background: #ecfdf5;
  color: #047857;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 8px;
}
.quran-surah-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}
.quran-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quran-btn {
  background: #f4f4fa;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.quran-btn:hover {
  background: var(--pale);
  color: var(--purple);
}
.quran-play-btn {
  background: var(--purple);
  color: #ffffff;
  border-color: var(--purple);
  padding: 8px 18px;
}
.quran-play-btn:hover {
  background: #4333a3;
  color: #ffffff;
}
.quran-speed-btn {
  font-size: 0.8rem;
  padding: 6px 10px;
}
.quran-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quran-time {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 35px;
}
.quran-slider-wrap {
  flex: 1;
}
.quran-seek {
  width: 100%;
  accent-color: var(--purple);
  cursor: pointer;
}
.quran-verses-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quran-ayah-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(35, 35, 57, 0.03);
}
.quran-ayah-card.active-ayah {
  border-color: var(--purple);
  background: #faf9ff;
  box-shadow: 0 0 0 3px rgba(81, 65, 182, 0.18), 0 8px 24px rgba(81, 65, 182, 0.08);
  transform: scale(1.008);
}
.quran-ayah-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.quran-ayah-badge {
  background: #f3f3f9;
  color: var(--purple);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}
.quran-mini-play-btn {
  background: transparent;
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  transition: all 0.15s ease;
}
.quran-mini-play-btn:hover {
  background: var(--pale);
}
.quran-arabic-text {
  font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
  font-size: 1.85rem;
  line-height: 2.2;
  color: #1a1a2e;
  text-align: right;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Quran Word-by-Word Interactive Layout */
.quran-wbw-container {
  margin: 16px 0 20px 0;
  background: #fbfbfe;
  border: 1.5px solid #ebebf5;
  border-radius: 14px;
  padding: 16px 18px;
}
.quran-wbw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f7;
}
.quran-wbw-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--purple);
  display: flex;
  align-items: center;
  gap: 6px;
}
.quran-wbw-hint {
  font-size: 0.76rem;
  color: #6b7280;
}
.quran-wbw-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  direction: rtl;
  justify-content: flex-start;
  align-items: stretch;
}
.quran-word-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid #e2e4ef;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 72px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  outline: none;
}
.quran-word-box:hover,
.quran-word-box:focus-visible {
  border-color: var(--purple);
  background: #f8f7ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(81, 65, 182, 0.14);
}
.quran-word-box:active,
.quran-word-box.playing {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.28);
  transform: scale(0.97);
}
.quran-word-ar {
  font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.35;
  margin-bottom: 4px;
  white-space: nowrap;
}
.quran-word-box.playing .quran-word-ar {
  color: #047857;
}
.quran-word-tr {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: #4b5563;
  line-height: 1.25;
  text-align: center;
  direction: ltr;
  max-width: 120px;
  word-break: break-word;
}
.quran-word-box.playing .quran-word-tr {
  color: #065f46;
  font-weight: 700;
}
.quran-word-icon {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.quran-word-box:hover .quran-word-icon,
.quran-word-box.playing .quran-word-icon {
  opacity: 0.8;
}
.quran-word-box.playing .quran-word-icon {
  opacity: 1;
}
.quran-urdu-text {
  font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Urdu Typesetting', Arial, sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #2e384d;
  text-align: right;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.quran-english-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
}

/* ==========================================================================
   Exam Prep & Nextron Copilot Styles
   ========================================================================== */

#ai-fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: var(--sans);
}

/* Greeting Tooltip */
.ai-greeting-bubble {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 280px;
  background: #ffffff;
  border: 1.5px solid var(--purple);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(81, 65, 182, 0.18);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  animation: aiBounce 0.5s ease-out;
  transition: opacity 0.3s ease;
}
.ai-greeting-bubble strong {
  display: block;
  color: var(--purple);
  margin-bottom: 4px;
  font-size: 0.92rem;
}
.ai-greeting-bubble p {
  margin: 0;
  line-height: 1.4;
  color: #4b5563;
}
.ai-greeting-close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 1rem;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
}
.ai-greeting-close:hover {
  color: var(--ink);
}
.ai-fade-out {
  opacity: 0;
  pointer-events: none;
}

@keyframes aiBounce {
  0% { transform: translateY(12px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Floating Action Button */
.ai-fab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #5141b6 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(81, 65, 182, 0.35);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}
.ai-fab-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(81, 65, 182, 0.45);
}
.ai-fab-btn.active {
  background: #312e81;
}
.ai-fab-icon {
  font-size: 1.25rem;
}
.ai-fab-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: aiPulse 2s infinite;
}
@keyframes aiPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* AI Modal / Drawer */
.ai-modal {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 450px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 100px);
  z-index: 1001;
}
.ai-modal[hidden] {
  display: none !important;
}
.ai-modal-card {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: aiModalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes aiModalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Header */
.ai-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #fafafc;
  border-bottom: 1px solid #edf0f7;
}
.ai-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-bot-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.ai-header-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
}
.ai-header-subtitle {
  font-size: 0.72rem;
  color: #059669;
  font-weight: 600;
}
.ai-header-actions {
  display: flex;
  gap: 6px;
}
.ai-action-btn {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: #6b7280;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.ai-action-btn:hover {
  background: #f3f4f6;
  color: var(--ink);
}

/* Subject Scope Bar */
.ai-scope-bar {
  padding: 8px 14px;
  background: #ffffff;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-scope-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  white-space: nowrap;
}
.ai-chips-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ai-chips-scroll::-webkit-scrollbar {
  display: none;
}
.ai-chip {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ai-chip:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.ai-chip.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #ffffff;
}

/* Suggestions Row */
.ai-suggestions-row {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  background: #fafafc;
  border-bottom: 1px solid #f0f1f6;
  overflow-x: auto;
  scrollbar-width: none;
}
.ai-suggestions-row::-webkit-scrollbar {
  display: none;
}
.ai-suggestion-chip {
  background: #ffffff;
  border: 1px solid #e0e2ed;
  color: var(--purple);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-suggestion-chip:hover {
  background: #f4f3fd;
  border-color: var(--purple);
  transform: translateY(-1px);
}

/* Messages Body */
.ai-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fcfcfd;
}
.ai-msg {
  display: flex;
  gap: 10px;
  max-width: 90%;
}
.ai-msg-user {
  align-self: flex-end;
}
.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, #5141b6 0%, #6366f1 100%);
  color: #ffffff;
  border-radius: 16px 16px 2px 16px;
  box-shadow: 0 4px 12px rgba(81, 65, 182, 0.15);
}
.ai-msg-user .ai-msg-bubble p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #ffffff;
}
.ai-msg-bot {
  align-self: flex-start;
}
.ai-msg-bot .ai-msg-bubble {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #e5e7eb;
  border-radius: 16px 16px 16px 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.ai-msg-avatar {
  width: 30px;
  height: 30px;
  background: #ede9fe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ai-msg-bubble {
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* AI Answer Content Formatting */
.ai-ans-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.ai-ans-title {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.ai-ans-source {
  margin-bottom: 8px;
  color: #6b7280;
}
.ai-divider {
  border: none;
  border-top: 1px solid #edf0f7;
  margin: 8px 0 10px 0;
}
.ai-ans-prose h5 {
  margin: 10px 0 4px 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple);
}
.ai-ans-prose p {
  margin: 0 0 8px 0;
}
.ai-ans-prose ul, .ai-ans-prose ol {
  margin: 4px 0 8px 18px;
  padding: 0;
}
.ai-ans-prose li {
  margin-bottom: 4px;
}
.ai-ans-prose pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  overflow-x: auto;
  margin: 8px 0;
}
.ai-ans-prose code {
  background: #f3f4f6;
  color: #be185d;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.82rem;
}
.ai-ans-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Differences Table */
.ai-diff-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
}
.ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.ai-table th {
  background: #f4f4fa;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  font-weight: 700;
  text-align: left;
}
.ai-table td {
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  vertical-align: top;
}

/* Exam Box */
.ai-exam-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
}
.ai-exam-box h5 {
  color: #b45309;
  margin-top: 0;
}

/* Message Footer */
.ai-msg-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  flex-wrap: wrap;
}
.ai-jump-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  background: #f4f3fd;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.ai-jump-link:hover {
  background: var(--purple);
  color: #ffffff;
}
.ai-copy-btn, .ai-speech-btn {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-copy-btn:hover, .ai-speech-btn:hover {
  background: #f3f4f6;
  color: var(--ink);
}

/* Thinking Indicator */
.ai-thinking-bubble {
  display: flex;
  align-items: center;
  padding: 10px 14px;
}
.ai-dot {
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
  margin-right: 4px;
  animation: aiDot 1.4s infinite ease-in-out both;
}
.ai-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes aiDot {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Input Form */
.ai-input-form {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid #edf0f7;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-input-field {
  flex: 1;
  border: 1.5px solid #e2e4ef;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
  resize: none;
  max-height: 100px;
  transition: border-color 0.15s ease;
}
.ai-input-field:focus {
  border-color: var(--purple);
}
.ai-send-btn {
  width: 40px;
  height: 40px;
  background: var(--purple);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.ai-send-btn:hover {
  background: #4333a3;
  transform: scale(1.05);
}

@media (max-width: 600px) {
  #ai-fab-container {
    bottom: 16px;
    right: 16px;
  }
  .ai-fab-label {
    display: none;
  }
  .ai-modal {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 82vh;
    border-radius: 20px 20px 0 0;
  }
}

/* ==========================================================================
   Nextron Copilot & Browser Automation Extras
   ========================================================================== */

.ai-tag {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 6px;
}

.nextron-auto-bar {
  padding: 8px 14px;
  background: #f8f7ff;
  border-bottom: 1px solid #ede9fe;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nextron-auto-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple);
  white-space: nowrap;
}
.nextron-auto-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nextron-auto-scroll::-webkit-scrollbar {
  display: none;
}
.nextron-btn-action {
  background: #ffffff;
  border: 1px solid #d8b4fe;
  color: #6d28d9;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(109, 40, 217, 0.05);
}
.nextron-btn-action:hover {
  background: #6d28d9;
  color: #ffffff;
  border-color: #6d28d9;
  transform: translateY(-1px);
}

.nextron-auto-card {
  background: #fdfdfd;
  border: 1.5px solid #ede9fe;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 6px 0;
}
.nextron-auto-head {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nextron-paper-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  max-height: 220px;
  overflow-y: auto;
}
.nextron-paper-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  border-radius: 10px;
  gap: 10px;
}
.nextron-paper-item strong {
  font-size: 0.82rem;
  color: var(--ink);
}
.nextron-mini-btn {
  background: var(--purple);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.nextron-mini-btn:hover {
  background: #4333a3;
  transform: scale(1.03);
}

.nextron-redirect-pill {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  margin-top: 10px;
}
.nextron-cancel-btn {
  background: #ffffff;
  border: 1px solid #93c5fd;
  color: #1e3a8a;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.7rem;
  cursor: pointer;
}
.nextron-cancel-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

.nextron-action-pill {
  background: linear-gradient(135deg, #5141b6 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 3px 8px rgba(81, 65, 182, 0.25);
}
.nextron-action-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(81, 65, 182, 0.35);
}

.nextron-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.nextron-chip-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nextron-chip-btn:hover {
  background: var(--purple);
  color: #ffffff;
  border-color: var(--purple);
}

/* ==========================================================================
   Light / Dark Mode Toggle Buttons & Theme Styles
   ========================================================================== */

.theme-toggle-btn {
  background: var(--pale);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--ink);
  outline: none;
}
.theme-toggle-btn:hover {
  transform: scale(1.08);
  background: var(--line);
}

.sidebar-theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pale);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}
.sidebar-theme-btn:hover {
  background: var(--line);
  transform: translateY(-1px);
}
.sidebar-theme-btn .theme-icon {
  font-size: 1.1rem;
}

/* --- Premium Dark Mode Palette --- */
[data-theme="dark"] {
  --ink: #f8fafc;
  --muted: #94a3b8;
  --purple: #818cf8;
  --pale: #1e1b4b;
  --line: #334155;
  --bg: #0b0f19;
  --card-bg: #151d2f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] body {
  background: #0b0f19;
  color: #f8fafc;
}

[data-theme="dark"] .shell,
[data-theme="dark"] .content-shell {
  background: #0b0f19;
}

[data-theme="dark"] .sidebar {
  background: #111827;
  border-right-color: #1f2937;
}

[data-theme="dark"] .topbar {
  background: #111827;
  border-bottom-color: #1f2937;
}

[data-theme="dark"] .search-form {
  background: #1f2937;
  border-color: #374151;
}
[data-theme="dark"] .search-form input {
  color: #f8fafc;
}

[data-theme="dark"] .panel,
[data-theme="dark"] .reader,
[data-theme="dark"] .subject-card,
[data-theme="dark"] .aside-card,
[data-theme="dark"] .paper-card,
[data-theme="dark"] .gatekeeper-card,
[data-theme="dark"] .quiz-card,
[data-theme="dark"] .model-answer,
[data-theme="dark"] .boot {
  background: #151d2f;
  border-color: #1f293d;
  color: #f8fafc;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .prose,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #f8fafc;
}

[data-theme="dark"] .card-meta span,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .source-note,
[data-theme="dark"] .crumb {
  color: #94a3b8;
}

[data-theme="dark"] .mode-button {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
[data-theme="dark"] .mode-button.active {
  background: #818cf8;
  color: #0b0f19;
  font-weight: 700;
}

[data-theme="dark"] .quran-audio-bar,
[data-theme="dark"] .quran-ayah-card {
  background: #151d2f;
  border-color: #1f293d;
  color: #f8fafc;
}
[data-theme="dark"] .quran-ayah-card.active-ayah {
  background: #1e2540;
  border-color: #818cf8;
}
[data-theme="dark"] .quran-arabic-text {
  color: #f1f5f9;
}
[data-theme="dark"] .quran-urdu-text {
  color: #e2e8f0;
}
[data-theme="dark"] .quran-english-text {
  color: #94a3b8;
}

[data-theme="dark"] .quran-wbw-container {
  background: #0d1322;
  border-color: #1f293d;
}
[data-theme="dark"] .quran-word-box {
  background: #151d2f;
  border-color: #27344e;
  color: #f8fafc;
}
[data-theme="dark"] .quran-word-box:hover {
  background: #1e293b;
  border-color: #818cf8;
}
[data-theme="dark"] .quran-word-ar {
  color: #f8fafc;
}
[data-theme="dark"] .quran-word-tr {
  color: #94a3b8;
}

[data-theme="dark"] .writing-space textarea,
[data-theme="dark"] textarea,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"] {
  background: #0d1322;
  color: #f8fafc;
  border-color: #27344e;
}

[data-theme="dark"] .ai-modal-card {
  background: #111827;
  border-color: #1f2937;
  color: #f8fafc;
}
[data-theme="dark"] .ai-modal-header,
[data-theme="dark"] .nextron-auto-bar,
[data-theme="dark"] .ai-scope-bar,
[data-theme="dark"] .ai-input-form {
  background: #0f172a;
  border-color: #1e293b;
}
[data-theme="dark"] .ai-chat-body {
  background: #080d1a;
}
[data-theme="dark"] .ai-msg-bot .ai-msg-bubble {
  background: #151d2f;
  border-color: #1f293d;
  color: #f8fafc;
}
[data-theme="dark"] .nextron-paper-item {
  background: #0f172a;
  border-color: #1e293b;
}
[data-theme="dark"] .nextron-chip-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
[data-theme="dark"] .ai-input-field {
  background: #080d1a;
  color: #f8fafc;
  border-color: #1e293b;
}
