/*
 * Ayah Quest website.
 * Colours, radii and shadows come from the app's theme (src/theme/index.ts):
 * Pakistan flag green and white, bright green for actions, honey gold for rewards,
 * soft coral (never red) for "try again".
 */

:root {
  --flag: #01411c;
  --green-900: #012d14;
  --green-700: #0b5d2e;
  --green-600: #13803f;
  --green-500: #1fa055;
  --green-400: #4cc27a;
  --green-300: #8fdaaa;
  --green-200: #bfebcf;
  --green-100: #e3f6ea;
  --green-50: #f3fbf6;
  --white: #ffffff;
  --honey: #ffc23d;
  --honey-deep: #d99a00;
  --honey-light: #ffedb8;
  --honey-ink: #8a5a00; /* honey for small text: 5:1 contrast on white */
  --coral: #ff8a65;
  --coral-deep: #e0603a;
  --coral-light: #ffe4da;
  --ink: #0e2a1a;
  --ink-soft: #3f5b4a;
  --ink-faint: #7e978a;
  --grey-100: #f1f4f2;
  --grey-200: #e2e8e4;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-card: 0 6px 18px rgba(1, 65, 28, 0.1);
  --shadow-soft: 0 3px 10px rgba(1, 65, 28, 0.08);
  --shadow-lifted: 0 10px 28px rgba(1, 65, 28, 0.18);

  --font-display: 'Fredoka', 'Nunito', ui-rounded, system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-arabic: 'Noto Naskh Arabic', 'Geeza Pro', 'Arabic Typesetting', serif;
  --font-quran: 'Ayah Quest Quran', 'Noto Naskh Arabic', serif;

  color-scheme: light;
}

/* Quran text uses Amiri Quran as rebuilt by the app (scripts/build-fonts.mjs): its character map draws Tanzil's
   sukoon (U+0652) with the Madani jazm glyph. The text itself stays exactly as Tanzil publishes it.
   SIL Open Font License 1.1, see /fonts/AmiriQuran-OFL.txt. */
@font-face {
  font-family: 'Ayah Quest Quran';
  src: url('/fonts/AmiriQuran-Madani.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--green-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  /* Fredoka's "fi" ligature reads like "fr", so common ligatures are off. */
  font-variant-ligatures: no-common-ligatures;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0;
}

a {
  color: var(--green-700);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-600);
}

strong,
b {
  font-weight: 800;
}

:focus-visible {
  outline: 3px solid var(--green-600);
  outline-offset: 3px;
  border-radius: 8px;
}

.on-dark :focus-visible {
  outline-color: var(--honey);
}

.container {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container {
    width: min(100% - 64px, 1120px);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--honey);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Arabic letters (decorative) and Quran text. */
.ar {
  font-family: var(--font-arabic);
  font-weight: 700;
}

.quran {
  font-family: var(--font-quran);
  font-weight: 400;
  font-variant-ligatures: normal;
  line-height: 2.1;
}

/* ---------- Buttons ---------- */

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 26px 10px 18px;
  border-radius: var(--radius-md);
  background: var(--honey);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 5px 0 var(--honey-deep);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.store-button svg {
  flex: none;
  width: 30px;
  height: 30px;
}

.store-label {
  display: grid;
  text-align: left;
  line-height: 1.15;
}

.store-label small {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.store-label strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

a.store-button[href]:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--honey-deep);
}

a.store-button[href]:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--honey-deep);
}

.store-button--green {
  background: var(--green-600);
  color: var(--white);
  box-shadow: 0 5px 0 var(--green-700);
}

a.store-button--green[href]:hover {
  color: var(--white);
  box-shadow: 0 7px 0 var(--green-700);
}

a.store-button--green[href]:active {
  box-shadow: 0 1px 0 var(--green-700);
}

/* Before launch the button is a plain label, not a link. */
.store-button.is-soon {
  cursor: default;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--honey);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--honey-deep);
}

.pill-link:hover {
  color: var(--ink);
  background: #ffcb57;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 3;
  background: var(--flag);
  color: var(--white);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.brand:hover {
  color: var(--white);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.brand,
.pill-link {
  white-space: nowrap;
}

/* Very small phones (iPhone SE first generation and similar). */
@media (max-width: 359px) {
  .nav {
    gap: 10px;
  }

  .brand {
    gap: 8px;
    font-size: 1.15rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .pill-link {
    padding: 8px 14px;
    font-size: 0.95rem;
  }
}

.nav-links {
  display: none;
  gap: 2px;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--green-100);
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--flag);
  color: var(--white);
}

.hero-grid {
  display: grid;
  gap: 8px;
  padding-top: 24px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--honey-light);
  font-size: 0.95rem;
  font-weight: 800;
}

.eyebrow svg {
  width: 22px;
  height: 22px;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.6rem, 10.5vw, 4.4rem);
  letter-spacing: -0.015em;
}

.hero h1 .accent {
  color: var(--honey);
}

.lead {
  max-width: 36ch;
  margin-top: 18px;
  color: var(--green-100);
  font-size: clamp(1.12rem, 3.6vw, 1.3rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}

.cta-note {
  margin-top: 16px;
  color: var(--green-200);
  font-size: 0.97rem;
}

.hero-art {
  --phone-w: min(64vw, 272px);
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 440px;
  margin-top: 28px;
}

.hero-circle {
  position: absolute;
  top: 70px;
  left: 50%;
  width: 560px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green-700);
  transform: translateX(-46%);
}

/* The crescent and star rise behind the phone, as on the app icon. */
.hero-moon {
  position: absolute;
  top: 0;
  left: calc(50% + var(--phone-w) / 2 - 128px);
  width: 176px;
  height: 176px;
  color: var(--white);
}

.phone {
  position: relative;
  z-index: 1;
  align-self: end;
  width: var(--phone-w);
  margin-top: 96px;
  margin-bottom: -132px;
  padding: 10px;
  border-radius: 46px;
  background: #0b1f14;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

/* Status-bar strip in the app's header green, so the camera island never covers the screenshot. */
.phone-screen {
  overflow: hidden;
  padding-top: 42px;
  border-radius: 36px;
  background: #08592b;
}

.phone::before {
  content: '';
  position: absolute;
  top: 21px;
  left: 50%;
  z-index: 1;
  width: 30%;
  height: 22px;
  border-radius: 999px;
  background: #0b1f14;
  transform: translateX(-50%);
}

.phone img {
  width: 100%;
}

.hero-bee {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: calc(50% - var(--phone-w) / 2 - 46px);
  width: 124px;
  height: 124px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.25));
}

.bubble {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--size, 56px);
  height: var(--size, 56px);
  border-radius: 50%;
  background: var(--white);
  color: var(--flag);
  font-size: calc(var(--size, 56px) * 0.5);
  line-height: 1;
  box-shadow: 0 6px 0 var(--green-200);
}

.bubble--honey {
  background: var(--honey);
  color: var(--ink);
  box-shadow: 0 6px 0 var(--honey-deep);
}

.bubble span {
  transform: translateY(-6%);
}

.hero-art .bubble-1 {
  --size: 58px;
  top: 238px;
  left: calc(50% + var(--phone-w) / 2 - 26px);
}

.hero-art .bubble-2 {
  --size: 48px;
  top: 318px;
  left: calc(50% - var(--phone-w) / 2 - 30px);
}

.hero-art .bubble-3 {
  --size: 42px;
  top: 188px;
  left: calc(50% - var(--phone-w) / 2 - 38px);
}

@media (max-width: 380px) {
  .hero-art .bubble-3 {
    display: none;
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 32px;
    padding-top: 40px;
  }

  .hero-copy {
    padding-bottom: 96px;
  }

  .hero-art {
    --phone-w: 312px;
    min-height: 620px;
    margin-top: 0;
  }

  .hero-circle {
    top: 80px;
    width: 600px;
  }

  .hero-moon {
    top: 34px;
    left: calc(50% + 30px);
    width: 250px;
    height: 250px;
  }

  .phone {
    margin-top: 130px;
    margin-bottom: -170px;
  }

  .hero-bee {
    top: 72px;
    left: calc(50% - 156px - 128px);
    width: 188px;
    height: 188px;
  }

  .hero-art .bubble-1 {
    --size: 70px;
    top: 350px;
    left: calc(50% + 156px - 30px);
  }

  .hero-art .bubble-2 {
    --size: 56px;
    top: 440px;
    left: calc(50% - 156px - 52px);
  }

  .hero-art .bubble-3 {
    --size: 46px;
    top: 290px;
    left: calc(50% - 156px - 78px);
  }
}

/* ---------- Gentle motion (off for people who ask for less motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .bee-hover {
    transform-box: view-box;
    animation: bee-hover 1.7s ease-in-out infinite alternate;
  }

  .bee-wings {
    transform-box: view-box;
    transform-origin: 50% 50%;
    animation: bee-wings 0.26s ease-in-out infinite alternate;
  }

  .bee-arm {
    transform-box: view-box;
    transform-origin: 64px 61px;
    animation: bee-wave 0.5s ease-in-out 0.6s 6 alternate;
  }

  .float {
    animation: float 5s ease-in-out infinite alternate;
  }

  .float-slow {
    animation: float 7s ease-in-out -2s infinite alternate;
  }

  .float-late {
    animation: float 6s ease-in-out -4s infinite alternate;
  }
}

@keyframes bee-hover {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-6%);
  }
}

@keyframes bee-wings {
  from {
    transform: scaleY(1);
  }

  to {
    transform: scaleY(0.82);
  }
}

@keyframes bee-wave {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-16deg);
  }
}

@keyframes float {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-10px);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 76px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 110px 0;
  }
}

.section--white {
  background: var(--white);
}

.section-head {
  max-width: 660px;
  margin: 0 auto 44px;
  text-align: center;
}

.kicker {
  color: var(--honey-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(2.05rem, 7vw, 3rem);
}

.section-head p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

/* ---------- The quest path ---------- */

.quest-path {
  position: relative;
  display: grid;
  gap: 40px;
  max-width: 940px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* Dotted trail like the quest map in the app. */
.quest-path::before {
  content: '';
  position: absolute;
  top: 30px;
  bottom: -40px;
  left: calc(50% - 3px);
  width: 6px;
  background: radial-gradient(circle, var(--green-300) 2.6px, transparent 3px) center top / 6px 16px repeat-y;
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.stop-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  width: 66px;
  height: 66px;
  margin-bottom: -30px;
  border-radius: 50%;
  background: var(--honey);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 6px 0 var(--honey-deep);
}

.stop-node--green {
  background: var(--green-500);
  color: var(--white);
  box-shadow: 0 6px 0 var(--green-700);
}

.stop-node--white {
  background: var(--white);
  color: var(--flag);
  box-shadow: 0 6px 0 var(--green-200);
}

.stop-node span {
  transform: translateY(-5%);
}

.stop-card {
  padding: 44px 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.stop-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  color: var(--honey-ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.stop-label .ar {
  color: var(--green-600);
  font-size: 1.15rem;
}

.stop-card h3 {
  margin-top: 6px;
  font-size: 1.55rem;
}

.stop-card p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.word-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 380px;
  margin-top: 16px;
}

.word-tile {
  display: grid;
  place-items: center;
  padding: 0 6px 4px;
  border: 2px solid var(--green-100);
  border-radius: var(--radius-md);
  background: var(--green-50);
  color: var(--flag);
  font-size: 2rem;
  line-height: 1.9;
}

.word-source {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.9rem;
  font-weight: 800;
}

/* The goal: the first ayah, on the same green and gold card as in the app. */
.goal {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 36px auto 0;
  padding: 30px 22px 30px;
  border: 3px solid var(--honey);
  border-radius: var(--radius-xl);
  background: var(--flag);
  color: var(--white);
  text-align: center;
  box-shadow: var(--shadow-lifted);
  overflow: hidden;
}

.goal-moon {
  position: absolute;
  top: -30px;
  right: -40px;
  width: 200px;
  height: 200px;
  color: var(--white);
  opacity: 0.08;
}

.goal-trophy {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--honey);
  color: var(--flag);
}

.goal-trophy svg {
  width: 34px;
  height: 34px;
}

.goal .stop-label {
  justify-content: center;
  margin-top: 14px;
  color: var(--honey);
}

.goal .stop-label .ar {
  color: var(--green-200);
}

.goal h3 {
  margin-top: 6px;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
}

.ayah {
  margin-top: 14px;
  color: var(--white);
  font-size: clamp(2.3rem, 10vw, 3.6rem);
}

.ayah-meaning {
  margin-top: 4px;
  color: var(--green-100);
  font-size: 1.1rem;
}

.ayah-ref {
  margin-top: 4px;
  color: var(--green-200);
  font-size: 0.95rem;
}

.goal-note {
  max-width: 46ch;
  margin: 18px auto 0;
  color: var(--green-100);
}

@media (min-width: 860px) {
  .quest-path {
    gap: 8px;
  }

  .quest-path::before {
    top: 80px;
  }

  .stop {
    grid-template-columns: 1fr 96px 1fr;
    gap: 24px;
    align-items: center;
  }

  .stop-node {
    grid-column: 2;
    grid-row: 1;
    width: 88px;
    height: 88px;
    margin-bottom: 0;
    font-size: 2.6rem;
  }

  .stop-card {
    padding-top: 24px;
  }

  .stop:nth-child(odd) .stop-card {
    grid-column: 1;
    grid-row: 1;
  }

  .stop:nth-child(even) .stop-card {
    grid-column: 3;
    grid-row: 1;
  }

  .goal {
    padding: 40px 48px 40px;
  }
}

/* ---------- Screenshots ---------- */

.shots {
  display: grid;
  grid-auto-columns: min(64vw, 260px);
  grid-auto-flow: column;
  gap: 18px;
  margin: 0 -20px;
  padding: 8px 20px 28px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--green-300) transparent;
}

.shot {
  scroll-snap-align: start;
}

.shot figure {
  margin: 0;
}

.shot-frame {
  overflow: hidden;
  border: 6px solid var(--green-100);
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.shot-frame img {
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  border-radius: 24px;
}

.shot figcaption {
  margin-top: 16px;
  padding-inline: 4px;
}

.shot figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.shot figcaption span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

@media (min-width: 960px) {
  .shots {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: row;
    gap: 28px;
    margin: 0;
    padding: 8px 0 0;
    overflow: visible;
  }
}

/* ---------- Promises ---------- */

.promises {
  display: grid;
  gap: 18px;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .promises {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

.promise {
  padding: 26px 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.promise-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--green-100);
  color: var(--green-600);
}

.promise-icon svg {
  width: 30px;
  height: 30px;
}

.promise-icon--honey {
  background: var(--honey-light);
  color: var(--honey-ink);
}

.promise-icon--coral {
  background: var(--coral-light);
  color: var(--coral-deep);
}

.promise h3 {
  margin-top: 18px;
  font-size: 1.45rem;
}

.promise p {
  margin-top: 8px;
  color: var(--ink-soft);
}

/* ---------- Pricing ---------- */

.price-card {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lifted);
  text-align: center;
}

.price-top {
  padding: 30px 24px 26px;
  background: var(--honey-light);
}

.trial-chip {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--honey);
  color: var(--ink);
  font-weight: 800;
}

.price {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1;
}

.price small {
  color: var(--ink-soft);
  font-size: 1.2rem;
  font-weight: 600;
}

.price-sub {
  margin-top: 10px;
  color: var(--ink-soft);
}

.price-list {
  display: grid;
  gap: 12px;
  padding: 26px 28px 8px;
  list-style: none;
  text-align: left;
}

.price-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.price-list svg {
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-600);
}

.price-cta {
  padding: 20px 24px 30px;
}

.fine-print {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
}

.faq details {
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.faq summary {
  position: relative;
  display: block;
  padding: 18px 60px 18px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border-radius: 50%;
  background:
    linear-gradient(var(--green-600), var(--green-600)) center / 12px 2.5px no-repeat,
    linear-gradient(var(--green-600), var(--green-600)) center / 2.5px 12px no-repeat,
    var(--green-100);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  background:
    linear-gradient(var(--green-600), var(--green-600)) center / 12px 2.5px no-repeat,
    var(--green-100);
  transform: rotate(180deg);
}

.faq .answer {
  padding: 0 22px 20px;
  color: var(--ink-soft);
}

.faq .answer p + p {
  margin-top: 10px;
}

/* ---------- Final call to action ---------- */

.final {
  position: relative;
  overflow: hidden;
  background: var(--flag);
  color: var(--white);
  text-align: center;
}

.final-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.final-bee {
  width: 150px;
  height: 150px;
}

.final h2 {
  margin-top: 8px;
  font-size: clamp(2.1rem, 7vw, 3.2rem);
}

.final p {
  max-width: 40ch;
  margin-top: 14px;
  color: var(--green-100);
  font-size: 1.15rem;
}

.final .cta-row {
  justify-content: center;
}

.final-moon {
  position: absolute;
  top: -40px;
  right: -60px;
  width: 340px;
  height: 340px;
  color: var(--white);
  opacity: 0.08;
}

.final-moon--left {
  top: auto;
  right: auto;
  bottom: -90px;
  left: -90px;
  width: 260px;
  height: 260px;
  transform: scaleX(-1);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 0 40px;
  background: var(--green-900);
  color: var(--green-200);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 12px;
}

.footer-links {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.footer-links a,
.site-footer a {
  color: var(--white);
}

.footer-small {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--green-300);
  font-size: 0.85rem;
}

.footer-small p + p {
  margin-top: 6px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-heading {
  margin-bottom: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- Simple pages: privacy, terms, support, 404 ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 36px 0 84px;
  background: var(--flag);
  color: var(--white);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
}

.page-hero p {
  max-width: 52ch;
  margin-top: 12px;
  color: var(--green-100);
  font-size: 1.1rem;
}

.page-hero .hero-moon-small {
  position: absolute;
  top: -20px;
  right: -30px;
  width: 220px;
  height: 220px;
  color: var(--white);
  opacity: 0.1;
}

.page-body {
  position: relative;
  z-index: 1;
  margin-top: -56px;
  padding-bottom: 80px;
}

.prose {
  overflow-wrap: break-word;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 22px 36px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .prose {
    padding: 44px 56px 52px;
  }
}

.prose h2 {
  margin-top: 36px;
  font-size: 1.6rem;
}

.prose h3 {
  margin-top: 24px;
  font-size: 1.25rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 12px;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 6px;
}

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

.prose .updated {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.draft-note {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px 18px;
  border: 2px dashed var(--honey-deep);
  border-radius: var(--radius-md);
  background: var(--honey-light);
  color: var(--ink);
}

.draft-note svg {
  width: 30px;
  height: 30px;
  color: var(--honey-ink);
}

.draft-note p {
  margin: 0;
  color: var(--ink);
}

.draft-note p + p {
  margin-top: 6px;
}

/* Parts the owner still needs to fill in. */
mark.fill {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--honey-light);
  color: var(--honey-ink);
  font-weight: 800;
}

.help-grid {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

@media (min-width: 720px) {
  .help-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.help-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--green-50);
}

.help-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.help-card p,
.help-card ol {
  margin-top: 8px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  justify-items: start;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--flag);
  color: var(--white);
}

.contact-card p {
  margin: 0;
  color: var(--green-100);
}

.contact-card p a {
  color: var(--white);
}

.contact-card h2 {
  margin: 0;
  color: var(--white);
  font-size: 1.5rem;
}

.not-found {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 40px 0 100px;
  text-align: center;
}

.not-found .bee-box {
  width: 160px;
  height: 160px;
}

.not-found h1 {
  font-size: clamp(2.2rem, 8vw, 3.2rem);
}

.not-found p {
  max-width: 40ch;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

/* ---------- Guides for parents (/learn/) ---------- */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 18px;
  padding: 0;
  color: var(--green-200);
  font-size: 0.92rem;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: '›';
  margin: 0 8px;
  color: var(--green-300);
}

.breadcrumbs a {
  color: var(--white);
}

.breadcrumbs [aria-current='page'] {
  color: var(--green-100);
}

.article-topic {
  color: var(--honey);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-hero .article-topic {
  margin-top: 0;
  color: var(--honey);
  font-size: 0.95rem;
}

.page-hero h1 + p {
  margin-top: 14px;
}

.page-hero .article-meta {
  margin-top: 14px;
  color: var(--green-200);
  font-size: 0.95rem;
}

.article-meta a {
  color: var(--white);
}

.in-short {
  margin: 0 0 28px;
  padding: 20px 22px 22px;
  border-radius: var(--radius-md);
  background: var(--honey-light);
}

.prose .in-short h2 {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.prose .in-short ul {
  margin-top: 10px;
  color: var(--ink);
}

.note {
  margin-top: 20px;
  padding: 16px 20px;
  border-left: 5px solid var(--green-400);
  border-radius: var(--radius-sm);
  background: var(--green-50);
}

.prose .note p {
  margin-top: 0;
  color: var(--ink);
}

.prose .note p + p {
  margin-top: 8px;
}

.prose sup {
  line-height: 0;
}

.prose sup a {
  padding: 0 2px;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--grey-200);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  background: var(--green-50);
  color: var(--ink);
  font-weight: 800;
}

.prose tbody th {
  color: var(--ink);
  font-weight: 800;
}

.prose tr:last-child > * {
  border-bottom: 0;
}

.prose td .ar,
.prose th .ar {
  color: var(--flag);
  font-size: 1.6rem;
  line-height: 1.6;
}

.prose .word-row {
  margin-top: 14px;
}

.prose .word-source {
  margin-top: 6px;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  direction: rtl;
}

.prose .letter-grid {
  padding: 0;
}

.prose .letter-grid li + li {
  margin-top: 0;
}

.letter-grid li {
  display: grid;
  justify-items: center;
  padding: 8px 6px 10px;
  border: 2px solid var(--green-100);
  border-radius: var(--radius-md);
  background: var(--green-50);
  direction: ltr;
  text-align: center;
}

.letter-grid .ar {
  color: var(--flag);
  font-size: 2.2rem;
  line-height: 1.5;
}

.letter-grid small {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.sources {
  margin-top: 40px;
  padding-top: 8px;
  border-top: 2px solid var(--grey-100);
}

.prose .sources h2 {
  margin-top: 20px;
  font-size: 1.25rem;
}

.prose .sources ol {
  font-size: 0.93rem;
}

.about-box {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 36px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--flag);
  color: var(--white);
}

.about-box svg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.prose .about-box h2 {
  margin: 0;
  color: var(--white);
  font-size: 1.3rem;
}

.prose .about-box p {
  margin-top: 6px;
  color: var(--green-100);
}

.prose .about-box a {
  color: var(--white);
}

.related {
  margin-top: 36px;
}

.prose .related h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.prose .related ul,
.guide-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .prose .related ul,
  .guide-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prose .related li + li,
.guide-list li + li {
  margin-top: 0;
}

.guide-card {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 18px 20px;
  border: 2px solid var(--green-100);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.guide-card:hover {
  border-color: var(--green-300);
  color: var(--ink);
}

.guide-card strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.guide-card span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.guide-cluster + .guide-cluster {
  margin-top: 40px;
}

.prose .guide-cluster h2 {
  margin-top: 0;
}

.ayah-block {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--green-50);
  color: var(--flag);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  text-align: center;
}

.prose .ayah-block {
  color: var(--flag);
}

.prose .ayah-block + p {
  margin-top: 6px;
  text-align: center;
}

.guide-shot {
  max-width: 280px;
  margin: 24px auto 0;
}

.guide-shot picture {
  overflow: hidden;
  border: 6px solid var(--green-100);
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.guide-shot img {
  width: 100%;
  border-radius: 24px;
}

.guide-shot figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.93rem;
  text-align: center;
}

/* Printable tracker (the Ramadan plan). It prints on its own page. */
.tracker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.prose .tracker-grid {
  padding: 0;
}

.prose .tracker-grid li + li {
  margin-top: 0;
}

.tracker-grid li {
  display: grid;
  align-content: space-between;
  min-height: 84px;
  padding: 8px 10px;
  border: 2px solid var(--green-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.tracker-grid li::after {
  content: '';
  justify-self: end;
  width: 22px;
  height: 22px;
  border: 2px solid var(--green-300);
  border-radius: 50%;
}

@media print {
  .skip-link,
  .site-header,
  .site-footer,
  .breadcrumbs,
  .about-box,
  .related,
  .hero-moon-small {
    display: none !important;
  }

  body,
  .page-hero,
  .prose {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  .page-hero {
    padding: 0 0 12px;
  }

  .page-hero p,
  .page-hero h1 {
    color: #000000 !important;
  }

  .page-body {
    margin-top: 0;
  }

  .tracker {
    break-before: page;
  }

  .tracker-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .tracker-grid li {
    min-height: 90px;
    border-color: #555555;
    break-inside: avoid;
  }

  a {
    color: #000000;
    text-decoration: none;
  }
}

.goal-link {
  margin-top: 14px;
}

.goal-link a {
  color: var(--honey);
}

.goal-link a:hover {
  color: var(--honey-light);
}

/* Header links stay on one line; tighter spacing on narrower desktops so "Guides" fits. */
.nav-links a {
  white-space: nowrap;
}

@media (min-width: 960px) and (max-width: 1099px) {
  .nav-links a {
    padding: 8px 9px;
  }
}

.prose .guide-list {
  padding-left: 0;
}

.prose .guide-cluster {
  margin-top: 36px;
}

/* Arabic letters and Quran words inside running text: a little larger than the English around them. */
.prose p .ar,
.prose ul li .ar,
.prose ol:not(.letter-grid) li .ar {
  font-size: 1.25em;
  line-height: 1;
}

.prose p .quran,
.prose ul li .quran {
  color: var(--flag);
  font-size: 1.45em;
  line-height: 1;
}

/* Printable charts (the alphabet chart page): a print button, a large letter grid, and chart-only printing. */
.print-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 16px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--green-600);
  color: var(--white);
  font: 800 1rem var(--font-body);
  box-shadow: 0 4px 0 var(--green-700);
  cursor: pointer;
}

.print-button:hover {
  background: var(--green-500);
}

.letter-grid--large {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.letter-grid--large .ar {
  font-size: 3rem;
  line-height: 1.5;
}

.letter-grid--large small {
  font-size: 0.95rem;
}

.chart-sheet-footer {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

@media print {
  .print-button,
  .print-hide {
    display: none !important;
  }

  .prints-chart-only > :not(.chart-sheet) {
    display: none !important;
  }

  body:has(.prints-chart-only) .page-hero {
    display: none !important;
  }

  .letter-grid--large {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }

  .letter-grid--large li {
    border-color: #888888;
    background: #ffffff;
    break-inside: avoid;
  }

  .letter-grid--large .ar {
    font-size: 2.6rem;
  }
}

/* The quest path's world chips link to the matching guides. */
.chips a {
  color: inherit;
  text-decoration: none;
}

.chips a:hover {
  text-decoration: underline;
}

/* Large chart: three letters a row on phones, more on wider screens. */
.letter-grid--large {
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}

.letter-grid--large .ar {
  font-size: 2.6rem;
}

@media (min-width: 720px) {
  .letter-grid--large {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .letter-grid--large .ar {
    font-size: 3rem;
  }
}

@media print {
  .guide-shot,
  .table-wrap {
    break-inside: avoid;
  }
}

/* Printable worksheets (Ramadan worksheets page). Each worksheet prints on its own sheet. */
.worksheet {
  margin-top: 28px;
  padding: 22px 20px 24px;
  border: 2px dashed var(--green-300);
  border-radius: var(--radius-md);
  background: var(--white);
}

.prose .worksheet h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.prose .worksheet h3 {
  margin-top: 16px;
}

.worksheet-name {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.trace-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
  margin-top: 14px;
  direction: rtl;
}

.trace-row .ar {
  color: var(--green-200);
  font-size: 3.2rem;
  line-height: 1.6;
}

.word-hunt {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
  direction: rtl;
}

.prose .word-hunt {
  padding: 0;
}

.prose .word-hunt li + li {
  margin-top: 0;
}

.word-hunt li {
  display: grid;
  justify-items: center;
  padding: 10px 8px;
  border: 2px solid var(--green-100);
  border-radius: var(--radius-sm);
  direction: ltr;
  text-align: center;
}

.word-hunt .ar {
  color: var(--flag);
  font-size: 2.1rem;
  line-height: 1.6;
}

.word-hunt small {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.write-lines {
  height: 120px;
  margin-top: 14px;
  background: repeating-linear-gradient(to bottom, transparent 0 38px, var(--grey-200) 38px 40px);
}

@media print {
  .prints-worksheets-only > :not(.worksheet) {
    display: none !important;
  }

  body:has(.prints-worksheets-only) .page-hero {
    display: none !important;
  }

  .worksheet {
    margin: 0;
    border-color: #888888;
    break-after: page;
    break-inside: avoid;
  }

  .trace-row .ar {
    color: #bbbbbb !important;
  }

  .write-lines {
    background: repeating-linear-gradient(to bottom, transparent 0 38px, #999999 38px 40px);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
