/* أسئلتي — شكل ورقة الامتحان (نفسه بالمعاينة والتصدير والطباعة) */
@font-face{font-family:"Amiri";src:url("../fonts/Amiri-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"Amiri";src:url("../fonts/Amiri-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"Noto Naskh Arabic";src:url("../fonts/NotoNaskhArabic.ttf");font-weight:400 700;font-display:swap}
@font-face{font-family:"Scheherazade New";src:url("../fonts/ScheherazadeNew-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"Scheherazade New";src:url("../fonts/ScheherazadeNew-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"Markazi Text";src:url("../fonts/MarkaziText.ttf");font-weight:400 700;font-display:swap}
@font-face{font-family:"Harmattan";src:url("../fonts/Harmattan-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"Harmattan";src:url("../fonts/Harmattan-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"Mirza";src:url("../fonts/Mirza-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"Mirza";src:url("../fonts/Mirza-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"IBM Plex Sans Arabic";src:url("../fonts/IBMPlexSansArabic-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"IBM Plex Sans Arabic";src:url("../fonts/IBMPlexSansArabic-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"Tajawal";src:url("../fonts/Tajawal-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"Tajawal";src:url("../fonts/Tajawal-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"Tajawal";src:url("../fonts/Tajawal-Black.ttf");font-weight:900;font-display:swap}
@font-face{font-family:"Almarai";src:url("../fonts/Almarai-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"Almarai";src:url("../fonts/Almarai-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"Almarai";src:url("../fonts/Almarai-ExtraBold.ttf");font-weight:800 900;font-display:swap}
@font-face{font-family:"Cairo";src:url("../fonts/Cairo-Variable.ttf");font-weight:200 1000;font-display:swap}
@font-face{font-family:"Readex Pro";src:url("../fonts/ReadexPro.ttf");font-weight:160 700;font-display:swap}
@font-face{font-family:"Vazirmatn";src:url("../fonts/Vazirmatn.ttf");font-weight:100 900;font-display:swap}
@font-face{font-family:"Changa";src:url("../fonts/Changa.ttf");font-weight:200 800;font-display:swap}
@font-face{font-family:"Noto Kufi Arabic";src:url("../fonts/NotoKufiArabic-Variable.ttf");font-weight:100 900;font-display:swap}
@font-face{font-family:"El Messiri";src:url("../fonts/ElMessiri-Variable.ttf");font-weight:400 700;font-display:swap}
@font-face{font-family:"Reem Kufi";src:url("../fonts/ReemKufi.ttf");font-weight:400 700;font-display:swap}
@font-face{font-family:"Kufam";src:url("../fonts/Kufam.ttf");font-weight:400 900;font-display:swap}
@font-face{font-family:"Lalezar";src:url("../fonts/Lalezar-Regular.ttf");font-weight:400 900;font-display:swap}
@font-face{font-family:"Rakkas";src:url("../fonts/Rakkas-Regular.ttf");font-weight:400 900;font-display:swap}
@font-face{font-family:"Baloo Bhaijaan 2";src:url("../fonts/BalooBhaijaan2.ttf");font-weight:400 800;font-display:swap}
@font-face{font-family:"Lemonada";src:url("../fonts/Lemonada.ttf");font-weight:300 700;font-display:swap}
@font-face{font-family:"Marhey";src:url("../fonts/Marhey.ttf");font-weight:300 700;font-display:swap}
@font-face{font-family:"Katibeh";src:url("../fonts/Katibeh-Regular.ttf");font-weight:400 900;font-display:swap}
@font-face{font-family:"Aref Ruqaa";src:url("../fonts/ArefRuqaa-Regular.ttf");font-weight:400;font-display:swap}
@font-face{font-family:"Aref Ruqaa";src:url("../fonts/ArefRuqaa-Bold.ttf");font-weight:700;font-display:swap}
@font-face{font-family:"Handicrafts";src:url("../fonts/TheYearofHandicrafts-Regular.otf");font-weight:400;font-display:swap}
@font-face{font-family:"Handicrafts";src:url("../fonts/TheYearofHandicrafts-Bold.otf");font-weight:700;font-display:swap}
@font-face{font-family:"Handicrafts";src:url("../fonts/TheYearofHandicrafts-Black.otf");font-weight:900;font-display:swap}

.page{position:relative;background:#fff;color:#111;overflow:hidden;direction:rtl;font-family:var(--font);font-size:var(--fs);line-height:var(--lh);box-sizing:border-box}
.page *{box-sizing:border-box}
.page .frame{position:absolute;inset:var(--m);display:flex}
.page .pc{flex:1;display:flex;flex-direction:column;min-height:0;padding:4mm 5mm}
.page .cols{flex:1;min-height:0;display:flex;gap:6mm}
.page .col{flex:1;min-width:0;overflow:hidden}
.page .col+.col{border-right:1px solid var(--accent-line);padding-right:6mm}
.page .pf{height:6mm;text-align:center;font-size:.72em;color:#555;padding-top:1mm}
.page .wm{position:absolute;left:50%;top:50%;pointer-events:none;text-align:center;white-space:nowrap;font-weight:700;z-index:0}
.page .wm img{width:100%;display:block}
.page .frame{z-index:1}

/* رأس الورقة */
.ph{margin-bottom:3mm}
.ph-top{display:flex;align-items:center;gap:4mm}
.ph-r,.ph-l{flex:1;font-size:.86em;line-height:1.55}
.ph-l{text-align:left}
.ph-l div{text-align:right;display:table;margin-right:auto}
.ph-school{font-weight:700;color:var(--c-school,inherit)}
.ph-c{width:24mm;text-align:center}
.ph-c img{max-width:24mm;max-height:24mm;object-fit:contain}
.ph-title{text-align:center;font-weight:700;font-size:1.08em;margin:2.5mm 0 1.5mm;color:var(--c-title,inherit)}
.ph-student{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1.5mm 5mm;font-size:.9em;margin:1mm 0}
.ph-student span{white-space:nowrap}
.dots{display:inline-block;width:42mm;border-bottom:1.2px dotted #333;height:.9em}
.dots.s{width:18mm}
.ph-note{font-size:.86em;margin-top:1mm}

/* الأسئلة */
.blk{display:flow-root;padding-bottom:2.2mm}
.sh{display:flex;justify-content:space-between;align-items:baseline;font-weight:700;font-size:1.04em;margin-top:1.5mm}
.sh-m{font-size:.86em;white-space:nowrap}
.si{font-weight:700;font-size:.92em;margin-top:.5mm}
.it{display:flex;gap:2mm;align-items:flex-start}
.it-n{font-weight:700;min-width:5mm}
.it-b{flex:1;min-width:0;color:var(--c-question,inherit)}
.sh-t{color:var(--c-section,inherit)}
.page [data-sid]{transition:outline-color .15s}
.page .sel{outline:2px dashed #e0a526;outline-offset:2px;border-radius:2px}
.it-m{font-size:.78em;white-space:nowrap;color:#444;padding-top:.2em}
.it-q{display:flex;justify-content:space-between;gap:3mm}
.t-tf .it-q{align-items:baseline}
.tfbox{white-space:nowrap;font-weight:700}
.it-img{display:block;margin:1.5mm auto;object-fit:contain}
.it-img.sz-s{max-width:30%;max-height:32mm}
.it-img.sz-m{max-width:48%;max-height:52mm}
.it-img.sz-l{max-width:80%;max-height:90mm}
.iw.pos-side{display:flex;gap:4mm;align-items:flex-start}
.iw.pos-side .iw-t{flex:1;min-width:0}
.iw.pos-side .it-img{margin:0;flex:none}
.iw.pos-side .it-img.sz-s{max-width:24%}.iw.pos-side .it-img.sz-m{max-width:36%}.iw.pos-side .it-img.sz-l{max-width:50%}
[dir=ltr]{text-align:left}
.page .ph-title{text-align:center}
.blank{display:inline-block;min-width:26mm;border-bottom:1.2px dotted #222;height:1em;vertical-align:baseline;margin:0 1mm}
.opts{display:grid;gap:.6mm 4mm;margin-top:.8mm}
.opts.per4{grid-template-columns:repeat(4,1fr)}
.opts.per2{grid-template-columns:repeat(2,1fr)}
.opts.per1{grid-template-columns:1fr}
.lines .ln{border-bottom:1.1px dotted #777;height:calc(var(--fs) * 1.9)}
table.mt,table.gt{width:100%;border-collapse:collapse;margin-top:1.2mm;font-size:.95em}
.mt th,.mt td,.gt th,.gt td{border:1px solid #444;padding:.6mm 2mm;text-align:right}
.mt th,.gt th{background:var(--accent-soft);font-weight:700;text-align:center}
.mt .mn{width:7mm;text-align:center;font-weight:700}
.mt .mb{width:11mm;text-align:center;white-space:nowrap}
.ans{margin-top:.8mm;color:var(--accent);font-weight:700;background:var(--accent-soft);border-radius:1.5mm;padding:.6mm 2.5mm}
.ans b{color:#111}
.ans .miss{color:#b42318;font-weight:400}
.end{text-align:center;margin-top:3mm}
.endtxt{font-weight:700}
.sign{text-align:left;margin-top:4mm;font-weight:700}

/* ١. رسمي كلاسيكي */
.pst-classic .frame{border:3px double #222}
.pst-classic .ph{border-bottom:3px double #222;padding-bottom:2mm}
.pst-classic .sh-t{text-decoration:underline;text-underline-offset:4px}

/* ٢. عصري نظيف */
.pst-modern .ph-top{border-top:5px solid var(--accent);padding-top:3mm}
.pst-modern .ph-title{color:var(--c-title,var(--accent))}
.pst-modern .ph{border-bottom:1px solid var(--accent-line);padding-bottom:2mm}
.pst-modern .sh{background:var(--accent-soft);border-right:4px solid var(--accent);padding:.6mm 3mm;border-radius:1.5mm}
.pst-modern .sh-t{color:var(--c-section,var(--accent))}
.pst-modern .it-n{color:var(--accent)}

/* ٣. رسمي بإطار مزخرف */
.pst-ornate .frame{border:1.5px solid var(--accent);outline:.6px solid var(--accent);outline-offset:-2.2mm;color:var(--accent)}
.pst-ornate .pc{padding:6mm 7mm;color:#111}
.pst-ornate .crn{position:absolute;width:13mm;height:13mm;color:var(--accent)}
.pst-ornate .crn svg{width:100%;height:100%;display:block}
.pst-ornate .crn.tr{top:-1px;right:-1px;transform:scaleX(-1)}
.pst-ornate .crn.tl{top:-1px;left:-1px}
.pst-ornate .crn.br{bottom:-1px;right:-1px;transform:scale(-1,-1)}
.pst-ornate .crn.bl{bottom:-1px;left:-1px;transform:scaleY(-1)}
.pst-ornate .ph{border:1px solid var(--accent-line);border-radius:2mm;padding:2.5mm 3mm}
.pst-ornate .ph-title{color:var(--c-title,var(--accent));font-size:1.15em}
.pst-ornate .sh{border-bottom:1px solid var(--accent-line);padding-bottom:.5mm}
.pst-ornate .sh-t{color:var(--c-section,var(--accent))}

/* أبيض وأسود */
.page.mono .ans{background:#f1f1f1}
.page.mono .pst-modern .sh{background:#f1f1f1}

/* ٤. أنيق بزخرفة */
.pst-elegant .frame{border:1px solid var(--accent);outline:1px solid var(--accent);outline-offset:-2.2mm}
.pst-elegant .ph-title{color:var(--c-title,var(--accent));font-size:1.12em}
.pst-elegant .ph-title:before,.pst-elegant .ph-title:after{content:"❖";color:var(--accent);font-size:.8em;margin:0 3mm}
.pst-elegant .ph{border-bottom:1px solid var(--accent-line);padding-bottom:2mm}
.pst-elegant .sh-t{color:var(--c-section,var(--accent))}
.pst-elegant .sh-t:before{content:"◆ ";font-size:.7em;color:var(--accent)}

/* ٥. شريط ملوّن */
.pst-band .ph-top{background:var(--accent);color:#fff;border-radius:2.5mm;padding:3mm 4mm}
.pst-band .ph-top .ph-school{color:var(--c-school,#fff)}
.pst-band .ph-title{color:var(--c-title,var(--accent))}
.pst-band .ph{border-bottom:2px solid var(--accent);padding-bottom:2mm}
.pst-band .sh-t{color:var(--c-section,var(--accent))}
.pst-band .sh-t:before{content:"";display:inline-block;width:2.2mm;height:2.2mm;border-radius:50%;background:var(--accent);margin-left:2mm;vertical-align:middle}

/* ٦. عناوين بمربعات */
.pst-boxed .frame{border:1.2px solid #333;border-radius:3mm}
.pst-boxed .ph{border-bottom:1.2px solid #333;padding-bottom:2mm}
.pst-boxed .sh{border:1.2px solid var(--accent);background:var(--accent-soft);border-radius:2mm;padding:.6mm 3mm}
.pst-boxed .sh-t{color:var(--c-section,var(--accent))}
.pst-boxed .it{border-bottom:1px dashed #ccc;padding-bottom:1.5mm}

/* ٧. إطار منقّط */
.pst-dotted .frame{border:2.4px dotted var(--accent);border-radius:5mm}
.pst-dotted .ph{border-bottom:1.6px dashed var(--accent-line);padding-bottom:2mm}
.pst-dotted .ph-title{color:var(--c-title,var(--accent))}
.pst-dotted .sh-t{color:var(--c-section,var(--accent));border-bottom:1.6px dotted var(--accent);padding-bottom:.3mm}

/* ٨. بسيط بلا إطار */
.pst-minimal .ph{border-bottom:1px solid #999;padding-bottom:2mm}
.pst-minimal .sh{border-bottom:.6px solid #ddd;padding-bottom:.4mm}
