
/* =========================
   DESIGN SYSTEM VARIABLES
   ========================= */
:root {
  --card-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(20, 40, 80, 0.92) 100%);
  --card-border: rgba(47, 86, 166, 0.9);
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  --card-radius: 12px;
  --card-padding: 2.5rem 3rem;
  --text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  --accent-gold: #F2A900;
}


/* =========================
   FLOATING TABLE OF CONTENTS
   ========================= */
.page-toc-floating {
  position: fixed;
  top: 98px;/* push down to sit just below header*/
  right: 24px;
  z-index: 1000;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

/* When content scrolls past, make TOC slightly transparent but still visible */
.page-toc-floating.scrolled {
  opacity: 0.7;
}


/* The collapsible <details> element (pill when closed, box when open) */
.page-toc-floating-details {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(20, 40, 80, 0.92) 100%);
  border-radius: 999px;
  border: 2px solid var(--card-border);
  color: #ffffff;
  font-size: 0.8rem;
  box-shadow: var(--card-shadow);
  padding: 0.25rem 0.7rem;
  max-width: 240px;
  cursor: pointer;
}

/* Remove default marker triangle */
.page-toc-floating-details summary::-webkit-details-marker {
  display: none;
}

/* Summary row (click target) */
.page-toc-floating-details summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
  margin: 0;
  transition: opacity 0.2s ease;
}

/* Hover effect to make interactivity more obvious */
.page-toc-floating-details summary:hover {
  opacity: 0.8;
}

/* Label inside the pill ("Table of Contents") */
.page-toc-pill-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  font-size: 0.75rem;
  color: #ffffff;
}

/* Add a hamburger icon before the label */
.page-toc-floating-details summary::before {
  content: "☰";
  font-size: 1.2rem;
  line-height: 1;
  color: #ffffff;
  transition: transform 0.3s ease;
}

/* Rotate hamburger when open */
.page-toc-floating-details[open] summary::before {
  transform: rotate(90deg);
}

/* When open, square off the bottom corners and create room for the list */
.page-toc-floating-details[open] {
  border-radius: var(--card-radius);
  padding: 0.4rem 0.7rem 0.6rem;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

/* List of section links */
.page-toc-floating-list {
  list-style: none;
  margin: 0.35rem 0 0 0;
  padding-left: 0;
}

.page-toc-floating-list li {
  margin-bottom: 0.2rem;
}

/* Links */
.page-toc-floating-list a {
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
  padding: 0.2rem 0;
}

.page-toc-floating-list a:hover {
  text-decoration: underline;
  color: var(--accent-gold);
  transform: translateX(2px);
}

.page-toc-floating-sublist {
  list-style: none;
  margin: 0.1rem 0 0.2rem 0;
  padding-left: 0.8rem;
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .page-toc-floating {
    top: 125px;
    right: 8px;
  }
  
  .page-toc-floating-details {
    max-width: 140px;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
  
  .page-toc-pill-label {
    font-size: 0.5rem;
    white-space: nowrap;
  }
}

/* make symbol smaller */
  .page-toc-floating-details summary::before {
    font-size: 0.9rem;
  }

/* When open, enable scrolling on mobile */
.page-toc-floating-details[open] {
  max-height: calc(100vh - 150px); /* Leave room for header */
  overflow-y: auto;
}
/* Custom scrollbar styling */
.page-toc-floating-details::-webkit-scrollbar {
  width: 8px;
}

.page-toc-floating-details::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.page-toc-floating-details::-webkit-scrollbar-thumb {
  background: rgba(47, 86, 166, 0.8);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-toc-floating-details::-webkit-scrollbar-thumb:hover {
  background: rgba(47, 86, 166, 1);
}

/* Firefox scrollbar styling */
.page-toc-floating-details {
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 86, 166, 0.8) rgba(0, 0, 0, 0.3);
}


/* =========================
   PROGRESS INDICATOR
   ========================= */
   
/* Progress bar at bottom of page */
.progress-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px; /* Thicker for better visibility */
  background: rgba(0, 0, 0, 0.6); /* Darker background for contrast */
  z-index: 10000;
  pointer-events: none; /* Don't block clicks */
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* Subtle top border */
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2F56A6 0%, #4a7fd9 100%);
  width: 0%;
  transition: width 0.1s ease;
  box-shadow: 0 0 15px rgba(47, 86, 166, 0.8);
  animation: pulse-glow 2s ease-in-out infinite;
}

/*  pulsing animation to draw attention */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(47, 86, 166, 0.8);
  }
  50% {
    box-shadow: 0 0 25px rgba(47, 86, 166, 1);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .progress-container {
    height: 6px; /* Slightly thinner on mobile but still visible */
  }
}


/* =========================
   BACK TO TOP BUTTON
   ========================= */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(20, 40, 80, 0.92) 100%);
  border: 2px solid var(--card-border);
  color: #ffffff;
  text-decoration: none;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(1.15);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 24px;
    right: 8px;
    width: 44px;
    height: 44px;
  }
}

/* =========================
   FORCE HIDE QUARTO TITLE
   ========================= */
/* default settings take yml title and puts as header, don't allow */
#title-block-header {
  display: none !important;
}

/* =========================
   PAGE HEADER (LOGO + TITLE)
   ========================= */
.page-header {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  
    /* Spacing */
  padding: 1.5rem 0 0.5rem 0;
  /* forces content after header to be pulled up (ie no awkward gap) */
  margin-bottom: -150px !important;
  padding-bottom: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 10;
}

.page-header .header-overlay {
  position: relative;
  z-index: 2;
  
/* Left Align Position */
  margin-left: 5vw;
  margin-right: auto;
  text-align: center;
    
/* Black Box Styling for header */
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(20, 40, 80, 0.92) 100%);
  padding: 1.5rem 2rem; /* Reduced vertical padding */
  border-radius: 0px;
  width: 650px; /* Forces the box to be wide */
  max-width: 90vw;  /* prevents it from breaking mobile screens */
  border: 2px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

/* Title styling */
.custom-title {
  display: block;
  margin: 0 0 0.25rem 0;
  font-size: 2.5rem !important;
  font-family: Georgia, serif;
  text-shadow: var(--text-shadow);
  line-height: 1.1;
  color: #ffffff !important;
}

/* Author name styling */
.page-subtitle {
  margin: 0 0 1rem 0; /* Space between authors and logo */
  font-size: 1.1rem !important;
  font-family: Georgia, serif;
  text-shadow: var(--text-shadow);
  font-weight: normal;
  color: #dddddd !important;/* Slightly off-white for contrast */
  font-style: italic;
}
/* center logo */
.page-logo {
  display: block;
  margin: 0 auto; /* auto margins center images */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}
/* Hide "Ghost" Paragraphs */
.page-header + p {
  display: none !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  /* Reset the Header */
  .page-header {
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
    .page-header .header-overlay {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem 1rem !important;
  }

  /* Reset H2 and H3 */
h2, h3 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1rem !important;
    border-left: none !important;
    border-radius: 0 !important;
    box-sizing: border-box;
  }
}


/* =========================
   STICKY HEADING OFFSET
   ========================= */
#quarto-document-content {
  padding-top: 0.3rem;
}

#quarto-document-content h2 {
  top: 12px !important;
  z-index: 100 !important;
}

#quarto-document-content h2,
#quarto-document-content h3 {
  scroll-margin-top: 70px;
}

@media (max-width: 768px) {
  #quarto-document-content {
    padding-top: 3.5rem;
  }
  #quarto-document-content h2 {
    top: 24px !important;
  }
  #quarto-document-content h2,
  #quarto-document-content h3 {
    scroll-margin-top: 90px;
  }
}

/* =========================
   SECTION HEADINGS
   ========================= */
h2 {
  width: 100%;
  max-width: 1400px; /* cap so it doesn't look weird on huge monitors */
  margin: 1.25rem auto 5rem auto; 

  
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  
  white-space: normal; /* Allow wrapping */
  font-size: 2rem;
  line-height: 1.3;
  text-align: center;  /* Ensure text is centered */
  
  padding: 1rem 0px .5rem 10rem; 
  
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #ffffff;
  
  /* make sticky */
  position: sticky;
  top: 0px !important;
  z-index: 100;
  overflow: visible !important; 
}

/* background ribbon (edge to edge) */
h2::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vh; 
  right: -100vh;
  background: linear-gradient(135deg, rgba(20, 40, 80, 0.95) 0%, rgba(0, 0, 0, 0.95) 100%) !important;
  border-bottom: 2px solid var(--accent-gold);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: -1;
}

@media (max-width: 768px) {
  
  /* make background ribbon smaller */
  h2::before {
    left: 50% !important;
    right: auto !important;
    width: 100vw !important; 
    margin-left: -50vw !important;
  }
  
  /* make font smaller*/
  h2 {
    padding-right: 50px !important;
    font-size: 1.3rem !important;
    
    /*ensure sticky is active */
    position: sticky !important;
    top: 0px !important;
  }

  html, body {
    /* "clip" hides the side-scroll WITHOUT breaking sticky headers */
    overflow-x: clip !important; 
    width: 100% !important;
    position: relative;
  }
}

h3 {
  background: linear-gradient(to left,
    transparent 0%,
    rgba(0, 0, 0, 0.6) 15%,
    rgba(0, 0, 0, 0.6) 100%) !important;
  font-size: 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 1rem 1.2rem;
  text-align: center;
  box-sizing: border-box;
  border-left: 6px solid var(--card-border);
  border-bottom: 4px solid var(--card-border);
  border-radius: 5px;
  font-weight: 450;
  position: relative;  /* not sticky */
  z-index: 1;
  overflow: hidden;
}



/* =========================
   BODY TEXT & BACKGROUND
   ========================= */
  /* Body + default text */
body {
  font-family: Georgia, serif;/* default font style */
  background-image: url("./images/NYC_DOT_bus.jpg"); /*background image */
  background-size: cover;  /* fill the screen */
  background-position: center;  /* center the image */
  background-repeat: no-repeat;
  background-attachment: fixed;  /* stays fixed while you scroll */
  color: #ffffff; /* DEFAULT COLOR OF ALL TEXT */
  overflow-x: hidden; 
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, serif; /*font of headers */
  color: #ffffff;
  text-shadow: var(--text-shadow); /* gives shadow to header text */
  
}

p {
  text-shadow: var(--text-shadow);
  line-height: 1.6;
  font-family: Georgia, serif;
}

/* Mobile background - solid color instead of image */
@media (max-width: 768px) {
  body {
    background-image: none;
    background-color: #666666;
    overflow-x: hidden;
  }
  
  /* Ensure all full-width elements respect mobile bounds */
  * {
    max-width: 100vw;
  }
  
  /* Fix any overflow from closeread sections */
  .cr-section,
  .cr-narrative,
  .section-narrative {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

/* =========================
   UNIFIED CARD SYSTEM
   ========================= */
/* Base card styling for ALL content blocks */
.section-narrative,
.cr-section p,
.data-source-box,
.finding-callout {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(20, 40, 80, 0.92) 100%) !important;
  padding: var(--card-padding) !important;
  border-radius: var(--card-radius) !important; /*minimal border to help blend sections*/
  box-shadow: var(--card-shadow) !important; /*slight shadow around sections*/
  border: 2px solid var(--card-border) !important; /*no padding between sections*/
  color: #ffffff !important;
  line-height: 1.8 !important;
  font-size: 1.15rem !important;
  margin-bottom: 0rem; /*no padding between sections to help blend*/
}

/* Remove extra styling that creates inconsistency */
.cr-section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

/* Exception: overlay-center sections use full-width styling */
.cr-section[data-layout="overlay-center"] {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-top: 2rem;
  padding-bottom: 2rem;
}


.cr-section[data-layout="overlay-center"] .cr-narrative,
.cr-section[data-layout="overlay-center"] .section-narrative {
  max-width: 800px !important; 
  width: 90% !important;        /* Mobile safety */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* =========================
   OVERLAY-CENTER LAYOUTS (Width & Centering)
   ========================= */

/* 1. Main Container: Breakout to full width */
.cr-section[data-layout="overlay-center"] {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 2rem 0;
}

/* 2. Text Column: Center it & Limit Width */
.cr-section[data-layout="overlay-center"] .narrative-col {
  max-width: 900px !important;  /* Controls how wide the text gets */
  width: 90% !important;        /* Mobile safety */
  margin: 0 auto !important;    /* Centers the column */
}

/* 3. Paragraphs: Remove the "Dark Navy Card" styling 
   (In center mode, we want the text floating on the background, not in boxes) 
*/
.cr-section[data-layout="overlay-center"] p {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 1rem !important;
}

/* =========================
   QUESTION HUB SPECIFICS
   ========================= */

/* Ensure Question Hub specifically breaks out fully */
.cr-section#question-hub {
  position: relative;
  z-index: 100;
  width: 100vw !important;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: none !important;
}

/* The Intro Box ("This page is meant...") */
.question-hub-intro-box {
  margin-bottom: 30vh !important; 
  width: 90%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center !important;
  color: #ffffff !important;
}

/* Arrow Animation */
.question-hub-intro-box::after {
  content: "▼";
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 2rem;
  color: var(--accent-gold);
  animation: bounce 2s infinite;
}

/* The Questions List Box */
.question-hub-questions {
  /* Keep the card style JUST for the questions list */
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(20, 40, 80, 0.92) 100%) !important;
  border-radius: var(--card-radius);
  padding: 2.5rem 3rem;
  border-left: 6px solid var(--card-border);
  box-shadow: var(--card-shadow);
  color: #ffffff;
  
  width: 90%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  line-height: 1.6;
}

/* List Clean Up */
.question-hub-questions ul { margin: 0; padding-left: 0; list-style: none; }
.question-hub-questions li { margin: 0.6rem 0 !important; padding: 0 !important; }

/* Buttons */
.question-hub-questions a {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: #ffffff !important;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 5px solid var(--card-border);
  cursor: pointer;
  transition: all 0.15s ease;
}

.question-hub-questions a:hover {
  background: rgba(242, 169, 0, 0.12);
  border-color: rgba(242, 169, 0, 0.55);
  border-left-color: var(--accent-gold);
  transform: translateX(4px);
}

.question-hub-questions a::before {
  content: "➜";
  color: var(--accent-gold);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.1rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-10px);}
  60% {transform: translateY(-5px);}
}

/* Mobile Adjustments for Hub */
@media (max-width: 768px) {
  .question-hub-intro-box { 
    padding: 1.5rem 1rem !important; 
    font-size: 0.5rem;
    width: 100% !important;
    margin-left: 0 !important;
    box-sizing: border-box;
  }
  .question-hub-questions { 
    padding: 2rem 1.5rem; 
    font-size: 0.95rem; 
  }
}
/* =========================
   EXECUTIVE SUMMARY
   ========================= */


#cr-exec-summary {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 2rem 0;
  max-width: none !important;
  width: auto !important;
}

.exec-summary-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Finding callouts should NOT have card styling - they live inside other sections */
.finding-callout {
  background: transparent !important;
  padding: 1.5rem 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  padding-left: 1.5rem !important;
  color: #ffffff !important;
  line-height: 1.8 !important;
  font-size: 1.15rem !important;
  margin-bottom: 1.5rem;
}

/* Keep the icon and strong text gold */
.finding-callout .finding-icon,
.finding-callout strong {
  color: var(--accent-gold) !important;
}

/* Oversight box (The Blue Container) */
.oversight-box {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 60, 120, 0.95) 100%) !important;
  border-radius: 16px;
  
  /* Compact Vertical Height */
  padding: 1.5rem 2.5rem;          /* Tighter top/bottom padding */
  margin: 1.5rem auto 1.5rem auto; 
  
  /* Layout */
  max-width: 1200px;               /* Full width */
  width: 95%;                      /* Ensure it doesn't touch screen edges on mobile */
  
  border: 3px solid var(--card-border) !important;
  box-shadow: var(--card-shadow);
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Intro Text inside the box */
.oversight-box > p:first-child {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Priority List Container */
.oversight-priorities {
  display: grid;
  gap: 0.5rem;           /* Tight gap between items */
  margin-top: 0.5rem;
  width: 100%;           /* FORCE FULL WIDTH inside the box */
}

/* Individual Priority Item (The Gray Bars) */
.priority-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--card-radius);
  
  /* Slim Padding */
  padding: 0.75rem 1rem 0.75rem 4.5rem; 
  min-height: 3rem;
  
  border-left: 5px solid var(--card-border);
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  width: 100%;           /* Ensure the bar fills the grid slot */
  box-sizing: border-box; /* Include padding in width calculation */
}


.priority-number {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  background: var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  color: #FFF;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  
  /* shrink gaps withing hub */
  #question-hub .question-hub-intro-box.cr-narrative {
    margin-bottom: 10vh !important; 
    padding: 0 1rem !important;
    width: 95% !important;
  }
  .question-hub-questions {
    padding: 1.5rem 1.5rem;
    font-size: 0.95rem;
    width: 95% !important;
  }
  /* compact box */
  .oversight-box {
    padding: 1.5rem 1rem !important;   /* Reduce internal padding */
    margin: 1rem auto !important;      /* Reduce space around the box */
    width: 95% !important;             /* Ensure it fits on screen */
  }
  
  .oversight-box > p:first-child {
    margin-bottom: 1rem;
    font-size: 1rem;
  }
  
  .oversight-priorities {
    gap: 0.5rem;                       /* Keep items close */
  }
  .priority-item {
    /* Move text closer to the left (3.5rem instead of 4.5rem) */
    padding: 0.75rem 0.75rem 0.75rem 3.5rem !important; 
    min-height: auto !important;       /* Let height shrink to fit content */
  }
  .priority-number {
    left: 0.75rem !important;          /* Move bubble closer to edge */
    width: 1.8rem;                     /* Smaller bubble */
    height: 1.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  /* Reset overlay sections to normal width */
  .cr-section[data-layout="overlay-center"],
  #cr-exec-summary,
  .cr-section#question-hub {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    left: auto !important;
    right: auto !important;
  }
  
  /* Reduce card padding on mobile */
  .section-narrative,
  .cr-section p,
  .data-source-box,
  .finding-callout {
    padding: 1.5rem 1rem !important;
    font-size: 1rem !important;
  }

} 

/* =========================
   FACT CALLOUTS
   ========================= */
   
/* Style the sticky sidebar text (the "For the last year..." part) */
#cr-fact,
#cr-fact-2 {
  background: transparent !important;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  font-size: 1.8rem;
  color: #ffffff;
  text-align: center;
  font-weight: bold;
  border: none !important;
  box-shadow: none !important;
}

/* Keep fact callouts styled separately in the scrolling narrative */ 
.fact-callout {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  display: inline-block;
  padding: 1.5rem 2rem !important;
  font-size: 2rem;
  text-align: center;
  color: #ffffff;
  margin: 0rem 0;
  text-shadow: var(--text-shadow);
}

/* Make Font Awesome icons inside fact callouts gold */
.fact-callout i.fact-icon {
  color: var(--accent-gold) !important;
}

/* Mobile adjustments for callouts */
@media (max-width: 768px) {
  #cr-fact,
  #cr-fact-2 {
    font-size: 1.3rem;
    padding: 1.5rem 1.5rem;
  }
  
  .fact-callout {
    font-size: 1.8rem;
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  #cr-fact,
  #cr-fact-2 {
    font-size: 1.1rem;
    padding: 1rem 1rem;
  }
  
  .fact-callout {
    font-size: 1.5rem;
    padding: 0.8rem 1rem;
  }
}


/* =========================
   DATA SOURCES
   ========================= */

/* grid container (Side-by-Side) */
.data-sources-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;                    /* Increased gap for breathing room */
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  width: 100%;
  max-width: 1200px;              /* Prevent boxes from getting too wide */
margin: 0 auto 0 auto; /* center vertically */
  
  /* THIS IS THE KEY FIX: */
  padding-top: 140px !important; /* Forces the boxes down below your sticky H2 header */
  align-items: start;
}

/* individual data source card, override set defaults */
#cr-data-sources .data-source-box {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 40, 80, 0.95) 100%) !important;
  border-radius: 12px;
  
  /* make more compact */
  padding: 1rem 1.25rem !important;    /* Smaller padding */
  font-size: 0.85rem !important;       /* Base font size for all text */
  line-height: 1.5 !important;         /* Tighter line spacing */
  
  border-left: 4px solid rgba(47, 86, 166, 0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  margin-bottom: 0 !important;
  transition: all 0.3s ease;
  
  /* Prevent overflow */
  overflow: hidden;
  box-sizing: border-box;
}

/* Remove the gap between Title and Description */
#cr-data-sources .data-source-box strong:first-of-type {
  font-size: 1.15rem !important;
  margin-bottom: 0px !important; /* Kill the space below the title */
  line-height: .8;
}

/* Target the link paragraph immediately following the title */
#cr-data-sources .data-source-box a[target="_blank"] {
  display: inline-block;
  margin-top: 2px !important; /* Very tight gap */
  margin-bottom: 4px !important; /* Space before the bullet list starts */
}

/* Title at the top of each box (e.g., "1. Bus Breakdown and Delays") */
#cr-data-sources .data-source-box strong:first-of-type,
#cr-data-sources .data-source-box > p:first-child strong {
  font-size: 1.2rem !important;          /* REDUCED: Smaller title */
  display: block;
  margin-bottom: 0.5rem;
}

/* Specific styling for the subtitle line with links (e.g., "Semi-annual reports from OPT:") */
#cr-data-sources .data-source-box > p:nth-child(2) {
  font-size: 0.85rem !important;       /* Match the smaller text size */
  line-height: 1.5 !important;
}
/* Links in that subtitle line */
#cr-data-sources .data-source-box > p:nth-child(2) a {
  font-size: 0.85rem !important;       /* Make links same size as surrounding text */
}

/* Bottom summary paragraph (the one after the bullet list) */
#cr-data-sources .data-source-box > p:last-child {
  font-size: 0.85rem !important;       /* REDUCED: Smaller summary text */
  margin-top: 0.5rem;
  line-height: 1.4 !important;
}

/* Links inside the box */
#cr-data-sources .data-source-box a {
  color: #F2A900 !important; 
  text-decoration: underline;
  word-break: break-word;              /* Prevent long URLs from breaking layout */
}

/* tighten space between bullets */
#cr-data-sources ul {
  margin: 0.4rem 0 0 0;
  padding-left: 1rem;
}

#cr-data-sources li {
  margin-bottom: 0.2rem !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 0.85rem !important;       /* Smaller bullet text */
}
/* =========================================
   MOBILE LAYOUT FOR DATA SOURCES (q-data-quality)
   ========================================= */
@media (max-width: 768px) {

  /* Turn off sticky / scroll layout for this section */
  #q-data-quality .cr-section.cr-column-screen.sidebar-right {
    display: block !important;           /* kill side-by-side layout */
  }

  #q-data-quality .narrative-col,
  #q-data-quality .sticky-col {
    width: 100% !important;
    max-width: none !important;
  }

  #q-data-quality .sticky-col,
  #q-data-quality .sticky-col-stack {
    position: static !important;         /* no sticky */
    height: auto !important;
    overflow: visible !important;
    margin-top: 1rem !important;         /* gap between text and cards */
  }

  /* Make the container a plain block */
  #q-data-quality #cr-data-sources {
    display: block !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    margin-top: 0 !important;
  }

  /* Make sure BOTH cards show, stacked */
  #q-data-quality #cr-data-sources .data-source-box {
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    margin: 1rem 0 !important;
  }
}
/* =========================
   PLOT CARDS
   ========================= */
[id^="cr-plot-"] {
  width: 100%;
  max-width: 1200px;
  margin: 1.25rem auto 2rem auto;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.15rem;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cr-sticky {
  background: rgba(255, 255, 255, 0.95) !important;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-top: 20rem !important;
}

[id^="cr-plot-"] img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================
   TOOLTIPS
   ========================= */
.ggiraph-tooltip {
  background-color: rgba(0, 0, 0, 0.8) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 4px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  box-shadow: var(--card-shadow) !important;
  font-family: Georgia, serif !important;
}

.ggiraph-tooltip-container {
  z-index: 99999 !important;
  position: fixed !important;
  pointer-events: none !important;
}

svg {
  background: transparent;
}

svg text {
  fill: #222222 !important;
  font-family: Georgia, serif !important;
}

[id^="cr-plot-"] svg,
[id^="cr-plot-"] .ggiraph-svg-container {
  pointer-events: auto;
}




/* =========================
   INTERACTIVITY FIXES
   ========================= */
.cr-sticky [aria-hidden="true"],
.cr-sticky [hidden],
.cr-sticky [style*="opacity:0"],
.cr-sticky [style*="opacity: 0"] {
  pointer-events: none !important;
}

.cr-sticky .html-widget,
.cr-sticky svg,
.cr-sticky .ggiraph-svg-container {
  pointer-events: auto !important;
}

.cr-sticky::before,
.cr-sticky::after {
  pointer-events: none !important;
}

.cr-sticky,
.cr-sticky * {
  transition: none !important;
  animation: none !important;
}

/* =========================
   MOBILE STICKY PLOTS FIX
   ========================= */
@media (max-width: 768px) {
  .cr-section,
  .cr-column-screen,
  .narrative-col,
  .sticky-col,
  .sticky-col-stack,
  .cr-narrative,
  .section-narrative {
    overflow: visible !important;
  }

  .cr-sticky {
    position: sticky !important;
    top: 110px !important;
    z-index: 200 !important;
  }

  [id^="cr-plot-"] {
    position: sticky !important;
    top: 10px !important;
    z-index: 150 !important;
  }
}

/* =========================
   MOBILE: SMALLER STICKY HEADERS (NO CLIP)
   ========================= */
@media (max-width: 768px) {

  :root{
    /* Must be >= .page-toc-floating { top: 125px } + a little breathing room */
    --mobile-sticky-h2-top: 190px;  /* try 150–190 */
  }

  h2{
    font-size: 1.25rem !important;
    line-height: 1.15 !important;
    padding: 0.45rem 0.75rem !important;
    margin-top: 0rem !important;
    margin-bottom: 0.6rem !important;

    position: sticky !important;
    top: var(--mobile-sticky-h2-top) !important;

    /* Ensure it doesn't get covered */
    z-index: 1100 !important; /* above TOC (1000) */
  }

  h3{
    font-size: 1.10rem !important;
    line-height: 1.2 !important;
    padding: 0.40rem 0.75rem !important;
    margin-top: 0.85rem !important;
    margin-bottom: 0.55rem !important;
  }

  /* When jumping to anchors, keep the heading from landing under sticky UI */
  #quarto-document-content h2,
  #quarto-document-content h3{
    scroll-margin-top: calc(var(--mobile-sticky-h2-top) + 12px) !important;
  }
}
