/* ============================================================
   Single-Surah pages (/surah/<slug>.html) — layered on listen.css
   ============================================================ */
.sp { max-width: 820px; padding-bottom: var(--space-6); }

.sp-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.8rem;
  padding-block: clamp(1rem, 3vw, 2rem) 2rem;
  border-bottom: 1px solid var(--border-soft);
}
.sp-num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}
.sp-ar { font-family: "Amiri", "Traditional Arabic", "Scheherazade New", serif; font-size: clamp(2rem, 6vw, 2.8rem); color: var(--gold-bright); line-height: 1.4; }
.sp-title { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
.sp-meaning { color: var(--ink-soft); font-style: italic; font-weight: 500; }
.sp-by { color: var(--ink-soft); }
.sp-by a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }

.sp-facts { list-style: none; margin: 0.3rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.sp-facts li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--surface);
}
.sp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 0.6rem; }
.sp-actions .btn svg { margin-right: 0.15rem; }
.sp-note { color: var(--ink-muted); font-size: 0.85rem; }
.sp-soon { color: var(--ink-soft); font-style: italic; max-width: 52ch; }

.sp-section { padding-top: 2rem; }
.sp-section h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-bottom: 0.7rem; }
.sp-section p { color: var(--ink-soft); font-size: 1.04rem; line-height: 1.85; margin: 0 0 1rem; }
.sp-section p a, .sp-link { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.sp-section .sp-actions { justify-content: flex-start; margin-top: 0; }
.sp-section .faq-list { max-width: none; }

/* Themes (the translator's section headings) */
.sp-themes { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--border-soft); }
.sp-themes li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border-soft); color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; line-height: 1.4; }
.sp-th-r { color: var(--gold); font-family: var(--font-body, inherit); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 0.2rem; }

/* Translation excerpt */
.sp-ayah { position: relative; margin: 0 0 0.9rem; padding: 0.95rem 1.2rem 0.95rem 4.4rem; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.sp-ayah-n { position: absolute; left: 1rem; top: 1.05rem; color: var(--gold); font-size: 0.8rem; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.sp-section .sp-ayah p { margin: 0 0 0.3rem; color: var(--ink); font-family: var(--font-display); font-size: 1.16rem; line-height: 1.55; }
.sp-section .sp-ayah p:last-child { margin-bottom: 0; }
.sp-section p.sp-cite { margin-top: 1.1rem; font-size: 0.92rem; color: var(--ink-muted); }
@media (max-width: 560px) {
  .sp-themes li { grid-template-columns: 1fr; gap: 0.15rem; }
  .sp-ayah { padding: 2.2rem 1rem 0.9rem; }
  .sp-ayah-n { top: 0.8rem; left: 1rem; }
  .sp-section .sp-ayah p { font-size: 1.08rem; }
}

.sp-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}
.sp-nav a { color: var(--ink); display: grid; gap: 0.15rem; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.sp-nav a span { font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.sp-nav a:hover { color: var(--gold-bright); }
.sp-nav-next { text-align: right; }
.sp-nav .sp-nav-all { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .sp-nav { grid-template-columns: 1fr 1fr; }
  .sp-nav .sp-nav-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

/* Surah names in the Listen grid now link to their pages */
.surah-name a { color: inherit; }
.surah-name a:hover { color: var(--gold-bright); }

/* Crawlable list of all 114 Surahs on the Listen page */
.surah-index { padding-block: var(--space-5) var(--space-6); }
.surah-index h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); text-align: center; margin-bottom: 0.5rem; }
.surah-index > p { text-align: center; color: var(--ink-soft); margin: 0 auto 1.5rem; max-width: 60ch; }
.surah-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 0.35rem 1.2rem;
}
.surah-index a { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.35rem 0; color: var(--ink-soft); border-bottom: 1px solid var(--border-soft); }
.surah-index a:hover { color: var(--gold-bright); }
.si-n { color: var(--gold); font-size: 0.8rem; min-width: 1.8rem; }
.si-m { color: var(--ink-muted); font-size: 0.82rem; margin-left: auto; text-align: right; }

/* ---------- Phones: tidier hero ---------- */
@media (max-width: 560px) {
  .sp-head { gap: 0.6rem; padding-bottom: 1.6rem; }
  .sp-num { width: 46px; height: 46px; font-size: 1.15rem; }
  .sp-title { font-size: 2rem; }
  .sp-meaning { display: block; font-size: 0.62em; margin-top: 0.2rem; }
  .sp-by { font-size: 0.95rem; }
  .sp-facts { gap: 0.4rem; }
  .sp-facts li { font-size: 0.78rem; padding: 0.25rem 0.7rem; }
  /* Play full width, Download + Share side by side underneath */
  .sp-head .sp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; width: 100%; }
  .sp-head .sp-actions > :first-child { grid-column: 1 / -1; }
  .sp-head .sp-actions .btn { width: 100%; justify-content: center; padding-inline: 0.8rem; white-space: nowrap; }
  .sp-section p { font-size: 1rem; line-height: 1.75; }
}
