/* Token Mapping from tokens.json */
:root {
  --color-bg-page: #FAF8F5;          /* color.surface.default.bg */
  --color-navy: #0B2440;             /* color.raw.navy */
  --color-dark-pink: #B71E3E;        /* color.raw.dark-pink */
  --color-maroon: #590F1E;           /* color.raw.maroon */
  --color-blue-title: #2F5987;       /* color.raw.blue */
  --color-card-bg: #FFFFFF;          /* color.surface.default.card */
  --color-border: #E2E8F0;           /* color.raw.border-gray */
  --color-text-muted: #64748B;
  --radius-card: 1rem;               /* component.card.radius */
  --radius-btn: 0.5rem;              /* component.button.search-mobile.radius */
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--color-bg-page);
  color: #1B1B1B;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--color-bg-page) !important; /* #FAF8F5 from tokens.json */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
/* Header */
header {
  background-color: var(--color-navy);
  border-top: 4px solid var(--color-dark-pink);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  width: 100%;
}

.header-container {
  max-width: 1254px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.header-tag {
  color: #C3D0DF;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Container & Fluid Headings */
main {
  max-width: 1254px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 60px 24px;
  flex: 1;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 24px;
  border-bottom: 2px solid #E5E7EB;
  padding-bottom: 16px;
}

/* Fluid Responsive Page Title */
.page-title {
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--color-blue-title);
  line-height: 1.25;
}

.page-subtitle {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.page-subtitle a {
  color: var(--color-blue-title);
  text-decoration: underline;
  margin-left: 6px;
}

/* Layout Grids & Cards */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 0;
  width: 100%;
}

.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.03);
  padding: 20px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.card h2 {
  font-size: 1.2rem;
  color: var(--color-navy);
  border-bottom: 2px solid #F1F5F9;
  padding-bottom: 10px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn {
  background: transparent;
  border: 1px solid var(--color-navy);
  color: var(--color-navy);
  padding: 4px 8px;
  border-radius: var(--radius-btn);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.download-btn:hover, .download-btn:focus {
  background-color: var(--color-navy);
  color: #ffffff;
}

.badge {
  background-color: #E2E8F0;
  color: var(--color-navy);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chart-box {
  position: relative;
  width: 100%;
  height: 220px;
  margin: 0 auto;
}

/* Accessible Legend Grid */
.chart-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  color: #334155;
  line-height: 1.3;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* General Fund Split & Notes */
.chart-with-bullets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.bullet-side {
  padding-left: 8px;
}

.bullet-side ul {
  list-style-type: disc;
  padding-left: 20px;
  font-size: 0.9rem;
  color: #334155;
}

.bullet-side li {
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  font-style: italic;
}

.card-note strong {
  font-style: normal;
  color: var(--color-navy);
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stat-card {
  background-color: #F8FAFC;
  border-left: 4px solid var(--color-navy);
  padding: 10px 12px;
  border-radius: 4px;
}

.stat-card .label {
  font-size: 0.725rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.2;
}

.stat-card .value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0F172A;
  margin-top: 4px;
}

/* Key Initiatives */
.initiative-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 16px;
}

.initiative-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.initiative-group h3 {
  font-size: 1.05rem;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.initiative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

ul.bullet-list {
  padding-left: 20px;
  font-size: 0.925rem;
}

ul.bullet-list li {
  margin-bottom: 6px;
}

/* Navigation Bar */
nav.utility-nav {
  background-color: var(--color-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 24px;
  width: 100%;
}

.nav-container {
  max-width: 1254px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.utility-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.utility-nav a:hover {
  color: #C3D0DF;
}

/* Restored Footer */
footer {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.25) 100%), var(--color-maroon);
  color: #ffffff;
  padding: 32px 24px;
  width: 100%;
}

.footer-container {
  max-width: 1254px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
}

.footer-logo img {
  height: 36px;
  width: auto;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Mobile Responsiveness Overrides */
@media (max-width: 768px) {
  main {
    padding: 16px 12px 30px 12px;
  }

  .grid-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 16px;
    padding: 16px 12px;
  }

  .chart-with-bullets {
    grid-template-columns: 1fr;
  }

  .bullet-side {
    margin-top: 12px;
    padding-left: 0;
  }

  .bullet-side ul {
    padding-left: 16px;
  }

  .chart-legend-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}

@media (max-width: 480px) {
  .chart-box {
    height: 200px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  ul.bullet-list {
    padding-left: 16px;
  }
}