/* Studies look for mdBook. theme/head.hbs loads this BEFORE mdBook's own CSS,
   so every override below uses a selector more specific than mdBook's. */

@font-face {
    font-family: "Almoni";
    src: url("almoni-neue-regular-aaa.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Almoni";
    src: url("almoni-neue-bold-aaa.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* Computers-site palette from studies-ultimate (main.scss: $site-cyan / $site-darker-cyan). */
:root.light, :root:not(.js) {
    --studies-main: #0BB4A7;
    --studies-dark: #099187;

    --fg: #37383f;
    --links: var(--studies-dark);
    --sidebar-active: var(--studies-dark);
    --sidebar-header-border-color: var(--studies-main);
    --quote-bg: #eefaf9;
    --quote-border: #c6eeea;
    --table-header-bg: #d4f1ee;
    --searchresults-li-bg: #e7f8f6;
    --search-mark-bg: #a8e6e1;
    --footnote-highlight: var(--studies-main);
}

html[dir] {
    font-family: "Almoni", "Open Sans", sans-serif;
}

/* Almoni runs small next to Open Sans. */
.content main {
    font-size: 1.2em;
}

/* Code reads left-to-right even inside Hebrew paragraphs. */
pre,
code {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}

/* Same for formulas: in an RTL page MathJax lays them out mirrored ("gcd" renders as "dcg"). */
.MathJax,
.MathJax_Display {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Course logo before the book title in the top bar. */
.menu-title::before {
    content: "";
    display: inline-block;
    width: 120px;
    height: 36px;
    margin-inline-end: 12px;
    vertical-align: middle;
    background: url("logo-computers.png") no-repeat center / contain;
}

.menu-bar {
    border-block-end: 3px solid var(--studies-main, #0BB4A7);
}
