/* ليطمئنّ قلبي — لازورد وذهب، من الليل إلى الفجر. الخط: Cairo، والآيات: Amiri */

:root {
  --night: #0B1030;
  --night-2: #18225C;
  --lapis: #2A41B0;
  --gold: #DDB65C;
  --dawn: #F0A27B;

  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #EDF1FB;
  --ink: #141833;
  --muted: #5A6080;
  --line: #DDE2F0;
  --link: #2A41B0;
  --accent: #96700F;
  --obj: #A2303F;
  --obj-bg: #FCF1F2;
  --fair-bg: #FDF7E6;
  --ok: #1C7A4A;
  --shadow: 0 1px 2px rgba(20, 24, 51, .05), 0 10px 28px rgba(20, 24, 51, .07);
  --shadow-up: 0 2px 4px rgba(20, 24, 51, .06), 0 18px 40px rgba(20, 24, 51, .13);

  --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --quran: "Amiri", "Traditional Arabic", serif;
  --latin: Georgia, "Times New Roman", serif;

  --measure: 44rem;
  --wide: 74rem;
  --r: 16px;
  --r-sm: 10px;
}

:root[data-theme="night"] {
  --bg: #080C24;
  --surface: #111940;
  --surface-2: #182252;
  --ink: #ECEEF8;
  --muted: #A7AECC;
  --line: #28316A;
  --link: #AFC0FF;
  --accent: #E2BF6A;
  --obj: #F4A6AF;
  --obj-bg: #2B1731;
  --fair-bg: #26233B;
  --ok: #7FDDA9;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .3);
  --shadow-up: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .45);
}

:root[data-font="2"] { font-size: 112.5%; }
:root[data-font="3"] { font-size: 125%; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }

h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; line-height: 1.45; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.05em; }
a { color: var(--link); text-underline-offset: .28em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 700; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--gold); color: #111; padding: .3rem 1rem; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: .6rem; }

/* ───── الشريط العلوي ───── */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .6rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 16, 48, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #F3F5FA;
  border-bottom: 1px solid rgba(221, 182, 92, .28);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-size: 1.3rem; font-weight: 800; white-space: nowrap; }
.brand__mark { width: 1.7rem; height: 1.7rem; color: var(--gold); }
.nav { display: flex; gap: .3rem; margin-inline-start: auto; font-size: 1rem; font-weight: 600; }
.nav a { color: #D3D9F0; text-decoration: none; padding: .2rem .95rem; border-radius: 999px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.nav a[aria-current="page"] { color: #1A1505; background: var(--gold); }
.tools { display: flex; gap: .2rem; }
.tool { background: none; border: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; color: #D3D9F0; }
.tool:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.tool svg { width: 1.3rem; height: 1.3rem; }

.readbar { position: sticky; top: 3.75rem; z-index: 49; height: 3px; }
.readbar i { display: block; height: 100%; width: 0; background: linear-gradient(to left, var(--gold), var(--dawn)); border-radius: 0 3px 3px 0; }

@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: .2rem 1rem; padding-block: .45rem; }
  .tools { margin-inline-start: auto; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: .2rem; font-size: .95rem; }
  .nav a { padding: .1rem .7rem; }
  .readbar { top: 6.1rem; }
  html { scroll-padding-top: 7.5rem; }
}

/* ───── الأزرار ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: 1.05rem; font-weight: 700; line-height: 1.6;
  padding: .6rem 1.7rem; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; background: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: linear-gradient(135deg, #EBCB7C, #D4A847); color: #1A1505; box-shadow: 0 8px 22px rgba(221, 182, 92, .32); }
.btn--gold:hover { box-shadow: 0 10px 28px rgba(221, 182, 92, .45); }
.btn--ghost { border-color: rgba(243, 245, 250, .45); color: #F3F5FA; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn--line { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--line:hover { border-color: var(--link); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }

/* ───── السماء (الرئيسية) ───── */
.sky {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(74, 98, 220, .35), transparent 70%),
    radial-gradient(50rem 26rem at 5% 20%, rgba(120, 80, 190, .22), transparent 70%),
    linear-gradient(to bottom, #060A22 0%, var(--night) 50%, var(--night-2) 100%);
  color: #F3F5FA;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem) 0;
  text-align: center;
}
.sky__stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.sky__glow {
  position: absolute; inset-inline: 0; bottom: 0; height: 75%; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(240, 162, 123, .95) 0%, rgba(214, 120, 130, .55) 22%, rgba(110, 90, 170, .28) 50%, transparent 100%);
  opacity: var(--dawn-o, .12);
  transition: opacity 1.8s ease-out;
}
.sky__inner { max-width: var(--wide); margin: 0 auto; }
.sky__verse {
  display: inline-block; font-family: var(--quran); font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 2; color: var(--gold);
  margin: 0; padding: .1rem 1.6rem; border: 1px solid rgba(221, 182, 92, .35); border-radius: 999px; background: rgba(221, 182, 92, .07);
}
.sky__verse small { font-family: var(--font); font-size: .5em; color: #C9D0EC; margin-inline-start: .7em; white-space: nowrap; }
.sky__title { font-size: clamp(2.6rem, 8vw, 5.2rem); font-weight: 800; line-height: 1.3; margin: .35em 0 .2em; }
.sky__title em { font-style: normal; background: linear-gradient(120deg, #F3D48A, #F0A27B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sky__lede { max-width: 40rem; font-size: 1.2rem; color: #DCE1F5; margin: 0 auto 1.8rem; }
.sky__cta { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; justify-content: center; }

.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: 2.2rem auto 0; padding: 0; list-style: none; }
.stats li { min-width: 8.5rem; padding: .7rem 1.2rem; border-radius: var(--r); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.stats b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.3; color: var(--gold); }
.stats span { font-size: .95rem; color: #CBD2EE; }

.path { margin-top: clamp(1.2rem, 4vw, 2.5rem); position: relative; }
.path svg { width: 100%; height: auto; display: block; overflow: visible; }
.path__line { fill: none; stroke: rgba(243, 245, 250, .3); stroke-width: 1.5; stroke-dasharray: 3 7; stroke-linecap: round; }
.path__done { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.path__node circle { fill: #10173F; stroke: rgba(243, 245, 250, .6); stroke-width: 1.5; transition: r .2s; }
.path__node.is-done circle { fill: var(--gold); stroke: var(--gold); }
.path__node.is-next circle { stroke: var(--gold); stroke-width: 3; }
.path__node text { font-family: var(--font); font-weight: 600; font-size: 15px; fill: #E6EAF8; text-anchor: middle; }
.path__numin { font-size: 14px; font-weight: 700; dominant-baseline: central; }
.path__node.is-done .path__numin { fill: #1A1505; }
.path__node a { text-decoration: none; }
.path__node a:hover circle, .path__node a:focus-visible circle { r: 18; }
.path__sun { fill: #FFD9A8; }
.path__ground { height: 2rem; }
@media (max-width: 760px) { .path__label { display: none; } }

/* ───── أقسام عامة ───── */
.wrap { max-width: var(--wide); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem); }
.wrap--read { max-width: calc(var(--measure) + 5rem); }
.wrap--tight { padding-top: 0; }
.sec-head { text-align: center; max-width: 42rem; margin: 0 auto 2rem; }
.sec-title { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: .4rem; }
.sec-title::after { content: ""; display: block; width: 3.5rem; height: 4px; border-radius: 4px; margin: .6rem auto 0; background: linear-gradient(to left, var(--gold), var(--dawn)); }
.sec-head p { color: var(--muted); margin: 0; font-size: 1.1rem; }
.sec-title--start::after { margin-inline: 0; }

.night { display: grid; gap: 2rem 3rem; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
.night__panel { background: linear-gradient(160deg, #0B1030, #1A2462); color: #F3F5FA; border-radius: var(--r); padding: 1.6rem 1.8rem; box-shadow: var(--shadow-up); }
.night__verses { margin: 0; padding: 0; list-style: none; font-family: var(--quran); font-size: 1.4rem; line-height: 2.2; }
.night__verses li + li { margin-top: .4rem; padding-top: .4rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.night__verses .n { color: var(--gold); font-size: .85em; margin-inline-start: .3em; }
.night__ref { font-size: .95rem; color: #C9D0EC; margin: .8rem 0 0; }
.lede { font-size: 1.15rem; max-width: var(--measure); }
@media (max-width: 860px) { .night { grid-template-columns: 1fr; } }

.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.rule { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem 1.4rem; box-shadow: var(--shadow); }
.rule__icon { width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--night-2), var(--lapis)); color: var(--gold); margin-bottom: .9rem; }
.rule__icon svg { width: 1.6rem; height: 1.6rem; }
.rule h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.rule p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.85; }
@media (max-width: 1000px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rules { grid-template-columns: 1fr; } }

/* بطاقات المحطات */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; list-style: none; padding: 0; margin: 0; }
.card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem 1.2rem; height: 100%;
  padding: 1.5rem 1.5rem 1.2rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: linear-gradient(to left, var(--c1, var(--lapis)), var(--c2, var(--gold))); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); border-color: var(--link); }
.card__icon { grid-row: 1 / span 3; width: 3.6rem; height: 3.6rem; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--c1, var(--night-2)), var(--night)); color: var(--gold); }
.card__icon svg { width: 1.9rem; height: 1.9rem; }
.card__num { font-size: .92rem; font-weight: 700; color: var(--accent); }
.card__title { font-size: 1.4rem; font-weight: 800; line-height: 1.5; }
.card__sub { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.85; }
.card__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .93rem; color: var(--muted); }
.card__foot b { color: var(--accent); font-weight: 700; }
.meter { display: block; width: 7rem; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; flex-shrink: 0; }
.meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(to left, var(--gold), var(--dawn)); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* ───── رأس المحطة والفصل ───── */
.band { background: linear-gradient(150deg, var(--night) 0%, var(--band, var(--night-2)) 100%); color: #F3F5FA; padding: clamp(2rem, 6vw, 3.8rem) clamp(1rem, 4vw, 2.5rem); position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 60%; background: linear-gradient(to top, rgba(240, 162, 123, var(--band-dawn, 0)), transparent); pointer-events: none; }
.band__inner { max-width: var(--wide); margin: 0 auto; position: relative; z-index: 1; }
.band__icon { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); width: clamp(6rem, 16vw, 11rem); height: clamp(6rem, 16vw, 11rem); color: rgba(221, 182, 92, .16); }
.band__icon svg { width: 100%; height: 100%; }
.crumbs { font-size: .95rem; color: #C9D0EC; margin-bottom: .7rem; display: flex; flex-wrap: wrap; gap: .1rem .6rem; }
.crumbs a { color: #E6EAF8; }
.crumbs span[aria-hidden] { opacity: .5; }
.crumbs--page { color: var(--muted); margin-bottom: 1.5rem; }
.crumbs--page a { color: var(--link); }
.band__title { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.4; max-width: 50rem; }
.band__sub { font-size: 1.2rem; color: #E0E5F7; max-width: 44rem; margin: .4rem 0 0; }
.band__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 0; padding: 0; list-style: none; font-size: .93rem; }
.band__meta li { padding: .05rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #E6EAF8; }

.intro { font-size: 1.2rem; max-width: var(--measure); margin-bottom: 2rem; }

.chlist { list-style: none; margin: 0; padding: 0; counter-reset: ch; display: grid; gap: .9rem; }
.chlist li { counter-increment: ch; }
.chlist a { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0 1.1rem; align-items: center; padding: 1rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.chlist a:hover { transform: translateY(-2px); border-color: var(--link); box-shadow: var(--shadow-up); }
.chlist a::before { content: counter(ch, arabic-indic); width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; font-weight: 800; background: var(--surface-2); color: var(--link); }
.chlist a.is-read::before { content: "✓"; background: linear-gradient(135deg, #EBCB7C, #D4A847); color: #1A1505; }
.chlist h3 { font-size: 1.2rem; }
.chlist p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.chlist__state { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.chlist a.is-read .chlist__state { color: var(--accent); font-weight: 700; }
@media (max-width: 560px) { .chlist a { grid-template-columns: 2.6rem minmax(0, 1fr); } .chlist__state { grid-column: 2; } .chlist a::before { width: 2.6rem; height: 2.6rem; } }

/* ───── صفحة الفصل ───── */
.read { max-width: var(--wide); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem); display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 16rem); gap: 0 4rem; justify-content: space-between; }
.read__body { min-width: 0; }
.read__side { position: sticky; top: 5.5rem; align-self: start; font-size: .95rem; line-height: 1.75; max-height: calc(100vh - 7rem); overflow: auto; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.read__side h2 { font-size: 1rem; margin-bottom: .6rem; }
.read__side ol { list-style: none; margin: 0; padding: 0; }
.read__side li { margin-bottom: .5rem; padding-inline-start: .8rem; border-inline-start: 2px solid var(--line); }
.read__side li.is-obj { border-inline-start-color: var(--obj); }
.read__side a { color: var(--muted); text-decoration: none; }
.read__side a:hover { color: var(--link); }
.sidebtn { margin-top: .8rem; width: 100%; font-size: .9rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: .2rem .9rem; }
.sidebtn:hover { border-color: var(--link); }
@media (max-width: 1040px) { .read { grid-template-columns: minmax(0, var(--measure)); justify-content: center; } .read__side { display: none; } }

.read__body > p { font-size: 1.1rem; }
.read__body > h3 { font-size: 1.55rem; font-weight: 800; margin: 2.4rem 0 .8rem; padding-inline-start: .9rem; border-inline-start: 5px solid var(--gold); line-height: 1.5; }
.read__body ul, .read__body ol { padding-inline-start: 1.4rem; margin: 0 0 1.2em; font-size: 1.1rem; }
.read__body li { margin-bottom: .35em; }
.read__body li::marker { color: var(--accent); font-weight: 700; }

/* الدليل */
.arg { margin: 1.8rem 0; padding: 1.3rem 1.5rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.arg::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: linear-gradient(to left, var(--lapis), #6E86F5); }
.arg h4 { font-size: 1.2rem; margin-bottom: .6rem; color: var(--link); }
.arg ol { list-style: none; margin: 0; padding: 0; counter-reset: pr; font-size: 1.08rem; }
.arg ol li { counter-increment: pr; display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; margin: 0; padding: .4rem 0; align-items: start; }
.arg ol li::before { content: counter(pr, arabic-indic); width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem; background: var(--surface-2); color: var(--link); }
.arg__concl { margin: .6rem 0 0; padding: .7rem 1rem; border-radius: var(--r-sm); background: var(--surface-2); display: grid; grid-template-columns: 1.6rem 1fr; gap: .8rem; font-weight: 700; font-size: 1.1rem; }
.arg__concl::before { content: "∴"; font-size: 1.4rem; color: var(--accent); line-height: 1.4; text-align: center; }

/* الاقتباس */
.quote { margin: 2rem 0; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0 1.3rem; padding: 1.4rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); position: relative; }
.quote::after { content: "”"; position: absolute; inset-inline-end: 1.2rem; top: -.2rem; font-family: Georgia, serif; font-size: 5rem; line-height: 1; color: var(--gold); opacity: .35; pointer-events: none; }
.portrait {
  width: 5.5rem; aspect-ratio: 5 / 6.4; object-fit: cover; object-position: center 20%;
  background: linear-gradient(to bottom, var(--night-2), var(--night));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 128' preserveAspectRatio='none'%3E%3Cpath d='M0 128V52C0 22 22 6 50 0c28 6 50 22 50 52v76z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 128' preserveAspectRatio='none'%3E%3Cpath d='M0 128V52C0 22 22 6 50 0c28 6 50 22 50 52v76z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.portrait--none { display: grid; place-items: center; color: var(--gold); font-size: 2rem; font-weight: 800; padding-top: .8rem; }
.quote__pic { grid-row: 1 / span 3; }
.quote__who { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .7rem; margin-bottom: .1rem; padding-inline-end: 3rem; }
.quote__name { font-size: 1.15rem; font-weight: 800; color: var(--ink); text-decoration: none; }
a.quote__name:hover { color: var(--link); text-decoration: underline; }
.quote__role { font-size: .93rem; color: var(--muted); flex-basis: 100%; }
.quote blockquote { grid-column: 2; margin: .5rem 0 .4rem; font-size: 1.2rem; line-height: 2; font-weight: 500; }
.quote__more { grid-column: 1 / -1; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .95rem; line-height: 1.8; }
.quote__src { margin: 0; color: var(--muted); }
.quote__src a { overflow-wrap: anywhere; font-weight: 600; }
.quote__note { margin: .6rem 0 0; padding: .5rem .9rem; border-inline-start: 4px solid var(--gold); background: var(--fair-bg); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.quote__note b { color: var(--accent); }
.quote details { margin-bottom: .4rem; }
.quote summary { cursor: pointer; font-size: .93rem; font-weight: 700; color: var(--link); width: fit-content; }
.quote__orig { font-family: var(--latin); font-size: 1rem; line-height: 1.7; margin: .4rem 0 .2rem; padding: .6rem .9rem; background: var(--surface-2); border-radius: var(--r-sm); }
.quote__orig[dir="ltr"] { text-align: left; }
@media (max-width: 560px) {
  .quote { grid-template-columns: 3.8rem minmax(0, 1fr); gap: 0 .9rem; padding: 1.1rem; }
  .portrait { width: 3.8rem; }
  .quote blockquote { grid-column: 1 / -1; margin-top: .9rem; }
  .quote__pic { grid-row: 1; }
}

.stance { display: inline-block; font-size: .8rem; font-weight: 700; line-height: 1.7; padding: 0 .7rem; border-radius: 999px; white-space: nowrap; background: var(--st-bg); color: var(--st); }
.stance--atheist { --st: #9C2F3C; --st-bg: #FBE9EB; }
.stance--agnostic { --st: #4F5470; --st-bg: #ECEEF5; }
.stance--deist { --st: #7A5A0A; --st-bg: #FAF0D4; }
.stance--christian { --st: #1D5A9E; --st-bg: #E5F0FB; }
.stance--jewish { --st: #563C9C; --st-bg: #EEE9FA; }
.stance--muslim { --st: #17703F; --st-bg: #E2F5EA; }
.stance--other { --st: #4D5761; --st-bg: #ECEFF2; }
:root[data-theme="night"] .stance--atheist { --st: #F7B3BB; --st-bg: #4A1E2A; }
:root[data-theme="night"] .stance--agnostic { --st: #D0D4E6; --st-bg: #2C3257; }
:root[data-theme="night"] .stance--deist { --st: #EBCF82; --st-bg: #40351A; }
:root[data-theme="night"] .stance--christian { --st: #A9CFFF; --st-bg: #17335A; }
:root[data-theme="night"] .stance--jewish { --st: #CDBBFF; --st-bg: #33265F; }
:root[data-theme="night"] .stance--muslim { --st: #92E5B6; --st-bg: #143D2A; }
:root[data-theme="night"] .stance--other { --st: #CAD1D9; --st-bg: #2C3540; }

/* الاعتراض والرد */
.obj { margin: 2rem 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.obj__q { padding: 1.2rem 1.5rem 1.1rem; background: var(--obj-bg); border-inline-start: 6px solid var(--obj); }
.obj__tag, .obj__atag { display: inline-block; font-size: .82rem; font-weight: 800; padding: 0 .8rem; border-radius: 999px; line-height: 1.8; margin-bottom: .4rem; }
.obj__tag { background: var(--obj); color: #fff; }
:root[data-theme="night"] .obj__tag { color: #2B1731; }
.obj__atag { background: var(--lapis); color: #fff; }
.obj__q h4 { font-size: 1.25rem; font-weight: 800; }
.obj__by { font-size: .93rem; color: var(--muted); margin: 0 0 .5rem; line-height: 1.7; }
.obj__q p:last-child, .obj__a p:last-child { margin-bottom: 0; }
.obj__toggle { width: 100%; text-align: start; border: 0; border-top: 1px solid var(--line); background: var(--surface); padding: .7rem 1.5rem; font-size: 1rem; font-weight: 700; color: var(--link); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.obj__toggle:hover { background: var(--surface-2); }
.obj__toggle::after { content: "+"; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.obj__toggle[aria-expanded="true"]::after { content: "−"; }
.obj__a { padding: 1.1rem 1.5rem 1.2rem; border-top: 1px solid var(--line); border-inline-start: 6px solid var(--lapis); }
.obj__a[hidden] { display: none; }

/* ميزان الإنصاف */
.fair { margin: 2.4rem 0; padding: 1.3rem 1.5rem; background: var(--fair-bg); border: 1.5px solid rgba(221, 182, 92, .55); border-radius: var(--r); display: grid; grid-template-columns: 3rem 1fr; gap: 0 1.1rem; }
.fair svg { width: 3rem; height: 3rem; padding: .5rem; border-radius: 14px; background: linear-gradient(135deg, #EBCB7C, #D4A847); color: #1A1505; }
.fair h4 { font-size: 1.2rem; font-weight: 800; color: var(--accent); margin-bottom: .2rem; }
.fair p:last-child { margin-bottom: 0; }

/* النصوص المقدسة */
.verse, .hadith, .scripture { margin: 1.8rem 0; padding: 1.1rem 1.5rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-inline-start: 6px solid var(--gold); box-shadow: var(--shadow); }
.verse { text-align: center; border-inline-start-width: 1px; border-color: rgba(221, 182, 92, .55); background: linear-gradient(180deg, var(--fair-bg), var(--surface)); }
.verse p { font-family: var(--quran); font-size: 1.6rem; line-height: 2.2; margin: 0; }
.verse p::before { content: "﴿ "; color: var(--accent); }
.verse p::after { content: " ﴾"; color: var(--accent); }
.hadith p, .scripture p { font-size: 1.15rem; font-weight: 500; margin: 0; }
.hadith p::before, .scripture p::before { content: "«"; color: var(--accent); }
.hadith p::after, .scripture p::after { content: "»"; color: var(--accent); }
.scripture { border-inline-start-color: var(--muted); }
.cite { display: block; font-style: normal; font-size: .92rem; font-weight: 600; color: var(--muted); margin-top: .3rem; }

/* الخط الزمني */
.tl { list-style: none; margin: 2rem 0; padding: 0; border-inline-start: 3px solid var(--line); }
.tl li { position: relative; padding: 0 0 1.5rem; padding-inline-start: 1.6rem; margin: 0; }
.tl li::before { content: ""; position: absolute; inset-inline-start: -9px; top: .6rem; width: 15px; height: 15px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); }
.tl__when { display: inline-block; font-weight: 800; color: #1A1505; background: linear-gradient(135deg, #EBCB7C, #D4A847); font-size: .92rem; padding: 0 .8rem; border-radius: 999px; }
.tl__title { font-weight: 800; font-size: 1.12rem; margin-inline-start: .6rem; }
.tl p { margin: .2rem 0 0; }

/* الجداول */
.tablewrap { margin: 2rem 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.tablewrap:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.8; }
caption { font-weight: 800; text-align: start; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); }
th, td { padding: .65rem 1.1rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 8rem; }
thead th { font-weight: 800; background: var(--night); color: #F3F5FA; white-space: nowrap; }
tbody th { font-weight: 700; background: var(--surface-2); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

.fact { margin: 2rem 0; padding: 1.1rem 1.5rem; border-radius: var(--r); background: linear-gradient(135deg, var(--night), var(--night-2)); color: #F3F5FA; box-shadow: var(--shadow); }
.fact__v { font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 800; line-height: 1.4; color: var(--gold); unicode-bidi: plaintext; }
.fact__l { margin: 0; font-size: 1.08rem; }
.fact__s { margin: .2rem 0 0; font-size: .9rem; color: #C3CAE8; }
.fact__s a { color: #C9D6FF; }

.callout { margin: 2rem 0; padding: 1.1rem 1.5rem; background: var(--surface-2); border-radius: var(--r); border-inline-start: 6px solid var(--lapis); }
.callout h4 { font-size: 1.12rem; font-weight: 800; margin-bottom: .2rem; }
.callout p:last-child { margin-bottom: 0; }

/* نهاية الفصل */
.reflect { margin: 3rem 0 0; padding: 1.4rem 1.5rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.reflect h2, .srcs h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: .5rem; }
.reflect ul { list-style: none; padding: 0; margin: 0; font-size: 1.08rem; }
.reflect li { padding: .3rem 0; padding-inline-start: 2.2rem; position: relative; margin: 0; }
.reflect li::before { content: "؟"; position: absolute; inset-inline-start: 0; top: .45rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--link); font-weight: 800; font-size: .95rem; }
.srcs { margin-top: 2rem; font-size: .97rem; line-height: 1.8; }
.srcs ol { padding-inline-start: 1.4rem; margin: 0; font-size: .97rem; }
.srcs li { margin-bottom: .5rem; overflow-wrap: anywhere; }

.done { margin-top: 2.5rem; padding: 1.2rem 1.5rem; border-radius: var(--r); background: linear-gradient(135deg, var(--night), var(--night-2)); color: #F3F5FA; display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; }
.done p { margin: 0; font-weight: 700; font-size: 1.1rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.3rem; }
.pager a { display: block; padding: 1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; background: var(--surface); color: var(--ink); line-height: 1.7; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.pager a:hover { border-color: var(--link); transform: translateY(-2px); }
.pager small { display: block; color: var(--muted); font-size: .88rem; }
.pager b { font-weight: 800; font-size: 1.08rem; }
.pager .pager__next { text-align: end; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .pager__next { grid-column: 1; } }

/* الاختبار */
.quiz { margin-top: 3rem; padding: 1.8rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.quiz > p { color: var(--muted); }
.quiz__q { margin: 1.6rem 0 0; }
.quiz__q h3 { font-weight: 700; font-size: 1.12rem; line-height: 1.9; }
.quiz__opts { display: grid; gap: .5rem; margin-top: .6rem; }
.quiz__opt { text-align: start; padding: .55rem 1.1rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--bg); line-height: 1.8; }
.quiz__opt:hover:not(:disabled) { border-color: var(--link); }
.quiz__opt:disabled { cursor: default; opacity: .7; }
.quiz__opt.is-right { border-color: var(--ok); background: rgba(28, 122, 74, .13); opacity: 1; font-weight: 700; }
.quiz__opt.is-wrong { border-color: var(--obj); background: var(--obj-bg); opacity: 1; }
.quiz__why { margin: .6rem 0 0; padding: .6rem 1rem; border-radius: var(--r-sm); background: var(--fair-bg); font-size: 1.02rem; }

/* ───── الشهود ───── */
.pagehead { margin-bottom: 1.6rem; }
.pagehead h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 2rem; }
.chip { font-size: .97rem; font-weight: 600; padding: .2rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); }
.chip:hover { border-color: var(--link); }
.chip[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
:root[data-theme="night"] .chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1A1505; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.2rem; list-style: none; padding: 0; margin: 0; }
.people a { display: block; height: 100%; text-decoration: none; color: var(--ink); text-align: center; padding: 1.3rem 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.people a:hover { transform: translateY(-3px); border-color: var(--link); }
.people .portrait { width: 6.5rem; margin: 0 auto .7rem; }
.people b { display: block; font-weight: 800; font-size: 1.05rem; line-height: 1.5; }
.people small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.6; margin: .1rem 0 .4rem; }

.person { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 2rem; align-items: start; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.person .portrait { width: 9rem; }
.person h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; }
.person__en { font-family: var(--latin); color: var(--muted); direction: ltr; text-align: right; margin: 0; }
.person__note { margin-top: .8rem; padding: .6rem 1rem; border-inline-start: 4px solid var(--gold); background: var(--fair-bg); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.person__credit { font-size: .8rem; color: var(--muted); margin-top: .4rem; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 560px) { .person { grid-template-columns: 1fr; } }

/* ───── المصادر ───── */
.srcpage h2 { font-size: 1.5rem; font-weight: 800; margin: 2.5rem 0 .3rem; padding-inline-start: .9rem; border-inline-start: 5px solid var(--gold); }
.srcpage h3 { font-size: 1.1rem; margin: 1.3rem 0 .3rem; }
.srcpage ol { font-size: .97rem; line-height: 1.8; padding-inline-start: 1.4rem; margin: 0; }
.srcpage li { margin-bottom: .35rem; overflow-wrap: anywhere; }
.credits { font-size: .9rem; line-height: 1.7; columns: 2 20rem; padding-inline-start: 1.2rem; }
.credits li { break-inside: avoid; margin-bottom: .4rem; overflow-wrap: anywhere; }

/* ───── البحث ───── */
.search { width: min(44rem, calc(100vw - 2rem)); max-height: min(80vh, 44rem); margin-top: 8vh; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); overflow: hidden; box-shadow: var(--shadow-up); }
.search[open] { display: flex; flex-direction: column; }
.search::backdrop { background: rgba(8, 11, 36, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.search__bar { display: flex; gap: .5rem; padding: .9rem; border-bottom: 1px solid var(--line); }
.search__bar input { flex: 1; font: inherit; font-size: 1.08rem; padding: .4rem 1.2rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); min-width: 0; }
.search__close { border: 0; background: none; color: var(--muted); padding: 0 .8rem; font-weight: 700; }
.search__results { overflow: auto; padding: .3rem 0; }
.search__results p { margin: 1rem 1.3rem; color: var(--muted); }
.hit { display: block; padding: .7rem 1.3rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); line-height: 1.8; }
.hit:hover, .hit:focus-visible { background: var(--surface-2); }
.hit b { font-weight: 800; display: block; }
.hit small { color: var(--accent); font-size: .88rem; font-weight: 600; display: block; }
.hit span { font-size: .96rem; color: var(--muted); display: block; }
.hit mark { background: rgba(221, 182, 92, .5); color: inherit; padding: 0 .15em; border-radius: 4px; }

/* ───── التذييل ───── */
.foot { background: var(--night); color: #C9D0EC; padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 2rem; font-size: 1rem; text-align: center; margin-top: 3rem; border-top: 1px solid rgba(221, 182, 92, .28); }
.foot__brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 0 .2rem; }
.foot p { max-width: 44rem; margin: 0 auto .5rem; }
.foot__verse { font-family: var(--quran); font-size: 1.35rem; color: var(--gold); line-height: 2; }
.foot__links { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; justify-content: center; font-weight: 600; }
.foot a { color: #F3F5FA; }

.empty { padding: 3rem 0; color: var(--muted); text-align: center; }

/* ───── الأدوات التفاعلية ───── */
.wg { margin: 2.4rem 0; border-radius: 20px; background: linear-gradient(160deg, #0B1030, #18225C); color: #EDF0FA; overflow: hidden; box-shadow: var(--shadow-up); border: 1px solid rgba(221, 182, 92, .3); }
.wg__head { padding: 1.3rem 1.6rem .2rem; }
.wg__head h4 { font-size: 1.35rem; font-weight: 800; color: var(--gold); }
.wg__head p { margin: 0; color: #C9D0EC; font-size: 1rem; line-height: 1.8; }
.wg__body { padding: 1.1rem 1.6rem 1.4rem; }
.wg__note { margin: 0; padding: .9rem 1.6rem; background: rgba(255, 255, 255, .06); font-size: .92rem; line-height: 1.8; color: #C9D0EC; }
.wg input[type="range"] { width: 100%; accent-color: var(--gold); direction: ltr; }

.ft__canvas { width: 100%; height: 11rem; display: block; border-radius: 14px; background: #060920; border: 1px solid rgba(255, 255, 255, .1); }
.ft__status { display: inline-block; font-size: 1.05rem; font-weight: 800; margin: .9rem 0 .3rem; padding: .1rem 1.1rem; border-radius: 999px; }
.ft__status.is-ok { color: #0C2B1B; background: #8FE0B0; }
.ft__status.is-bad { color: #3A0F16; background: #F5AEB6; }
.ft__why { margin: 0 0 1.1rem; color: #DDE2F5; min-height: 3.8em; font-size: 1.03rem; line-height: 1.9; }
.ft__dials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ft__dial { padding: .8rem 1rem; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.ft__dial label { display: flex; justify-content: space-between; gap: 1rem; font-size: 1rem; font-weight: 700; }
.ft__dial output { color: var(--gold); direction: ltr; unicode-bidi: isolate; font-family: var(--latin); }
.ft__dial small { display: block; color: #AEB7DA; font-size: .86rem; line-height: 1.6; }
.ft__reset { margin-top: 1rem; }
@media (max-width: 640px) { .ft__dials { grid-template-columns: 1fr; } }

.sc__stage { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.4rem; align-items: center; min-height: 12rem; margin-bottom: .6rem; }
.sc__glyph { width: 9rem; height: 9rem; padding: .8rem; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .12); }
.sc__name { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1.5; }
.sc__size { color: var(--gold); font-size: 1.02rem; font-weight: 700; unicode-bidi: plaintext; }
.sc__text { margin: .3rem 0 0; color: #DDE2F5; font-size: 1.03rem; line-height: 1.9; }
.sc__ruler { display: flex; justify-content: space-between; font-size: .85rem; color: #AEB7DA; margin-top: .2rem; }
.sc__steps { display: flex; gap: .6rem; margin-top: .8rem; justify-content: space-between; align-items: center; }
.sc__steps span { font-size: .95rem; color: #C9D0EC; }
@media (max-width: 560px) { .sc__stage { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

@media (prefers-reduced-motion: reduce) {
  .sky__glow, .btn, .card, .chlist a, .pager a, .people a { transition: none; }
  .btn:hover, .card:hover, .chlist a:hover, .pager a:hover, .people a:hover { transform: none; }
}

@media print {
  .top, .foot, .readbar, .read__side, .pager, .done, .obj__toggle { display: none !important; }
  .obj__a[hidden] { display: block; }
  body { background: #fff; color: #000; font-size: 12pt; }
}
