/* Aptos — the app-wide default font. Self-hosted because browsers cannot use Office's
   cloud-delivered copy, so a bare font-family name would silently fall back for nearly
   every visitor. Mirrors the dyslexia.css override pattern; scoped to
   body:not(.dyslexia-font) so the Settings > Accessibility OpenDyslexic toggle still
   wins when enabled. */

@font-face {
    font-family: 'Aptos';
    src: url('../fonts/aptos.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aptos';
    src: url('../fonts/aptos-bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aptos';
    src: url('../fonts/aptos-italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Aptos';
    src: url('../fonts/aptos-bold-italic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

/* !important required: Syncfusion sets an explicit font-family on .e-control/.e-input,
   and the UI module sets 'Inter' on home/blog — body-level cascade doesn't reach them.
   Targets elements only, so ::before glyph rules that declare their own font-family
   (bootstrap-icons, Syncfusion glyphs) keep working. */
body:not(.dyslexia-font),
body:not(.dyslexia-font) * {
    font-family: 'Aptos', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* Syncfusion puts font-family:'e-icons' on the element (its ::before inherits it), so the
   blanket rule above would garble grid/dropdown/datepicker icons without this. The extra
   selectors are the bootstrap5-theme icon elements that don't carry .e-icons. */
body:not(.dyslexia-font) .e-icons,
body:not(.dyslexia-font) .e-icons::before,
body:not(.dyslexia-font) .e-btn-icon::before,
body:not(.dyslexia-font) .e-checkbox-wrapper .e-frame,
body:not(.dyslexia-font) .e-multi-select-wrapper .e-chips-close,
body:not(.dyslexia-font) .e-slider-container .e-button-icon,
body:not(.dyslexia-font) .e-chip-list .e-chip .trailing-icon-url,
body:not(.dyslexia-font) .e-tooltip-wrap .e-arrow-tip-inner {
    font-family: 'e-icons' !important;
}

/* Defensive — the CDN bootstrap-icons css already !importants its ::before. */
body:not(.dyslexia-font) .bi,
body:not(.dyslexia-font) .bi::before,
body:not(.dyslexia-font) [class^="bi-"]::before,
body:not(.dyslexia-font) [class*=" bi-"]::before {
    font-family: 'bootstrap-icons' !important;
}

/* The typed e-signature renders a signature, not UI text — keep its script face. */
body:not(.dyslexia-font) .sig-typed-script {
    font-family: 'Brush Script MT', cursive !important;
}
