/* المرجع المعرفي للدكتور طارق السويدان: عرض الخطة الشاملة */

:root {
  --paper: #f6f2e9;
  --card: #fffdf8;
  --ink: #1b2230;
  --muted: #5b6474;
  --line: #ddd5c4;
  --navy: #14213a;
  --navy-2: #1f3054;
  --teal: #0e6b5e;
  --teal-2: #2f8a7b;
  --teal-soft: #e1eee8;
  --gold: #a8741f;
  --gold-soft: #f3e6cb;
  --red: #a2392f;
  --red-soft: #f5e0dc;
  --blue-soft: #e3e9f3;
  --gray-soft: #ebe7de;
  --head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0b111c;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body { direction: rtl; }

/* ---------- stage ---------- */

.viewport {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.deck {
  position: relative;
  width: 1600px;
  height: 900px;
  flex: none;
  transform-origin: center center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 64px 96px 96px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.slide.active { display: flex; }

/* ---------- running footer and progress ---------- */

.foot {
  position: absolute;
  left: 96px;
  right: 96px;
  bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.foot .pg { direction: ltr; font-variant-numeric: tabular-nums; }

.dark .foot, .section .foot, .cover .foot { border-top-color: rgba(255, 255, 255, .18); color: rgba(240, 233, 219, .7); }

.progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 4px;
  background: var(--gold);
  z-index: 20;
  transition: width .25s ease;
}

.controls {
  position: fixed;
  left: 14px;
  top: 14px;
  display: flex;
  gap: 8px;
  z-index: 20;
  opacity: .35;
  transition: opacity .2s ease;
}

.controls:hover { opacity: 1; }

.controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px;
  background: rgba(20, 33, 58, .85);
  color: #f3ead6;
  font-size: 20px;
  cursor: pointer;
}

.controls button:hover { background: var(--teal); }

/* ---------- type ---------- */

.kicker {
  font-family: var(--head);
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 12px;
}

.title {
  font-family: var(--head);
  font-size: 42px;
  line-height: 1.4;
  font-weight: 700;
  margin: 0 0 14px;
  max-width: 1380px;
}

.lead {
  font-size: 23px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 1300px;
}

.body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.note {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  margin: 16px 0 0;
}

.note strong { color: var(--ink); }

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- tables ---------- */

table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 19px;
  line-height: 1.55;
  background: var(--card);
}

.t th {
  background: var(--navy);
  color: #f6efe0;
  font-weight: 600;
  text-align: right;
  padding: 11px 16px;
  font-size: .92em;
}

.t td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.t td:first-child { font-weight: 600; }

.t .num { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t th.num { text-align: left; }

.t tr.total td { font-weight: 700; background: var(--gold-soft); border-top: 2px solid var(--ink); }
.t tr.soft td { background: #f8f4ea; }

.t.dense { font-size: 16px; line-height: 1.5; }
.t.dense td { padding: 7px 12px; }
.t.dense th { padding: 9px 12px; }

.t.xdense { font-size: 14.5px; line-height: 1.45; }
.t.xdense td { padding: 6px 10px; }
.t.xdense th { padding: 8px 10px; }

.t a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(14, 107, 94, .35); }

.lvl { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82em; font-weight: 700; white-space: nowrap; }
.lvl.hi { background: var(--red-soft); color: var(--red); }
.lvl.md { background: var(--gold-soft); color: var(--gold); }
.lvl.lo { background: var(--teal-soft); color: var(--teal); }

/* ---------- cards and grids ---------- */

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

.card h3 {
  font-family: var(--head);
  font-size: 21px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.card p, .card li { font-size: 17.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.card ul { margin: 0; padding: 0 20px 0 0; }
.card li + li { margin-top: 4px; }

.card .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: var(--head);
  font-size: 16px;
  margin-bottom: 10px;
}

.card.accent { border: 2px solid var(--teal); background: var(--teal-soft); }
.card.warn { border-color: #e6c3bd; background: #fbf1ef; }
.card.gold { border-color: #e2cc9f; background: #fbf5e8; }
.card.ink { background: var(--navy); border-color: var(--navy); }
.card.ink h3 { color: #f6efe0; }
.card.ink p, .card.ink li { color: #c8d0dc; }

.strip { border-right: 6px solid var(--teal); }
.strip.gold { border-right-color: var(--gold); }
.strip.red { border-right-color: var(--red); }
.strip.blue { border-right-color: #3d5c94; }
.strip.gray { border-right-color: #8b8577; }

/* ---------- stats ---------- */

.stats { display: grid; gap: 18px; margin-bottom: 26px; }

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
}

.stat .v {
  font-family: var(--head);
  font-size: 38px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.3;
}

.stat .v .ltr { direction: ltr; }
.stat .l { font-size: 16.5px; line-height: 1.6; color: var(--muted); margin-top: 4px; }

/* ---------- lists ---------- */

ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }

ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 14px 70px 14px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 19px;
  line-height: 1.65;
}

ol.steps li::before {
  content: counter(s);
  position: absolute;
  right: 18px;
  top: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: var(--head);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

ol.steps.two { grid-template-columns: 1fr 1fr; }
ol.steps.tight li { padding-top: 10px; padding-bottom: 10px; font-size: 17.5px; }
ol.steps.tight li::before { top: 10px; }

.owner {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  vertical-align: 2px;
}

/* ---------- figures ---------- */

.fig { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.fig svg { width: 100%; height: 100%; max-height: 100%; }

.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; flex: 1; min-height: 0; }
.split.even { grid-template-columns: 1fr 1fr; }
.split.wide { grid-template-columns: 1.7fr 1fr; }

/* ---------- cover, sections, dark ---------- */

.cover, .section, .dark { color: #f3ead6; }

.cover {
  background:
    linear-gradient(270deg, rgba(14, 22, 40, .97) 0%, rgba(14, 22, 40, .9) 46%, rgba(14, 22, 40, .45) 100%),
    var(--img, none) center / cover no-repeat,
    linear-gradient(135deg, #14213a, #0e3a40);
  justify-content: center;
}

.cover-inner { max-width: 980px; }
.cover .kicker { color: #d9b26a; }

.cover-title {
  font-family: var(--head);
  font-size: 68px;
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 24px;
}

.cover-sub { font-size: 26px; line-height: 1.75; color: #cfd6e0; margin: 0 0 48px; max-width: 900px; }

.cover-meta { display: flex; gap: 56px; font-size: 19px; }
.cover-meta span { display: block; font-size: 15px; color: #d9b26a; margin-bottom: 4px; font-weight: 600; }

.section {
  background:
    linear-gradient(270deg, rgba(14, 22, 40, .96) 0%, rgba(14, 22, 40, .82) 50%, rgba(14, 22, 40, .35) 100%),
    var(--img, none) center / cover no-repeat,
    linear-gradient(135deg, #14213a, #10403d);
  justify-content: center;
}

.section.money {
  background:
    radial-gradient(circle at 15% 80%, rgba(168, 116, 31, .45), transparent 55%),
    linear-gradient(135deg, #14213a, #2a2414);
}

.section.decide {
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 107, 94, .5), transparent 55%),
    linear-gradient(135deg, #14213a, #0f2b33);
}

.section .num {
  font-family: var(--head);
  font-size: 22px;
  color: #d9b26a;
  margin-bottom: 18px;
}

.section h1 {
  font-family: var(--head);
  font-size: 64px;
  line-height: 1.35;
  margin: 0 0 18px;
}

.section p { font-size: 26px; line-height: 1.7; color: #cfd6e0; margin: 0; max-width: 860px; }

.section ul.toc { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 10px; font-size: 20px; color: #e5dcc8; }
.section ul.toc li::before { content: "◂ "; color: #d9b26a; }

.dark { background: var(--navy); }
.dark .kicker { color: #d9b26a; }
.dark .lead { color: #c8d0dc; }

.closing {
  background:
    linear-gradient(270deg, rgba(14, 22, 40, .95) 0%, rgba(14, 22, 40, .75) 60%, rgba(14, 22, 40, .5) 100%),
    var(--img, none) center / cover no-repeat,
    linear-gradient(135deg, #14213a, #0e3a40);
  justify-content: center;
  color: #f3ead6;
}

.closing blockquote {
  font-family: var(--head);
  font-size: 46px;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 1100px;
}

/* ---------- special blocks ---------- */

.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.level { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; border-top: 6px solid var(--teal); }
.level.l4 { border-top-color: #3d5c94; }
.level.l5 { border-top-color: var(--gold); }
.level.l6 { border-top-color: #8b8577; }
.level .tag { font-family: var(--head); font-size: 15px; color: var(--muted); }
.level h3 { font-family: var(--head); font-size: 22px; margin: 4px 0 8px; }
.level p { margin: 0; font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.level .says { margin-top: 10px; padding: 8px 12px; background: var(--paper); border-radius: 8px; font-size: 16px; color: var(--ink); }

.tree { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; align-items: stretch; }
.tree .root { grid-column: 1 / -1; }
.tree .core { grid-column: 1 / -1; }
.arrow-down { grid-column: 1 / -1; text-align: center; color: var(--teal); font-size: 26px; line-height: 1; margin: -6px 0; }

.callout {
  background: var(--navy);
  color: #f3ead6;
  border-radius: 14px;
  padding: 18px 24px;
  font-size: 19px;
  line-height: 1.7;
}

.callout strong { color: #e4bf78; }

.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: 15px; }

.sources { columns: 2; column-gap: 48px; font-size: 16px; line-height: 1.6; margin: 0; padding: 0 20px 0 0; }
.sources li { break-inside: avoid; margin-bottom: 6px; color: var(--muted); }
.sources a { color: var(--teal); text-decoration: none; }

/* ---------- print: one slide per page ---------- */

@media print {
  @page { size: 1600px 900px; margin: 0; }
  html, body { background: #fff; height: auto; }
  .viewport { position: static; display: block; overflow: visible; }
  .deck { transform: none !important; width: 1600px; height: auto; box-shadow: none; }
  .slide { display: flex !important; position: relative; width: 1600px; height: 900px; page-break-after: always; break-after: page; }
  .controls, .progress { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
