/* ============================================================
   QuranTEL — Manuscript Design System — Warm Gold Palette
   Fonts: Cormorant Garamond (display) · Inter (body) · Scheherazade New (Arabic)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=EB+Garamond:wght@400;600&family=Inter:wght@300;400;500;600;700&family=Scheherazade+New:wght@400;500;600;700&display=swap');

/* ============================================================
   Design tokens — warm gold/dark palette
   ============================================================ */
:root {
  /* ── Core palette ── */
  --emerald:        #1a0f00;
  --emerald-deep:   #0d0700;
  --emerald-mid:    #2a1a05;
  --emerald-light:  #3d2a0a;
  --emerald-faint:  #f0e4c8;
  --olive:          #3d2a0a;
  --olive-faint:    #f5e6c8;
  --gold:           #c9a84c;
  --gold-deep:      #9a7a30;
  --gold-light:     #e8c97a;
  --gold-faint:     #f0d898;
  --parchment:      #f5e6c8;
  --parchment-deep: #e8d4a8;
  --ivory:          #faf3e0;
  --ink:            #0d0700;
  --ink-soft:       #2a1a05;
  --ink-muted:      #7a5c38;
  --ink-faint:      #c4a882;

  /* ── Semantic aliases ── */
  --bg-page:            var(--parchment);
  --bg-card:            var(--ivory);
  --bg-hero:            var(--emerald-deep);
  --text-base:          var(--ink);
  --text-muted:         var(--ink-muted);
  --text-on-dark:       #f5e6c8;
  --text-on-dark-muted: rgba(245, 230, 200, 0.72);
  --border:             rgba(13, 7, 0, 0.14);
  --border-gold:        rgba(201, 168, 76, 0.35);
  --border-dark:        rgba(245, 230, 200, 0.14);
  --line:               rgba(13, 7, 0, 0.14);

  /* ── Typography ── */
  --font-arabic:   'Scheherazade New', 'Traditional Arabic', serif;
  --font-display:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:     'Inter', ui-sans-serif, system-ui, sans-serif;

  /* ── Layout ── */
  --wrap:        min(1220px, calc(100vw - 44px));
  --radius:      4px;
  --radius-sm:   2px;
  --radius-card: 6px;
  --radius-pill: 999px;

  /* ── Elevation ── */
  --shadow-sm:   0 1px 4px rgba(13, 7, 0, 0.10), 0 3px 12px rgba(13, 7, 0, 0.07);
  --shadow-md:   0 4px 18px rgba(13, 7, 0, 0.14), 0 8px 32px rgba(13, 7, 0, 0.08);
  --shadow-lg:   0 12px 44px rgba(13, 7, 0, 0.18), 0 24px 64px rgba(13, 7, 0, 0.10);
  --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.22);

  /* ── Islamic geometric patterns ── */
  --geo-hero:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='rgba(201,168,76,0.13)' stroke-width='0.7'%3E%3Cpolygon points='66,40 50.2,35.8 58.4,21.6 44.2,29.8 40,14 35.8,29.8 21.6,21.6 29.8,35.8 14,40 29.8,44.2 21.6,58.4 35.8,50.2 40,66 44.2,50.2 58.4,58.4 50.2,44.2'/%3E%3Cline x1='40' y1='0' x2='40' y2='14'/%3E%3Cline x1='66' y1='40' x2='80' y2='40'/%3E%3Cline x1='40' y1='66' x2='40' y2='80'/%3E%3Cline x1='0' y1='40' x2='14' y2='40'/%3E%3Cline x1='0' y1='0' x2='21.6' y2='21.6'/%3E%3Cline x1='80' y1='0' x2='58.4' y2='21.6'/%3E%3Cline x1='0' y1='80' x2='21.6' y2='58.4'/%3E%3Cline x1='80' y1='80' x2='58.4' y2='58.4'/%3E%3C/g%3E%3C/svg%3E");
  --geo-light:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cg fill='none' stroke='rgba(201,168,76,0.09)' stroke-width='0.5'%3E%3Crect x='1' y='1' width='46' height='46'/%3E%3Cpolygon points='24,2 46,24 24,46 2,24'/%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-base);
  background-color: var(--bg-page);
  overflow-x: clip; /* prevent horizontal scroll from any overflow child */
}

a { color: inherit; text-decoration: none; }

p, h1, h2, h3, h4 { margin-top: 0; }

p { color: var(--text-muted); }

/* ============================================================
   Accessibility
   ============================================================ */
.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  color: var(--text-on-dark);
  background: var(--emerald);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   Layout utility
   ============================================================ */
.qt-wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* ============================================================
   Navigation header
   ============================================================ */
.qt-header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 243, 224, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

/* Gold accent stripe */
.qt-header::before,
.site-header::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--emerald-deep) 0%,
    var(--emerald-mid)  20%,
    var(--gold)         50%,
    var(--emerald-mid)  80%,
    var(--emerald-deep) 100%
  );
}

.qt-nav-wrap,
.nav-shell {
  width: var(--wrap);
  min-height: 44px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Brand ── */
.qt-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: max-content;
}

.qt-brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  background: var(--emerald);
  background-image: radial-gradient(circle at 35% 28%, rgba(201, 168, 76, 0.55) 0%, transparent 55%);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.qt-brand-logo {
  height: 44px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-copy {
  display: inline-block;
  line-height: 1;
}

.brand-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.brand-quran { color: var(--ink); }

.brand-tel {
  color: var(--gold-deep);
  font-weight: 700;
}

.brand-subtitle {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  color: var(--ink-muted);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Nav links ── */
.qt-nav,
.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.1rem;
}

.qt-nav a,
.nav-links a {
  padding: 0.48rem 0.68rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.qt-nav a:hover,
.qt-nav a.active,
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* ── Dropdown nav items ── */
.qt-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.qt-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.48rem 0.68rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  line-height: inherit;
}

.qt-dropdown-trigger:hover,
.qt-dropdown-trigger.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.qt-dropdown-trigger:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.qt-dropdown-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--ink-muted);
}

.qt-dropdown[data-open] .qt-dropdown-chevron {
  transform: rotate(180deg);
}

.qt-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  min-width: 220px;
  padding: 0.45rem 0;
  background: var(--ivory);
  border: 1px solid var(--border-gold);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.qt-dropdown-menu[hidden] { display: none; }

.qt-dropdown-menu a {
  display: block;
  padding: 0.58rem 1.15rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.12s, background-color 0.12s;
}

.qt-dropdown-menu a:hover {
  color: var(--ink);
  background: var(--gold-faint);
}

.qt-dropdown-menu a:focus-visible {
  color: var(--ink);
  background: var(--gold-faint);
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

/* ── Pill badge ── */
.qt-badge,
.nav-pill {
  display: inline-block;
  width: auto;
  max-width: fit-content;
  padding: 0.4rem 1.2rem;
  color: var(--gold-deep);
  background: var(--gold-faint);
  border: 1px solid rgba(201, 168, 76, 0.30);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qt-badge-light {
  color: var(--text-on-dark);
  background: rgba(245, 230, 200, 0.12);
  border-color: rgba(245, 230, 200, 0.28);
  margin-bottom: 14px;
}

/* ── Mobile menu toggle ── */
.qt-menu,
.nav-toggle {
  display: none;
  padding: 0.48rem 0.85rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ============================================================
   Hero — generic dark base
   ============================================================ */
.qt-hero {
  position: relative;
  overflow: clip;
  color: var(--text-on-dark);
  background-color: var(--emerald-deep);
  background-image:
    var(--geo-hero),
    radial-gradient(ellipse at 70% 40%, rgba(201, 168, 76, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 14% 68%, rgba(42, 26, 5, 0.55) 0%, transparent 44%);
  background-size: 80px 80px, auto, auto;
}

/* Gold hairline at hero base */
.qt-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, rgba(201, 168, 76, 0.5) 50%, var(--gold) 70%, transparent 100%);
}

/* ── Homepage hero — full-bleed image with gradient overlay ── */
.qt-home-hero {
  display: flex;
  width: 100%;
  min-height: 60vh;
  max-height: 60vh;
  overflow: hidden;
  background: #1a0f00;
}

.qt-home-hero-left {
  width: 35%;
  min-width: 35%;
  flex-shrink: 0;
  background: #1a0f00;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2rem 2rem 4%;
  position: relative;
  z-index: 2;
}

.qt-home-hero-left::after {
  content: '';
  position: absolute;
  top: 0;
  right: -40px;
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, #1a0f00, transparent);
  pointer-events: none;
}

.qt-home-hero-left h1,
.qt-home-hero-left .qt-hero-title {
  color: #faf3e0 !important;
  text-shadow: 2px 2px 12px rgba(0,0,0,0.95), 0 0 20px rgba(0,0,0,0.9);
}

.qt-home-hero-left p,
.qt-home-hero-left .qt-hero-sub {
  color: #e8d5a3 !important;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.9);
}

.qt-home-hero-right {
  flex: 1;
  background-image: url('assets/homepage_banner.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #1a0f00;
}

/* ── Inner content container (page heroes) ── */
.qt-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1480px, calc(100vw - 44px));
  margin-inline: auto;
  min-height: 560px;
  padding: 52px 44px;
  display: grid;
  grid-template-columns: 0.44fr 0.56fr;
  align-items: center;
  gap: 36px;
}

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

/* ── Inner page banner hero — 60vh with 547px floor so image is never cropped ── */
.qt-split-hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 547px;
  overflow: hidden;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #1a0f00;
}

.qt-split-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 3;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, rgba(201, 168, 76, 0.5) 50%, var(--gold) 70%, transparent 100%);
}

.qt-split-left {
  position: absolute;
  top: 50%;
  left: 4%;
  transform: translateY(-50%);
  z-index: 2;
  width: 45%;
  padding: 2.5rem 2rem 2.5rem 5%;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.qt-split-left h1,
.qt-split-left .qt-hero-title {
  margin: 0 0 1rem;
  color: #1a0f00;
  text-shadow: none;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.qt-split-left p {
  max-width: 440px;
  color: #2a1a05;
  font-size: 1rem;
  line-height: 1.6;
}

.qt-split-left .qt-badge-light { margin-bottom: 12px; }

.qt-split-left .qt-badge {
  color: #1a0f00;
  border-color: rgba(26,15,0,0.3);
  background: rgba(26,15,0,0.08);
}

/* ── Simple dark full-width hero (sub-pages, no image) — fixed 60vh ── */
.qt-simple-hero {
  position: relative;
  overflow: clip;
  height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-on-dark);
  background-color: var(--emerald-deep);
  background-image:
    var(--geo-hero),
    radial-gradient(ellipse at 70% 40%, rgba(201, 168, 76, 0.15) 0%, transparent 50%);
  background-size: 80px 80px, auto;
}

.qt-simple-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), rgba(201, 168, 76, 0.5), var(--gold), transparent);
}

.qt-simple-hero h1 {
  margin: 0 0 1rem;
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.qt-simple-hero p {
  max-width: 560px;
  color: var(--text-on-dark-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ── Hero caption line ── */
.qt-hero-caption {
  margin-top: 0.85rem;
  margin-bottom: 0;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Hero art panel ── */
.qt-hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qt-hero-art img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  object-position: center;
}

.qt-hero h1 {
  margin: 0 0 1rem;
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 3.4vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

/* ── Page-level hero ── */
.qt-page-hero {
  padding: clamp(3rem, 5.5vw, 4.5rem) 0;
}

.qt-page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 600;
}

.qt-lede,
.qt-hero p {
  max-width: 400px;
  color: var(--text-on-dark-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.qt-safety-note {
  margin-top: 0.85rem;
  color: var(--text-on-dark-muted);
  font-size: 0.87rem;
  line-height: 1.55;
}

/* ── Hero divider ── */
.qt-hero .qt-divider::before {
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.55));
}

.qt-hero .qt-divider::after {
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.55), transparent);
}

.qt-home-hero .qt-divider { margin: 1.1rem 0; }

/* ── Hero CTA buttons ── */
.qt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.qt-actions a,
.qt-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.15s, background-color 0.15s;
}

.qt-actions a:first-child,
.qt-btn-gold {
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.28);
}

.qt-actions a:first-child:hover,
.qt-btn-gold:hover {
  box-shadow: 0 6px 22px rgba(201, 168, 76, 0.44);
}

.qt-actions a + a,
.qt-btn-outline {
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.50);
}

.qt-actions a + a:hover,
.qt-btn-outline:hover {
  background: rgba(201, 168, 76, 0.16);
}

/* Single gold CTA used throughout pages */
.qt-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1.6rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.28);
  transition: box-shadow 0.15s;
}

.qt-cta-primary:hover {
  box-shadow: 0 6px 22px rgba(201, 168, 76, 0.44);
}

/* ── Home hero second CTA ── */
.qt-home-hero .qt-actions a + a {
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.50);
}

.qt-home-hero .qt-actions a + a:hover {
  background: rgba(201, 168, 76, 0.16);
}

.qt-status-note { margin-bottom: 0; font-size: 0.92rem; }

/* ============================================================
   Section chrome
   ============================================================ */
.qt-section {
  padding: clamp(3rem, 5.5vw, 5rem) 0;
}

.qt-section-soft {
  background-color: var(--ivory);
  background-image:
    var(--geo-light),
    radial-gradient(ellipse at 85% 5%, rgba(201, 168, 76, 0.07) 0%, transparent 35%);
  background-size: 48px 48px, auto;
  border-block: 1px solid var(--border);
}

.qt-section-ink {
  color: var(--text-on-dark);
  background-color: var(--emerald);
  background-image:
    var(--geo-hero),
    radial-gradient(ellipse at 12% 0%, rgba(42, 26, 5, 0.65) 0%, transparent 45%);
  background-size: 80px 80px, auto;
}

.qt-section.qt-section-ink h2 { color: var(--text-on-dark); }
.qt-section-ink p { color: var(--text-on-dark-muted); }

.qt-section-warm {
  background-color: var(--parchment-deep);
  background-image: var(--geo-light);
  background-size: 48px 48px;
  border-block: 1px solid var(--border);
}

.qt-compact { padding-block: 2.2rem; }

/* ── Section headings ── */
.qt-section-heading {
  max-width: 760px;
  margin-bottom: clamp(1.4rem, 2.8vw, 2rem);
}

.qt-kicker {
  display: inline-flex;
  margin-bottom: 0.5rem;
  color: var(--gold-deep);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.qt-section-ink .qt-kicker { color: var(--gold-light); }

.qt-section h2 {
  margin-bottom: 0.6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.qt-section-heading h2::after {
  content: '';
  display: block;
  margin-top: 0.6rem;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ============================================================
   Ornamental divider
   ============================================================ */
.qt-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.8rem 0;
}

.qt-divider::before,
.qt-divider::after {
  content: '';
  flex: 1;
  height: 1px;
}

.qt-divider::before {
  background: linear-gradient(90deg, transparent, var(--border-gold));
}

.qt-divider::after {
  background: linear-gradient(90deg, var(--border-gold), transparent);
}

.qt-divider-gem {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ============================================================
   Card grids
   ============================================================ */
.qt-grid-3,
.qt-grid-4 {
  display: grid;
  gap: 1.1rem;
}

.qt-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qt-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Module card ── */
.qt-module {
  position: relative;
  min-height: 165px;
  padding: 1.35rem 1.25rem;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-module::after {
  content: '';
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 56px;
  height: 56px;
  border: 1px solid var(--border-gold);
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0.5;
}

.qt-module h3 {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.qt-module p {
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
}

.qt-module strong,
.qt-module small {
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qt-module strong { color: var(--gold-deep); }

.qt-module small {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-muted);
}

/* Module link */
.qt-module-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  color: var(--gold-deep);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.qt-module-link:hover { border-bottom-color: var(--gold); }

/* Module icon — 8-pointed star */
.qt-module-icon {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 0.9rem;
  background: conic-gradient(
    from 22.5deg,
    var(--gold)      0deg,
    var(--emerald)   90deg,
    var(--gold)      180deg,
    var(--emerald)   270deg,
    var(--gold)      360deg
  );
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ── Cohort cards (seekers page) ── */
.qt-cohort-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.qt-cohort-card {
  position: relative;
  padding: 1.6rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.qt-cohort-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.qt-cohort-card p {
  margin: 0;
  font-size: 0.93rem;
  flex: 1;
}

.qt-cohort-card a {
  display: inline-flex;
  align-items: center;
  padding: 0.52rem 1rem;
  margin-top: 0.4rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-start;
  text-decoration: none;
  transition: box-shadow 0.15s;
}

.qt-cohort-card a:hover {
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.36);
}

/* ── Renewal pathway cards ── */
.qt-renewal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.qt-renewal-card {
  padding: 1.5rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.qt-renewal-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.qt-renewal-card p {
  margin: 0;
  font-size: 0.92rem;
  flex: 1;
}

.qt-renewal-card a {
  display: inline-flex;
  align-items: center;
  padding: 0.46rem 0.9rem;
  margin-top: 0.3rem;
  color: var(--gold-deep);
  background: var(--gold-faint);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  align-self: flex-start;
  text-decoration: none;
  transition: background-color 0.15s;
}

.qt-renewal-card a:hover {
  background: var(--gold-light);
}

/* ── Disclaimer box ── */
.qt-disclaimer {
  margin: clamp(1.5rem, 3vw, 2.5rem) 0;
  padding: 1.4rem 1.6rem;
  background: var(--ivory);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-disclaimer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.qt-disclaimer strong {
  color: var(--gold-deep);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Insight category cards ── */
.qt-insight-card {
  padding: 1.4rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-insight-card h3 {
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.qt-insight-card p {
  margin: 0;
  font-size: 0.92rem;
}

/* ── Sample question blocks ── */
.qt-question-block {
  padding: 1.3rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-question-block h3 {
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
}

.qt-question-block p {
  margin: 0;
  font-size: 0.92rem;
}

/* ── Sub-page content blocks ── */
.qt-content-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.qt-content-section + .qt-content-section {
  border-top: 1px solid var(--border);
}

.qt-content-block {
  max-width: 760px;
}

.qt-content-block h2 {
  margin-bottom: 0.8rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
}

.qt-content-block p {
  font-size: 1rem;
  line-height: 1.75;
}

.qt-content-block p + p { margin-top: 1rem; }

/* ============================================================
   Process / steps strip
   ============================================================ */
.qt-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: rgba(245, 230, 200, 0.05);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
}

.qt-process div {
  position: relative;
  min-height: 140px;
  padding: 1.1rem 1rem;
  border-right: 1px solid var(--border-dark);
}

.qt-process div:last-child { border-right: 0; }

.qt-process span {
  display: inline-grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  margin-bottom: 0.7rem;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
}

.qt-process strong {
  display: block;
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
}

.qt-process p {
  margin-bottom: 0;
  color: var(--text-on-dark-muted);
  font-size: 0.88rem;
}

/* ── Process steps on light/default backgrounds ── */
.qt-section-soft .qt-process {
  background: var(--bg-card);
  border-color: var(--border);
}

.qt-section-soft .qt-process div {
  border-right-color: var(--border);
}

.qt-section-soft .qt-process strong {
  color: var(--ink);
}

.qt-section-soft .qt-process p {
  color: var(--text-muted);
}

/* ── Chip row ── */
.qt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.qt-chip-row span {
  padding: 0.34rem 0.62rem;
  color: rgba(245, 230, 200, 0.82);
  background: rgba(245, 230, 200, 0.07);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================================================
   Split layout
   ============================================================ */
.qt-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

/* ── Layer / evidence stack panels ── */
.qt-layer-stack,
.qt-evidence-sample,
.qt-study-flow,
.qt-question-intro,
.qt-status-board article {
  padding: 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}

.qt-layer-stack { display: grid; gap: 0.6rem; }

.qt-layer-stack p,
.qt-evidence-sample p,
.qt-study-flow p,
.qt-status-board p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.68rem 0.8rem;
  background: linear-gradient(90deg, var(--emerald-faint), var(--gold-faint));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.qt-layer-stack strong,
.qt-evidence-sample strong,
.qt-study-flow strong,
.qt-status-board strong {
  color: var(--gold-deep);
  text-align: right;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Evidence chain ── */
.qt-evidence-chain,
.qt-editorial-seal {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-evidence-chain span,
.qt-editorial-seal strong {
  display: inline-flex;
  justify-content: center;
  padding: 0.42rem 0.62rem;
  color: var(--gold-deep);
  background: var(--gold-faint);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
}

.qt-evidence-chain i,
.qt-editorial-seal i {
  height: 1px;
  min-width: 18px;
  background: linear-gradient(90deg, var(--gold), rgba(201, 168, 76, 0.20));
}

.qt-editorial-seal { grid-template-columns: auto 1fr auto 1fr auto; }

/* ============================================================
   FAQ grid
   ============================================================ */
.qt-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.qt-faq-row {
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-faq-row h3 {
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
}

.qt-faq-row p { margin-bottom: 0; font-size: 0.93rem; }

.qt-faq-wide { grid-column: 1 / -1; }

/* ============================================================
   Status board
   ============================================================ */
.qt-status-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.qt-status-board h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}

.qt-status-board article {
  display: grid;
  align-content: start;
  gap: 0.65rem;
}

/* ============================================================
   Status ribbon (CTA band)
   ============================================================ */
.qt-status-ribbon {
  color: var(--text-on-dark);
  background-color: var(--emerald);
  background-image:
    var(--geo-hero),
    radial-gradient(ellipse at 90% 20%, rgba(201, 168, 76, 0.16) 0%, transparent 38%);
  background-size: 80px 80px, auto;
  padding: clamp(2.2rem, 4vw, 3rem) 0;
}

.qt-status-ribbon .qt-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.qt-status-ribbon strong {
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 500;
  line-height: 1.15;
}

.qt-status-ribbon p {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--text-on-dark-muted);
}

/* ── Mission band ── */
.qt-mission-band {
  padding: clamp(3.5rem, 6vw, 5rem) 0;
  background-color: var(--parchment-deep);
  background-image: var(--geo-light);
  background-size: 48px 48px;
  border-block: 1px solid rgba(13, 7, 0, 0.08);
  text-align: center;
}

.qt-mission-quote { max-width: 840px; margin-inline: auto; }

.qt-mission-quote p {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.qt-mission-quote cite {
  display: block;
  color: var(--gold-deep);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* ============================================================
   Form elements
   ============================================================ */
.qt-locked-control { display: grid; gap: 0.65rem; }

.qt-locked-control input,
.qt-locked-control button,
select {
  width: 100%;
  padding: 0.82rem 1rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
}

.qt-locked-control button {
  color: var(--text-on-dark);
  background: var(--emerald);
  border-color: var(--emerald);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.qt-locked-control button:hover { background: var(--emerald-mid); }

/* ── Access form ── */
.qt-access-form {
  display: grid;
  gap: 0.8rem;
  max-width: 480px;
}

.qt-access-form input {
  padding: 0.82rem 1rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
}

.qt-access-form input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.qt-access-form button {
  padding: 0.82rem 1.4rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.qt-access-form button:hover {
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.40);
}

.qt-preview-note,
.qt-feedback-status {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.2rem;
}

.qt-controlled-notice {
  max-width: 600px;
  display: grid;
  gap: 1rem;
}

/* ── Feedback form ── */
.qt-feedback-form-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.qt-feedback-form {
  display: grid;
  gap: 1.4rem;
}

.qt-form-row {
  display: grid;
  gap: 0.45rem;
}

.qt-form-row label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.qt-form-optional {
  color: var(--text-muted);
  font-weight: 400;
}

.qt-form-required {
  color: var(--gold);
  font-weight: 700;
}

.qt-feedback-form input,
.qt-feedback-form select,
.qt-feedback-form textarea {
  padding: 0.82rem 1rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
}

.qt-feedback-form textarea {
  resize: vertical;
  min-height: 140px;
}

.qt-feedback-form input:focus,
.qt-feedback-form select:focus,
.qt-feedback-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.qt-form-submit {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.qt-feedback-form button[type="submit"] {
  align-self: flex-start;
  padding: 0.82rem 2rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.qt-feedback-form button[type="submit"]:hover {
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.40);
}

/* ============================================================
   Boundary notice
   ============================================================ */
.qt-boundary {
  padding: clamp(2rem, 3.8vw, 2.8rem) 0;
  background: var(--ivory);
  border-top: 1px solid var(--border);
}

.qt-boundary .qt-wrap {
  display: grid;
  grid-template-columns: minmax(210px, 0.36fr) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.qt-boundary h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.8vw, 2.3rem);
  font-weight: 500;
}

.qt-boundary p { margin: 0; font-size: 0.95rem; }

/* ============================================================
   TEL layers
   ============================================================ */
.qt-tel-layers { display: grid; gap: 0.55rem; }

.qt-tel-layer {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(90deg, var(--emerald-faint), var(--gold-faint));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.qt-tel-num {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  color: var(--text-on-dark);
  background: var(--emerald);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
}

.qt-tel-body { display: grid; gap: 0.15rem; }
.qt-tel-title { color: var(--ink); font-size: 0.9rem; font-weight: 600; }

.qt-tel-desc {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ============================================================
   Audio panel
   ============================================================ */
.qt-audio-panel {
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}

.qt-audio-panel h3 {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.qt-audio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.qt-audio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.95rem;
  color: var(--ink);
  background: var(--gold-faint);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  transition: background-color 0.15s;
}

.qt-audio-link:hover { background: var(--gold-light); }
.qt-audio-link svg { flex-shrink: 0; }

.qt-audio-link-wide {
  width: 100%;
  justify-content: center;
}

/* ── Qur'an Resource Centre button grid (index.html panel) ── */
.qt-resource-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.qt-resource-actions .qt-audio-link {
  display: flex;
  width: 100%;
}

.qt-resource-actions .qt-audio-link-wide {
  grid-column: 1 / -1;
  justify-content: center;
}

/* ============================================================
   Controlled AI Layer section
   ============================================================ */
.qt-ai-layer {
  padding: clamp(3rem, 5.5vw, 5rem) 0;
  background-color: var(--parchment-deep);
  background-image: var(--geo-light);
  background-size: 48px 48px;
  border-block: 1px solid var(--border);
}

.qt-ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.qt-ai-feature {
  padding: 1.3rem 1.2rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-ai-feature h3 {
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.qt-ai-feature p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Governance / source badges ── */
.qt-governance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.qt-governance-chip {
  display: inline-flex;
  padding: 0.36rem 0.8rem;
  color: var(--gold-deep);
  background: var(--gold-faint);
  border: 1px solid rgba(201, 168, 76, 0.30);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   Admin resource intake
   ============================================================ */
.qt-intake-form {
  display: grid;
  gap: 1rem;
  max-width: 860px;
}

.qt-intake-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.qt-intake-form input,
.qt-intake-form select,
.qt-intake-form textarea {
  padding: 0.72rem 0.9rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  width: 100%;
}

.qt-intake-form input:focus,
.qt-intake-form select:focus,
.qt-intake-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.qt-intake-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.qt-intake-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.qt-intake-row {
  display: grid;
  gap: 0.35rem;
}

.qt-intake-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: block;
}

.qt-intake-row input,
.qt-intake-row select,
.qt-intake-row textarea {
  padding: 0.62rem 0.85rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.88rem;
  width: 100%;
}

.qt-intake-row input:focus,
.qt-intake-row select:focus,
.qt-intake-row textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.qt-intake-full { grid-column: 1 / -1; }

.qt-intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  padding-top: 0.5rem;
}

.qt-btn-intake-primary {
  padding: 0.72rem 1.5rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.qt-btn-intake-primary:hover {
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.38);
}

.qt-btn-intake-secondary {
  padding: 0.72rem 1.2rem;
  color: var(--ink-soft);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
}

.qt-btn-intake-secondary:hover {
  background: var(--parchment);
}

.qt-btn-intake-disabled,
.qt-disabled-action {
  padding: 0.72rem 1.2rem;
  color: var(--ink-faint);
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: not-allowed;
  opacity: 0.75;
}

.qt-intake-state-chip {
  display: inline-flex;
  padding: 0.26rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qt-state-quarantined { background: rgba(201, 168, 76, 0.15); color: var(--gold-deep); border: 1px solid var(--border-gold); }
.qt-state-pending     { background: rgba(42, 26, 5, 0.08);    color: var(--ink-soft);   border: 1px solid var(--border); }
.qt-state-approved    { background: rgba(20, 100, 60, 0.12);  color: #1a6040;           border: 1px solid rgba(20, 100, 60, 0.30); }
.qt-state-rejected    { background: rgba(180, 40, 40, 0.10);  color: #9a2020;           border: 1px solid rgba(180, 40, 40, 0.25); }
.qt-state-eligible    { background: rgba(30, 80, 160, 0.10);  color: #1a4080;           border: 1px solid rgba(30, 80, 160, 0.25); }

.qt-intake-method-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.qt-intake-method-tab {
  padding: 0.46rem 1rem;
  color: var(--ink-muted);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}

.qt-intake-method-tab:hover,
.qt-intake-method-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--gold-faint);
  border-color: var(--border-gold);
}

.qt-workflow-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.qt-workflow-step-num {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
}

.qt-workflow-step-body strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.qt-workflow-step-body p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

.qt-intake-notice {
  padding: 1rem 1.2rem;
  background: var(--ivory);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-card);
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.qt-intake-notice code {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  background: var(--parchment-deep);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  word-break: break-all;
}

/* ============================================================
   Footer
   ============================================================ */
.qt-footer,
.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 5.5vw, 4.5rem) 0;
  color: var(--text-on-dark-muted);
  background-color: var(--emerald-deep);
  background-image:
    var(--geo-hero),
    radial-gradient(ellipse at 12% 0%, rgba(201, 168, 76, 0.16) 0%, transparent 34%);
  background-size: 80px 80px, auto;
}

.qt-footer::before,
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}

.qt-footer-grid,
.footer-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) 0.7fr 0.7fr 1.2fr;
  gap: clamp(1.2rem, 3vw, 2.2rem);
}

.qt-footer-mark,
.qt-footer-logo {
  display: block;
  width: 62px;
  height: 62px;
  margin-bottom: 0.8rem;
  background: url('assets/logos/grey_gold_NB.png') center / contain no-repeat;
}

.qt-footer strong,
.footer-brand strong {
  display: block;
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
}

.qt-footer p,
.qt-footer span,
.qt-footer em,
.site-footer p {
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
}

.qt-footer h2,
.site-footer h2 {
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.qt-footer a,
.site-footer a {
  display: block;
  width: fit-content;
  margin: 0.28rem 0;
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s;
}

.qt-footer a:hover,
.site-footer a:hover { color: var(--text-on-dark); }

/* Footer bottom bar */
.qt-footer-bar {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.2rem;
  border-top: 1px solid rgba(245, 230, 200, 0.12);
  color: var(--text-on-dark-muted);
  font-size: 0.84rem;
}

/* ============================================================
   Page-specific hero right-half backgrounds
   ============================================================ */
.qt-split-right-evidence   { background-image: url('assets/evidence.png');          background-color: #cfc9be; }
.qt-split-right-engage     { background-image: url('assets/engage_with_quran.png'); background-color: #e0cdb2; }
.qt-split-right-insights   { background-image: url('assets/insights.png');           background-color: #d2bdaa; }
.qt-split-right-questions  { background-image: url('assets/questions.png');          background-color: #cab499; }
.qt-split-right-seekers    { background-image: url('assets/seekers.png');            background-color: #c6ac8b; }
.qt-split-right-renewal    { background-image: url('assets/Human_Renewal.png');      background-color: #ede4d3; }

/* ============================================================
   Arabic text
   ============================================================ */
[lang="ar"],
.qt-arabic,
.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.35em;
  line-height: 1.9;
}

/* ============================================================
   Verse display
   ============================================================ */
.qt-verse-hero {
  margin: 0 0 1rem;
  padding: 0.9rem 1.3rem;
  border-right: 3px solid var(--gold);
}

.qt-verse-hero blockquote {
  margin: 0;
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
  line-height: 2.0;
  color: var(--gold-light);
}

.qt-verse-cite {
  display: block;
  margin-top: 0.55rem;
  color: var(--gold-light);
  font-size: 0.74rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.09em;
  text-align: right;
}

/* Verse lookup card — shown when a specific verse reference is entered */
.qt-verse-card {
  border: 1px solid var(--border, #e5e5e0);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.qt-verse-card-heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--ink, #1a1a18);
}

.qt-verse-card-arabic {
  font-family: var(--font-arabic);
  font-size: 1.7rem;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  margin: 0 0 0.85rem;
  color: var(--ink, #1a1a18);
}

.qt-verse-card-arabic-missing {
  font-style: italic;
  color: var(--text-muted, #888);
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
}

/* Discovery result verse cards (used in quran-search.html and homepage inline search) */
.qt-discovery-verse-arabic {
  font-family: var(--font-arabic);
  font-size: 2rem;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  margin: 0 0 0.6rem;
  color: var(--ink, #1a1a18);
}

.qt-discovery-verse-arabic-missing {
  font-style: italic;
  color: var(--text-muted, #888);
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
}

.qt-verse-card-translation {
  line-height: 1.7;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--ink, #1a1a18);
}

.qt-verse-card-source {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin: 0;
}

/* ============================================================
   General utility
   ============================================================ */
.qt-note {
  margin-top: 0.8rem;
  color: var(--ink-faint);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ============================================================
   Responsive — tablet (≤ 1040px)
   ============================================================ */
@media (max-width: 1040px) {
  .qt-nav-wrap,
  .nav-shell {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0.75rem 0;
  }

  .qt-menu,
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .qt-nav,
  .nav-links {
    display: none;
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.55rem;
    padding-bottom: 0.4rem;
  }

  .qt-nav.is-open,
  .nav-links.is-open { display: flex; }

  .qt-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
  }

  .qt-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .qt-dropdown-menu {
    position: static;
    transform: none;
    left: auto;
    min-width: auto;
    width: 100%;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border-gold);
    border-top: none;
    border-radius: 0;
    padding: 0.15rem 0;
    background: transparent;
    white-space: normal;
  }

  .qt-dropdown-menu a {
    padding: 0.46rem 1rem 0.46rem 1.2rem;
  }

  .qt-hero-inner,
  .qt-split,
  .qt-footer-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .qt-hero-inner { min-height: auto; }

  .qt-hero-arch { display: none; }

  .qt-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .qt-ai-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qt-intake-2col,
  .qt-intake-3col { grid-template-columns: 1fr; }

  .qt-cohort-grid,
  .qt-renewal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .qt-process,
  .qt-status-board { grid-template-columns: 1fr; }

  .qt-process div {
    border-right: 0;
    border-bottom: 1px solid var(--border-dark);
    min-height: auto;
  }

  .qt-process div:last-child { border-bottom: 0; }

  .qt-evidence-chain { grid-template-columns: 1fr; }

  .qt-evidence-chain i,
  .qt-editorial-seal i {
    width: 1px;
    height: 16px;
    margin-inline: auto;
  }

  .qt-split-left { width: 55%; }
}

/* ============================================================
   Responsive — mobile (≤ 720px)
   ============================================================ */
@media (max-width: 720px) {
  :root { --wrap: min(100vw - 28px, 1220px); }

  .qt-home-hero {
    flex-direction: column;
    max-height: none;
  }

  .qt-home-hero-left {
    width: 100%;
    min-width: unset;
    padding: 2rem 1.5rem;
  }

  .qt-home-hero-right {
    width: 100%;
    min-height: 40vw;
    background-size: contain;
  }

  .qt-split-hero {
    height: auto;
    min-height: 56vw;
    background-size: contain;
  }

  .qt-simple-hero {
    height: auto;
    padding: 2.5rem 0;
  }

  .qt-split-left {
    position: absolute;
    left: 4%;
    right: 4%;
    width: auto;
    padding: 1.2rem 1rem;
    background: rgba(26,15,0,0.60);
    border-radius: 4px;
  }

  .qt-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 20px;
  }

  .qt-hero-art,
  .qt-hero-arch { display: none; }

  .qt-hero h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); }

  .qt-page-hero h1 { font-size: clamp(2rem, 10vw, 2.7rem); }

  .brand-title { font-size: 1.3rem; }
  .brand-subtitle { display: none; }

  .qt-brand-mark { width: 36px; height: 36px; }

  .qt-grid-3,
  .qt-grid-4,
  .qt-faq-grid,
  .qt-cohort-grid,
  .qt-renewal-grid,
  .qt-ai-feature-grid { grid-template-columns: 1fr; }

  .qt-resource-actions {
    grid-template-columns: 1fr;
  }

  .qt-resource-actions .qt-audio-link-wide {
    grid-column: 1;
  }

  .qt-status-ribbon .qt-wrap,
  .qt-boundary .qt-wrap {
    grid-template-columns: 1fr;
    display: grid;
  }

  .qt-layer-stack p,
  .qt-evidence-sample p,
  .qt-study-flow p,
  .qt-status-board p {
    display: grid;
    grid-template-columns: 1fr;
  }

  .qt-layer-stack strong,
  .qt-evidence-sample strong,
  .qt-study-flow strong,
  .qt-status-board strong { text-align: left; }

  .qt-actions { flex-direction: column; }
  .qt-actions a { width: 100%; }

  .qt-simple-hero h1 { font-size: clamp(2rem, 9vw, 2.8rem); }

  .qt-split-left h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
}

/* ============================================================
   Renewal pathway deep pages
   ============================================================ */

/* ── Banner hero: image-panel + text-panel ── */
.qt-pathway-hero {
  display: flex;
  min-height: 420px;
  background-color: var(--emerald-deep);
  border-bottom: 2px solid var(--gold);
}

.qt-pathway-hero-text {
  flex: 0 0 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 3.5rem);
  background-color: var(--emerald-deep);
  background-image:
    var(--geo-hero),
    radial-gradient(ellipse at 70% 35%, rgba(201, 168, 76, 0.12) 0%, transparent 55%);
  background-size: 80px 80px, auto;
  color: var(--text-on-dark);
}

.qt-pathway-hero-text .qt-module-link {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--gold-light);
  opacity: 0.85;
}

.qt-pathway-hero-text .qt-module-link:hover { opacity: 1; }

.qt-pathway-hero-text .qt-badge { margin-bottom: 0.9rem; }

.qt-pathway-hero-text h1 {
  margin: 0 0 1rem;
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.015em;
}

.qt-pathway-hero-text p {
  max-width: 420px;
  color: var(--text-on-dark-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.qt-pathway-hero-banner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 1.8rem 1.4rem 1rem;
  background-color: #0d0700;
}

.qt-pathway-hero-banner img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ── Readability: qt-faq-row text inside dark sections ── */
.qt-section-ink .qt-faq-row p {
  color: var(--ink-soft);
}

/* ── Reflection prompts ── */
.qt-reflection-prompts {
  display: grid;
  gap: 0.7rem;
  max-width: 760px;
}

.qt-reflection-prompt {
  padding: 1rem 1.2rem 1rem 1.4rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-card);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ── Mobile: pathway hero stacks vertically ── */
@media (max-width: 900px) {
  .qt-pathway-hero { flex-direction: column; min-height: auto; }
  .qt-pathway-hero-text { flex: none; order: 2; }
  .qt-pathway-hero-banner { order: 1; padding: 1.2rem 1.2rem 0.6rem; }
  .qt-pathway-hero-banner img { max-height: 56vw; }
}

/* ── Full-width banner hero v2 (renewal pathway pages) ── */
.qt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.qt-pathway-hero-v2 {
  border-bottom: 2px solid var(--gold);
  background: var(--emerald);
}

.qt-pathway-breadcrumb {
  padding: 0.6rem clamp(1.5rem, 4vw, 3.5rem);
  background: var(--emerald);
}

.qt-pathway-breadcrumb .qt-module-link {
  color: var(--gold-light);
  font-size: 0.875rem;
  opacity: 0.85;
}

.qt-pathway-breadcrumb .qt-module-link:hover { opacity: 1; }

.qt-pathway-hero-full {
  position: relative;
  line-height: 0;
  overflow: visible;
  aspect-ratio: 3 / 1;
  max-height: 545px;
  max-width: 1635px;
  margin-inline: auto;
}

.qt-pathway-hero-full img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Tagline overlaid on banner image ── */
.qt-pathway-tagline-overlay {
  position: absolute;
  z-index: 2;
  margin: 0;
  pointer-events: none;
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.35;
  color: #254336;
  letter-spacing: 0.01em;
}

/* fear-anxiety only: parchment area under subtitle, measured position */
.qt-fear-tagline-overlay {
  position: absolute;
  left: 6.1%;
  top: 69.7%;
  width: 36.6%;
  height: 14.7%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1rem, 1vw, 1.16rem);
  font-weight: 500;
  line-height: 1.28;
  color: #173f3a;
  letter-spacing: 0.01em;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 248, 226, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* emotional-steadiness only: pale blank area below subtitle, aligned with title */
.qt-emotional-tagline-overlay {
  position: absolute;
  left: 8.5%;
  top: 68.8%;
  width: 35.7%;
  height: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1rem, 0.95vw, 1.12rem);
  font-weight: 500;
  line-height: 1.25;
  color: #173f3a;
  letter-spacing: 0.01em;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 248, 226, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* character only: pale blank area below subtitle, aligned with title column */
.qt-character-tagline-overlay {
  position: absolute;
  left: 7%;
  top: 69.7%;
  width: 36.5%;
  height: 16%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1rem, 1vw, 1.16rem);
  font-weight: 500;
  line-height: 1.28;
  color: #173f3a;
  letter-spacing: 0.01em;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 248, 226, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* repentance-forgiveness only: pale blank area under subtitle */
.qt-repentance-tagline-overlay {
  position: absolute;
  left: 8.2%;
  top: 67.8%;
  width: 34.1%;
  height: 16.9%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1rem, 1vw, 1.16rem);
  font-weight: 500;
  line-height: 1.28;
  color: #173f3a;
  letter-spacing: 0.01em;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 248, 226, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* spiritual-healing only: measured from screenshot, blank pale area below title */
.qt-spiritual-tagline-overlay {
  position: absolute;
  left: 10.7%;
  top: 48.5%;
  width: 33%;
  height: 19%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.02rem, 1vw, 1.18rem);
  font-weight: 500;
  line-height: 1.28;
  color: #173f3a;
  letter-spacing: 0.01em;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 248, 226, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* grief-loss only: blank pale area below "For hearts…" line */
.qt-grief-tagline-overlay {
  position: absolute;
  left: 6.7%;
  top: 70.5%;
  width: 34.8%;
  height: 16%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1rem, 1vw, 1.16rem);
  font-weight: 500;
  line-height: 1.28;
  color: #173f3a;
  letter-spacing: 0.01em;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 248, 226, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* purpose only: pale blank area below baked subheading, measured position */
.qt-purpose-tagline-overlay {
  position: absolute;
  left: 7.3%;
  top: 66%;
  width: 34%;
  height: 17%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1rem, 1vw, 1.14rem);
  font-weight: 500;
  line-height: 1.28;
  color: #173f3a;
  letter-spacing: 0.01em;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 248, 226, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* desktop-hidden strip: shown only on mobile as fallback when overlay is used */
@media (min-width: 900px) {
  .qt-tagline-desktop-hidden { display: none; }
}

/* family-relationships only: exact position inside the blank outlined tile */
.qt-family-tagline-overlay {
  position: absolute;
  left: 52%;
  top: 40%;
  width: 44%;
  height: 12%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  box-sizing: border-box;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  font-weight: 500;
  line-height: 1.2;
  color: #254336;
  letter-spacing: 0.01em;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}

.qt-pathway-hero-tagline {
  padding: 1rem clamp(1.5rem, 4vw, 3.5rem) 1.2rem;
  background: var(--emerald);
  background-image:
    var(--geo-hero),
    radial-gradient(ellipse at 70% 35%, rgba(201, 168, 76, 0.12) 0%, transparent 55%);
  background-size: 80px 80px, auto;
}

.qt-pathway-hero-tagline p {
  max-width: 860px;
  color: var(--text-on-dark-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.qt-pathway-hero-v2 + .qt-wrap {
  margin-top: 0.6rem;
}

.qt-pathway-hero-v2 + .qt-wrap .qt-disclaimer {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* ============================================================
   Missing component styles — homepage hero
   ============================================================ */

/* Homepage hero title (used in index.html qt-home-hero-left) */
.qt-hero-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 3.5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
}

/* Homepage hero subtitle paragraph */
.qt-hero-sub {
  max-width: 400px;
  color: rgba(245, 230, 200, 0.85);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Homepage hero CTA button container */
.qt-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* Primary gold CTA button */
.qt-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1.4rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.28);
  transition: box-shadow 0.15s;
}

.qt-btn-primary:hover { box-shadow: 0 6px 22px rgba(201, 168, 76, 0.44); }

/* Secondary outline CTA button */
.qt-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1.4rem;
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.50);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.15s;
}

.qt-btn-secondary:hover { background: rgba(201, 168, 76, 0.16); }

/* ============================================================
   Responsive — mid-breakpoint (≤ 900px)
   3-column grids collapse to 2 columns before the 720px
   full-collapse, ensuring tablet (768px) stays clean.
   ============================================================ */
@media (max-width: 900px) {
  .qt-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   Responsive — mobile additions (≤ 720px)
   Layered on top of the existing 720px block above.
   ============================================================ */
@media (max-width: 720px) {

  /* ── Split-hero overlay: dark background requires light text ── */
  .qt-split-left h1,
  .qt-split-left .qt-hero-title {
    color: #faf3e0 !important;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.75);
  }

  .qt-split-left > p { color: rgba(245, 230, 200, 0.88) !important; }

  /* Dark-overlay badge variant */
  .qt-split-left .qt-badge:not(.qt-badge-light) {
    color: var(--gold-light);
    background: rgba(201, 168, 76, 0.18);
    border-color: rgba(201, 168, 76, 0.40);
  }

  /* ── Homepage hero title ── */
  .qt-hero-title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .qt-hero-sub   { max-width: 100%; }

  /* ── Homepage hero CTAs: stack full-width ── */
  .qt-hero-actions         { flex-direction: column; }
  .qt-btn-primary,
  .qt-btn-secondary        { width: 100%; justify-content: center; }

  /* ── Pathway banner: cover-crop instead of tiny letterbox ── */
  .qt-pathway-hero-full {
    aspect-ratio: unset;
    height: 46vw;
    max-height: 240px;
    min-height: 160px;
  }

  .qt-pathway-hero-full img {
    object-fit: cover;
    object-position: center 30%;
  }

  /* Hide absolute text overlays — mobile shows .qt-tagline-desktop-hidden instead */
  [class*="-tagline-overlay"] { display: none !important; }

  /* ── Forms: full-width submit buttons ── */
  .qt-feedback-form button[type="submit"] {
    width: 100%;
    align-self: stretch;
  }

  .qt-access-form button { width: 100%; }

  /* ── Status ribbon: scale down heading ── */
  .qt-status-ribbon strong { font-size: clamp(1.15rem, 5vw, 1.6rem); }

  /* ── Chip row: wrap text in chips ── */
  .qt-chip-row span { white-space: normal; word-break: break-word; }

  /* ── Pathway tagline strip ── */
  .qt-pathway-hero-tagline { padding: 0.85rem 1.1rem 1rem; }

  /* ── Arabic verse blockquote ── */
  .qt-verse-hero blockquote { font-size: clamp(1.3rem, 6vw, 1.8rem); }

  /* ── Dropdown items: minimum 44 px touch target ── */
  .qt-dropdown-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem 0.7rem 1.4rem;
  }

  /* ── Mobile menu toggle: minimum tap size ── */
  .qt-menu {
    min-height: 44px;
    min-width: 52px;
  }

  /* ── Brand: prevent overflow into menu button ── */
  .qt-brand { max-width: calc(100% - 72px); }

  /* ── Footer bottom bar: centred on narrow screens ── */
  .qt-footer-bar { text-align: center; }

  /* ── Boundary notice: single-column wrapping ── */
  .qt-boundary .qt-wrap { flex-direction: column; }
}

/* ============================================================
   Responsive — small phones (≤ 480px)
   Covers 360 px · 390 px · 412 px · 430 px Android widths.
   ============================================================ */
@media (max-width: 480px) {

  /* ── Tighter content gutter ── */
  :root { --wrap: min(100vw - 24px, 1220px); }

  /* ── Brand ── */
  .qt-brand-logo {
  min-width: 160px; height: 34px; }
  .qt-brand-mark { width: 34px; height: 34px; }
  .brand-title   { font-size: 1.18rem; }

  /* ── Nav header gap ── */
  .qt-nav-wrap { gap: 0.5rem; }

  /* ── Section h2 headings ── */
  .qt-section h2 { font-size: clamp(1.55rem, 7vw, 2rem); }

  /* ── Homepage hero ── */
  .qt-home-hero-left  { padding: 1.75rem 1.1rem; }
  .qt-home-hero-right { min-height: 50vw; }

  /* ── Homepage hero title ── */
  .qt-hero-title { font-size: clamp(1.9rem, 8.5vw, 2.5rem); }

  /* ── Simple-hero heading ── */
  .qt-simple-hero h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }

  /* ── Pathway banner ── */
  .qt-pathway-hero-full {
    height: 52vw;
    max-height: 220px;
    min-height: 148px;
  }

  .qt-pathway-hero-text h1 { font-size: clamp(1.75rem, 7vw, 2.4rem); }

  /* ── Mission quote ── */
  .qt-mission-quote p { font-size: clamp(1.1rem, 5.5vw, 1.5rem); }

  /* ── Status ribbon ── */
  .qt-status-ribbon strong { font-size: clamp(1.1rem, 5vw, 1.4rem); }

  /* ── Module / cohort / renewal cards: tighter padding ── */
  .qt-module       { padding: 1.1rem 1rem; min-height: auto; }
  .qt-cohort-card  { padding: 1.3rem 1.1rem; }
  .qt-renewal-card { padding: 1.2rem 1rem; }

  /* ── Disclaimer ── */
  .qt-disclaimer { padding: 1.1rem 1rem; }

  /* ── Process steps ── */
  .qt-process div { padding: 0.9rem 0.8rem; }

  /* ── Footer: reduce padding ── */
  .qt-footer { padding: clamp(2rem, 5vw, 3rem) 0; }

  /* ── CTA buttons: tighter padding on very small screens ── */
  .qt-btn-primary,
  .qt-btn-secondary { padding: 0.7rem 1.1rem; }

  /* ── Feedback submit already inherits width:100% from 720px rule ── */
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE SYSTEM
   Appended after all existing breakpoints.  Fills the 320–768 px gaps
   not fully addressed by the existing 1040 / 900 / 720 / 480 rules.
   Because this block appears later in the stylesheet it wins the
   cascade over any overlapping rule above (same specificity → later
   declaration wins).
   ═══════════════════════════════════════════════════════════════════ */

/* ── Global: safe image sizing (all viewports) ── */
img {
  max-width: 100%;
  height: auto;
}

/* ── Prevent horizontal scroll at the root level ── */
html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ============================================================
   Tablet  769 px – 1024 px
   ============================================================ */
@media (max-width: 1024px) {

  /* Boundary notice: collapse to single column */
  .qt-boundary .qt-wrap {
    grid-template-columns: 1fr !important;
  }

  /* Hero inner: tighter padding on tablets */
  .qt-hero-inner { padding: 40px 28px; }
}

/* ============================================================
   Mobile  320 px – 768 px
   Covers all phone widths: iPhone SE (375), iPhone 14 (390),
   Samsung Galaxy (360), narrow Android (320).
   This block overrides matching existing 720-px rules for the same
   selectors because it is later in the file.
   ============================================================ */
@media (max-width: 768px) {

  /* ── Split-hero: text panel on top, image visible in padding zone below ── */
  /*    Replaces the absolute-positioned text overlay with a proper stack.    */
  .qt-split-hero {
    height: auto;
    min-height: 0;
    display: block;
    overflow: hidden;
    background-size: 100% auto;        /* image fills full width, scales proportionally */
    background-position: center bottom; /* image anchors to the bottom padding zone      */
    background-repeat: no-repeat;
    padding-bottom: 56.25%;            /* 16:9 — creates image zone below the text panel */
  }

  .qt-split-left {
    position: relative;   /* take out of absolute flow so it sits above the image zone */
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    padding: 2rem 1.25rem;
    background: rgba(13, 7, 0, 0.88); /* dark panel keeps text readable on any image */
    border-radius: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }

  /* Light text on the now-dark split-left panel */
  .qt-split-left h1,
  .qt-split-left .qt-hero-title {
    color: #faf3e0 !important;
    font-size: clamp(1.6rem, 6.5vw, 2.5rem);
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.75);
  }

  .qt-split-left > p {
    color: rgba(245, 230, 200, 0.88) !important;
    max-width: 100%;
  }

  .qt-split-left .qt-badge:not(.qt-badge-light) {
    color: var(--gold-light);
    background: rgba(201, 168, 76, 0.18);
    border-color: rgba(201, 168, 76, 0.40);
  }

  /* ── Simple hero: drop fixed 60 vh so it doesn't crowd narrow screens ── */
  .qt-simple-hero {
    height: auto;
    min-height: 0;
    padding: 3rem 0 2.5rem;
  }

  /* ── Arabic text: prevent overflow on narrow viewports ── */
  [lang="ar"],
  .qt-arabic,
  .arabic {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .qt-verse-hero blockquote {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* ── Tables: horizontal scroll instead of overflow ── */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* ── All content grids: full single-column at 768 px ── */
  /*    (qt-grid-3 was 2-col down to 720 px; close the gap)  */
  .qt-grid-3,
  .qt-grid-4,
  .qt-cohort-grid,
  .qt-renewal-grid,
  .qt-ai-feature-grid,
  .qt-faq-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Process steps ── */
  .qt-process { grid-template-columns: 1fr !important; }

  .qt-process div {
    border-right: 0;
    border-bottom: 1px solid var(--border-dark);
    min-height: auto;
  }

  .qt-process div:last-child { border-bottom: 0; }

  /* ── Status board ── */
  .qt-status-board { grid-template-columns: 1fr !important; }

  /* ── Evidence chain ── */
  .qt-evidence-chain,
  .qt-editorial-seal { grid-template-columns: 1fr !important; }

  .qt-evidence-chain i,
  .qt-editorial-seal i {
    width: 1px;
    height: 16px;
    margin-inline: auto;
  }

  /* ── Boundary notice ── */
  .qt-boundary .qt-wrap {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }

  /* ── Footer: centred columns on mobile ── */
  .qt-footer-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .qt-footer-mark,
  .qt-footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .qt-footer a,
  .site-footer a {
    margin-left: auto;
    margin-right: auto;
  }

  /* ── Status / governance chips ── */
  .qt-intake-state-chip,
  .qt-governance-chip {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  /* ── Status ribbon: stack heading and text ── */
  .qt-status-ribbon .qt-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }

  /* ── Layer stack rows: wrap label to second line ── */
  .qt-layer-stack p,
  .qt-evidence-sample p,
  .qt-study-flow p {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .qt-layer-stack strong,
  .qt-evidence-sample strong,
  .qt-study-flow strong {
    text-align: left;
  }

  /* ── Action rows: full-width stacked buttons ── */
  .qt-actions { flex-direction: column; }

  .qt-actions a,
  .qt-actions button {
    width: 100%;
    justify-content: center;
  }

  /* ── Homepage hero CTAs ── */
  .qt-hero-actions { flex-direction: column; }

  .qt-btn-primary,
  .qt-btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* ── Home hero: ensure right panel doesn't collapse to zero ── */
  .qt-home-hero-right { min-height: 48vw; }
}

/* ============================================================
   Small phones  ≤ 480 px — supplements existing 480 px block
   ============================================================ */
@media (max-width: 480px) {

  /* ── Slightly taller image zone on very narrow phones ── */
  .qt-split-hero { padding-bottom: 65%; }

  /* ── Tighter text panel padding ── */
  .qt-split-left { padding: 1.5rem 1rem; }

  .qt-split-left h1,
  .qt-split-left .qt-hero-title {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }

  /* ── Footer links: full-width so they don't orphan ── */
  .qt-footer a,
  .site-footer a {
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   Interactive search / question panel
   ============================================================ */
.qt-search-section {
  background: var(--ivory);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0 2rem;
}

.qt-search-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.qt-search-panel-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.qt-search-row {
  display: flex;
  gap: 0.5rem;
}

.qt-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  background: var(--bg-page);
  color: var(--ink);
  transition: border-color 0.15s, outline 0.15s;
}

.qt-search-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.qt-search-btn {
  padding: 0.75rem 1.4rem;
  background: var(--ink);
  color: var(--ivory);
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.qt-search-btn:hover { background: var(--emerald-mid); }

.qt-search-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Browse themes toggle ── */
.qt-browse-themes {
  margin-top: 0.75rem;
}

.qt-browse-themes-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.12s, color 0.12s;
}

.qt-browse-themes-btn:hover {
  background: var(--gold-faint);
  color: var(--ink);
}

/* ── Topic chips ── */
.qt-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.qt-topic-chips-hidden {
  display: none;
}

.qt-topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.85rem;
  background: var(--bg-page);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
  letter-spacing: 0.01em;
}

.qt-topic-chip:hover {
  background: var(--gold-faint);
  color: var(--ink);
  border-color: var(--gold);
}

/* ── Filter chips (insights) ── */
.qt-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0 1.5rem;
}

.qt-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.85rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  text-decoration: none;
}

.qt-filter-chip:hover,
.qt-filter-chip.active {
  background: var(--gold-faint);
  color: var(--ink);
  border-color: var(--gold);
}

/* ── Action cards (engage, home, etc.) ── */
.qt-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.qt-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.2rem 1.3rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  border-top: 2px solid var(--gold);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}

.qt-action-card:hover {
  box-shadow: var(--shadow-sm);
}

.qt-action-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.qt-action-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.qt-action-card-cta {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-deep);
  text-decoration: none;
}

/* ── Pathway chips (seekers, renewal) ── */
.qt-pathway-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.qt-pathway-chip {
  display: inline-flex;
  padding: 0.48rem 1.1rem;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  background: var(--ivory);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.qt-pathway-chip:hover {
  background: var(--gold-faint);
  color: var(--ink);
  border-color: var(--gold);
}

/* ── Source preview cards (evidence) ── */
.qt-source-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.qt-source-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.2rem;
}

.qt-source-card-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.45rem;
}

.qt-source-card-ref {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.qt-source-card-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.qt-source-card-status {
  font-size: 0.75rem;
  color: #1a6040;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Care note (renewal, small boundary) ── */
.qt-care-note {
  background: rgba(201, 168, 76, 0.07);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

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

/* ── Accordion ── */
.qt-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-top: 1.5rem;
}

.qt-accordion-item {
  border-bottom: 1px solid var(--border);
}

.qt-accordion-item:last-child { border-bottom: 0; }

.qt-accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 1.25rem;
  background: var(--bg-card);
  border: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  gap: 0.75rem;
  transition: background-color 0.12s;
}

.qt-accordion-trigger:hover,
.qt-accordion-trigger[aria-expanded="true"] { background: var(--gold-faint); }

.qt-accordion-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.qt-accordion-trigger[aria-expanded="true"] .qt-accordion-chevron {
  transform: rotate(180deg);
}

.qt-accordion-body {
  padding: 0 1.25rem 1.1rem;
  background: var(--ivory);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.qt-accordion-body[hidden] { display: none; }

/* ── Mode / how-to-engage selector (engage page) ── */
.qt-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.qt-mode-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, background-color 0.12s;
}

.qt-mode-card:hover {
  background: var(--gold-faint);
  box-shadow: var(--shadow-sm);
}

.qt-mode-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin: 0;
}

.qt-mode-card-desc {
  font-size: 0.79rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Popular / starter question cards ── */
.qt-popular-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.qt-popular-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  border-left: 3px solid var(--gold);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.12s;
}

.qt-popular-card:hover {
  box-shadow: var(--shadow-sm);
  border-left-color: var(--gold-deep);
}

.qt-popular-card-q {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}

.qt-popular-card-cta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin-top: auto;
  padding-top: 0.2rem;
}

/* ── How-it-works 3-step (evidence page) ── */
.qt-steps-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.qt-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qt-step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.qt-step-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.qt-step-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Compact boundary notice ── */
.qt-boundary-compact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.4rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2rem;
  line-height: 1.6;
}

/* ── Responsive: new components ── */
@media (max-width: 900px) {
  .qt-action-grid { grid-template-columns: repeat(2, 1fr); }
  .qt-mode-grid   { grid-template-columns: repeat(2, 1fr); }
  .qt-source-cards{ grid-template-columns: repeat(2, 1fr); }
  .qt-popular-grid{ grid-template-columns: repeat(2, 1fr); }
  .qt-steps-3     { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .qt-action-grid,
  .qt-mode-grid,
  .qt-source-cards,
  .qt-popular-grid,
  .qt-steps-3 {
    grid-template-columns: 1fr !important;
  }

  .qt-search-row { flex-direction: column; }
  .qt-search-btn { width: 100%; }
  .qt-search-panel { padding: 1.25rem 1rem 1rem; }
  .qt-search-section { padding: 1.5rem 0 1.25rem; }
}

/* ============================================================
   Global Language Selector
   ============================================================ */

.qt-lang-selector-wrap {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 1100;
}

.qt-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--emerald-deep);
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: 0.02em;
}

.qt-lang-btn:hover,
.qt-lang-btn[aria-expanded="true"] {
  background: var(--emerald-mid);
  border-color: var(--gold);
}

.qt-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 270px;
  max-height: 380px;
  background: var(--ivory);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.qt-lang-dropdown[hidden] { display: none; }

.qt-lang-dropdown.qt-lang-open { display: flex; }

.qt-lang-dropdown-search {
  margin: 10px 10px 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.82rem;
  background: var(--bg-page);
  color: var(--text-base);
  outline: none;
  flex-shrink: 0;
}

.qt-lang-dropdown-search:focus {
  border-color: var(--gold);
}

.qt-lang-list {
  overflow-y: auto;
  flex: 1;
}

.qt-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-base);
  transition: background 0.1s;
}

.qt-lang-option:hover {
  background: var(--gold-faint);
}

.qt-lang-option.qt-lang-active {
  background: var(--gold-faint);
  font-weight: 600;
  color: var(--ink);
}

.qt-lang-option-flag {
  font-size: 1.1em;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.qt-lang-option-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qt-lang-option-native {
  font-size: 0.78rem;
  color: var(--ink-muted);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .qt-lang-selector-wrap {
    top: 8px;
    right: 8px;
  }
  .qt-lang-dropdown {
    width: calc(100vw - 28px);
    right: 0;
  }
  .qt-lang-btn {
    padding: 5px 10px;
    font-size: 0.76rem;
  }
}

/* FINAL CLEAN HEADER IMAGE LOGO */
.qt-header .qt-image-brand {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 245px !important;
  min-width: 245px !important;
  height: 72px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  text-decoration: none !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
}

.qt-header .qt-image-brand-logo {
  display: block !important;
  width: 225px !important;
  height: auto !important;
  max-height: 58px !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* FINAL CLEAN FOOTER LOGO */
.qt-footer-logo-clean {
  display: block !important;
  width: 245px !important;
  max-width: 245px !important;
  height: auto !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.qt-footer-logo-clean img {
  display: block !important;
  width: 245px !important;
  max-width: 245px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Hide old footer logo hooks only, not footer layout */
.qt-footer-mark,
.qt-footer-logo,
.qt-footer-text-brand {
  display: none !important;
}

@media (max-width: 760px) {
  .qt-header .qt-image-brand {
    width: 175px !important;
    min-width: 175px !important;
    height: 58px !important;
  }

  .qt-header .qt-image-brand-logo {
    width: 165px !important;
    max-height: 44px !important;
  }

  .qt-footer-logo-clean,
  .qt-footer-logo-clean img {
    width: 190px !important;
    max-width: 190px !important;
  }
}


/* QuranTEL final header/footer logo background and sizing fix */
.qt-header,
.qt-nav-wrap {
  background: #faf4e2;
}

.qt-image-brand {
  display: flex;
  align-items: center;
  background: transparent !important;
  line-height: 0;
}

.qt-image-brand-logo {
  display: block;
  width: 178px;
  max-width: 178px;
  height: auto;
  background: #faf4e2 !important;
  object-fit: contain;
}

.qt-footer-logo-clean {
  display: block;
  width: 245px;
  max-width: 245px;
  margin: 0 0 1.15rem 0;
  background: transparent !important;
  line-height: 0;
}

.qt-footer-logo-clean img {
  display: block;
  width: 245px;
  max-width: 245px;
  height: auto;
  background: #120b02 !important;
  object-fit: contain;
}

.qt-footer-grid > section[aria-label="QuranTEL brand and mission"] {
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


/* Footer logo final sizing/position fix */
.qt-footer-logo-clean {
  width: 285px !important;
  max-width: 285px !important;
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  background: transparent !important;
  line-height: 0 !important;
}

.qt-footer-logo-clean img {
  width: 285px !important;
  max-width: 285px !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .qt-footer-logo-clean,
  .qt-footer-logo-clean img {
    width: 215px !important;
    max-width: 215px !important;
  }
}


/* FOOTER LOGO SURGERY START */
.qt-footer-brand-block{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  min-height:170px !important;
}

.qt-footer-logo-clean{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  line-height:0 !important;
}

.qt-footer-logo-clean img{
  display:block !important;
  width:340px !important;
  max-width:100% !important;
  height:auto !important;
  object-fit:contain !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

@media (max-width: 760px){
  .qt-footer-brand-block{
    min-height:auto !important;
    justify-content:center !important;
  }

  .qt-footer-logo-clean{
    justify-content:center !important;
  }

  .qt-footer-logo-clean img{
    width:260px !important;
  }
}
/* FOOTER LOGO SURGERY END */

/* FOOTER LOGO ONLY — use cream_gold as-is */
.qt-footer-brand-block,
.qt-footer section[aria-label="QuranTEL brand and mission"] {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 170px !important;
}

.qt-footer-logo-clean {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 330px !important;
  max-width: 330px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  line-height: 0 !important;
}

.qt-footer-logo-clean img {
  display: block !important;
  width: 330px !important;
  max-width: 330px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .qt-footer-brand-block,
  .qt-footer section[aria-label="QuranTEL brand and mission"] {
    min-height: auto !important;
    justify-content: center !important;
  }

  .qt-footer-logo-clean {
    justify-content: center !important;
    width: 250px !important;
    max-width: 250px !important;
  }

  .qt-footer-logo-clean img {
    width: 250px !important;
    max-width: 250px !important;
  }
}

/* FOOTER LOGO ONLY — cream_gold_brown final */
.qt-footer section[aria-label="QuranTEL brand and mission"],
.qt-footer-brand-block {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 170px !important;
}

.qt-footer-logo-clean {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 340px !important;
  max-width: 340px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  line-height: 0 !important;
}

.qt-footer-logo-clean img {
  display: block !important;
  width: 340px !important;
  max-width: 340px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .qt-footer section[aria-label="QuranTEL brand and mission"],
  .qt-footer-brand-block {
    min-height: auto !important;
    justify-content: center !important;
  }

  .qt-footer-logo-clean,
  .qt-footer-logo-clean img {
    width: 260px !important;
    max-width: 260px !important;
  }
}

/* ===== FOOTER LOGO ONLY ===== */
.qt-footer-logo-clean {
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 360px !important;
  max-width: 360px !important;
  padding: 0 !important;
  margin: 6px 0 10px 0 !important;
  box-shadow: none !important;
  border: 0 !important;
}

.qt-footer-logo-clean img {
  display: block !important;
  width: 360px !important;
  max-width: 360px !important;
  height: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .qt-footer-logo-clean,
  .qt-footer-logo-clean img {
    width: 260px !important;
    max-width: 260px !important;
  }
}

/* FOOTER LOGO EMERGENCY RESTORE — footer only */
.qt-footer-logo-clean {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 340px !important;
  max-width: 340px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  line-height: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.qt-footer-logo-clean img {
  display: block !important;
  width: 340px !important;
  max-width: 340px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.qt-footer section[aria-label="QuranTEL brand and mission"] {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 170px !important;
}



/* QURANTEL FOOTER LOGO FIX */
.qt-footer-logo{
  display:block;
  width:320px !important;
  max-width:100%;
  height:auto !important;
  object-fit:contain;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}

/* push footer logo into a cleaner vertical position */
footer img.qt-footer-logo,
.site-footer img.qt-footer-logo{
  margin: 8px 0 14px 0 !important;
}

/* QURANTEL FOOTER LOGO POSITION POLISH — FOOTER ONLY */
.qt-footer section[aria-label="QuranTEL brand and mission"]{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  min-height:190px !important;
  padding-top:6px !important;
}

.qt-footer section[aria-label="QuranTEL brand and mission"] .qt-footer-logo-clean,
.qt-footer section[aria-label="QuranTEL brand and mission"] .qt-footer-logo,
.qt-footer section[aria-label="QuranTEL brand and mission"] img{
  display:block !important;
  width:360px !important;
  max-width:360px !important;
  height:auto !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  object-fit:contain !important;
  object-position:left center !important;
}

.qt-footer section[aria-label="QuranTEL brand and mission"] .qt-footer-logo-clean{
  transform:translateY(-6px) !important;
}

@media (max-width:760px){
  .qt-footer section[aria-label="QuranTEL brand and mission"]{
    justify-content:center !important;
    min-height:auto !important;
    padding-top:0 !important;
  }

  .qt-footer section[aria-label="QuranTEL brand and mission"] .qt-footer-logo-clean,
  .qt-footer section[aria-label="QuranTEL brand and mission"] .qt-footer-logo,
  .qt-footer section[aria-label="QuranTEL brand and mission"] img{
    width:260px !important;
    max-width:260px !important;
    object-position:center center !important;
  }

  .qt-footer section[aria-label="QuranTEL brand and mission"] .qt-footer-logo-clean{
    transform:none !important;
  }
}

/* FOOTER LOGO DIRECT ASSET FIX — cream_gold_brown */
.qt-footer-logo-clean {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 360px !important;
  max-width: 360px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  line-height: 0 !important;
}

.qt-footer-logo-clean img,
.qt-footer-logo {
  display: block !important;
  width: 360px !important;
  max-width: 360px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.qt-footer section[aria-label="QuranTEL brand and mission"],
.qt-footer-brand-block {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 170px !important;
}

@media (max-width: 760px) {
  .qt-footer-logo-clean,
  .qt-footer-logo-clean img,
  .qt-footer-logo {
    width: 260px !important;
    max-width: 260px !important;
  }
}

/* FOOTER LOGO TRUE TRANSPARENT FINAL */
.qt-footer-logo-clean,
.qt-footer-logo {
  display: block !important;
  width: 430px !important;
  max-width: 430px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.qt-footer-logo-clean img {
  display: block !important;
  width: 430px !important;
  max-width: 430px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.qt-footer section[aria-label="QuranTEL brand and mission"],
.qt-footer-brand-block {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

@media (max-width: 760px) {
  .qt-footer-logo-clean,
  .qt-footer-logo,
  .qt-footer-logo-clean img {
    width: 280px !important;
    max-width: 280px !important;
  }
}

/* FOOTER LOGO SIZE FINAL OVERRIDE */
.qt-footer-logo-clean,
.qt-footer-logo-clean img,
.qt-footer img[src*="cream_gold_brown"],
.qt-footer img[src*="qurantel-footer-logo"] {
  width: 390px !important;
  max-width: 390px !important;
  height: auto !important;
}

.qt-footer section[aria-label="QuranTEL brand and mission"] {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 190px !important;
}

