@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-latin-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Noto Naskh";
  src: url("../fonts/NotoNaskhArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --ink: #1c1914;
  --muted: #5e564c;
  --green: #14362d;
  --green-2: #1d4a3c;
  --gold: #8a6730;
  --gold-2: #c6a15a;
  --cream: #f4efe4;
  --paper: #fbf7f0;
  --terra: #8a3d2c;
  --line: rgba(20, 54, 45, 0.16);
}

@page {
  size: 338mm 190mm;
  margin: 0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #241f1b;
  color: var(--ink);
  font-family: "Source Serif 4", "Noto Serif", serif;
  font-size: 14.5pt;
  line-height: 1.38;
  counter-reset: slide;
}

.screenbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #14362d;
  color: #f6f1e6;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.screenbar a { color: #e6c98a; }

.sheet {
  width: 338mm;
  height: 190mm;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  counter-increment: slide;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(198, 161, 90, 0.14), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(20, 54, 45, 0.05), transparent 24%);
  padding: 9mm 12mm 11mm;
  page-break-after: always;
  break-after: page;
}
.sheet:last-child { page-break-after: auto; break-after: auto; }
.teacher-only { counter-increment: none; }

.sheet::before, .sheet::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.sheet::before {
  inset: 4.2mm;
  border: 1px solid rgba(138, 103, 48, 0.5);
}
.sheet::after {
  inset: 5.3mm;
  border: 1px solid rgba(20, 54, 45, 0.14);
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8mm;
  font-family: Manrope, sans-serif;
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 2.5mm;
}

h2 {
  font-family: Literata, serif;
  font-weight: 600;
  font-size: 22pt;
  line-height: 1.12;
  color: var(--green);
  margin: 0 0 3mm;
  letter-spacing: -0.02em;
}

p { margin: 0 0 2.4mm; }

.ar { font-family: "Noto Naskh", serif; letter-spacing: 0; text-transform: none; font-weight: 400; }
.salla { font-family: "Noto Naskh", serif; font-size: 0.78em; }

.stage {
  display: grid;
  grid-template-columns: 1.4fr 0.78fr;
  gap: 6mm;
  align-items: start;
}
.stage.full { grid-template-columns: 1fr; }
.stage.even { grid-template-columns: 1fr 1fr; }
.stage.wide { grid-template-columns: 1.15fr 1fr; }
.stage.rev { grid-template-columns: 0.72fr 1.28fr; }

.foot {
  position: absolute;
  left: 12mm;
  right: 12mm;
  bottom: 5.6mm;
  display: flex;
  justify-content: space-between;
  font-family: Manrope, sans-serif;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.foot .pg::before { content: counter(slide, decimal-leading-zero); }

.crop { overflow: hidden; background: #ddd; }
.crop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { height: 108mm; }
.ph.sm { height: 72mm; }
.frame {
  padding: 1.2mm;
  background: #fff;
  border: 1px solid rgba(138, 103, 48, 0.45);
}
figure { margin: 0; }
figcaption, .cap {
  font-family: Manrope, sans-serif;
  font-size: 8pt;
  line-height: 1.3;
  color: var(--muted);
  margin-top: 1.4mm;
}

.remember, .note {
  margin-top: 2.5mm;
}
.remember {
  background: var(--green);
  color: #f7f2e8;
  padding: 2.8mm 3.6mm;
}
.remember strong, .note strong, .label {
  font-family: Manrope, sans-serif;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1mm;
}
.remember strong { color: #e6c98a; }
.remember p, .note p { margin: 0; }
.note {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: 2.4mm 3.2mm;
}
.note strong { color: var(--gold); }

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4mm;
}
.cards.three { grid-template-columns: 1fr 1fr 1fr; }
.cards.four { grid-template-columns: 1fr 1fr 1fr 1fr; }
.card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  padding: 2.4mm 3mm;
}
.card b {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1mm;
}
.card p { margin: 0; font-size: 12.5pt; line-height: 1.32; }

.chain {
  font-size: 15pt;
  line-height: 1.55;
}
.chain em { font-style: normal; color: var(--green); font-weight: 600; }

.tree .who {
  display: grid;
  grid-template-columns: 34mm 1fr;
  gap: 3mm;
  border-bottom: 1px solid var(--line);
  padding: 1.3mm 0;
}
.tree .who span {
  font-family: Manrope, sans-serif;
  font-size: 8pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.tree .who b { font-weight: 600; color: var(--green); font-family: Literata, serif; }

.timeline {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8mm;
}
.is-last { page-break-after: auto; break-after: auto; }
.tl {
  display: grid;
  grid-template-columns: 42mm 1fr;
  gap: 2mm;
  margin: 0 0 2.2mm;
}
.tl .age {
  font-family: Manrope, sans-serif;
  font-weight: 700;
  font-size: 9.5pt;
  color: var(--terra);
}
.tl p { margin: 0; font-size: 12pt; }
.tl.later { opacity: 0.7; }

.verse {
  columns: 2;
  column-gap: 8mm;
  font-family: Literata, serif;
  font-size: 13.5pt;
  line-height: 1.45;
}
.verse p { margin: 0 0 2.6mm; break-inside: avoid; }

.quiz {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
  columns: 2;
  column-gap: 8mm;
}
.quiz.cont { counter-reset: q 8; }
.quiz li { counter-increment: q; margin: 0 0 3.2mm; break-inside: avoid; }
.quiz li p { margin: 0 0 1mm; font-size: 13pt; }
.quiz li p::before {
  content: counter(q, decimal-leading-zero);
  font-family: Manrope, sans-serif;
  font-weight: 700;
  font-size: 9pt;
  color: var(--gold);
  margin-right: 2mm;
}
.line {
  display: block;
  border-bottom: 1px solid rgba(20, 54, 45, 0.25);
  height: 6mm;
}

.map { background: #fff; border: 1px solid var(--line); padding: 2mm; }
.map svg { width: 100%; height: auto; display: block; }

.tiny { font-size: 11.5pt; line-height: 1.35; }
.sources { font-size: 12pt; line-height: 1.35; margin: 0; padding-left: 5mm; }
.sources li { margin: 0 0 1.6mm; }

.cover {
  padding: 0;
  background: #0c241e;
  color: #f6f1e6;
}
.cover::before, .cover::after { display: none; }
.cover .bg {
  position: absolute;
  inset: 0;
  background: url("../images/kaaba-1880.jpg") center 40% / cover no-repeat;
}
.cover .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 18, 15, 0.94) 0%, rgba(8, 18, 15, 0.82) 38%, rgba(8, 18, 15, 0.18) 68%, rgba(8, 18, 15, 0.28) 100%);
}
.cover .goldframe { position: absolute; inset: 5mm; border: 1px solid rgba(230, 201, 138, 0.7); }
.cover .goldframe i { position: absolute; inset: 1.5mm; border: 1px solid rgba(230, 201, 138, 0.32); }
.cover .content { position: absolute; left: 14mm; top: 16mm; width: 168mm; }
.cover .basmala {
  font-family: "Noto Naskh", serif;
  font-size: 16pt;
  color: #f0d7a2;
  margin: 0 0 5mm;
}
.cover .eyebrow {
  font-family: Manrope, sans-serif;
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6c98a;
  margin: 0 0 3mm;
}
.cover h1 {
  font-family: Literata, serif;
  font-weight: 600;
  font-size: 40pt;
  line-height: 0.95;
  margin: 0 0 3mm;
}
.cover .sub { font-family: Literata, serif; font-size: 18pt; margin: 0 0 4mm; color: #f3e6cf; }
.cover .rule { width: 28mm; height: 1px; background: #e6c98a; margin: 0 0 4mm; }
.cover .deck { font-size: 14pt; line-height: 1.35; margin: 0 0 4mm; max-width: 155mm; }
.cover .basis {
  font-family: Manrope, sans-serif;
  font-size: 9.5pt;
  line-height: 1.4;
  color: #e6c98a;
  margin: 0;
}

@media screen {
  body { padding: 16px 0 36px; }
  .sheet { margin: 14px auto; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
}
@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .sheet { margin: 0; box-shadow: none; }
  .sheet:last-of-type { break-after: auto; }
}
@media screen and (max-width: 900px) {
  .sheet { width: auto; height: auto; min-height: 70vh; margin: 10px; overflow: visible; padding: 16px; }
  .sheet::before, .sheet::after { display: none; }
  .foot { position: static; margin-top: 12px; }
  .stage, .stage.even, .stage.wide, .cards, .cards.three, .cards.four, .verse, .quiz, .timeline {
    display: block;
    columns: 1;
  }
  .ph, .ph.sm { height: 200px; }
  .cover { height: 100vh; min-height: 520px; }
  .cover .content { width: auto; right: 16px; }
  .cover .veil {
    background: linear-gradient(180deg, rgba(8, 18, 15, 0.35), rgba(8, 18, 15, 0.92));
  }
}
