/* Atlas Filter uses the shared IV page hierarchy and square data tiles. */
.iv-page.sn-filter-page .sn-filter-shell {
  width: min(1320px, calc(100% - 72px));
}
.iv-page.sn-filter-page .sn-filter-hero {
  justify-items: start;
  margin-inline: 0;
  text-align: left;
}
.iv-page.sn-filter-page .sn-atlas-title-lockup {
  justify-self: start;
  text-align: left;
}
body.iv-page.sn-filter-page .sn-atlas-title-lockup .sn-atlas-byline {
  text-align: left;
}
.iv-page.sn-filter-page .sn-filter-statline {
  justify-content: flex-start;
}
.iv-page.sn-filter-page
  :is(
    .sn-filter-state-panel,
    .sn-filter-builder,
    .sn-filter-map-section,
    .sn-filter-results
  ) {
  margin-top: 60px;
}
.iv-page.sn-filter-page .sn-filter-state-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
}
.iv-page.sn-filter-page
  :is(
    .sn-state-chip,
    .sn-icon-button,
    .sn-export-button,
    .sn-filter-state-actions button,
    .sn-filter-select,
    .sn-filter-input,
    .sn-filter-slider-operator
  ) {
  min-height: 44px;
  border-radius: 0;
  box-shadow: none;
}
.iv-page.sn-filter-page .sn-filter-builder-head {
  justify-content: flex-start;
}
.iv-page.sn-filter-page .sn-filter-rows {
  gap: 12px;
}
.iv-page.sn-filter-page .sn-filter-row {
  border-bottom: 1px solid var(--iv-rule);
  padding-bottom: 12px;
}
.iv-page.sn-filter-page .sn-filter-table-shell {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
}
.iv-filter-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: start;
  gap: 28px;
}
.iv-filter-group {
  min-width: 0;
  border-top: 1px solid var(--iv-rule-strong);
  padding-top: 16px;
}
.iv-filter-group h3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  font: 500 20px/1.3 var(--iv-font-sans);
}
.iv-filter-group h3 span {
  font: 500 13px/2 var(--iv-font-mono);
  color: var(--iv-neutral);
}
.iv-filter-district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10px, 1fr));
  gap: 4px;
}
.iv-page.sn-filter-page .iv-filter-district {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--iv-ink);
  border-radius: 0;
  background: color-mix(
    in srgb,
    var(--iv-ink) calc(var(--iv-match-opacity) * 100%),
    var(--iv-paper)
  );
  cursor: crosshair;
}

.iv-page.sn-filter-page .sn-filter-map-tooltip {
  max-width: min(360px, calc(100vw - 16px));
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 600px) {
  .iv-page.sn-filter-page .sn-filter-shell {
    width: calc(100% - 32px);
  }
  .iv-page.sn-filter-page .sn-filter-state-chips {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .iv-filter-district-grid {
    grid-template-columns: repeat(auto-fill, minmax(20px, 1fr));
  }
}
.iv-page.sn-filter-page .sn-filter-row {
  border: 0;
  border-bottom: 1px solid var(--iv-rule-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.iv-filter-result-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.iv-filter-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0,200px));
  gap: 12px;
}
.iv-filter-result {
  min-width: 110px;
  border-top: 1px solid var(--iv-rule-strong);
  padding: 16px 8px 0;
}
.iv-page.sn-filter-page .iv-filter-result h3 {
  margin: 0 0 10px !important;
  font: 600 15px/1.4 var(--iv-font-mono) !important;
  letter-spacing: 0 !important;
}
.iv-filter-result h3 a {
  color: var(--iv-ink);
  text-decoration: none;
  font-size: 24px;
}
.iv-filter-result h3 a:hover {
  text-decoration: underline;
}
.iv-filter-result dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.iv-filter-result dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
}
.iv-filter-result dt {
  font: 400 12px/1.4 var(--iv-font-mono);
  color: var(--iv-neutral);
}
.iv-filter-result dd {
  margin: 0;
  font: 500 14px/1.4 var(--iv-font-mono);
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .iv-filter-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .iv-filter-result-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.iv-page.sn-filter-page .iv-filter-result-controls .sn-filter-sort {
  flex: 0 0 auto;
  width: auto;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--iv-rule-strong);
  font: 500 12px/1.3 var(--iv-font-mono);
  white-space: nowrap;
}
.iv-page.sn-filter-page .iv-filter-result-controls {
  gap: 8px;
  margin-bottom: 24px;
}
.iv-page.sn-filter-page
  .iv-filter-result
  :is(.sn-result-chip, .sn-demographic-chip, .sn-yes-no-chip, .sn-party-pill) {
  min-height: 0;
  padding: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--iv-ink);
  font: 500 13px/1.4 var(--iv-font-mono);
}
