/* Captions with WCAG AA contrast */
.figure-caption, figcaption, .table-caption { color: #595959; }
/* Wide display equations scroll instead of being cut off */
span.math.display { display: block; max-width: 100%; }
mjx-container[display="true"] { display: block; max-width: 100%; min-width: 0 !important; overflow-x: auto; overflow-y: hidden; }
/* Dark mode: keep captions readable */
body.quarto-dark .figure-caption, body.quarto-dark figcaption, body.quarto-dark .table-caption { color: #b8b8b8; }

/* let the breadcrumb shrink in the narrow top bar */
.quarto-secondary-nav .container-fluid > nav, .quarto-secondary-nav .container-fluid > a.flex-grow-1 { min-width: 0; overflow: hidden; }
/* Narrow screens: keep the sidebar (and the chapter arrows) inside the screen, wrap long titles */
@media (max-width: 991.98px) {
  #quarto-sidebar { max-width: 100vw; overflow-x: hidden; }
  #quarto-sidebar .sidebar-item-container > a, #quarto-sidebar .sidebar-title, .sidebar-chapter-toc a { white-space: normal; }
}
/* The right-hand table of contents is hidden: the left sidebar lists each chapter's sections.
   (It is still generated, because scripts/sidebar_sections.py reads it.) */
#quarto-margin-sidebar nav#TOC { display: none; }
/* Wide screens: with no right-hand column, let the text use the freed space (capped for readability) */
@media (min-width: 992px) {
  /* Sidebar anchored to the left edge (no centered empty margin), text right after it */
  #quarto-content.page-layout-full {
    grid-template-columns:
      [screen-start screen-start-inset page-start] 18rem
      [page-start-inset body-start-outset body-start] 2.5rem
      [body-content-start] minmax(0, 1fr)
      [body-content-end] 2.5rem
      [body-end body-end-outset page-end-inset page-end screen-end-inset screen-end];
  }
  #quarto-content.page-layout-full main.content { grid-column: body-content-start / body-content-end; max-width: 1050px; }
  #quarto-sidebar { padding-left: 1rem !important; }
}

/* Top bar: same background as the page (so each logo version keeps its intended contrast), larger logo */
body.quarto-light #quarto-header .navbar { background-color: #ffffff !important; border-bottom: 1px solid #dee2e6; }
body.quarto-dark #quarto-header .navbar { background-color: #222222 !important; border-bottom: 1px solid #444444; }
body.quarto-light #quarto-header .navbar, body.quarto-light #quarto-header .navbar .nav-link, body.quarto-light #quarto-header .navbar .menu-text,
body.quarto-light #quarto-header .navbar .quarto-navigation-tool, body.quarto-light #quarto-header .navbar .navbar-toggler { color: #212529 !important; }
body.quarto-dark #quarto-header .navbar, body.quarto-dark #quarto-header .navbar .nav-link, body.quarto-dark #quarto-header .navbar .menu-text,
body.quarto-dark #quarto-header .navbar .quarto-navigation-tool, body.quarto-dark #quarto-header .navbar .navbar-toggler { color: #e8e8e8 !important; }
#quarto-header .navbar .nav-link .menu-text { font-size: 1.2rem; font-weight: 500; }
#quarto-header .navbar-logo { max-height: 46px; height: 46px; width: auto; }
/* Logo at the far right of the top bar (after the GitHub, PDF, and dark-mode buttons) */
#quarto-header .navbar-container { display: flex; flex-wrap: nowrap; }
#quarto-header .navbar-brand-container { order: 999; margin-left: 0.75rem !important; margin-right: 0 !important; }
#quarto-header .navbar-collapse { order: 1; }
#quarto-header .navbar-toggler { order: 0; }
@media (max-width: 991.98px) {
  #quarto-header .navbar-brand-container { margin-left: auto !important; }
}
/* P-Chem 1: wide tables (e.g., the thermodynamic data in the appendix) scroll horizontally on narrow screens */
@media (max-width: 767.98px) {
  main table { display: block; max-width: 100%; overflow-x: auto; }
}
/* Wide screens: the top bar stays visible while scrolling (on phones it still hides, to leave room for the text) */
@media (min-width: 992px) {
  #quarto-header.headroom--unpinned { transform: none !important; top: 0 !important; }
  /* Quarto moves the sidebar up when it would hide the bar: keep it just below the bar instead
     (--header-height is set by the script at the end of sidebar-toc.html) */
  #quarto-sidebar.sidebar-unpinned { top: var(--header-height, 75px) !important; max-height: calc(100vh - var(--header-height, 75px)) !important; }
}
/* Worked examples (::: {#exm-...}): numbered green boxes, like the worked-example callouts of P-Chem 2 */
div.theorem.example {
  border: 1px solid #198754; border-left: 5px solid #198754; border-radius: 0.375rem;
  background-color: rgba(25, 135, 84, 0.06); padding: 0.75rem 1rem 0.25rem; margin: 1.25rem 0;
  overflow-x: auto;
}
div.theorem.example .theorem-title { color: #146c43; }
body.quarto-dark div.theorem.example { background-color: rgba(25, 135, 84, 0.15); border-color: #3fb37f; }
body.quarto-dark div.theorem.example .theorem-title { color: #75d6a6; }
/* Definitions (::: {#def-...}): numbered blue boxes */
div.theorem.definition {
  border: 1px solid #0d6efd; border-left: 5px solid #0d6efd; border-radius: 0.375rem;
  background-color: rgba(13, 110, 253, 0.05); padding: 0.75rem 1rem 0.25rem; margin: 1.25rem 0;
  overflow-x: auto;
}
div.theorem.definition .theorem-title { color: #0a58ca; }
body.quarto-dark div.theorem.definition { background-color: rgba(13, 110, 253, 0.15); border-color: #6ea8fe; }
body.quarto-dark div.theorem.definition .theorem-title { color: #9ec5fe; }
/* Preface title block, sized like the PDF title page: series name (medium), volume title (largest), subtitle (smallest) */
/* only the preface has a subtitle: there, the book title ("...Chemistry 1") is shown as "..., Volume 1" like in the PDF */
#title-block-header .quarto-title:has(.subtitle) h1.title { font-size: 0; }
#title-block-header .quarto-title:has(.subtitle) h1.title::before { content: "The Live Textbook of Physical Chemistry, Volume 1"; font-size: 1.6rem; font-weight: 500; }
#title-block-header .quarto-title .subtitle { font-size: 2.6rem; font-weight: 600; line-height: 1.15; margin-top: 0.4rem; }
#title-block-header .description { font-size: 1.15rem; }
