.polysilver-map { position: relative; margin: 1rem 0; }
/* Quarto's bundled Inputs.table always prepends a row-selection checkbox. */
.quarto-ojs-table-fixup > table > thead > tr > :first-child,
.quarto-ojs-table-fixup > table > tbody > tr > :first-child { display: none; }
.polysilver-viewport { position: relative; }
.polysilver-map svg { display: block; width: 100%; height: auto; }
.polysilver-map .polysilver-district:focus { outline: none; }
.polysilver-legend { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .7rem; font-size: .85rem; }
.polysilver-legend-table-wrap { max-width: 100%; overflow-x: auto; margin-bottom: .4rem; }
.polysilver-legend-table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.polysilver-legend-table th, .polysilver-legend-table td {
  padding: .3rem .55rem;
  border-bottom: 1px solid var(--bs-border-color, #ccc);
  white-space: nowrap;
}
.polysilver-legend-table th { text-align: left; }
.polysilver-key { display: inline-flex; align-items: center; gap: .35rem; }
.polysilver-key i, .polysilver-missing i { display: inline-block; width: .9rem; height: .9rem; border: 1px solid #666; vertical-align: middle; }
.polysilver-scale { width: min(100%, 360px); }
.polysilver-gradient { height: 14px; border: 1px solid #999; border-radius: 2px; }
.polysilver-scale-labels { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.polysilver-scale-caption { flex-basis: 100%; }
.polysilver-missing { display: flex; align-items: center; gap: .4rem; }
.polysilver-tooltip { position: fixed; z-index: 1000; width: max-content; max-width: min(340px, 90vw); top: 0; left: 0; padding: .65rem .8rem; background: var(--bs-body-bg, white); color: var(--bs-body-color, #222); border: 1px solid #888; border-radius: 5px; box-shadow: 0 3px 14px #0003; pointer-events: none; font-size: .85rem; }
.polysilver-tooltip div:first-of-type { font-weight: 700; margin-bottom: .25rem; }
.polysilver-tooltip[hidden] { display: none; }
.polysilver-zoom {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #0003;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 5px #0003;
}
.polysilver-zoom button {
  appearance: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #333;
  cursor: pointer;
  touch-action: manipulation;
}
.polysilver-zoom button + button { border-top: 1px solid #e0e0e0; }
.polysilver-zoom button:hover { background: #f2f2f2; color: #000; }
.polysilver-zoom button:active { background: #e6e6e6; }
.polysilver-zoom button:focus-visible { outline: 2px solid #2166ac; outline-offset: -3px; }
.polysilver-zoom button svg { width: 14px; height: 14px; pointer-events: none; }

.polysilver-tooltip svg.polysilver-tooltip-arrow {
  position: absolute;
  width: 12px;
  height: 7px;
  bottom: -6px;
  fill: var(--bs-body-bg, white);
  stroke: #888;
}
.polysilver-tooltip[data-placement="bottom"] .polysilver-tooltip-arrow {
  top: -6px;
  bottom: auto;
  transform: rotate(180deg);
}

.score-summary table { width: auto; }
.score-summary th, .score-summary td { padding-left: .75rem; padding-right: .75rem; }
