html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
.lead-map h2 {
  font-size: 1.6rem !important;
}
.inset-img3 {
  width: 225px;
}
.p-top {
  /* padding-top: 0 !important; */
}
.pb-0 {
  padding-bottom: 0 !important;
}
.w-900 {
  max-width: 900px !important;
}
.map-section {
  max-width: 900px;
  margin: 0rem auto;
  margin-top: 0rem;
  padding: 0 1rem;
  box-sizing: border-box;
}   
.lead-map {
  max-width: 900px;
  margin: 2rem auto;
  margin-top: -0.5rem;
  padding: 0 1rem;
}
.lead-map .map-container {
  position: relative;
  background:none;
  /* background: #f9f9f9; */
  border-radius: 8px;
  border: 1px solid #777;
  margin-top: 0.5rem;
/*
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left:15px;
  padding-right:10px;
*/
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.lead-map .map-container.compact {
  max-height: 400px;
  overflow: hidden;
}   
.lead-map .map-container svg {
  display: block;
  width: 100%;
  height: auto;
}
.lead-map .map-top {
  position: absolute;
  top: 8px;
  left: 16px;
  z-index: 1;
  pointer-events: none;
}
.lead-map .map-header h1 {
  font-size: 1.6rem !important;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: #1a1a1a;
}
.lead-map .map-header p {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}   
.lead-map .county-path {
  stroke: #fff;
  stroke-width: 0.8;
  cursor: pointer;
  transition: opacity 0.2s;
}
/*
.lead-map .county-path:hover {
  opacity: 1;
  stroke: #1a1a1a;
  stroke-width: 2;  
}
*/
.lead-map .county-path.selected {
  /* 
  stroke: #1a1a1a;
  stroke: #ff6b35; 
  stroke-width: 2.5; 
  */
  stroke: #e63946;
  stroke-width: 3;
}
.lead-map .county-path.dimmed {
  opacity: 0.3;
}
.lead-map .poly-label {
  font-size: 10px;
  fill: #333;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 1.8px;
}
.lead-map .tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 1rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.lead-map .tooltip.visible {
  opacity: 1;
}
.lead-map .tooltip table {
  margin-top: 4px;
  border-collapse: collapse;
}
.lead-map .tooltip td {
  padding: 1px 0;
}
.lead-map .tooltip td:first-child {
  padding-right: 10px;
  color: #ccc;
}
.lead-map .tooltip td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/*
.lead-map .legend {
  position: absolute;
  left: 0px;
  top: 100px; 
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3em;
  font-size: 1.5rem;
  color: #333;
  background: none;
  padding: 0.5em 0.7em;
  border-radius: 4px;
}
*/
.lead-map .legend {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3em;
  font-size: 1.5rem;
  color: #333;
  background: rgba(255,255,255,0.88);
  padding: 0.4em 0.6em;
  border-radius: 4px;
}
.lead-map .legend .swatch-row {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}   
.lead-map .legend .swatch {
  width: 1.1em;
  height: 1.1em;
  border-radius: 2px;
  display: inline-block;
}   
/* detail card */
.lead-map .detail-card {
  display: none;
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem;
}
.lead-map .detail-card.visible {
  display: block;
}
.lead-map .detail-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.1rem;
  color: #0066cc !important;
  cursor: pointer;
}
.lead-map .detail-card h2:hover {
  text-decoration: underline;
}
.lead-map .detail-card .fips {
  color: #aaa;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}
.lead-map .detail-card h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin: 1rem 0 0.25rem;
}
.lead-map .detail-card .metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.lead-map .detail-card .metric-row:last-child {
  border-bottom: none;
}
.lead-map .detail-card .metric-label {
  color: #444;
}
.lead-map .detail-card .metric-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lead-map .detail-card details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.lead-map .detail-card details summary::-webkit-details-marker {
  display: none;
}
.lead-map .detail-card details summary .metric-label {
  color: #0066cc;
}
.lead-map .detail-card details summary:hover .metric-label {
  text-decoration: underline;
}
/*
.lead-map .detail-card .detail-list {
  margin: 0.25rem 0 0.5rem 0;
  max-height: 250px;
  overflow-y: auto;
}
*/
/*
.lead-map .detail-card .detail-list {
  margin: 0rem 1rem 0.5rem 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  padding: 0.4rem 0.6rem;
  border-left: 3px solid #e0e0e0;
  background: #fafafa;
  border-radius: 0 4px 4px 0;
}
*/
.lead-map .detail-card .detail-list {
  /* width: fit-content; */
  max-width: 100%;
  margin: 0.00rem 0 0.5rem 0.25rem;
  max-height: 300px;
  overflow: auto;
  padding: 0.4rem 0.6rem;
  border-left: 3px solid #e0e0e0;
  background: #fafafa;
  border-radius: 0 4px 4px 0;
}
.lead-map .detail-card .detail-table {
  /* width: 100%; */
  font-size: 0.8rem;
  border-collapse: collapse;
}
.lead-map .detail-card .detail-table td {
  padding: 5px 5px;
  border-bottom: 1px solid #f5f5f5;
  white-space: nowrap;
}
.lead-map .detail-card .detail-table th {
  text-align: left;
  font-weight: 700;
  color: #444;
  padding: 5px 5px;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}
.lead-map .detail-card .detail-table th,
.lead-map .detail-card .detail-table td {
  text-align: center;
}

.lead-map .detail-card .detail-table th:first-child,
.lead-map .detail-card .detail-table td:first-child {
  text-align: left;
}
.lead-map .detail-card .detail-table td {
  padding: 5px 5px;
  border-bottom: 1px solid #f5f5f5;
  white-space: nowrap;
}
.lead-map .detail-card .detail-table td:last-child {
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-left: 50px;
}
.lead-map .detail-card .detail-table th:last-child {
  padding-left: 50px;
}
.lead-map .detail-card .detail-table td:last-child span {
  display: inline-block;
  min-width: 2.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.lead-map .detail-card .card-hint {
  font-size: 0.7rem;
  color: #999;
  margin: 0.25rem 0 0;
}   
.lead-map .detail-list.expanded {
  max-height: none;
  overflow-y: visible;
}
.lead-map .list-toggle {
  display: block;
  margin-top: 0.4rem;
  background: none;
  border: none;
  color: #0066cc;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}
.lead-map .list-toggle:hover {
  text-decoration: underline;
}   
/* school modal */
.lead-map .school-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.lead-map .school-modal-backdrop.visible {
  display: flex;
}
.lead-map .school-modal {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.lead-map .school-modal .close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}
.lead-map .school-modal .close-btn:hover {
  color: #333;
}
.lead-map .school-modal .school-title  {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  padding-right: 1.5rem;
}
.lead-map .school-modal .school-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #444;
  margin: 0 0 0.75rem;
}
.lead-map .school-modal .field-label {
  font-weight: 600;
}
.lead-map .school-modal .school-address {
  font-size: 1rem;
  color: #444;
  margin: 0 0 0.25rem;
}
.lead-map .school-modal .school-website {
  font-size: 1rem;
  margin: 0 0 1rem;
}
.lead-map .school-modal .school-website a {
  color: #0066cc;
  text-decoration: none;
}
.lead-map .school-modal .school-website a:hover {
  text-decoration: underline;
}
.lead-map .school-modal h3 {
  font-size: 0.75rem;
  font-weight: bold !important;
  color: #444 !important;
  /* text-transform: uppercase; */
  letter-spacing: 0.05em;
  margin: 1.25rem 0 0.25rem !important;
}
.lead-map .school-modal .metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.lead-map .school-modal .metric-row:last-child {
  border-bottom: none;
}
.lead-map .school-modal .metric-label {
  color: #444;
}
.lead-map .school-modal .metric-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* clickable school names in table */
.lead-map .detail-table td.school-name {
  color: #0066cc;
  cursor: pointer;
}
.lead-map .detail-table td.school-name:hover {
  text-decoration: underline;
}   

.lead-map .detail-table th::after {
  margin-left: 4px;
  font-size: 0.9em;
  vertical-align: middle;
  color: #999;
}
.lead-map .detail-table th.sort-none::after {
  content: "▲\A▼";
  white-space: pre;
  display: inline-block;
  text-align: center;
  line-height: 0.75;
}
.lead-map .detail-table th.sort-asc::after { content: "▲"; color: #333; }
.lead-map .detail-table th.sort-desc::after { content: "▼"; color: #333; }     

/* nyc inset */
.lead-map .nyc-inset {
  position: absolute;
  bottom: 28px;
  left: 220px;
  width: 250px;
  height: 250px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: none;
  overflow: hidden;
  /* display: none; */
}
.lead-map .nyc-inset svg {
  display: block;
  width: 100%;
  height: 100%;
}
.lead-map .nyc-inset .county-path {
  stroke: #fff;
  stroke-width: 0.5;
  cursor: pointer;
  transition: opacity 0.2s;
}
/*
.lead-map .nyc-inset .county-path:hover {
  opacity: 1;
  stroke: #1a1a1a;
  stroke-width: 2;  
}
*/
.lead-map .nyc-inset .county-path.selected {
  stroke: #1a1a1a;
  stroke-width: 2;  
}
.lead-map .nyc-inset .county-path.dimmed {
  opacity: 0.3;
}
.lead-map .tooltip tr.section-break td {
  padding-top: 0.55rem;
}
.lead-map .tooltip tr.section-break-2 td {
  padding-top: 0.75rem;
}
.lead-map .tooltip-hint {
  padding-top:0.5em;
  font-weight:666;
}

.lead-map .county-path {
  vector-effect: non-scaling-stroke;
}
.lead-map .downstate-inset .county-path {
  vector-effect: non-scaling-stroke;
}

.lead-map .detail-hint {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.00rem;
  color: #0066cc;
  background: rgba(255,255,255,0.85);
  padding: 2px 8px;
  border-radius: 3px;
  pointer-events: none;
  display: none;
  pointer-events: auto;
  cursor: pointer;
}
.lead-map .detail-hint:hover {
  //background: rgba(0,102,204,0.1);
  color: #fff;
  background: rgba(0,102,204,0.85);
}   
/*
.lead-map .detail-hint.inverted {
  color: #fff;
  background: rgba(0,102,204,0.85);
}
*/
/*
.lead-map .detail-hint {
  color: #fff;
  background: rgba(0,102,204,0.85);
}
.lead-map .detail-hint:hover {
  background: rgba(0,102,204,1);
}
*/
.lead-map .detail-hint.visible {
  display: block;
}   

.lead-map .county-select {
  font-size: 0.85rem;
  position: absolute;
  top: 8px;
  right: 16px;
  padding: 0.2rem 0.4rem;
  border: 1px solid #999;
  border-radius: 4px;
  background: rgba(255,255,255,0.9);
  pointer-events: auto;
  z-index: 2;
}   

.lead-map .district-select {
  font-size: 0.85rem;
  position: absolute;
  top: 8px;
  right: 16px;
  padding: 0.2rem 0.4rem;
  border: 1px solid #999;
  border-radius: 4px;
  background: rgba(255,255,255,0.9);
  pointer-events: auto;
  z-index: 2;
}   

.lead-map .map-help {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 1.1rem;
  color: #333;
  cursor: help;
  z-index: 2;
  user-select: none;
}
.lead-map .map-help span {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 3px;
  white-space: nowrap;
  display: none;
}
.lead-map .map-help:hover .help-desktop { display: block; }
.lead-map .map-help:hover .help-touch { display: none; }

.lead-map .detail-card .rep-block {
  max-width: 320px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.7;
}

/* mobile */
@media (max-width: 800px) {

  .lead-map .detail-card .rep-block {
    margin: 0;
  }

  .lead-map .map-help:hover .help-desktop { display: none; }
  .lead-map .map-help:hover .help-touch { display: block; }

  .inset-img3 {
    display: none;
  }
  .lead-map .map-container svg {
    max-height: 320px;
    width: auto;
    margin: 0 auto;
    display: block;
  }
  .lead-map .map-top {
    top: 2px;
    left: 8px;
  }
  .lead-map .map-header h1 {
    font-size: 1.0rem !important;
  }
  .lead-map .legend {
    font-size: 0.8rem;
  }
  .lead-map .nyc-inset {
    bottom: 16px;
    left: 100px;
    width: 96px;
    height: 80px;
  }

  .lead-map .poly-label {
    stroke-width: 1px;
    stroke: rgba(255,255,255,0.7);
  }
}      
