@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');
:root{--navy:#12233f;--blue:#2457d6;--cyan:#eaf1ff;--ink:#17243a;--muted:#64748b;--line:#e2e8f0;--bg:#f5f7fb;--green:#16794b;--red:#b42318}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Cairo',Tahoma,Arial,sans-serif;line-height:1.8}.top{height:72px;padding:0 max(20px,calc((100% - 1100px)/2));display:flex;align-items:center;justify-content:space-between;background:white;border-bottom:1px solid var(--line)}.brand{font-weight:800;color:var(--navy);font-size:19px;display:flex;gap:10px;align-items:center}.brand:first-letter{color:var(--blue)}.tag{font-size:12px;color:var(--muted);background:#f1f5f9;padding:5px 12px;border-radius:20px}.container{max-width:1100px;margin:auto;padding:26px 20px 56px}.hero{background:linear-gradient(125deg,#12233f,#2457d6);border-radius:24px;color:white;padding:34px;position:relative;overflow:hidden}.hero h1{font-size:clamp(25px,4vw,38px);line-height:1.45;margin:5px 0 10px}.hero p{max-width:650px;margin:0;color:#e2eaff}.hero .eyebrow{color:#c6d7ff}.hero-mark{position:absolute;left:30px;top:0;font-size:170px;font-weight:800;opacity:.09;line-height:1.2}.eyebrow{font-size:12px;letter-spacing:.4px;font-weight:800;color:var(--blue);margin:0 0 4px}.hero-stats{display:flex;gap:10px;flex-wrap:wrap;margin-top:23px}.hero-stats span{font-size:12px;padding:5px 12px;border:1px solid #ffffff4d;border-radius:20px;background:#ffffff12}.section-heading,.quiz-head{display:flex;justify-content:space-between;align-items:end;margin:30px 0 16px;gap:12px}.section-heading h2,.quiz-head h2{margin:0;font-size:24px}.muted{color:var(--muted);font-size:13px}.topic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.topic-card{border:1px solid var(--line);background:white;border-radius:16px;padding:19px;text-align:right;cursor:pointer;transition:.18s;min-height:132px;display:flex;flex-direction:column;justify-content:space-between;color:var(--ink);font:inherit}.topic-card:hover{border-color:#9bb7ff;transform:translateY(-2px);box-shadow:0 8px 24px #1c39710c}.topic-number{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--cyan);color:var(--blue);font-weight:800;font-size:14px}.topic-title{font-weight:700;margin:10px 0 2px}.topic-meta{font-size:12px;color:var(--muted)}.notice{font-size:12px;color:#795a12;background:#fff8e6;border:1px solid #f4e3b2;padding:12px 15px;border-radius:12px;margin-top:22px}.hidden{display:none!important}.back{border:0;background:transparent;color:var(--blue);font:inherit;font-weight:700;cursor:pointer;padding:6px 0}.progress{white-space:nowrap;color:var(--muted);font-size:13px}.progress-track{height:7px;border-radius:10px;background:#e1e8f4;overflow:hidden;margin-bottom:18px}.progress-track div{height:100%;width:0;background:var(--blue);transition:width .2s}.question-card,.result-card{background:white;border:1px solid var(--line);border-radius:20px;padding:clamp(20px,4vw,34px);box-shadow:0 8px 28px #12233f08}.question-label{font-size:13px;color:var(--blue);font-weight:800}.question-text{font-size:21px;font-weight:700;margin:12px 0 24px;line-height:2}.options{display:grid;gap:10px}.option{width:100%;display:flex;align-items:center;gap:12px;text-align:right;border:1px solid var(--line);border-radius:12px;background:white;padding:12px 14px;cursor:pointer;font:inherit;color:var(--ink);transition:.15s}.option:hover:not(:disabled){border-color:#9bb7ff;background:#f8faff}.option:disabled{cursor:default}.letter{width:30px;height:30px;display:grid;place-items:center;flex-shrink:0;border-radius:9px;background:#f1f5f9;color:#53657d;font-weight:800}.option.correct{border-color:#8bd5ad;background:#effbf4}.option.correct .letter{background:#c9f1d9;color:var(--green)}.option.wrong{border-color:#f2aaa5;background:#fff3f2}.option.wrong .letter{background:#ffe0de;color:var(--red)}.feedback{margin-top:18px;border-radius:12px;padding:16px}.feedback.good{background:#effbf4;border:1px solid #b9e8cc}.feedback.bad{background:#fff4f2;border:1px solid #f3c2bd}.feedback strong{display:block;margin-bottom:5px}.feedback .solution{margin-top:10px;padding-top:10px;border-top:1px solid #00000012}.actions{display:flex;justify-content:flex-start;gap:10px;margin-top:22px;flex-wrap:wrap}.primary,.secondary{border:0;border-radius:11px;padding:11px 20px;font:inherit;font-weight:700;cursor:pointer}.primary{background:var(--blue);color:white}.primary:hover:not(:disabled){background:#1947bd}.primary:disabled{opacity:.45;cursor:not-allowed}.secondary{background:#eef2f8;color:var(--ink)}.result-card{text-align:center;max-width:650px;margin:35px auto}.result-icon{width:62px;height:62px;border-radius:20px;background:#e5f8ed;color:var(--green);font-size:32px;font-weight:800;display:grid;place-items:center;margin:0 auto 16px}.result-card h2{margin:4px 0}.score{font-size:42px;font-weight:800;color:var(--blue);margin:14px 0 0}.center{justify-content:center}footer{text-align:center;padding:22px;color:var(--muted);font-size:12px;border-top:1px solid var(--line);background:white}
@media(max-width:760px){.topic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{padding:26px 22px}.hero-mark{left:10px;font-size:120px}.top{height:62px}.brand{font-size:16px}.tag{font-size:10px}.container{padding:18px 14px 40px}.section-heading h2,.quiz-head h2{font-size:21px}.question-text{font-size:18px}}
@media(max-width:420px){.topic-grid{grid-template-columns:1fr}.topic-card{min-height:105px}.hero-stats{gap:6px}.hero-stats span{font-size:11px}}

/* أدوات اختيار مستوى التدريب */
.filter-panel{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 18px;padding:14px 16px;background:var(--card, #fff);border:1px solid var(--line, #e5e7eb);border-radius:14px}
.filter-panel label{font-weight:700}
.filter-panel select{font:inherit;padding:9px 12px;border:1px solid var(--line, #d1d5db);border-radius:9px;background:var(--bg, #fff);color:inherit;min-width:150px}
.filter-hint{color:var(--muted, #64748b);font-size:.9rem}
.topic-card:disabled{opacity:.48;cursor:not-allowed;filter:grayscale(.3)}


/* واجهة محسّنة: هوية بصرية أوضح وبطاقات تقدم متجاوبة */
:root{--navy:#132849;--blue:#315edb;--cyan:#edf2ff;--ink:#19263b;--muted:#718096;--line:#e5eaf2;--bg:#f6f8fc;--card:#fff;--green:#168252;--red:#b42318;--shadow:0 12px 34px rgba(25,48,86,.055)}
html{scroll-behavior:smooth;scroll-padding-top:24px}
body{background:radial-gradient(ellipse at 85% 0%,rgba(219,230,255,.34),transparent 35%),var(--bg);min-height:100vh}
.top{height:76px;max-width:none;padding:0 max(20px,calc((100% - 1120px)/2));position:sticky;top:0;z-index:20;background:rgba(255,255,255,.92);backdrop-filter:blur(14px);box-shadow:0 1px 0 rgba(226,232,240,.75)}
.brand{text-decoration:none;gap:11px}.brand-symbol{display:grid;place-items:center;width:39px;height:39px;border-radius:13px;background:linear-gradient(145deg,#315edb,#2144a9);color:#fff;font-size:25px;box-shadow:0 5px 12px #315edb30}.top-actions{display:flex;align-items:center;gap:15px}.privacy-note{display:flex;align-items:center;gap:7px;color:#64748b;font-size:11px}.privacy-dot{width:7px;height:7px;background:#20a36a;border-radius:50%;box-shadow:0 0 0 3px #e5f8ee}
.container{max-width:1120px;padding-top:30px}
.hero{border-radius:26px;padding:clamp(27px,5vw,48px);background:linear-gradient(115deg,#132849 0%,#1c3c7b 54%,#315edb 100%);box-shadow:0 20px 50px rgba(28,60,123,.17);isolation:isolate}
.hero:before{content:"";position:absolute;width:340px;height:340px;border:1px solid #ffffff12;border-radius:50%;left:-90px;top:-180px;box-shadow:0 0 0 35px #ffffff08,0 0 0 70px #ffffff05;z-index:-1}
.hero-mark{left:35px;top:10px;font-size:190px;transform:rotate(-9deg);opacity:.075}
.hero h1{max-width:720px;letter-spacing:-.7px;margin:8px 0 12px}
.hero>p:not(.eyebrow){color:#e2eaff;font-size:15px;max-width:620px}
.hero .eyebrow{font-size:13px;color:#c4d5ff}
.hero-stats{gap:8px;margin-top:25px}.hero-stats span{padding:6px 12px;border-color:#ffffff35;background:#ffffff10;color:#f5f8ff}
.hero-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:27px;padding-top:19px;border-top:1px solid #ffffff25}
.hero-note{display:flex;align-items:center;gap:9px;color:#e7edff;font-size:12px}.hero-note-icon{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#ffffff20;font-size:13px}
.hero-link{display:inline-flex;align-items:center;gap:13px;color:white;text-decoration:none;font-weight:700;font-size:13px}.hero-link span{font-size:19px;transition:transform .2s}.hero-link:hover span{transform:translateY(3px)}
.dashboard{margin-top:25px;padding:23px;background:#fff;border:1px solid var(--line);border-radius:21px;box-shadow:var(--shadow)}
.dashboard-intro{margin-bottom:17px}.dashboard-kicker{font-size:11px;color:var(--blue);font-weight:800}.dashboard-intro h2{font-size:20px;margin:2px 0 3px}.dashboard-intro p{font-size:12px;color:var(--muted);margin:0}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.stat-card{display:grid;grid-template-columns:36px 1fr;column-gap:10px;align-items:center;padding:14px;border:1px solid #edf0f6;border-radius:14px;background:linear-gradient(145deg,#fff,#fbfcff)}
.stat-icon{grid-row:span 2;width:35px;height:35px;display:grid;place-items:center;border-radius:11px;font-size:17px;font-weight:800}
.stat-icon.blue{background:#edf2ff;color:#315edb}.stat-icon.green{background:#e9f8f0;color:#168252}.stat-icon.amber{background:#fff5df;color:#a76b0a}.stat-icon.purple{background:#f2edff;color:#7650c8}
.stat-label{font-size:11px;color:var(--muted);white-space:nowrap}.stat-card strong{font-size:23px;line-height:1.4;color:var(--ink);font-variant-numeric:tabular-nums}
.dashboard-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:16px}
.dashboard-actions .secondary{display:inline-flex;align-items:center;gap:14px;background:#eef3ff;color:#254dbd;font-size:12px;padding:9px 13px}.dashboard-actions .secondary span{font-size:17px}.dashboard-actions .secondary:hover:not(:disabled){background:#e2eaff}.dashboard-actions .secondary:disabled{opacity:.45;cursor:not-allowed}
.text-button{background:transparent;border:0;padding:8px 0;color:#7a879a;font:inherit;font-size:11px;cursor:pointer}.text-button:hover{color:var(--red)}
.section-heading{align-items:center;margin:34px 0 16px}.section-heading h2,.quiz-head h2{font-size:25px;letter-spacing:-.3px}.section-subtitle{font-size:12px;color:var(--muted);margin:3px 0 0}.count-pill{background:#edf2ff;color:#3154b5;border-radius:20px;padding:6px 12px;font-size:11px;white-space:nowrap;font-weight:700}
.topic-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}.search-box{display:flex;align-items:center;gap:8px;min-width:220px;max-width:360px;flex:1;border:1px solid var(--line);background:#fff;border-radius:12px;padding:0 12px;color:#8995a8}.search-box>span{font-size:24px;line-height:1}.search-box input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--ink);font:inherit;font-size:12px;padding:11px 0}.search-box:focus-within{border-color:#9eb5fa;box-shadow:0 0 0 3px #315edb12}
.filter-panel{margin:0;padding:5px 10px;gap:9px;border-radius:12px;background:#fff}.filter-panel label{font-size:11px}.filter-panel select{font-size:11px;min-width:125px;padding:7px 9px}.filter-hint{font-size:10px}
.topic-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.topic-card{min-height:158px;padding:16px 17px 14px;border-radius:16px;box-shadow:0 3px 12px #1c397106;position:relative;overflow:hidden;transition:transform .2s,border-color .2s,box-shadow .2s}
.topic-card:before{content:"";position:absolute;right:0;top:18px;bottom:18px;width:3px;border-radius:0 3px 3px 0;background:#dce5ff;transition:background .2s}
.topic-card:hover:not(:disabled){transform:translateY(-3px);border-color:#b5c7ff;box-shadow:0 13px 28px #1c397110}
.topic-card:hover:not(:disabled):before{background:var(--blue)}
.topic-card:disabled{background:#fbfcfe;box-shadow:none}
.topic-card-top{display:flex;justify-content:space-between;align-items:center}.topic-number{width:35px;height:35px;border-radius:11px;background:#edf2ff;color:#315edb}.topic-arrow{color:#a1aec1;font-size:18px;transition:transform .2s}.topic-card:hover .topic-arrow{transform:translate(-2px,2px);color:var(--blue)}
.topic-card-content{display:flex;flex-direction:column;gap:3px;margin:11px 0 13px}.topic-title{font-size:14px;line-height:1.7;margin:0}.topic-meta{font-size:11px}.topic-card-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-top:10px;border-top:1px solid #f0f2f7}.topic-status{font-size:10px;color:#718096}.topic-start{font-size:10px;font-weight:800;color:#315edb;white-space:nowrap}
.empty-state{margin:12px 0;padding:25px;border:1px dashed #d4dce9;border-radius:15px;text-align:center;color:var(--muted);font-size:13px}
.notice{margin-top:23px;border-radius:13px;line-height:1.9}
.question-card{box-shadow:var(--shadow)}.option{line-height:1.9}.option:focus-visible,.topic-card:focus-visible,button:focus-visible{outline:3px solid #9eb5fa;outline-offset:3px}
.result-card{box-shadow:var(--shadow)}
footer{margin-top:18px;background:#fff;padding:24px 15px 20px}.footer-brand{font-weight:800;color:var(--navy);font-size:13px}.footer-brand span{color:var(--blue);font-size:20px;vertical-align:middle;margin-left:5px}footer p{margin:5px 0}.footer-privacy{font-size:10px;color:#8b97a9}
@media(max-width:850px){.topic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-hint{display:none}.topic-tools{align-items:stretch}.filter-panel{flex-wrap:nowrap}.filter-panel label{white-space:nowrap}}
@media(max-width:600px){.top{height:64px;padding:0 14px}.brand{font-size:14px}.brand-symbol{width:33px;height:33px;font-size:22px}.top-actions{gap:0}.tag{font-size:9px;padding:5px 9px}.privacy-note{display:none}.container{padding:17px 12px 35px}.hero{border-radius:20px;padding:25px 20px}.hero h1{font-size:27px}.hero>p:not(.eyebrow){font-size:13px}.hero-mark{font-size:120px;left:8px}.hero-bottom{margin-top:20px}.hero-note{font-size:10px}.dashboard{padding:16px;border-radius:17px}.dashboard-intro h2{font-size:18px}.stat-grid{gap:8px}.stat-card{padding:10px;grid-template-columns:30px 1fr;column-gap:8px}.stat-icon{width:29px;height:29px;border-radius:9px;font-size:14px}.stat-label{font-size:10px}.stat-card strong{font-size:20px}.dashboard-actions{gap:12px}.section-heading{align-items:flex-end}.section-heading h2{font-size:22px}.section-subtitle{max-width:260px;font-size:11px}.topic-tools{flex-direction:column}.search-box{max-width:none;min-width:0;flex:auto}.filter-panel{justify-content:space-between}.filter-panel select{min-width:135px}.topic-grid{gap:9px}.topic-card{min-height:153px;padding:13px 13px 11px}.topic-title{font-size:12px}.topic-meta,.topic-start,.topic-status{font-size:9px}.topic-card-bottom{align-items:flex-start;flex-direction:column;gap:3px}.count-pill{font-size:10px;padding:5px 9px}.question-text{font-size:18px}}
@media(max-width:370px){.topic-grid{grid-template-columns:1fr}.topic-card{min-height:128px}.topic-card-bottom{flex-direction:row;align-items:center}.stat-card{padding:8px}.stat-label{font-size:9px}.filter-panel label{font-size:10px}.filter-panel select{min-width:115px}}
