/* ==========================================================================
   TACE16-Font
   Uses TACE16-Font ONLY for Private Use Area (PUA) characters.
   All other Unicode characters continue to use the normal fonts.
   ========================================================================== */

@font-face {
    font-family: "TAC-Barathi";
    src: url("TAC-Barathi.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    unicode-range: U+E100 – U+E38D;
    font-display: swap;
}

/* ==========================================================================
   Common Font Stacks
   Define them once and reuse everywhere.
   ========================================================================== */

:root {

    /* Normal book text */
    --book-font:
        "TAC-Barathi",
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif;

    /* Source code */
    --code-font:
        "TAC-Barathi",
        Consolas,
        "Liberation Mono",
        Menlo,
        Courier,
        monospace;
}

/* ==========================================================================
   Main Book Content
   ========================================================================== */

.book .markdown-section {
    font-family: var(--book-font);
}

.book .markdown-section
:is(
    p,
    ul,
    ol,
    li,
    dl,
    dt,
    dd,
    blockquote,
    span,
    strong,
    em,
    a,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    table,
    thead,
    tbody,
    tfoot,
    tr,
    th,
    td,
    caption
) {
    font-family: inherit;
}

/* ==========================================================================
   Inline Code (`...`)
   ========================================================================== */

.book .markdown-section :not(pre) > code {
    font-family: var(--code-font);
}

/* ==========================================================================
   Fenced Code Blocks (```...```)
   Keep code monospace while allowing TACE16-Font for PUA identifiers.
   ========================================================================== */

.book .markdown-section pre,
.book .markdown-section pre code,
.book .markdown-section pre *,
.book .markdown-section .highlight,
.book .markdown-section .highlight pre,
.book .markdown-section .highlight code,
.book .markdown-section .hljs,
.book .markdown-section .hljs * {

    font-family: var(--code-font) !important;

    /* Recommended enhancement */
    font-variant-ligatures: contextual;
}

/* ==========================================================================
   Left Sidebar (Table of Contents)
   ========================================================================== */

.book .book-summary {
    font-family: var(--book-font);
}

.book .book-summary ul,
.book .book-summary li,
.book .book-summary a,
.book .book-summary span,
.book .book-summary b,
.book .book-summary strong {
    font-family: inherit !important;
}

/* ==========================================================================
   Header Title
   (Visible when the sidebar is collapsed)
   ========================================================================== */

.book-header h1,
.book-header h1 a {
    font-family: var(--book-font) !important;
}

/* ==========================================================================
   Previous / Next Navigation
   ========================================================================== */

.book .navigation,
.book .navigation a,
.book .navigation span {
    font-family: var(--book-font);
}

/* ==========================================================================
   Search Results
   ========================================================================== */

.search-results,
.search-results p,
.search-results li,
.search-results a,
.search-results span,
.book-search-results,
.book-search-results * {
    font-family: var(--book-font);
}

/* ==========================================================================
   Preserve Font Awesome Icons
   VERY IMPORTANT:
   Without this, the toolbar icons disappear because they would use
   TACE16-Font instead of FontAwesome.
   ========================================================================== */

.fa,
.fas,
.far,
.fab,
[class^="fa-"],
[class*=" fa-"],
.fa::before,
.fa::after {
    font-family: FontAwesome !important;
}