/* Tafseer V15+ — e-quran.com */
.tafseer-v15{--tf-bg:var(--eq-theme-bg,#f7f8f5);--tf-surface:var(--eq-theme-surface,#fff);--tf-surface-soft:var(--eq-theme-surface-soft,#f3f5f1);--tf-text:var(--eq-theme-text,#20302a);--tf-muted:var(--eq-theme-muted,#68736e);--tf-border:var(--eq-theme-border,#d9dfda);--tf-green:var(--eq-theme-link,#2f6e39);--tf-green-deep:#24572d;--tf-gold:#b88b32;--tf-gold-2:#d7b466;--tf-gold-soft:#f7eed8;--tf-shadow:0 14px 40px rgba(24,48,36,.08);--ayah-scale:1;--tafseer-scale:1;width:min(1180px,calc(100% - 28px));margin:0 auto;padding:20px 0 52px;color:var(--tf-text)}
.tafseer-v15 *,.tafseer-v15 *::before,.tafseer-v15 *::after{box-sizing:border-box}.tafseer-v15 a{color:inherit}.tafseer-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.tafseer-breadcrumb{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 10px;font-size:.86rem;color:var(--tf-muted)}.tafseer-breadcrumb a{text-decoration:none}.tafseer-hero{padding:26px clamp(16px,4vw,38px);border:1px solid var(--tf-border);border-radius:22px;background:radial-gradient(circle at 15% 15%,rgba(184,139,50,.1),transparent 30%),linear-gradient(145deg,var(--tf-surface),var(--tf-surface-soft));box-shadow:var(--tf-shadow);text-align:center}.tafseer-hero--compact{padding:18px 16px}.tafseer-hero__eyebrow{display:block;color:var(--tf-gold);font-weight:850;font-size:.86rem;margin-bottom:5px}.tafseer-hero h1{margin:0;font-family:Quran,'Amiri',serif;font-size:clamp(1.45rem,3.4vw,2rem);line-height:1.5}.tafseer-hero p{max-width:760px;margin:8px auto 0;color:var(--tf-muted);line-height:1.8}
.tafseer-first-card{margin-top:12px;padding:clamp(18px,3vw,28px);border:1px solid rgba(184,139,50,.35);border-radius:22px;background:var(--tf-surface);box-shadow:0 16px 44px rgba(30,42,35,.08)}.tafseer-first-card__top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.tafseer-kicker{display:block;color:var(--tf-gold);font-size:.85rem;font-weight:850}.tafseer-first-card h2{margin:3px 0 0;font-family:Quran,'Amiri',serif;font-size:1.45rem}.tafseer-mini-nav{display:flex;gap:6px;flex-wrap:wrap}.tafseer-mini-nav a,.tafseer-mini-nav span{padding:7px 10px;border:1px solid var(--tf-border);border-radius:10px;text-decoration:none;font-weight:800;font-size:.82rem;background:var(--tf-surface-soft)}.tafseer-divider{height:1px;background:linear-gradient(90deg,transparent,var(--tf-border),transparent);margin:15px 0}.tafseer-ayah-text{margin:14px 0 0;color:var(--tf-green-deep);font-family:Quran,'Amiri',serif;font-size:calc(clamp(1.45rem,4vw,2.05rem)*var(--ayah-scale));line-height:2.05;text-align:center}.tafseer-text{font-size:calc(clamp(1rem,1.7vw,1.08rem)*var(--tafseer-scale));line-height:2.05}.tafseer-text span[style]{color:var(--tf-green)!important}.tafseer-text mark{background:var(--tf-gold-soft);color:inherit;border-radius:4px;padding:0 2px}
.tafseer-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.tafseer-action{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border:1px solid var(--tf-border);border-radius:12px;background:var(--tf-surface-soft);color:var(--tf-text);font:inherit;font-weight:800;text-decoration:none;cursor:pointer}.tafseer-action--primary{background:linear-gradient(145deg,#c69b46,#aa7d28);border-color:transparent;color:#fff;box-shadow:0 8px 20px rgba(184,139,50,.22)}.tafseer-action--important{background:linear-gradient(145deg,var(--tf-green),#24572d);border-color:transparent;color:#fff!important}.tafseer-v15 a.tafseer-action--important{color:#fff!important}.tafseer-actions--main .tafseer-action--primary,.tafseer-actions--main .tafseer-action--important{min-width:150px}
.tafseer-tools,.tafseer-compare,.tafseer-center,.tafseer-context,.tafseer-profile{margin-top:14px;border:1px solid var(--tf-border);border-radius:18px;background:var(--tf-surface)}.tafseer-tools>summary{cursor:pointer;padding:14px 16px;font-weight:900;color:var(--tf-text);list-style:none}.tafseer-tools>summary::-webkit-details-marker{display:none}.tafseer-tools__body{padding:0 14px 14px}.tafseer-control-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tafseer-field label{display:block;margin:0 2px 6px;color:var(--tf-muted);font-size:.82rem;font-weight:850}.tafseer-field select,.tafseer-compare select{width:100%;min-height:44px;border:1px solid var(--tf-border);border-radius:12px;padding:8px 10px;background:var(--tf-surface-soft);color:var(--tf-text);font:inherit}.tafseer-field--important select{border-color:rgba(184,139,50,.5);box-shadow:0 0 0 2px rgba(184,139,50,.06)}
.tafseer-reading-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:10px}.tafseer-reading-controls>div{display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid var(--tf-border);border-radius:12px}.tafseer-reading-controls span{font-size:.82rem;font-weight:800;color:var(--tf-muted)}.tafseer-reading-controls button:not(.tafseer-action){width:34px;height:34px;border:1px solid var(--tf-border);border-radius:9px;background:var(--tf-surface);color:var(--tf-text);font-size:1.15rem;cursor:pointer}.tafseer-inline-search{margin-top:10px}.tafseer-inline-search>label{font-size:.84rem;font-weight:850;color:var(--tf-muted)}.tafseer-inline-search>div{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:5px}.tafseer-inline-search input{min-height:42px;border:1px solid var(--tf-border);border-radius:11px;padding:8px 11px;background:var(--tf-surface-soft);color:var(--tf-text);font:inherit}.tafseer-inline-search p{margin:5px 2px 0;color:var(--tf-muted);font-size:.82rem}.tafseer-ayah-index{margin-top:10px}.tafseer-ayah-index summary{cursor:pointer;font-weight:850;color:var(--tf-muted)}.tafseer-ayah-index div{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.tafseer-ayah-index a{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--tf-border);border-radius:10px;text-decoration:none;background:var(--tf-surface-soft);font-weight:850}.tafseer-ayah-index a.is-current{background:var(--tf-gold);color:#fff;border-color:transparent}
.tafseer-compare{padding:14px}.tafseer-section__head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px}.tafseer-section__head h2{margin:0;font-family:Quran,'Amiri',serif;font-size:1.35rem}.tafseer-section__head p{margin:3px 0 0;color:var(--tf-muted);font-size:.9rem}.tafseer-section__badge{padding:6px 10px;border-radius:999px;background:var(--tf-gold-soft);color:#775514;font-size:.8rem;font-weight:850}.tafseer-compare-controls{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-top:12px;align-items:end}.tafseer-compare-controls label{font-size:.82rem;font-weight:850;color:var(--tf-muted)}.tafseer-compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.tafseer-compare-card{padding:14px;border:1px solid var(--tf-border);border-radius:14px;background:var(--tf-surface-soft);min-height:150px}.tafseer-compare-card h3{margin:0 0 8px;font-size:1rem}.tafseer-compare-card p{margin:0;line-height:1.9}.tafseer-compare-card.is-loading{opacity:.65}
.tafseer-center,.tafseer-context,.tafseer-profile{padding:14px}.tafseer-center-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}.tafseer-center-link{display:block;padding:12px;border:1px solid var(--tf-border);border-radius:13px;text-decoration:none;background:var(--tf-surface-soft)}.tafseer-center-link b,.tafseer-center-link span{display:block}.tafseer-center-link b{margin-bottom:3px}.tafseer-center-link span{color:var(--tf-muted);font-size:.82rem;line-height:1.6}.tafseer-center-link--important{border-color:rgba(184,139,50,.45);background:linear-gradient(145deg,var(--tf-gold-soft),var(--tf-surface))}.tafseer-context-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.tafseer-context-card{padding:11px;border:1px solid var(--tf-border);border-radius:13px;background:var(--tf-surface-soft);text-decoration:none}.tafseer-context-card span{display:block;color:var(--tf-muted);font-size:.78rem;font-weight:800;margin-bottom:5px}.tafseer-context-card b{display:block;font-family:Quran,'Amiri',serif;font-size:1rem;line-height:1.9}.tafseer-context-card.is-current{border-color:rgba(184,139,50,.55);background:var(--tf-gold-soft)}.tafseer-profile h2{margin:3px 0 8px;font-family:Quran,'Amiri',serif}.tafseer-profile p{margin:5px 0;line-height:1.8;color:var(--tf-muted)}
.tafseer-other-nav,.tafseer-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}.tafseer-other-nav a,.tafseer-nav a,.tafseer-nav span{min-height:44px;display:flex;align-items:center;justify-content:center;padding:8px;border:1px solid var(--tf-border);border-radius:12px;background:var(--tf-surface);text-decoration:none;font-weight:850}.tafseer-nav__index{background:var(--tf-gold-soft)!important;border-color:rgba(184,139,50,.4)!important}.tafseer-nav__disabled{opacity:.45}.tafseer-resume{display:grid;grid-template-columns:1fr auto;gap:2px 12px;margin:14px 0 0;padding:12px 14px;border:1px solid rgba(184,139,50,.42);border-radius:14px;background:linear-gradient(145deg,var(--tf-gold-soft),var(--tf-surface));text-decoration:none}.tafseer-resume span{font-size:.78rem;color:var(--tf-muted)}.tafseer-resume b{grid-column:1}.tafseer-resume em{grid-column:2;grid-row:1/3;align-self:center;font-style:normal;font-weight:850;color:var(--tf-gold)}
.tafseer-quick-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:14px 0 0}.tafseer-search{width:100%;min-height:46px;padding:9px 14px;border:1px solid var(--tf-border);border-radius:13px;background:var(--tf-surface);color:var(--tf-text);font:inherit}.tafseer-count{display:flex;align-items:center;justify-content:center;min-width:100px;padding:8px 12px;border:1px solid var(--tf-border);border-radius:13px;background:var(--tf-surface-soft);color:var(--tf-muted);font-weight:800}.tafseer-section{margin-top:24px}.tafseer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}.tafseer-card{display:flex;align-items:center;gap:11px;min-height:78px;padding:12px;border:1px solid var(--tf-border);border-radius:15px;background:var(--tf-surface);text-decoration:none}.tafseer-card__mark{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--tf-gold-soft);color:var(--tf-gold);font-weight:900}.tafseer-card__body{flex:1}.tafseer-card__title,.tafseer-card__meta{display:block}.tafseer-card__title{font-weight:900}.tafseer-card__meta{margin-top:2px;color:var(--tf-muted);font-size:.8rem}.tafseer-card__arrow{color:var(--tf-gold)}.tafseer-empty{display:none}.tafseer-empty.is-visible{display:block;margin-top:12px;padding:14px;border:1px dashed var(--tf-border);border-radius:12px;text-align:center;color:var(--tf-muted)}
.tafseer-ayat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:12px}.tafseer-ayah-link{display:flex;justify-content:space-between;align-items:center;min-height:56px;padding:10px 12px;border:1px solid var(--tf-border);border-radius:13px;background:var(--tf-surface);text-decoration:none;font-weight:850}.tafseer-ayah-link__num{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--tf-gold-soft);color:var(--tf-gold)}
.tafseer-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(10px);z-index:99999;padding:10px 14px;border-radius:11px;background:#1f2e27;color:#fff;opacity:0;pointer-events:none;transition:.2s}.tafseer-toast.is-visible{opacity:1;transform:translateX(-50%) translateY(0)}
body.tafseer-focus-mode #header,body.tafseer-focus-mode #footer,body.tafseer-focus-mode .tafseer-breadcrumb,body.tafseer-focus-mode .tafseer-hero,body.tafseer-focus-mode .tafseer-tools,body.tafseer-focus-mode .tafseer-center,body.tafseer-focus-mode .tafseer-context,body.tafseer-focus-mode .tafseer-profile,body.tafseer-focus-mode .tafseer-other-nav{display:none!important}body.tafseer-focus-mode .tafseer-v15{padding-top:12px;max-width:900px}body.tafseer-focus-mode .tafseer-first-card{margin-top:0}
html[data-theme="dark"] .tafseer-v15,body.dark-mode .tafseer-v15,html.dark .tafseer-v15{--tf-surface:#17211d;--tf-surface-soft:#1d2924;--tf-text:#eef4f0;--tf-muted:#aab7b0;--tf-border:#334139;--tf-green:#8bc78f;--tf-green-deep:#a8ddb0;--tf-gold:#d8b45f;--tf-gold-soft:rgba(216,180,95,.14)}
@media(max-width:900px){.tafseer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tafseer-center-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tafseer-ayat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.tafseer-v15{width:min(100% - 18px,1180px);padding-top:12px}.tafseer-first-card__top{display:block}.tafseer-mini-nav{margin-top:10px}.tafseer-actions--main{display:grid;grid-template-columns:1fr 1fr}.tafseer-control-bar,.tafseer-compare-controls,.tafseer-compare-grid,.tafseer-context-grid{grid-template-columns:1fr}.tafseer-grid{grid-template-columns:1fr}.tafseer-center-grid{grid-template-columns:1fr 1fr}.tafseer-section__badge{display:none}.tafseer-other-nav,.tafseer-nav{gap:5px}.tafseer-other-nav a,.tafseer-nav a,.tafseer-nav span{font-size:.84rem;padding:7px 4px}.tafseer-ayat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tafseer-quick-tools{grid-template-columns:1fr}.tafseer-count{min-height:42px}.tafseer-resume{grid-template-columns:1fr}.tafseer-resume em{grid-column:1;grid-row:auto;margin-top:4px}}
@media(max-width:380px){.tafseer-actions--main,.tafseer-center-grid{grid-template-columns:1fr}.tafseer-ayat-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.tafseer-v15 *{transition:none!important;scroll-behavior:auto!important}}


/* Full Mouaser rollout additions */
.tafseer-v15 .tafseer-intro-card{margin-top:12px;padding:18px;border:1px solid var(--tf-border);border-radius:18px;background:var(--tf-surface);line-height:2}.tafseer-v15 .tafseer-intro-card p{margin:0;color:var(--tf-muted)}
.tafseer-v15 .tafseer-surah-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,260px) auto;gap:8px;margin-top:14px}.tafseer-v15 .tafseer-surah-toolbar select{min-height:46px;border:1px solid rgba(184,139,50,.5);border-radius:13px;padding:8px 10px;background:var(--tf-surface);color:var(--tf-text);font:inherit;font-weight:800}
.tafseer-v15 .tafseer-surah-card{position:relative}.tafseer-v15 .tafseer-surah-card__num{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--tf-gold-soft);color:var(--tf-gold);font-weight:900}.tafseer-v15 .tafseer-surah-card__body{flex:1}.tafseer-v15 .tafseer-surah-card__body small{display:block;margin-top:2px;color:var(--tf-muted)}
.tafseer-v15 .tafseer-ayah-link:hover,.tafseer-v15 .tafseer-card:hover{border-color:rgba(184,139,50,.55);transform:translateY(-1px)}.tafseer-v15 .tafseer-card,.tafseer-v15 .tafseer-ayah-link{transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}.tafseer-v15 .tafseer-card:hover{box-shadow:0 10px 24px rgba(24,48,36,.07)}
.tafseer-v15 .tafseer-section__title{margin:0;font-family:Quran,'Amiri',serif;font-size:1.35rem}.tafseer-v15 .tafseer-section__desc{margin:3px 0 0;color:var(--tf-muted);font-size:.9rem}.tafseer-v15 .tafseer-root-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:12px}
.tafseer-v15 .tafseer-seo-note{margin-top:14px;padding:12px 14px;border-inline-start:3px solid var(--tf-gold);background:var(--tf-surface-soft);border-radius:10px;color:var(--tf-muted);line-height:1.85}
@media(max-width:720px){.tafseer-v15 .tafseer-surah-toolbar{grid-template-columns:1fr}.tafseer-v15 .tafseer-surah-toolbar .tafseer-action{width:100%}}

/* ===== Tafseer V16 navigation + spacing fixes ===== */
.tafseer-v15 .tafseer-root-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    gap:14px !important;
    margin-top:16px;
}
.tafseer-v15 .tafseer-root-actions .tafseer-action{
    margin:0 !important;
}
.tafseer-v15 .tafseer-first-card__top{
    display:block;
}
.tafseer-v15 .tafseer-mini-nav{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(120px,auto) minmax(0,1fr);
    gap:12px;
    margin-top:14px;
}
.tafseer-v15 .tafseer-mini-nav > *{
    width:100%;
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 !important;
}
.tafseer-v15 .tafseer-nav,
.tafseer-v15 .tafseer-other-nav{
    gap:12px;
    margin-top:18px;
}
.tafseer-v15 .tafseer-nav > *,
.tafseer-v15 .tafseer-other-nav > *{
    margin:0 !important;
}
.tafseer-v15 .tafseer-surah-toolbar{
    gap:12px !important;
    align-items:stretch;
}
.tafseer-v15 .tafseer-surah-toolbar > *{
    margin:0 !important;
}
.tafseer-v15 .tafseer-surah-toolbar select,
.tafseer-v15 .tafseer-surah-toolbar input{
    min-width:0;
}
.tafseer-v15 [data-tafseer-filter],
.tafseer-v15 [data-ayah-filter],
.tafseer-v15 [data-surah-jump]{
    position:relative;
    z-index:1;
}
@media(max-width:640px){
    .tafseer-v15 .tafseer-root-actions{
        display:grid;
        grid-template-columns:1fr;
        gap:10px !important;
    }
    .tafseer-v15 .tafseer-root-actions .tafseer-action{
        width:100%;
    }
    .tafseer-v15 .tafseer-mini-nav,
    .tafseer-v15 .tafseer-nav{
        grid-template-columns:1fr 1fr;
        gap:9px;
    }
    .tafseer-v15 .tafseer-mini-nav > :nth-child(2),
    .tafseer-v15 .tafseer-nav > .tafseer-nav__index{
        grid-column:1 / -1;
        grid-row:1;
    }
    .tafseer-v15 .tafseer-mini-nav > :nth-child(1),
    .tafseer-v15 .tafseer-nav > :nth-child(1){
        grid-column:1;
        grid-row:2;
    }
    .tafseer-v15 .tafseer-mini-nav > :nth-child(3),
    .tafseer-v15 .tafseer-nav > :nth-child(3){
        grid-column:2;
        grid-row:2;
    }
    .tafseer-v15 .tafseer-other-nav{
        grid-template-columns:1fr;
        gap:9px;
    }
    .tafseer-v15 .tafseer-surah-toolbar{
        grid-template-columns:1fr !important;
        gap:10px !important;
    }
}

/* V16.1 — إصلاح البحث: منع أنماط display الخاصة بالكروت من تجاوز hidden */
.tafseer-v15 [hidden] {
    display: none !important;
}

/* Reading controls directly after the tafseer hero (shared across all tafseer pages). */
.tafseer-v15 .tafseer-reading-controls--top{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;
  gap:8px;margin:12px 0 16px;padding:10px 12px;
  border:1px solid var(--tf-border);border-radius:14px;
  background:var(--tf-surface);color:var(--tf-text);
  direction:rtl;min-width:0;
}
.tafseer-v15 .tafseer-reading-controls--top>div{margin:0;min-width:0;gap:6px}
.tafseer-v15 .tafseer-reading-controls--top span{color:var(--tf-text)}
.tafseer-v15 .tafseer-reading-controls--top button{min-height:36px;cursor:pointer}
@media(max-width:600px){
 .tafseer-v15 .tafseer-reading-controls--top{padding:9px;gap:7px}
 .tafseer-v15 .tafseer-reading-controls--top>div{flex:1 1 auto;justify-content:center}
 .tafseer-v15 .tafseer-reading-controls--top span{font-size:.78rem}
}
body.tafseer-focus-mode .tafseer-v15 .tafseer-reading-controls--top{display:flex!important}

/* Readable current font scale indicator for Tafseer pages */
.tafseer-v15 .tafseer-reading-controls .tafseer-font-percent{display:inline-flex;align-items:center;justify-content:center;min-width:49px;padding:5px 7px;border:1px solid var(--tf-border);border-radius:9px;background:var(--tf-surface-soft);color:var(--tf-text);font-size:.82rem;font-weight:850;font-variant-numeric:tabular-nums;direction:rtl;white-space:nowrap;line-height:1.4}

/* V16.3 — single-row, touch-friendly reading toolbar. Scoped to the moved toolbar only. */
.tafseer-v15 .tafseer-reading-controls--top{
  display:flex!important;flex-flow:row nowrap!important;align-items:center;
  justify-content:flex-start;gap:8px;max-width:100%;min-width:0;
  overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;scrollbar-width:thin;
  scroll-snap-type:x proximity;touch-action:pan-x pan-y;
}
.tafseer-v15 .tafseer-reading-controls--top>div{
  flex:0 0 auto!important;display:flex;flex-wrap:nowrap;align-items:center;
  white-space:nowrap;scroll-snap-align:start;gap:5px;padding:5px 6px;
}
.tafseer-v15 .tafseer-reading-controls--top span{white-space:nowrap;line-height:1.35}
.tafseer-v15 .tafseer-reading-controls--top button:not(.tafseer-action){
  flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;
  padding:0;display:inline-grid;place-items:center;font-size:1.2rem;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
}
.tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent{
  flex:0 0 auto;min-width:48px;white-space:nowrap;
}
.tafseer-v15 .tafseer-reading-controls--top [data-focus-mode]{
  flex:0 0 auto;min-height:44px;white-space:nowrap;padding-inline:12px;
  touch-action:manipulation;scroll-snap-align:start;
}
.tafseer-v15 .tafseer-reading-controls--top button:focus-visible{
  outline:2px solid var(--tf-green);outline-offset:3px;
}
@media(max-width:600px){
  .tafseer-v15 .tafseer-reading-controls--top{
    flex-wrap:nowrap!important;gap:6px;padding:7px;margin-block:10px 14px;
  }
  .tafseer-v15 .tafseer-reading-controls--top>div{
    flex:0 0 auto!important;justify-content:flex-start;padding:4px 5px;
  }
  .tafseer-v15 .tafseer-reading-controls--top span{font-size:.78rem}
}

/* V16.4 — final reading-toolbar UX: reset-to-100%, limits, remembered focus mode, mobile swipe cue. */
.tafseer-v15 .tafseer-reading-controls--top button[data-font]:disabled{
  opacity:.4;cursor:not-allowed;box-shadow:none;transform:none;filter:saturate(.65);
}
.tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent{
  min-height:36px;cursor:pointer;user-select:none;-webkit-user-select:none;
  transition:border-color .16s ease,background-color .16s ease,transform .16s ease;
}
.tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent:hover{
  border-color:rgba(184,139,50,.55);background:var(--tf-gold-soft);
}
.tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent:active{transform:scale(.97)}
.tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent:focus-visible{
  outline:2px solid var(--tf-green);outline-offset:3px;
}
.tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent.is-default{
  border-color:rgba(184,139,50,.38);background:var(--tf-gold-soft);
}
.tafseer-v15 .tafseer-swipe-hint{display:none;margin:-8px 10px 12px;color:var(--tf-muted);font-size:.72rem;font-weight:750;text-align:start}
@media(max-width:600px){
  .tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent{
    min-width:54px;min-height:44px;padding:5px 8px;
  }
  .tafseer-v15 .tafseer-swipe-hint:not([hidden]){display:block}
  .tafseer-v15 .tafseer-reading-controls--top.has-horizontal-overflow{
    box-shadow:inset 12px 0 14px -14px rgba(0,0,0,.45),inset -12px 0 14px -14px rgba(0,0,0,.45);
  }
}

/* V19.1 — direct source interlinks, dark/light theme tokens inherited from main site */
.tafseer-v15 .v191-crossnav{margin:20px 0;padding:16px;border-radius:18px;border:1px solid var(--tf-border);background:var(--tf-surface);color:var(--tf-text)}
.tafseer-v15 .v191-crossnav h2{font-size:1.13rem;margin:0 0 8px;color:var(--tf-text)}
.tafseer-v15 .v191-crossnav p{font-size:.9rem;color:var(--tf-muted);margin:0 0 12px}
.tafseer-v15 .v191-crossnav__links,.tafseer-v15 .v191-index-action{display:flex;flex-wrap:wrap;gap:8px}
.tafseer-v15 .v191-crossnav__links a,.tafseer-v15 .v191-index-action a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 12px;border:1px solid var(--tf-border);border-radius:11px;background:var(--tf-surface-soft);color:var(--tf-text);text-decoration:none;font-size:.94rem;font-weight:600}
.tafseer-v15 .v191-crossnav__links a:hover,.tafseer-v15 .v191-index-action a:hover{border-color:var(--tf-gold);text-decoration:underline;text-underline-offset:4px}
.tafseer-v15 .v191-crossnav__links a:focus-visible,.tafseer-v15 .v191-index-action a:focus-visible{outline:3px solid var(--tf-gold);outline-offset:3px}
.tafseer-v15 .v191-index-action{margin:16px 0}
@media(max-width:530px){.tafseer-v15 .v191-crossnav__links a{flex:1 1 calc(50% - 8px);min-width:0;text-align:center}.tafseer-v15 .v191-index-action a{flex:1 1 100%}}


/* V19.3 HOTFIX — correct sizing and avoid sideward displacement on narrow screens. */
:where(.tafseer-v15,.tfs-full,.tf19-search){box-sizing:border-box;min-width:0;max-width:100%;overflow-x:clip}
.tafseer-v15{width:min(1180px,calc(100% - 24px));margin-inline:auto}
.tafseer-v15 :is(.tafseer-first-card,.tafseer-tools,.tafseer-compare,.tafseer-section,.tafseer-center,.tafseer-context,.tafseer-profile,.tafseer-grid,.tafseer-card,.tafseer-action,.tafseer-reading-controls>div,.tafseer-field,.tafseer-compare-card){min-width:0;max-width:100%}
.tafseer-v15 :is(.tafseer-text,.tafseer-compare-card p,.tafseer-center-link,.tafseer-context-card,.tafseer-profile p){overflow-wrap:break-word}
.tafseer-v15 :is(select,input){max-width:100%;min-width:0}
.tafseer-v15 :is(.tafseer-first-card,.tafseer-compare-card,.tafseer-tools,.tafseer-center){color:var(--tf-text)}
.tafseer-v15 .tafseer-reading-controls--top{max-width:100%;scrollbar-width:thin;overscroll-behavior-inline:contain}
.tafseer-v15 .tafseer-ayah-text{max-width:100%;overflow-wrap:break-word}
@media(max-width:600px){
  .tafseer-v15{width:calc(100% - 16px);padding-top:10px}
  .tafseer-v15 .tafseer-hero{padding:14px 12px;border-radius:15px}
  .tafseer-v15 .tafseer-first-card{padding:15px 12px;border-radius:15px}
  .tafseer-v15 .tafseer-actions--main{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .tafseer-v15 .tafseer-action{padding:8px 9px;font-size:.89rem}
  .tafseer-v15 :is(.tafseer-nav,.tafseer-other-nav){grid-template-columns:repeat(3,minmax(0,1fr))}
  .tafseer-v15 .tafseer-reading-controls--top{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;gap:7px;padding:6px 3px}
  .tafseer-v15 .tafseer-reading-controls--top>div{flex:0 0 auto}
}
/* V19.3: contrast in both modes without affecting Quran text. */
html[data-theme=dark] .tafseer-v15 :is(.tafseer-action--primary,.tafseer-section__badge,.tafseer-card__mark){color:#f8e3a7}
html[data-theme=dark] .tafseer-v15 .tafseer-action--important{background:#285e43;color:#fff!important}

/* V19.3 early dark palette: same values as the central site, available before theme.css loads. */
html[data-theme="dark"]{
 --eq-theme-bg:#0b1714;--eq-theme-surface:#10231e;--eq-theme-surface-2:#152d26;
 --eq-theme-surface-soft:#152d26;--eq-theme-text:#e8f0eb;
 --eq-theme-muted:#aabbb2;--eq-theme-border:#314b41;
 --eq-theme-link:#b8d8aa;--eq-theme-accent:#d6b86f;
 --eq-theme-input:#112821;color-scheme:dark;
}
html[data-theme="dark"] body:not(.eq-home){background-color:#0b1714;color:#e8f0eb}


/* V19.4 FINAL — premium mobile layout, stronger landing pages, cleaner bottom navigation */
.tafseer-v15 .tafseer-hero{position:relative;overflow:hidden}
.tafseer-v15 .tafseer-hero::after{content:"";position:absolute;inset:auto -10% -45% auto;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(184,139,50,.13),transparent 62%);pointer-events:none}
.tafseer-v15 .tafseer-hero h1{margin-bottom:6px}
.tafseer-v15 .tafseer-quick-tools,.tafseer-v15 .tafseer-surah-toolbar,.tafseer-v15 .tafseer-intro-card,.tafseer-v15 .tafseer-section,.tafseer-v15 .tafseer-first-card,.tafseer-v15 .tafseer-tools,.tafseer-v15 .tafseer-compare,.tafseer-v15 .tafseer-center,.tafseer-v15 .tafseer-context,.tafseer-v15 .tafseer-profile,.tafseer-v15 .v191-crossnav{box-shadow:0 14px 38px rgba(23,41,32,.06)}
.tafseer-v15 .tafseer-intent-grid,.tafseer-v15 .tafseer-landing-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
.tafseer-v15 .tafseer-intent-card,.tafseer-v15 .tafseer-stat-card{display:block;padding:14px 14px 13px;border:1px solid var(--tf-border);border-radius:16px;background:linear-gradient(145deg,var(--tf-surface),var(--tf-surface-soft));text-decoration:none;min-width:0}
.tafseer-v15 .tafseer-intent-card b,.tafseer-v15 .tafseer-stat-card b{display:block;font-size:1rem;margin-bottom:4px}
.tafseer-v15 .tafseer-intent-card span,.tafseer-v15 .tafseer-stat-card span{display:block;color:var(--tf-muted);font-size:.86rem;line-height:1.7}
.tafseer-v15 .tafseer-intent-card strong,.tafseer-v15 .tafseer-stat-card strong{display:block;color:var(--tf-gold);font-size:1.1rem;margin-bottom:4px}
.tafseer-v15 .tafseer-intent-card--important{border-color:rgba(184,139,50,.45);background:linear-gradient(145deg,var(--tf-gold-soft),var(--tf-surface))}
.tafseer-v15 .tafseer-source-points{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
.tafseer-v15 .tafseer-source-point{padding:12px 13px;border:1px solid var(--tf-border);border-radius:14px;background:var(--tf-surface-soft)}
.tafseer-v15 .tafseer-source-point b{display:block;margin-bottom:4px}
.tafseer-v15 .tafseer-source-point span{display:block;color:var(--tf-muted);font-size:.86rem;line-height:1.7}
.tafseer-v15 .tafseer-intro-card{margin-top:12px;background:linear-gradient(145deg,var(--tf-surface),rgba(184,139,50,.03));border-radius:18px;padding:18px}
.tafseer-v15 .tafseer-surah-toolbar,.tafseer-v15 .tafseer-quick-tools{padding:12px;border:1px solid var(--tf-border);border-radius:18px;background:var(--tf-surface)}
.tafseer-v15 .tafseer-search{background:var(--tf-surface-soft)}
.tafseer-v15 .tafseer-count{background:var(--tf-surface-soft);border-radius:13px;font-weight:800}
.tafseer-v15 .tafseer-card,.tafseer-v15 .tafseer-surah-card{position:relative;border-radius:16px;border:1px solid var(--tf-border);background:var(--tf-surface);box-shadow:0 10px 24px rgba(27,43,35,.05)}
.tafseer-v15 .tafseer-card:hover,.tafseer-v15 .tafseer-surah-card:hover{transform:translateY(-2px);border-color:rgba(184,139,50,.45)}
.tafseer-v15 .tafseer-card__mark,.tafseer-v15 .tafseer-surah-card__num{box-shadow:inset 0 0 0 1px rgba(184,139,50,.14)}
.tafseer-v15 .tafseer-tools>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:1rem}
.tafseer-v15 .tafseer-tools>summary::after{content:"⌄";font-size:1rem;color:var(--tf-gold)}
.tafseer-v15 .tafseer-tools[open]>summary::after{content:"⌃"}
.tafseer-v15 .tafseer-control-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
.tafseer-v15 .tafseer-inline-search{margin-top:12px;padding:11px;border:1px solid var(--tf-border);border-radius:14px;background:var(--tf-surface-soft)}
.tafseer-v15 .tafseer-inline-search>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.tafseer-v15 .tafseer-inline-search button{min-width:120px}
.tafseer-v15 .tafseer-ayah-index{padding:12px;border:1px solid var(--tf-border);border-radius:14px;background:linear-gradient(145deg,var(--tf-surface),var(--tf-surface-soft))}
.tafseer-v15 .tafseer-ayah-index summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 1px;font-weight:900;color:var(--tf-text)}
.tafseer-v15 .tafseer-ayah-index summary::-webkit-details-marker{display:none}
.tafseer-v15 .tafseer-ayah-index summary::after{content:"قائمة منسدلة";padding:5px 10px;border-radius:999px;background:var(--tf-gold-soft);color:#7c5a14;font-size:.75rem;font-weight:900}
.tafseer-v15 .tafseer-reading-controls--top{overflow:visible!important;scrollbar-width:auto;box-shadow:0 10px 24px rgba(25,42,33,.05)}
.tafseer-v15 .tafseer-other-nav,.tafseer-v15 .tafseer-nav{gap:9px}
.tafseer-v15 .tafseer-other-nav a,.tafseer-v15 .tafseer-nav a,.tafseer-v15 .tafseer-nav span,.tafseer-v15 .tafseer-mini-nav a,.tafseer-v15 .tafseer-mini-nav span{border-radius:13px;background:linear-gradient(145deg,var(--tf-surface),var(--tf-surface-soft));border:1px solid var(--tf-border);font-weight:900;box-shadow:0 8px 20px rgba(24,40,31,.04)}
.tafseer-v15 .tafseer-nav__index,.tafseer-v15 .tafseer-mini-nav a[href$="index.html"]{background:linear-gradient(145deg,var(--tf-gold-soft),var(--tf-surface))!important}
.tafseer-v15 .tafseer-other-nav a:hover,.tafseer-v15 .tafseer-nav a:hover,.tafseer-v15 .tafseer-mini-nav a:hover{border-color:rgba(184,139,50,.5);transform:translateY(-1px)}
.tafseer-v15 .tafseer-actions--main .tafseer-action{box-shadow:0 8px 20px rgba(24,40,31,.05)}
.tafseer-v15 .tafseer-profile{background:linear-gradient(145deg,var(--tf-surface),rgba(184,139,50,.04))}
.tafseer-v15 .v191-crossnav__links a,.tafseer-v15 .v191-index-action a{font-weight:800}
html[data-theme="dark"] .tafseer-v15 .tafseer-intent-card,
html[data-theme="dark"] .tafseer-v15 .tafseer-stat-card,
html[data-theme="dark"] .tafseer-v15 .tafseer-source-point{background:linear-gradient(145deg,var(--tf-surface),rgba(214,184,111,.06))}

/* Dark fallback before JS applies saved/system theme to reduce flash */
@media (prefers-color-scheme: dark){
  html:not([data-theme="light"]) .tafseer-v15{
    --tf-bg:#0b1714;--tf-surface:#10231e;--tf-surface-soft:#152d26;--tf-text:#e8f0eb;
    --tf-muted:#aabbb2;--tf-border:#314b41;--tf-green:#b8d8aa;--tf-green-deep:#dcebe3;
    --tf-gold:#d6b86f;--tf-gold-2:#f0d595;--tf-gold-soft:#2f2718;color-scheme:dark;
  }
  html:not([data-theme="light"]) body{background:#0b1714;color:#e8f0eb}
}

@media(max-width:760px){
  .tafseer-v15 .tafseer-grid,.tafseer-v15 .tafseer-intent-grid,.tafseer-v15 .tafseer-landing-stats,.tafseer-v15 .tafseer-source-points{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tafseer-v15 .tafseer-mini-nav,.tafseer-v15 .tafseer-nav,.tafseer-v15 .tafseer-other-nav{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-control-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-inline-search>div{grid-template-columns:minmax(0,1fr) auto!important}
  .tafseer-v15 .tafseer-reading-controls--top{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px!important}
  .tafseer-v15 .tafseer-reading-controls--top>div{min-width:0;justify-content:center!important;padding:7px 8px!important;border:1px solid var(--tf-border);border-radius:12px;background:var(--tf-surface-soft)}
  .tafseer-v15 .tafseer-reading-controls--top>div:nth-child(3){grid-column:1 / -1}
  .tafseer-v15 .tafseer-swipe-hint{display:none!important}
}
@media(max-width:640px){
  .tafseer-v15{width:calc(100% - 14px)!important}
  .tafseer-v15 .tafseer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-center-grid,.tafseer-v15 .tafseer-context-grid,.tafseer-v15 .tafseer-intent-grid,.tafseer-v15 .tafseer-landing-stats,.tafseer-v15 .tafseer-source-points{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-root-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-root-actions .tafseer-action{width:auto}
  .tafseer-v15 .tafseer-actions--main{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-mini-nav{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;margin-top:10px}
  .tafseer-v15 .tafseer-mini-nav>:nth-child(n),.tafseer-v15 .tafseer-nav>:nth-child(n){grid-column:auto!important;grid-row:auto!important}
  .tafseer-v15 .tafseer-other-nav{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-surah-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-quick-tools{grid-template-columns:minmax(0,1fr)!important}
  .tafseer-v15 .tafseer-count{width:100%}
}
@media(max-width:430px){
  .tafseer-v15 .tafseer-inline-search>div{grid-template-columns:1fr!important}
  .tafseer-v15 .tafseer-inline-search button{width:100%}
}

/* V19.5 — mobile controls without horizontal drag; two cards per row; premium closing links */
.tafseer-v15 .tafseer-reading-controls--top{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;overflow:visible!important;scroll-snap-type:none!important;touch-action:auto!important;padding:10px!important}
.tafseer-v15 .tafseer-reading-controls--top>div{display:grid!important;grid-template-columns:40px minmax(43px,1fr) 40px;grid-template-rows:auto 42px;justify-items:center;align-items:center;gap:5px;padding:9px 7px!important;white-space:normal!important;min-width:0!important;background:var(--tf-surface-soft);border:1px solid var(--tf-border);border-radius:13px;flex:none!important}
.tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{grid-column:1/-1;grid-row:1;font-size:.84rem!important;text-align:center;white-space:normal!important;color:var(--tf-text);font-weight:900}
.tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{flex:none!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:42px!important;min-height:42px!important;font-size:1.15rem!important;grid-row:2}
.tafseer-v15 .tafseer-reading-controls--top>div>.tafseer-font-percent{grid-row:2;grid-column:2;padding:4px 2px!important;min-width:0!important;width:100%;height:42px;display:grid;place-items:center;font-size:.83rem!important;border-radius:9px}
.tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{grid-column:1/-1;width:100%;margin:0!important;min-height:44px!important;font-size:.9rem;padding:8px!important}
.tafseer-v15 .tafseer-swipe-hint{display:none!important}
.tafseer-v15 .tafseer-ayah-index summary{min-height:38px;gap:10px}
.tafseer-v15 .tafseer-ayah-index summary::after{content:'اختر آية  ▾'!important;flex-shrink:0;background:var(--tf-gold-soft);border:1px solid rgba(184,139,50,.3);border-radius:9px;padding:6px 10px;color:var(--tf-gold);font-weight:900}
.tafseer-v15 .tafseer-ayah-index[open] summary::after{content:'إغلاق القائمة  ▴'!important}
.tafseer-v15 .tafseer-inline-search>div{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px}
.tafseer-v15 .tafseer-inline-search input{min-width:0!important;width:100%}
.tafseer-v15 .tafseer-inline-search button{min-width:78px!important;width:auto!important;padding:8px 10px!important;white-space:nowrap}
.tafseer-v15 .tafseer-center-grid,.tafseer-v15 .v191-crossnav__links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.tafseer-v15 .v191-crossnav__links a{min-width:0!important;width:100%;min-height:52px;line-height:1.55;white-space:normal;text-align:center;border:1px solid var(--tf-border);box-shadow:0 7px 17px rgba(15,37,24,.045)}
.tafseer-v15 .tafseer-other-nav,.tafseer-v15 .tafseer-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;padding:12px;border:1px solid var(--tf-border);border-radius:17px;background:var(--tf-surface);box-shadow:0 10px 24px rgba(24,40,31,.04)}
.tafseer-v15 .tafseer-other-nav::before{content:'استكشف التفسير التالي';font-weight:900;font-size:1rem;color:var(--tf-text);grid-column:1/-1}
.tafseer-v15 .tafseer-nav::before{content:'تابع قراءة السورة';font-weight:900;font-size:1rem;color:var(--tf-text);grid-column:1/-1}
.tafseer-v15 .tafseer-other-nav a,.tafseer-v15 .tafseer-nav a{min-width:0!important;min-height:46px!important;padding:8px 5px!important;text-align:center;font-size:clamp(.72rem,2.4vw,.95rem)!important}
.tafseer-v15 .tafseer-other-nav a:hover,.tafseer-v15 .tafseer-nav a:hover,.tafseer-v15 .v191-crossnav__links a:hover{border-color:var(--tf-gold);transform:translateY(-1px)}
.tafseer-v15 .tafseer-intent-card,.tafseer-v15 .tafseer-source-point,.tafseer-v15 .tafseer-card{overflow-wrap:break-word;min-width:0}
.tafseer-v15 .tafseer-ayah-text{padding:16px 12px;border-radius:15px;background:linear-gradient(115deg,rgba(62,129,88,.07),rgba(185,138,51,.08));border:1px solid rgba(185,138,51,.23)}
.tafseer-v15 .tafseer-text{border-inline-start:3px solid rgba(48,117,79,.34);padding:5px 14px;line-height:2.1}
html[data-theme="dark"] .tafseer-v15{--tf-green-deep:#d8e9dd;--tf-gold-soft:#302818;--tf-gold:#d6b86f;--tf-green:#b8d8aa}
html[data-theme="dark"] .tafseer-v15 .tafseer-ayah-index summary::after{color:#f0d99d}
html[data-theme="dark"] .tafseer-v15 .tafseer-action--primary{background:#d6b86f;color:#18281e!important;border-color:#e8cb87}
html[data-theme="dark"] .tafseer-v15 .tafseer-action--important{background:#2d7052;color:#fff!important}
html[data-theme="dark"] .tafseer-v15 .tafseer-text{border-inline-start-color:#608a72}
.tafseer-v15 [hidden]{display:none!important}
@media(max-width:760px){
 .tafseer-v15 .tafseer-reading-controls--top{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .tafseer-v15 .tafseer-reading-controls--top>div{grid-template-columns:40px minmax(38px,1fr) 40px;flex:none!important;justify-items:center!important}
 .tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{grid-column:1/-1}
 .tafseer-v15 .tafseer-control-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .tafseer-v15 .tafseer-grid,.tafseer-v15 .tafseer-intent-grid,.tafseer-v15 .tafseer-source-points,.tafseer-v15 .tafseer-landing-stats,.tafseer-v15 .tafseer-center-grid,.tafseer-v15 .tafseer-context-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .tafseer-v15 .tafseer-mini-nav{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .tafseer-v15 .tafseer-mini-nav>*{grid-column:auto!important;grid-row:auto!important;margin:0!important}
 .tafseer-v15 .tafseer-quick-tools{grid-template-columns:1fr!important}
 .tafseer-v15 .tafseer-action{white-space:normal;overflow-wrap:break-word}
 .tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{font-size:.76rem!important}
}
@media(max-width:355px){
 .tafseer-v15 .tafseer-reading-controls--top{gap:6px;padding:6px!important}
 .tafseer-v15 .tafseer-reading-controls--top>div{grid-template-columns:36px minmax(35px,1fr) 36px;gap:3px;padding:6px 3px!important}
 .tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{width:36px!important;min-width:36px!important;height:40px!important;min-height:40px!important}
 .tafseer-v15 .tafseer-reading-controls--top .tafseer-font-percent{font-size:.72rem!important}
 .tafseer-v15 .tafseer-inline-search button{min-width:64px!important;padding:7px!important}
}
@media(prefers-reduced-motion:reduce){.tafseer-v15 .tafseer-card,.tafseer-v15 .tafseer-action,.tafseer-v15 .tafseer-nav a{transition:none!important;transform:none!important}}


/* V19.6 — strictly scoped mobile layout repairs */
.tf196-home .tafseer-quick-tools{padding:8px 10px;margin-block:10px 8px;grid-template-columns:minmax(0,1fr) auto}
.tf196-home .tafseer-quick-tools .tafseer-search{min-height:40px;padding:7px 11px}
.tf196-home .tafseer-count{min-width:86px;min-height:40px;font-size:.79rem;padding-inline:8px}
.tf196-home .tf196-facts{margin:10px 0 16px;padding:8px 12px;border-inline-start:3px solid var(--tf-gold);color:var(--tf-muted);font-size:.82rem;line-height:1.65;background:transparent}
.tf196-home .v191-index-action{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 10px}
.tf196-home .v191-index-action a{display:flex!important;flex:none!important;min-width:0!important;min-height:46px;padding:6px 5px!important;text-align:center;font-size:.78rem;line-height:1.45;overflow-wrap:break-word}
.tf196-home .tafseer-hero{padding-block:16px}
.tf196-home .tafseer-intent-grid{margin:10px 0;gap:7px}
.tf196-home .tafseer-intent-card{padding:10px}
.tf196-home .tafseer-intent-card::after{content:'↗';font-size:1rem;font-weight:900;color:var(--tf-gold);display:inline-block;margin-inline-start:5px}

.tf196-source-home .tafseer-intent-grid{gap:7px;margin:10px 0 12px}
.tf196-source-home .tafseer-intent-card{padding:9px 10px;min-height:64px;position:relative}
.tf196-source-home .tafseer-intent-card b{font-size:.92rem}
.tf196-source-home .tafseer-intent-card span{font-size:.78rem;line-height:1.5}
.tf196-source-home .tafseer-intent-card::after{content:'↗';position:absolute;inset-inline-end:8px;top:7px;color:var(--tf-gold);font-weight:900}
.tf196-source-home .tafseer-intent-card[href="#surah-list"]::after{content:'↓'}
.tf196-source-home .tafseer-intent-card[href="/pages/tafseer/search.html"]::after{content:'⌕';font-size:1.25rem;line-height:1}
.tf196-source-home .tafseer-intent-card b,.tf196-source-home .tafseer-intent-card span{padding-inline-end:11px}
.tf196-source-home .tafseer-intro-card{margin-top:18px;padding:13px 15px;box-shadow:none;border:1px solid var(--tf-border);background:var(--tf-surface-soft);border-radius:12px}
.tf196-source-home .tafseer-surah-toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px;padding:8px}
.tf196-source-home .tafseer-surah-toolbar .tafseer-search,.tf196-source-home .tafseer-surah-toolbar select{min-width:0;width:100%;height:43px;min-height:43px}
.tf196-source-home .tafseer-surah-toolbar .tafseer-search{padding-inline:10px 27px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238b713d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 7px center;background-size:16px}
.tf196-source-home .v191-index-action{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px;margin:9px 0}
.tf196-source-home .v191-index-action a{flex:none!important;min-width:0!important;padding:7px 6px!important;line-height:1.5;overflow-wrap:break-word;text-align:center}

/* Surah-specific ayah indexes. Existing tf95 links had no shared card layout. */
.tafseer-v15:has(> .tf95-index-journey) .tf95-index-journey{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.tafseer-v15 .tf95-index-journey a{display:flex;flex-direction:column;justify-content:center;gap:3px;min-width:0;padding:10px 12px;border-radius:12px;border:1px solid var(--tf-border);background:var(--tf-surface-soft);color:var(--tf-text);text-decoration:none;box-shadow:none}
.tafseer-v15 .tf95-index-journey a b{display:block;font-size:.89rem;line-height:1.5}
.tafseer-v15 .tf95-index-journey a span{display:block;color:var(--tf-muted);font-size:.76rem;line-height:1.5}
.tafseer-v15 .tf95-index-journey a::after{content:'↗';color:var(--tf-gold);font-weight:900;position:absolute;inset-inline-end:9px;top:8px}
.tafseer-v15 .tf95-index-journey a{position:relative;padding-inline-end:27px}
.tafseer-v15:has(> .tf95-index-journey) .tafseer-surah-toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px;padding:10px}
.tafseer-v15:has(> .tf95-index-journey) .tafseer-surah-toolbar>*{min-width:0;width:100%}
.tafseer-v15:has(> .tf95-index-journey) .v191-index-action{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-block:9px}
.tafseer-v15:has(> .tf95-index-journey) .v191-index-action a{flex:none!important;min-width:0!important;width:100%;text-align:center;font-size:.84rem;line-height:1.45;padding:8px 5px!important}
.tafseer-v15:has(> .tf95-index-journey) .v191-index-action a:first-child{grid-column:1/-1}
.tafseer-v15:has(> .tf95-index-journey) .tafseer-hero .tafseer-root-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}

/* Compact inline controls: Quran, tafsir and focus ALL in one outer row. */
.tafseer-v15 .tafseer-reading-controls--top{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important;align-items:center;gap:5px!important;padding:6px!important;margin-block:7px 9px!important;min-width:0;overflow:visible!important;box-shadow:none}
.tafseer-v15 .tafseer-reading-controls--top>div{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:3px!important;padding:3px!important;border:0!important;background:transparent!important;min-width:0!important;white-space:nowrap!important}
.tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{display:inline-flex!important;grid-row:auto!important;grid-column:auto!important;font-size:.77rem!important;white-space:nowrap!important;font-weight:800}
.tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{display:inline-grid!important;grid-row:auto!important;grid-column:auto!important;flex:0 0 30px!important;width:30px!important;min-width:30px!important;max-width:30px!important;height:36px!important;min-height:36px!important;padding:0!important;border-radius:8px!important;font-size:1rem!important}
.tafseer-v15 .tafseer-reading-controls--top>div>.tafseer-font-percent{display:inline-flex!important;grid-row:auto!important;grid-column:auto!important;flex:0 0 auto!important;min-width:37px!important;width:auto!important;max-width:46px!important;height:35px!important;min-height:35px!important;padding:3px 4px!important;font-size:.77rem!important;line-height:1!important}
.tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{grid-column:auto!important;min-width:49px!important;width:auto!important;max-width:none!important;min-height:36px!important;height:36px!important;padding:5px 7px!important;font-size:.75rem!important;white-space:nowrap!important;border-radius:9px!important;margin:0!important}
.tafseer-v15 .tafseer-swipe-hint{display:none!important}
body.tafseer-focus-mode .tafseer-v15 .tafseer-reading-controls--top{display:grid!important;position:relative;inset:auto!important;width:100%!important;margin-inline:auto!important;visibility:visible!important}
/* Only 1 row for inline search, including 320px devices. */
.tafseer-v15 .tafseer-inline-search>div{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important}
.tafseer-v15 .tafseer-inline-search button{min-width:54px!important;padding:7px 8px!important}

@media(max-width:760px){
  .tf196-home .tafseer-quick-tools{grid-template-columns:minmax(0,1fr) auto!important}
  .tf196-home .tafseer-count{width:auto!important}
  .tf196-home .v191-index-action{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .tf196-source-home .tafseer-surah-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tafseer-v15 .tafseer-reading-controls--top{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important}
  .tafseer-v15 .tafseer-reading-controls--top>div{padding:2px!important;border:0!important}
  .tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{grid-column:auto!important}
}
@media(max-width:450px){
  .tafseer-v15 .tafseer-reading-controls--top{gap:3px!important;padding:4px 2px!important}
  .tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{font-size:.68rem!important}
  .tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{flex-basis:27px!important;width:27px!important;min-width:27px!important;max-width:27px!important;height:34px!important;min-height:34px!important}
  .tafseer-v15 .tafseer-reading-controls--top>div>.tafseer-font-percent{min-width:32px!important;font-size:.7rem!important;padding-inline:2px!important}
  .tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{font-size:.7rem!important;min-width:44px!important;padding:4px 5px!important}
  .tf196-source-home .tafseer-intent-card{min-height:57px;padding:8px}
  .tf196-source-home .tafseer-intent-card b{font-size:.84rem}
  .tf196-source-home .tafseer-intent-card span{font-size:.72rem}
  .tafseer-v15 .tf95-index-journey a{padding:9px 7px 9px 22px}
}
@media(max-width:360px){
  .tafseer-v15 .tafseer-reading-controls--top{gap:2px!important}
  .tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{font-size:.65rem!important}
  .tafseer-v15 .tafseer-reading-controls--top>div{gap:2px!important}
  .tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{width:25px!important;min-width:25px!important;max-width:25px!important}
  .tafseer-v15 .tafseer-reading-controls--top>div>.tafseer-font-percent{min-width:31px!important}
}


/* V19.7: tafsir toolbar remains above the ayah; pins under header during reading. */
.tafseer-v15 .tafseer-reading-controls--top{position:relative!important;top:auto!important;left:auto!important;width:100%!important;z-index:45!important;overflow:visible!important;display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:5px!important;min-height:48px!important;padding:5px 6px!important;box-shadow:0 8px 20px rgba(0,0,0,.07)!important;isolation:isolate}
.tafseer-v15 .tafseer-reading-controls--top.tf197-is-pinned{position:fixed!important;top:var(--tf197-top,0px)!important;left:var(--tf197-left,0px)!important;width:var(--tf197-width,100%)!important;margin:0!important;border-radius:0 0 12px 12px!important;background:var(--tf-surface)!important;box-shadow:0 8px 24px rgba(0,0,0,.17)!important}
.tafseer-v15 .tf197-reading-placeholder{height:0;min-height:0}
.tafseer-v15 .tafseer-reading-controls--top>div:not(.tf197-ayah-menu){display:flex!important;flex:1 1 0!important;min-width:0;gap:4px!important;padding:2px 1px!important;align-items:center;justify-content:center}
.tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{font-size:.84rem!important}
.tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{font-size:1.2rem!important;min-height:38px!important;height:38px!important;flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important}
.tafseer-v15 .tafseer-reading-controls--top>div>.tafseer-font-percent{min-height:38px!important;height:38px!important;min-width:39px!important;font-size:.84rem!important}
.tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{position:static!important;flex:0 0 auto!important;width:auto!important;min-width:53px!important;height:38px!important;min-height:38px!important;font-size:.87rem!important;grid-column:auto!important}
.tafseer-v15 .tf197-ayah-menu{position:relative!important;flex:0 0 auto!important;margin-inline-start:auto;min-width:40px!important;padding:0!important;border:0!important;background:transparent!important}
.tafseer-v15 .tf197-more-btn{display:grid;place-items:center;min-width:39px;min-height:39px;padding:0 7px;border:1px solid var(--tf-border);border-radius:10px;background:var(--tf-surface-soft);color:var(--tf-text);font-size:1.2rem;font-weight:900;cursor:pointer}
.tafseer-v15 .tf197-ayah-extra{position:absolute;left:0;right:auto;top:calc(100% + 7px);z-index:48;width:min(280px,85vw);display:grid;gap:7px;padding:10px;border:1px solid var(--tf-border);border-radius:14px;background:var(--tf-surface);color:var(--tf-text);box-shadow:0 12px 32px rgba(0,0,0,.18)}
.tafseer-v15 .tf197-ayah-extra[hidden]{display:none!important}
.tafseer-v15 .tf197-ayah-extra button{border:1px solid var(--tf-border);border-radius:10px;min-height:42px;padding:7px 11px;text-align:right;background:var(--tf-surface-soft);color:var(--tf-text);font:inherit;font-weight:750;cursor:pointer}
body.tafseer-focus-mode .tafseer-v15 .tafseer-reading-controls--top{display:flex!important;width:100%!important}
body.tafseer-focus-mode .tafseer-v15 .tafseer-reading-controls--top.tf197-is-pinned{width:var(--tf197-width,100%)!important;position:fixed!important;top:var(--tf197-top,0px)!important;left:var(--tf197-left,0px)!important}
@media(max-width:640px){
 .tafseer-v15 .tafseer-reading-controls--top{gap:3px!important;padding:4px 3px!important}
 .tafseer-v15 .tafseer-reading-controls--top>div:not(.tf197-ayah-menu){gap:3px!important}
 .tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{font-size:.74rem!important}
 .tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{flex-basis:30px!important;min-width:30px!important;width:30px!important;max-width:30px!important;font-size:1.22rem!important}
 .tafseer-v15 .tafseer-reading-controls--top>div>.tafseer-font-percent{min-width:35px!important;max-width:40px!important;padding:2px!important;font-size:.75rem!important}
 .tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{min-width:48px!important;font-size:.77rem!important;padding:3px 4px!important}
 .tafseer-v15 .tf197-ayah-menu{min-width:35px!important}
 .tafseer-v15 .tf197-more-btn{min-width:35px;min-height:39px}
}
@media(max-width:380px){
 .tafseer-v15 .tafseer-reading-controls--top{gap:2px!important}
 .tafseer-v15 .tafseer-reading-controls--top>div:not(.tf197-ayah-menu){gap:1px!important}
 .tafseer-v15 .tafseer-reading-controls--top>div>span:first-child{font-size:.68rem!important}
 .tafseer-v15 .tafseer-reading-controls--top>div button[data-font]{flex-basis:26px!important;width:26px!important;min-width:26px!important;max-width:26px!important;font-size:1.18rem!important}
 .tafseer-v15 .tafseer-reading-controls--top>div>.tafseer-font-percent{min-width:31px!important;max-width:33px!important;font-size:.69rem!important}
 .tafseer-v15 .tafseer-reading-controls--top>[data-focus-mode]{min-width:43px!important;font-size:.72rem!important;padding-inline:2px!important}
 .tafseer-v15 .tf197-ayah-menu{min-width:32px!important}
 .tafseer-v15 .tf197-more-btn{min-width:32px;padding:0 4px}
}

/* Requested only: search magnifier sits at the visual left of the search field. */
.tf196-source-home .tafseer-surah-toolbar .tafseer-search{background-position:left 9px center!important;padding-left:32px!important;padding-right:10px!important}

/* Make every option in the compact tools popup a full-width tap target. */
.tafseer-v15 .tafseer-reading-controls--top .tf197-ayah-extra button:not(.tafseer-action){
 display:block!important;width:100%!important;max-width:none!important;min-width:0!important;height:auto!important;min-height:42px!important;
 padding:9px 12px!important;text-align:right!important;white-space:normal!important;overflow-wrap:break-word!important;font-size:.89rem!important;
}
