/* AQIT docs: light-only, shadcn stone palette.
   https://ui.shadcn.com/colors (stone)
   stone-50 #fafaf9 · 100 #f5f5f4 · 200 #e7e5e4 · 300 #d6d3d1
   stone-400 #a8a29e · 500 #78716c · 600 #57534e · 700 #44403c
   stone-800 #292524 · 900 #1c1917 · 950 #0c0a09
*/

html {
    color-scheme: light;

    --primary-color: #292524;
    --primary-dark-color: #1c1917;
    --primary-light-color: #57534e;
    --primary-lighter-color: #78716c;
    --primary-lightest-color: #e7e5e4;
    --on-primary-color: #fafaf9;

    --link-color: #44403c;

    --page-background-color: #ffffff;
    --page-foreground-color: #1c1917;
    --page-secondary-foreground-color: #78716c;

    --separator-color: #e7e5e4;
    --odd-color: rgba(28, 25, 23, 0.03);

    --font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo,
        Consolas, "Liberation Mono", monospace;

    --border-radius-large: 10px;
    --border-radius-medium: 8px;
    --border-radius-small: 6px;
    --box-shadow: 0 1px 3px 0 rgb(28 25 23 / 0.06),
        0 1px 2px -1px rgb(28 25 23 / 0.06);

    --warning-color: #f5f5f4;
    --warning-color-dark: #a8a29e;
    --warning-color-darker: #44403c;
    --note-color: #f5f5f4;
    --note-color-dark: #57534e;
    --note-color-darker: #292524;
    --todo-color: #f5f5f4;
    --todo-color-dark: #57534e;
    --todo-color-darker: #292524;
    --deprecated-color: #f5f5f4;
    --deprecated-color-dark: #78716c;
    --deprecated-color-darker: #44403c;
    --bug-color: #fafaf9;
    --bug-color-dark: #78716c;
    --bug-color-darker: #1c1917;
    --invariant-color: #f5f5f4;
    --invariant-color-dark: #57534e;
    --invariant-color-darker: #292524;

    --blockquote-background: #fafaf9;
    --blockquote-foreground: #57534e;

    --tablehead-background: #f5f5f4;
    --tablehead-foreground: #1c1917;

    --on-primary-color: #fafaf9;
    --menu-focus-foreground: #fafaf9;
    --menu-focus-background: #292524;
    --menu-selected-background: #f5f5f4;

    --header-background: #ffffff;
    --header-foreground: #1c1917;

    --searchbar-background: #f5f5f4;
    --searchbar-foreground: #1c1917;

    --code-background: #f5f5f4;
    --code-foreground: #1c1917;

    --fragment-background: #fafaf9;
    --fragment-foreground: #292524;
    --fragment-keyword: #44403c;
    --fragment-keywordtype: #57534e;
    --fragment-keywordflow: #44403c;
    --fragment-token: #57534e;
    --fragment-comment: #a8a29e;
    --fragment-link: #44403c;
    --fragment-preprocessor: #57534e;
    --fragment-linenumber-color: #a8a29e;
    --fragment-linenumber-background: #f5f5f4;
    --fragment-linenumber-border: #e7e5e4;

    --side-nav-background: #fafaf9;
    --side-nav-foreground: #292524;
    --toc-background: #fafaf9;
    --toc-foreground: #292524;
}

/* Force light even if a dark-mode class leaks in. */
html.dark-mode,
html.dark {
    color-scheme: light;
    --primary-color: #292524;
    --primary-dark-color: #1c1917;
    --primary-light-color: #57534e;
    --page-background-color: #ffffff;
    --page-foreground-color: #1c1917;
    --page-secondary-foreground-color: #78716c;
    --separator-color: #e7e5e4;
    --side-nav-background: #fafaf9;
    --header-background: #ffffff;
    --code-background: #f5f5f4;
    --fragment-background: #fafaf9;
}

#dark-mode-toggle,
.darkmode_toggle,
#theme-toggle {
    display: none !important;
}

#projectname {
    letter-spacing: -0.02em;
    font-weight: 650;
    color: #1c1917;
}

#projectnumber {
    color: #78716c;
    font-weight: 500;
}

#projectbrief {
    display: none;
}

#MSearchBox {
    margin-bottom: 1.25rem;
}

@media screen and (min-width: 768px) {
    html {
        --top-height: 128px;
    }

    #main-nav {
        padding-bottom: 0.25rem;
    }

    /* Do not let a stale resize cookie shrink the tree to a sliver. */
    #side-nav {
        min-width: var(--side-nav-fixed-width) !important;
        width: var(--side-nav-fixed-width) !important;
    }

    #nav-tree {
        min-width: var(--side-nav-fixed-width);
        visibility: visible !important;
        opacity: 1 !important;
    }

    #doc-content {
        margin-left: var(--side-nav-fixed-width) !important;
    }
}

#titlearea {
    border-bottom: 1px solid #e7e5e4;
}

a, a:visited {
    color: var(--link-color);
}

a:hover {
    color: #1c1917;
}

div.contents table.markdownTable {
    width: 100%;
}

.github-corner {
    display: none;
}

#nav-path {
    background: #fafaf9;
    border-top: 1px solid #e7e5e4;
}

#nav-path li.footer {
    font-size: 12px;
    color: #78716c;
}

#nav-tree .selected {
    background: #f5f5f4 !important;
    color: #1c1917 !important;
}

#nav-tree .selected a {
    color: #1c1917 !important;
}

div.fragment,
div.line,
pre.fragment {
    border-color: #e7e5e4;
}
