/* vidi overlay for mdBook.

   Two jobs only: the colour palette for the light and navy themes, and a few
   readability tweaks. mdBook sets its theme as a class on <html>
   (.light / .navy / .coal / .ayu / .rust), so the palettes override per theme
   class rather than on :root. */

/* Fonts the reader already has. theme/fonts/fonts.css is empty on purpose, so
   no webfont is downloaded and nothing is fetched from a third party. */
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono-font: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

body,
.content p,
.content li,
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
}

.light {
  --bg: #eef4f8;
  --fg: #0d2438;
  --sidebar-bg: #0b1d33;
  --sidebar-fg: #c9dcec;
  --sidebar-non-existant: #5b7e9c;
  --sidebar-active: #38b0e8;
  --sidebar-spacer: #16304a;
  --links: #1c7aad;
  --inline-code-color: #123a63;
  --theme-popup-bg: #ffffff;
  --theme-popup-border: #d3e1ec;
  --theme-hover: #e8f0f8;
  --quote-bg: #f6fafd;
  --quote-border: #d3e1ec;
  --table-border-color: #d3e1ec;
  --table-header-bg: #e8f0f8;
  --table-alternate-bg: #f6fafd;
  --searchbar-border-color: #bcd2e4;
  --searchbar-bg: #ffffff;
  --searchbar-fg: #0d2438;
  --searchresults-header-fg: #3a5b76;
  --search-mark-bg: #9fdcf7;
}

.navy {
  --bg: #091522;
  --fg: #dde8f4;
  --sidebar-bg: #050e1a;
  --sidebar-fg: #a6bed4;
  --sidebar-non-existant: #46647e;
  --sidebar-active: #38b0e8;
  --sidebar-spacer: #16304a;
  --links: #5ec4f2;
  --inline-code-color: #a8c9e6;
  --theme-popup-bg: #102338;
  --theme-popup-border: #2a4d6f;
  --theme-hover: #16304a;
  --quote-bg: #0d1d2f;
  --quote-border: #2a4d6f;
  --table-border-color: #1e3a56;
  --table-header-bg: #16304a;
  --table-alternate-bg: #0d1d2f;
  --searchbar-border-color: #2a4d6f;
  --searchbar-bg: #102338;
  --searchbar-fg: #dde8f4;
  --searchresults-header-fg: #a6bed4;
  --search-mark-bg: #1c7aad;
}

/* Readability: mdBook's default measure runs wide on large displays. */
.content main { max-width: 46rem; }

/* Wide content scrolls inside its own container, never the page body. */
.content table { display: block; overflow-x: auto; max-width: 100%; }

/* Blockquotes carry the stub markers and the callouts. A plain box: one hairline
   border all the way round, no accent band, no rounded corners.
   Deliberately NOT a <div> wrapper: raw HTML in Markdown becomes its own
   reviewable unit (one for the opening tag, one for the closing tag, because
   CommonMark ends an HTML block at a blank line), so a styling wrapper would add
   two junk units to every page in the book. */
.content blockquote {
  border: 1px solid var(--quote-border);
  border-inline-start-width: 1px;
  background: var(--quote-bg);
  color: inherit;
  padding: 0.7rem 1.1rem;
  border-radius: 0;
}
