/* Gematrixx V75 — scoped refinements requested 2026-08-08.
   1) Surah numeric filtering must survive mobile card CSS.
   2) Openings/endings matrix must remain complete and scrollable.
   3) Paleo-Hebrew mobile grid: max 3 cards/row.
   4) Number Properties desktop nth-term rows use three invisible alignment columns. */

/* ── Quran / Surah statistics numeric filter ───────────────────────────── */
#pageQuran #pg-surastats #ssTbody > tr.ss-filtered-out,#pageQuran #pg-surastats #ssTable.gmx74-card-table > tbody > tr.ss-filtered-out,#pageQuran #pg-surastats #ssTable.gmx-card-table > tbody > tr.ss-filtered-out{
  display:none!important;
}
#pageQuran #pg-surastats #ssTbody td.ss-glow{
  position:relative;
  z-index:1;
  color:#ffe27a!important;
  background:rgba(232,201,106,.15)!important;
  box-shadow:inset 0 0 0 1px rgba(232,201,106,.72),0 0 14px rgba(232,201,106,.28)!important;
  border-radius:6px;
}

/* ── Quran / final First-letter × Last-letter matrix ───────────────────── */
#pageQuran .qoc-matrix-wrap{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
  scrollbar-gutter:stable both-edges;
  padding-bottom:.2rem;
}
@media (min-width:821px){
  #pageQuran .qoc-matrix{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }
  #pageQuran .qoc-matrix th,#pageQuran .qoc-matrix td{
    min-width:0!important;
    padding:.38rem .2rem!important;
    overflow:visible!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
  }
  #pageQuran .qoc-matrix tr > th:first-child{width:138px!important}
  #pageQuran .qoc-matrix tr > th:last-child{width:58px!important}
}
@media (max-width:820px){
  #pageQuran .qoc-matrix-wrap{
    direction:rtl!important;
    border-radius:10px!important;
  }
  #pageQuran .qoc-matrix{
    width:max-content!important;
    min-width:760px!important;
    max-width:none!important;
    table-layout:auto!important;
    direction:rtl!important;
  }
  #pageQuran .qoc-matrix th,#pageQuran .qoc-matrix td{
    min-width:38px!important;
    padding:.38rem .42rem!important;
    white-space:nowrap!important;
  }
  #pageQuran .qoc-matrix thead th{
    position:sticky;
    top:0;
    z-index:3;
  }
  #pageQuran .qoc-matrix tr > th:first-child{
    position:sticky;
    right:0;
    z-index:4;
    min-width:112px!important;
  }
}

/* ── Paleo-Hebrew symbolism: three cards per row on normal phones ──────── */
@media (max-width:820px) and (min-width:341px){
  #pagePaleo .grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:.5rem!important;
    padding:.8rem 0!important;
    width:100%!important;
    max-width:100%!important;
  }
  #pagePaleo .card{
    min-width:0!important;
    padding:.72rem .28rem .65rem!important;
  }
  #pagePaleo .card-proto{width:42px!important;height:42px!important;margin-bottom:.35rem!important}
  #pagePaleo .card-paleo{font-size:2.35rem!important;margin-bottom:.4rem!important}
  #pagePaleo .card-name,#pagePaleo .card-name-ar{font-size:.8rem!important}
  #pagePaleo .card-picture,#pagePaleo .card-picture-ar,#pagePaleo .card-meaning,#pagePaleo .card-meaning-ar{font-size:.7rem!important;line-height:1.4!important}
}
@media (max-width:340px){
  #pagePaleo .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ── Number Properties: invisible 3-column alignment on desktop ────────── */


