/* Korrin theme for mdBook. Palette and type from branding/README.md.
   Overrides mdBook's built-in "light" and "navy" theme variables. */

html {
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.content h1,
.content h2,
.content h3,
.content h4,
.menu-title,
.sidebar .sidebar-scrollbox {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 500;
  letter-spacing: -0.01em;
}

code,
pre,
kbd,
.hljs {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- light ---------- */
.light {
  --bg: #f7f5ef;
  --fg: #181a1f;

  --sidebar-bg: #efece2;
  --sidebar-fg: #4a4842;
  --sidebar-non-existant: #b4b0a5;
  --sidebar-active: #2e6e5e;
  --sidebar-spacer: #e2ded3;

  --scrollbar: #c9c4b6;
  --icons: #8b8880;
  --icons-hover: #181a1f;

  --links: #1e4a3f;
  --inline-code-color: #7a3b1e;

  --theme-popup-bg: #f7f5ef;
  --theme-popup-border: #ddd8cb;
  --theme-hover: #e7e3d7;

  --quote-bg: #e3efea;
  --quote-border: #c6ded6;
  --warning-border: #ba7517;

  --table-border-color: #e3dfd4;
  --table-header-bg: #e7e3d7;
  --table-alternate-bg: #f1eee5;

  --searchbar-border-color: #c9c4b6;
  --searchbar-bg: #ffffff;
  --searchbar-fg: #181a1f;
  --searchbar-shadow-color: #c9c4b6;
  --searchresults-header-fg: #6b6862;
  --searchresults-border-color: #ddd8cb;
  --searchresults-li-bg: #e3efea;
  --search-mark-bg: #9bd0c3;

  --color-scheme: light;
}

/* ---------- dark (mdBook's "navy" slot) ---------- */
.navy {
  --bg: #121311;
  --fg: #eceae2;

  --sidebar-bg: #17181c;
  --sidebar-fg: #a9a59b;
  --sidebar-non-existant: #55534d;
  --sidebar-active: #63b7a3;
  --sidebar-spacer: #24251f;

  --scrollbar: #3a3b34;
  --icons: #7a776e;
  --icons-hover: #eceae2;

  --links: #a2d8cb;
  --inline-code-color: #e0a87f;

  --theme-popup-bg: #17181c;
  --theme-popup-border: #2b2c27;
  --theme-hover: #22231e;

  --quote-bg: #1b2925;
  --quote-border: #2c3f3a;
  --warning-border: #e0a87f;

  --table-border-color: #2b2c27;
  --table-header-bg: #22231e;
  --table-alternate-bg: #17181c;

  --searchbar-border-color: #2b2c27;
  --searchbar-bg: #17181c;
  --searchbar-fg: #eceae2;
  --searchbar-shadow-color: #000000;
  --searchresults-header-fg: #a9a59b;
  --searchresults-border-color: #2b2c27;
  --searchresults-li-bg: #1b2925;
  --search-mark-bg: #2e6e5e;

  --color-scheme: dark;
}

/* ---------- chrome ---------- */
.menu-bar {
  border-bottom: 1px solid var(--table-border-color);
}

.content h1 {
  font-size: 1.9rem;
}
.content h2 {
  font-size: 1.38rem;
  margin-top: 2.4rem;
}
.content h3 {
  font-size: 1.08rem;
}

.content pre,
.content pre > code {
  border-radius: 10px;
}

blockquote {
  border-inline-start-width: 3px;
  border-radius: 0;
}

.content a > code {
  color: var(--links);
}

.sidebar .sidebar-scrollbox {
  font-size: 0.86rem;
}
.chapter li.chapter-item a.active {
  font-weight: 500;
}

table th {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-weight: 500;
}
