:root { --ink: #0B1B33; --muted: #6B7280; --line: #E3E7EE; --bg: #FAFAFA; --card: #fff; --pri: #14284B; --pri-soft: #EEF2F8; --gold: #0F7A55; --gold-soft: #EAF6F0; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "IBM Plex Sans Arabic", "Noto Kufi Arabic", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.85; }
a { color: var(--pri); }
.sh { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.btn { display: inline-block; background: var(--gold); color: #fff; padding: 8px 16px; border-radius: 12px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.wrap { max-width: 860px; margin: 0 auto; padding: 18px; }
h1, h2 { font-family: "Amiri", "IBM Plex Sans Arabic", serif; }
h1 { font-size: 1.7rem; line-height: 1.4; margin: 10px 0; }
h2 { font-size: 1.25rem; margin: 28px 0 10px; }
h3 { font-size: 1.05rem; margin: 18px 0 6px; color: var(--muted); }
.lead { font-size: 1.05rem; color: var(--muted); }
.crumbs { font-size: .85rem; color: var(--muted); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; }
.chips small, .lessons small { color: var(--muted); margin-inline-start: 6px; font-size: .78rem; }
.lessons { padding-inline-start: 22px; }
.lessons li { padding: 3px 0; }
.ki { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px 18px; }
.ki dt { font-weight: 700; margin-top: 12px; }
.ki dd { margin: 2px 0 10px; }
.tag { font-size: .72rem; background: var(--gold-soft); color: var(--gold); padding: 1px 8px; border-radius: 99px; font-weight: 700; }
.q { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; margin: 10px 0; }
.q-meta { font-size: .8rem; color: var(--muted); margin: 0; }
.q-stem { font-weight: 600; margin: 6px 0; }
.q details summary { cursor: pointer; color: var(--gold); font-weight: 700; }
.ans { background: var(--pri-soft); border-radius: 10px; padding: 6px 12px; }
.expl { font-size: .95rem; overflow-x: auto; }
.cta { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; background: var(--gold-soft); border-radius: 18px; padding: 14px 18px; margin: 24px 0; }
.cta p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.pn { display: flex; justify-content: space-between; gap: 10px; margin: 26px 0; }
.pn a { text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.pn .next { margin-inline-start: auto; }
.sf { border-top: 1px solid var(--line); padding: 18px; text-align: center; font-size: .88rem; color: var(--muted); }
.katex-display { overflow-x: auto; overflow-y: hidden; }
.katex { direction: ltr; unicode-bidi: isolate; display: inline-block; }
