/* ==========================================================================
   صانع السيرة الذاتية — القوالب الإضافية (18 قالباً)
   - الألوان: --cv (الأساسي) و --cv2 (المساعد) و --cv3 (الثالث)
   - الأحجام والألوان الافتراضية لكل قالب تأتي من app.js (--dn-* --dt-* --dh-* --base)
     وإعدادات المستخدم (--n-* --t-* --h-* --f-body --fs ...) لها الأولوية دائماً
   - الزخارف التي تتكرر في كل صفحة (إطار، شريط، خلفية) في العنصر .cv-deco
   ========================================================================== */

/* ---------------- أساس مشترك ---------------- */
.cv.tx {
  font-family: var(--f-body, var(--tf, "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif));
  font-size: calc(var(--base, 9.6pt) * var(--fs, 1));
  line-height: 1.6;
  --k0: var(--cv2); --k1: var(--cv3); --k2: color-mix(in oklch, var(--cv2), var(--cv3));
  isolation: isolate; /* الزخرفة (z-index:-1) تُرسم فوق خلفية الورقة وتحت النصوص */
}
.tx .cv-deco {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--deco, none) top center / 210mm 297mm repeat-y;
}
.tx h1, .tx h2 { margin: 0; }

/* الاسم والمسمى */
.tx .cv-name {
  font-family: var(--n-font, inherit); font-size: var(--n-size, var(--dn-size, 24pt));
  font-weight: var(--n-weight, var(--dn-weight, 700)); color: var(--n-color, var(--dn-color, var(--cv)));
  line-height: 1.2; letter-spacing: var(--dn-ls, normal);
}
.tx .cv-name.split .nm2 { color: var(--n-color, var(--dn2-color, var(--dn-color, var(--cv)))); }
.tx .cv-name.cv-placeholder { opacity: .5; font-style: italic; }
.tx .cv-role {
  font-family: var(--t-font, inherit); font-size: var(--t-size, var(--dt-size, 12pt));
  font-weight: var(--t-weight, var(--dt-weight, 500)); color: var(--t-color, var(--dt-color, #6b7280));
  margin-top: 1mm; line-height: 1.4;
}

/* عناوين الأقسام */
.tx .sec-title {
  display: flex; align-items: center; gap: 2.4mm; margin: 0 0 2.8mm;
  font-family: var(--h-font, inherit); font-size: var(--h-size, var(--dh-size, 12.4pt));
  font-weight: var(--h-weight, var(--dh-weight, 700)); color: var(--h-color, var(--dh-color, var(--cv)));
  line-height: 1.3; break-after: avoid; page-break-after: avoid;
}
.tx .st-num, .tx .st-ico { display: none; }
.tx .sec-title .st-num:empty { display: none !important; }
.tx .st-text { min-width: 0; }
.tx .cv-section { margin-bottom: 5.5mm; }
.tx .cv-summary { text-align: justify; color: var(--c-text, #374151); }

/* عناصر الأقسام */
.tx .cv-entry-head { gap: 3mm; }
.tx .cv-entry-title { font-size: 1.08em; }
.tx .cv-entry-date { font-size: .9em; }
.tx .cv-entry-sub { font-size: .98em; }
.tx .cv-entry-note { font-size: .92em; }

/* التواصل */
.tx .cv-contacts { margin: 0; padding: 0; list-style: none; }
.tx .cv-contacts li { display: flex; align-items: center; gap: 2mm; min-width: 0; }
.tx .cv-contacts .ci { width: 3.6mm; text-align: center; flex: none; color: var(--ci, var(--cv)); font-size: .92em; }
.tx .cv-contacts.inline { display: flex; flex-wrap: wrap; gap: 1mm 5mm; margin-top: 2.6mm; font-size: .93em; }
.tx .cv-contacts.side-list li { align-items: flex-start; margin-bottom: 1.8mm; }
.tx .cv-contacts.side-list .ci { padding-top: .35mm; }

/* المهارات: أشرطة */
.tx .sk-bars { display: flex; flex-direction: column; gap: 2.2mm; }
.tx .sk-bars .cv-entry + .cv-entry { margin-top: 0; }
.tx .sk-name { display: flex; justify-content: space-between; gap: 2mm; line-height: 1.35; }
.tx .sk-name em { font-style: normal; opacity: .65; font-size: .84em; display: var(--pct, none); }
.tx .cv-bar { height: 1.7mm; margin-top: .9mm; background: var(--bar-off, #e9ecf1); }
.tx .cv-bar > span { width: var(--w, 60%); background: var(--bar, var(--cv)); }
/* المهارات: بطاقات */
.tx .cv-tags { display: flex; flex-wrap: wrap; gap: 1.6mm; }
.tx .cv-tag { padding: .5mm 2.8mm; background: var(--tag-bg, color-mix(in srgb, var(--cv) 11%, #fff)); color: var(--tag-fg, var(--cv)); font-size: .9em; font-weight: 500; border: var(--tag-bd, 0); }
/* المهارات: دوائر */
.tx .sk-rings { display: grid; grid-template-columns: repeat(var(--rcols, 4), minmax(0, 1fr)); gap: 3.2mm 2mm; }
.tx .ring { text-align: center; margin: 0 !important; }
.tx .ring-c {
  width: var(--rs, 15mm); height: var(--rs, 15mm); margin: 0 auto; border-radius: 50%;
  background: conic-gradient(var(--ring, var(--cv)) calc(var(--p, 60) * 1%), var(--ring-off, #e9ecf1) 0);
  display: grid; place-items: center;
}
.tx .ring-c span {
  width: calc(var(--rs, 15mm) - 3.6mm); height: calc(var(--rs, 15mm) - 3.6mm); border-radius: 50%;
  background: var(--ring-in, #fff); display: grid; place-items: center;
  font-size: .8em; font-weight: 700; color: var(--ring-txt, inherit); line-height: 1;
}
.tx .ring-n { font-size: .86em; margin-top: 1.2mm; line-height: 1.3; }

/* اللغات */
.tx .cv-langs { display: flex; flex-direction: column; gap: 1.8mm; }
.tx .cv-langs .cv-entry + .cv-entry { margin-top: 0; }
.tx .lg { display: flex; align-items: center; justify-content: space-between; gap: 3mm; }
.tx .lg-t b { font-weight: 600; }
.tx .lg-t small { margin-inline-start: 1.8mm; opacity: .72; font-size: .86em; }
.tx .cv-lvl-dots i { background: var(--dot-off, #e5e7eb); }
.tx .cv-lvl-dots i.on { background: var(--dot, var(--cv)); }

/* الصورة / الحروف الأولى */
.tx .cv-photo { object-fit: cover; }
.tx .cv-avatar { display: grid; place-items: center; overflow: hidden; flex: none; line-height: 1; }
.tx .cv-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* الأرقام البارزة */
.tx .cv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4mm; margin-bottom: 5.5mm; }
.tx .stat {
  --sk: var(--cv2); border-radius: 2.4mm; padding: 2mm 1mm 1.6mm; text-align: center; line-height: 1.3;
  background: color-mix(in srgb, var(--sk) 14%, #fff); color: color-mix(in srgb, var(--sk) 55%, #111);
  font-size: .9em;
}
.tx .stat b { display: block; font-size: 2em; line-height: 1.1; font-weight: 800; color: color-mix(in srgb, var(--sk) 85%, #000); }
.tx .stat-1 { --sk: var(--cv3); }
.tx .stat-2 { --sk: var(--k2); }

/* الاقتباس */
.tx .cv-quote { margin: 0 0 5.5mm; padding: 2.4mm 4mm; border-inline-start: 1.3mm solid var(--cv); line-height: 1.45; color: var(--c-text, #1f2937); }

/* تخطيطات */
.tx .lay-side { display: grid; grid-template-columns: var(--sw, 33%) minmax(0, 1fr); }
.tx .lay-side .cv-side {
  --sc: var(--s-color, var(--ds-color, #fff));
  color: var(--sc); font-family: var(--s-font, inherit); font-weight: var(--s-weight, 400);
  font-size: calc(var(--sbase, 9pt) * var(--s-scale, var(--fs, 1)));
  padding: 14mm 7mm 12mm; display: flex; flex-direction: column; gap: 6.5mm; min-width: 0;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.tx .lay-side .cv-main { padding: 14mm 10mm 12mm; min-width: 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tx .side-title {
  display: flex; align-items: center; gap: 2mm; font-weight: 700; font-size: 1.16em;
  padding-bottom: 1.3mm; margin-bottom: 2.8mm; color: var(--st-color, var(--sc));
  border-bottom: .35mm solid var(--st-line, color-mix(in srgb, var(--sc) 40%, transparent));
  break-after: avoid;
}
.tx .side-title i { font-size: .82em; color: var(--st-ico, inherit); }
.tx .side-photo { width: 34mm; height: 34mm; border-radius: 50%; margin: 0 auto; border: 1.1mm solid var(--ph-ring, #fff); display: block; }
.tx .cv-side .cv-bar { --bar-off: color-mix(in srgb, var(--sc) 22%, transparent); }
.tx .cv-side .sk { --bar: var(--side-acc, var(--sc)); }
.tx .cv-side .cv-tag { --tag-bg: color-mix(in srgb, var(--sc) 14%, transparent); --tag-fg: var(--sc); --tag-bd: .25mm solid color-mix(in srgb, var(--sc) 35%, transparent); }
.tx .cv-side .cv-lvl-dots i { --dot-off: color-mix(in srgb, var(--sc) 28%, transparent); --dot: var(--side-acc, var(--sc)); }
.tx .cv-side .sk-rings { --rcols: 2; --rs: 15mm; }
.tx .cv-side .ring { --ring: var(--side-acc, var(--sc)); --ring-off: color-mix(in srgb, var(--sc) 20%, transparent); --ring-in: var(--cv); }
.tx .cv-side .ci { color: var(--side-acc, var(--sc)); }
.tx .lay-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 0 7mm; align-items: start; }
.tx .lay-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 8mm; align-items: start; }

/* ==========================================================================
   1) الشريط الجانبي — كحلي وذهبي
   ========================================================================== */
.tpl-sidebar { --tf: "Cairo", "IBM Plex Sans Arabic", sans-serif; }
.tpl-sidebar .cv-side { --side-acc: var(--cv2); --st-color: var(--cv2); --st-line: color-mix(in srgb, var(--cv2) 70%, transparent); --ph-ring: var(--cv2); }
.tpl-sidebar .hd { padding-bottom: 4mm; margin-bottom: 5.5mm; border-bottom: .5mm solid #e5e7eb; }
.tpl-sidebar .sec-title { padding-bottom: 1.2mm; border-bottom: .55mm solid var(--cv2); }
.tpl-sidebar .cv-entry-date { color: color-mix(in srgb, var(--cv2) 70%, #000); font-weight: 600; }
.tpl-sidebar .cv-bullets li::before { background: var(--cv2); }

/* ==========================================================================
   2) الترويسة العريضة
   ========================================================================== */
.tpl-banner { --tf: "IBM Plex Sans Arabic", "Segoe UI", sans-serif; }
.tpl-banner .hd { background: var(--cv); color: #fff; padding: 12mm 15mm 9mm; display: flex; align-items: center; gap: 6mm; }
.tpl-banner .hd .cv-photo { width: 30mm; height: 30mm; border-radius: 3mm; border: 1mm solid rgb(255 255 255 / .85); flex: none; }
.tpl-banner .hd-txt { min-width: 0; }
.tpl-banner .hd .cv-contacts { color: rgb(255 255 255 / .9); --ci: var(--cv2); }
.tpl-banner .lay-cols { padding: 9mm 15mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-banner .col-aside { background: color-mix(in srgb, var(--cv) 7%, #fff); border-radius: 3mm; padding: 5mm 5mm .5mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-banner .sec-title { padding-bottom: 1.4mm; border-bottom: .3mm solid #e5e7eb; }
.tpl-banner .col-aside .sec-title { border-bottom-color: color-mix(in srgb, var(--cv) 22%, #fff); }
.tpl-banner .sec-title .st-ico { display: inline-grid; place-items: center; width: 6.6mm; height: 6.6mm; border-radius: 1.6mm; background: color-mix(in srgb, var(--cv) 13%, #fff); color: var(--cv); font-size: .66em; flex: none; }
.tpl-banner .cv-entry { padding-inline-start: 3mm; border-inline-start: .5mm solid color-mix(in srgb, var(--cv) 25%, #fff); }
.tpl-banner .col-aside .cv-entry { padding: 0; border: 0; }

/* ==========================================================================
   3) الخط الزمني
   ========================================================================== */
.tpl-timeline { --tf: "Tajawal", "IBM Plex Sans Arabic", sans-serif; }
.tpl-timeline .tw { padding: 15mm 17mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-timeline .hd { text-align: center; margin-bottom: 7mm; padding-bottom: 5mm; border-bottom: .4mm solid #ececec; }
.tpl-timeline .hd .cv-photo { width: 26mm; height: 26mm; border-radius: 50%; margin: 0 auto 3mm; border: .8mm solid var(--cv); padding: .6mm; display: block; }
.tpl-timeline .hd .cv-contacts { justify-content: center; color: #4b5563; }
.tpl-timeline .sec-title .st-ico { display: inline-grid; place-items: center; width: 6.8mm; height: 6.8mm; border-radius: 50%; background: var(--cv); color: #fff; font-size: .62em; flex: none; }
.tpl-timeline .tl .cv-entry { position: relative; margin: 0; padding-inline-start: 7.5mm; padding-bottom: 3.8mm; }
.tpl-timeline .tl .cv-entry::before { content: ""; position: absolute; inset-inline-start: 1.55mm; top: 1.5mm; bottom: -1.5mm; width: .6mm; background: var(--cv2); }
.tpl-timeline .tl .cv-entry:last-of-type::before { bottom: auto; height: 0; }
.tpl-timeline .tl .cv-entry::after { content: ""; position: absolute; inset-inline-start: 0; top: .9mm; width: 3.7mm; height: 3.7mm; border-radius: 50%; background: #fff; border: .8mm solid var(--cv); box-sizing: border-box; }
.tpl-timeline .tl .cv-entry-head { flex-direction: column-reverse; align-items: flex-start; gap: 0; }
.tpl-timeline .tl .cv-entry-date { color: var(--cv); font-weight: 700; }
.tpl-timeline .tl .cv-entry + .cv-entry { margin-top: 0; }

/* ==========================================================================
   4) التنفيذي الكلاسيكي
   ========================================================================== */
.tpl-executive { --tf: "Amiri", "Noto Naskh Arabic", "Noto Serif", Georgia, serif; line-height: 1.55; }
.tpl-executive .tw { padding: 16mm 18mm 13mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-executive .hd { text-align: center; }
.tpl-executive .hd .cv-photo { width: 27mm; height: 27mm; border-radius: 50%; margin: 0 auto 3mm; border: .5mm solid var(--cv2); padding: .8mm; display: block; }
.tpl-executive .cv-role { letter-spacing: .06em; }
.tpl-executive .hd .cv-contacts { justify-content: center; color: #4b5563; --ci: var(--cv); }
.tpl-executive .rule2 { height: 1.5mm; border-top: .55mm solid var(--cv2); border-bottom: .25mm solid var(--cv2); margin: 4.5mm 0 6.5mm; }
.tpl-executive .sec-title { justify-content: center; gap: 3.5mm; }
.tpl-executive .sec-title::before, .tpl-executive .sec-title::after { content: ""; flex: 1; height: .3mm; background: color-mix(in srgb, var(--cv) 35%, #fff); }
.tpl-executive .st-text { flex: none; }
.tpl-executive .cv-entry-sub { color: var(--cv); }
.tpl-executive .cv-tag { --tag-bg: #fff; --tag-bd: .3mm solid var(--cv); }
.tpl-executive .cv-bullets li::before { border-radius: 0; transform: rotate(45deg); width: 1.3mm; height: 1.3mm; }

/* ==========================================================================
   5) الإبداعي الهندسي
   ========================================================================== */
.tpl-geometric { --tf: "Cairo", "IBM Plex Sans Arabic", sans-serif; }
.tpl-geometric .hd { position: relative; min-height: 56mm; padding: 13mm 15mm 0; }
.tpl-geometric .band { position: absolute; inset: 0 0 auto 0; height: 54mm; background: var(--cv); clip-path: polygon(0 0, 100% 0, 100% 58%, 0 100%); }
.tpl-geometric[dir="ltr"] .band { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 58%); }
.tpl-geometric .hd-txt { position: relative; max-width: 68%; }
.tpl-geometric .geo-av { position: absolute; inset-inline-end: 15mm; top: 25mm; width: 33mm; height: 33mm; border-radius: 50%; border: 1.4mm solid #fff; background: var(--cv2); color: #fff; font-size: 20pt; font-weight: 700; }
.tpl-geometric .geo-body { padding: 2mm 15mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-geometric .geo-body > .cv-contacts { margin: 0 0 7mm; color: #4b5563; max-width: 70%; }
.tpl-geometric .sec-title::before { content: ""; width: 7mm; height: 1.6mm; border-radius: 1mm; background: var(--cv2); flex: none; }
.tpl-geometric .cv-entry-sub { color: var(--cv); }
.tpl-geometric .cv-bullets li::before { background: var(--cv2); }

/* ==========================================================================
   6) البطاقات الحديثة
   ========================================================================== */
.tpl-cards { --tf: "IBM Plex Sans Arabic", "Segoe UI", sans-serif; }
.tpl-cards .tw { padding: 10mm 10mm 8mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-cards .card { background: #fff; border-radius: 3mm; padding: 5mm 6mm 4.5mm; margin-bottom: 4mm; box-shadow: 0 .2mm 1mm rgb(15 23 42 / .07); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-cards .hd.card { display: flex; align-items: center; gap: 5mm; padding: 6mm; }
.tpl-cards .hd .cv-avatar { width: 25mm; height: 25mm; border-radius: 50%; background: var(--cv); color: #fff; font-size: 17pt; font-weight: 700; border: 1mm solid color-mix(in srgb, var(--cv) 25%, #fff); }
.tpl-cards .hd .cv-contacts { color: #4b5563; }
.tpl-cards .lay-cols { gap: 0 4mm; }
.tpl-cards .sec-title .st-ico { display: inline-grid; place-items: center; width: 6.4mm; height: 6.4mm; border-radius: 1.6mm; background: color-mix(in srgb, var(--cv) 14%, #fff); color: var(--cv); font-size: .62em; flex: none; }
.tpl-cards .cv-entry-sub { color: var(--cv); }

/* ==========================================================================
   7) الإطار المزخرف
   ========================================================================== */
.tpl-frame { --tf: "El Messiri", "Cairo", sans-serif; }
.tpl-frame .frame-in { padding: 20mm 21mm 18mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-frame .hd { text-align: center; margin-bottom: 7mm; }
.tpl-frame .hd .cv-photo { width: 27mm; height: 27mm; border-radius: 50%; margin: 0 auto 3mm; border: .6mm solid var(--cv2); padding: .8mm; display: block; }
.tpl-frame .orn { color: var(--cv2); letter-spacing: 1.6mm; font-size: .8em; margin: 2.4mm 0 0; }
.tpl-frame .hd .cv-contacts { justify-content: center; color: #4b5563; --ci: var(--cv2); }
.tpl-frame .sec-title { flex-direction: column; align-items: flex-start; gap: 1.2mm; }
.tpl-frame .sec-title::after { content: ""; width: 15mm; height: .6mm; background: var(--cv2); }
.tpl-frame .cv-entry-date { color: color-mix(in srgb, var(--cv2) 70%, #000); }
.tpl-frame .cv-bullets li::before { background: var(--cv2); border-radius: 0; transform: rotate(45deg); }

/* ==========================================================================
   8) الإنفوجرافيك
   ========================================================================== */
.tpl-infographic { --tf: "Tajawal", "IBM Plex Sans Arabic", sans-serif; }
.tpl-infographic .tw { padding: 14mm 15mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-infographic .hd { display: flex; align-items: center; gap: 5.5mm; padding-bottom: 5mm; margin-bottom: 6mm; border-bottom: .8mm solid var(--cv2); }
.tpl-infographic .hd .cv-avatar { width: 27mm; height: 27mm; border-radius: 50%; background: var(--cv); color: #fff; font-size: 18pt; font-weight: 800; }
.tpl-infographic .hd .cv-contacts { color: #4b5563; --ci: var(--cv2); }
.tpl-infographic .sec-title .st-ico { display: inline-grid; place-items: center; width: 7mm; height: 7mm; border-radius: 50%; background: var(--cv2); color: #fff; font-size: .6em; flex: none; }
.tpl-infographic .sk-rings { --rcols: 5; }
.tpl-infographic .ring { --ring: var(--cv2); }
.tpl-infographic .sk { --bar: var(--cv2); --pct: inline; }
.tpl-infographic .cv-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 9mm; }
.tpl-infographic .cv-lvl-dots { gap: .8mm; }
.tpl-infographic .cv-lvl-dots i { width: 6.5mm; height: 1.9mm; border-radius: .4mm; --dot: var(--cv2); }
.tpl-infographic .cv-tag { --tag-bg: color-mix(in srgb, var(--cv2) 14%, #fff); --tag-fg: color-mix(in srgb, var(--cv2) 70%, #000); }
.tpl-infographic .cv-bullets li::before { background: var(--cv2); }

/* ==========================================================================
   9) المجلة
   ========================================================================== */
.tpl-magazine { --tf: "Cairo", "IBM Plex Sans Arabic", sans-serif; }
.tpl-magazine .tw { padding: 15mm 15mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-magazine .hd { display: flex; align-items: flex-end; gap: 6mm; margin-bottom: 6mm; }
.tpl-magazine .hd-txt { flex: 1; min-width: 0; }
.tpl-magazine .hd .cv-photo { width: 31mm; height: 39mm; flex: none; order: 2; filter: grayscale(.15); }
.tpl-magazine .cv-name { line-height: 1; }
.tpl-magazine .cv-name .nm1, .tpl-magazine .cv-name .nm2 { display: block; }
.tpl-magazine .mag-rule { height: 1.3mm; background: var(--cv2); margin: 3mm 0 1.6mm; }
.tpl-magazine .hd .cv-contacts { color: #4b5563; }
.tpl-magazine .sec-title { border-top: .8mm solid var(--cv2); padding-top: 1.6mm; }
.tpl-magazine .col-aside { border-inline-start: .3mm solid #d4d4d8; padding-inline-start: 6mm; }
.tpl-magazine .cv-entry-date { color: var(--cv); font-weight: 600; }

/* ==========================================================================
   10) المونوغرام الهادئ
   ========================================================================== */
.tpl-monogram { --tf: "Readex Pro", "IBM Plex Sans Arabic", sans-serif; --dn-ls: .02em; }
.tpl-monogram .tw { padding: 18mm 18mm 14mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-monogram .hd { display: flex; align-items: center; gap: 6mm; margin-bottom: 10mm; }
.tpl-monogram .mono-box { width: 21mm; height: 21mm; border: .5mm solid var(--cv); color: var(--cv); font-size: 15pt; font-weight: 600; }
.tpl-monogram .hd .cv-contacts { color: #6b7280; }
.tpl-monogram .mono-body { border-inline-start: .6mm solid var(--cv); padding-inline-start: 7mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-monogram .cv-section { margin-bottom: 7.5mm; }
.tpl-monogram .sec-title { letter-spacing: .03em; }
.tpl-monogram .cv-entry-title { font-weight: 600; }
.tpl-monogram .cv-tag { --tag-bg: #fff; --tag-bd: .3mm solid color-mix(in srgb, var(--cv) 45%, #fff); }

/* ==========================================================================
   11) الإطار الملكي (ملوّن)
   ========================================================================== */
.tpl-frame2 { --tf: "El Messiri", "Cairo", sans-serif; }
.tpl-frame2 .frame-in { padding: 13mm 13mm 15mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-frame2 .hd { background: var(--cv3); text-align: center; padding: 9mm 8mm 8mm; margin-bottom: 7mm; border-bottom: 1mm solid var(--cv2); }
.tpl-frame2 .hd .cv-photo { width: 27mm; height: 27mm; border-radius: 50%; margin: 0 auto 3mm; border: .8mm solid var(--cv2); display: block; }
.tpl-frame2 .hd .cv-contacts { justify-content: center; color: color-mix(in srgb, #fff 75%, var(--cv3)); --ci: var(--cv2); }
.tpl-frame2 .f2-body { padding: 0 6mm; }
.tpl-frame2 .sec-title { justify-content: center; gap: 3mm; }
.tpl-frame2 .sec-title::before, .tpl-frame2 .sec-title::after { content: ""; flex: 1; height: .35mm; background: var(--cv2); }
.tpl-frame2 .st-text { flex: none; }
.tpl-frame2 .cv-entry-date { color: color-mix(in srgb, var(--cv2) 70%, #000); }
.tpl-frame2 .cv-bullets li::before { background: var(--cv2); }
.tpl-frame2 .sk { --bar: var(--cv2); }

/* ==========================================================================
   12) الإنفوجرافيك الملوّن
   ========================================================================== */
.tpl-info2 { --tf: "Tajawal", "IBM Plex Sans Arabic", sans-serif; }
.tpl-info2 .cv-side { --st-color: var(--cv2); --st-line: transparent; --side-acc: var(--cv3); --ph-ring: #fff; }
.tpl-info2 .side-title span { border-bottom: .6mm solid var(--cv2); padding-bottom: .6mm; }
.tpl-info2 .cv-side .ring { --ring: var(--k); }
.tpl-info2 .cv-side .sk { --bar: var(--k); }
.tpl-info2 .cv-side .ci { color: var(--cv2); }
.tpl-info2 .hd { margin-bottom: 4mm; }
.tpl-info2 .cv-role { display: inline-block; background: var(--cv2); padding: .3mm 3mm; border-radius: 1mm; margin-top: 1.6mm; }
.tpl-info2 .sec-title .st-ico { display: inline; color: var(--cv2); font-size: .9em; }
.tpl-info2 .sec-education .st-ico { color: var(--cv3); }
.tpl-info2 .sec-courses .st-ico { color: var(--k2); }
.tpl-info2 .cv-main .cv-entry { padding-inline-start: 3mm; border-inline-start: .6mm solid color-mix(in srgb, var(--cv2) 60%, #fff); }
.tpl-info2 .cv-main .sec-education .cv-entry { border-color: color-mix(in srgb, var(--cv3) 70%, #fff); }
.tpl-info2 .cv-bullets li::before { background: var(--cv2); }

/* ==========================================================================
   13) المجلة الجريئة
   ========================================================================== */
.tpl-mag2 { --tf: "Cairo", "IBM Plex Sans Arabic", sans-serif; }
.tpl-mag2 .hd { display: flex; align-items: stretch; background: var(--cv); min-height: 50mm; }
.tpl-mag2 .cover { flex: 1; padding: 12mm 15mm 9mm; min-width: 0; }
.tpl-mag2 .kicker { color: color-mix(in srgb, #fff 78%, var(--cv)); letter-spacing: .3em; font-size: .92em; font-weight: 600; margin-bottom: 1.5mm; }
.tpl-mag2 .cv-name { line-height: 1.02; }
.tpl-mag2 .cv-name .nm1, .tpl-mag2 .cv-name .nm2 { display: block; }
.tpl-mag2 .cover-photo { width: 34mm; height: 43mm; border: 1.2mm solid #fff; align-self: flex-end; margin: 0 15mm -9mm; position: relative; z-index: 2; flex: none; }
.tpl-mag2 .strip { background: var(--cv2); color: #fff; padding: 3mm 15mm; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5mm 6mm; }
.tpl-mag2 .strip .cv-role { margin: 0; }
.tpl-mag2 .strip .cv-contacts { margin: 0; color: rgb(255 255 255 / .86); --ci: var(--cv3); font-size: .9em; gap: .5mm 4mm; }
.tpl-mag2 .mag-body { padding: 9mm 15mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-mag2 .cv-quote { background: color-mix(in srgb, var(--cv) 8%, #fff); color: color-mix(in srgb, var(--cv) 65%, #000); font-style: italic; font-size: 1.08em; }
.tpl-mag2 .sec-title .st-num { display: inline-grid; place-items: center; min-width: 6.6mm; height: 6.6mm; background: var(--cv); color: #fff; font-size: .7em; font-weight: 700; flex: none; }
.tpl-mag2 .col-aside .st-num { background: var(--cv2); }
.tpl-mag2 .col-aside { border-inline-start: .3mm solid #e2e2e6; padding-inline-start: 6mm; }
.tpl-mag2 .cv-entry-date { color: var(--cv); font-weight: 600; }
.tpl-mag2 .cv-bullets li::before { background: var(--cv); border-radius: 0; }

/* ==========================================================================
   14) المونوغرام العصري
   ========================================================================== */
.tpl-mono2 { --tf: "Readex Pro", "IBM Plex Sans Arabic", sans-serif; }
.tpl-mono2 .mono-in { padding: 15mm 15mm 12mm; padding-inline-start: 19mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-mono2 .hd { display: flex; align-items: center; gap: 6.5mm; margin-bottom: 7mm; }
.tpl-mono2 .mono-sq { width: 23mm; height: 23mm; border-radius: 5mm; background: var(--cv); color: #fff; font-size: 17pt; font-weight: 600; transform: rotate(-6deg); margin-inline-start: 1mm; }
.tpl-mono2 .hd .cv-contacts { color: #6b7280; --ci: var(--cv2); }
.tpl-mono2 .sec-title { display: flex; width: max-content; max-width: 100%; padding: .5mm 4mm; border-radius: 999px; background: var(--pill, var(--cv)); }
.tpl-mono2 .sec-profile, .tpl-mono2 .sec-skills { --pill: var(--cv); }
.tpl-mono2 .sec-experience { --pill: var(--cv); }
.tpl-mono2 .sec-education, .tpl-mono2 .sec-languages { --pill: var(--cv2); }
.tpl-mono2 .sec-courses { --pill: var(--cv3); }
.tpl-mono2 .sec-courses .sec-title { color: var(--h-color, color-mix(in srgb, var(--cv3) 30%, #000)); }
.tpl-mono2 .cv-tag { --tag-bg: color-mix(in srgb, var(--k) 15%, #fff); --tag-fg: color-mix(in srgb, var(--k) 65%, #000); }
.tpl-mono2 .sk { --bar: var(--k); }
.tpl-mono2 .ring { --ring: var(--k); }
.tpl-mono2 .cv-entry-sub { color: var(--cv); }
.tpl-mono2 .cv-bullets li::before { background: var(--cv2); }

/* ==========================================================================
   15) الملكي
   ========================================================================== */
.tpl-royal { --tf: "El Messiri", "Cairo", sans-serif; }
.tpl-royal .hd { background: var(--cv); text-align: center; padding: 13mm 14mm 11mm; position: relative; border-bottom: 1.2mm solid var(--cv2); }
.tpl-royal .hd-frame { position: absolute; inset: 4mm; border: .3mm solid var(--cv2); pointer-events: none; }
.tpl-royal .hd .cv-photo { width: 28mm; height: 28mm; border-radius: 50%; margin: 0 auto 3mm; border: .8mm solid var(--cv2); position: relative; display: block; }
.tpl-royal .hd .cv-name, .tpl-royal .hd .cv-role { position: relative; letter-spacing: .02em; }
.tpl-royal .hd .cv-contacts { justify-content: center; color: color-mix(in srgb, #fff 60%, var(--cv)); --ci: var(--cv2); position: relative; }
.tpl-royal .royal-body { padding: 8mm 16mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-royal .sec-title { justify-content: center; gap: 3mm; }
.tpl-royal .sec-title::before, .tpl-royal .sec-title::after { content: ""; flex: 1; height: .3mm; background: var(--cv2); }
.tpl-royal .st-text { flex: none; }
.tpl-royal .sec-profile .sec-title { font-size: var(--h-size, calc(var(--dh-size) * .8)); color: var(--h-color, var(--cv2)); letter-spacing: .25em; }
.tpl-royal .sec-profile .sec-title::before { content: "❖"; flex: none; height: auto; background: none; }
.tpl-royal .sec-profile .sec-title::after { content: "❖"; flex: none; height: auto; background: none; }
.tpl-royal .sec-profile .cv-summary { text-align: center; color: var(--c-text, #4a5268); }
.tpl-royal .cv-entry-title { color: var(--c-text, var(--cv)); }
.tpl-royal .cv-entry-date { color: color-mix(in srgb, var(--cv2) 72%, #000); }
.tpl-royal .cv-entry-sub { color: color-mix(in srgb, var(--cv2) 72%, #000); }
.tpl-royal .cv-bullets li::before { background: var(--cv2); border-radius: 0; transform: rotate(45deg); }
.tpl-royal .sk { --bar: var(--cv2); }
.tpl-royal .cv-lvl-dots i.on { --dot: var(--cv2); }

/* ==========================================================================
   16) الإنفوجرافيك الداكن
   ========================================================================== */
.tpl-info3 { --tf: "Tajawal", "IBM Plex Sans Arabic", sans-serif; }
.tpl-info3 .cv-side { --st-color: #fff; --side-acc: var(--cv2); }
.tpl-info3 .side-photo { border: 0; box-shadow: 0 0 0 1.2mm var(--cv), 0 0 0 1.9mm var(--cv2); }
.tpl-info3 .side-title { border-bottom: 0; }
.tpl-info3 .side-title span { border-bottom: .7mm solid var(--stl, var(--cv2)); padding-bottom: .5mm; }
.tpl-info3 .side-blk.sec-skills { --stl: var(--cv3); }
.tpl-info3 .side-blk.sec-languages { --stl: var(--k2); }
.tpl-info3 .side-title i { color: var(--stl, var(--cv2)); }
.tpl-info3 .side-list li:nth-child(3n+2) .ci { color: var(--cv3); }
.tpl-info3 .side-list li:nth-child(3n) .ci { color: var(--k2); }
.tpl-info3 .cv-side .sk, .tpl-info3 .cv-side .ring, .tpl-info3 .cv-side .lg { --bar: var(--k); --ring: var(--k); --dot: var(--k); }
.tpl-info3 .cv-side .cv-lvl-dots i.on { background: var(--k); }
.tpl-info3 .cv-name .nm2 { display: block; }
.tpl-info3 .hd { margin-bottom: 5mm; }
.tpl-info3 .sec-title .st-ico { display: inline; color: var(--cv2); font-size: .9em; }
.tpl-info3 .sec-education .st-ico { color: var(--cv3); }
.tpl-info3 .sec-courses .st-ico { color: var(--k2); }
.tpl-info3 .cv-main .cv-entry { padding-inline-start: 3mm; border-inline-start: .65mm solid var(--cv2); }
.tpl-info3 .cv-main .cv-entry:nth-of-type(even) { border-color: var(--cv3); }
.tpl-info3 .cv-entry-date { color: color-mix(in srgb, var(--cv2) 80%, #000); font-weight: 600; }
.tpl-info3 .cv-entry-sub { color: #64748b; }
.tpl-info3 .cv-bullets li::before { background: var(--cv3); }

/* ==========================================================================
   17) المجلة القرمزية
   ========================================================================== */
.tpl-mag3 { --tf: "Cairo", "IBM Plex Sans Arabic", sans-serif; }
.tpl-mag3 .hd { display: flex; min-height: 56mm; }
.tpl-mag3 .cover { flex: 1; min-width: 0; background: var(--cv); padding: 12mm 15mm 9mm; }
.tpl-mag3 .kicker { color: color-mix(in srgb, #fff 80%, var(--cv)); letter-spacing: .3em; font-size: .92em; font-weight: 600; margin-bottom: 1.5mm; }
.tpl-mag3 .cv-name { line-height: 1; }
.tpl-mag3 .cv-name .nm1, .tpl-mag3 .cv-name .nm2 { display: block; }
.tpl-mag3 .cover .cv-role { margin-top: 2mm; }
.tpl-mag3 .cover-side { width: 30%; flex: none; background: var(--cv2); position: relative; }
.tpl-mag3 .cover-side::before { content: ""; position: absolute; inset-block: 8mm; inset-inline-start: 0; inset-inline-end: 8mm; background: color-mix(in srgb, var(--cv2) 55%, var(--cv)); border: 1.2mm solid #fff; border-inline-start: 0; }
.tpl-mag3 .cover-side img { position: absolute; inset-block: 8mm; inset-inline-start: 0; inset-inline-end: 8mm; width: calc(100% - 8mm); height: calc(100% - 16mm); object-fit: cover; border: 1.2mm solid #fff; border-inline-start: 0; box-sizing: border-box; }
.tpl-mag3 .strip { background: var(--cv3); color: #f2f2f5; padding: 2.6mm 15mm; }
.tpl-mag3 .strip .cv-contacts { margin: 0; justify-content: space-between; --ci: var(--cv2); font-size: .9em; }
.tpl-mag3 .mag-body { padding: 9mm 15mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-mag3 .cv-quote { font-size: 1.5em; font-weight: 900; color: var(--cv); border-inline-start-color: var(--cv3); line-height: 1.35; padding: .5mm 3.5mm; }
.tpl-mag3 .sec-title .st-num { display: inline; font-size: 1.55em; font-weight: 900; color: var(--cv); line-height: 1; }
.tpl-mag3 .col-aside .st-num { color: var(--cv3); }
.tpl-mag3 .col-aside { border-inline-start: .3mm solid #e2e2e6; padding-inline-start: 6mm; }
.tpl-mag3 .cv-entry-date { color: var(--cv); font-weight: 600; }
.tpl-mag3 .cv-bullets li::before { background: var(--cv); }

/* ==========================================================================
   18) المونوغرام النيلي
   ========================================================================== */
.tpl-mono3 { --tf: "Readex Pro", "IBM Plex Sans Arabic", sans-serif; }
.tpl-mono3 .tri { display: flex; height: 2.8mm; }
.tpl-mono3 .tri i:nth-child(1) { flex: 3; background: var(--cv); }
.tpl-mono3 .tri i:nth-child(2) { flex: 2; background: var(--cv2); }
.tpl-mono3 .tri i:nth-child(3) { flex: 1; background: var(--cv3); }
.tpl-mono3 .mono-in { padding: 12mm 15mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tpl-mono3 .hd { display: flex; align-items: center; gap: 6.5mm; margin-bottom: 6mm; }
.tpl-mono3 .mono-stack { position: relative; width: 23mm; height: 23mm; flex: none; }
.tpl-mono3 .mono-stack > i { position: absolute; inset: 0; border-radius: 5mm; background: var(--cv2); transform: rotate(9deg); }
.tpl-mono3 .mono-stack .mono-sq { position: absolute; inset: 0; border-radius: 5mm; background: var(--cv); color: #fff; font-size: 17pt; font-weight: 600; }
.tpl-mono3 .hd .cv-contacts { color: #6b7280; --ci: var(--cv2); }
.tpl-mono3 .sum-box { background: color-mix(in srgb, var(--cv) 7%, #fff); border-radius: 3.5mm; padding: 3.5mm 5mm; margin-bottom: 6.5mm; }
.tpl-mono3 .sum-box .cv-summary { color: var(--c-text, color-mix(in srgb, var(--cv) 55%, #1f2937)); }
.tpl-mono3 .lay-cols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.tpl-mono3 .sec-title { display: flex; width: max-content; max-width: 100%; padding: .5mm 4mm; border-radius: 999px; background: var(--pill, var(--cv)); }
.tpl-mono3 .sec-education { --pill: var(--cv2); }
.tpl-mono3 .sec-courses, .tpl-mono3 .sec-languages { --pill: color-mix(in srgb, var(--cv) 45%, #111); }
.tpl-mono3 .sec-skills { --pill: var(--cv3); }
.tpl-mono3 .sec-skills .sec-title { color: var(--h-color, color-mix(in srgb, var(--cv3) 30%, #000)); }
.tpl-mono3 .cv-tag { --tag-bg: color-mix(in srgb, var(--k) 14%, #fff); --tag-fg: color-mix(in srgb, var(--k) 65%, #000); }
.tpl-mono3 .sk { --bar: var(--k); }
.tpl-mono3 .ring { --ring: var(--k); }
.tpl-mono3 .cv-entry-date { color: var(--cv); font-weight: 600; }
.tpl-mono3 .cv-entry-sub { color: color-mix(in srgb, var(--cv2) 80%, #000); }
.tpl-mono3 .cv-bullets li::before { background: var(--cv2); }

/* ==========================================================================
   الطباعة — الزخارف تُرسم ثابتة لتتكرر في كل صفحة
   ========================================================================== */
@media print {
  .tx .cv-deco {
    position: fixed; top: 0; left: 0; right: auto; bottom: auto;
    width: 210mm; height: 297mm;
    background-size: 100% 100%; background-repeat: no-repeat;
  }
}
