/* custom.css */

/* =========================================
   1. MAIN PAGE CONTENT
========================================= */

/* Aggressively target all paragraphs, lists, and tables in the main reading area */
main.content p, 
main.content li, 
main.content td, 
main.content th {
  font-size: 0.85rem !important; 
  line-height: 1.6 !important;
}

/* Shrink code blocks */
pre, code, .sourceCode {
  font-size: 0.75em !important; 
}


/* =========================================
   2. LEFT SIDEBAR (NAVIGATION)
========================================= */

/* Shrink text and reduce vertical padding inside the link */
div.sidebar-item-container a.sidebar-item-text {
  font-size: 0.8rem !important;
  padding-top: 0.1rem !important;
  padding-bottom: 0.1rem !important;
}

/* Remove the invisible margins/gaps between the bullet items */
li.sidebar-item, 
div.sidebar-item-container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}


/* =========================================
   3. RIGHT SIDEBAR (TABLE OF CONTENTS)
========================================= */

/* Shrink TOC text and squeeze links closer */
nav[role="doc-toc"] ul li a {
  font-size: 0.75rem !important;
  padding-top: 0.1rem !important;
  padding-bottom: 0.1rem !important;
}

/* =========================================
   4. MAIN PAGE HEADINGS (H1, H2, H3)
========================================= */

/* H1 / Page Title */
main.content h1, 
main.content .title {
  font-size: 1.55rem !important;  /* Reduced from ~2.5rem */
  margin-top: 1.5rem !important;
  margin-bottom: 1rem !important;
}

/* H2 / Main Section Headers (e.g., 1. The Core Engine) */
main.content h2 {
  font-size: 1.2rem !important;   /* Reduced from ~2.0rem */
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
}

/* H3 / Sub-section Headers (e.g., 1.1 Total CO2 Allocation) */
main.content h3 {
  font-size: 1rem !important;  /* Reduced from ~1.75rem */
  margin-top: 1.25rem !important;
  margin-bottom: 0.5rem !important;
}

/* H4 / Minor Sub-section Headers (Nuclear Override) */
body main.content h4, 
body main.content section.level4 h4, 
body main.content .h4,
#quarto-document-content h4 {
  font-size: 0.9rem !important;  
  font-weight: 700 !important;   
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.2 !important;
}

/* Disable the home link on the Quarto sidebar title */
.sidebar-title a {
  pointer-events: none !important;
  cursor: default !important;
  color: inherit !important; /* Keeps whatever text color it currently has */
}