/* Gematrixx V79 — final critical layer. Must be loaded LAST. */

/* Quran: First letter × Last letter matrix.
   Keep a readable width on phones and allow only modest local horizontal scrolling. */
@media (max-width:820px){
  #pageQuran .qoc-matrix-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:thin!important;
    padding:0 0 .25rem!important;
    box-sizing:border-box!important;
  }
  #pageQuran .qoc-matrix{
    width:480px!important;
    min-width:480px!important;
    max-width:none!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    direction:rtl!important;
  }
  #pageQuran .qoc-matrix th,
  #pageQuran .qoc-matrix td{
    min-width:0!important;
    max-width:none!important;
    padding:.38rem .12rem!important;
    font-size:.68rem!important;
    line-height:1.25!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    box-sizing:border-box!important;
  }
  #pageQuran .qoc-matrix tr > th:first-child{
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    position:sticky!important;
    right:0!important;
    z-index:4!important;
    padding-inline:.08rem!important;
  }
  #pageQuran .qoc-matrix tr > th:last-child{
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
  }
  #pageQuran .qoc-matrix thead th{top:0!important;z-index:3!important}
  #pageQuran .qoc-matrix thead tr > th:first-child{font-size:0!important;white-space:normal!important}
  #pageQuran .qoc-matrix thead tr > th:first-child::after{
    content:"ب↓\Aن←";white-space:pre;display:block;font-size:.64rem;line-height:1.05;color:var(--gold2)
  }
  #pageQuran .qoc-matrix tfoot tr > th:first-child{font-size:0!important}
  #pageQuran .qoc-matrix tfoot tr > th:first-child::after{content:"Σ";display:block;font-size:.76rem;color:var(--gold)}
}
@media (min-width:481px) and (max-width:820px){
  #pageQuran .qoc-matrix{width:100%!important;min-width:480px!important}
}

/* Tree of Life: guarantee that nodes are physically clickable and detail card is visible. */
#pageTreeOfLife .tol81-svg{pointer-events:auto!important}
#pageTreeOfLife .tol81-node[data-seph]{pointer-events:all!important;cursor:pointer!important}
#pageTreeOfLife .tol81-node[data-seph] circle{pointer-events:all!important;cursor:pointer!important}
#pageTreeOfLife .tol81-node[data-seph] text{pointer-events:none!important}
#pageTreeOfLife .pillar-zone,#pageTreeOfLife .pillar-zones{pointer-events:none!important}
#pageTreeOfLife #tol81Detail{display:block!important;visibility:visible!important;opacity:1!important;max-height:none!important;overflow:visible!important}
@media(max-width:980px){
  #pageTreeOfLife #tol81Detail{position:static!important;min-height:0!important;width:100%!important;box-sizing:border-box!important}
}
