/* ==========================================================================
   Ṣifat al-Ṣalāh — 2026 redesign. Parchment, ink, mihrab teal (accent) and ochre (marks of provenance).
   Shares the Bayt al-Maʾāthir family strip and footer with Mutūn, Aʿlām and Masār al-Anbiyāʾ.
   ========================================================================== */

:root {
  --bg: #F3EEE3;
  --bg-2: #EAE3D3;
  --surface: #FBF8F1;
  --ink: #1B1814;
  --ink-2: #4F483D;
  --ink-3: #6B6356;
  --ink-4: #8C8476;
  --line: #D9D0BD;
  --line-2: #CFC5AF;
  --line-soft: #E6DECD;
  --accent: #1D5C5A;
  --accent-2: #7FA9A4;
  --accent-soft: #DDE9E5;
  --accent-line: #9DBAB6;
  --gold: #8E6219;
  --strip: #1B1814;
  --strip-ink: #CFC6B4;
  --strip-k: #8C8476;
  --shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 10px 30px -18px rgba(30, 25, 15, .35);

  --f-ar: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;
  --f-display: "EB Garamond", Garamond, Georgia, serif;
  --f-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14130f; --bg-2: #1c1a15; --surface: #1f1d18; --ink: #ECE5D6; --ink-2: #C4BAA6; --ink-3: #9C9281; --ink-4: #7d7466;
    --line: #322e27; --line-2: #403a31; --line-soft: #29261f; --accent: #7CC1B8; --accent-2: #3f6e69; --accent-soft: #1c2d2b; --accent-line: #3f6e69;
    --gold: #D3A65C; --strip: #0b0a08; --strip-ink: #B9AF9B; --strip-k: #7d7466; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14130f; --bg-2: #1c1a15; --surface: #1f1d18; --ink: #ECE5D6; --ink-2: #C4BAA6; --ink-3: #9C9281; --ink-4: #7d7466;
  --line: #322e27; --line-2: #403a31; --line-soft: #29261f; --accent: #7CC1B8; --accent-2: #3f6e69; --accent-soft: #1c2d2b; --accent-line: #3f6e69;
  --gold: #D3A65C; --strip: #0b0a08; --strip-ink: #B9AF9B; --strip-k: #7d7466; --shadow: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-y: scroll; }
::selection { background: var(--accent-soft); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
#app:focus { outline: none; }
.muted { color: var(--ink-3); }
.fine { font-size: 12.5px; color: var(--ink-3); }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; transform: translateY(-300%); background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 4px; z-index: 3000; }
.skip:focus { transform: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } }
.hide-sm { display: inline; } .show-sm { display: none; }
@media (max-width: 600px) { .hide-sm { display: none !important; } .show-sm { display: inline; } }
[lang="ar"] { font-family: var(--f-ar); }
.gar { font-family: var(--f-display); }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
html[lang="ar"] .eyebrow, html[lang="ar"] .label { letter-spacing: 0; text-transform: none; font-size: 13.5px; }
.label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--ink-4); }
.u { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; color: var(--ink); }
.u:hover { text-decoration-color: var(--ink-3); }


/* ---------- Buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 500; }
.btn:hover { color: var(--bg); opacity: .92; }
.btn svg { width: 16px; height: 16px; }
html[dir="rtl"] .btn svg, html[dir="rtl"] .arr { transform: scaleX(-1); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; }
.chip svg { width: 15px; height: 15px; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.field { width: 84px; height: 38px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 14px; font-size: 14px; }
.field:focus { outline: none; border-color: var(--accent); }
.prov { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--gold); border: 1px dashed var(--gold); border-radius: 999px; padding: 4px 10px; line-height: 1.3; }
a.prov:hover { color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.src-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 4px; border: 1px solid var(--accent-line); color: var(--accent); font-size: 12px; font-weight: 500; }
.checked { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.checked i { width: 8px; height: 8px; border-radius: 99px; background: currentColor; display: inline-block; }
.checked.is-review { color: var(--gold); }

/* ---------- Home ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: 64px; padding-bottom: 80px; }
.hero__text { flex: 1 1 440px; min-width: 0; }
.hero__pre { margin: 18px 0 0; font-size: 30px; line-height: 1.2; color: var(--ink-2); }
.hero__ar { margin: 0; font-weight: 400; font-size: clamp(46px, 6.4vw, 78px); line-height: 1.25; }
@media (min-width: 700px) { .hero__ar { white-space: nowrap; } }
.hero__saw { font-size: .5em; vertical-align: .35em; }
.hero__en { margin: 12px 0 0; font-family: var(--f-display); font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; }
.hero__lede { margin: 20px 0 0; font-size: 16px; color: var(--ink-2); max-width: 520px; }
.hero__cta { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.hero__facts { margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); max-width: 520px; }
.hero__facts b { color: var(--ink); font-weight: 600; }
html[dir="ltr"] .hero__text [lang="ar"] { text-align: left; }
.mihrab { flex: 1 1 420px; min-width: 0; margin: 0; }
.mihrab__arch { background: var(--surface); border: 1px solid var(--line-2); border-radius: 260px 260px 4px 4px; padding: 96px 44px 36px; display: flex; flex-direction: column; gap: 18px; max-width: 520px; margin-inline-start: auto; }
@media (max-width: 600px) { .mihrab__arch { padding: 72px 22px 26px; border-radius: 200px 200px 4px 4px; } }
.mihrab__orn { display: flex; justify-content: center; color: var(--accent); }
.mihrab__k { margin: 0; text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); }
.mihrab__ar { margin: 0; font-size: 25px; line-height: 2; text-align: right; }
.mihrab__tr { margin: 0; font-family: var(--f-display); font-size: 18.5px; line-height: 1.55; }
.mihrab__rule { height: 1px; background: var(--line-soft); }
.mihrab__tags { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.mihrab figcaption { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); text-align: end; }

.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 1px solid var(--ink); }
.way { padding: 28px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); border-bottom: 1px solid var(--line-soft); border-inline-start: 1px solid var(--line); }
.way:first-child { border-inline-start: 0; padding-inline-start: 0; }
.way:hover { color: var(--ink); }
.way:hover .way__t { color: var(--accent); }
.way__ar { font-size: 34px; line-height: 1.2; color: var(--accent); }
html[dir="ltr"] .way__ar { text-align: left; }
.way__t { font-family: var(--f-display); font-size: 24px; }
.way__d { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 520px) { .way { border-inline-start: 0; padding-inline: 0; } }

.sec { padding-top: 96px; }
.sec__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sec__h { margin: 8px 0 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
html[lang="ar"] .sec__h { font-family: var(--f-ar); line-height: 1.5; letter-spacing: 0; }
.sec__rule { flex: 1; min-width: 40px; height: 1px; background: var(--line); align-self: center; }
.strip { margin-top: 28px; display: flex; gap: 3px; height: 14px; }
.strip a { min-width: 3px; border-radius: 2px; background: var(--accent); }
.strip a:nth-child(even) { background: var(--accent-2); }
.strip a:hover { background: var(--gold); }
.strip__k { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chlist { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); column-gap: 48px; }
.chlist li { border-top: 1px solid var(--line-soft); }
.chrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 16px 0; color: var(--ink); }
.chrow:hover { color: var(--ink); }
.chrow:hover .chrow__t { color: var(--accent); }
.chrow__n { font-family: var(--f-display); font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.chrow__t { font-family: var(--f-display); font-size: 21px; line-height: 1.25; }
html[lang="ar"] .chrow__t { font-family: var(--f-ar); font-size: 23px; line-height: 1.6; }
.chrow__r { display: block; font-size: 12.5px; color: var(--ink-3); }
.chrow__ar { font-size: 24px; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 520px) { .chrow { grid-template-columns: 30px minmax(0, 1fr); } .chrow__ar { grid-column: 2; font-size: 20px; } }

.method { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; padding-top: 104px; }
.method__main { flex: 1.2 1 480px; min-width: 0; }
.method__p { margin: 18px 0 0; color: var(--ink-2); max-width: 560px; }
.srcrows { margin-top: 28px; border-top: 1px solid var(--ink); }
.srcrow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 20px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.srcrow__k { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-top: 4px; }
.srcrow__k.is-ref { color: var(--accent); } .srcrow__k.is-audit { color: var(--gold); }
.srcrow b { font-weight: 600; }
.srcrow small { display: block; font-size: 14px; color: var(--ink-2); }
@media (max-width: 520px) { .srcrow { grid-template-columns: 1fr; } }
.method__aside { flex: .8 1 340px; min-width: 0; padding-top: 72px; }
@media (max-width: 900px) { .method__aside { padding-top: 0; } }
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.card__n { display: flex; align-items: baseline; gap: 12px; }
.card__n b { font-family: var(--f-display); font-weight: 400; font-size: 28px; color: var(--accent); line-height: 1; }
.card__ar { margin: 0; font-size: 26px; line-height: 1.8; text-align: right; }
.card__tr { margin: 0; font-family: var(--f-display); font-size: 19px; line-height: 1.5; }
.card__note { margin: 0; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; color: var(--ink-2); }

.closing { margin-top: 112px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 48px 0; display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: center; }
.closing__ar { flex: 1 1 420px; margin: 0; font-size: clamp(32px, 4vw, 46px); line-height: 1.6; color: var(--accent); text-align: right; }
.closing__tr { flex: 1 1 380px; min-width: 0; }
.closing__tr .gar { margin: 0; font-size: 26px; line-height: 1.3; }
.closing__tr p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }


/* ---------- Reader ---------- */
.reader { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; padding-top: 32px; }
.toc { flex: 1 1 230px; max-width: 260px; font-size: 13.5px; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; scrollbar-width: thin; }
.toc__k { margin: 0 10px 10px; }
.toc ol { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--ink); }
.toc a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 4px; line-height: 1.35; color: var(--ink-2); }
.toc a:hover { background: var(--bg-2); color: var(--ink); }
.toc a.is-on { background: var(--accent-soft); color: var(--accent); font-weight: 500; box-shadow: inset 2px 0 0 var(--accent); }
html[dir="rtl"] .toc a.is-on { box-shadow: inset -2px 0 0 var(--accent); }
.toc a span:first-child { min-width: 1.6em; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.toc__note { margin: 18px 10px 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.toc summary { display: none; }
@media (max-width: 900px) {
  .reader { padding-top: 16px; }
  .toc { position: static; max-width: none; flex-basis: 100%; max-height: none; }
  .toc details { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
  .toc summary { display: block; padding: 12px 14px; cursor: pointer; font-weight: 500; }
  .toc ol { border-top: 1px solid var(--line); margin: 0 6px 8px; }
  .toc .toc__k, .toc .toc__note { display: none; }
}
.reader__main { flex: 999 1 560px; min-width: 0; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.tools .sp { flex: 1; }
.tools label { font-size: 13px; color: var(--ink-3); }
.chead { padding-bottom: 24px; border-bottom: 1px solid var(--ink); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.chead h1 { margin: 6px 0 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 4vw, 46px); line-height: 1.1; letter-spacing: -.01em; }
html[lang="ar"] .chead h1 { font-family: var(--f-ar); line-height: 1.4; letter-spacing: 0; }
.chead__ar { margin: 0; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.4; color: var(--accent); }

.cols, .pt { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px 32px; }
.cmp .cols, .cmp .pt { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); }
.cols { padding: 14px 0 0; }
.cols span:last-child { text-align: end; }
.pts { list-style: none; margin: 0; padding: 0; }
.pt { padding: 22px 0 26px; border-bottom: 1px solid var(--line-soft); }
.pt.is-target { background: linear-gradient(90deg, var(--accent-soft), transparent 75%); }
html[dir="rtl"] .pt.is-target { background: linear-gradient(270deg, var(--accent-soft), transparent 75%); }
.pt__sub { grid-column: 2 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; color: var(--gold); }
.pt__sub span:not([lang="ar"]) { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.pt__sub [lang="ar"] { font-size: 19px; }
.pt__n { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pt__num { font-family: var(--f-display); font-size: 24px; line-height: 1.3; color: var(--accent); font-variant-numeric: tabular-nums; }
.pt__copy { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-4); opacity: .7; }
.pt__copy:hover, .pt__copy:focus-visible { opacity: 1; background: var(--bg-2); color: var(--ink); }
.pt__copy svg { width: 15px; height: 15px; }
.col { min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.col--ar { align-items: stretch; }
@media (max-width: 760px) {
  .cmp .cols { display: none; }
  .pt, .cmp .pt { grid-template-columns: 40px minmax(0, 1fr); gap: 10px 14px; }
  .cmp .pt .col + .col { grid-column: 2; border-top: 1px dashed var(--line); padding-top: 12px; }
}

/* text blocks */
.tx { max-width: 760px; width: 100%; }
.tx p { margin: 0 0 .6em; }
.tx p:last-child { margin-bottom: 0; }
.tx--en, .tx--nl { font-family: var(--f-display); font-size: 19.5px; line-height: 1.6; }
.tx--ar { font-family: var(--f-ar); font-size: 25px; line-height: 2; text-align: start; }
@media (max-width: 600px) { .tx--en, .tx--nl { font-size: 18.5px; } .tx--ar { font-size: 23px; } }
.b-arabic { font-family: var(--f-ar); font-size: 23px; line-height: 2; }
.b-translit { font-style: italic; color: var(--ink-2); }
.b-quote { margin: 0 0 .6em; padding-inline-start: 14px; border-inline-start: 2px solid var(--line-2); color: var(--ink-2); }
.notes { display: grid; gap: 6px; width: 100%; }
.fn { font: 13.5px/1.55 var(--f-ui); color: var(--ink-2); display: flex; gap: 8px; }
.fn[lang="ar"] { font: 17px/1.8 var(--f-ar); }
.fn__k { flex: none; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ink-4); padding-top: 3px; font-family: var(--f-ui); }
.fn--translator .fn__k { color: var(--gold); }
mark { background: color-mix(in srgb, var(--gold) 26%, transparent); color: inherit; border-radius: 2px; }

.pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 40px; border-top: 1px solid var(--ink); padding-top: 16px; }
.pn a { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; color: var(--ink); min-height: 44px; }
.pn a:hover { color: var(--accent); }
.pn a.next { text-align: end; grid-column: 2; }
.pn small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pn b { font-family: var(--f-display); font-weight: 400; font-size: 21px; line-height: 1.3; }
html[lang="ar"] .pn b { font-family: var(--f-ar); }
.conclusion { padding: 36px 0 8px; }
.conclusion__ar { font-size: 25px; line-height: 2; }

/* ---------- Single point ---------- */
.point { max-width: 760px; padding-top: 24px; }
.point__back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); min-height: 44px; }
.point__back svg { width: 15px; height: 15px; }
.point__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.point__head h1 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 54px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.point__sub { margin: 16px 0 0; color: var(--gold); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.point__ar { margin-top: 24px; }
.point__ar .tx--ar { font-size: 34px; line-height: 1.9; text-align: right; }
@media (max-width: 600px) { .point__ar .tx--ar { font-size: 30px; } }
.point__lbl { margin: 4px 0 0; text-align: right; }
.point__rule { height: 1px; background: var(--line-soft); margin: 20px 0; }
.point__tr .tx--en, .point__tr .tx--nl { font-size: 22px; line-height: 1.5; }
.point__tr .prov { margin-top: 14px; }
.provbox { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 18px; }
.provbox dl { margin: 12px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; font-size: 13.5px; }
.provbox dt { color: var(--ink-3); }
.provbox dd { margin: 0; }
.provbox .ok { color: var(--accent); font-weight: 500; }
.provbox .pending { color: var(--gold); font-weight: 600; }
.copybtn { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500; }
.copybtn svg { width: 15px; height: 15px; }
.point .pn { margin-top: 32px; padding-top: 12px; }
.point .pn b { font-size: 17px; }

/* ---------- Search, sources ---------- */
.page { padding-top: 40px; }
.page h1 { margin: 6px 0 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 4vw, 46px); line-height: 1.1; }
html[lang="ar"] .page h1 { font-family: var(--f-ar); line-height: 1.4; }
.search { position: relative; max-width: 640px; margin-top: 24px; }
.search svg { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search input { width: 100%; height: 52px; padding-inline: 46px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 16px; }
.search input:focus { outline: none; border-color: var(--accent); }
.results { list-style: none; padding: 0; margin: 22px 0 0; border-top: 1px solid var(--ink); }
.results li a { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.results .n { font-family: var(--f-display); font-size: 20px; color: var(--accent); }
.results .s { font-size: 12px; color: var(--ink-3); }
.results .x { font-family: var(--f-display); font-size: 17px; }
.results .x[lang="ar"] { font-family: var(--f-ar); font-size: 20px; line-height: 1.8; }
.doc { max-width: 820px; }
.doc h2 { font-family: var(--f-display); font-weight: 400; font-size: 28px; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .srcrows { margin-top: 16px; }
table.map { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0; border-top: 1px solid var(--ink); }
table.map th, table.map td { text-align: start; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-soft); }
table.map th { font-weight: 600; color: var(--ink-3); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13.5px; z-index: 2000; box-shadow: var(--shadow); }
@media print { .topbar, .toc, .tools, .pn, .pt__copy, .copybtn { display: none !important; } .reader { display: block; } }

/* ==========================================================================
   Bayt al-Maʾāthir shell: family strip, top bar, language switch, mobile section pills, footer.
   This block closes the stylesheet of every site in the family (baytalmaathir.com, Mutūn, Aʿlām,
   Masār al-Anbiyāʾ, Ṣifat al-Ṣalāh) and is identical in each; only the --sh-* mapping differs.
   Change it in all five together.
   ========================================================================== */
:root {
  --sh-bg: var(--bg); --sh-bg-2: var(--bg-2); --sh-ink: var(--ink); --sh-ink-2: var(--ink-2); --sh-ink-3: var(--ink-3);
  --sh-line: var(--line); --sh-line-2: var(--line-2); --sh-accent: var(--accent); --sh-serif: var(--f-display);
  --sh-strip: #1B1814; --sh-strip-ink: #CFC6B4; --sh-strip-hi: #FBF8F1;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sh-strip: #0B0A08; --sh-strip-ink: #B5AC9A; --sh-strip-hi: #EDE6D7; } }
:root[data-theme="dark"] { --sh-strip: #0B0A08; --sh-strip-ink: #B5AC9A; --sh-strip-hi: #EDE6D7; }

/* family strip */
.fam { background: var(--sh-strip); color: var(--sh-strip-ink); font: 400 12.5px/1.4 var(--f-ui); }
.fam .wrap { display: flex; align-items: center; gap: 22px; min-height: 34px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.fam .wrap::-webkit-scrollbar { display: none; }
.fam a, .fam span { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; flex: none; }
.fam a:hover, .fam .here { color: var(--sh-strip-hi); }
.fam i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.fam .lbl { margin-inline-end: auto; opacity: .7; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
html[lang="ar"] .fam .lbl { letter-spacing: 0; text-transform: none; font-size: 12.5px; }

/* top bar: brand · links · [search] · EN NL ع · theme */
.topbar { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--sh-bg) 90%, transparent); backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--sh-line); }
.topbar .topbar__inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .brand { display: flex; align-items: baseline; gap: 12px; color: var(--sh-ink); text-decoration: none; flex: none; }
.topbar .brand:hover { color: var(--sh-ink); }
.topbar .brand__mark { font-family: var(--f-ar); font-size: 28px; font-weight: 400; line-height: 1; color: var(--sh-accent); }
.topbar .brand__name { font-family: var(--sh-serif); font-size: 20px; letter-spacing: -.01em; color: var(--sh-ink); }
.topbar .topnav { display: flex; align-items: center; gap: 2px; min-width: 0; margin: 0; }
.topbar .topnav > a { color: var(--sh-ink-2); font: 500 14px/1.2 var(--f-ui); padding: 10px 11px; border-radius: 0; background: none; white-space: nowrap; text-decoration: none; }
.topbar .topnav > a:hover { color: var(--sh-ink); background: none; }
.topbar .topnav > a.is-active { color: var(--sh-ink); background: none; box-shadow: inset 0 -2px 0 var(--sh-accent); }
.topbar .icon-btn { width: 40px; height: 40px; border: 0; border-radius: 999px; background: none; display: inline-grid; place-items: center; color: var(--sh-ink-2); flex: none; cursor: pointer; }
.topbar .icon-btn:hover { background: var(--sh-bg-2); color: var(--sh-ink); }
.topbar .icon-btn svg { width: 19px; height: 19px; }
.topbar .langsw { display: inline-flex; gap: 2px; padding: 3px; margin: 0; margin-inline: 6px 2px; border: 1px solid var(--sh-line-2); border-radius: 999px; background: none; overflow: visible; flex: none; }
.topbar .langsw button { height: 30px; min-width: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: none; box-shadow: none; cursor: pointer; font: 600 12.5px/1 var(--f-ui); color: var(--sh-ink-2); }
.topbar .langsw button:hover { color: var(--sh-ink); }
.topbar .langsw button.is-on { background: var(--sh-ink); color: var(--sh-bg); }
.topbar .langsw button[lang="ar"] { font-family: var(--f-ar); font-size: 16px; font-weight: 400; }
html[lang="ar"] .topbar .brand__name { display: none; }

/* section pills under the top bar on small screens */
.mnav { display: none; }
@media (max-width: 760px) {
  .topbar .topnav > a { display: none; }
  .mnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav a { flex: none; font: 500 13.5px/1.2 var(--f-ui); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--sh-line); color: var(--sh-ink-2); text-decoration: none; white-space: nowrap; }
  .mnav a.is-active { background: var(--sh-ink); border-color: var(--sh-ink); color: var(--sh-bg); }
  .fam .lbl { display: none; }
  .fam .wrap { gap: 18px; }
}
@media (max-width: 600px) {
  .topbar .topbar__inner { height: 58px; }
  .topbar .brand__name { display: none; }
  .topbar .topbar__inner { gap: 8px; }
  .topbar .brand__mark { font-size: 24px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .topbar .langsw { margin-inline: 2px 0; }
  .topbar .langsw button { height: 28px; min-width: 26px; padding: 0 6px; }
}

/* footer: the house on the left, the site's own columns after it */
.sitefoot { margin-top: 96px; background: var(--sh-bg-2); border-top: 1px solid var(--sh-line); color: var(--sh-ink-2); font: 400 14px/1.6 var(--f-ui); }
.sitefoot .sitefoot__in { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 32px 48px; }
.sitefoot__col { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sitefoot__col:first-child { flex: 1.4 1 300px; }
.sitefoot p { margin: 0; }
.sitefoot .sitefoot__brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; color: var(--sh-ink); text-decoration: none; }
.sitefoot__brand [lang="ar"] { font-family: var(--f-ar); font-size: 24px; line-height: 1.3; }
.sitefoot__brand [lang="en"] { font-family: var(--sh-serif); font-size: 19px; }
.sitefoot__h { font: 600 11.5px/1.4 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--sh-ink-3); }
html[lang="ar"] .sitefoot__h { letter-spacing: 0; text-transform: none; font-size: 13.5px; }
.sitefoot a:not(.sitefoot__brand) { color: var(--sh-ink); text-decoration: underline; text-decoration-color: var(--sh-line-2); text-underline-offset: 4px; }
.sitefoot a:not(.sitefoot__brand):hover { color: var(--sh-ink); text-decoration-color: var(--sh-ink-3); }
.sitefoot__site { display: inline-flex; align-items: center; gap: 8px; }
.sitefoot__site i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
@media print { .fam, .mnav, .sitefoot { display: none !important; } }
