/* ═══════════ مسارات التعلم ═══════════ */
.path-card{cursor:pointer}
.path-head{display:flex;align-items:center;justify-content:space-between;padding:.9rem 1rem .2rem}
.path-icon{font-size:1.9rem;line-height:1}
.path-meta{display:flex;justify-content:space-between;font-size:.8rem;color:var(--muted);margin:.4rem 0 .3rem}
.bar{height:8px;border-radius:999px;background:var(--panel2);overflow:hidden;border:1px solid var(--line)}
.bar i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),#ff7a5c);border-radius:999px;transition:width .5s}
.bar.big{height:12px;margin:.6rem 0}
.lesson{flex-direction:row;align-items:stretch;cursor:pointer}
.lesson .thumb{width:170px;flex:none}
.lesson-num{
  flex:none;width:44px;display:grid;place-items:center;font-weight:900;font-size:1.05rem;
  background:var(--panel2);color:var(--muted);border-left:1px solid var(--line);
}
.lesson-num.done{background:rgba(61,220,132,.14);color:var(--ok)}
.q-pass{color:var(--ok);font-weight:800}
@media(max-width:700px){
  .lesson{flex-direction:column}
  .lesson .thumb{width:100%}
  .lesson-num{width:100%;height:36px;border-left:0;border-bottom:1px solid var(--line)}
}

/* ═══════════ المكتبة ═══════════ */
.lib-card .lib-head{display:flex;align-items:center;justify-content:space-between;padding:.9rem 1rem .2rem;gap:.5rem;flex-wrap:wrap}
.lib-card .lib-head .tag-ok{font-size:.72rem}

/* ═══════════ الإنجازات ═══════════ */
.ach-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.9rem}
.ach{
  background:var(--panel);border:1px solid var(--line);border-radius:14px;
  padding:1.1rem .8rem;text-align:center;transition:.2s;position:relative;
}
.ach.unlocked{border-color:rgba(255,206,77,.45);box-shadow:0 4px 18px rgba(255,206,77,.10)}
.ach.locked{opacity:.55;filter:grayscale(.9)}
.ach:hover{transform:translateY(-3px)}
.ach-icon{font-size:2.2rem;margin-bottom:.35rem}
.ach-title{font-weight:800;font-size:.95rem}
.ach-desc{font-size:.78rem;color:var(--muted);margin:.25rem 0 .4rem;line-height:1.5}
.ach-date{font-size:.72rem;color:var(--gold);font-weight:700}
.ach.locked .ach-date{color:var(--muted)}

/* ═══════════ الملخص ═══════════ */
.sum-box{
  background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);
  margin-top:.9rem;overflow:hidden;
}
.sum-box summary{
  cursor:pointer;padding:.85rem 1.1rem;font-weight:800;font-size:.95rem;
  display:flex;justify-content:space-between;gap:.6rem;flex-wrap:wrap;list-style:none;
}
.sum-box summary::-webkit-details-marker{display:none}
.sum-box summary::before{content:"▾";color:var(--accent);margin-left:.3rem}
.sum-box[open] summary::before{content:"▴"}
.sum-src{font-size:.75rem;color:var(--muted);font-weight:600}
.sum-text{padding:0 1.1rem .6rem;font-size:.93rem;line-height:1.9}
.sum-points{padding:0 1.1rem .6rem 2rem;color:var(--muted);font-size:.9rem;line-height:2}
.sum-points li::marker{color:var(--accent)}
.sum-note{padding:.55rem 1.1rem;border-top:1px dashed var(--line);font-size:.76rem;color:var(--muted)}

/* ═══════════ دعوة الاختبار ═══════════ */
.quiz-cta{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  background:linear-gradient(135deg,rgba(229,9,20,.10),rgba(255,206,77,.08));
  border:1px solid rgba(229,9,20,.3);border-radius:var(--radius);
  padding:1rem 1.2rem;margin-top:.9rem;
}
.quiz-cta b{font-size:1rem}
.quiz-cta p{font-size:.83rem;color:var(--muted);margin-top:.15rem}

/* ═══════════ نافذة الاختبار ═══════════ */
.quiz-ov{
  position:fixed;inset:0;background:rgba(3,4,10,.72);z-index:600;
  display:grid;place-items:center;padding:1rem;backdrop-filter:blur(4px);
}
.quiz-box{
  background:var(--panel);border:1px solid var(--line);border-radius:16px;
  width:min(620px,100%);max-height:88vh;overflow:auto;padding:1.3rem 1.4rem;box-shadow:var(--shadow);
}
.quiz-head{display:flex;align-items:center;justify-content:space-between}
.quiz-head h3{font-size:1.1rem;font-weight:900}
.quiz-sub{font-size:.83rem;color:var(--muted);margin:.2rem 0 1rem}
.q-set{border:1px solid var(--line);border-radius:12px;padding:.8rem .9rem .5rem;margin-bottom:.9rem;background:var(--bg2)}
.q-set legend{font-weight:800;font-size:.93rem;padding:0 .4rem}
.q-opt{
  display:flex;align-items:flex-start;gap:.55rem;padding:.45rem .5rem;border-radius:9px;
  cursor:pointer;font-size:.9rem;transition:.15s;margin:.15rem 0;
}
.q-opt:hover{background:var(--panel2)}
.q-opt input{margin-top:.28rem;accent-color:var(--accent);width:17px;height:17px;flex:none}
.q-score{text-align:center;padding:1.1rem .8rem;border-radius:12px;margin-bottom:.9rem}
.q-score.pass{background:rgba(61,220,132,.10);border:1px solid rgba(61,220,132,.4)}
.q-score.fail{background:rgba(255,107,120,.08);border:1px solid rgba(255,107,120,.35)}
.q-num{font-size:2.4rem;font-weight:900;line-height:1.2}
.q-count{font-size:.85rem;color:var(--muted)}
.q-expl{border-radius:10px;padding:.7rem .9rem;margin-bottom:.6rem;font-size:.87rem;border:1px solid var(--line);background:var(--bg2)}
.q-expl.ok{border-right:4px solid var(--ok)}
.q-expl.bad{border-right:4px solid #ff6b78}
.q-expl p{color:var(--muted);margin-top:.25rem;line-height:1.7}
.q-right{color:var(--ok)!important;font-weight:700}

/* ═══════════ عدّاد التذييل ═══════════ */
.foot-stat{margin-top:.4rem;font-weight:700;color:var(--gold)}
