/*
 * Symbolism typography unification v1
 * All readable text in symbolism pages follows the site's live --font-main choice.
 * Only script/glyph specimens keep specialist Unicode fonts so ancient/non-Arabic
 * characters remain legible and historically distinguishable.
 */
:is(
  #pageNumsym,
  #pagePaleo,
  #pagePhoenician,
  #pageLettersSecrets,
  #pageEnglishLetters,
  #pageGreekLetters,
  #pageChineseLetters,
  #pageHieroglyphics
){
  font-family:var(--font-main) !important;
}

/* Readable UI/content: headings, labels, prose, cards, controls and navigation. */
:is(
  #pageNumsym,
  #pagePaleo,
  #pagePhoenician,
  #pageLettersSecrets,
  #pageEnglishLetters,
  #pageGreekLetters,
  #pageChineseLetters,
  #pageHieroglyphics
) :is(
  h1,h2,h3,h4,h5,h6,p,div,span,strong,b,small,em,i,label,
  button,input,select,option,textarea,a,li,dt,dd,th,td,summary
){
  font-family:var(--font-main) !important;
}

/* Shared reference-atlas blocks must also track the selected font. */
.sym-ref-atlas,
.sym-ref-atlas *,
.sym-ref-intro,
.sym-ref-layer,
.sym-ref-source,
.sym-evidence-row,
.sym-evidence-row *{
  font-family:var(--font-main) !important;
}

/* Hebrew/Paleo-Hebrew: the interface changes font; the actual specimens retain
   the script fonts required for correct glyph coverage. */
#pagePaleo :is(.card-paleo,.modal-paleo){
  font-family:'NotoPhoenician',serif !important;
}
#pagePaleo .script-hb{
  font-family:'NotoHebrew',serif !important;
}
#pagePaleo .script-ar{
  font-family:'NotoAramaic',serif !important;
}

/* Phoenician glyph specimens only. */
#pagePhoenician .card-paleo,
#pagePhoenician [style*="NotoPhoenician"]{
  font-family:'NotoPhoenician',serif !important;
}

/* Chinese ideographs: retain CJK glyph coverage only on character specimens. */
#pageChineseLetters :is(.cn-char,.cn-panel-char,.cn-compare-char){
  font-family:'Noto Sans CJK SC','Microsoft YaHei','PingFang SC',sans-serif !important;
}

/* Egyptian hieroglyph specimens only. */
#pageHieroglyphics :is(
  .hg-glyph,.hg-detail-glyph,.hg-compare-glyph,.hg-related b,.hg-builder-output,
  .hg-groups em
){
  font-family:'Segoe UI Historic','Noto Sans Egyptian Hieroglyphs','Aegyptus',serif !important;
}

/* Latin/Greek/Arabic symbol specimens remain visually prominent but no longer
   force Georgia/Amiri. They inherit the user's chosen font where glyph coverage
   exists; the browser falls back only for unsupported code points. */
#pageEnglishLetters :is(.el-char,.el-big),
#pageGreekLetters .card,
#pageLettersSecrets :is(.ls-letter,.ls-glyph){
  font-family:var(--font-main) !important;
}
