/* The docs in n0te's look: its reading face, and the two palettes the front
   page opens in. Light is Rosé Pine (dawn), dark ("Coal" in the picker) is
   Tokyo Night, Omarchy's default; both derived as n0te derives its colors.
   mdBook's other themes are hidden from the picker. */

@font-face { font-family: "Quattro"; src: url("/fonts/iAWriterQuattroS-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Quattro"; src: url("/fonts/iAWriterQuattroS-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Quattro"; src: url("/fonts/iAWriterQuattroS-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Quattro"; src: url("/fonts/iAWriterQuattroS-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
    --mono-font: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --code-font-size: 0.84em;
    --content-max-width: 760px;
    --sidebar-target-width: 280px;
}

.light, html:not(.js) {
    --bg: #faf4ed;
    --fg: #575279;
    --heading: #575279;
    --dim: #857f99;
    --rule: #e2dcdc;
    --accent: #56949f;

    --sidebar-bg: #f3ede8;
    --sidebar-fg: #575279;
    --sidebar-non-existant: #a29dae;
    --sidebar-active: #286983;
    --sidebar-spacer: #e2dcdc;
    --sidebar-header-border-color: #56949f;
    --scrollbar: #a29dae;
    --icons: #857f99;
    --icons-hover: #575279;
    --links: #286983;
    --inline-code-color: #575279;
    --theme-popup-bg: #f3ede8;
    --theme-popup-border: #e2dcdc;
    --theme-hover: #ebe5e3;
    --quote-bg: #f3ede8;
    --quote-border: #e2dcdc;
    --table-border-color: #e2dcdc;
    --table-header-bg: #ebe5e3;
    --table-alternate-bg: #f6f0ea;
    --searchbar-border-color: #e2dcdc;
    --searchbar-bg: #fffaf3;
    --searchbar-fg: #575279;
    --searchbar-shadow-color: #dfdad9;
    --searchresults-header-fg: #857f99;
    --searchresults-border-color: #e2dcdc;
    --searchresults-li-bg: #f3ede8;
    --search-mark-bg: #f2d9b5;
    --footnote-highlight: #56949f;
    --overlay-bg: rgba(87, 82, 121, 0.15);
    --blockquote-note-color: #286983;
    --blockquote-tip-color: #56949f;
    --blockquote-important-color: #907aa9;
    --blockquote-warning-color: #c07a1c;
    --blockquote-caution-color: #b4637a;
}

.coal {
    --bg: #1a1b26;
    --fg: #a9b1d6;
    --heading: #c0caf5;
    --dim: #8187a5;
    --rule: #2f3240;
    --accent: #7aa2f7;

    --sidebar-bg: #16161e;
    --sidebar-fg: #a9b1d6;
    --sidebar-non-existant: #676c85;
    --sidebar-active: #7aa2f7;
    --sidebar-spacer: #2f3240;
    --sidebar-header-border-color: #7aa2f7;
    --scrollbar: #414868;
    --icons: #676c85;
    --icons-hover: #c0caf5;
    --links: #7aa2f7;
    --inline-code-color: #c0caf5;
    --theme-popup-bg: #24283b;
    --theme-popup-border: #2f3240;
    --theme-hover: #292e42;
    --quote-bg: #20222e;
    --quote-border: #2f3240;
    --table-border-color: #2f3240;
    --table-header-bg: #24283b;
    --table-alternate-bg: #1d1e2a;
    --searchbar-border-color: #2f3240;
    --searchbar-bg: #24283b;
    --searchbar-fg: #c0caf5;
    --searchbar-shadow-color: #13141c;
    --searchresults-header-fg: #8187a5;
    --searchresults-border-color: #2f3240;
    --searchresults-li-bg: #20222e;
    --search-mark-bg: #3d59a1;
    --footnote-highlight: #7aa2f7;
    --overlay-bg: rgba(10, 10, 16, 0.5);
    --blockquote-note-color: #7aa2f7;
    --blockquote-tip-color: #449dab;
    --blockquote-important-color: #ad8ee6;
    --blockquote-warning-color: #e0af68;
    --blockquote-caution-color: #f7768e;
}

/* Only Auto, Light and Coal in the picker. */
#mdbook-theme-list li:has(#mdbook-theme-rust),
#mdbook-theme-list li:has(#mdbook-theme-navy),
#mdbook-theme-list li:has(#mdbook-theme-ayu) { display: none; }

html { font-family: "Quattro", "iA Writer Quattro S", "IBM Plex Sans", system-ui, sans-serif; }
body { font-size: 1.7rem; line-height: 1.65; }
.content main { font-kerning: normal; }
.content h1, .content h2, .content h3, .content h4 { color: var(--heading); font-weight: 700; line-height: 1.25; }
.content h1 { font-size: 2.1em; margin-top: 0.6em; }
.content h2 { font-size: 1.45em; margin-top: 2em; padding-bottom: 0.25em; border-bottom: 1px solid var(--rule); }
.content h3 { font-size: 1.15em; margin-top: 1.6em; }
.content a, .content a:link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.content a:hover { color: var(--links); }
.content h1 a.header, .content h2 a.header, .content h3 a.header, .content h4 a.header { color: var(--heading); text-decoration: none; }
.content code { color: var(--inline-code-color); }
.content :not(pre) > code { background: var(--quote-bg); padding: 0.1em 0.35em; border-radius: 4px; }
.content pre > code { border-radius: 8px; }
pre { border: 1px solid var(--rule); border-radius: 8px; }

table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
table thead th { text-align: left; color: var(--heading); }
table td:first-child, table th:first-child { white-space: nowrap; }
table td, table th { padding: 0.45em 0.8em; vertical-align: top; }

.sidebar { font-size: 0.92em; }
.sidebar .sidebar-scrollbox { padding-top: 14px; }
.chapter li.part-title { color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78em; font-weight: 700; margin-top: 1.4em; }
.chapter li a.active { color: var(--sidebar-active); font-weight: 700; }

.menu-title a { color: inherit; text-decoration: none; }
.menu-title a span { color: var(--accent); }

blockquote { border-radius: 6px; }
kbd { font-family: var(--mono-font); font-size: 0.8em; padding: 0.05em 0.4em; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; background: var(--quote-bg); color: var(--heading); }

/* Key tables have no header row; don't draw an empty one. */
table thead:not(:has(th:not(:empty))) { display: none; }
