/* Same fonts as the former GitBook site: Roboto text and headings, IBM Plex Mono code (both SIL OFL). */
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap");

/* Palette from espressosys.com: Coffee #451f17, Cookie #b67237, Caramel #de9e67, Cream #fff7ef, Peach #fcebde.
   Light links use a darkened Cookie (#9a5a26, 5.1:1 on Cream); Cookie itself is 3.6:1 and fails WCAG AA. */
:root {
  --esp-header: #451f17;
  --mono-font: "IBM Plex Mono", monospace;
  --content-max-width: 70ch;
}

.light {
  --esp-primary: #9a5a26;
  --esp-heading: #451f17;
  --esp-header: #b67237;
  --bg: #fff7ef;
  --fg: #2a1712;
  --links: var(--esp-primary);
  --icons: #7a6058;
  --icons-hover: #451f17;
  --inline-code-color: #451f17;
  --sidebar-bg: #fcebde;
  --sidebar-fg: #451f17;
  --sidebar-active: var(--esp-primary);
  --sidebar-non-existant: #b39a8e;
  --sidebar-spacer: #f0d6c2;
  --sidebar-header-border-color: var(--esp-primary);
  --scrollbar: #c9a58a;
  --quote-bg: #fcebde;
  --quote-border: #f0d6c2;
  --table-header-bg: #f8dfcb;
  --table-alternate-bg: #fdf1e6;
  --table-border-color: #efd5c0;
  --searchbar-border-color: #d9b598;
  --search-mark-bg: #f3c9a3;
  --theme-popup-bg: #fff7ef;
  --theme-popup-border: #efd5c0;
  --theme-hover: #fcebde;
}

/* Default dark theme ("coal") recolored as espresso: Coffee-black surfaces, Caramel accents */
.coal {
  --esp-primary: #de9e67;
  --esp-heading: #fcebde;
  --bg: #1c0b07;
  --fg: #e6d5ca;
  --links: var(--esp-primary);
  --icons: #8a6f64;
  --icons-hover: #fcebde;
  --inline-code-color: #f0dccf;
  --sidebar-bg: #270903;
  --sidebar-fg: #c9b4a8;
  --sidebar-active: var(--esp-primary);
  --sidebar-non-existant: #6b524a;
  --sidebar-spacer: #3a1d15;
  --sidebar-header-border-color: var(--esp-primary);
  --scrollbar: #6b524a;
  --quote-bg: #2e140e;
  --quote-border: #45231a;
  --table-header-bg: #451f17;
  --table-alternate-bg: #22100b;
  --table-border-color: #3a1d15;
  --search-mark-bg: #8a4f22;
  --theme-popup-bg: #270903;
  --theme-popup-border: #45231a;
  --theme-hover: #3a1d15;
}

.navy,
.ayu {
  --esp-primary: #de9e67;
  --esp-heading: var(--fg);
  --links: var(--esp-primary);
  --sidebar-active: var(--esp-primary);
}

.content h1,
.content h2,
.content h3 {
  color: var(--esp-heading);
}

html,
body {
  font-family: "Roboto", system-ui, sans-serif;
}
code,
pre,
kbd {
  font-family: var(--mono-font) !important;
}

/* GitBook "bold" header theme: brown bar, white logo */
#mdbook-menu-bar {
  background: var(--esp-header);
  color: #fff;
  border-bottom: none;
}
#mdbook-menu-bar .icon-button,
.menu-title {
  color: #fff;
}
.menu-title {
  font-size: 0;
  background: url("../assets/espresso-logo-white.png") center / contain no-repeat;
  height: 28px;
  margin: 10px 0;
}

/* Reading measure and rhythm follow Foundry's docs (Vocs): ~70ch lines, 1.625 line height */
.content main {
  font-size: 1.7rem;
}
.content p,
.content ol,
.content ul {
  line-height: 1.65em;
}
/* GitBook heading scale: h1 36px bold, h2 30px semibold, h3 semibold */
.content h1 {
  font-size: 2.1em;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1em;
}
.content h2 {
  font-size: 1.75em;
  font-weight: 600;
  border-top: 1px solid var(--table-border-color);
  padding-top: 1em;
}
.content h3 {
  font-weight: 600;
}
.page-description {
  font-size: 1.15em;
  color: var(--icons);
  margin-top: -0.5em;
}

.chapter li.part-title {
  color: var(--esp-primary);
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 0.06em;
  margin-top: 1.4em;
}
.chapter li a.active {
  font-weight: 500;
}

/* GitBook-style rounded cards for hints, code, tables, figures */
blockquote,
.blockquote-tag,
pre,
table,
figure img {
  border-radius: 8px;
}
.blockquote-tag {
  border-left-width: 4px;
}
table {
  display: table;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--table-border-color);
  overflow: hidden;
}
table td,
table th {
  border: none;
  border-top: 1px solid var(--table-border-color);
}
figure {
  margin: 1.5em 0;
  text-align: center;
}
figcaption {
  font-size: 0.85em;
  color: var(--icons);
}
.code-title {
  font-family: var(--mono-font);
  font-size: 0.85em;
  padding: 6px 12px;
  background: var(--table-header-bg);
  border-radius: 8px 8px 0 0;
  margin-bottom: -1em;
}
