body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9fafc;
    color: #2c3e50;
    height: 100vh;
    overflow: hidden;
  }

  /* Single-page digest: long scrollable content + sticky sidebar */
  .container.digest-single-page {
    display: flex;
    height: 90vh;
    width: 100%;
    overflow: hidden;
  }

  .container {
    display: flex;
    height: 90vh;
    width: 100vw;
  }

  /* Sidebar: sticky so it stays visible while main content scrolls */
  .sidebar.sidebar-sticky {
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Sidebar */
  .sidebar {
    width: 240px;
    background: #ffffff;
    padding: 1.5rem;
    border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
    height: 90%;
    flex-shrink: 0;
  }

  /* Main content: scrollable long page */
  .content.content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 1.5rem 2rem;
    -webkit-overflow-scrolling: touch;
  }

  /* Main content area */
  .content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0rem 1rem 1rem; /* Reduce top padding from 2rem to 1rem */
  }
  
  .sidebar h4 {
    margin-top: 1.0rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: #34495e;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
  }

  #first-header {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: #34495e;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
  }
  
  .sidebar a {
    display: block;
    margin: 0.2rem 0;
    text-decoration: none;
    color: #555;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
  }
  
  .sidebar a:hover {
    background-color: #eaf4ff;
    color: #007bff;
  }
  
  /* Main content */
  
  /* Digest Sections */
  .digest-section {
    margin-top: 0;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Single-page: each section has top margin so they stack with spacing.
     scroll-margin-top: enough space so we don't scroll too far past the previous
     section; the current section and its title stay fully visible below the sticky filters. */
  .content-scroll .digest-section {
    margin-top: 1.5rem;
    scroll-margin-top: 9rem; /* larger offset so current section + title are fully visible, not cut off */
  }

  .content-scroll .digest-section:first-of-type {
    margin-top: 0;
    /* First section: no extra scroll margin so "Faculty" click matches manual scroll to top */
    scroll-margin-top: 0;
  }

  /* Filters bar at top of main content */
  .digest-filters {
    background: #fff;
    padding: 1rem 0 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    border: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .digest-filters label {
    margin-right: 0.5rem;
  }

  .digest-filters .campus-buttons {
    margin-top: 0.75rem;
  }
  
  .digest-section h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    margin-top: 0;
  }
  
  .digest-section h3 {
    font-size: 1.0rem;
    color: #555;
    margin-bottom: 1.2rem;
  }
  
  /* Dropdown */
  select {
    padding: 0.4rem;
    width: 220px;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    transition: border 0.3s;
  }
  
  select:focus {
    border-color: #007bff;
    outline: none;
  }
  
  /* Campus Buttons */
  .campus-buttons {
    margin: 1rem 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .campus-buttons button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    border: 1px solid #bbb;
    background: #f7f7f7;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
  }
  
  .campus-buttons button:hover, .campus-buttons button:active {
    background-color: #e0ecff;
    border-color: #007bff;
    color: #007bff;
  }
  
  /* Chart Placeholder */
  .chart-placeholder {
    margin-top: 2rem;
    padding: 5.3rem;
    border: 2px dashed #d3d3d3;
    text-align: center;
    color: #999;
    font-style: italic;
    border-radius: 10px;
    background: #fafafa;
    height: 35vh;
    
  }

  .pie-chart-container {
    width: 100%;
    max-width: 600px;  /* Set maximum width */
    height: 600px;     /* Fixed height */
    margin: 0 auto;    /* Center the chart */
  }
  
  /* For smaller screens */
  @media (max-width: 768px) {
    .pie-chart-container {
      max-width: 350px;
      height: 350px;
    }
  }

/* Campus buttons */
.campus-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 16px;
}

.campus-buttons button{
  appearance:none;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  color:#111827;
  padding:8px 12px;
  border-radius:8px;
  font-size:0.95rem;
  cursor:pointer;
  transition:background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.campus-buttons button:hover{
  background:#eef2ff;
  border-color:#c7d2fe;
}


/* Visually highlight the selected campus (JS sets aria-pressed and .active) */
.campus-buttons button[aria-pressed="true"],
.campus-buttons button.active {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.empty-state{
  padding:16px;
  border:1px dashed #e5e7eb;
  background:#f9fafb;
  color:#6b7280;
  border-radius:8px;
  text-align:center;
  margin:8px 0 12px;
}

/* Ensure consistent chart heights on the public page */
.chart-container,
.pie-chart-container {
  position: relative;
  width: 100%;
  height: 320px;        /* uniform base height */
}

.chart-wrap {
  position: relative;
}

.chart-download-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.chart-download-btn:hover {
  background: #eff6ff;
}

/* Make the faculty line chart a touch taller, if you like */
#faculty-chart-container {
  height: 320px;
}




  