/* BaAlawi Fiqh independent knowledge library.
 * Scoped to .ba-fiqh; no BaAlawi Core, People, Junior or theme overrides.
 * Inspired by BaAlawi's deep-teal, manuscript-ivory and antique-gold identity.
 */
.ba-fiqh {
  --bf-teal:#073f47;
  --bf-teal-dark:#062f39;
  --bf-teal-mid:#12616a;
  --bf-gold:#c79b52;
  --bf-gold-light:#efd7a3;
  --bf-ink:#263543;
  --bf-muted:#64747b;
  --bf-paper:#faf6ee;
  --bf-border:#e8ddc9;
  --bf-display:Georgia,"Times New Roman",serif;
  box-sizing:border-box;
  color:var(--bf-ink);
  background:#faf7f0;
  border:1px solid #e4d9c9;
  border-radius:20px;
  margin:2rem auto;
  width:100%;
  max-width:1180px;
  overflow:hidden;
  box-shadow:0 18px 60px rgba(19,45,51,.09);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.6;
  font-size:16px
}
.ba-fiqh *, .ba-fiqh *::before, .ba-fiqh *::after {box-sizing:border-box}
.ba-fiqh button, .ba-fiqh input, .ba-fiqh select {font:inherit}
.ba-fiqh button {cursor:pointer}
.ba-fiqh button:disabled {cursor:not-allowed}
.ba-fiqh [hidden] {display:none!important}
.ba-fiqh :is(button,input,select,a):focus-visible {
  outline:3px solid #e5b46e;outline-offset:3px
}
.ba-fiqh .ba-fiqh__sr-only {
  position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap
}
.ba-fiqh h2,.ba-fiqh h3,.ba-fiqh h4,.ba-fiqh p {margin-top:0}
.ba-fiqh__hero {
  position:relative;
  display:grid;grid-template-columns:minmax(0,1.5fr) minmax(225px,.75fr);
  min-height:360px;isolation:isolate;overflow:hidden;
  padding:clamp(2rem,5vw,3.9rem) clamp(1.5rem,5vw,4rem);
  color:#fff9ec;
  background:
    radial-gradient(ellipse 55% 95% at 99% 100%,rgba(54,155,147,.27),transparent 80%),
    radial-gradient(ellipse 55% 50% at 25% 15%,rgba(8,105,108,.75),transparent 75%),
    linear-gradient(117deg,#04353d 0%,#07545b 60%,#074951 100%);
}
.ba-fiqh__hero::before {
  content:"";position:absolute;inset:0;z-index:-1;opacity:.11;
  background-image:repeating-linear-gradient(45deg,transparent 0 30px,#d9b272 31px,#d9b272 32px,transparent 33px 63px),
   repeating-linear-gradient(-45deg,transparent 0 30px,#d9b272 31px,#d9b272 32px,transparent 33px 63px);
  -webkit-mask-image:linear-gradient(to right,transparent 5%,#000 100%);
  mask-image:linear-gradient(to right,transparent 5%,#000 100%);
}
.ba-fiqh__hero::after {
  content:"";position:absolute;left:0;bottom:0;right:0;height:4px;
  background:linear-gradient(90deg,transparent,var(--bf-gold),var(--bf-gold-light),transparent)
}
.ba-fiqh__hero-copy {position:relative;z-index:2;align-self:center;max-width:680px}
.ba-fiqh__eyebrow {
  display:flex;align-items:center;gap:13px;white-space:nowrap;
  letter-spacing:.28em;font-size:11px;font-weight:750;color:#f1d49c;margin:0 0 1.45rem
}
.ba-fiqh__eyebrow-line {width:32px;height:1px;background:#c99d59;opacity:.9}
.ba-fiqh__hero-kicker {
  font-size:11px;letter-spacing:.22em;font-weight:700;color:#e6c17e;margin:0 0 .55rem
}
.ba-fiqh .ba-fiqh__hero h2 {
  color:#fff6e8;font-family:var(--bf-display);
  font-size:clamp(2.45rem,5vw,4.2rem);
  line-height:1.04;letter-spacing:-.028em;font-weight:500;margin:0 0 1.25rem;
}
.ba-fiqh__arabic {
  display:inline-block;font-size:.66em;font-weight:400;
  color:#f2cc86;line-height:1.25;margin-left:.35em;letter-spacing:0
}
.ba-fiqh__hero-description {
  color:#d8e6e5;line-height:1.72;
  font-size:clamp(.98rem,1.55vw,1.16rem);
  max-width:555px;margin:0 0 1.45rem
}
.ba-fiqh__hero-tags {display:flex;gap:.65rem 1rem;flex-wrap:wrap}
.ba-fiqh__hero-tags span {font-size:12px;color:#e6e4d8}
.ba-fiqh__hero-tags span span {font-size:16px;color:var(--bf-gold-light);margin-right:3px}
.ba-fiqh__hero-visual {
  display:flex;align-items:center;justify-content:center;
  min-width:0;position:relative;isolation:isolate
}
.ba-fiqh__hero-visual::before {
  content:"";position:absolute;width:min(110%,310px);aspect-ratio:1;
  border-radius:50%;border:1px solid rgba(245,208,150,.19);
  box-shadow:0 0 0 23px rgba(245,208,150,.045),0 0 0 57px rgba(245,208,150,.026)
}
.ba-fiqh__visual-arch {
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
  width:min(100%,240px);min-height:265px;
  text-align:center;padding:3rem .8rem 2rem;
  border:2px solid rgba(245,209,156,.77);
  border-radius:49% 49% 14px 14px / 41% 41% 14px 14px;
  color:#f9e1b7;
  background:linear-gradient(180deg,rgba(242,214,171,.10),rgba(241,212,160,.025));
  box-shadow:inset 0 0 0 7px rgba(10,79,80,.45),0 12px 32px rgba(0,35,40,.22)
}
.ba-fiqh__visual-arch::before {
  content:"";position:absolute;inset:12px;border:1px solid rgba(248,227,187,.45);
  border-radius:49% 49% 9px 9px / 39% 39% 9px 9px;
  pointer-events:none
}
.ba-fiqh__visual-star {color:#f6d59b;font-size:33px;margin-bottom:.45rem}
.ba-fiqh__visual-arabic {font:400 2.05rem/1.7 var(--bf-display);letter-spacing:0}
.ba-fiqh__visual-divider {display:block;width:72px;height:1px;background:#d5ad6e;margin:.95rem auto}
.ba-fiqh__visual-en {font-size:9px;letter-spacing:.18em;color:#e3d7bb;font-weight:700}
.ba-fiqh__school-panel {
  padding:clamp(1.5rem,3.7vw,3rem) clamp(1.4rem,4.8vw,4rem) 1.8rem;
  background:radial-gradient(ellipse 40% 100% at 100% 0,rgba(229,195,133,.12),transparent),#fffaf2
}
.ba-fiqh__section-index {display:block;color:#ae7e3a;font-weight:800;font-size:10px;letter-spacing:.17em;margin-bottom:.65rem}
.ba-fiqh__section-heading h3,.ba-fiqh__list-heading h3 {
  font:500 clamp(1.5rem,3vw,2.3rem)/1.22 var(--bf-display);
  letter-spacing:-.015em;color:#273843;margin:0 0 .55rem
}
.ba-fiqh__section-heading p {color:#69757a;font-size:14px;line-height:1.7;margin:0;max-width:720px}
.ba-fiqh__school-buttons {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-top:1.7rem}
.ba-fiqh__school-card {
  position:relative;display:flex;flex-direction:column;align-items:flex-start;
  min-width:0;min-height:150px;overflow:hidden;
  background:#fff;border:1px solid #eadcc8;border-radius:14px;
  text-align:left;padding:1.05rem 1.1rem;color:#2c474f;
  box-shadow:0 4px 16px rgba(50,54,46,.055);
  transition:transform .18s,box-shadow .18s,border-color .18s
}
.ba-fiqh__school-card::before {
  content:"";position:absolute;right:-20px;top:-27px;border:1px solid #e5cfa4;
  border-radius:50%;height:91px;width:91px;opacity:.38
}
.ba-fiqh__school-card:hover {transform:translateY(-3px);border-color:#c89b5a;box-shadow:0 11px 27px rgba(42,70,66,.11)}
.ba-fiqh__school-card[aria-pressed="true"] {
  background:linear-gradient(145deg,#0e5960,#06414a);
  border-color:#c7a066;color:#fff7e7;box-shadow:0 8px 28px rgba(8,77,80,.22)
}
.ba-fiqh__school-ornament {font-size:25px;color:#c39a56;margin-bottom:.2rem}
.ba-fiqh__school-label {font:500 1.34rem/1.2 var(--bf-display);display:block}
.ba-fiqh__school-note {font-size:11px;color:#7b7c71;margin-top:auto;padding-top:.85rem}
.ba-fiqh__school-card[aria-pressed="true"] .ba-fiqh__school-note {color:#d9e9e4}
.ba-fiqh__selection-note {font-size:12px;color:#899086;margin:.95rem 0 0}
.ba-fiqh__school-select-wrap {display:none}
.ba-fiqh__explore {
  padding:2.5rem clamp(1.4rem,4.8vw,4rem) 3rem;
  background:#faf7f1;border-top:1px solid #ecdfcc
}
.ba-fiqh__explore-heading {display:flex;align-items:end;justify-content:space-between;gap:1.7rem;margin-bottom:1.65rem}
.ba-fiqh__search-label {
  flex:0 0 240px;min-height:47px;
  background:#fff;border:1px solid #e7ddce;border-radius:11px;
  display:flex;align-items:center;gap:.4rem;padding:0 .8rem;
  box-shadow:0 2px 8px rgba(10,39,48,.025)
}
.ba-fiqh__search-icon {font-size:27px;color:#83918e;line-height:1}
.ba-fiqh__search-label input[type="search"] {
  background:transparent;border:0;box-shadow:none;color:#2b3b43;
  padding:.65rem .35rem;width:100%;min-width:0;min-height:44px;font-size:14px;
  outline:0;margin:0
}
.ba-fiqh__search-label:focus-within {border-color:#b88b48;box-shadow:0 0 0 2px rgba(199,155,82,.16)}
.ba-fiqh__topic-gallery {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:0 0 2.8rem}
.ba-fiqh__topic-card {
  position:relative;display:flex;flex-direction:column;align-items:flex-start;
  text-align:left;min-height:238px;padding:1.1rem 1.25rem 1.15rem;
  background:linear-gradient(160deg,#fffdf9,#f6eee0);color:#263b44;
  border:1px solid #e4d5bd;border-radius:16px;
  box-shadow:0 7px 22px rgba(44,57,54,.06);
  transition:transform .18s,box-shadow .18s,border-color .18s
}
.ba-fiqh__topic-card::before {
  content:"";position:absolute;right:16px;top:12px;
  width:83px;height:96px;border:1px solid #e4cba0;
  border-radius:49% 49% 7px 7px / 40% 40% 7px 7px;opacity:.55
}
.ba-fiqh__topic-card:not(:disabled):hover {transform:translateY(-3px);border-color:#b98e54;box-shadow:0 14px 28px rgba(44,57,54,.10)}
.ba-fiqh__topic-card[aria-pressed="true"] {border-color:#0e6471;box-shadow:inset 0 0 0 2px #0e6471,0 9px 24px rgba(25,66,66,.10)}
.ba-fiqh__topic-card:disabled {opacity:.6;box-shadow:none}
.ba-fiqh__topic-number {font:700 10px/1 sans-serif;letter-spacing:.16em;color:#aa8246}
.ba-fiqh__topic-emblem {font-size:33px;line-height:1.2;color:#bb8745;margin:.5rem 0 -.05rem}
.ba-fiqh__topic-arabic {position:absolute;right:20px;top:30px;font-size:17px;color:#aa865a}
.ba-fiqh__topic-name {font:500 1.45rem/1.22 var(--bf-display);margin:.45rem 0 .32rem}
.ba-fiqh__topic-description {font-size:13px;line-height:1.5;color:#77817d;max-width:245px}
.ba-fiqh__topic-availability {margin-top:auto;padding-top:1rem;color:#94692e;font-size:12px;font-weight:700}
.ba-fiqh__list-heading {
  display:flex;gap:1rem;align-items:end;justify-content:space-between;
  border-top:1px solid #e4d8c8;padding-top:2rem;margin-bottom:1.15rem;
  scroll-margin-top:25px
}
.ba-fiqh__list-heading h3 {margin:0}
.ba-fiqh__lesson-count {
  font-size:12px;color:#6d7b7b;background:#f0e9df;
  border-radius:24px;padding:6px 12px;white-space:nowrap
}
.ba-fiqh__filters {display:flex;flex-wrap:wrap;gap:8px;margin:0 0 1.35rem}
.ba-fiqh__filter {
  font-size:12px;font-weight:650;padding:.55rem .85rem;border-radius:999px;
  background:transparent;border:1px solid #e1d5c5;color:#566a6c
}
.ba-fiqh__filter:hover {border-color:#bd9b6c}
.ba-fiqh__filter[aria-pressed="true"] {color:#fffaf2;background:#0d5860;border-color:#0d5860}
.ba-fiqh__status {color:#657377;font-size:13px;margin-bottom:.65rem;min-height:1em}
.ba-fiqh__status:empty {display:none}
.ba-fiqh__lessons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ba-fiqh__lesson-card {
  display:flex;flex-direction:column;min-height:205px;
  border-radius:13px;background:#fff;border:1px solid #eae0d4;
  padding:1.3rem 1.35rem;box-shadow:0 3px 12px rgba(29,49,51,.035);
  transition:border-color .2s,transform .2s
}
.ba-fiqh__lesson-card:hover {border-color:#c19d66;transform:translateY(-2px)}
.ba-fiqh__lesson-top {display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.7rem}
.ba-fiqh__lesson-topic {color:#9a723c;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.ba-fiqh__lesson-number {font-size:10px;color:#b5b1a9}
.ba-fiqh .ba-fiqh__lesson-title {font:500 1.32rem/1.3 var(--bf-display);margin:0 0 .65rem}
.ba-fiqh__lesson-link {color:#263b43;background:transparent;border:0;padding:0;text-align:left;line-height:inherit;font:inherit}
.ba-fiqh__lesson-link:hover {color:#0d6870;text-decoration:underline;text-underline-offset:3px}
.ba-fiqh__lesson-summary {font-size:15px;line-height:1.6;color:#708083;margin-bottom:1rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ba-fiqh__lesson-foot {margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:1rem;font-size:11px;color:#929c96;border-top:1px solid #f1ece5;padding-top:.7rem}
.ba-fiqh__lesson-arrow {color:#9f7440;font-weight:750}
.ba-fiqh__empty {grid-column:1/-1;padding:2.5rem 1rem;text-align:center;border:1px dashed #d9c7ad;border-radius:12px;color:#697975}
.ba-fiqh__empty-symbol {display:block;font-size:28px;color:#c19862}
.ba-fiqh__reset {background:#0c5962;color:#fff;border:0;border-radius:8px;padding:.65rem 1.1rem}
.ba-fiqh__welcome {
  display:flex;align-items:center;justify-content:center;text-align:center;gap:1rem;
  padding:2.1rem 1.5rem 2.5rem;background:#faf7f1;color:#6c7a77
}
.ba-fiqh__welcome-icon {font-size:28px;color:#c19555}
.ba-fiqh__welcome p {margin:0;font-size:14px}
.ba-fiqh__detail {
  background:#fffdf8;border:1px solid #e8dac5;border-radius:16px;
  box-shadow:0 14px 28px rgba(36,56,52,.06);outline:0;scroll-margin-top:24px;
  overflow:hidden
}
.ba-fiqh__explore--reading .ba-fiqh__explore-heading,
.ba-fiqh__explore--reading .ba-fiqh__topic-gallery,
.ba-fiqh__explore--reading .ba-fiqh__list-heading,
.ba-fiqh__explore--reading .ba-fiqh__filters,
.ba-fiqh__explore--reading .ba-fiqh__status,
.ba-fiqh__explore--reading .ba-fiqh__lessons {display:none}
.ba-fiqh__reader-nav {
  display:flex;align-items:center;justify-content:space-between;gap:.7rem;
  padding:1rem clamp(1.2rem,4vw,2.6rem);background:#f5efe5;border-bottom:1px solid #e3d4bf
}
.ba-fiqh__reader-return {background:transparent;border:0;color:#145d66;font-size:13px;font-weight:800;text-align:left;padding:.45rem 0}
.ba-fiqh__reader-school {color:#866a43;font-weight:700;font-size:11px;text-transform:uppercase;letter-spacing:.08em}
.ba-fiqh__reader-hero {
  padding:2.25rem clamp(1.25rem,5vw,3.5rem) 1.65rem;
  background:linear-gradient(155deg,#fffcf6,#f9f0e1)
}
.ba-fiqh__reader-title {
  font:500 clamp(2rem,4vw,3rem)/1.15 var(--bf-display);letter-spacing:-.025em;
  color:#193e47;margin:.2rem 0 .8rem
}
.ba-fiqh__reader-summary {font-size:calc(var(--bf-reader-font-size,20px) * .95);line-height:1.75;color:#677678;max-width:760px;margin:0}
.ba-fiqh__reader-body {padding:clamp(1.3rem,4vw,2.75rem) clamp(1.25rem,5vw,3.5rem);max-width:930px;color:#33454c}
.ba-fiqh__reader-paragraph {font-size:var(--bf-reader-font-size,20px);line-height:1.82;margin:0 0 1.5rem}
.ba-fiqh__reader-list {margin:0 0 1.6rem;padding-left:1.5rem}
.ba-fiqh__reader-list li {padding-left:.45rem;font-size:var(--bf-reader-font-size,20px);line-height:1.78;margin-bottom:.8rem}
.ba-fiqh__reader-list li::marker {color:#a37b40;font-weight:700}
.ba-fiqh__guided {
  border:1px solid #dcc9a9;border-radius:16px;padding:1.4rem;
  background:#faf3e7;margin:1rem 0 1.5rem
}
.ba-fiqh__guided-progress {font-size:11px;font-weight:800;letter-spacing:.16em;color:#9c733d}
.ba-fiqh__guided-line {display:flex;gap:5px;margin:1rem 0;max-width:420px}
.ba-fiqh__guided-pip {height:5px;flex:1;background:#e2d6c4;border-radius:8px}
.ba-fiqh__guided-pip.is-current {background:#0a6067}
.ba-fiqh__guided-text {font:500 clamp(20px,calc(var(--bf-reader-font-size,20px) * 1.25),36px)/1.55 var(--bf-display);color:#234850;min-height:4rem;margin:1rem 0}
.ba-fiqh__guided-controls {display:flex;flex-wrap:wrap;gap:.7rem}
.ba-fiqh__guided-button {border:1px solid #0e6068;color:white;background:#0e6068;border-radius:9px;padding:.65rem 1rem;min-height:44px;font-size:13px;font-weight:750}
.ba-fiqh__guided-back {background:#fffdf8;color:#0c555c}
.ba-fiqh__guided-button:disabled {opacity:.43}
.ba-fiqh__sources {background:#f4ede1;border-top:1px solid #e6d6c1}
.ba-fiqh__sources-toggle {display:flex;align-items:center;flex-wrap:wrap;gap:.55rem 1.1rem;min-height:66px;padding:1.15rem clamp(1.25rem,5vw,3.5rem);cursor:pointer;list-style:none;color:#29414c}
.ba-fiqh__sources-toggle::-webkit-details-marker {display:none}
.ba-fiqh__sources-label {font:500 clamp(1.35rem,2vw,1.6rem)/1.25 var(--bf-display)}
.ba-fiqh__sources-count {font:700 12px/1.5 sans-serif;color:#647779;letter-spacing:.025em}
.ba-fiqh__sources-toggle::after {content:"";display:block;width:9px;height:9px;flex:0 0 9px;margin-left:auto;border-right:2px solid #17636a;border-bottom:2px solid #17636a;transform:rotate(45deg) translateY(-2px);transition:transform .2s ease}
.ba-fiqh__sources[open] .ba-fiqh__sources-toggle::after {transform:rotate(225deg) translate(-2px,-2px)}
.ba-fiqh__sources-toggle:hover {background:#ece3d4}
.ba-fiqh__sources-toggle:focus-visible {outline:3px solid #aa742b;outline-offset:-4px}
.ba-fiqh__sources-panel {padding:.15rem clamp(1.25rem,5vw,3.5rem) 1.75rem;border-top:1px solid #e3d4bf}
.ba-fiqh__source-intro {font-size:clamp(14px,calc(var(--bf-reader-font-size,20px) * .85),21px);color:#657475;line-height:1.65;margin:0 0 1rem}
.ba-fiqh__source-list {padding-left:1.5rem;margin:0}
.ba-fiqh__source {padding:.6rem 0 .8rem .25rem;font-size:clamp(14px,calc(var(--bf-reader-font-size,20px) * .85),21px);color:#496068}
.ba-fiqh__source::marker {color:#c08c4a}
.ba-fiqh__source strong {display:block;color:#293e46}
.ba-fiqh__source span {display:block;color:#6b7a7c}
.ba-fiqh__source a {color:#11656c;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.ba-fiqh__reader-footer {display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.15rem clamp(1.25rem,5vw,3.5rem);color:#7e8c8b;font-size:12px}
.ba-fiqh__footer {
  display:flex;align-items:center;gap:1rem;flex-wrap:wrap;
  background:#f2e9db;border-top:1px solid #e5d7c3;
  padding:1.1rem clamp(1.4rem,4.8vw,4rem);color:#5f6b66;font-size:12px
}
.ba-fiqh__footer-symbol {color:#b28748;font-size:22px}
.ba-fiqh__footer a {margin-left:auto;font-weight:800;color:#0c565c;text-decoration:none}
.ba-fiqh__footer a:hover {text-decoration:underline}
.ba-fiqh--junior .ba-fiqh__hero {background:radial-gradient(ellipse 70% 110% at 90% 110%,#277a7a70,transparent 80%),linear-gradient(117deg,#0a4853,#115d65 70%,#10555d)}
.ba-fiqh--junior .ba-fiqh__topic-card {background:linear-gradient(165deg,#fffdf6,#f8efe1)}
@media (max-width:900px) {
 .ba-fiqh__hero {grid-template-columns:minmax(0,1.4fr) minmax(170px,.6fr);min-height:315px}
 .ba-fiqh__hero-visual::before {width:200px}
 .ba-fiqh__visual-arch {min-height:220px;width:185px}
 .ba-fiqh__visual-arabic {font-size:1.55rem}
 .ba-fiqh__school-buttons {grid-template-columns:repeat(2,minmax(0,1fr))}
 .ba-fiqh__topic-gallery {grid-template-columns:repeat(2,minmax(0,1fr))}
 .ba-fiqh__explore-heading {align-items:flex-start;flex-direction:column}
 .ba-fiqh__search-label {flex:auto;width:100%;max-width:450px}
}
@media (max-width:620px) {
 .ba-fiqh {margin:1rem auto;border-radius:14px}
 .ba-fiqh__hero {display:block;padding:2.3rem 1.3rem 2.5rem;min-height:0}
 .ba-fiqh .ba-fiqh__hero h2 {font-size:clamp(2.25rem,9.4vw,3.2rem);max-width:510px}
 .ba-fiqh__arabic {display:block;margin:.7rem 0 0;font-size:.73em}
 .ba-fiqh__hero-visual {display:none}
 .ba-fiqh__eyebrow {font-size:9px;letter-spacing:.13em}
 .ba-fiqh__eyebrow-line {width:18px}
 .ba-fiqh__hero-tags {gap:.5rem .7rem}
 .ba-fiqh__school-panel {padding:1.55rem 1.2rem 1.5rem}
 .ba-fiqh__school-buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}
 .ba-fiqh__school-card {min-height:105px;padding:.75rem}
 .ba-fiqh__school-ornament {font-size:18px;margin:0}
 .ba-fiqh__school-label {font-size:1.05rem}
 .ba-fiqh__school-note {font-size:10px;padding-top:.3rem}
 .ba-fiqh__explore {padding:1.6rem 1.15rem 2rem}
 .ba-fiqh__topic-gallery {grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin-bottom:1.8rem}
 .ba-fiqh__topic-card {min-height:205px;padding:.9rem}
 .ba-fiqh__topic-arabic {font-size:14px;right:10px}
 .ba-fiqh__topic-emblem {font-size:26px}
 .ba-fiqh__topic-name {font-size:1.24rem}
 .ba-fiqh__topic-description {font-size:12px}
 .ba-fiqh__lessons {grid-template-columns:minmax(0,1fr)}
 .ba-fiqh__lesson-card {min-height:185px}
 .ba-fiqh__reader-nav,.ba-fiqh__reader-footer {align-items:flex-start;flex-wrap:wrap}
 .ba-fiqh__footer a {margin-left:0;width:100%}
}
@media (max-width:360px) {
 .ba-fiqh__topic-gallery {grid-template-columns:minmax(0,1fr)}
 .ba-fiqh__school-buttons {grid-template-columns:minmax(0,1fr)}
 .ba-fiqh__school-card {min-height:86px}
}
@media (prefers-reduced-motion:reduce) {
 .ba-fiqh * {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}


/* Full-width Fiqh page layout. Applied only when a Fiqh shortcode is present.
 * The block theme's generic post-title/intro section adds ~350px of blank space
 * and constrains the reading column to 760px. Suppress it for Fiqh pages only.
 * Do not alter BaAlawi Core, sitewide page templates, or any other plugin.
 */
body.ba-fiqh-page #main-content > .ba-page-intro {
  display: none !important;
}
body.ba-fiqh-page #main-content {
  padding-top: clamp(20px, 2.8vw, 36px) !important;
}
body.ba-fiqh-page #main-content > .entry-content {
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
}
body.ba-fiqh-page #main-content > .entry-content > .ba-fiqh {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto clamp(28px, 4vw, 56px);
}
body.ba-fiqh-page .ba-fiqh__hero {
  min-height: 320px;
  padding: clamp(28px, 3.4vw, 44px) clamp(24px, 4vw, 52px);
}
@media (max-width: 900px) {
  body.ba-fiqh-page #main-content {
    padding-inline: clamp(16px, 3vw, 36px) !important;
  }
}
@media (max-width: 620px) {
  body.ba-fiqh-page #main-content {
    padding: 14px 14px 40px !important;
  }
  body.ba-fiqh-page #main-content > .entry-content > .ba-fiqh {
    margin-bottom: 24px;
  }
  body.ba-fiqh-page .ba-fiqh__hero {
    min-height: 0;
    padding: 2.1rem 1.25rem 2rem;
  }
}

/* Standalone Fiqh reading controls. Local-only font preference, Adult and Junior. */
.ba-fiqh__reader-nav {flex-wrap:wrap;gap:.75rem 1.5rem}
.ba-fiqh__reader-nav-right {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.6rem 1rem;min-width:0}
.ba-fiqh__font-controls {display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.ba-fiqh__font-label {font-size:13px;font-weight:700;color:#496068;margin-right:.3rem}
.ba-fiqh__font-button,.ba-fiqh__font-reset {
  min-height:44px;border:1px solid #bca178;border-radius:9px;background:#fffdf8;
  color:#174d56;font-weight:750;line-height:1;box-shadow:none
}
.ba-fiqh__font-button {min-width:45px;padding:.55rem .7rem;font-size:19px}
.ba-fiqh__font-reset {padding:.6rem .85rem;font-size:13px}
.ba-fiqh__font-button:hover:not(:disabled),.ba-fiqh__font-reset:hover:not(:disabled) {border-color:#0f656c;background:#e7f0eb}
.ba-fiqh__font-button:disabled,.ba-fiqh__font-reset:disabled {opacity:.45;cursor:default}
.ba-fiqh__font-value {min-width:43px;text-align:center;font-size:13px;font-weight:800;color:#244d56;font-variant-numeric:tabular-nums}
@media(max-width:620px) {
 .ba-fiqh__reader-nav-right {width:100%;justify-content:space-between}
 .ba-fiqh__font-controls {width:100%;justify-content:space-between;gap:.2rem}
 .ba-fiqh__font-label {margin-right:.1rem}
 .ba-fiqh__font-button {min-width:44px}
}


/* Paginated browsing — no hidden content after the REST 20-item page limit. */
.ba-fiqh__more {display:flex;align-items:center;justify-content:center;gap:1rem;padding:1.6rem 1rem 0;flex-wrap:wrap}
.ba-fiqh__more-button {min-height:46px;border:1px solid #c9a96e;background:#0a5961;color:#fff;border-radius:999px;padding:.7rem 1.65rem;font-weight:750}
.ba-fiqh__more-button:hover {background:#07464e}
.ba-fiqh__more-count {font-size:13px;color:#728085}
.ba-fiqh__explore--reading .ba-fiqh__more {display:none}
.ba-fiqh__junior-companions {display:flex;flex-wrap:wrap;gap:.6rem;border-top:1px solid #dfd0b8;padding-top:1rem;margin-top:1rem}
.ba-fiqh__junior-companion {display:flex;align-items:center;gap:.45rem;font-size:13px;color:#31555b;font-weight:650}
.ba-fiqh__junior-avatar {width:31px;height:31px;border-radius:50%;border:1px solid #b99b6d;background:#fff9eb;display:grid;place-items:center;font-size:18px;color:#875b2e}

/* Junior-only ungraded visual learning path. No tracking, characters or external assets. */
.ba-fiqh__activity-label {margin:0 0 .25rem;letter-spacing:.15em;font-weight:850;font-size:12px;color:#8b673e}
.ba-fiqh__step-map {display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:.6rem;margin:1rem 0 1.2rem}
.ba-fiqh__step-tile {appearance:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;min-height:98px;padding:.7rem .4rem;border:1px solid #dcc9aa;border-radius:14px;background:#fffcf5;color:#345157;box-shadow:0 2px 6px rgba(33,54,50,.06);cursor:pointer}
.ba-fiqh__step-tile[aria-pressed="true"] {background:#dfede6;border-color:#0b6068;box-shadow:inset 0 0 0 2px #0b6068,0 5px 15px rgba(8,83,90,.1)}
.ba-fiqh__step-tile:hover {border-color:#0b6068}
.ba-fiqh__step-tile-symbol {font:500 1.9rem/1.1 Georgia,serif;color:#217a78;min-height:34px}
.ba-fiqh__step-tile-label {font-size:12px;font-weight:800;line-height:1.25}
.ba-fiqh__step-picture {position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;height:174px;border-radius:15px;border:1px solid #e0c6a1;background:radial-gradient(circle at 50% 55%,#f2ecd5 0,#f5ead9 43%,#e7dfcd 80%);margin:1rem auto;max-width:480px}
.ba-fiqh__step-picture::before {content:"";position:absolute;width:210px;height:210px;border:2px solid rgba(165,134,87,.35);border-radius:52% 52% 48% 48%;transform:translateY(37px)}
.ba-fiqh__step-picture::after {content:"";position:absolute;inset:12px;border:1px solid rgba(160,127,78,.3);border-radius:11px;pointer-events:none}
.ba-fiqh__step-picture-art {position:relative;z-index:1;font-size:5rem;color:#147c78;text-shadow:0 5px 12px rgba(50,71,64,.14)}
.ba-fiqh__step-picture-number {position:absolute;z-index:1;top:13px;right:24px;color:#a17a46;font:bold 20px Georgia,serif}
.ba-fiqh__activity-reflection {font-size:clamp(15px,calc(var(--bf-reader-font-size,20px)*.9),23px);line-height:1.6;padding:1rem;border-radius:12px;background:#e4f0e8;border:1px solid #c7d9c9;color:#24555b;margin:.9rem 0 0}
.ba-fiqh__step-tile:focus-visible,.ba-fiqh__guided-button:focus-visible {outline:3px solid #ab6b20;outline-offset:3px}
@media(max-width:620px){.ba-fiqh__step-map {grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}.ba-fiqh__step-tile {min-height:90px}.ba-fiqh__step-picture {height:140px}.ba-fiqh__step-picture-art {font-size:4rem}}
@media(prefers-reduced-motion:reduce){.ba-fiqh__step-tile {transition:none}}

/* Junior family conversation cards: a no-score, client-only completion activity. */
.ba-fiqh__conversation {margin:1.1rem 0 .5rem;padding:1rem;background:#fffaf1;border:1px solid #d9c9aa;border-radius:14px}
.ba-fiqh__conversation-title {font:600 1.3rem/1.3 var(--bf-display);color:#244851;margin:0 0 .3rem}
.ba-fiqh__conversation-hint {font-size:14px;line-height:1.6;color:#657576;margin:0 0 .8rem}
.ba-fiqh__conversation-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}
.ba-fiqh__conversation-card {appearance:none;min-height:94px;border:1px solid #d8c29c;background:#fff;border-radius:12px;padding:.65rem;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.3rem;text-align:center;color:#22535a;cursor:pointer}
.ba-fiqh__conversation-card:hover {border-color:#126971;background:#edf6ef}
.ba-fiqh__conversation-card[aria-pressed="true"] {border-color:#126971;background:#e0f1e8;box-shadow:inset 0 0 0 2px #126971}
.ba-fiqh__conversation-symbol {font:500 1.7rem/1.1 Georgia,serif;color:#a47c44}
.ba-fiqh__conversation-card-title {font-size:13px;font-weight:800;line-height:1.25}
.ba-fiqh__conversation-answer {margin:.85rem 0 0;border-left:3px solid #18737a;background:#f1f7f0;padding:.75rem 1rem;border-radius:0 8px 8px 0;color:#28565c;line-height:1.65;font-size:clamp(15px,calc(var(--bf-reader-font-size,20px)*.85),21px)}
.ba-fiqh__conversation-card:focus-visible {outline:3px solid #b67727;outline-offset:3px}
@media(max-width:620px){.ba-fiqh__conversation-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.ba-fiqh__conversation-card{min-height:88px}}

/* Four-stage navigation: content-isolated by school/audience and explicit stage. */
.ba-fiqh__pathways {padding:clamp(20px,3vw,32px);margin:0 0 clamp(20px,3vw,34px);border:1px solid #e1d3ba;border-radius:20px;background:linear-gradient(130deg,#fcf9f1,#edf4ed);box-shadow:0 5px 24px rgba(17,68,67,.07)}
.ba-fiqh__pathways-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}
.ba-fiqh__pathways-heading h3 {font:600 clamp(24px,2.7vw,34px)/1.18 var(--bf-display);color:#143d43;margin:.35rem 0}
.ba-fiqh__pathways-heading p {color:#52686a;font-size:15px;line-height:1.55;margin:0}
.ba-fiqh__path-all {min-width:114px;min-height:44px;border-radius:999px;border:1px solid #b5a17c;padding:.55rem .9rem;background:#fffaf0;color:#225860;font-size:14px;font-weight:800}
.ba-fiqh__path-all[aria-pressed="true"] {color:white;background:#0b6065;border-color:#0b6065}
.ba-fiqh__pathway-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ba-fiqh__pathway-card {position:relative;min-width:0;min-height:200px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:18px 16px 16px;text-align:left;border:1px solid #d6c6a9;border-radius:16px;background:#fffdf8;color:#23464c;box-shadow:0 3px 14px rgba(19,63,59,.06);cursor:pointer}
.ba-fiqh__pathway-card[aria-pressed="true"] {border-color:#0b676d;box-shadow:inset 0 0 0 2px #0b676d,0 6px 16px rgba(18,77,70,.1);background:#e5f1e9}
.ba-fiqh__pathway-card:hover:not(:disabled) {border-color:#0d7679;background:#f4faf6}
.ba-fiqh__pathway-card:disabled {opacity:.53;cursor:default}
.ba-fiqh__pathway-index {font-size:12px;font-weight:900;letter-spacing:.15em;color:#a57d42}
.ba-fiqh__pathway-symbol {display:block;color:#0c777a;font:500 34px/1.2 Georgia,serif;margin:11px 0 5px}
.ba-fiqh__pathway-name {font:600 clamp(18px,1.6vw,23px)/1.2 var(--bf-display);color:#173d45}
.ba-fiqh__pathway-description {font-size:13px;line-height:1.5;color:#586d6d;margin:.48rem 0 .65rem}
.ba-fiqh__pathway-count {margin-top:auto;font-size:12px;font-weight:800;color:#976b31}
.ba-fiqh__pathway-card:focus-visible,.ba-fiqh__path-all:focus-visible{outline:3px solid #a56d22;outline-offset:3px}
.ba-fiqh__topic-art{display:block;position:relative;width:100%;height:clamp(86px,9vw,115px);max-width:250px;margin:.35rem auto .6rem;border-radius:10px;object-fit:cover;border:1px solid rgba(175,144,97,.25)}
.ba-fiqh__step-illustration {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.ba-fiqh__step-picture.has-illustration .ba-fiqh__step-picture-art{display:none}
.ba-fiqh__step-picture.has-illustration::before{display:none}
.ba-fiqh__step-picture.has-illustration .ba-fiqh__step-picture-number{top:10px;right:13px;border-radius:999px;background:#fff7e9;padding:2px 9px;box-shadow:0 2px 6px rgba(10,60,58,.09)}
@media(max-width:920px){.ba-fiqh__pathway-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ba-fiqh__pathway-card{min-height:166px}}
@media(max-width:620px){.ba-fiqh__pathways{padding:16px 12px;border-radius:14px}.ba-fiqh__pathways-heading{flex-wrap:wrap;gap:8px}.ba-fiqh__pathway-grid{gap:8px}.ba-fiqh__pathway-card{padding:13px 12px;min-height:176px}.ba-fiqh__pathway-symbol{font-size:27px;margin:8px 0 3px}.ba-fiqh__pathway-name{font-size:18px}.ba-fiqh__pathway-description{font-size:12px}.ba-fiqh__topic-art{height:92px}}
@media(max-width:355px){.ba-fiqh__pathway-grid{grid-template-columns:1fr}.ba-fiqh__pathway-card{min-height:138px}}
@media(prefers-reduced-motion:reduce){.ba-fiqh__pathway-card{transition:none}}

/* In-memory course progression: position is not persisted as a learner record. */
.ba-fiqh__course-position {padding:15px 18px;background:linear-gradient(110deg,#f6f0df,#e8f2e9);border:1px solid #d5cfb8;border-radius:15px;margin:0 0 1rem}
.ba-fiqh__course-position-label {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.35rem .9rem;margin-bottom:.75rem;color:#23565b;font-size:14px}
.ba-fiqh__course-position-label strong {font-family:var(--bf-display);font-size:18px}
.ba-fiqh__course-position-label span {font-weight:700}
.ba-fiqh__course-meter {display:block;width:100%;height:10px;accent-color:#0c7575;border-radius:100px;overflow:hidden}
.ba-fiqh__course-meter::-webkit-progress-bar {background:#d3e4d9;border-radius:100px}
.ba-fiqh__course-meter::-webkit-progress-value {background:#0c7575;border-radius:100px}
.ba-fiqh__course-nav {display:flex;justify-content:space-between;align-items:stretch;gap:12px;flex-wrap:wrap;padding:1.25rem 0;margin:1rem 0 0;border-top:1px solid #e1d8c8}
.ba-fiqh__course-button {appearance:none;display:flex;flex-direction:column;gap:5px;align-items:flex-start;justify-content:center;min-height:48px;max-width:100%;padding:.75rem 1.15rem;border-radius:12px;background:#fffdf7;border:1px solid #bfae8c;color:#225259;font-weight:800;font-size:15px;cursor:pointer;text-align:left}
.ba-fiqh__course-button--next {margin-left:auto;color:#fff;background:#08646c;border-color:#08646c}
.ba-fiqh__course-button:hover {border-color:#0d747a;box-shadow:0 5px 16px rgba(3,81,81,.12)}
.ba-fiqh__course-button small {color:inherit;font-size:12px;line-height:1.4;max-width:310px;font-weight:500;opacity:.9}
.ba-fiqh__course-button:focus-visible {outline:3px solid #b67827;outline-offset:3px}
.ba-fiqh__course-end {margin:0;color:#376165;line-height:1.6}
@media(max-width:620px){.ba-fiqh__course-nav {display:grid;grid-template-columns:1fr}.ba-fiqh__course-button,.ba-fiqh__course-button--next{width:100%;margin-left:0;min-width:0}.ba-fiqh__course-position{padding:12px}}
