/* The Quran page (/quran/:surah) */
.quran-page { max-width: 1180px; gap: 22px; }
.quran-page__header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.quran-page__intro { display: flex; flex-direction: column; gap: 6px; }
.quran-page__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 6vw, 52px); line-height: 1; margin: 0; }
.quran-page__lead { margin: 0; font-size: 15px; color: var(--text-body); }
.quran-page__toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.qp-toggle { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 8px 14px; font-size: 13px; font-weight: 600; }
.qp-toggle:hover { border-color: var(--ink); }
.qp-toggle.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.quran-page__body { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.quran-page__surahs { flex: 0 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 16px; }
.quran-page__find { width: 100%; }
.quran-page__list { list-style: none; margin: 0; padding: 2px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain; }
.quran-page__list li[hidden] { display: none; }
.qp-surah { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.qp-surah:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.qp-surah.is-current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.qp-surah__n { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--green); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.qp-surah.is-current .qp-surah__n { border-color: var(--peach); }
.qp-surah__names { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qp-surah__en { font-size: 15px; font-weight: 700; }
.qp-surah__meta { font-size: 12px; opacity: .8; }
.qp-surah__ar { font-size: 22px; line-height: 1.3; }

.quran-page__main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.qp-hero { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 26px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.qp-hero__text { display: flex; flex-direction: column; gap: 4px; }
.qp-hero__kicker { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-on-dark-muted); font-weight: 700; }
.qp-hero__name { font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1.1; margin: 0; }
.qp-hero__meaning { font-style: italic; color: var(--text-on-dark-muted); font-size: 24px; }
.qp-hero__side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.qp-hero__controls { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.qp-hero__reciter { background: var(--ink-raised); color: var(--paper); border-color: var(--ink-line); }
.qp-hero__recite { background: var(--peach); color: var(--ink); border: none; }
.qp-hero__recite:hover, .qp-hero__recite.is-playing { background: var(--paper); color: var(--ink); }
.qp-hero__mushaf { background: transparent; color: var(--paper); border: 1px solid var(--ink-line); }
.qp-hero__mushaf:hover { border-color: var(--paper); color: var(--paper); }
.qp-hero__ar { font-size: 40px; line-height: 1.3; color: var(--peach); }

.qp-basmala { margin: 0; font-size: 32px; line-height: 1.8; text-align: center; color: var(--green); }
.qp-memo { margin: 0; background: var(--sand-hover); border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 1.5; }
.qp-memo[hidden] { display: none; }

.qp-verses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.qp-verse { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; scroll-margin: 80px; }
.qp-verse.is-reciting { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.qp-verse.is-hidden { cursor: pointer; border-color: var(--line-dashed); border-style: dashed; }
.qp-verse.is-hidden .qp-verse__ar { filter: blur(9px); user-select: none; }
.qp-verse.is-hidden .qp-verse__en { visibility: hidden; }
.qp-verse__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.qp-verse__play { background: var(--sand); border: none; border-radius: var(--radius-pill); padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink); flex-shrink: 0; }
.qp-verse__play:hover { background: var(--line); }
.qp-verse__ar { margin: 0; font-size: clamp(24px, 4vw, 32px); line-height: 1.9; text-align: right; flex: 1; }
.qp-verse__num { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 4px; border-radius: 50%; border: 1.5px solid var(--green); color: var(--green); font-size: 18px; line-height: 1; vertical-align: middle; }
.qp-verse__en { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 1.45; color: var(--text-body); }
.qp-verse__en[hidden] { display: none; }
.qp-credit { margin: 0; font-size: 12px; }
.qp-pager { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }

.qp-vocab { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.qp-vocab__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.qp-vocab__title { margin: 0; font-size: 15px; font-weight: 600; }
.qp-vocab__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.qp-word { background: var(--paper); border-radius: var(--radius-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.qp-word__ar { font-size: 28px; line-height: 1.4; text-align: right; }
.qp-word__en { font-size: 14px; font-weight: 600; }
.qp-word__root { font-size: 12px; color: var(--text-muted); }
.qp-word__root .ar { font-size: 15px; }
.qp-word form { margin-top: 4px; }

@media (max-width: 860px) {
  .quran-page__surahs { position: static; flex-basis: 100%; }
  .quran-page__list { max-height: 260px; }
  .qp-hero__side { justify-content: flex-start; }
}
