/* مبادرة وثيقة التوافق الوطني — الأنماط العامة */
:root {
  --green-950: #142a18;
  --green-900: #1c3a21;
  --green-800: #24482a;
  --green-700: #2f6233;
  --green-500: #5f8a5f;
  --green-100: #e6eee3;
  --gold-700: #8a6332;
  --gold-600: #a3743f;
  --gold-400: #c9a36f;
  --gold-100: #f4ebdd;
  --sand: #faf7f1;
  --paper: #ffffff;
  --ink: #1b221d;
  --ink-2: #3d4740;
  --muted: #69736b;
  --line: #e4ddd0;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(20 42 24 / .06), 0 8px 24px -12px rgb(20 42 24 / .18);
  --font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.95;
  color: var(--ink);
  background: var(--sand);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 4px; }
a:hover { color: var(--gold-700); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.5; color: var(--green-900); margin: 0 0 .6em; font-weight: 800; }
h3, h4 { font-weight: 600; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--green-800); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .6em 1.3em; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 1.5px solid transparent; transition: .2s ease; cursor: pointer; white-space: nowrap;
}
.btn--gold { background: var(--gold-600); color: #fff; }
.btn--gold:hover { background: var(--gold-700); color: #fff; }
.btn--green { background: var(--green-800); color: #fff; }
.btn--green:hover { background: var(--green-950); color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--green-800); background: transparent; }
.btn--ghost:hover { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.btn--light { border-color: rgb(255 255 255 / .6); color: #fff; }
.btn--light:hover { background: #fff; color: var(--green-900); }

/* ---------- الترويسة ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-800); flex-shrink: 0; }
.brand__mark { position: relative; width: 64px; height: 48px; display: grid; place-items: center; }
.brand__brackets { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand__brackets path { fill: none; stroke: var(--green-700); stroke-width: 5; stroke-linecap: round; }
.brand__brackets circle { fill: var(--gold-600); }
.brand__mark img { width: 38px; height: auto; position: relative; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; font-family: var(--font-head); }
.brand__text span { font-size: .78rem; font-weight: 600; color: var(--green-700); }
.brand__text strong { font-size: .98rem; font-weight: 800; color: var(--gold-700); }

.nav { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list > li > a, .nav__toggle {
  display: block; padding: 8px 12px; border-radius: 10px;
  font: 600 .95rem/1.6 var(--font); color: var(--ink-2); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.nav__list > li > a:hover, .nav__toggle:hover { background: var(--green-100); color: var(--green-900); }
.nav__list > li > a[aria-current], .nav__toggle[data-active] { color: var(--green-700); box-shadow: inset 0 -2px 0 var(--gold-600); border-radius: 10px 10px 0 0; }
.nav__toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 8px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-3px) rotate(-45deg); }
.has-sub { position: relative; }
.nav__sub {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 260px;
  list-style: none; margin: 0; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .18s ease;
}
.nav__sub--wide { min-width: 300px; }
.has-sub.open .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.5; }
.nav__sub a small { display: block; font-size: .75rem; color: var(--gold-700); font-weight: 500; }
.nav__sub a:hover { background: var(--sand); }
.menu-btn { display: none; }

@media (max-width: 1080px) {
  .menu-btn {
    display: grid; place-items: center; margin-inline-start: auto;
    width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  }
  .menu-btn span:first-child, .menu-btn span:first-child::before, .menu-btn span:first-child::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--green-900); border-radius: 2px; position: relative; transition: .2s;
  }
  .menu-btn span:first-child::before { position: absolute; top: -6px; }
  .menu-btn span:first-child::after { position: absolute; top: 6px; }
  .menu-btn[aria-expanded="true"] span:first-child { background: transparent; }
  .menu-btn[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }

  .nav {
    position: fixed; inset: 77px 0 0 0; background: #fff;
    flex-direction: column; align-items: stretch; gap: 16px; padding: 16px;
    overflow-y: auto; display: none;
  }
  .nav.open { display: flex; }
  .nav__list { flex-direction: column; }
  .nav__list > li > a, .nav__toggle { width: 100%; text-align: start; font-size: 1.05rem; padding: 12px; }
  .nav__toggle::after { float: left; margin-top: 12px; }
  .nav__sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; display: none; padding: 0 12px 8px; background: var(--sand); }
  .has-sub.open .nav__sub { display: block; }
  .nav__cta { justify-content: center; }
}

/* ---------- البطل في الرئيسية ---------- */
.hero { position: relative; background: var(--green-900); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/hero-cover.jpg") center / cover no-repeat;
  opacity: .35;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(20 42 24 / .55), rgb(20 42 24 / .95)),
    repeating-linear-gradient(135deg, rgb(255 255 255 / .025) 0 2px, transparent 2px 18px);
}
.hero__inner { padding: clamp(64px, 11vw, 140px) 0 clamp(56px, 8vw, 100px); max-width: 820px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 700; color: var(--gold-400); letter-spacing: 0; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.35; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgb(255 255 255 / .86); max-width: 680px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgb(255 255 255 / .12); border-radius: var(--radius); overflow: hidden; margin-top: 56px; }
.hero__stats div { background: rgb(20 42 24 / .7); padding: 18px 20px; }
.hero__stats strong { display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 3.6vw, 2.2rem); color: var(--gold-400); line-height: 1.3; }
.hero__stats span { font-size: .88rem; color: rgb(255 255 255 / .78); line-height: 1.6; display: block; }
@media (max-width: 720px) { .hero__stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- الأقسام ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--white { background: var(--paper); }
.section--green { background: var(--green-900); color: rgb(255 255 255 / .88); }
.section--green h2, .section--green h3 { color: #fff; }
.section__head { max-width: 720px; margin-bottom: 40px; }
.section__head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section__head p { color: var(--muted); font-size: 1.08rem; }
.section--green .section__head p { color: rgb(255 255 255 / .72); }
.section--green .eyebrow { color: var(--gold-400); }
.eyebrow--dark { color: var(--gold-700); }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); position: relative;
}
.card h3 { font-size: 1.15rem; margin-bottom: .5em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card--accent { border-top: 4px solid var(--gold-600); }
.card__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-700); margin-bottom: 16px; }
.card__icon svg { width: 24px; height: 24px; }

a.card { text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
a.card:hover { transform: translateY(-3px); border-color: var(--gold-400); box-shadow: 0 16px 40px -18px rgb(20 42 24 / .35); }
.card__num { font-family: var(--font-head); font-weight: 800; font-size: .8rem; color: var(--gold-700); }
.card__more { margin-top: auto; padding-top: 14px; font-weight: 700; color: var(--green-700); font-size: .92rem; }
.card__more::after { content: " ←"; }

/* ---------- الخط الزمني ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: ph; position: relative; }
.timeline::before { content: ""; position: absolute; top: 27px; inset-inline: 12%; height: 2px; background: linear-gradient(to left, var(--gold-400), rgb(255 255 255 / .2)); }
.timeline li { position: relative; }
.timeline__dot {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--green-800); border: 2px solid var(--gold-400); color: var(--gold-400);
  font: 800 1.1rem var(--font-head); position: relative;
}
.timeline li.is-current .timeline__dot { background: var(--gold-600); color: #fff; border-color: var(--gold-400); box-shadow: 0 0 0 6px rgb(201 163 111 / .2); }
.timeline__when { font-size: .85rem; color: var(--gold-400); font-weight: 700; }
.timeline h3 { font-size: 1.15rem; margin: 2px 0 8px; }
.timeline p { font-size: .95rem; color: rgb(255 255 255 / .74); line-height: 1.85; margin-bottom: 12px; }
.timeline a { color: #fff; font-weight: 700; font-size: .92rem; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { top: 0; bottom: 0; inset-inline: auto; inset-inline-start: 27px; width: 2px; height: auto; background: linear-gradient(to bottom, var(--gold-400), rgb(255 255 255 / .2)); }
  .timeline li { padding-inline-start: 80px; padding-bottom: 28px; }
  .timeline__dot { position: absolute; inset-inline-start: 0; top: 0; }
}

/* ---------- ترويسة الصفحات الداخلية ---------- */
.page-hero { background: var(--green-900); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 120% at 0% 0%, rgb(163 116 63 / .28), transparent 60%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / .03) 0 2px, transparent 2px 18px);
}
.page-hero__inner { padding: clamp(40px, 7vw, 76px) 0 clamp(36px, 6vw, 60px); max-width: 860px; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 4.2vw, 2.7rem); margin-bottom: 14px; }
.page-hero p { color: rgb(255 255 255 / .82); font-size: 1.1rem; margin: 0; max-width: 720px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .88rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 6px; color: rgb(255 255 255 / .4); }
.crumbs a { color: var(--gold-400); text-decoration: none; }
.crumbs li:last-child { color: rgb(255 255 255 / .7); }
.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 14px; border-radius: 999px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .16); font-size: .88rem; color: #fff; }
.chip b { color: var(--gold-400); font-weight: 700; }

/* ---------- المقال ---------- */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; padding: clamp(36px, 6vw, 64px) 0 40px; align-items: start; }
.article-wrap--full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) { .article-wrap { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { max-width: 780px; min-width: 0; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-top: 2.2em; padding-top: .2em; position: relative; }
.prose h2:first-child { margin-top: 0; }
.prose h2::before { content: ""; display: block; width: 40px; height: 3px; background: var(--gold-600); border-radius: 2px; margin-bottom: 14px; }
.prose h3 { font-size: 1.18rem; margin-top: 1.8em; color: var(--green-800); }
.prose h4 { font-size: 1.05rem; margin-top: 1.4em; color: var(--gold-700); }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--gold-600); font-weight: 700; }
.prose strong { color: var(--green-900); }
.prose .lead { font-size: 1.15rem; color: var(--ink-2); }
.prose sup a { text-decoration: none; font-weight: 700; font-size: .75em; padding: 0 2px; color: var(--gold-700); }

.callout { background: var(--gold-100); border-inline-start: 4px solid var(--gold-600); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.6em 0; }
.callout p:last-child { margin: 0; }
.callout--green { background: var(--green-100); border-color: var(--green-700); }

.defs { display: grid; gap: 14px; margin: 1.2em 0 1.6em; }
.def { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.def h4, .def h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--green-800); }
.def p:last-child, .def ul:last-child { margin-bottom: 0; }
.def--vs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.def--vs > div { padding: 18px 22px; }
.def--vs > div + div { border-inline-start: 1px solid var(--line); background: var(--sand); }
.def--vs .def__title { grid-column: 1 / -1; background: var(--green-800); color: #fff; padding: 12px 22px; font: 600 1.02rem var(--font-head); }
@media (max-width: 640px) { .def--vs { grid-template-columns: 1fr; } .def--vs > div + div { border-inline-start: 0; border-top: 1px solid var(--line); } }

.options { list-style: none; padding: 0 !important; margin: 1em 0 1.6em; display: grid; gap: 12px; counter-reset: opt; }
.options li { counter-increment: opt; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 16px 20px; padding-inline-start: 64px; position: relative; margin: 0; }
.options li::before {
  content: counter(opt); position: absolute; inset-inline-start: 18px; top: 16px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-800); color: #fff; font: 700 .9rem var(--font-head);
}
.options li strong { display: block; color: var(--green-900); }
.options li.is-top { border-color: var(--gold-400); background: linear-gradient(0deg, var(--paper), var(--gold-100)); }
.options li.is-top::before { background: var(--gold-600); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 10px; border-radius: 999px; background: var(--gold-600); color: #fff; margin-inline-start: 6px; vertical-align: middle; }

/* أشرطة النسب */
.bars { display: grid; gap: 14px; margin: 1.2em 0 1.8em; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.bars__title { font: 600 1rem var(--font-head); color: var(--green-900); margin: 0 0 4px; }
.bar { display: grid; grid-template-columns: 150px 1fr 58px; gap: 12px; align-items: center; font-size: .93rem; }
.bar__track { height: 12px; background: var(--sand); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar__fill { height: 100%; background: var(--green-700); border-radius: 999px; }
.bar__fill--gold { background: var(--gold-600); }
.bar__fill--grey { background: #a9b0aa; }
.bar__val { font-weight: 700; color: var(--green-900); text-align: end; font-variant-numeric: tabular-nums; }
.bars__note { font-size: .85rem; color: var(--muted); margin: 0; }
@media (max-width: 560px) { .bar { grid-template-columns: 1fr 52px; } .bar__label { grid-column: 1 / -1; } .bar__track { grid-column: 1; } }

/* الجداول */
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.8em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.75; }
caption { caption-side: top; text-align: start; padding: 14px 18px; font: 600 1rem var(--font-head); color: var(--green-900); border-bottom: 1px solid var(--line); }
th, td { padding: 12px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--green-800); color: #fff; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fcfbf8; }
td.num, th.num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.idx { width: 44px; text-align: center; font-weight: 700; color: var(--gold-700); }
.tag { display: inline-block; font-size: .8rem; padding: 1px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-800); font-weight: 700; white-space: nowrap; }
.tag--mil { background: #efe6d8; color: var(--gold-700); }
.tag--soc { background: #e8eef3; color: #34536b; }
.tag--eco { background: #f1e9f1; color: #6a3f69; }
.tag--rel { background: #f3ebdc; color: #7a5520; }

/* جدول القضايا التوافقية */
.consensus-list { display: grid; gap: 16px; counter-reset: c; margin: 1.4em 0 2em; }
.consensus { display: grid; grid-template-columns: 56px 1fr; gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.consensus__n { background: var(--green-800); color: var(--gold-400); font: 800 1.2rem var(--font-head); display: grid; place-items: center; }
.consensus__body { padding: 18px 22px; }
.consensus__text { font: 600 1.08rem/1.9 var(--font); color: var(--green-900); margin: 0 0 10px; }
.consensus__why { font-size: .94rem; color: var(--ink-2); margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.consensus__why b { color: var(--gold-700); }

/* الرسالة */
.letter { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); position: relative; box-shadow: var(--shadow); }
.letter::before { content: "”"; position: absolute; top: -10px; inset-inline-end: 24px; font: 800 6rem/1 var(--font-head); color: var(--gold-100); }
.letter ol { list-style: none; padding: 0 !important; counter-reset: l; }
.letter ol li { counter-increment: l; position: relative; padding-inline-start: 44px; margin-bottom: 1em; }
.letter ol li::before { content: counter(l); position: absolute; inset-inline-start: 0; top: 4px; width: 28px; height: 28px; border-radius: 8px; background: var(--gold-100); color: var(--gold-700); font: 700 .85rem var(--font-head); display: grid; place-items: center; }
.letter__sign { text-align: end; font: 600 1rem var(--font-head); color: var(--green-800); margin: 1.4em 0 0; }

/* قائمة الأسماء */
.people { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 1em 0 1.6em; }
.people li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; display: flex; gap: 10px; align-items: baseline; }
.people li small { color: var(--gold-700); font-weight: 600; }

/* الحواشي */
.footnotes { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); line-height: 1.85; }
.footnotes h2 { font-size: 1rem !important; margin: 0 0 .8em !important; color: var(--ink-2); }
.footnotes h2::before { display: none !important; }
.footnotes ol { padding-inline-start: 1.4em; }
.footnotes li:target { background: var(--gold-100); border-radius: 6px; }
.footnotes a.back { text-decoration: none; margin-inline-start: 4px; }

/* فهرس جانبي */
.toc { position: sticky; top: 100px; font-size: .92rem; }
.toc__title { font: 600 .85rem var(--font-head); color: var(--gold-700); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.toc a { display: block; padding: 6px 14px; margin-inline-start: -2px; border-inline-start: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.6; }
.toc a:hover { color: var(--green-800); }
.toc a.is-active { color: var(--green-800); border-color: var(--gold-600); font-weight: 700; }
.toc__pdf { margin-top: 22px; padding: 16px; border-radius: var(--radius); background: var(--green-100); }
.toc__pdf p { margin: 0 0 10px; font-size: .88rem; line-height: 1.7; color: var(--ink-2); }

/* التنقل بين الصفحات */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 64px; }
.pager a { display: block; padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font: 600 1.05rem var(--font-head); color: var(--green-900); transition: .2s; }
.pager a:hover { border-color: var(--gold-400); }
.pager small { display: block; font: 500 .82rem var(--font); color: var(--gold-700); margin-bottom: 4px; }
.pager__next { text-align: end; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } }

/* بطاقة تحميل */
.download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(28px, 4vw, 44px); border-radius: 20px; background: linear-gradient(120deg, var(--green-800), var(--green-950)); color: #fff; }
.download h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.download p { margin: 0; color: rgb(255 255 255 / .75); }

/* الجهات */
.org { display: flex; gap: 18px; align-items: flex-start; }
.org__logo { flex-shrink: 0; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--green-100); color: var(--green-800); font: 800 1.3rem var(--font-head); }
.org__logo--gold { background: var(--gold-100); color: var(--gold-700); }
.org h3 { margin-bottom: 4px; }
.org p { color: var(--ink-2); font-size: .98rem; }

/* أرقام بسيطة */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 1.2em 0 1.8em; }
.figure { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.figure strong { display: block; font: 800 1.7rem/1.3 var(--font-head); color: var(--green-700); }
.figure span { font-size: .9rem; color: var(--muted); line-height: 1.6; display: block; }

/* التذييل */
.footer { background: var(--green-950); color: rgb(255 255 255 / .72); padding: 56px 0 0; font-size: .95rem; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer .brand__text span { color: #b9d0b6; }
.footer .brand__text strong { color: var(--gold-400); }
.footer .brand__brackets path { stroke: #7fae7f; }
.footer__about { margin-top: 16px; max-width: 420px; line-height: 1.9; }
.footer__h { font-size: .95rem; color: var(--gold-400); margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; }
.footer a { color: rgb(255 255 255 / .8); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0; border-top: 1px solid rgb(255 255 255 / .1); font-size: .88rem; }
@media (max-width: 860px) { .footer__inner { grid-template-columns: 1fr; gap: 28px; } }

@media print {
  .header, .footer, .toc, .pager, .menu-btn { display: none !important; }
  .page-hero { background: none; color: #000; }
  .page-hero h1 { color: #000; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.prose > .def { margin: 1.2em 0 1.6em; }
.options li a { display: inline-block; margin-top: 6px; font-weight: 700; }

/* على الشاشات الصغيرة: إلغاء ضبابية الترويسة حتى لا تحتجز القائمة الثابتة */
@media (max-width: 1080px) {
  .header { backdrop-filter: none; background: #fff; }
}
.table-wrap--mid table { min-width: 560px; }

/* ---------- الدراسة البحثية ---------- */
.footer__inner { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
@media (max-width: 960px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__inner { grid-template-columns: 1fr; } }

.page-hero--img { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.page-hero__img { width: 180px; aspect-ratio: 271 / 302; object-fit: cover; border-radius: var(--radius); margin-bottom: clamp(36px, 6vw, 60px); border: 3px solid rgb(255 255 255 / .15); }
@media (max-width: 700px) { .page-hero__img { display: none; } .page-hero--img { grid-template-columns: 1fr; } }

/* حكم الدراسة على القضية */
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius); margin: 1.2em 0 1.6em; background: var(--green-100); border: 1px solid #cddcc9; }
.verdict::before { content: "✓"; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green-700); color: #fff; font-weight: 700; font-size: .85rem; margin-top: 4px; }
.verdict p { margin: 0; }
.verdict--disagree { background: var(--gold-100); border-color: #ead9bf; }
.verdict--disagree::before { content: "!"; background: var(--gold-600); }

/* شبكة صور المحاور */
.axes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .axes-grid { grid-template-columns: 1fr; } }
.axis-card { display: grid; grid-template-columns: 1fr 140px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; min-height: 156px; }
.axis-card:hover { transform: translateY(-3px); border-color: var(--gold-400); }
.axis-card img { width: 100%; height: 100%; object-fit: cover; }
.axis-card__body { padding: 20px 22px; display: flex; flex-direction: column; }
.axis-card__body small { color: var(--gold-700); font-weight: 700; font-size: .82rem; }
.axis-card__body h3 { font-size: 1.12rem; margin: 2px 0 6px; }
.axis-card__body p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.8; }

.doc-list { display: grid; gap: 12px; list-style: none; padding: 0 !important; }
.doc-list li { margin: 0; }
.doc { display: flex; gap: 16px; align-items: center; padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.doc__icon { flex-shrink: 0; width: 44px; height: 52px; border-radius: 6px; background: #b8432f; color: #fff; display: grid; place-items: center; font: 700 .72rem var(--font); }
.doc__body { flex: 1; min-width: 0; }
.doc__body strong { display: block; color: var(--green-900); }
.doc__body span { font-size: .88rem; color: var(--muted); }
.doc__links { display: flex; gap: 8px; flex-wrap: wrap; }
.doc__links .btn { padding: .4em 1em; font-size: .85rem; }
@media (max-width: 600px) { .doc { flex-wrap: wrap; } .doc__links { width: 100%; } }

.org__logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; background: #fff; }
.table-wrap--wide table { min-width: 760px; font-size: .88rem; }
.chart { margin: 1.2em 0 1.8em; }

#timeline { position: relative; isolation: isolate; }
#timeline::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/stairs.jpg") center / cover no-repeat; opacity: .22; }
.axis-card .card__more { margin-top: auto; }

/* ---------- الحركة ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes kenburns { from { transform: scale(1.12) translate(1.5%, 1%); } to { transform: scale(1) translate(0, 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(201 163 111 / .55); } 70% { box-shadow: 0 0 0 16px rgb(201 163 111 / 0); } 100% { box-shadow: 0 0 0 0 rgb(201 163 111 / 0); } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: no-preference) {
  /* الواجهة */
  .hero::before { animation: kenburns 18s ease-out both; }
  .hero__inner > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__inner > :nth-child(1) { animation-delay: .1s; }
  .hero__inner > :nth-child(2) { animation-delay: .25s; }
  .hero__inner > :nth-child(3) { animation-delay: .4s; }
  .hero__inner > :nth-child(4) { animation-delay: .55s; }
  .hero__inner > :nth-child(5) { animation-delay: .75s; }
  .hero h1 em {
    background: linear-gradient(100deg, var(--gold-400) 40%, #f3dcb4 50%, var(--gold-400) 60%) 0 0 / 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shimmer 6s 1.4s ease-in-out infinite;
  }
  .page-hero__inner > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .page-hero__inner > :nth-child(2) { animation-delay: .1s; }
  .page-hero__inner > :nth-child(3) { animation-delay: .2s; }
  .page-hero__inner > :nth-child(4) { animation-delay: .3s; }
  .page-hero__img { animation: rise .9s .25s cubic-bezier(.2, .7, .2, 1) both; }

  /* الظهور عند التمرير */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }

  /* الخط الزمني */
  .timeline li.is-current .timeline__dot { animation: pulse 2.4s ease-out infinite; }
  .js .timeline::before { transform-origin: right; transform: scaleX(0); transition: transform 1.6s .2s cubic-bezier(.2, .7, .2, 1); }
  .js .timeline.is-in::before { transform: scaleX(1); }
  @media (max-width: 900px) { .js .timeline::before { transform-origin: top; transform: scaleY(0); } .js .timeline.is-in::before { transform: scaleY(1); } }

  /* صور المحاور */
  .axis-card img { transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
  .axis-card:hover img { transform: scale(1.07); }
  .card__more::after { display: inline-block; transition: transform .25s; }
  a.card:hover .card__more::after, .axis-card:hover .card__more::after { transform: translateX(-5px); }
  .btn { transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgb(20 42 24 / .5); }
}
