@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Readex+Pro:wght@400;500;600;700&display=swap');
:root{--navy:#26324A;--deep:#19243a;--navy-soft:#4A5870;--gold:#C8A248;--gold-dark:#8D6423;--ivory:#FAF7F0;--body:#f4f4f1;--ink:#222d43;--muted:#6c7889;--border:#e7e7e2;--white:#fff;--accent:#6B3CB6;--scale:1;--shadow:0 14px 50px rgba(31,42,62,.05)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:"Segoe UI",Tahoma,Arial,sans-serif;background:var(--body);color:var(--ink);font-size:15px;line-height:1.85}button,input,textarea{font:inherit}button{cursor:pointer}button:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #d6a94b;outline-offset:3px}::selection{background:#ead49c;color:#18263e}a{color:inherit}
.demo-ribbon{height:31px;background:#e9e2d1;color:#4c4739;display:flex;justify-content:center;align-items:center;gap:12px;font-size:11px;letter-spacing:0}.demo-ribbon strong{font-weight:800;color:#735520}.topbar{background:#fff;border-bottom:1px solid var(--border);height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 35px;position:sticky;top:0;z-index:30}.brand,.top-actions{display:flex;align-items:center;gap:13px}.brand-star{background:var(--navy);color:#ebc568;font-size:26px;height:42px;width:42px;display:grid;place-items:center;border-radius:11px}.brand-lines{display:flex;flex-direction:column;line-height:1.4}.brand-lines strong{font-size:15px;letter-spacing:-.3px}.brand-lines span{font-family:Arial,sans-serif;color:#8D7B59;font-weight:600;letter-spacing:1.8px;font-size:8px;direction:ltr}.top-separator{height:29px;width:1px;background:#ddd8cf;margin:0 6px}.product-label{font-family:Arial,sans-serif;color:#3a4a62;letter-spacing:2px;font-weight:700;font-size:10px;direction:ltr}.product-label small{font-size:8px;border:1px solid #d6bd79;border-radius:4px;padding:2px 4px;color:#98742f;letter-spacing:0}.top-tool,.icon-btn{background:#fff;color:#4b5a73;border:1px solid #e4e6e7;border-radius:9px;padding:6px 11px;font-size:12px;line-height:1.7}.top-tool:hover,.icon-btn:hover{background:#f5f1e7;border-color:#d4c39c}.device-tip{font-size:11px;color:#8190a0;white-space:nowrap}.mobile-menu{display:none}
.app-shell{display:flex;align-items:stretch;min-height:calc(100vh - 109px)}.sidebar{width:296px;flex:0 0 296px;position:sticky;top:78px;align-self:flex-start;height:calc(100vh - 78px);overflow:auto;background:#fff;border-left:1px solid var(--border);padding:29px 21px 18px;display:flex;flex-direction:column;z-index:25;scrollbar-width:thin}.sidebar-head{display:flex;gap:14px;align-items:center;padding-bottom:24px;border-bottom:1px solid #eee}.cover-illustration{width:67px;height:87px;background:#fee6a5;border-radius:7px;display:grid;place-items:center;overflow:hidden;flex:0 0 67px;border:1px solid #f1d991}.cover-illustration img{width:88%;max-height:70%;object-fit:contain}.sidebar-head h2{margin:3px 0 0;color:#26324A;font-size:23px}.eyebrow{display:block;letter-spacing:.1px;font-size:10px;color:#9c7d46;font-weight:800}.edition{color:#8b94a1;font-size:10px}.sidebar-progress{margin:24px 0 19px}.progress-meta{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin-bottom:10px}.progress-meta strong{font-size:11px}.progress-meta span{font-family:Arial,sans-serif;color:#9b844f;direction:ltr}.progress-track{height:5px;background:#eeefee;border-radius:10px;overflow:hidden}.progress-track>div{height:100%;width:0;background:linear-gradient(90deg,#cbb572,#a98735);border-radius:10px;transition:width .3s}.nav-caption{font-size:10px;font-weight:800;color:#9b9ea4;margin:11px 0 12px}.chapters{display:flex;flex-direction:column;gap:6px}.chapter{width:100%;border:0;background:#fff;text-align:right;padding:12px 12px;display:flex;gap:12px;align-items:start;border-radius:9px;color:#576475;transition:.2s}.chapter:hover{background:#f7f7f5}.chapter.active{background:#f1edf9;color:#39255d}.chapter-num{font-size:10px;letter-spacing:1px;font-family:Arial,sans-serif;color:var(--qcolor);margin-top:4px;font-weight:800}.chapter strong{font-size:12px;font-weight:760;display:block;line-height:1.6}.chapter small{font-size:9.5px;color:#8993a0;display:block;line-height:1.5;margin-top:3px}.sidebar-spacer{flex:1;min-height:20px}.sidebar-tools{border-top:1px solid var(--border);padding-top:16px;display:flex;flex-direction:column;gap:4px}.sidebar-tools button{width:100%;text-align:right;border:0;background:transparent;color:#667486;border-radius:7px;font-size:11px;padding:8px 10px}.sidebar-tools button:hover{background:#f5f5f3}.sidebar-tools span{padding-right:8px}.sidebar-foot{font-size:10px;color:#a3a6ae;line-height:1.6;margin:15px 9px}
.reader-main{flex:1;min-width:0;padding:18px clamp(22px,5vw,92px) 0}.reader-header{display:flex;align-items:center;justify-content:space-between;max-width:1030px;margin:0 auto 18px;font-size:11px;color:#8b95a2}.header-breadcrumb span{padding:0 9px;color:#b4b7bd}.header-breadcrumb b{font-weight:700;color:#59657c}.header-status{display:flex;align-items:center;gap:7px}.status-dot{width:7px;height:7px;border-radius:50%;background:#59ab80}.reading-surface{background:#fff;max-width:1030px;margin:auto;border:1px solid #ededeb;box-shadow:var(--shadow);border-radius:19px;min-height:70vh;overflow:hidden}.section-banner{padding:33px clamp(22px,5vw,56px) 25px;background:linear-gradient(145deg,#fefefe 0%,#f9f9f7 60%,#f6f5f3 100%);border-bottom:1px solid #eeeeea;position:relative}.section-banner:before{content:"";height:5px;background:var(--accent);position:absolute;top:0;right:0;left:0;opacity:.78}.section-banner-top{display:flex;align-items:center;gap:12px;color:#93815e;font-family:Arial,sans-serif;font-size:10px;font-weight:800;letter-spacing:1.4px}.section-chip{display:inline-block;border-radius:25px;background:color-mix(in srgb,var(--accent) 11%,white);color:var(--accent);font-size:10px;padding:4px 11px;margin:17px 0 8px;font-weight:700}.section-banner h1{font-size:clamp(27px,3vw,38px);line-height:1.4;margin:0;color:#26324A;font-weight:800;letter-spacing:-1px}.section-banner p{color:#7a8695;margin:7px 0 0;font-size:13px}.tiny-metrics{display:flex;gap:20px;align-items:center;margin-top:24px;font-size:11px;color:#8b95a2;flex-wrap:wrap}.tiny-metrics strong{color:#344259;font-size:12px}.reader-tabs{display:flex;gap:10px;align-items:center;border-bottom:1px solid #f0efed;padding:13px clamp(22px,5vw,56px);background:white;position:sticky;top:78px;z-index:10}.reader-tabs a{display:inline-flex;text-decoration:none;border-radius:7px;padding:7px 13px;gap:7px;align-items:center;font-size:12px;color:#707c8d}.reader-tabs a:hover{background:#f6f4ef;color:#202c44}.reading-body{padding:28px clamp(20px,5vw,60px) 60px;font-size:calc(15px * var(--scale))}.reading-block{scroll-margin-top:150px}.content-title{margin:20px 0 19px;font-size:20px;color:#26324A;line-height:1.45;font-weight:800}.content-lead{font-size:13px;color:#929aa6;margin-bottom:25px}.lesson-content{line-height:2;font-size:calc(15px * var(--scale))}.lesson-content .keep{padding:0 0 24px;margin:0 0 32px;border-bottom:1px solid #efefee}.lesson-content .keep:last-child{border:0}.lesson-content h3{font-size:calc(18px * var(--scale));font-weight:800;line-height:1.65;color:#26324A;margin:6px 0 17px;position:relative;padding-right:17px}.lesson-content h3:before{content:"";position:absolute;right:0;top:11px;width:5px;height:21px;border-radius:10px;background:var(--accent)}.lesson-content p{line-height:2.3;margin:13px 0;color:#414b60}.lesson-content b,.lesson-content strong{color:#253149}.lesson-content .ln{display:block;padding:3px 0}.lesson-content .grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}.lesson-content .box{padding:17px 19px;border:1px solid #eeece8;border-radius:12px;background:#fcfcfa;font-size:calc(13px * var(--scale))}.lesson-content .box.ex{background:#f2f8f4;border-color:#dbe9df}.lesson-content .box.trap{background:#fff8f4;border-color:#f2e0d8}.lesson-content .box h5{font-size:12px;margin:0 0 10px;color:#26324A}.lesson-content table{width:100%;border-collapse:collapse;margin:17px 0 20px;font-size:calc(12px * var(--scale));line-height:1.65;display:table}.lesson-content td,.lesson-content th{border:1px solid #e9eaf0;text-align:right;padding:8px 11px}.lesson-content th{background:#f1ecfb;color:#373052;font-weight:700}.lesson-content tr:nth-child(even) td{background:#fafafb}.lesson-content svg,.lesson-content img{max-width:100%;height:auto}.lesson-content .fig{display:flex;justify-content:center}.lesson-content .b{font-weight:700}
.section-divider{margin:34px 0 28px;border:0;border-top:1px solid #ededea}.practice-intro{background:#f9f8f5;border:1px solid #efede8;border-radius:14px;padding:22px 25px;margin-bottom:22px;display:flex;justify-content:space-between;align-items:center;gap:10px}.practice-intro h2{margin:2px 0;font-size:20px;color:#25314a}.practice-intro p{color:#7f8996;font-size:12px;margin:5px 0}.practice-label{font-family:Arial,sans-serif;color:#a18954;font-size:10px;font-weight:800;letter-spacing:1px}.practice-counter{white-space:nowrap;font-size:11px;color:#778393}.practice-counter strong{color:var(--accent);font:700 21px Arial,sans-serif}.question-nav{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:22px;direction:ltr;justify-content:flex-end}.q-jump{min-width:38px;height:37px;background:white;border:1px solid #e4e5e5;border-radius:8px;color:#697585;position:relative;font:700 12px Arial,sans-serif}.q-jump:hover{border-color:#c3b4a0}.q-jump.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,white);color:var(--accent)}.q-jump.answered:after{content:"";position:absolute;top:3px;left:3px;background:#55a67f;width:5px;height:5px;border-radius:50%}.q-jump.flagged:before{content:"★";position:absolute;bottom:0;right:3px;color:#c0a045;font-size:9px}
.question-card{border:1px solid #e7e8eb;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 5px 22px rgba(20,33,58,.035)}.question-top{background:#fafaf9;padding:15px 21px;border-bottom:1px solid #efefed;display:flex;align-items:center;justify-content:space-between;gap:12px}.q-tag{color:var(--accent);font-size:11px;font-weight:800}.q-tag span{border:1px solid color-mix(in srgb,var(--accent) 28%,white);border-radius:6px;padding:2px 9px;margin-left:8px}.flag-btn{background:white;border:1px solid #e9e9e7;border-radius:8px;padding:5px 13px;font-size:11px;color:#687686}.flag-btn.flagged{color:#966b1f;background:#fff7e7;border-color:#e7d59e}.question-content{padding:24px clamp(17px,4vw,34px)}.question-stem{line-height:2;font-size:calc(17px * var(--scale));font-weight:650;color:#273348;overflow-wrap:anywhere}.question-stem div{max-width:100%}.question-stem svg{max-width:100%}.q-figure{text-align:center;margin:20px auto 24px;padding:18px;background:#f9fafb;border-radius:14px;max-width:550px;border:1px solid #edf0f2;min-height:125px;display:grid;place-items:center}.q-figure svg{max-width:100%;width:auto;height:auto;max-height:240px;overflow:visible}.question-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:19px}.answer-option{width:100%;border-radius:11px;border:1px solid #e6e7e7;background:white;display:flex;align-items:center;text-align:right;gap:12px;padding:14px 16px;min-height:62px;color:#334057;line-height:1.65;transition:.15s}.answer-option:hover{border-color:#c1ae7e;background:#fcfbf7}.answer-option.chosen{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 5%,white);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 30%,white)}.answer-option.correct{background:#f0f9f2;border-color:#7bba89}.answer-option.incorrect{background:#fff4f2;border-color:#e9a49d}.opt-letter{height:30px;width:30px;flex:0 0 30px;border:1px solid #e2e5e7;border-radius:8px;display:grid;place-items:center;color:#5d6a7b;font-size:13px;font-weight:800}.chosen .opt-letter{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 50%,white)}.opt-text{font-size:calc(13px * var(--scale));overflow-wrap:anywhere}.opt-text svg{max-width:100%;height:auto}.question-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;border-top:1px solid #f0f0ed}.button-primary{background:var(--navy);border:1px solid var(--navy);color:white;border-radius:9px;padding:9px 17px;font-weight:700;font-size:12px}.button-primary:hover{background:#364866}.button-primary:disabled{opacity:.5;cursor:not-allowed}.button-ghost{color:#617085;background:white;border:1px solid #e8e8e6;padding:9px 13px;border-radius:9px;font-size:12px}.button-ghost:hover{background:#f8f8f7}.question-left-actions{display:flex;gap:9px}.answer-feedback{padding:20px 22px;background:#f4f8f5;border-top:1px solid #dce8de;line-height:1.9;font-size:calc(13px * var(--scale))}.answer-feedback.bad{background:#fcf6f4;border-color:#f0d9d4}.answer-feedback strong{display:block;margin-bottom:6px;color:#365446}.answer-feedback.bad strong{color:#9b5247}.answer-feedback p{margin:0}.nav-hint{margin-top:13px;color:#8b94a0;font-size:11px;text-align:center}.notes-panel{margin-top:45px;border:1px solid #eeeae1;background:#fffefb;border-radius:13px;padding:23px 25px}.notes-panel h3{margin:0 0 5px;color:#26324A;font-size:17px}.notes-panel p{margin:0 0 14px;font-size:12px;color:#8591a1}.notes-panel textarea{display:block;width:100%;resize:vertical;min-height:85px;background:#fff;border:1px solid #e3e1dc;border-radius:8px;padding:14px 15px;color:#2e384f;line-height:1.8}.notes-foot{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#a1a4ad;margin-top:9px}.reader-footer{max-width:1030px;margin:20px auto 0;display:flex;justify-content:space-between;color:#a0a5ac;font-family:Arial,sans-serif;font-size:9px;gap:20px;padding-bottom:30px}.toast{position:fixed;bottom:23px;left:25px;background:#24324c;color:#fff;font-size:12px;padding:10px 19px;border-radius:10px;opacity:0;pointer-events:none;z-index:80;transform:translateY(12px);transition:opacity .22s,transform .22s}.toast.visible{opacity:1;transform:translateY(0)}
.is-focus .sidebar{display:none}.is-focus .device-tip{display:none}.is-focus .reader-main{padding-right:clamp(30px,10vw,160px);padding-left:clamp(30px,10vw,160px)}.is-focus .reading-surface{max-width:880px}
@media(max-width:1000px){.topbar{padding:0 22px}.sidebar{width:255px;flex-basis:255px;padding:20px 15px}.reader-main{padding:17px 22px 0}.device-tip{display:none}.reading-body{padding:24px 32px 44px}}
@media(max-width:760px){.demo-ribbon{font-size:9px;min-height:38px;height:auto;text-align:center;padding:5px 9px;gap:6px;flex-wrap:wrap;line-height:1.25}.topbar{height:65px;padding:0 13px}.mobile-menu{display:block;min-width:35px;height:34px;padding:0}.brand{gap:8px}.brand-star{width:34px;height:34px;font-size:20px;border-radius:9px}.brand-lines strong{font-size:11px}.brand-lines span{font-size:6px;letter-spacing:.7px}.top-separator,.product-label{display:none}.top-actions{gap:5px}.top-tool{padding:6px 8px;font-size:10px}.focus-tool span{display:none}.app-shell{display:block}.sidebar{position:fixed;top:65px;right:0;bottom:0;left:auto;width:min(320px,90vw);height:calc(100vh - 65px);transform:translateX(110%);transition:transform .25s;box-shadow:-5px 0 30px rgba(0,0,0,.1)}.sidebar.open{transform:translateX(0)}.mobile-backdrop:not([hidden]){display:block;position:fixed;inset:65px 0 0;background:rgba(19,27,39,.4);z-index:22}.reader-main{padding:14px 10px 0}.reader-header{padding:0 7px;gap:6px}.header-status{display:none}.reading-surface{border-radius:12px}.section-banner{padding:23px 20px 22px}.section-banner h1{font-size:25px}.section-banner p{font-size:12px}.tiny-metrics{gap:10px;margin-top:15px}.reader-tabs{top:65px;padding:8px 13px;gap:3px;justify-content:space-around}.reader-tabs a{font-size:11px;padding:7px 5px}.reading-body{padding:21px 16px 36px}.lesson-content .grid2{grid-template-columns:1fr}.lesson-content table{font-size:11px}.lesson-content th,.lesson-content td{padding:6px}.lesson-content .box{padding:12px}.lesson-content h3{font-size:17px}.practice-intro{padding:15px 16px}.practice-intro h2{font-size:17px}.question-options{grid-template-columns:1fr}.question-content{padding:20px 17px}.question-top{padding:12px 14px}.question-stem{font-size:16px}.question-bottom{flex-wrap:wrap;padding:12px}.button-primary,.button-ghost{padding:8px 12px}.reader-footer{font-size:8px;flex-wrap:wrap;justify-content:center;text-align:center}.is-focus .reader-main{padding:10px}.is-focus .sidebar{display:flex}.is-focus .sidebar:not(.open){transform:translateX(110%)}.sidebar-head{padding-bottom:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
@media print{body{display:none!important}}


/* =========================================================
   GOLDEN READER V3 | NIBRAS SCREEN TYPOGRAPHY & READING RHYTHM
   Arabic book text: Cairo; interface headings: Readex Pro.
   Fonts are requested from Google's CSS endpoint when online.
   No font binaries are bundled.
   ========================================================= */
:root{
  --font-reading:'Cairo','Noto Sans Arabic',Tahoma,Arial,sans-serif;
  --font-heading:'Readex Pro','Cairo','Noto Sans Arabic',Tahoma,sans-serif;
  --body:#F7F8F6;
  --ink:#26324A;
  --muted:#647083;
  --border:#E8ECE9;
  --scale:1;
  --shadow:0 8px 30px rgba(31,42,62,.035);
}
html{scroll-padding-top:126px}
body{font-family:var(--font-reading);font-size:16px;line-height:1.85;letter-spacing:normal;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,textarea,input{font-family:var(--font-reading)}
.demo-ribbon{height:auto;min-height:29px;font-size:12px;line-height:1.6;padding:3px 12px}
.topbar{height:70px;padding-inline:30px}
.brand-lines{line-height:1.42}
.brand-lines strong{font-family:var(--font-heading);font-size:15px;letter-spacing:normal}
.brand-lines span{font-size:9px;letter-spacing:1.2px}
.brand-star{height:38px;width:38px}
.top-tool,.icon-btn{font-size:13px;line-height:1.5;padding:7px 11px}
.device-tip{font-size:12px}
.app-shell{min-height:calc(100vh - 99px)}
.sidebar{top:70px;height:calc(100vh - 70px);width:274px;flex-basis:274px;padding:24px 19px 18px}
.sidebar-head{gap:12px;padding-bottom:19px}
.cover-illustration{height:75px;width:61px;flex-basis:61px}
.sidebar-head h2{font-family:var(--font-heading);font-size:25px;line-height:1.45;margin:0}
.eyebrow{font-size:11px;color:#8D6423;line-height:1.5;letter-spacing:normal}
.edition{font-size:11px;line-height:1.65;color:#657184}
.sidebar-progress{margin:18px 0 12px}
.progress-meta,.progress-meta strong{font-size:12px}
.nav-caption{font-size:12px;margin:12px 0 8px}
.chapters{gap:4px}
.chapter{padding:11px 10px;gap:10px;align-items:start;line-height:1.6}
.chapter strong{font-size:14px;font-weight:700;line-height:1.65}
.chapter small{font-size:11.5px;line-height:1.6;margin-top:1px}
.chapter-num{font-size:11px;margin-top:3px}
.sidebar-tools button{font-size:12.5px;padding:8px 9px}
.sidebar-foot{font-size:11px;line-height:1.8;margin-top:12px}
.reader-main{padding:17px clamp(18px,3.7vw,60px) 0}
.reader-header{max-width:980px;margin-bottom:13px;font-size:12px}
.reading-surface{max-width:980px;border-radius:17px}
.section-banner{padding:22px clamp(27px,5vw,58px) 20px;background:linear-gradient(110deg,#fff 40%,#faf9f5 100%)}
.section-banner:before{height:4px}
.section-banner-top{font-size:11px;letter-spacing:.4px}
.section-chip{font-size:11px;padding:3px 11px;margin:8px 0 4px}
.section-banner h1{font-family:var(--font-heading);font-size:clamp(27px,2.7vw,33px);line-height:1.6;letter-spacing:normal;font-weight:600;margin:0}
.section-banner p{font-size:14px;color:#647083;line-height:1.8;margin:2px 0 0}
.tiny-metrics{gap:15px;margin-top:12px;font-size:11.5px;line-height:1.6}
.tiny-metrics strong{font-size:12px}
.reader-tabs{top:70px;padding:8px clamp(27px,5vw,58px);gap:8px}
.reader-tabs a{font-size:13px;padding:6px 11px;line-height:1.8}
.reading-body{padding:23px clamp(27px,5vw,60px) 45px;font-size:calc(17px * var(--scale))}
.reading-block{scroll-margin-top:138px}
.content-title{font-family:var(--font-heading);font-size:22px;font-weight:600;line-height:1.6;margin:10px 0 11px}
.content-lead{font-size:14px;line-height:1.8;color:#657083;margin:0 0 20px}
.lesson-content{font-family:var(--font-reading);font-size:calc(17px * var(--scale));line-height:1.95;color:#2D394E}
.lesson-content .keep{padding:0 0 18px;margin:0 0 22px;border-bottom:1px solid #ECEDE9}
.lesson-content h3{font-family:var(--font-heading);font-size:calc(20px * var(--scale));font-weight:600;line-height:1.65;color:#26324A;margin:6px 0 10px;padding-right:15px}
.lesson-content h3:before{top:10px;width:4px;height:20px}
.lesson-content p{font-size:inherit;line-height:1.95;margin:8px 0 14px;color:#364258;max-width:70ch}
.lesson-content .ln{padding:1px 0;line-height:1.85}
.lesson-content .grid2{gap:12px;margin:13px 0 17px}
.lesson-content .box{padding:14px 17px;font-size:calc(15px * var(--scale));line-height:1.9;background:#FAFAF8}
.lesson-content .box h5{font-family:var(--font-heading);font-size:14px;font-weight:600;margin:0 0 6px}
.lesson-content table{font-size:calc(14px * var(--scale));line-height:1.8;margin:13px 0 18px}
.lesson-content td,.lesson-content th{padding:9px 11px;vertical-align:top}
.lesson-content th{font-weight:700}
.practice-intro{padding:18px 22px;margin-bottom:17px}
.practice-intro h2{font-family:var(--font-heading);font-weight:600;font-size:23px;line-height:1.7}
.practice-intro p{font-size:13px;line-height:1.8}
.practice-label{font-size:11px;letter-spacing:.6px}
.practice-counter{font-size:13px}
.question-nav{gap:8px;margin-bottom:18px}
.q-jump{height:40px;min-width:41px;font-size:13px}
.question-top{padding:13px 20px}
.q-tag,.flag-btn{font-size:13px}
.question-content{padding:22px clamp(18px,3.5vw,32px)}
.question-stem{font-family:var(--font-reading);font-size:calc(19px * var(--scale));line-height:1.9;font-weight:600}
.question-options{gap:11px;margin-top:17px}
.answer-option{min-height:66px;padding:12px 15px;gap:12px;line-height:1.8}
.opt-letter{font-size:15px;height:32px;width:32px;flex-basis:32px}
.opt-text{font-size:calc(16px * var(--scale));line-height:1.85}
.question-bottom{padding:12px 20px}
.button-primary,.button-ghost{font-size:13.5px;padding:10px 15px}
.answer-feedback{font-size:calc(15px * var(--scale));line-height:1.9}
.nav-hint{font-size:12px;line-height:1.8}
.notes-panel{margin-top:35px;padding:21px 23px}
.notes-panel h3{font-family:var(--font-heading);font-size:20px;font-weight:600}
.notes-panel p{font-size:13px;line-height:1.8}
.notes-panel textarea{font-size:15px;line-height:1.95}
.notes-foot{font-size:11.5px}
.reader-footer{font-size:10px;line-height:1.5}
@media(max-width:1000px){
  .sidebar{width:251px;flex-basis:251px;padding:17px 14px}
  .reader-main{padding:16px 17px 0}
  .reading-body{padding:21px 30px 40px}
}
@media(max-width:760px){
  .demo-ribbon{font-size:10px;padding:5px 10px}
  .topbar{height:63px;padding:0 11px}
  .brand-lines strong{font-size:12px}
  .brand-lines span{font-size:6.5px}
  .brand-star{width:34px;height:34px}
  .top-tool{padding:6px 8px;font-size:12px}
  .sidebar{top:63px;height:calc(100vh - 63px);width:min(315px,92vw)}
  .mobile-backdrop:not([hidden]){inset:63px 0 0}
  .reader-main{padding:10px 7px 0}
  .reader-header{font-size:11px;margin:0 6px 9px}
  .reading-surface{border-radius:12px}
  .section-banner{padding:16px 19px 15px}
  .section-banner h1{font-size:25px;line-height:1.7}
  .section-banner p{font-size:13px;line-height:1.75}
  .tiny-metrics{font-size:10.5px;gap:9px;margin-top:9px}
  .reader-tabs{top:63px;padding:7px 12px;gap:3px}
  .reader-tabs a{font-size:12px;padding:7px 6px;line-height:1.5}
  .reading-body{padding:18px 18px 38px}
  .content-title{font-size:20px;margin:8px 0}
  .content-lead{font-size:13px;margin:0 0 15px}
  .lesson-content{font-size:calc(16.5px * var(--scale));line-height:1.9}
  .lesson-content h3{font-size:calc(18px * var(--scale));line-height:1.65}
  .lesson-content p{line-height:1.9}
  .lesson-content .box{font-size:calc(14.5px * var(--scale));padding:13px}
  .lesson-content table{font-size:calc(12.5px * var(--scale));display:block;max-width:100%;overflow-x:auto}
  .lesson-content th,.lesson-content td{padding:8px}
  .practice-intro{padding:14px 16px}
  .practice-intro h2{font-size:19px}
  .question-content{padding:18px 16px}
  .question-stem{font-size:calc(18px * var(--scale))}
  .opt-text{font-size:calc(15.5px * var(--scale))}
  .answer-option{min-height:59px}
  .reader-footer{font-size:9px}
  .is-focus .reader-main{padding:8px}
}
/* V3.1: Restore the reader-first layout, right-hand Arabic navigation, and low-friction question browsing. */
html[dir="rtl"] .app-shell{flex-direction:row}
html[dir="rtl"] .sidebar{order:0;border-left:1px solid var(--border);border-right:0}
html[dir="rtl"] .reader-main{order:1}
.sections-tool{font-size:13px;font-weight:700;color:var(--navy);padding:7px 14px}
.crumb-link{border:none;background:transparent;padding:5px 1px;font-family:var(--font-reading);font-size:12px;color:#716039;font-weight:700;text-decoration:underline;text-underline-offset:4px}
.crumb-link:hover{color:#26324a}
.section-nav-group{border-right:3px solid transparent;border-radius:10px;margin-bottom:5px}
.section-nav-group.selected{border-color:var(--qcolor);background:#faf9f6}
.section-nav-group .chapter.active{background:transparent;color:var(--ink)}
.chapter-children{padding:0 21px 10px 2px;display:flex;flex-direction:column;gap:4px}
.chapter-children button{border:none;background:transparent;text-align:right;font-size:12px;color:#57677b;line-height:1.85;padding:6px 8px;border-radius:8px}
.chapter-children button:hover,.chapter-children button:focus-visible{background:#f0ede6;color:#26324A}
.chapter-children button span{float:left;font-size:11px;color:#85724f}
.sidebar-summary{border:1px solid #eee8d9;background:#fffdf8;border-radius:10px;padding:12px 13px;margin:8px 0 14px;display:flex;flex-direction:column;gap:5px;color:#667188;font-size:11.5px;line-height:1.75}
.sidebar-summary strong{color:#26324a;font-weight:700}
.section-banner{padding-top:19px!important;padding-bottom:15px!important}
.section-banner .tiny-metrics{margin-top:8px}
.section-banner h1{margin:2px 0!important}
.reader-tabs{display:flex;align-items:center}
.reader-tabs .tabs-sections{margin-right:auto;background:transparent;border:0;color:#7a6435;font-size:12px;font-family:var(--font-reading);font-weight:700;padding:7px 8px;white-space:nowrap}
.practice-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:2px 0 13px}
.practice-toolbar>span{font-size:12px;color:#83909d}
.practice-modes{display:flex;align-items:center;gap:3px;background:#f4f4f0;border:1px solid #e8e7df;border-radius:10px;padding:4px}
.practice-modes button{padding:8px 14px;border:0;background:transparent;color:#626f81;font-size:12px;border-radius:8px;font-family:var(--font-reading);font-weight:700}
.practice-modes button.active{background:#fff;color:#26324A;box-shadow:0 2px 7px rgba(38,50,74,.08)}
.question-nav{display:flex;flex-wrap:wrap;gap:7px}
.question-nav .q-jump{min-width:45px;min-height:44px;border-radius:9px}
.as-continuous{margin-bottom:18px;scroll-margin-top:145px}
.as-continuous .question-top{background:#fff}
.as-continuous .question-bottom{border-top:1px solid #eee}
.as-continuous .answer-option{min-height:58px}
.saved-hint{color:#82919d;font-size:12px}
.end-of-lesson{display:flex;justify-content:space-between;align-items:center;gap:15px;background:#faf8f2;border:1px solid #eae3d2;padding:17px 19px;margin:18px 0 10px;border-radius:12px;color:#697486;font-size:13px}
.mini-report{background:#fafaf8;border:1px solid #ecebe7;padding:17px 20px;margin-top:18px;border-radius:12px}
.mini-report-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.mini-report-head strong{font-family:var(--font-reading);font-weight:800;font-size:15px;color:#26324A}
.mini-report-head p{font-size:12px;color:#7b8494;margin:4px 0 0}
.error-review{border-top:1px solid #e6e5de;margin-top:14px;padding-top:12px}
.error-review summary{font-size:13px;font-weight:700;color:#745b2b;cursor:pointer}
.error-review>div{margin-top:8px;font-size:12px;background:#fff;padding:9px;border:1px solid #eee;border-radius:7px}
.error-review span{display:block;color:#89909a}
.lesson-content .box h5{font-family:var(--font-reading)!important;font-size:calc(17px * var(--scale))!important;line-height:1.7;font-weight:800!important;color:#26324A!important;margin:0 0 6px!important}
.lesson-content .box{font-size:calc(16px * var(--scale));line-height:1.85}
@media(max-width:760px){
 .sections-tool{font-size:0;padding:7px 10px}.sections-tool:before{content:'الأقسام';font-size:12px}
 html[dir="rtl"] .sidebar{order:initial;right:0;left:auto}
 .reader-tabs .tabs-sections{font-size:11px;padding:6px 4px}
 .chapter-children{padding-right:20px}
 .mini-report-head,.end-of-lesson{flex-direction:column;align-items:stretch}
 .practice-toolbar>span{display:none}
 .practice-modes{width:100%;justify-content:center}
 .practice-modes button{flex:1;padding:9px 7px}
 .question-nav .q-jump{min-width:40px}
 .as-continuous .question-content{padding:16px 13px}
 .as-continuous .question-options{gap:8px}
 .as-continuous .answer-option{min-height:54px}
 .reader-header{align-items:center}
 .crumb-link{font-size:11px}
 .section-banner{padding-top:18px!important}
}
@media(max-width:760px){
  #menuButton{display:none!important}
  .topbar .brand{min-width:0}
  .topbar .brand-lines{white-space:nowrap}
  .sections-tool{white-space:nowrap}
}

/* V3.2 — practice-only, without changing the reader-first layout */
.exercise-only-toggle{border:1px solid #C8A248;background:#FFFDF7;color:#26324A;font-weight:800;white-space:nowrap;border-radius:9px}
.exercise-only-toggle:hover,.exercise-only-toggle.selected{background:#26324A;color:#fff;border-color:#26324A}
.exercise-only-head{padding:22px clamp(26px,4vw,56px) 18px;background:linear-gradient(120deg,#fff 60%,#FBF8EF);border-top:4px solid var(--accent);display:flex;justify-content:space-between;gap:18px;align-items:center}
.exercise-only-head h1{font-family:var(--font-heading);font-size:clamp(24px,2.8vw,31px);margin:3px 0 2px;line-height:1.5;color:var(--navy)}
.exercise-only-head p{font-family:var(--font-reading);font-size:13px;color:var(--muted);line-height:1.8;margin:0}
.exercise-only-head p strong{color:var(--navy)}
.exercise-only-head .switch-book-inside{flex-shrink:0;white-space:nowrap}
.practice-only-body{padding-top:25px}
.practice-only-body .practice-intro{background:#fff;padding:7px 0 14px;border:0;border-radius:0;box-shadow:none}
.practice-only-body .practice-intro h2{font-size:20px;line-height:1.5}
.practice-tab-current{font-size:13px;font-weight:800;color:var(--navy);padding:5px 8px}
@media(max-width:900px){.exercise-only-head{flex-direction:column;align-items:stretch}.exercise-only-head .switch-book-inside{align-self:flex-start}}
@media(max-width:760px){.topbar .exercise-only-toggle{padding:6px 8px;font-size:11px}.exercise-only-toggle span{display:inline}.exercise-only-head{padding:15px 18px}.exercise-only-head h1{font-size:23px}.exercise-only-head p{font-size:12px}.practice-only-body{padding-top:13px}.practice-only-body .practice-intro p{font-size:12px}}
/* V3.2 mobile refinements: one clear primary mode toggle; keep TOC accessible */
@media (max-width:760px){
  .topbar{display:flex;justify-content:space-between;align-items:center;gap:7px;min-height:58px;height:58px;padding:0 11px}
  .topbar .brand{flex:0 0 auto;min-width:0}
  .topbar .brand-lines,.topbar .top-separator,.topbar .product-label{display:none!important}
  .topbar .brand-star{width:33px;height:33px;flex:0 0 33px}
  .topbar .top-actions{display:flex;flex:1;align-items:center;justify-content:flex-end;gap:7px;min-width:0}
  #fontSmaller,#fontBigger,#focusButton{display:none!important}
  .topbar .exercise-only-toggle{min-width:121px;white-space:nowrap;text-align:center;font-size:12px;padding:7px 10px}
  .topbar .sections-tool{min-width:70px;white-space:nowrap;padding:7px 8px}
  .sidebar{top:58px;height:calc(100vh - 58px)}
  .mobile-backdrop:not([hidden]){inset:58px 0 0}
  .reader-tabs{top:58px}
  .exercise-only-head{padding:11px 17px 12px;gap:6px}
  .exercise-only-head h1{font-size:22px;margin:0}
  .exercise-only-head p{display:none}
  .exercise-only-head .switch-book-inside{font-size:12px;padding:6px 10px;align-self:auto}
  .exercise-only-head{flex-direction:row;align-items:center;flex-wrap:wrap;justify-content:space-between}
  .exercise-only-head .eyebrow{font-size:9px}
  .practice-only-body{padding-top:8px}
  .practice-only-body .practice-intro{padding:0 0 8px;margin-bottom:10px}
  .practice-only-body .practice-intro h2{font-size:18px}
  .practice-only-body .practice-intro p{font-size:11px;line-height:1.5}
  .practice-only-body .practice-label{font-size:10px}
  .practice-only-body .question-nav{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}
  .practice-only-body .question-nav .q-jump{min-width:0;width:100%;height:37px;min-height:37px;padding:0;font-size:12px}
  .practice-only-body .practice-modes button{padding:7px 4px;font-size:11px}
}

.home-link{text-decoration:none;white-space:nowrap}.reader-footer a{color:inherit}.sidebar-close{display:none}
@media(max-width:760px){.sidebar-close{display:block;margin:10px 14px 0 auto;min-height:44px;padding:8px 14px;border:1px solid #e8e7e0;border-radius:8px;background:#fff;color:#26324a;font:inherit}.topbar .home-link{font-size:11px;padding:7px}.topbar .product-label{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
