p.caption {
  color: #777;
  margin-top: 10px;
}

p code {
  white-space: inherit;
}

pre {
  word-break: normal;
  word-wrap: normal;
}

pre code {
  white-space: inherit;
}

article pre,
article img {
  max-width: 100% !important;
}

/* Font sizing */
body {
  font-size: 0.95rem;
  text-align: justify !important;
}

h1 { font-size: 1.8rem !important; }
h2 { font-size: 1.4rem !important; }
h3 { font-size: 1.2rem !important; }
h4 { font-size: 1rem !important; }

/* Justify main paragraph text */
.bs-content p {
  text-align: justify;
}

/* ============================================================
   SIDEBARS (Left TOC + Right "On This Page")
   ============================================================ */

#TOC,
#TOC ul,
#TOC li,
#TOC a,
#page-nav,
#page-nav ul,
#page-nav li,
#page-nav a {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
}

/* Slight padding reduction for medium+ screens */
@media (min-width: 992px) {
  .col-md-3,
  .col-md-9 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* ============================================================
   WIDTH ADJUSTMENTS — WIDER TEXT, SMALLER SIDEBARS
   ============================================================ */

.container,
.container-fluid {
  max-width: 100% !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* LEFT SIDEBAR — slightly smaller */
.bs-sidebar {
  max-width: 180px !important;
  flex: 0 0 180px !important;
  font-size: 0.85rem !important;
}

/* RIGHT SIDEBAR — slightly smaller */
.bs-sidebar-right {
  max-width: 160px !important;
  flex: 0 0 160px !important;
  font-size: 0.8rem !important;
}

/* MAIN CONTENT — slightly wider */
.bs-content {
  max-width: 1200px !important;  
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

/* Very wide monitors: expand moderately */
@media (min-width: 1600px) {
  .bs-content {
    max-width: 1350px !important;
  }
}

/* Small monitors: use default responsive behavior */
@media (max-width: 992px) {
  .bs-content {
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .bs-sidebar,
  .bs-sidebar-right {
    max-width: none !important;
    flex: 0 0 auto !important;
  }
}

/* ============================================================
   OTHER CUSTOM ELEMENTS
   ============================================================ */

.infobox {
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  border: 2px solid orange;
  border-radius: 10px;
  background: #f5f5f5 5px center/3em no-repeat;
}

/* Horizontal navbar line cleanup */
.summary > li:first-child {
  height: 50px;
  padding-top: 10px;
  border-bottom: 1px solid rgba(0,0,0,.07);
}

.book .book-summary ul.summary li.divider {
  height: 0px;
} 

.my-note {
  border: 2px solid #4EC3C7;      
  background-color: #E6FAFB;       
  padding: 1em 1.2em;
  border-radius: 6px;
  margin: 1.2em 0;
  color: #003B3D;                  
}

#toc,
#toc ul,
#toc li,
#toc a {
  text-align: left !important;
}

 
