/* Map container: bigger, centered */
#us-gradrate-map {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
#us-gradrate-map svg {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
.state { cursor: pointer; transition: fill 0.15s ease; pointer-events: all; }

/* Controls: compact toggles */
.controls {
  margin: 0.5rem 0 0.75rem;
  text-align: center;
}
.controls button {
  margin: 0 0.25rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid #bbb;
  border-radius: 9999px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1.2;
  min-width: 3rem;
  transition: all 0.15s ease;
}
.controls button:hover { background: #e5e7eb; }
.controls button.active {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
}

/* State summary */
.state-summary {
  margin: 0.5rem auto 0.5rem;
  font-weight: 500;
  text-align: center;
  max-width: 1100px;
  color: #111827 !important;
}

/* Table: isolated; scrolls with sticky header */
.table-wrap {
  margin: 0.5rem auto 1rem;
  max-width: 1100px;
  padding: 0 0.5rem;
}
.table-scroll {
  max-height: 480px;            /* visible area without long page scroll */
  overflow: auto;               /* internal scroll */
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.grad-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff !important;
  color: #111827 !important;
}
.grad-table thead th {
  position: sticky;             /* stays visible while scrolling */
  top: 0;
  z-index: 2;
  background: #f3f4f6 !important;
  color: #111827 !important;
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #e5e7eb;
}
.grad-table tbody td {
  padding: 0.6rem 0.8rem;
  border-top: 1px solid #f3f4f6;
  background: #ffffff !important;
  color: #111827 !important;
}
.grad-table tbody tr:nth-child(even) td { background: #fafafa !important; }
.grad-table td.num { text-align: right; }
.grad-table tbody td.empty {
  text-align: center !important;
  color: #6b7280 !important;
  padding: 1rem 0.8rem !important;
}

/* Note text */
.note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #555 !important;
  text-align: center;
}

/* Tooltip */
.tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(0,0,0,0.85);
  color: #fff !important;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 10000;
}
