/* Raah · Read the Qur'an pages (surahs, index, passages). Same tokens as the homepage:
   light by default, the green "Zumurrud" theme when the visitor picks dark. */
:root {
  --bg: #FFFFFF; --line: rgba(160, 111, 24, .22); --line-soft: rgba(60, 60, 67, .12);
  --gold: #A06F18; --gold-2: #B47E20; --gold-soft: rgba(160, 111, 24, .08); --on-gold: #FFFFFF;
  --text: #111111; --muted: rgba(60, 60, 67, .78); --dim: rgba(60, 60, 67, .55);
  --nav: rgba(255, 255, 255, .85); --panel: #F7F6F2; --store-bg: #111111; --store-fg: #FFFFFF;
  --serif: 'Instrument Serif', Georgia, serif; --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --arabic: 'Amiri Quran', 'Amiri', serif; --urdu: 'Noto Nastaliq Urdu', serif;
}
:root[data-theme="dark"] {
  --bg: #07120E; --line: rgba(217, 178, 111, .18); --line-soft: rgba(246, 240, 225, .09);
  --gold: #D9B26F; --gold-2: #EBC57E; --gold-soft: rgba(217, 178, 111, .08); --on-gold: #1B1408;
  --text: #F6F0E1; --muted: #AEB9B2; --dim: #7E8C85;
  --nav: rgba(7, 18, 14, .8); --panel: #0E1F18; --store-bg: #F6F0E1; --store-fg: #0B1410;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
html, body { overflow-x: clip; max-width: 100%; }
body { background: var(--bg); color: var(--text); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }
.read { max-width: 820px; }

/* Header */
.nav { position: sticky; top: 0; z-index: 20; background: var(--nav); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-soft); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 36px; height: 36px; border-radius: 9px; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.04em; }
.wordmark i { font-style: normal; color: var(--gold); }
.brand small { color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 4px; }
.nav nav { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 600; }
.nav nav > a:not(.btn):hover { color: var(--gold); }
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; padding: 10px 18px; font-size: 14.5px; transition: background .2s; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-2); }
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--gold); cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-btn .moon { fill: currentColor; stroke: none; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (max-width: 560px) { .hide-sm { display: none; } .nav nav { gap: 10px; } .btn { padding: 9px 14px; } }

/* Title block */
.crumbs { font-size: 13.5px; color: var(--dim); margin: 26px 0 0; }
.crumbs a:hover { color: var(--gold); }
.surah-head { text-align: center; padding: 26px 0 8px; }
.ar-name { font-family: var(--arabic); color: var(--gold); font-size: clamp(34px, 7vw, 48px); line-height: 1.9; margin-bottom: 6px; }
.surah-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 8vw, 64px); line-height: 1; letter-spacing: -.01em; margin-top: 2px; }
.meta { color: var(--muted); font-size: 15px; margin-top: 12px; }
.ur-name { font-family: var(--urdu); font-size: 17px; margin-top: 4px; line-height: 2.2; }
.intro { color: var(--muted); max-width: 620px; margin: 14px auto 0; font-size: 16px; }
.intro a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 6px; }
.chips button { font: 600 13.5px var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: all .2s; }
.chips button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.pills a { font-size: 14px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.pills a:hover { border-color: var(--gold); color: var(--gold); }

/* Ayaat */
.bismillah { font-family: var(--arabic); color: var(--gold); text-align: center; font-size: clamp(24px, 5vw, 30px); line-height: 2; margin: 22px 0 4px; }
.part { font-size: 20px; text-align: center; margin: 44px 0 0; display: flex; justify-content: center; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.part a:hover { color: var(--gold); }
.part span { font-family: var(--arabic); color: var(--gold); font-weight: 400; font-size: 26px; }
.ayah { padding: 26px 0 24px; border-bottom: 1px solid var(--line-soft); }
.ayah-head { display: flex; }
.num { font-size: 12.5px; font-weight: 700; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.ar { font-family: var(--arabic); font-size: clamp(26px, 5.6vw, 34px); line-height: 2.15; text-align: right; margin-top: 10px; }
.ar .end { color: var(--gold); font-size: .78em; }
.tl { color: var(--gold); font-style: italic; font-size: 15.5px; margin-top: 10px; }
.en { margin-top: 10px; }
.ur { font-family: var(--urdu); font-size: 18.5px; line-height: 2.35; text-align: right; margin-top: 10px; }
.hi { margin-top: 10px; font-size: 16.5px; line-height: 1.85; }
.notes { margin-top: 12px; font-size: 14px; color: var(--muted); }
.notes summary { cursor: pointer; font-weight: 600; color: var(--dim); width: fit-content; }
.notes summary:hover { color: var(--gold); }
.notes div { margin-top: 10px; }
.notes b { color: var(--text); font-weight: 700; margin-right: 6px; }
.notes .note-ur { font-family: var(--urdu); line-height: 2.3; }
body.hide-tl .t-tl, body.hide-en .t-en, body.hide-ur .t-ur, body.hide-hi .t-hi { display: none; }

/* App promo */
.app-card { display: flex; align-items: center; gap: 16px; margin: 30px 0; padding: 18px 20px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); }
.app-card > svg { width: 52px; height: 52px; border-radius: 13px; flex: none; }
.app-card div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.app-card b { font-size: 16px; }
.app-card span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.store { flex: none; display: inline-flex; align-items: center; gap: 10px; background: var(--store-bg); color: var(--store-fg); border-radius: 14px; padding: 9px 16px 9px 12px; }
.store svg { width: 24px; height: 24px; }
.store span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 700; font-size: 16px; color: var(--store-fg); }
.store small { font-size: 9.5px; font-weight: 600; letter-spacing: .06em; opacity: .8; }
@media (max-width: 600px) { .app-card { flex-wrap: wrap; } .app-card div { min-width: calc(100% - 70px); } .app-card .store { margin-left: 68px; } }

/* Prev / next and lists */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.pn { border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; font-weight: 700; display: flex; flex-direction: column; }
.pn small { color: var(--dim); font-weight: 600; font-size: 12.5px; }
.pn.next { text-align: right; }
.pn:hover { border-color: var(--gold); color: var(--gold); }
.more { text-align: center; margin: 10px 0 60px; }
.more h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; }
.slist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 30px 0 10px; }
@media (max-width: 680px) { .slist { grid-template-columns: 1fr; } }
.srow { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line-soft); border-radius: 18px; padding: 12px 16px; transition: border-color .2s; }
.srow:hover { border-color: var(--gold); }
.sn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 13.5px; }
.sname { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sname b { font-size: 16px; }
.sname small { color: var(--muted); font-size: 12.5px; }
.sar { font-family: var(--arabic); color: var(--gold); font-size: 22px; line-height: 1.6; }

/* Footer */
.foot { border-top: 1px solid var(--line-soft); padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); color: var(--dim); font-size: 13.5px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--gold); }
.credits { line-height: 1.6; margin-bottom: 14px; }
.credits a { text-decoration: underline; text-underline-offset: 3px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 18px; }
@media (max-width: 600px) { .foot { text-align: center; } .foot-row { justify-content: center; } .foot-row nav { justify-content: center; } }

/* Share */
.ayah-head { justify-content: space-between; align-items: center; }
.share { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: transparent; color: var(--gold); border-radius: 999px; width: 34px; height: 34px; justify-content: center; cursor: pointer; transition: all .2s; font: 700 14px var(--sans); }
.share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share:hover { border-color: var(--gold); background: var(--gold-soft); }
.share-lg { width: auto; height: auto; padding: 10px 18px; background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.share-lg:hover { background: var(--gold-2); }
.head-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.ghost { border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14px; }
.ghost:hover { border-color: var(--gold); color: var(--gold); }
.solo .ayah { border-bottom: 0; }
.solo .ar { font-size: clamp(30px, 6.4vw, 40px); }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: all .3s; pointer-events: none; z-index: 50; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
