/* إطار منصّة «تعليم»: الترويسة والتذييل وصفحة الانتظار والدروس الخارجيّة. الألوان والخطوط هي ألوان الموقع وخطوطه كما في المنشئ. */
@font-face{font-family:'Sakkal Majalla Regular';src:url('/media/Sakkal-Majalla-Regular.woff2') format('woff2');font-display:swap}
html,body{margin:0;background:var(--bg3)}
/* سطوح المتصفّح من الهويّة: التحديد، والمؤشّر، ومربّعات الاختيار (Impeccable craft-floor: Browser surfaces) */
::selection{background:rgba(227,196,110,.35);color:var(--ink)}
html{accent-color:var(--pri);caret-color:var(--acc)}
:where(button,a,input,select,textarea,summary){touch-action:manipulation}
body{font-family:var(--font-body);color:var(--ink);-webkit-text-size-adjust:100%}
main{display:block;min-height:50vh}
/* التذييل في أسفل الشاشة دائمًا، والصفحة القصيرة تمتدّ خلفيّتها إليه */
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
body>main{flex:1 0 auto}
main:has(>.pg,>#lnd,>#res,>#stu,>#tp,>#rpage,>#sub,>.ck){display:flex;flex-direction:column}
main>:is(#lnd,#res,#stu,#tp,#rpage,#sub,.ck){flex:1 0 auto}
/* الصفحات التي تُحمَّل بياناتها بعد ظهورها: يُحجز لها ارتفاع الشاشة فلا يقفز التذييل حين تصل البيانات (الاستقرار البصريّ) */
main:has(>#stu,>#tp,>#res){min-height:calc(100svh - 76px)}
@media (min-width:901px){main:has(>#stu,>#tp,>#res){min-height:calc(100svh - 76px - 77px)}}
main>.pg{flex:1 0 auto;display:flex;flex-direction:column}
main>.pg>section:last-of-type{flex:1 0 auto}

/* الترويسة */
.sh{background:var(--hdr-bg);color:var(--hdr-ink);position:sticky;top:0;z-index:50}
.sh-in{max-width:1224px;margin:0 auto;padding:0 24px;min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:24px;box-sizing:border-box}
.sh-logo{display:block;line-height:0}
.sh-logo img{height:60px;width:auto}
.sh-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 30px;align-items:center}
.sh-list a,.sh-burger a{font-family:var(--font-body);font-size:var(--fs-md);color:var(--hdr-ink);text-decoration:none;display:inline-flex;align-items:center;min-height:44px}
.sh-list a:hover,.sh-burger a:hover{color:var(--hdr-on)}
.sh-list a.on,.sh-burger a.on{color:var(--hdr-on)}
.sh-out{font:inherit;font-family:var(--font-body);font-size:var(--fs-sm);color:var(--hdr-ink);background:transparent;border:1px solid rgba(0,0,0,.25);border-radius:var(--r-pill);min-height:var(--hit);padding:0 var(--sp-4);cursor:pointer}
.sh-out:hover{border-color:var(--hdr-on);color:var(--hdr-on)}
.sh-burger .sh-out{margin:6px 0}
.sh-burger{display:none;position:relative}
.sh-burger summary{list-style:none;cursor:pointer;width:44px;height:44px;display:flex;flex-direction:column;justify-content:center;gap:6px;align-items:center}
.sh-burger summary::-webkit-details-marker{display:none}
.sh-burger summary span{display:block;width:26px;height:2px;background:var(--hdr-ink);border-radius:2px}
.sh-burger ul{list-style:none;margin:0;padding:10px 18px;position:absolute;left:0;top:50px;background:var(--hdr-bg);border-radius:var(--r-sm);box-shadow:0 8px 24px rgba(0,0,0,.18);min-width:200px}
.sh-burger li{border-bottom:1px solid rgba(0,0,0,.08)}
.sh-burger li:last-child{border-bottom:0}
@media (max-width:900px){
  .sh-in{min-height:76px;padding:0 16px}
  .sh-logo img{height:58px}
  .sh-list{display:none}
  .sh-burger{display:block}
}

/* التذييل */
.sf{background:var(--bg3);color:var(--soft);border-top:1px solid var(--surface)}
.sf-in{max-width:1224px;margin:0 auto;padding:26px 16px 30px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.sf-logo{height:72px;width:auto}
.sf-social{display:flex;gap:16px}
.sf-social a{color:var(--soft);display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px}
.sf-links{margin:0;font-size:var(--fs-sm);line-height:2;color:var(--faint)}
.sf-links a{color:var(--soft);text-decoration:none}
.sf-links a:hover{text-decoration:underline}
.sf-contact{display:inline-flex;align-items:center;min-height:44px;padding:0 22px;border-radius:var(--r-pill);background:var(--pri);color:var(--ink);text-decoration:none;font-size:var(--fs-sm)}

/* صفحة الانتظار وصفحة «غير موجودة» */
.ck{min-height:50vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 16px;text-align:center;color:var(--muted);font-size:var(--fs-base);line-height:1.9;background:var(--bg-grad)}
.ck h1{font-family:var(--font-display);color:var(--ink);margin:0 0 8px}
.ck a{color:var(--link)}

/* الدروس المعروضة من خدمة خارجيّة */
.lsn{background:var(--bg-grad);padding:10px;box-sizing:border-box;font-family:var(--font-body)}
.lsn-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;row-gap:8px;padding:2px 6px 12px}
.lsn-id{display:flex;align-items:center;gap:10px}
.lsn-id img{height:34px;width:auto;background:var(--white);border-radius:6px;padding:3px}
.lsn-t{color:var(--ink);font-size:var(--fs-base);font-weight:700;line-height:1.5}
.lsn-s{font-weight:400;font-size:var(--fs-sm);color:var(--muted)}
.lsn-acts{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.lsn-open,.lsn-back,.lsn-full{text-decoration:none;font-size:var(--fs-sm);border-radius:var(--r-pill);padding:0 16px;min-height:44px;display:inline-flex;align-items:center;white-space:nowrap}
.lsn-open{color:var(--ink);background:var(--pri)}
.lsn-back{color:var(--soft);background:var(--surface2)}
.lsn-full{color:var(--bg2);background:var(--white);border:0;font:inherit;font-size:var(--fs-sm);cursor:pointer}
.lsn-frame{position:relative;width:100%;height:clamp(440px,66vw,820px);min-height:430px;border-radius:var(--r-sm);overflow:hidden;background:var(--black)}
.lsn-frame iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}
.lsn-card{background:linear-gradient(160deg,#17315f,#0b1630);border:1px solid var(--surface2);border-radius:var(--r-card);padding:22px 16px 18px;text-align:center;color:var(--ink)}
.lsn-card-t{font-size:var(--fs-sm);line-height:1.9;color:var(--soft);margin:8px 0 16px}
.lsn-start{display:block;background:var(--pri);color:var(--ink);font-size:var(--fs-base);font-weight:700;padding:14px 10px;border-radius:var(--r-pill);text-decoration:none}
.lsn-card-n{font-size:var(--fs-sm);color:var(--muted);margin-top:14px;line-height:1.8}
.lsn-note{margin:9px 6px 0;font-size:var(--fs-sm);color:var(--muted);text-align:center}
.lsn-note a{color:var(--link)}
[hidden]{display:none!important}

/* صفحات الدروس الخارجيّة: الدرس يملأ الشاشة، والترويسة مصغّرة تبقى للتنقّل إلى الأقسام الأخرى */
body.is-lesson .sh-in{min-height:56px;padding:0 16px;gap:16px}
body.is-lesson .sh-logo img{height:40px}
body.is-lesson .sh-list{gap:4px 22px}
body.is-lesson .sh-list a{font-size:var(--fs-base);min-height:40px}
body.is-lesson .lsn{padding:6px 8px 10px}
body.is-lesson .lsn-top{padding:0 2px 6px;row-gap:6px}
body.is-lesson .lsn-id img{display:none}
body.is-lesson .lsn-open,body.is-lesson .lsn-back,body.is-lesson .lsn-full{min-height:38px}
body.is-lesson .lsn-frame{height:calc(100vh - 150px);height:calc(100dvh - 150px);min-height:420px;border-radius:var(--r-sm)}
.lsn-frame:fullscreen{border-radius:0}
@media (max-width:900px){ body.is-lesson .sh-in{min-height:60px} body.is-lesson .sh-logo img{height:44px} }

/* صفحات الشرائح: المسرح يملأ ما تحت الترويسة المصغّرة تمامًا */
body.is-slides .tlx-host{height:calc(100vh - 56px);height:calc(100dvh - 56px);min-height:380px}
@media (max-width:900px){ body.is-slides .tlx-host{height:calc(100vh - 60px);height:calc(100dvh - 60px)} }

/* التذييل على الحاسوب: صفٌّ واحدٌ قصير بدل أربعة أسطر، فيبقى للمحتوى ما فوقه من الشاشة */
@media (min-width:901px){
  .sf-in{flex-direction:row;justify-content:space-between;align-items:center;gap:28px;padding:12px 24px}
  .sf-logo{height:52px;order:0}
  .sf-links{order:1;flex:1;font-size:var(--fs-sm)}
  .sf-social{order:2;gap:6px}
  .sf-contact{order:3}
}
@media (max-width:900px){
  .sf-in{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:6px 18px;padding:16px 16px 20px}
  .sf-logo{height:52px}
  .sf-links{flex-basis:100%}
}

/* لوحة التحكّم مساحة عمل: لا ترويسة للموقع ولا تذييل (روابط الموقع والخروج في قائمتها الجانبيّة) */
body.is-dash>.sh,body.is-dash>.sf{display:none}
/* لوحة التحكّم على الحاسوب: الصفحة بطول الشاشة تمامًا، وما يطول داخلها يُمرَّر في مكانه */
@media (min-width:1000px){
  body.is-dash{height:100vh;height:100dvh;min-height:0}
  body.is-dash>main{flex:1 1 0;min-height:0;overflow:hidden}
}
/* صفحات الدروس على الحاسوب: الدرس يملأ الشاشة بلا تمرير؛ التذييل لا يظهر تحته، والترويسة المصغّرة تبقى للتنقّل */
@media (min-width:900px){
  body.is-lesson .sf{display:none}
}
body.is-slides .sf{display:none}
.tlx-draft{position:fixed;top:64px;left:14px;z-index:60;background:var(--acc);color:var(--acc-ink);font-family:var(--font-body);font-size:var(--fs-sm);line-height:1.6;padding:2px 12px;border-radius:var(--r-pill);pointer-events:none}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:-1px;padding:0;border:0}
