/* Yallah Deutsch v5 — clearer exam path, original brand, light/dark tokens. */
:root{--navy:#211e1b;--deep:#33231e;--teal:#ad2330;--aqua:#fae8e5;--lime:#f5c447;--paper:#f8f6f2;--white:#fffefa;--text:#292521;--muted:#69645e;--line:#e5ded5;--soft:#f6f0e9;--red:#b52835;--red-bg:#fff0ed;--radius:19px;--shadow:0 10px 28px rgba(48,35,27,.045);color-scheme:light}
html[data-theme=dark]{--navy:#f6f1e8;--deep:#f2dfc7;--teal:#ff737d;--aqua:#442930;--lime:#f4c458;--paper:#151719;--white:#202326;--text:#f4eee6;--muted:#bcb5ad;--line:#373b3c;--soft:#2a2c2d;--red:#ff737d;--red-bg:#392329;--shadow:0 14px 32px rgba(0,0,0,.15);color-scheme:dark}
body{background:var(--paper);color:var(--text);font-size:16px;line-height:1.55}
.topbar{background:var(--white);box-shadow:0 2px 15px rgba(33,30,27,.025)}
.topbar-inner{max-width:1510px;min-height:90px;gap:26px}
.brand{gap:12px;min-width:224px}.brand-logo{width:58px;height:58px;object-fit:contain;flex-shrink:0}.brand strong{font-size:1.2rem;letter-spacing:-.025em}.brand small{font-size:.72rem}
.topnav{gap:2px}.nav-link{padding:11px 12px;border-radius:12px;color:var(--text)}.nav-link.active{background:var(--aqua);color:var(--teal)}.nav-link.skill-nav{font-weight:800}.nav-link:hover{background:var(--soft);color:var(--teal)}
.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.level-switch{background:var(--soft);border-color:var(--line);margin-left:0}.level-switch button[aria-pressed=true]{background:#252321;color:#fff}.theme-toggle{height:42px;display:inline-flex;align-items:center;gap:7px;padding:0 13px;border-radius:12px;border:1px solid var(--line);background:var(--white);color:var(--text);white-space:nowrap;font-size:.83rem;font-weight:750}.theme-toggle:hover{border-color:var(--teal)}
.shell{max-width:1440px;padding-top:40px}.home-head,.page-heading{margin-bottom:28px}.home-head h1,.page-heading h1{font-size:clamp(2.1rem,3.5vw,3.5rem);font-weight:800;letter-spacing:-.055em}.home-head .subtle{max-width:730px;line-height:1.65}.eyebrow{font-size:.75rem;letter-spacing:.11em}.level-badge{background:var(--aqua);border-color:var(--line);color:var(--teal)}
.card,.stat-card,.skill-card,.subject-card,.question-card,.workshop-tile,.method-card{background:var(--white);border-color:var(--line);color:var(--text);box-shadow:var(--shadow)}
.button,.button-quiet{background:var(--white);color:var(--text);border-color:var(--line)}.button:hover,.button-quiet:hover{background:var(--soft);color:var(--text);border-color:var(--teal)}.button-primary{background:#b42330;border-color:#b42330;color:white}.button-primary:hover{background:#8e1b25;border-color:#8e1b25;color:#fff}.button-light{background:var(--lime);border-color:var(--lime);color:#24211c}.button-light:hover{background:#ffda68;color:#24211c}.text-button{color:var(--teal)}
.focus-card{position:relative;overflow:hidden;background:#242120;min-height:296px;border:1px solid #413934;padding:29px 32px}.focus-card>*:not(.hero-art){position:relative;z-index:1;max-width:56%}.focus-card .hero-art{position:absolute;right:-38px;bottom:-76px;width:min(54%,570px);height:360px;object-fit:contain;opacity:.93;pointer-events:none}.focus-card h2{font-size:clamp(1.6rem,2.4vw,2.3rem);color:#fff}.focus-card p{color:#eee3d2}.focus-top,.focus-meter{color:#f4dbaf}.focus-meter{max-width:100%!important}.focus-card .button-light{white-space:nowrap}
.stat-card strong,.section-heading h2,.skill-card strong,.fiche-heading h1,.question-inner h2{color:var(--navy)}.skill-card{min-height:196px;border-radius:18px;padding:20px}.skill-symbol,.tile-symbol{background:var(--aqua);color:var(--teal)}.skill-card:hover,.subject-card:hover{border-color:var(--teal);box-shadow:0 12px 24px rgba(95,32,27,.10)}.method-strip{background:var(--soft);border-color:var(--line)}.method-strip strong{color:var(--navy)}
.explore-header{background:var(--white);border:1px solid var(--line);border-radius:22px;padding:27px 30px;margin:0 0 24px;box-shadow:var(--shadow)}.explore-header h1{color:var(--navy);margin-top:3px}.explore-header p{max-width:760px}.explore-skill-switch{margin:12px 0 18px}.explore-skill-switch button{background:var(--soft);color:var(--text);border-color:var(--line);padding:9px 16px}.explore-skill-switch button.active{background:#272422;color:white;border-color:#272422}
.explorer-tabs{background:var(--white);border:1px solid var(--line);border-radius:15px;padding:4px;box-shadow:var(--shadow)}.explorer-tab{border-radius:11px;color:var(--muted)}.explorer-tab[aria-pressed=true]{background:var(--aqua);color:var(--teal)}.explorer-tab small{background:var(--soft);color:var(--text)}
.explorer-cards{gap:16px}.subject-card{border-radius:18px;min-height:175px;padding:21px;position:relative}.subject-card:before{content:"";position:absolute;left:21px;top:0;width:40px;height:3px;background:#e8b743;border-radius:0 0 4px 4px}.subject-top{color:var(--teal);font-size:.72rem}.subject-title{font-size:1.15rem;line-height:1.3;margin:18px 0 5px;color:var(--navy)}.subject-footer{border-color:var(--line)}.level-chip{background:var(--soft);color:var(--text);border-color:var(--line)}
.fiche-breadcrumb{font-size:.88rem;margin:4px 0 19px}.fiche-layout{grid-template-columns:minmax(0,1fr) 296px;gap:20px}.fiche-main{border-radius:22px}.fiche-heading{padding:30px 38px 18px}.fiche-heading h1{font-size:clamp(2rem,3vw,2.85rem)}.fiche-progress{background:var(--aqua);color:var(--teal)}.fiche-toolbar{padding:0 38px 20px}.fiche-audios{background:var(--soft);padding:22px 38px}.fiche-audios audio{max-width:100%}.fiche-stepper{display:flex;gap:0;border-bottom:1px solid var(--line);padding:0 38px;background:var(--soft)}.fiche-stepper span{display:flex;align-items:center;gap:10px;padding:15px 20px 15px 0;margin-right:24px;color:var(--muted);font-size:.82rem;font-weight:700}.fiche-stepper b{font-size:.78rem;color:var(--teal)}.fiche-stepper .current{color:var(--text)}
.fiche-content-heading{padding:29px 38px 0}.fiche-content-heading h2,.fiche-questions h2{margin:2px 0 3px;font-size:1.55rem;letter-spacing:-.035em;color:var(--navy)}.fiche-content-heading p,.fiche-questions-head p{color:var(--muted);margin:0;font-size:.9rem}
.fiche-body{padding:4px 38px 22px;line-height:1.76;white-space:normal;max-width:920px}.fiche-body p{margin:17px 0;white-space:pre-wrap}.fiche-body .support-paragraph{font-size:1.02rem}.fiche-body .arabic-block{border-left:0;border-right:3px solid #d7a329;background:var(--soft);color:var(--text);padding:14px 18px;line-height:1.75}.empty-support{padding:20px 22px;background:var(--soft);border-radius:13px;color:var(--text)}
.fiche-questions{border-top:1px solid var(--line);padding:27px 38px 30px;background:var(--soft)}.fiche-questions-head{display:flex;justify-content:space-between;gap:14px;align-items:start;margin-bottom:17px}.count-badge{font-size:.75rem;font-weight:800;color:var(--teal);border:1px solid var(--line);background:var(--white);padding:6px 10px;border-radius:30px;white-space:nowrap}.fiche-question-list{display:grid;gap:10px}.preview-question{display:grid;grid-template-columns:35px minmax(0,1fr);gap:5px 12px;padding:16px 18px;background:var(--white);border:1px solid var(--line);border-radius:14px}.preview-number{color:var(--teal);font-weight:800}.preview-question strong{font-size:.94rem;color:var(--navy)}.preview-context,.preview-options{grid-column:2;color:var(--muted);margin:3px 0 0;font-size:.87rem}.preview-options{display:flex;flex-direction:column;gap:3px}.fiche-original{border-top:1px solid var(--line);padding:0 38px}.fiche-original summary{padding:17px 0;color:var(--teal);font-size:.85rem;font-weight:750;cursor:pointer}.fiche-raw{max-height:460px;overflow:auto;padding:18px;background:var(--soft);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:12px;font-size:.85rem;line-height:1.6;margin-bottom:19px}.fiche-actions{padding:20px 38px 32px}
.guide-card,.sibling-card{padding:22px;border-radius:18px}.guide-card>span{font-size:.7rem}.guide-card strong{line-height:1.35;font-size:1.05rem;margin:13px 0;color:var(--navy)}.guide-card p{font-size:.84rem;line-height:1.55}.guide-button{width:100%;margin:18px 0 0;color:var(--teal)}.guide-disclosure{font-size:.72rem!important;margin-top:12px!important}.darija-result:not(:empty){margin-top:15px;border-top:1px solid var(--line);padding-top:13px;white-space:pre-wrap;line-height:1.75;direction:auto;font-size:.86rem}.sibling-link{color:var(--teal)}
.reader,.library-controls,.practice-setup,.backup-card{background:var(--white);color:var(--text)}.reader-text,.question-passage,.workshop-feedback{line-height:1.75}.option,.rating-choice,.audio-tool{background:var(--white);color:var(--text);border-color:var(--line)}.option:hover,.rating-choice:hover,.audio-tool:hover{background:var(--soft)}.option.correct{background:#e9f5e9;color:#194c2c}.option.wrong{background:var(--red-bg);color:var(--red)}.feedback{background:var(--soft);color:var(--text)}.feedback.error{background:var(--red-bg)}.grammar-results:not(:empty){background:var(--soft);border-color:var(--line)}
select,input[type=search],input[type=text],textarea{background:var(--white);border-color:var(--line);color:var(--text)}.method-card,.workshop-tile{border-color:var(--line)}.mobile-nav{background:var(--white);border-color:var(--line)}.mobile-nav button{color:var(--text)}
html[data-theme=dark] .topbar,html[data-theme=dark] .level-switch button[aria-pressed=true],html[data-theme=dark] .explore-skill-switch button.active{background:#262a2c;color:#fff}
html[data-theme=dark] .nav-link,html[data-theme=dark] .reader-tabs button,html[data-theme=dark] .explorer-tab{color:var(--text)}
html[data-theme=dark] .explorer-tab[aria-pressed=true],html[data-theme=dark] .nav-link.active{color:var(--teal)}
html[data-theme=dark] .question-card,html[data-theme=dark] .subject-card,html[data-theme=dark] .skill-card,html[data-theme=dark] .stat-card,html[data-theme=dark] .workshop-tile,html[data-theme=dark] .method-card{background:var(--white)}
html[data-theme=dark] .variant-box,html[data-theme=dark] .variant-row,html[data-theme=dark] .library-list,html[data-theme=dark] .reader-empty,html[data-theme=dark] .toast{background:var(--white);color:var(--text)}
html[data-theme=dark] .arabic-block{color:var(--text)}
@media(max-width:1150px){.theme-toggle span{display:none}.brand{min-width:auto}.topbar-inner{gap:12px}}
@media(max-width:850px){.topbar-inner{min-height:72px}.brand-logo{width:46px;height:46px}.header-actions{gap:6px}.theme-toggle{width:42px;justify-content:center;padding:0}.fiche-layout{grid-template-columns:1fr}.fiche-side{position:static}}
@media(max-width:650px){.shell{padding:22px 14px 95px}.brand-logo{width:41px;height:41px}.brand strong{font-size:.92rem}.brand small{font-size:.61rem}.home-head h1,.page-heading h1{font-size:2.15rem}.focus-card{min-height:312px;padding:24px}.focus-card>*:not(.hero-art){max-width:70%}.focus-card .hero-art{width:62%;right:-73px;bottom:-55px;opacity:.75}.focus-card h2{font-size:1.45rem}.focus-meter{max-width:100%!important}.focus-card .button-light{white-space:normal}.skill-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.skill-card{min-height:166px;padding:16px}.explore-header{padding:20px 17px}.fiche-heading,.fiche-content-heading{padding:23px 20px 10px}.fiche-toolbar{padding:0 20px 16px}.fiche-stepper{padding:0 20px}.fiche-stepper span{margin-right:12px;padding-right:5px;font-size:.73rem}.fiche-body{padding:5px 20px 18px}.fiche-questions{padding:23px 20px}.fiche-original{padding:0 20px}.fiche-actions{padding:17px 20px 25px}.subject-card{min-height:160px;padding:16px}.subject-title{font-size:1rem}.hero-art{filter:saturate(.9)}}
@media(max-width:390px){.brand small{display:none}.level-switch button{padding:7px 9px}.focus-card>*:not(.hero-art){max-width:78%}}
@media(prefers-reduced-motion:reduce){.screen,.skill-card,.subject-card{animation:none!important;transition:none!important}}
