@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400..700;1,400..700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400..700;1,8..60,400..700&family=JetBrains+Mono:ital,wght@0,400;0,600;1,400&display=swap');
/* Book look shared by EPI-VN, SRMA-VN and R4HE-VN (Quân, 2026-10-28):
   text in black and white only; navy only for links and the tables of contents;
   the cover sits on the title page beside the opening text, like R4DS.
   Type (Quân, 2026-11-17), the same as quannk.com: text and interface in Source Sans 3,
   headings in Source Serif 4, code in JetBrains Mono. This file is the books' only source of fonts.
   The master copy is ~/Projects/book-covers/book-look.css; keep the three books identical. */
:root {
  --book-ink: #111111;
  --book-navy: #1B3358;
  --book-line: #e3e3e3;
  --book-soft: #f6f6f6;
  --highlight: #111111;   /* webexercises: question boxes and buttons */
  --book-font-text: "Source Sans 3", system-ui, sans-serif;
  --book-font-head: "Source Serif 4", Georgia, serif;
  --book-font-code: "JetBrains Mono", ui-monospace, Menlo, monospace;
  /* Bootstrap's own font variables, so every part of the page uses the same three faces */
  --bs-font-sans-serif: var(--book-font-text);
  --bs-body-font-family: var(--book-font-text);
  --bs-font-monospace: var(--book-font-code);
  --bs-body-line-height: 1.65;
}

/* Type. 17.5px Source Sans 3 has the x-height of Be Vietnam Pro at 16px. The theme sizes the sidebar,
   the tables of contents and the headings in rem, so they keep their proportions to the text.
   The theme sets the root size on :root through --bs-root-font-size, so the size goes there too. */
:root { --bs-root-font-size: 17.5px; font-size: 17.5px; }
body { font-family: var(--book-font-text); line-height: 1.65; }
h1, h2, h3, h4, .title { font-family: var(--book-font-head); font-weight: 600; }
code, pre, kbd, samp { font-family: var(--book-font-code); }
/* No ligatures in code: JetBrains Mono would draw R's <- as an arrow; code shows what the reader types */
code, pre { font-variant-ligatures: none; font-feature-settings: normal; }

body { color: var(--book-ink); }
h1, h2, h3, h4, h5, h6, .title, .subtitle, .quarto-title h1, .quarto-title-block .title,
.sidebar-title, .sidebar-title a, .quarto-secondary-nav-title { color: var(--book-ink) !important; }
h2 { display: flow-root; }   /* headings (and their rules) stop beside the floated cover */

/* Links */
a, a:visited { color: var(--book-navy); }
a:hover { color: var(--book-navy); text-decoration-thickness: 2px; }

/* Tables of contents: the chapter list (left) and "Trong bài" (right) */
.sidebar-navigation .sidebar-item-text, .sidebar-navigation .sidebar-link,
.sidebar-navigation .sidebar-item-section > .sidebar-item-container .sidebar-item-text,
#TOC .nav-link, nav[role="doc-toc"] .nav-link, #toc-title, .toc-actions a { color: var(--book-navy) !important; }
.sidebar-navigation .sidebar-link.active .sidebar-item-text,
.sidebar-navigation .sidebar-link.active, #TOC .nav-link.active, nav[role="doc-toc"] .nav-link.active {
  color: var(--book-navy) !important; font-weight: 700;
}
#TOC .nav-link.active, nav[role="doc-toc"] .nav-link.active { border-left-color: var(--book-navy) !important; }

/* Callouts: black rule, grey header, black title and icon */
.callout, .callout.callout-style-default { border-left-color: var(--book-ink) !important; }
.callout .callout-header { background-color: var(--book-soft) !important; }
.callout .callout-title-container, .callout .callout-title { color: var(--book-ink) !important; }
.callout .callout-icon::before { filter: grayscale(1) brightness(0.2) !important; }

/* Inline code: black on light grey */
p code:not(.sourceCode), li code:not(.sourceCode), td code:not(.sourceCode) {
  color: var(--book-ink); background-color: var(--book-soft);
}

/* Cover on the title page */
.book-cover {
  float: right; width: 250px; height: auto;
  margin: 0.4rem 0 1.25rem 1.75rem;
  border: 1px solid var(--book-line); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}
@media (max-width: 767.98px) {
  .book-cover { float: none; display: block; width: 62%; max-width: 260px; margin: 0.5rem auto 1.5rem; }
}
/* The cover is hidden for now (Quân, 2026-11-17); delete this rule to bring it back.
   img.book-cover outranks the phone rule above. */
img.book-cover { display: none; }

/* Title page: no author line under the title (the cover and "Về cuốn sách" carry the name); the year stays */
.quarto-title-meta > div:not(:has(.date)) { display: none; }
/* No description under the title (Quân, 2026-11-17). It stays in the page's metadata,
   so search engines and link previews still use it. */
#title-block-header .description { display: none; }

/* Section numbers in headings and the tables of contents: neutral grey, not the theme's blue-grey */
.header-section-number, .chapter-number { color: #666666 !important; }
