/* =======================================================================
   H10 ERP v1.15.45 · Independent typography (scoped; no public-site change)
   From the earlier Hangar10 Home: DM Sans / Space Grotesk / JetBrains Mono.
   The font faces are requested only on ERP pages by the portal PHP enqueues.
   Do not use the theme's body/heading font settings or globally style <body>.
   Do not override icon-font classes, SVGs, or WordPress editor UI.
   ======================================================================= */

body.h10-admin-portal-page .h10ap,
body.h10-instructor-portal-page .h10ip {
  --h10erp-body: "DM Sans", Arial, sans-serif;
  --h10erp-display: "Space Grotesk", "DM Sans", Arial, sans-serif;
  --h10erp-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --body: var(--h10erp-body);
  --display: var(--h10erp-display);
  --mono: var(--h10erp-mono);
  --h10-body: var(--h10erp-body);
  --h10-display: var(--h10erp-display);
  --h10-mono: var(--h10erp-mono);
  font-family: var(--h10erp-body) !important;
}

/* Explicit family on text/controls prevents Divi and other website-wide
   selectors (including legacy module inline CSS) changing the ERP typography.
   Icons retain their font-family; SVG artwork is never touched. */
body.h10-admin-portal-page .h10ap :is(
  div, p, span, a, label, small, strong, b, em, li, ul, ol, dl, dt, dd,
  blockquote, table, thead, tbody, tfoot, tr, th, td, button, input,
  select, option, optgroup, textarea, summary, legend
):not(:is(
  .fa, .fas, .far, .fab, .fal, .fad, .dashicons, .material-icons,
  .mce-ico, .mce-i, .ui-icon, .wp-menu-image, .et-pb-icon,
  [class^="fa-"], [class*=" fa-"], [class^="dashicons-"],
  [class^="eicon-"], [class*=" eicon-"]
)),
body.h10-instructor-portal-page .h10ip :is(
  div, p, span, a, label, small, strong, b, em, li, ul, ol, dl, dt, dd,
  blockquote, table, thead, tbody, tfoot, tr, th, td, button, input,
  select, option, optgroup, textarea, summary, legend
):not(:is(
  .fa, .fas, .far, .fab, .fal, .fad, .dashicons, .material-icons,
  .mce-ico, .mce-i, .ui-icon, .wp-menu-image, .et-pb-icon,
  [class^="fa-"], [class*=" fa-"], [class^="dashicons-"],
  [class^="eicon-"], [class*=" eicon-"]
)) {
  font-family: var(--h10erp-body) !important;
}

/* Headlines use Space Grotesk as in the previous Home. */
body.h10-admin-portal-page .h10ap :is(h1,h2,h3,h4,h5,h6),
body.h10-instructor-portal-page .h10ip :is(h1,h2,h3,h4,h5,h6),
body.h10-admin-portal-page .h10ap :is(.h10ap-brand strong, .h10ap-mobile-brand strong),
body.h10-instructor-portal-page .h10ip :is(.h10ip-brand strong, .h10ip-mobile-brand strong) {
  font-family: var(--h10erp-display) !important;
}

/* Monospaced tokens, references and technical identifiers. */
body.h10-admin-portal-page .h10ap :is(code, pre, kbd, samp, .h10ap-eyebrow, .h10ap-side-label, .h10ap-version, .h10ap-brand small, .h10ap-mobile-brand small),
body.h10-instructor-portal-page .h10ip :is(code, pre, kbd, samp, .h10ip-eyebrow, .h10ip-version, .h10ip-brand small, .h10ip-mobile-brand small) {
  font-family: var(--h10erp-mono) !important;
}

/* Some modal layers are intentionally portaled directly under <body>, outside
   the .h10ap/.h10ip root. Restrict styling to those ERP modal classes. */
body.h10-admin-portal-page :is(.h10ap-confirm-modal, .h10ap-livechange-overlay, .h10doc-preview-modal),
body.h10-instructor-portal-page :is(
  .h10isc-modal, .h10isc-incident-modal, .h10isc-incident-overlay,
  .h10ip-circular-live-dialog, .h10doc-preview-modal
) {
  --h10erp-body: "DM Sans", Arial, sans-serif;
  --h10erp-display: "Space Grotesk", "DM Sans", Arial, sans-serif;
  --h10erp-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --body: var(--h10erp-body);
  --display: var(--h10erp-display);
  --mono: var(--h10erp-mono);
  font-family: var(--h10erp-body) !important;
}
body.h10-admin-portal-page :is(.h10ap-confirm-modal, .h10ap-livechange-overlay, .h10doc-preview-modal) :is(button, input, select, textarea, p, span, label, strong, small),
body.h10-instructor-portal-page :is(.h10isc-modal, .h10isc-incident-modal, .h10ip-circular-live-dialog, .h10doc-preview-modal) :is(button, input, select, textarea, p, span, label, strong, small) {
  font-family: var(--h10erp-body) !important;
}
body.h10-admin-portal-page :is(.h10ap-confirm-modal, .h10ap-livechange-overlay, .h10doc-preview-modal) :is(h1,h2,h3,h4,h5,h6),
body.h10-instructor-portal-page :is(.h10isc-modal, .h10isc-incident-modal, .h10ip-circular-live-dialog, .h10doc-preview-modal) :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--h10erp-display) !important;
}

/* Full-page ERP embed documents (standalone legacy shortcodes rendered in
   portal iframes) do not necessarily contain .h10ap or .h10ip wrappers. */
body.h10-admin-portal-embed-page,
body.h10-instructor-portal-embed-page {
  --h10erp-body: "DM Sans", Arial, sans-serif;
  --h10erp-display: "Space Grotesk", "DM Sans", Arial, sans-serif;
  --h10erp-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --body: var(--h10erp-body);
  --display: var(--h10erp-display);
  --mono: var(--h10erp-mono);
  font-family: var(--h10erp-body) !important;
}
body.h10-admin-portal-embed-page :is(p,a,div,span,label,small,strong,li,th,td,button,input,select,textarea):not(:is(.fa,.fas,.far,.fab,.dashicons,.mce-ico,.et-pb-icon,[class^="fa-"],[class*=" fa-"])),
body.h10-instructor-portal-embed-page :is(p,a,div,span,label,small,strong,li,th,td,button,input,select,textarea):not(:is(.fa,.fas,.far,.fab,.dashicons,.mce-ico,.et-pb-icon,[class^="fa-"],[class*=" fa-"])) {
  font-family: var(--h10erp-body) !important;
}
body.h10-admin-portal-embed-page :is(h1,h2,h3,h4,h5,h6),
body.h10-instructor-portal-embed-page :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--h10erp-display) !important;
}

/* Divi embeds some legacy styles with an ID selector. This raises precedence
   without using an unscoped rule or changing layout/touch/scroll behavior. */
body.h10-admin-portal-page #page-container .h10ap :is(div,p,span,a,label,small,strong,b,em,li,th,td,button,input,select,option,textarea):not(:is(.fa,.fas,.far,.fab,.fal,.fad,.dashicons,.material-icons,.mce-ico,.et-pb-icon,[class^="fa-"],[class*=" fa-"])),
body.h10-instructor-portal-page #page-container .h10ip :is(div,p,span,a,label,small,strong,b,em,li,th,td,button,input,select,option,textarea):not(:is(.fa,.fas,.far,.fab,.fal,.fad,.dashicons,.material-icons,.mce-ico,.et-pb-icon,[class^="fa-"],[class*=" fa-"])) {
  font-family: var(--h10erp-body) !important;
}
body.h10-admin-portal-page #page-container .h10ap :is(h1,h2,h3,h4,h5,h6),
body.h10-instructor-portal-page #page-container .h10ip :is(h1,h2,h3,h4,h5,h6),
body.h10-admin-portal-page #page-container .h10ap :is(.h10ap-brand strong,.h10ap-mobile-brand strong),
body.h10-instructor-portal-page #page-container .h10ip :is(.h10ip-brand strong,.h10ip-mobile-brand strong) {
  font-family: var(--h10erp-display) !important;
}
body.h10-admin-portal-page #page-container .h10ap :is(code,pre,kbd,samp,.h10ap-eyebrow,.h10ap-side-label,.h10ap-version,.h10ap-brand small,.h10ap-mobile-brand small),
body.h10-instructor-portal-page #page-container .h10ip :is(code,pre,kbd,samp,.h10ip-eyebrow,.h10ip-version,.h10ip-brand small,.h10ip-mobile-brand small) {
  font-family: var(--h10erp-mono) !important;
}
