/* =====================================================================
   نور آیه‌ها — Quranic Lessons
   A premium, spiritual, Islamic-inspired visual system.
   ===================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Greens & teals */
  --emerald-deep: #06251f;
  --emerald-900: #0a352c;
  --emerald-700: #0d5243;
  --emerald-500: #157a63;
  --teal-soft: #2f9c84;

  /* Gold */
  --gold-900: #8a6a1f;
  --gold-600: #b8902f;
  --gold-500: #c9a24a;
  --gold-300: #e6cf8a;
  --gold-100: #f5ead0;

  /* Neutrals */
  --ivory: #faf5ea;
  --cream: #f4ecdb;
  --paper: #fffdf8;
  --navy: #15243b;

  /* Ink / text */
  --ink-900: #1c2a26;
  --ink-700: #38463f;
  --ink-500: #5c6a62;
  --ink-300: #8b968e;

  /* Functional */
  --line: rgba(138, 106, 31, 0.22);
  --line-soft: rgba(28, 42, 38, 0.08);
  --shadow-sm: 0 2px 10px rgba(6, 37, 31, 0.06);
  --shadow-md: 0 14px 40px -18px rgba(6, 37, 31, 0.35);
  --shadow-lg: 0 30px 70px -30px rgba(6, 37, 31, 0.5);
  --glow-gold: 0 0 0 1px rgba(201, 162, 74, 0.4), 0 18px 50px -22px rgba(201, 162, 74, 0.55);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;

  --maxw: 1180px;

  --font-fa: "Vazirmatn", system-ui, sans-serif;
  --font-quran: "Amiri", "Vazirmatn", serif;
  --font-serif: "Cormorant Garamond", "Amiri", serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-fa);
  color: var(--ink-900);
  background: var(--ivory);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Decorative background ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% -10%, #fffdf6 0%, var(--ivory) 38%, var(--cream) 100%);
}
.bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%230d5243' stroke-width='1' stroke-opacity='0.07'%3E%3Cpath d='M60 8 76 44 112 60 76 76 60 112 44 76 8 60 44 44Z'/%3E%3Cpath d='M60 8 44 44 8 60 44 76 60 112 76 76 112 60 76 44Z'/%3E%3Ccircle cx='60' cy='60' r='13'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 75%);
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.bg-glow--one {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(47, 156, 132, 0.5), transparent 70%);
}
.bg-glow--two {
  width: 460px;
  height: 460px;
  bottom: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(201, 162, 74, 0.4), transparent 70%);
}

/* ---------- Layout shell ---------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 234, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  background: none;
  text-align: start;
}
.brand__mark {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--gold-500);
  background: linear-gradient(160deg, var(--emerald-700), var(--emerald-deep));
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(201, 162, 74, 0.35);
}
.brand__mark .khatam {
  width: 30px;
  height: 30px;
}
.brand__text h1 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--emerald-900);
  line-height: 1.2;
}
.brand__text span {
  font-size: 0.78rem;
  color: var(--ink-500);
  letter-spacing: 0.5px;
}
.header-spacer {
  flex: 1;
}
.header-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-500);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.header-progress b {
  color: var(--emerald-700);
  font-weight: 700;
}

/* ---------- Generic section heading / ornament ---------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gold-500);
  margin: 0 auto;
}
.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  width: clamp(40px, 18vw, 160px);
  background: linear-gradient(
    var(--dir, to left),
    transparent,
    var(--gold-500)
  );
}
.ornament .khatam {
  width: 26px;
  height: 26px;
  flex: none;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: clamp(48px, 9vw, 96px) 0 clamp(28px, 5vw, 48px);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--gold-900);
  background: var(--gold-100);
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero__bismillah {
  font-family: var(--font-quran);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--emerald-700);
  margin-bottom: 18px;
  direction: rtl;
}
.hero h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 3.7rem);
  line-height: 1.18;
  color: var(--emerald-900);
  letter-spacing: 0.4px;
}
.hero h2 .accent {
  color: var(--gold-600);
  font-style: italic;
}
.hero__title-img {
  display: block;
  width: clamp(260px, 60vw, 560px);
  height: auto;
  margin: 6px auto 0;
  filter: drop-shadow(0 18px 40px rgba(6, 37, 31, 0.28));
}
.hero p {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--ink-700);
  font-size: clamp(1rem, 2.4vw, 1.12rem);
}
.hero__ornament {
  margin-top: 34px;
}

/* ---------- Toolbar (search + count) ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.toolbar__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.toolbar__title h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--emerald-900);
}
.toolbar__title span {
  font-size: 0.9rem;
  color: var(--ink-500);
}
.search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}
.search svg {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-300);
  pointer-events: none;
}
.search input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-900);
  padding: 13px 44px 13px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.search input::placeholder {
  color: var(--ink-300);
}
.search input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, 0.16);
}

/* ---------- Lesson grid ---------- */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding-bottom: 60px;
}
.lesson-card {
  position: relative;
  text-align: start;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 26px 24px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  animation: rise 0.6s var(--ease) both;
}
.lesson-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(21, 122, 99, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.lesson-card::after {
  content: "";
  position: absolute;
  top: -40px;
  inset-inline-end: -40px;
  width: 130px;
  height: 130px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-width='1.2'%3E%3Cpath d='M50 6 61 39 94 50 61 61 50 94 39 61 6 50 39 39Z'/%3E%3Cpath d='M50 6 39 39 6 50 39 61 50 94 61 61 94 50 61 39Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  opacity: 0.16;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
}
.lesson-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
}
.lesson-card:hover::before {
  opacity: 1;
}
.lesson-card:hover::after {
  transform: rotate(30deg) scale(1.1);
  opacity: 0.28;
}
.lesson-card:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}
.lesson-card__num {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-600);
  border-radius: 14px;
  background: linear-gradient(160deg, #fffdf6, var(--gold-100));
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.lesson-card__theme {
  position: relative;
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  color: var(--teal-soft);
  background: rgba(47, 156, 132, 0.1);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.lesson-card__title {
  position: relative;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--emerald-900);
}
.lesson-card__surah {
  position: relative;
  font-family: var(--font-quran);
  font-size: 1.15rem;
  color: var(--ink-300);
  margin-top: 8px;
}
.lesson-card__foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--emerald-700);
  font-size: 0.85rem;
  font-weight: 600;
}
.lesson-card__foot svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}
.lesson-card:hover .lesson-card__foot svg {
  transform: translateX(-5px);
}

/* ---------- Breadcrumb ---------- */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 6px;
  font-size: 0.88rem;
  color: var(--ink-500);
}
.crumbs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-500);
  border-radius: 8px;
  padding: 4px 6px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.crumbs button:hover {
  color: var(--emerald-700);
  background: rgba(21, 122, 99, 0.07);
}
.crumbs button svg {
  width: 16px;
  height: 16px;
}
.crumbs .sep {
  color: var(--gold-500);
  transform: scaleX(-1);
  display: inline-flex;
}
.crumbs .sep svg {
  width: 14px;
  height: 14px;
}
.crumbs .current {
  color: var(--emerald-900);
  font-weight: 600;
}

/* ---------- Lesson view header ---------- */
.lesson-hero {
  position: relative;
  margin-top: 14px;
  padding: clamp(28px, 5vw, 46px);
  border-radius: var(--radius-lg);
  color: var(--ivory);
  background:
    radial-gradient(140% 120% at 90% -20%, rgba(47, 156, 132, 0.55), transparent 55%),
    linear-gradient(150deg, var(--emerald-700), var(--emerald-deep));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.lesson-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e6cf8a' stroke-width='1' stroke-opacity='0.18'%3E%3Cpath d='M60 8 76 44 112 60 76 76 60 112 44 76 8 60 44 44Z'/%3E%3Cpath d='M60 8 44 44 8 60 44 76 60 112 76 76 112 60 76 44Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: 0.5;
  pointer-events: none;
}
.lesson-hero__inner {
  position: relative;
}
.lesson-hero__num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--gold-300);
  border: 1px solid rgba(230, 207, 138, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
}
.lesson-hero__theme {
  margin-inline-start: 8px;
  color: var(--ivory);
  opacity: 0.85;
}
.lesson-hero h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.25;
  margin-top: 18px;
}
.lesson-hero__surah {
  font-family: var(--font-quran);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--gold-300);
  margin-top: 12px;
}
.lesson-hero p {
  margin-top: 12px;
  max-width: 560px;
  color: rgba(250, 245, 234, 0.85);
}

/* ---------- Section selector ---------- */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin: 30px 0 60px;
}
.section-card {
  position: relative;
  text-align: start;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
  animation: rise 0.5s var(--ease) both;
}
.section-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}
.section-card:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}
.section-card__icon {
  flex: none;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.section-card__icon svg {
  width: 26px;
  height: 26px;
}
.section-card__step {
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  color: var(--gold-700, var(--gold-900));
  font-weight: 600;
}
.section-card__title {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--emerald-900);
  line-height: 1.45;
  margin-top: 2px;
}
.section-card__go {
  position: absolute;
  inset-block-start: 22px;
  inset-inline-end: 20px;
  color: var(--ink-300);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.section-card__go svg {
  width: 20px;
  height: 20px;
}
.section-card:hover .section-card__go {
  color: var(--gold-600);
  transform: translateX(-4px);
}

/* ---------- Section content / reader ---------- */
.reader-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
  margin: 24px 0 70px;
}
.section-rail {
  position: sticky;
  top: 92px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.section-rail h4 {
  font-size: 0.78rem;
  letter-spacing: 0.6px;
  color: var(--ink-500);
  padding: 6px 10px 10px;
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: start;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink-700);
  font-size: 0.9rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.rail-item__dot {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-500);
  background: var(--cream);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.rail-item:hover {
  background: rgba(21, 122, 99, 0.06);
  color: var(--emerald-900);
}
.rail-item.is-active {
  background: linear-gradient(160deg, var(--emerald-700), var(--emerald-900));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.rail-item.is-active .rail-item__dot {
  background: var(--gold-500);
  color: var(--emerald-deep);
}

.reader {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 50px);
  box-shadow: var(--shadow-md);
  min-width: 0;
}
.reader__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.reader__kicker svg {
  width: 18px;
  height: 18px;
}
.reader__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  color: var(--emerald-900);
  line-height: 1.3;
  margin: 18px 0 6px;
}
.reader__rule {
  margin: 22px 0 30px;
  --dir: to left;
}
.reader__rule.ornament::before,
.reader__rule.ornament::after {
  width: 100%;
}

/* Content blocks */
.block + .block {
  margin-top: 26px;
}
.c-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald-700);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 12px;
}
.c-heading::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--gold-500);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, 0.16);
}
.c-paragraph {
  font-size: 1.08rem;
  color: var(--ink-700);
  line-height: 2.1;
}
.c-list {
  display: grid;
  gap: 12px;
}
.c-list li {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 1.05rem;
  color: var(--ink-700);
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
}
.c-list li .tick {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(21, 122, 99, 0.12);
  color: var(--emerald-700);
}
.c-list li .tick svg {
  width: 15px;
  height: 15px;
}

/* Verse */
.c-verse {
  position: relative;
  text-align: center;
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius);
  color: var(--ivory);
  background:
    radial-gradient(120% 140% at 50% -30%, rgba(47, 156, 132, 0.5), transparent 60%),
    linear-gradient(155deg, var(--emerald-700), var(--emerald-deep));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.c-verse::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(230, 207, 138, 0.35);
  border-radius: calc(var(--radius) - 8px);
  pointer-events: none;
}
.c-verse::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23e6cf8a' stroke-width='1' stroke-opacity='0.14'%3E%3Cpath d='M50 6 61 39 94 50 61 61 50 94 39 61 6 50 39 39Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 90px 90px;
  pointer-events: none;
}
.c-verse__arabic {
  position: relative;
  font-family: var(--font-quran);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 2.1;
  color: #fff;
  direction: rtl;
}
.c-verse__translit {
  position: relative;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-300);
  margin-top: 16px;
  direction: ltr;
}
.c-verse__translation {
  position: relative;
  font-size: 1.12rem;
  color: rgba(250, 245, 234, 0.92);
  margin-top: 16px;
  max-width: 640px;
  margin-inline: auto;
}
.c-verse__ref {
  position: relative;
  display: inline-block;
  margin-top: 20px;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  color: var(--gold-300);
  border-top: 1px solid rgba(230, 207, 138, 0.3);
  padding-top: 12px;
}

/* Reflection */
.c-reflection {
  position: relative;
  padding: 22px 24px 22px 56px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fffaf0, var(--gold-100));
  border: 1px solid var(--line);
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.7;
}
.c-reflection .quote-mark {
  position: absolute;
  top: 16px;
  inset-inline-end: 18px;
  color: var(--gold-500);
  opacity: 0.6;
}
.c-reflection .quote-mark svg {
  width: 30px;
  height: 30px;
}

/* Prayer */
.c-prayer {
  position: relative;
  text-align: center;
  padding: clamp(26px, 4vw, 38px);
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.c-prayer__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald-700);
  font-size: 0.85rem;
  font-weight: 600;
}
.c-prayer__badge svg {
  width: 18px;
  height: 18px;
}
.c-prayer__arabic {
  font-family: var(--font-quran);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  color: var(--emerald-900);
  margin: 16px 0;
  direction: rtl;
}
.c-prayer__text {
  font-size: 1.1rem;
  color: var(--ink-700);
  max-width: 600px;
  margin: 0 auto;
  line-height: 2;
}

/* Game */
.c-game {
  position: relative;
  padding: clamp(24px, 4vw, 34px);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(194, 119, 46, 0.16), transparent 55%),
    linear-gradient(160deg, #fff8ee, var(--paper));
  border: 1px dashed var(--gold-500);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.c-game__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.c-game__icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(150deg, #d68a35, #b8902f);
  box-shadow: var(--shadow-sm);
}
.c-game__icon svg {
  width: 24px;
  height: 24px;
}
.c-game__title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: #9a5d18;
}
.c-game__text {
  color: var(--ink-700);
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.c-game__steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
}
.c-game__steps li {
  counter-increment: step;
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--ink-700);
  font-size: 1.02rem;
}
.c-game__steps li::before {
  content: counter(step);
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, #d68a35, #b8902f);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Prayer multi-line */
.c-prayer__lines {
  display: grid;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto 4px;
}
.c-prayer__lines p {
  font-size: 1.08rem;
  color: var(--ink-700);
  line-height: 1.95;
}

/* Callout — teacher note / emphasis */
.c-callout {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(21, 122, 99, 0.06), rgba(47, 156, 132, 0.04));
  border: 1px solid var(--line-soft);
  border-inline-start: 4px solid var(--emerald-500);
}
.c-callout__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--emerald-700);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.c-callout p {
  font-size: 1.05rem;
  color: var(--ink-700);
  line-height: 2.05;
}
.c-callout p + p {
  margin-top: 14px;
}

/* Story — narrative card */
.c-story {
  position: relative;
  padding: clamp(22px, 4vw, 30px);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(201, 162, 74, 0.1), transparent 55%),
    var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.c-story__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.c-story__icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--gold-600);
  background: var(--paper);
  border: 1px solid var(--line);
}
.c-story__icon svg {
  width: 24px;
  height: 24px;
}
.c-story__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--emerald-900);
}
.c-story__body p {
  font-size: 1.06rem;
  color: var(--ink-700);
  line-height: 2.1;
  text-align: justify;
}
.c-story__body p + p {
  margin-top: 12px;
}
.c-story__source {
  margin-top: 14px;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-500);
  text-align: end;
}
.c-story__note {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--gold-100);
  border: 1px dashed var(--gold-500);
  color: var(--gold-900);
  font-size: 0.92rem;
  font-weight: 600;
}

/* Cards — verse / phrase pairs */
.c-cards {
  display: grid;
  gap: 14px;
}
.c-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.c-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.c-card__ar {
  font-family: var(--font-quran);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  color: var(--emerald-800, var(--emerald-900));
  line-height: 2;
  direction: rtl;
}
.c-card__fa {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--ink-700);
  font-size: 1.02rem;
}

/* Data table */
.c-table-wrap {
  border-radius: var(--radius);
  overflow: hidden;
}
.c-table__caption {
  font-size: 0.95rem;
  color: var(--ink-500);
  margin-bottom: 10px;
}
.c-table__scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
.c-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: var(--paper);
}
.c-table thead th {
  background: linear-gradient(160deg, var(--emerald-700), var(--emerald-900));
  color: var(--gold-100);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 16px;
  text-align: start;
  white-space: nowrap;
}
.c-table tbody th,
.c-table tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 1rem;
  color: var(--ink-700);
  vertical-align: top;
  line-height: 1.9;
}
.c-table tbody th {
  font-weight: 700;
  color: var(--emerald-900);
  background: rgba(21, 122, 99, 0.05);
  white-space: nowrap;
}
.c-table tbody tr:nth-child(even) td {
  background: rgba(244, 236, 219, 0.4);
}
.c-table tbody tr:hover td,
.c-table tbody tr:hover th {
  background: rgba(201, 162, 74, 0.1);
}

/* Puzzle grid (crossword / word search) */
.c-grid-wrap {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 4px;
}
.c-grid {
  border-collapse: collapse;
}
.c-grid td {
  width: 46px;
  height: 46px;
  text-align: center;
  vertical-align: middle;
  font-family: var(--font-quran);
  font-size: 1.5rem;
  font-weight: 700;
}
.c-grid td.is-filled {
  border: 1px solid var(--emerald-700);
  background: var(--paper);
  color: var(--emerald-900);
}
.c-grid td.is-blocked {
  border: 1px solid transparent;
  background: transparent;
}
.c-grid tr.is-key td.is-filled {
  background: linear-gradient(160deg, var(--gold-300), var(--gold-100));
  border-color: var(--gold-600);
  color: var(--gold-900);
}
@media (max-width: 560px) {
  .c-grid td {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

/* Reader footer navigation */
.reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}
.reader-nav button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--emerald-900);
  background: var(--cream);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}
.reader-nav button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--gold-100);
}
.reader-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.reader-nav button svg {
  width: 18px;
  height: 18px;
}
.reader-nav .next svg {
  transform: scaleX(-1);
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-500);
}
.empty .khatam {
  width: 56px;
  height: 56px;
  color: var(--gold-300);
  margin-bottom: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(13, 82, 67, 0.05));
  margin-top: 30px;
}
.site-footer__inner {
  text-align: center;
  padding: 44px 0 36px;
}
.site-footer .khatam {
  width: 34px;
  height: 34px;
  color: var(--gold-500);
}
.site-footer__verse {
  font-family: var(--font-quran);
  font-size: 1.5rem;
  color: var(--emerald-700);
  margin: 14px 0 6px;
  direction: rtl;
}
.site-footer__note {
  color: var(--ink-500);
  font-size: 0.9rem;
}
.site-footer__copy {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--ink-300);
}
.site-footer__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 48px);
}
.site-footer__logo {
  display: block;
  width: clamp(64px, 11vw, 90px);
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(6, 37, 31, 0.18));
  transition: transform 0.4s var(--ease);
}
.site-footer__logo--wide {
  width: clamp(130px, 24vw, 210px);
}
.site-footer__logo:hover {
  transform: translateY(-4px) scale(1.02);
}

/* ---------- Animations ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.view-enter {
  animation: fade 0.4s var(--ease) both;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .reader-layout {
    grid-template-columns: 1fr;
  }
  .section-rail {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .section-rail h4 {
    display: none;
  }
  .rail-item {
    flex: none;
    width: auto;
    white-space: nowrap;
  }
  .rail-item span.label {
    display: none;
  }
  .rail-item.is-active span.label {
    display: inline;
  }
}
@media (max-width: 560px) {
  .header-progress {
    display: none;
  }
  .reader-nav {
    flex-direction: column-reverse;
  }
  .reader-nav button {
    justify-content: center;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
