/* Qur'an reader (arriqaaq.com/quran/). One column, white page, nothing on screen
   that is not the text until you ask for it (tap the page, Kindle-style).
   Colours, type and measure come from the site's tokens (tokens.css, loaded
   first); the only hex values here are the tajweed colours, a documented
   exception in DESIGN.md -> Qur'an reader. */
@font-face{font-family:"QPC Hafs";src:url(../fonts/hafs.woff2) format("woff2");font-display:block}
@font-face{font-family:"IndoPak";src:url(../fonts/indopak.woff2) format("woff2");font-display:swap}
@font-face{font-family:"Surah Names";src:url(../fonts/surah.woff2) format("woff2");font-display:block}

:root{
  --bg:var(--page); --soft:var(--ink-2); --muted:var(--ink-3);
  --faint:color-mix(in srgb,var(--ink-3) 52%,var(--page)); --veil:var(--line-strong);
  --wash:var(--surface); --accent:var(--pine-ink); --accent-wash:var(--pine-soft);
  --bar:color-mix(in srgb,var(--page) 90%,transparent);
  --shadow:0 10px 40px color-mix(in srgb,var(--ink) 12%,transparent),0 1px 3px color-mix(in srgb,var(--ink) 6%,transparent);
  /* QPC Hafs, not the site's Amiri Quran: the word timings and tajweed rules are keyed to the QPC text */
  --quran:"QPC Hafs",var(--font-arabic);
  --serif:var(--font-read); --sans:var(--font-sans);
  --ar-size:31px; --ease:cubic-bezier(.22,.61,.36,1);
}
/* tajweed colours: the --tj-* tokens in tokens.css (shared with the tour's Qur'an step) */
:root[data-script="indopak"]{--quran:"IndoPak","QPC Hafs",serif}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:30vh}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 var(--sans);
  -webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;
  transition:background-color .3s,color .3s}
a{color:inherit}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
svg{width:22px;height:22px;fill:currentColor;display:block}
[hidden]{display:none!important}

/* ---------- top bar (hides while reading) ---------- */
.bar{position:fixed;top:0;left:0;right:0;z-index:30;padding-top:env(safe-area-inset-top);
  background:var(--bar);backdrop-filter:saturate(160%) blur(14px);-webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid var(--line);transition:transform .35s var(--ease),opacity .35s}
.bar-in{max-width:56rem;margin:0 auto;height:52px;display:flex;align-items:center;gap:6px;padding:0 8px}
.chrome-off .bar{transform:translateY(-105%);opacity:0}
/* Landing page only: arriqaaq.com's own header and footer (assets/chrome.js mounts SiteHeader and
   SiteFooter in shadow roots on these hosts). Before it runs, or without JavaScript, the plain
   links inside show instead. */
.site-chrome{display:contents}
.chrome-fallback{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:4px;height:var(--topbar-h,60px);padding:0 10px;
  overflow-x:auto;background:var(--bar);font:500 14px var(--sans);white-space:nowrap}
.chrome-fallback a{color:var(--ink-2);text-decoration:none;min-height:44px;display:inline-flex;align-items:center;padding:0 10px}
.chrome-fallback .brand{color:var(--ink);padding-right:12px}
.site-foot:not(.is-mounted){max-width:40rem;margin:0 auto;padding:0 16px 40px}
.brand{font:600 16px var(--sans);text-decoration:none;padding:0 6px;letter-spacing:-.02em;min-height:44px;display:flex;align-items:center;gap:8px}
.brand .flower{width:22px;height:22px}
.brand--sub{font-weight:500;color:var(--ink-2);padding-left:2px}
.brand-sep{color:var(--line-strong);font-weight:400}
.sp{flex:1}
.ic{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;color:var(--soft);font-size:15px;font-weight:600;flex:none}
.ic:hover{background:var(--wash);color:var(--ink)}
.bar-title{flex:1;text-align:center;font-size:14px;color:var(--soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bt-en{font-weight:600;color:var(--ink)}
.bt-v:not(:empty)::before{content:" · "}
.progress{position:fixed;top:0;left:0;height:2px;width:0;background:var(--accent);z-index:31;opacity:.6;
  transition:opacity .3s}
.chrome-off .progress{opacity:0} /* full screen while reading: it comes back with the bar */

/* ---------- surah list ---------- */
.list-wrap{max-width:40rem;margin:0 auto;padding:24px 16px 80px}
/* the site's landing voice: an eyebrow with a pigment square, one split heading (DESIGN.md -> Copy) */
.intro{padding:40px 0 28px}
/* the home page has no bar of its own: the site header sits right above */
.home .list-wrap{padding-top:8px}
.home .intro{padding-top:24px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;font:600 var(--fs-eyebrow)/1.3 var(--sans);
  letter-spacing:var(--ls-eyebrow);text-transform:uppercase;color:var(--pine-ink)}
.eyebrow::before{content:"";width:8px;height:8px;border-radius:2px;background:var(--pine)}
.eyebrow [lang="ar"]{font:500 15px/1 var(--font-arabic);letter-spacing:0}
.intro h1{font:500 var(--fs-section)/1.08 var(--sans);letter-spacing:-.04em;margin:0;max-width:16ch;text-wrap:balance}
.intro h1 em{font-style:normal;color:var(--pine-ink)}
.resume{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:6px 0 22px;padding:16px 18px;
  border:1px solid var(--line);border-radius:14px;text-decoration:none;background:var(--wash)}
.resume b{font-weight:600}
.resume span{color:var(--muted);font-size:14px}
.find{display:flex;gap:8px;align-items:center}
.filter{flex:1;min-width:0}
.find-set{width:48px;height:48px;flex:none;display:grid;place-items:center;border:1px solid var(--line);border-radius:12px;
  background:var(--bg);color:var(--soft)}
.find-set svg{width:22px;height:22px}
.find-set:hover,.find-set:focus-visible{color:var(--ink);border-color:var(--faint)}
.filter input{width:100%;height:48px;border:1px solid var(--line);border-radius:12px;padding:0 16px;
  font:16px var(--sans);background:var(--bg);color:var(--ink);outline:none}
.filter input:focus{border-color:var(--faint)}
.slist{margin-top:12px}
.srow{display:flex;align-items:center;gap:14px;padding:14px 4px;border-bottom:1px solid var(--line);text-decoration:none;min-height:64px}
.srow:hover .se{color:var(--accent)}
.sn{width:30px;font-size:13px;color:var(--faint);font-variant-numeric:tabular-nums;text-align:center;flex:none}
.sm{flex:1;min-width:0;display:flex;flex-direction:column}
.se{font-weight:550;font-size:15.5px;transition:color .15s}
.st{font-size:13px;color:var(--muted)}
.sa{font-family:"Surah Names";font-size:30px;line-height:1;color:var(--ink);flex:none;direction:rtl}

/* ---------- reading column ---------- */
.read{max-width:calc(var(--measure) + 40px);margin:0 auto;padding:calc(84px + env(safe-area-inset-top)) 20px 45vh}
.shead{text-align:center;padding:24px 0 30px}
.sname{font-family:"Surah Names";font-size:min(108px,28vw);line-height:1.1;color:var(--ink);direction:rtl}
.shead h1{font:400 1.5rem/1.2 var(--serif);margin:6px 0 4px;letter-spacing:-.01em}
.smeta{margin:0;font-size:13.5px;color:var(--muted)}
.bism{font-family:var(--quran);font-size:calc(var(--ar-size) * .92);line-height:2;margin:34px 0 0;color:var(--ink);
  transition:color .4s}
.bism.reciting{color:var(--accent)}

.ayah{padding:26px 0 28px;position:relative}
.ayah+.ayah{border-top:1px solid var(--line)}
.ar{font-family:var(--quran);font-size:var(--ar-size);line-height:2.15;margin:0;text-align:right;
  word-spacing:.04em;color:var(--ink)}
:root[data-script="indopak"] .ar{line-height:2.4}
.w{display:inline-block;border-radius:6px;cursor:pointer;transition:color .35s var(--ease),background-color .35s}
/* The ayah number is the door to Listen, Tafsir and the rest. It stays plain on the white
   page (owner, 2026-11-18: no coloured disc); the hint on each surah points at it, and a
   light neutral wash answers hover and press. */
.end{font-family:"QPC Hafs",serif;font-size:.92em;color:var(--ink-2);line-height:1;
  min-width:1.7em;min-height:1.7em;padding:.1em;vertical-align:middle;border-radius:50%;
  background:transparent;transition:background-color .2s,transform .15s}
.end:hover,.end:focus-visible{background:var(--surface)}
.end:active{transform:scale(.94)}
.tr{cursor:pointer}

/* Arrival (owner, 2026-11-18): as an ayah reaches you it fades and rises in as one piece,
   its translation a moment after; the next ayah follows shortly. Only with JS; reduced
   motion shows all. */
.ayah .ar,.ayah .tr,.ayah .tl-line{transition:opacity .7s var(--ease),transform .7s var(--ease)}
.js .ayah:not(.shown) .ar,.js .ayah:not(.shown) .tr,.js .ayah:not(.shown) .tl-line{opacity:0;transform:translateY(14px)}
.ayah.shown .tr,.ayah.shown .tl-line{transition-delay:.18s}
.ayah.instant .ar,.ayah.instant .tr,.ayah.instant .tl-line{transition:none!important}
.shead>*{animation:rise 1.1s var(--ease) both}
.shead>:nth-child(2){animation-delay:.12s}.shead>:nth-child(3){animation-delay:.22s}.shead>:nth-child(4){animation-delay:.45s;animation-duration:1.6s}
@keyframes rise{from{opacity:0;transform:translateY(10px)}}

/* first visit: one quiet pointer to the ayah number */
.hint{position:absolute;z-index:32;max-width:250px;padding:10px 12px 10px 14px;border-radius:12px;background:var(--ink);color:var(--page);
  font:500 13.5px/1.4 var(--sans);box-shadow:var(--shadow);display:flex;gap:10px;align-items:center;animation:fade .4s var(--ease)}
.hint::before{content:"";position:absolute;top:-6px;right:var(--arrow,24px);width:12px;height:12px;background:var(--ink);transform:rotate(45deg);border-radius:2px}
.hint button{flex:none;min-height:44px;min-width:44px;padding:0 6px;color:var(--pine-soft);font:600 13px var(--sans)}
/* the first visit only: one quiet line under the surah name (docs/community/welcome.md §2) */
.end.pulse{animation:pulse 1.6s var(--ease) 3}
@keyframes pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ink) 18%,transparent)}70%{box-shadow:0 0 0 12px transparent}}
.tr{font:1.125rem/1.62 var(--serif);color:var(--soft);margin:14px 0 0}
.vn{font:600 11px var(--sans);color:var(--faint);margin-right:9px;font-variant-numeric:tabular-nums;vertical-align:2px}
:root[data-trans="off"] .tr{display:none}

/* Listening: the ayah being recited goes faint, and each word comes back to full ink as it is said. */
.tj.ham_wasl,.tj.slnt,.tj.laam_shamsiyah,.tj.idgham_mutajanisayn,.tj.idgham_mutaqaribayn{color:var(--tj-silent)}
.tj.madda_normal{color:var(--tj-madd2)} .tj.madda_permissible{color:var(--tj-madd246)}
.tj.madda_obligatory{color:var(--tj-madd45)} .tj.madda_necessary{color:var(--tj-madd6)}
.tj.ghunnah{color:var(--tj-ghunnah)} .tj.ikhafa{color:var(--tj-ikhfa)} .tj.ikhafa_shafawi{color:var(--tj-ikhfa-sh)}
.tj.idgham_ghunnah{color:var(--tj-idgham-g)} .tj.idgham_wo_ghunnah{color:var(--tj-idgham)}
.tj.idgham_shafawi{color:var(--tj-idgham-sh)} .tj.iqlab{color:var(--tj-iqlab)} .tj.qalaqah{color:var(--tj-qalqalah)}
:root[data-tajweed="off"] .ar .tj{color:inherit}
/* while listening, words not yet recited wait in grey (colours too) and come back as they are said */
.ayah.now .w:not(.said):not(.on),.ayah.now .w:not(.said):not(.on) .tj{color:var(--faint)}
.ayah.now .w.on{background:var(--accent-wash);box-shadow:0 0 0 .08em var(--accent-wash)}
.ayah.now .end{background:var(--surface)}
.ayah.sel{background:linear-gradient(to right,transparent,var(--wash) 12%,var(--wash) 88%,transparent)}

.pager{display:flex;gap:12px;margin-top:56px;padding-top:24px;border-top:1px solid var(--line)}
.pager a,.pager>span{flex:1}
.pager a{display:block;padding:14px 16px;border:1px solid var(--line);border-radius:12px;text-decoration:none;font-weight:550}
.pager a span{display:block;font:500 11px var(--sans);text-transform:uppercase;letter-spacing:.1em;color:var(--faint);margin-bottom:2px}
.pager .nx{text-align:right}


/* ---------- player ---------- */
.player{position:fixed;left:50%;bottom:calc(14px + env(safe-area-inset-bottom));z-index:30;
  transform:translateX(-50%);display:flex;align-items:center;gap:2px;padding:5px 6px 5px 5px;
  background:var(--bg);border:1px solid var(--line);border-radius:999px;box-shadow:var(--shadow);
  transition:transform .4s var(--ease),opacity .3s;max-width:calc(100vw - 24px)}
.chrome-off:not(.playing) .player{transform:translate(-50%,calc(100% + 30px));opacity:0;pointer-events:none}
.pl-line{position:absolute;left:22px;right:22px;top:-1px;height:2px;border-radius:2px;overflow:hidden}
.pl-line span{display:block;height:100%;width:0;background:var(--accent)}
.pl-b{flex:none;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;color:var(--soft)}
.pl-b svg{width:18px;height:18px}
.pl-b:hover{background:var(--wash)}
.pl-play{flex:none;width:46px;height:46px;border-radius:50%;background:var(--ink);color:var(--bg);display:grid;place-items:center;position:relative;
  transition:transform .15s}
.pl-play:active{transform:scale(.94)}
/* buffering: a thin ring turns around the play button */
.buffering .pl-play::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid transparent;
  border-top-color:var(--accent);animation:spin .8s linear infinite}
.pl-play svg:last-child,.playing .pl-play svg:first-child{display:none}
.playing .pl-play svg:last-child{display:block}
.pl-info{display:flex;flex-direction:column;align-items:flex-start;padding:0 14px 0 8px;line-height:1.25;min-height:44px;justify-content:center;min-width:0}
#plAyah{font-size:14px;font-weight:600;white-space:nowrap}
#plWho{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw}

.pl-away{display:none;align-items:center;gap:6px;height:44px;padding:0 12px;border-radius:999px;font-size:13.5px;font-weight:550;color:var(--soft);white-space:nowrap}
.pl-away svg{width:16px;height:16px;flex:none}
.pl-away b{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.pl-away:hover{background:var(--wash)}
.away .pl-away{display:flex}
.away .pl-b,.away .pl-info{display:none}
.away #plBack{background:var(--wash)}
.follow{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom));z-index:29;
  display:flex;align-items:center;gap:8px;height:40px;padding:0 16px 0 12px;border-radius:999px;
  background:var(--ink);color:var(--bg);font-size:13.5px;font-weight:550;box-shadow:var(--shadow)}
.follow svg{width:18px;height:18px}
.chrome-off:not(.playing) .follow{bottom:calc(36px + env(safe-area-inset-bottom))}
.saw{font-family:"IndoPak",serif;font-size:.95em;line-height:0;font-style:normal}

/* ---------- ayah toolbar and word gloss ---------- */
/* phones: a thumb-height bar fixed to the bottom edge; wide screens: a small popover under the ayah */
.actions{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--bg);border-top:1px solid var(--line);
  box-shadow:0 -8px 30px rgba(20,18,12,.08);padding:8px 8px calc(8px + env(safe-area-inset-bottom));animation:up .28s var(--ease)}
.act-key{font-size:12px;color:var(--muted);text-align:center;font-weight:550;padding:2px 0 6px}
.act-row{display:flex;justify-content:space-around}
.actions button{flex:1;min-width:0;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  border-radius:12px;font-size:11.5px;font-weight:550;color:var(--soft)}
.actions button svg{width:22px;height:22px}
.actions button:active,.actions button:hover{background:var(--wash);color:var(--ink)}
.acting .player{opacity:0;pointer-events:none}
@media (min-width:700px){
  .actions{position:absolute;left:auto;right:auto;bottom:auto;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:4px;animation:none}
  .act-key{display:none}
  .actions button{flex:none;flex-direction:row;min-height:44px;padding:0 13px;font-size:14px;gap:7px}
  .actions button svg{width:17px;height:17px}
  .acting .player{opacity:1;pointer-events:auto}
}
.gloss{position:absolute;z-index:26;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:150px;max-width:260px;
  padding:12px 14px 8px;background:var(--bg);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);text-align:center}
.g-ar{font-family:var(--quran);font-size:30px;line-height:1.7}
.g-en{font:1rem/1.4 var(--serif);color:var(--soft)}
.g-play{display:flex;align-items:center;gap:6px;margin-top:6px;height:40px;padding:0 12px;border-radius:10px;font-size:13px;color:var(--accent);font-weight:550}
.g-play svg{width:16px;height:16px}
.g-play:hover{background:var(--accent-wash)}

/* ---------- sheets: one card that rises from the bottom, the width of the reading column.
   Phones: full width, attached to the bottom edge. Wider screens: floats just above it.
   The text column never moves or gets covered from the side. ---------- */
.sheet{position:fixed;inset:0;z-index:50}
.sh-back{position:absolute;inset:0;background:rgba(18,16,12,.24);animation:fade .3s var(--ease);touch-action:none}
.sh-panel{position:absolute;left:0;right:0;bottom:0;margin:0 auto;width:100%;max-width:44rem;height:86vh;height:86dvh;
  display:flex;flex-direction:column;background:var(--bg);border-radius:22px 22px 0 0;
  box-shadow:0 -12px 50px rgba(20,18,12,.16);animation:up .42s var(--ease);padding-bottom:env(safe-area-inset-bottom);
  will-change:transform}
.sh-panel.narrow{max-width:30rem;height:auto;max-height:86vh;max-height:86dvh}
.sheet.closing .sh-panel{animation:down .24s cubic-bezier(.4,0,1,1) forwards}
.sheet.closing .sh-back{animation:fadeout .24s ease-in forwards}
.sh-grab{height:24px;flex:none;position:relative;cursor:grab;touch-action:none}
.sh-grab::after{content:"";position:absolute;left:50%;top:9px;width:36px;height:5px;margin-left:-18px;border-radius:3px;background:var(--veil)}
.sh-head{display:flex;align-items:center;gap:2px;padding:0 8px 4px;flex:none}
.sh-head h2{flex:1;margin:0;font:600 16px var(--sans);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sh-head h2 span{color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}
.sh-head .ic svg{width:20px;height:20px}
.sh-head .ic:disabled{opacity:.3;cursor:default}
.tabs{display:flex;gap:24px;padding:0 20px;overflow-x:auto;scrollbar-width:none;flex:none;border-bottom:1px solid var(--line)}
.tabs::-webkit-scrollbar{display:none}
.tabs button{height:44px;min-width:44px;padding:0 2px;font-size:14.5px;font-weight:550;color:var(--muted);white-space:nowrap;position:relative;flex:none}
.tabs button[aria-selected="true"]{color:var(--ink)}
.tabs button[aria-selected="true"]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--ink)}
/* the ayah being studied: two lines, tap for all of it */
.sh-ayah{font-family:var(--quran);font-size:22px;line-height:2;margin:12px 20px 0;color:var(--ink);flex:none;text-align:right;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer;border-radius:8px}
.sh-ayah.open{display:block;max-height:34vh;overflow:auto}
.sh-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:4px 20px 32px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.sets{flex:initial}
@media (min-width:700px){
  .sh-panel{bottom:16px;border-radius:22px;height:min(80vh,820px);box-shadow:0 20px 70px rgba(20,18,12,.2),0 2px 8px rgba(20,18,12,.06)}
  .sh-panel.narrow{max-height:min(80vh,760px)}
  .sh-grab{display:none}
  .sh-head{padding:10px 8px 4px}
}
@keyframes up{from{transform:translateY(100%)}}
@keyframes down{to{transform:translateY(105%)}}
@keyframes fade{from{opacity:0}}
@keyframes fadeout{to{opacity:0}}
@keyframes spin{to{transform:rotate(360deg)}}

/* tafsir */
.tafsir{font:1.05rem/1.75 var(--serif);color:var(--ink)}
.tafsir h2,.tafsir h3{font:600 1.02rem/1.4 var(--sans);margin:1.6em 0 .5em}
.tafsir p{margin:.8em 0}
.tafsir .translation{font-style:italic;color:var(--soft);border-left:2px solid var(--line);padding-left:12px}
.tafsir .arabic,.tafsir [lang="ar"]{font-family:var(--quran);font-size:1.25em;line-height:2;direction:rtl;text-align:right}
.tafsir .gray{color:var(--muted)}
.tafsir .translation span{margin:0 .25em;color:var(--faint);font-style:normal;font-size:.85em}
.tafsir.ar-t{direction:rtl;text-align:right;font-family:"Noto Naskh Arabic","Geeza Pro","Segoe UI","Arial",sans-serif;font-size:1.12rem;line-height:2}
.t-note{font-size:13px;color:var(--muted);margin:2px 0 10px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.t-note .seg{margin:0}
.loading,.empty{color:var(--muted);font-size:14.5px;padding:22px 0;text-align:center}

/* similar */
.sim{display:block;padding:16px 0;border-bottom:1px solid var(--line);text-decoration:none}
.sim-k{font-size:12.5px;color:var(--muted);font-weight:550;display:flex;justify-content:space-between}
.sim-ar{font-family:var(--quran);font-size:22px;line-height:2;direction:rtl;text-align:right;margin:4px 0}
.sim-ar mark{background:var(--accent-wash);color:var(--accent);border-radius:4px;padding:0 2px}
.sim-tr{font:.96rem/1.6 var(--serif);color:var(--soft)}

/* hadith */
.hd{padding:16px 0;border-bottom:1px solid var(--line)}
.hd-k{font-size:12.5px;color:var(--muted);font-weight:600;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.hd-g{font-weight:500;border:1px solid var(--line);border-radius:999px;padding:1px 8px}
.hd-ar{font-family:"Noto Naskh Arabic","Geeza Pro","Segoe UI","Arial",sans-serif;font-size:1.15rem;line-height:2;direction:rtl;text-align:right;margin:6px 0}
.hd-en{font:1rem/1.65 var(--serif)}

/* manuscripts */
.ms-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;margin-top:8px}
.ms{display:flex;flex-direction:column;gap:6px;text-align:left}
.ms img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:8px;background:var(--wash);border:1px solid var(--line)}
.ms b{font-size:12.5px;font-weight:550;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ms span{font-size:11.5px;color:var(--muted)}
.ms-more{display:block;margin:18px auto 0;height:44px;padding:0 18px;border:1px solid var(--line);border-radius:12px;font-weight:550}
.credit{font-size:12px;color:var(--muted);margin-top:18px;line-height:1.5}
.lightbox{position:fixed;inset:0;z-index:60;background:rgba(8,8,8,.94);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 12px 20px}
.lightbox img{max-width:100%;max-height:calc(100vh - 130px);object-fit:contain;border-radius:4px}
.lightbox .x{position:absolute;top:calc(8px + env(safe-area-inset-top));right:8px;color:#eee}
.lb-cap{color:#ccc;font-size:13px;text-align:center;max-width:36rem;margin:12px 0 0;line-height:1.5}
.lb-cap a{color:#fff}

/* settings */
.sets{padding-top:4px}
.sets h3{font:600 12px var(--sans);text-transform:uppercase;letter-spacing:.1em;color:var(--faint);margin:26px 0 4px}
.set{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--line)}
.set-l{font-size:14.5px;color:var(--soft)}
.seg{display:flex;background:var(--wash);border-radius:11px;padding:3px;gap:2px;flex-wrap:wrap;justify-content:flex-end}
.seg button{min-height:44px;min-width:44px;padding:0 12px;border-radius:9px;font-size:13.5px;color:var(--muted);font-weight:550}
.seg button[aria-pressed="true"]{background:var(--bg);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.1)}
.size{display:flex;align-items:center;gap:6px}
.size button{width:44px;height:44px;border-radius:11px;background:var(--wash);font-family:var(--serif);font-size:15px}
.size button:last-child{font-size:22px}
.size-dots{display:flex;gap:5px}
.size-dots i{width:6px;height:6px;border-radius:50%;background:var(--veil)}
.size-dots i.on{background:var(--ink)}
.sets select{height:44px;border:1px solid var(--line);border-radius:11px;background:var(--bg);color:var(--ink);font:14px var(--sans);padding:0 10px;max-width:60%}
.set-note{font-size:13px;color:var(--muted);margin:10px 0 0;line-height:1.5}
.legend{border-bottom:1px solid var(--line);padding:4px 0 12px}
.legend summary{min-height:44px;display:flex;align-items:center;font-size:14px;color:var(--accent);font-weight:550;cursor:pointer;list-style:none}
.legend summary::-webkit-details-marker{display:none}
.legend ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;font-size:13.5px;color:var(--soft)}
.legend li{display:flex;align-items:center;gap:8px}
.legend i{font-style:normal;font-size:14px}

/* hidden completely when idle (it used to peek out at the top as a dark dot) */
.toast{position:fixed;left:50%;top:calc(20px + env(safe-area-inset-top));transform:translate(-50%,-24px);z-index:70;background:var(--ink);color:var(--bg);
  padding:10px 16px;border-radius:999px;font-size:13.5px;pointer-events:none;opacity:0;visibility:hidden;
  transition:transform .35s var(--ease),opacity .25s,visibility 0s .35s}
.toast.on{transform:translate(-50%,0);opacity:1;visibility:visible;transition:transform .35s var(--ease),opacity .25s,visibility 0s}

@media (min-width:700px){
  :root{--ar-size:36px}
  .read{padding-left:32px;padding-right:32px}
  .tr{font-size:1.2rem;line-height:1.6}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  .ayah,.ayah .ar,.ayah .tr,.ayah .tl-line{opacity:1!important;transform:none!important}
}

/* transliteration: under each word (as on quran.com), or a line per ayah */
.tl{display:none}
:root[data-translit="words"] .ar .w{display:inline-flex;flex-direction:column;align-items:center;vertical-align:top;margin:0 .06em .2em;line-height:1.75}
:root[data-translit="words"] .ar .w .tl{display:block;font:400 calc(var(--ar-size) * .4)/1.3 var(--sans);direction:ltr;color:var(--muted);
  letter-spacing:0;white-space:nowrap;margin-top:.1em}
:root[data-translit="words"] .ayah.now .w:not(.said):not(.on) .tl{color:var(--faint)}
.tl-line{display:none;font:italic 1rem/1.6 var(--serif);color:var(--muted);margin:12px 0 0}
:root[data-translit="ayah"] .tl-line{display:block}

/* word grammar (experiment): in the word card and the study card's Grammar tab */
.gloss{max-width:min(320px,calc(100vw - 24px))}
.g-gram{width:100%;margin-top:8px;padding-top:8px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:5px;text-align:left}
.g-pos{display:flex;flex-direction:column;gap:1px}
.g-pos [lang="ar"]{font:500 15px/1.5 var(--font-arabic);direction:rtl;text-align:right;color:var(--ink)}
.g-pos span:last-child{font-size:12.5px;color:var(--muted)}
.g-row{display:flex;align-items:baseline;gap:8px;font-size:13px;flex-wrap:wrap}
.g-row .k{font:600 10.5px var(--sans);text-transform:uppercase;letter-spacing:.08em;color:var(--faint);min-width:44px}
.g-row b{font:500 17px/1.4 var(--font-arabic);color:var(--ink)}
.g-row .n{color:var(--muted);font-size:12.5px}
.g-role{display:flex;align-items:baseline;gap:8px;font-size:13px;color:var(--soft);flex-wrap:wrap}
.g-role b{font:500 15px/1.5 var(--font-arabic);color:var(--accent)}
.g-role [lang="ar"]{font-family:var(--quran);font-size:1.1em}
.g-acts{display:flex;gap:2px;margin-top:4px}
.gw-list{display:flex;flex-direction:column;margin-top:4px}
.gw{border-bottom:1px solid var(--line)}
.gw summary{list-style:none;display:flex;align-items:center;gap:14px;min-height:56px;padding:8px 2px;cursor:pointer}
.gw summary::-webkit-details-marker{display:none}
.gw-ar{font-family:var(--quran);font-size:24px;line-height:1.6;min-width:3.2em;text-align:right;direction:rtl}
.gw-sum{display:flex;flex-direction:column;min-width:0}
.gw-en{font:1rem/1.35 var(--serif);color:var(--ink)}
.gw-pos{font-size:12.5px;color:var(--muted)}
.gw[open] summary .gw-ar{color:var(--accent)}
.gw-body{padding:2px 2px 16px;display:flex;flex-direction:column;gap:8px}
.gw-segs{display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:var(--surface);border-radius:10px}
.gw-seg{display:grid;grid-template-columns:auto 1fr;column-gap:12px;align-items:baseline}
.gw-seg b{font-family:var(--quran);font-weight:400;font-size:22px;line-height:1.5;grid-row:span 2;min-width:2.4em;text-align:right;direction:rtl}
.gw-seg span{font-size:13px;color:var(--soft)}
.gw-seg .arl{font:14px/1.5 var(--font-arabic);color:var(--muted);direction:rtl;text-align:left}
.gw-irab{font:1.02rem/1.95 var(--font-arabic);color:var(--ink);text-align:right;padding-top:4px}
.gw-irab .lbl{display:block;font:600 11px var(--sans);letter-spacing:.08em;color:var(--faint);text-align:left;direction:ltr;margin-bottom:2px}
.gw-link{font-size:13px;color:var(--accent);min-height:44px;display:inline-flex;align-items:center}
@media (max-width:699px){
  .gloss{position:fixed;left:0!important;right:0;bottom:0;top:auto!important;max-width:none;min-width:0;width:100%;
    border-radius:20px 20px 0 0;border-width:1px 0 0;padding:16px 20px calc(10px + env(safe-area-inset-bottom));
    max-height:75vh;overflow-y:auto;animation:up .28s var(--ease)}
  .g-gram{max-width:34rem}
  .g-acts{width:100%;justify-content:center}
}

/* end of page: feedback and home, quiet like the pager above it */
.foot-end{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 20px;margin-top:40px;padding-top:18px;border-top:1px solid var(--line);
  font-size:13px;color:var(--muted)}
.foot-end a{color:var(--muted);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.foot-end a:hover{color:var(--accent)}
.g-src{margin:4px 0 0;font-size:11.5px;color:var(--faint)}
.g-src a{color:inherit}

/* ---------- yours: Save, highlights and notes (assets/community.js) ----------
   Only shown once the notes script is ready. Accent: --pine-ink on --pine-soft; the
   highlight wash is --sakura-soft. Marks and washes step aside while listening. */
.act-mine{border-bottom:1px solid var(--line);margin-bottom:4px;padding-bottom:4px}
.actions button[aria-pressed="true"]{color:var(--accent)}
.actions button[aria-pressed="true"] .i-save path{fill:currentColor}
@media (min-width:700px){
  .act-mine{margin-bottom:2px;padding-bottom:2px}
  .act-row{justify-content:flex-start}
}
/* the word card's second row */
.g-play{min-height:44px;height:auto}
.g-mine{flex-wrap:wrap;justify-content:center;border-top:1px solid var(--line);margin-top:6px;padding-top:2px;width:100%}
/* highlights */
::highlight(arq-hl){background-color:var(--sakura-soft)}
.w.hl{background:var(--sakura-soft);box-shadow:0 0 0 .08em var(--sakura-soft)}
.w.hl-start{background:var(--sakura-soft);box-shadow:0 0 0 .1em var(--sakura-soft),inset 0 -2px 0 var(--sakura-ink)}
.hl-picking .ar .w{cursor:crosshair}
.playing .ar::highlight(arq-hl),.playing .ar *::highlight(arq-hl){background-color:transparent}
.playing .ayah.now .w.hl:not(.on){background:transparent;box-shadow:none}
/* marks beside the ayah number: a dot when saved, "Note" when there is a note */
.mk{vertical-align:middle}
.mk-save{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--pine-ink);margin:0 .15em}
.mk-note{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0 6px;
  font:600 12px/1 var(--sans);letter-spacing:.02em;color:var(--pine-ink)}
.mk-note span{background:var(--pine-soft);border-radius:999px;padding:5px 9px}
.mk-note:active span{background:var(--surface)}
.playing .mk{visibility:hidden}
/* the note sheet */
.nt{display:flex;flex-direction:column;gap:10px;padding-top:8px}
.nt-quote{margin:0;font-family:var(--quran);font-size:24px;line-height:1.9;text-align:right;color:var(--ink);
  background:var(--sakura-soft);border-radius:10px;padding:4px 12px}
.nt-l{font:600 11px var(--sans);text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.nt textarea{width:100%;min-height:8.5em;resize:vertical;font:18px/1.55 var(--serif);color:var(--ink);background:var(--bg);
  border:1px solid var(--line-strong);border-radius:12px;padding:12px 14px;-webkit-appearance:none;appearance:none}
.nt textarea:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:transparent}
.nt-local{margin:0;font-size:13.5px;line-height:1.5;color:var(--muted)}
.nt-local a{color:var(--accent);display:inline-block;padding:12px 0;margin:-12px 0}
.nt-acts{display:flex;justify-content:flex-end;gap:8px;padding-bottom:4px}
.nt-save,.nt-remove{min-height:44px;padding:0 20px;border-radius:12px;font-size:15px;font-weight:550}
.nt-save{background:var(--pine-soft);color:var(--pine-ink)}
.nt-save:active{background:color-mix(in srgb,var(--pine-soft) 70%,var(--pine))}
.nt-remove{color:var(--muted);margin-right:auto}
.nt-remove:active{background:var(--wash);color:var(--ink)}
/* the notebook: "In your notebook" under a note, and "Save to a page" */
.nt-in{border-top:1px solid var(--line);padding-top:10px;display:grid}
.nt-in a{display:flex;align-items:center;min-height:44px;color:var(--ink);font-size:15px;font-weight:500}
.pg-row{display:flex;gap:8px;margin-top:6px}
.pg-row input{flex:1;min-width:0;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:16px var(--sans)}
.pg-row input:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:transparent}
.pg-list{display:grid}
.pg-list button{display:flex;align-items:center;min-height:52px;width:100%;text-align:left;border-bottom:1px solid var(--line);font-size:15.5px;font-weight:500;color:var(--ink)}
.pg-list button:active{background:var(--wash)}

/* Readers' reflections tab (arriqaaq.com community) */
.rf{padding:16px 0;border-bottom:1px solid var(--line)}
.rf-k{font-size:13px;font-weight:600;display:flex;gap:6px;flex-wrap:wrap}
.rf-k span{color:var(--muted);font-weight:400}
.rf-q{margin:8px 0 0;padding:8px 12px;border-radius:8px;background:var(--line);font:italic 1rem/1.55 var(--serif)}
.rf-t{margin-top:8px;font:1.02rem/1.65 var(--serif);overflow-wrap:anywhere}
.rf-open,.rf-write{display:inline-flex;align-items:center;min-height:44px;color:var(--muted);font-size:13.5px}
.rf-write{margin-top:8px;font-weight:600;color:inherit}
.set-link{display:flex;align-items:center;min-height:44px;color:var(--ink);font-weight:500;text-decoration:underline;text-underline-offset:3px}
