/* 📜 صفحتا سياسة الخصوصية وشروط الاستخدام — ورقةٌ واحدةٌ للصفحتين (لا نسختان تتباعدان)
   الهوية: أخضرُ الغابة والذهبيّ والكريميّ وخطّ Cairo المحلّيّ (نمطُ 404.html وبطاقةِ التسجيل)
   ⚖️ منشورتان منذ 17 نوفمبر وتعرضان «غير متاحة بعد» حتى يقلب الأدمنُ مفتاحَ «التفعيل القانونيّ» (legal.js) */
:root {
  --forest: #1e3a2f; --forest-2: #2b5344; --gold: #d4a843; --gold-ink: #7a5a12;
  --cream: #f6f2e8; --paper: #fffdf8; --ink: #22302a; --muted: #5d6b63; --line: #e7dfcc;
  --todo-bg: #fff4d6; --todo-line: #e9c46a; --todo-ink: #6a4c00;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: Cairo, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  line-height: 1.95; font-size: 15.5px;
}

/* ── الرأس ── */
.lg-head {
  background: radial-gradient(125% 120% at 50% 0%, var(--forest-2) 0%, var(--forest) 62%);
  color: var(--cream); text-align: center;
  padding: max(26px, env(safe-area-inset-top)) 16px 58px;
}
.lg-mark { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0,0,0,.35)); }
.lg-brand { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: rgba(246,242,232,.72); }
.lg-head h1 { margin: 10px 0 4px; font-size: 24px; font-weight: 900; line-height: 1.45; letter-spacing: -.2px; }
.lg-meta { margin: 0; font-size: 12.5px; font-weight: 600; color: rgba(246,242,232,.7); }

/* التبديلُ بين الصفحتين */
.lg-switch {
  display: inline-flex; gap: 4px; margin-top: 18px; padding: 4px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(246,242,232,.18); border-radius: 999px;
}
.lg-switch a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px;
  color: rgba(246,242,232,.82); text-decoration: none; font-weight: 800; font-size: 13.5px;
}
.lg-switch a[aria-current="page"] { background: var(--gold); color: #20301f; }

/* ── سطحُ القراءة ── */
.lg-main { max-width: 780px; margin: -38px auto 0; padding: 0 16px 40px; }
.lg-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 10px 30px rgba(30,58,47,.08); padding: 22px 20px 26px;
}
@media (min-width: 640px) { .lg-card { padding: 30px 36px 34px; } }

/* باختصار */
.lg-tldr {
  background: #eef6f0; border: 1px solid #cfe5d6; border-radius: 16px; padding: 14px 16px; margin-bottom: 22px;
}
.lg-tldr b.t { display: block; font-size: 14px; font-weight: 900; color: var(--forest); margin-bottom: 6px; }
.lg-tldr ul { margin: 0; padding: 0 18px 0 0; }
.lg-tldr li { font-size: 14px; line-height: 1.85; margin: 2px 0; }

/* فهرسُ الأقسام */
.lg-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.lg-card .lg-toc li { margin: 0; flex: none; }   /* لا يرث هامشَ قوائم النصّ — كان يباعد صفوفَ الفهرس */
/* 📱 الهاتف: شريطٌ واحدٌ يُمرَّر أفقياً (كان يلتفّ أربعةَ أسطر) — التمريرُ داخل الشريط لا الصفحة */
@media (max-width: 639px) {
  .lg-toc { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 8px; padding: 2px 20px 8px; scrollbar-width: none; }
  .lg-toc::-webkit-scrollbar { display: none; }
}
.lg-toc a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border-radius: 999px;
  background: var(--cream); border: 1px solid var(--line); color: var(--forest);
  font-size: 12.5px; font-weight: 800; text-decoration: none;
}

/* الأقسام */
.lg-card h2 {
  position: relative; margin: 30px 0 10px; padding-right: 14px;
  font-size: 18px; font-weight: 900; color: var(--forest); line-height: 1.6; scroll-margin-top: 16px;
}
.lg-card h2::before {
  content: ""; position: absolute; right: 0; top: .32em; bottom: .32em; width: 4px; border-radius: 4px; background: var(--gold);
}
.lg-card p { margin: 0 0 12px; }
.lg-card ul, .lg-card ol { margin: 0 0 12px; padding: 0 22px 0 0; }
.lg-card li { margin: 6px 0; }
.lg-card strong { font-weight: 800; color: #17291f; }
.lg-card a { color: var(--forest); font-weight: 700; }

/* الشروطُ مرقّمة ببطاقاتٍ خفيفة */
.lg-terms { list-style: none; padding: 0; margin: 0; counter-reset: t; }
.lg-terms > li {
  counter-increment: t; position: relative; margin: 0 0 12px; padding: 14px 16px 14px 16px; padding-right: 52px;
  background: #fffaf0; border: 1px solid var(--line); border-radius: 14px; scroll-margin-top: 16px;
}
.lg-terms > li::before {
  content: counter(t); position: absolute; right: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); color: var(--cream); font-size: 13px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.lg-terms > li > b.h { display: block; color: var(--forest); font-size: 15.5px; font-weight: 900; margin-bottom: 2px; }

/* جدولُ «ما نجمعه» — جدولٌ على الحاسوب وبطاقاتٌ على الهاتف */
.lg-data { width: 100%; border-collapse: separate; border-spacing: 0; margin: 6px 0 14px; font-size: 14px; }
.lg-data th, .lg-data td { text-align: right; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); line-height: 1.75; }
.lg-data th { background: var(--cream); color: var(--forest); font-weight: 900; font-size: 13px; }
.lg-data th:first-child { border-radius: 0 12px 0 0; } .lg-data th:last-child { border-radius: 12px 0 0 0; }
.lg-req { display: inline-block; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.lg-req.yes { background: #e6f4ea; color: #1e6b35; }
.lg-req.opt { background: #eef0f7; color: #3c4a78; }
@media (max-width: 639px) {
  .lg-data thead { display: none; }
  .lg-data, .lg-data tbody, .lg-data tr, .lg-data td { display: block; width: 100%; }
  .lg-data tr { background: #fffaf0; border: 1px solid var(--line); border-radius: 14px; padding: 6px 4px; margin-bottom: 10px; }
  /* اسمُ الخانة بجانب قيمتها لا فوقها — كانت البطاقةُ خمسةَ أسطرٍ متراكبة (11 بطاقة ⇒ طولٌ مُتعب) */
  /* 🔑 الاسمُ مثبَّتٌ يميناً والقيمةُ نصٌّ متّصل — لا grid: خليّةٌ فيها شارةٌ ونصّ تصير عنصرين فينضغط النصُّ كلمةً في كلّ سطر */
  .lg-data td { border: 0; position: relative; padding: 3px 104px 3px 12px; }
  .lg-data td::before { content: attr(data-l); position: absolute; right: 12px; top: 5px; width: 84px; font-size: 11.5px; font-weight: 800; color: var(--muted); line-height: 1.75; }
  .lg-data td:first-child { padding: 3px 12px 6px; }
  .lg-data td:first-child { font-weight: 900; color: var(--forest); font-size: 15px; }
  .lg-data td:first-child::before { display: none; }
}

/* مقطعٌ بارز */
.lg-note { background: #fffaf0; border: 1px solid var(--line); border-right: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }

/* ⏳ خانةٌ تُستكمل قبل التفعيل — ظاهرةٌ عمداً (وبطاقةُ «التفعيل القانونيّ» في اللوحة تعدّ الباقيَ منها وتحذّر قبل التشغيل) */
mark.todo {
  background: var(--todo-bg); color: var(--todo-ink); border: 1px dashed var(--todo-line);
  border-radius: 8px; padding: 1px 7px; font-weight: 800; font-size: .92em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
mark.todo::before { content: "⏳ "; }

/* عناوينُ لاتينية (بريد · أسماءُ خدمات) داخل نصٍّ عربيّ */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ── ⚖️ حالتا المفتاح (الصنفُ على <html> من legal.js) — الافتراضُ بلا صنف: النصُّ ظاهر (قارئٌ بلا JS والزواحف) ── */
.lg-unavail { display: none; max-width: 520px; margin: -38px auto 0; padding: 0 16px 48px; text-align: center; }
.lg-unavail > * { position: relative; }
.lg-un-ic { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 34px; box-shadow: 0 10px 26px rgba(30,58,47,.14); }
.lg-unavail h2 { margin: 0 0 6px; font-size: 20px; font-weight: 900; color: var(--forest); line-height: 1.6; }
.lg-unavail p { margin: 0 0 20px; color: var(--muted); font-weight: 600; }
.lg-wait .lg-main, .lg-wait .lg-switch, .lg-wait .lg-meta { visibility: hidden; }   /* لحظةُ القراءة: لا وميضَ نصٍّ ثمّ اختفاؤه */
.lg-off .lg-main, .lg-off .lg-switch, .lg-off .lg-meta, .lg-err .lg-main, .lg-err .lg-switch, .lg-err .lg-meta { display: none; }
.lg-off .lg-un-off, .lg-err .lg-un-err { display: block; }
.lg-un-err .lg-btn { cursor: pointer; }

/* ── التذييل ── */
.lg-foot { text-align: center; margin-top: 22px; font-size: 13px; color: var(--muted); }
.lg-foot .acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.lg-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
  border-radius: 13px; font-family: inherit; font-weight: 800; font-size: 14px; text-decoration: none;
  border: 1.5px solid transparent;
}
.lg-btn.primary { background: var(--forest); color: var(--cream); }
.lg-btn.ghost { background: transparent; color: var(--forest); border-color: var(--line); }
.lg-foot a.mail { color: var(--forest); font-weight: 800; display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; }   /* رابطُ البريد وحده في سطره ⇒ هدفُ لمسٍ مريح (قياسُ المعاينة) */

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: #fff; font-size: 12pt; }
  .lg-head { background: none; color: #000; padding: 0 0 8px; }
  .lg-head .lg-meta, .lg-brand { color: #333; }
  .lg-switch, .lg-toc, .lg-foot .acts { display: none; }
  .lg-main { margin: 0; max-width: none; padding: 0; }
  .lg-card { border: 0; box-shadow: none; padding: 0; }
}
