body {
  font: 16px sans-serif; 
  background-color: #e2e2e2dc;
  margin: 0;
  padding: 0;
}

.data-link-button {
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  align-items: center;
  text-decoration: none;
  background-color: #004080;
  color: white;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.data-link-button:hover,
.data-link-button:focus {
  background-color: #0059b3;
  outline: none;
}

.title-container {
  padding: 20px 40px 30px 40px; /* increased bottom padding for spacing */
}

.title-container h1 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 12px;
}

.title-container p {
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  max-width: none;
  margin: 0;
  margin-bottom: 24px
  
}

.controls {
  padding: 0 40px;
  margin-top: -20px; 
}

.slider-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 600px;
  margin-top: 10px;
}

input[type="range"] {
  flex: 1;
  width: 600px; 
  height: 6px;
}

button {
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  align-items: center;
}

#year-label {
  font-size: 15px;
  margin-bottom: 10px;
}

.tooltip {
  position: absolute;
  visibility: hidden;
  padding: 10px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
}

.legend-bin {
  cursor: pointer;
  stroke-width: 1;
  transition: stroke-width 0.2s;
}

.legend-bin:hover,
.legend-bin.active {
  stroke-width: 3;
  stroke: #333;
}

path {
  cursor: pointer;
}

.map-chart-wrapper {
  display: flex;
  flex-wrap: wrap; /* allow wrapping on small screens */
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}
#map {
  width: 100%;
  min-width: 300px;
  max-width: 1100px;
  display: block;
}
#map-container {
  flex: 1 1 700px;
  min-width: 600px;
}

#line-chart-section {
  margin-top: 60px;
}


#legend-container {
  flex: 0 0 80px; /* fixed width of 80px */
  max-width: 66px;
  padding: 0;
  margin-top: 30px;
  margin-right: 20px;
}

#legend-svg-wrapper {
  display: block;
}

#legend-container svg {
  width: 100%;
  height: 450px;
  padding-bottom: -70px;
}
#clear-filters-button {
  width: auto;
  white-space: nowrap; /* prevents button text wrapping */
  text-align: center;
  margin-top: -70px;     /* moves it upward */
  margin-left: -30px;
}


/* Resize line chart area */
#line-chart-container {
  flex: 1;
  width: 100%;
  max-width: 700px;
  box-sizing: border-box;
  background-color: white;
  align-items: center;
  justify-content: center;
}

#unselect-button {
  position: static;
  margin-top: 23px;
  font-size: 12px;
  margin-left: -145px;
}

#unselect-wrapper {
  width: fit-content;
  margin: 0 auto;
  margin-top: -10px;
  padding-left: 215px;
  padding-bottom: 30px;
  /* padding-left: 60px; ⬅ aligns with left margin of the chart */
}

path.selected {
  fill: #F0E68C !important;
  stroke: #FFFFC5;
  stroke-width: 2.5;
  filter: url(#selected-glow); /* more intense glow */
}

/* Accessibility classes - hidden alt text summaries for charts for map and line chart */
.sr-only {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

