/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg: #080d10;
  --bg-elevated: #0e1519;
  --card: #121d24;
  --card-hover: #182a34;
  --text: #e0e8ec;
  --text-dim: #6a8fa0;
  --border: #1c3040;
  --border-soft: #152530;
  --accent: #3ec1a8;
  --accent-dim: rgba(62, 193, 168, 0.12);
  --gold: #c9a84c;
  --gold-dim: rgba(201, 168, 76, 0.12);
  --gold-border: rgba(201, 168, 76, 0.3);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Georgia", "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============================================================
   GEOMETRIC PATTERN LAYER
   ============================================================ */
.pattern-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      var(--accent) 48px,
      var(--accent) 49px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      var(--accent) 48px,
      var(--accent) 49px
    );
}

/* ============================================================
   LANDING LAYOUT
   ============================================================ */
.landing {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- top nav ---- */
.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nav-link {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--accent); }

/* ---- hero ---- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 28px;
  text-align: center;
}

.bismillah {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 18px;
  opacity: 0.7;
  font-family: "Traditional Arabic", "Scheherazade New", serif;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-title {
  margin: 0 0 14px;
  font-size: clamp(38px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #fff;
}

.site-title em {
  font-style: italic;
  color: var(--accent);
}

.site-tagline {
  margin: 0 0 38px;
  font-size: clamp(14px, 2vw, 17px);
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   SEARCH / SURAH SELECTOR
   ============================================================ */
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 620px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: rgba(62, 193, 168, 0.5);
  box-shadow:
    0 0 0 3px var(--accent-dim),
    0 4px 32px rgba(0, 0, 0, 0.5);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 16px;
  padding: 18px 0;
  caret-color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* ---- results dropdown ---- */
.results {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
}

.result-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 18px;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  transition: background 0.1s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
}

.result-row:hover,
.result-row.active {
  background: var(--card-hover);
}

.result-row:last-child { border-bottom: 0; }

.result-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(62, 193, 168, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.result-copy { min-width: 0; flex: 1; }

.result-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
  color: var(--text);
  line-height: 1.3;
}

.result-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

/* ============================================================
   ORNAMENT
   ============================================================ */
.ornament {
  text-align: center;
  color: var(--accent);
  font-size: 20px;
  margin: 0 0 8px;
  opacity: 0.5;
  letter-spacing: 6px;
}

/* ============================================================
   SURAH CHIPS (browse section)
   ============================================================ */
.browse-section {
  padding: 0 24px 36px;
}

.browse-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.surah-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.surah-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.surah-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip-count {
  font-size: 11px;
  opacity: 0.5;
}

/* ============================================================
   RECENTLY ADDED / MARQUEE SECTION
   ============================================================ */
.recent-section {
  padding: 0 0 36px;
}

.recent-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.marquee-wrap {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee-scroll 45s linear infinite;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (pointer: coarse), (max-width: 768px) {
  .marquee-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .marquee-wrap::-webkit-scrollbar { display: none; }
  .marquee-track { animation: none !important; }
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.2s;
  min-width: 300px;
  max-width: 300px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.video-card:hover {
  background: var(--card-hover);
  border-color: rgba(62, 193, 168, 0.35);
}

.video-card-surah {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.video-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin: 0;
}

.video-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.video-card-speaker {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px 14px 28px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.footer-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.stat-subvalue {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-disclaimer {
  margin: 0;
  max-width: 580px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  text-align: right;
}

.footer-disclaimer p { margin: 0; }
.footer-disclaimer a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.footer-disclaimer a:hover { color: var(--accent); }

/* ============================================================
   VERSE / DETAIL PAGE
   ============================================================ */
.page {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page > .top-nav {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb-sep {
  margin: 0 6px;
  opacity: 0.4;
}

/* ---- verse header ---- */
.verse-header {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 24px;
}

.verse-header-surah {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.verse-header-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.verse-header-translation {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.verse-nav-arrows {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.verse-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.verse-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.verse-nav-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

/* ---- video grid on detail page ---- */
.videos-section {
  margin-bottom: 20px;
}

.videos-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media screen and (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.2s;
}

.video-item:hover {
  border-color: rgba(62, 193, 168, 0.35);
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.video-item-meta {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.video-speaker-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(62, 193, 168, 0.3);
}

.video-verses-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  text-decoration: none;
  transition: opacity 0.15s;
}

.video-verses-badge:hover { opacity: 0.85; }

/* ---- commentary list (transcripts + fallback videos) ---- */
.commentary-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transcript-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
}

.transcript-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.video-link-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  margin-left: auto;
}

.video-link-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.transcript-body {
  padding: 12px 32px 36px;
}

.transcript-body h2 {
  margin: 36px 0 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}

.transcript-body h3 {
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.transcript-body h3:first-child {
  margin-top: 16px;
}

.transcript-body h3 a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.transcript-body h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.transcript-body p {
  margin: 0 0 20px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text);
  letter-spacing: 0.01em;
}

.transcript-body strong {
  color: #fff;
  font-weight: 600;
}


/* ============================================================
   AYAH GRID (surah page)
   ============================================================ */
.ayah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ayah-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.2s;
}

.ayah-card:hover {
  background: var(--card-hover);
  border-color: rgba(62, 193, 168, 0.35);
}

.ayah-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ayah-card-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.ayah-card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 3px 10px;
}

.ayah-card-translation {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ayah-card-speakers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.speaker-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(62, 193, 168, 0.2);
  border-radius: 999px;
  padding: 2px 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.overview-card {
  grid-column: 1 / -1;
  border-color: var(--gold-border);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.07) 0%, var(--card) 60%);
}

.overview-card:hover {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.13) 0%, var(--card-hover) 60%);
}

.overview-card .ayah-card-num {
  color: var(--gold);
}

.overview-notice {
  padding: 12px 16px;
}

.overview-notice p {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.has-tafseer-video {
  padding-bottom: 96px;
}

.tafseer-video-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  background: rgba(8, 13, 16, 0.95);
  border-top: 1px solid var(--border);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.5);
}

.footer-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.footer-close:hover {
  color: var(--accent);
  background: rgba(62, 193, 168, 0.12);
}

.footer-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 121;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.footer-toggle.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.footer-toggle svg {
  width: 14px;
  height: 14px;
}

.tafseer-video-dock[hidden] {
  display: none !important;
}

.tafseer-video-dock__inner {
  display: flex;
  align-items: stretch;
  gap: 14px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 40px calc(12px + env(safe-area-inset-bottom, 0px)) 20px;
}

.tafseer-video-thumb {
  flex-shrink: 0;
  display: block;
  width: 120px;
  border-radius: 8px;
  overflow: hidden;
  align-self: center;
  border: 1px solid var(--border-soft);
  line-height: 0;
}

.tafseer-video-thumb img {
  display: block;
  width: 120px;
  height: auto;
  aspect-ratio: 120 / 68;
  object-fit: cover;
}

.tafseer-video-dock__center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.tafseer-video-scrub__track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(62, 193, 168, 0.15);
  overflow: hidden;
}

.tafseer-video-scrub__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #45d6bc);
  transition: width 0.08s linear;
}

.tafseer-video-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tafseer-video-times {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tafseer-video-times__sep {
  font-weight: 500;
  color: var(--text-dim);
}

.tafseer-video-disclaimer {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-dim);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tafseer-video-playcol {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: center;
}

.tafseer-video-playbtn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, transform 0.1s;
}

.tafseer-video-playbtn:hover {
  background: rgba(62, 193, 168, 0.1);
}

.tafseer-video-playbtn:active {
  transform: scale(0.96);
}

.tafseer-video-playbtn svg {
  width: 26px;
  height: 26px;
}

.tafseer-video-playbtn__icon-pause {
  display: none;
}

.tafseer-video-playbtn.is-playing .tafseer-video-playbtn__icon-play {
  display: none;
}

.tafseer-video-playbtn.is-playing .tafseer-video-playbtn__icon-pause {
  display: block;
}

.tafseer-video-speed {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tafseer-video-speed__btn {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--bg);
  color: var(--text-dim);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.2;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tafseer-video-speed__btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.tafseer-video-speed__btn.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(62, 193, 168, 0.12);
}

.tafseer-video-speed__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tafseer-yt-host {
  position: fixed;
  width: 2px;
  height: 2px;
  bottom: 0;
  left: 0;
  opacity: 0.02;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* ============================================================
   UTILITY
   ============================================================ */
a { color: var(--accent); }
a:hover { color: var(--gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .hero {
    justify-content: flex-start;
    padding-top: 22px;
  }

  .site-tagline {
    margin-bottom: 24px;
    max-width: 100%;
  }

  .search-wrap { max-width: 100%; }
  .search-box { border-radius: 12px; padding: 0 14px; }
  .search-input { font-size: 15px; padding: 14px 0; }
  .results { border-radius: 12px; max-height: 60vh; }

  .page { padding: 20px 14px 0; }
  .verse-header { padding: 18px; }
  .verse-header-title { font-size: 22px; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px 20px;
  }

  .footer-disclaimer {
    max-width: 100%;
    text-align: left;
    font-size: 12px;
  }

  .browse-section { padding: 0 14px 36px; }
  .breadcrumb { font-size: 12px; }
  .contribute-card { padding: 18px; }
  .transcript-body { padding: 10px 18px 28px; }
  .transcript-header { padding: 14px 18px; }

  .ayah-grid {
    grid-template-columns: 1fr;
  }

  .tafseer-video-dock__inner {
    flex-wrap: wrap;
    padding-left: 14px;
    padding-right: 14px;
    gap: 10px;
  }

  .tafseer-video-thumb,
  .tafseer-video-thumb img {
    width: 96px;
  }

  .tafseer-video-playbtn {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 520px) {
  .top-nav { gap: 10px; padding: 14px; }
  .nav-link { font-size: 12px; }
  .site-title { font-size: clamp(30px, 11vw, 40px); }
  .bismillah { font-size: 22px; }
  .result-row { padding: 12px 14px; }
  .result-icon { width: 34px; height: 34px; font-size: 13px; }
  .result-badge { display: none; }
}
