/* «وَمَا كُنتَ تَدْرِي» — book stylesheet (print / digital / mobile share this file)
   Edition variables are injected by build.py as :root custom properties + @page rules. */

@font-face { font-family: 'Amiri'; src: url('fonts/Amiri-Regular.ttf'); font-weight: 400; }
@font-face { font-family: 'Amiri'; src: url('fonts/Amiri-Bold.ttf'); font-weight: 700; }
@font-face { font-family: 'Amiri'; src: url('fonts/Amiri-Italic.ttf'); font-style: italic; }
@font-face { font-family: 'Amiri Quran'; src: url('fonts/AmiriQuran-Regular.ttf'); }
@font-face { font-family: 'Aref Ruqaa'; src: url('fonts/ArefRuqaa-Regular.ttf'); font-weight: 400; }
@font-face { font-family: 'Aref Ruqaa'; src: url('fonts/ArefRuqaa-Bold.ttf'); font-weight: 700; }
@font-face { font-family: 'Reem Kufi'; src: url('fonts/ReemKufi[wght].ttf'); font-weight: 400 700; }
@font-face { font-family: 'Markazi Text'; src: url('fonts/MarkaziText[wght].ttf'); font-weight: 400 700; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('fonts/IBMPlexSansArabic-Regular.ttf'); font-weight: 400; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('fonts/IBMPlexSansArabic-Medium.ttf'); font-weight: 500 700; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('fonts/IBMPlexSansArabic-Light.ttf'); font-weight: 300; }

:root {
  --night: #0B1324; --night2: #14213A; --stone: #17171A;
  --gold: #A9823F; --gold2: #D9B979; --sand: #D8C3A0; --ivory: #FBF7EE; --paper: #FFFFFF;
  --ink: #1D1B18; --muted: #6F675B; --rule: #D9CBB0;
  --body: 'Amiri', serif; --quran: 'Amiri Quran', 'Amiri', serif;
  --display: 'Amiri', serif; --kufi: 'IBM Plex Sans Arabic', sans-serif;
  --sans: 'IBM Plex Sans Arabic', sans-serif; --scene: 'Markazi Text', 'Amiri', serif;
}

* { box-sizing: border-box; }
html { direction: rtl; }
body { margin: 0; font-family: var(--body); font-size: var(--fs, 12.2pt); line-height: 1.95; color: var(--ink);
       background: var(--paper); -webkit-print-color-adjust: exact; print-color-adjust: exact;
       font-kerning: normal; text-rendering: optimizeLegibility; }

p { margin: 0 0 0.55em; text-align: justify; text-justify: inter-word; orphans: 3; widows: 3; }
strong { font-weight: 700; color: #000; }

/* ---------- full pages ---------- */
.page { break-before: page; break-after: page; position: relative; }
.full { page: bleed; width: var(--pw); height: var(--ph); overflow: hidden; position: relative; break-before: page; break-after: page; }
.mk { font-size: 1.5px; font-family: "Courier New", monospace; direction: ltr; unicode-bidi: isolate; white-space: nowrap; color: rgba(255,255,255,0.01); line-height: 0; position: absolute; }

/* ---------- front matter ---------- */
.halftitle { display: flex; align-items: center; justify-content: center; height: calc(var(--ph) - var(--mt) - var(--mb)); flex-direction: column; }
.halftitle .t { font-family: var(--display); font-size: 34pt; color: var(--night); }
.halftitle .s { font-family: var(--kufi); font-size: 9pt; letter-spacing: 0; color: var(--gold); margin-top: 1.2em; }

.titlepage { height: calc(var(--ph) - var(--mt) - var(--mb)); display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 18mm 0 6mm; }
.titlepage .proj { font-family: var(--kufi); font-size: 9.5pt; color: var(--gold); letter-spacing: 0; }
.titlepage h1 { font-family: var(--display); font-weight: 700; font-size: 52pt; line-height: 1.3; margin: 0; color: var(--night); }
.titlepage .sub { font-family: var(--body); font-size: 15pt; color: var(--muted); margin-top: 0.4em; }
.titlepage .rule { width: 28mm; height: 1px; background: var(--gold); margin: 8mm auto; }
.titlepage .ed { font-family: var(--sans); font-size: 8.5pt; color: var(--muted); }

.copyright { font-family: var(--sans); font-size: 8pt; line-height: 1.8; color: var(--muted); height: calc(var(--ph) - var(--mt) - var(--mb)); display: flex; flex-direction: column; justify-content: flex-end; }
.copyright p { text-align: right; margin-bottom: 0.7em; }
.copyright .slot { border: 1px dashed var(--rule); padding: 2mm 3mm; display: inline-block; min-width: 50mm; }

.founding { height: calc(var(--ph) - var(--mt) - var(--mb)); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.founding .quran blockquote { font-size: 17pt; line-height: 2.3; }

/* ---------- TOC ---------- */
.toc h2, .backh { font-family: var(--display); font-size: 26pt; color: var(--night); margin: 0 0 8mm; font-weight: 700; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { display: flex; align-items: baseline; gap: 2mm; font-size: 11pt; line-height: 1.9; }
.toc li a { color: inherit; text-decoration: none; }
.toc li .dots { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-3px); }
.toc li .pg { font-family: var(--sans); font-size: 9pt; color: var(--muted); min-width: 8mm; text-align: left; }
.toc li.part { margin-top: 4mm; font-family: var(--kufi); font-size: 10.5pt; color: var(--gold); font-weight: 600; }
.toc li.part .pg { color: var(--gold); }
.toc li.ch .n { font-family: var(--sans); font-size: 8.5pt; color: var(--muted); width: 7mm; }
.toc li.bk { font-size: 10pt; color: var(--muted); }
.toc li.ch { margin-top: 2.5mm; font-weight: 700; }
.toc li.ch .ys { font-weight: 400; color: var(--muted); font-size: 9.5pt; }
.toc li.sec { padding-right: 9mm; font-size: 9.5pt; line-height: 1.75; color: #4a443b; }

/* ---------- year chapter opener (2.0: one chapter per year) ---------- */
.year-open { break-before: page; break-after: page; display: flex; flex-direction: column; justify-content: center; text-align: center;
  min-height: calc(var(--ph) - var(--mt) - var(--mb)); }
.year-open .n { font-family: var(--kufi); font-size: 13pt; color: var(--gold); }
.year-open h2 { font-family: var(--display); font-weight: 700; font-size: 36pt; line-height: 1.4; margin: 3mm 0 1mm; color: var(--night); }
.year-open .sub { font-size: 17pt; color: var(--muted); }
.year-open .period { font-family: var(--sans); font-size: 8.5pt; color: var(--muted); margin-top: 8mm; }
.year-open .rule { width: 18mm; height: 1px; background: var(--gold); margin: 7mm auto 0; }
.year-open .body { margin-top: 10mm; }
.year-open .body p { font-size: 11.5pt; color: var(--muted); text-align: center; }
.bridge-t { font-family: var(--display); font-weight: 700; font-size: 22pt; text-align: center; color: var(--night); margin: 0 0 8mm; }

/* ---------- part opener ---------- */
.part-open { color: var(--ivory); }
.part-open .bg { position: absolute; inset: 0; }
.part-open .bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.part-open .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,8,15,0.15) 0%, rgba(5,8,15,0) 30%, rgba(5,8,15,0.55) 70%, rgba(5,8,15,0.85) 100%); }
.part-open .inner { position: absolute; left: 14mm; right: 14mm; bottom: 34mm; text-align: center; }
.part-open .num { font-family: var(--kufi); letter-spacing: 0; font-size: 10pt; color: var(--gold2); }
.part-open h2 { font-family: var(--display); font-weight: 700; font-size: 40pt; margin: 2mm 0 6mm; line-height: 1.35; text-shadow: 0 2px 18px rgba(0,0,0,0.5); }
.part-open .period { font-family: var(--sans); font-size: 8.5pt; color: var(--sand); letter-spacing: 0; }
.part-intro { break-before: page; break-after: page; display: flex; flex-direction: column; justify-content: center; min-height: calc(var(--ph) - var(--mt) - var(--mb)); }
.part-intro .threshold { margin-bottom: 12mm; }
.part-intro p { font-size: 13pt; line-height: 2.05; text-align: center; color: var(--muted); }

/* ---------- chapter opener ---------- */
.chapter { break-before: page; }
.ch-head { position: relative; height: var(--chh, 64mm); overflow: hidden; border-radius: 1.5mm; }
.ch-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-head .fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,253,248,0) 45%, var(--paper) 100%); }
.ch-title { text-align: center; margin: -10mm 0 8mm; position: relative; }
.ch-title .n { font-family: var(--kufi); font-size: 9pt; letter-spacing: 0; color: var(--gold); }
.ch-title h2 { font-family: var(--display); font-weight: 700; font-size: 30pt; line-height: 1.35; margin: 1mm 0 1mm; color: var(--night); }
.ch-title .sub { font-size: 12.5pt; color: var(--muted); }
.ch-title .tm { display: inline-block; margin-top: 3mm; font-family: var(--sans); font-size: 7.5pt; color: var(--gold); border: 1px solid var(--rule); border-radius: 20px; padding: 0.5mm 3mm; }

h3.sec { font-family: var(--kufi); font-weight: 600; font-size: 12.5pt; color: var(--night); margin: 7mm 0 3mm; break-after: avoid; }
h3.sec::before { content: ''; display: inline-block; width: 5mm; height: 1px; background: var(--gold); margin-left: 3mm; vertical-align: middle; }

.scene-break { text-align: center; margin: 5mm 0 4mm; color: var(--gold); font-size: 9pt; letter-spacing: 1.2em; }
.scene-break span::before, .scene-break span::after { content: '·'; color: var(--rule); margin: 0 2mm; }

/* ---------- Quran ---------- */
figure.quran { margin: 6mm 0 6mm; padding: 4mm 6mm; text-align: center; break-inside: avoid; position: relative; }
figure.quran::before, figure.quran::after { content: ''; display: block; width: 18mm; height: 1px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
figure.quran blockquote { margin: 3mm 0 1mm; font-family: var(--quran); font-size: var(--qs, 15.5pt); line-height: 2.25; color: #111; text-align: center; }
figure.quran .orn { color: var(--gold); font-family: var(--quran); margin: 0 1.5mm; }
.ayah-no { font-family: var(--quran); color: var(--gold); font-size: 0.75em; margin: 0 0.6mm; }
.ayah-no::before { content: '\06DD'; }
figure.quran figcaption { font-family: var(--sans); font-size: 7.6pt; color: var(--muted); margin-bottom: 2mm; letter-spacing: 0; }
.qi { font-family: var(--quran); font-size: 1.08em; color: #111; white-space: normal; }
.qi .orn { color: var(--gold); }
.qi .qref { font-family: var(--sans); font-size: 0.6em; color: var(--muted); }

/* ---------- hadith & quotes ---------- */
blockquote.hadith, blockquote.quote { margin: 5mm 6mm 5mm 0; padding: 1mm 5mm 1mm 0; border-right: 2px solid var(--gold); break-inside: avoid; }
blockquote.hadith p { font-size: 1.02em; color: #2a2620; text-align: right; }
cite.hsrc { font-style: normal; font-family: var(--sans); font-size: 7.4pt; color: var(--gold); white-space: nowrap; }

/* ---------- tasawwur (level هـ) ---------- */
aside.tasawwur { position: relative; margin: 6mm 0; padding: 5mm 7mm 4mm; background: linear-gradient(180deg, rgba(216,195,160,0.18), rgba(216,195,160,0.06)); border-radius: 2mm; break-inside: avoid; }
aside.tasawwur p { font-family: var(--scene); font-size: 1.08em; line-height: 1.9; color: #3b342a; }
aside.tasawwur .tlabel { position: absolute; top: -2.6mm; right: 6mm; font-family: var(--sans); font-size: 6.8pt; color: var(--gold); background: var(--paper); padding: 0 2mm; letter-spacing: 0; }

aside.note { margin: 6mm 0; padding: 4mm 5mm; border: 1px solid var(--rule); border-radius: 2mm; font-family: var(--sans); font-size: 8.8pt; line-height: 1.85; color: #3d3a35; break-inside: avoid; }
aside.note p { text-align: right; }
aside.note strong { color: var(--night); }
aside.note .qi { font-size: 1.15em; }

ul, ol { margin: 2mm 0 4mm; padding-right: 6mm; }
li { margin-bottom: 1.2mm; }
.chapter ul li::marker { color: var(--gold); }

a.nref { font-family: var(--sans); font-size: 0.58em; vertical-align: super; line-height: 0; color: var(--gold); text-decoration: none; padding: 0 0.3mm; }

/* ---------- figures ---------- */
figure.fig { margin: 7mm 0; break-inside: avoid; text-align: center; }
figure.fig img, figure.fig svg { width: 100%; height: auto; display: block; border-radius: 1mm; }

figure.fig figcaption { font-family: var(--sans); font-size: 7.6pt; color: var(--muted); margin-top: 2mm; text-align: right; line-height: 1.7; }
figure.fig .fignum { color: var(--gold); font-weight: 500; }
figure.fig .figkind { display: inline-block; color: var(--gold); border: 1px solid var(--rule); border-radius: 10px; padding: 0 2mm; font-size: 6.6pt; margin-right: 1mm; }
figure.fig.plate { break-before: page; break-after: page; margin: 0; display: flex; flex-direction: column; justify-content: center; height: calc(var(--ph) - var(--mt) - var(--mb)); }
svg.ig text { font-family: 'Amiri', serif; }

/* ---------- back matter ---------- */
.backsec { break-before: page; }
.backh { position: relative; }  /* contains the page marker, so it is measured on the section's own page */
.notes h4 { font-family: var(--kufi); font-size: 10pt; color: var(--gold); margin: 6mm 0 2mm; font-weight: 600; }
.notes ol { font-family: var(--sans); font-size: 8pt; line-height: 1.8; padding-right: 5mm; color: #3d3a35; }
.notes ol li a.back-ref { color: var(--gold); text-decoration: none; font-size: 7pt; }
.idx { columns: 2; column-gap: 8mm; font-family: var(--sans); font-size: 8pt; line-height: 1.85; }
.idx div { break-inside: avoid; }
.idx .k { color: var(--night); font-weight: 500; }
.idx .p { color: var(--muted); }
.idx h5 { break-after: avoid; font-family: var(--kufi); color: var(--gold); font-size: 10pt; margin: 5mm 0 2mm; }
.refs p { font-family: var(--sans); font-size: 8.4pt; text-align: right; padding-right: 6mm; text-indent: -6mm; line-height: 1.8; }
.method p { font-size: 11pt; }
.colophon { text-align: center; font-family: var(--sans); font-size: 8pt; color: var(--muted); height: calc(var(--ph) - var(--mt) - var(--mb)); display: flex; flex-direction: column; justify-content: center; }
.colophon p { text-align: center; }

.ending { break-before: page; min-height: calc(var(--ph) - var(--mt) - var(--mb)); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.ending p { text-align: center; font-size: 13pt; }

/* ---------- cover (first page of digital editions) ---------- */
.cover { background: var(--night); }
.cover .bg { position: absolute; inset: 0; }
.cover .bg img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- person box (:::sahabi / :::alam) — full width ---------- */
aside.sahabi { clear: both; margin: 6mm 0; padding: 4mm 5mm 3mm; background: #FBF7EE; border-top: 1mm solid var(--gold);
  border-radius: 1.5mm; font-family: var(--sans); font-size: 8.8pt; line-height: 1.8; color: #3d3a35; break-inside: auto; }
aside.sahabi .slabel { display: inline-block; font-size: 7pt; color: var(--gold); margin-left: 3mm; }
aside.sahabi .sname { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 12pt; color: var(--night); margin-bottom: 2mm; }
aside.sahabi ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5mm 6mm; list-style: none; margin: 0 0 2mm; padding: 0 0 2mm; border-bottom: 1px solid var(--rule); }
aside.sahabi li { margin: 0; }
aside.sahabi li > strong:first-child { display: block; color: var(--gold); font-weight: 500; font-size: 7.6pt; }
aside.sahabi p { margin: 0 0 1mm; text-align: right; }
aside.tasawwur .tlabel { letter-spacing: 0; }
@media (max-width: 120mm) { aside.sahabi ul { grid-template-columns: 1fr; } }
aside.sahabi li { break-inside: avoid; } aside.sahabi .sname { break-after: avoid; }
/* illustration on a year opener or a stage page (author, Year-1 PDF notes 4–5) */
.yo-img { height: 62mm; overflow: hidden; border-radius: 1.5mm; margin: 0 0 9mm; flex: none; }
.yo-img img, .yo-img svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* style-original.css — opt-in (build.py --style original).
   Restores the typography of the original book (v1.0-rc2): Aref Ruqaa for display titles,
   Amiri for body and boxes. The original Reem Kufi labels are replaced by Markazi Text Bold, in gold.
   No letter-spacing on Arabic (it breaks joining). Appended after book.css. */
:root { --display: 'Aref Ruqaa', 'Amiri', serif; --kufi: 'Markazi Text', 'Amiri', serif; }

.halftitle .s, .titlepage .proj, .part-open .num, .ch-title .n,
.toc li.part, .notes h4, .idx h5, h3.sec {
  font-family: var(--kufi); font-weight: 700; color: var(--gold); letter-spacing: 0; }
.halftitle .s { font-size: 14pt; }
.titlepage .proj { font-size: 15pt; }
.part-open .num { font-size: 16pt; color: var(--gold2); }
.ch-title .n { font-size: 15pt; }
.toc li.part { font-size: 15pt; }
.notes h4, .idx h5 { font-size: 15pt; }
h3.sec { font-size: 17.5pt; }

/* person boxes (not in rc2): same type as the original's boxed text */
aside.sahabi { font-family: 'Amiri', serif; font-size: 10.5pt; line-height: 1.85; color: #2a2620; }
aside.sahabi .sname { font-family: var(--display); font-weight: 700; font-size: 17pt; }
aside.sahabi .slabel { font-family: var(--kufi); font-weight: 700; font-size: 12pt; }
aside.sahabi li > strong:first-child { font-family: var(--kufi); font-weight: 700; font-size: 13pt; }
aside.sahabi { break-inside: avoid; }
/* year titles in the table of contents: heavy gold (author, Year-1 PDF note 2) */
.toc li.ch, .toc li.ch a { color: var(--gold); font-weight: 700; }
.toc li.ch .ys { color: var(--muted); font-weight: 400; }

:root{--fs:19px;--qs:25px}
html{background:#070815;overflow-x:clip}body{overflow-x:clip}
body{background:#070815;font-size:var(--fs);line-height:2}
.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:rgba(7,8,21,.9);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#f6f1e6;font-family:var(--sans);font-size:15px}
.topbar a{color:#f6f1e6;text-decoration:none;display:inline-flex;align-items:center;gap:6px}
.topbar .bk{color:#e7b35c}
.hero{position:relative;color:#f6f1e6;text-align:center;padding:64px 20px 56px;background:radial-gradient(90% 90% at 70% 10%,#2a2456,#14143a 50%,#070815);overflow:hidden;animation:zin .9s cubic-bezier(.2,.8,.2,1)}
.hero.md{background:radial-gradient(90% 90% at 70% 10%,#173d3a,#10263a 50%,#070815)}
@keyframes zin{from{transform:scale(1.3);opacity:0}to{transform:none;opacity:1}}
.hero .n{font-family:var(--kufi);font-weight:700;font-size:20px;color:var(--k)}
.hero h1{font-family:var(--display);font-weight:700;font-size:clamp(40px,8vw,64px);line-height:1.35;margin:8px 0 4px}
.hero .sub{font-size:20px;color:#cfc7b8}
.hero .period{font-family:var(--sans);font-size:14px;color:#a0988a;margin-top:14px}
.hero .tag{display:inline-block;margin-top:18px;font-family:var(--sans);font-size:13px;color:var(--k);border:1px solid var(--k);border-radius:20px;padding:2px 14px}
.hero .ill{max-width:560px;margin:26px auto 0;opacity:.95}.hero .ill img{width:100%;border-radius:10px;display:block}
main.read{max-width:720px;margin:0 auto;padding:36px 22px 20px;background:var(--ivory)}
main.read p{margin:0 0 .9em;text-align:justify}
.ch-title{margin:46px 0 18px;text-align:center}.ch-title .n{font-size:15px}.ch-title h2{font-size:34px}
.bridge-t{font-size:28px;margin:44px 0 16px}
.ch-head img{width:100%;border-radius:10px;display:block;margin-top:30px}
figure.quran blockquote{font-size:var(--qs)}
figure.quran figcaption,figure.fig figcaption,cite.hsrc{font-size:13px}
aside.tasawwur .tlabel{font-size:12px;background:var(--ivory)}
aside.sahabi .slabel{font-size:14px}aside.sahabi .sname{font-size:22px}aside.sahabi li>strong:first-child{font-size:15px}
aside.sahabi{font-size:.92em}
@media(max-width:560px){aside.sahabi ul{grid-template-columns:1fr}:root{--fs:18px;--qs:22px}}
.rest{max-width:720px;margin:0 auto;padding:10px 22px 40px;background:var(--ivory)}
.rest .cut{text-align:center;color:var(--gold);letter-spacing:.6em;margin:10px 0 18px}
.rest h3{font-family:var(--display);font-size:26px;color:var(--night);margin:0 0 6px;text-align:center}
.rest .lead{font-family:var(--sans);font-size:15px;color:var(--muted);text-align:center;margin:0 0 18px}
.rest ol{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}
.rest li{display:flex;gap:12px;align-items:baseline;padding:10px 4px;border-bottom:1px solid var(--rule);font-size:18px;color:#3d3a35}
.rest li .k{font-family:var(--sans);font-size:12px;color:var(--gold);min-width:52px}
.rest li.br{font-weight:700;color:var(--night)}
.pager{display:flex;justify-content:space-between;gap:12px;max-width:720px;margin:0 auto;padding:18px 22px 30px;background:var(--ivory);font-family:var(--sans);font-size:15px}
.pager a{color:var(--night);text-decoration:none;border:1px solid var(--rule);border-radius:12px;padding:8px 14px;background:#fff}
.pager a small{display:block;color:var(--muted);font-size:12px}
.back{display:block;width:max-content;margin:0 auto 40px;font-family:var(--sans);font-size:16px;color:#1b1406;background:linear-gradient(180deg,#f6d38f,#e7b35c);border-radius:30px;padding:10px 26px;text-decoration:none}
footer.f{background:#070815;color:#a0988a;font-family:var(--sans);font-size:13px;line-height:1.8;text-align:center;padding:26px 20px 34px}
:focus-visible{outline:2px solid var(--k);outline-offset:3px;border-radius:6px}
.soon{max-width:620px;margin:0 auto;padding:40px 22px 30px;text-align:center;font-size:20px;color:#3d3a35}
@view-transition{navigation:auto}
::view-transition-group(seal){animation-duration:.85s;animation-timing-function:cubic-bezier(.3,.9,.25,1)}
::view-transition-old(root),::view-transition-new(root){animation-duration:.55s}
.seal{width:112px;height:112px;margin:0 auto 18px;border-radius:50%;color:#fff8e6;display:grid;place-items:center;position:relative;view-transition-name:seal;background:radial-gradient(circle at 34% 26%,rgba(255,255,255,.6),rgba(255,255,255,0) 30%),radial-gradient(circle at 50% 62%,color-mix(in srgb,var(--k) 55%,#2a2140),color-mix(in srgb,var(--k) 18%,#0d0f24) 82%);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--k) 75%,#fff),inset 0 -8px 16px rgba(0,0,0,.35),0 0 26px color-mix(in srgb,var(--k) 60%,transparent),0 0 70px color-mix(in srgb,var(--k) 28%,transparent)}
.seal>svg:not(.oct){width:56%;height:56%;stroke-width:2;filter:drop-shadow(0 0 4px color-mix(in srgb,var(--k) 80%,transparent))}
.seal .oct{position:absolute;inset:-24%;width:148%;height:148%;fill:none;stroke:var(--k);stroke-width:1.6;opacity:.8;animation:spin 40s linear infinite}
@keyframes spin{to{rotate:360deg}}
.hero .rt{display:block;margin-top:10px;font-family:var(--sans);font-size:13px;color:#a0988a}
.hero>*:not(.seal){animation:up .8s .15s both cubic-bezier(.2,.8,.2,1)}
@keyframes up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.hero{animation:none}
.prog{position:fixed;top:0;left:0;right:0;height:3px;z-index:9;background:linear-gradient(90deg,var(--k),#fff4dc);transform-origin:100% 50%;transform:scaleX(0)}
.tools{display:flex;gap:6px}
.tools button{width:34px;height:34px;border-radius:50%;border:1px solid rgba(244,238,226,.25);background:none;color:#f6f1e6;font:600 14px var(--sans);cursor:pointer;display:grid;place-items:center}
.tools button:hover{border-color:var(--k);color:var(--k)}
.rv-in{opacity:0;transform:translateY(18px);transition:opacity .8s ease,transform .8s cubic-bezier(.2,.8,.2,1)}
.rv-in.seen{opacity:1;transform:none}
figure.quran{transition:background .8s,box-shadow .8s;border-radius:14px}
figure.quran.glow{background:radial-gradient(70% 90% at 50% 50%,color-mix(in srgb,var(--k) 14%,transparent),transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--k) 18%,transparent)}
.chapter .body>p:first-of-type{position:relative}
.ch-title h2::after{content:"";display:block;width:64px;height:2px;margin:12px auto 0;background:linear-gradient(90deg,transparent,var(--gold),transparent)}
html.night{--ivory:#10111c;--paper:#10111c;--ink:#e9e2d3;--muted:#a59d8f;--rule:#2c2b3a;--night:#f2e6c9}
html.night main.read p,html.night .rest li{color:#e3dccd}
html.night main.read strong,html.night main.read b{color:#fff4dc}html.night .qi .orn,html.night figure.quran .orn{color:var(--gold2)}
html.night figure.quran blockquote,html.night .qi{color:#f3e7c9}
html.night aside.tasawwur{background:linear-gradient(180deg,rgba(216,195,160,.1),rgba(216,195,160,.03))}html.night aside.tasawwur p{color:#ddd2bd}
html.night aside.sahabi{background:#171827}html.night .pager a{background:#171827;color:#f2e6c9}
html.night figure.fig img{filter:brightness(.92)}
@media(prefers-reduced-motion:reduce){.rv-in{opacity:1;transform:none;transition:none}.hero>*{animation:none!important}::view-transition-group(*){animation-duration:0s!important}}
