/*
 * Votendi US Midterms — mobile seat-count and candidate-card layout.
 * Presentation only; no polling data or projection numbers are altered.
 */
@media (max-width: 820px) {
  #control-of-congress .themespair-ep-congress-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #control-of-congress .themespair-ep-congress-chamber {
    min-width: 0;
    max-width: 100%;
  }
}
@media (max-width: 767px) {
  #control-of-congress .themespair-ep-congress-values {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    gap: 2px !important;
    margin: 10px 0 8px !important;
    padding: 0;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
  #control-of-congress .themespair-ep-congress-values > span {
    display: grid !important;
    grid-template-columns: 10px minmax(0, 1fr) max-content !important;
    gap: 8px !important;
    align-items: center;
    min-width: 0 !important;
    width: 100%;
    padding: 5px 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  #control-of-congress .themespair-ep-congress-values > span > i {
    display: block !important;
    width: 10px !important;
    height: 10px !important;
    flex: none !important;
    margin: 0 !important;
  }
  #control-of-congress .themespair-ep-congress-values > span > b {
    position: static !important;
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    white-space: nowrap !important;
    text-align: right !important;
  }
  #control-of-congress .themespair-ep-congress-source {
    overflow-wrap: anywhere;
  }
  .themespair-ep-route-main .themespair-ep-race-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .themespair-ep-route-main .themespair-ep-race-card {
    min-width: 0 !important;
    max-width: 100%;
  }
  .themespair-ep-route-main .themespair-ep-race-card .themespair-ep-bar-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }
  .themespair-ep-route-main .themespair-ep-race-card .themespair-ep-bar-label {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    flex-wrap: wrap !important;
  }
  .themespair-ep-route-main .themespair-ep-race-card .themespair-ep-bar-label a,
  .themespair-ep-route-main .themespair-ep-race-card .themespair-ep-bar-label strong {
    min-width: 0;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  .themespair-ep-route-main .themespair-ep-race-card .themespair-ep-bar-value {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    position: static !important;
    min-width: 0;
    margin: 0 !important;
    transform: none !important;
    white-space: nowrap !important;
  }
  .themespair-ep-route-main .themespair-ep-race-card .themespair-ep-bar-value strong {
    font-size: 17px !important;
  }
  .themespair-ep-route-main .themespair-ep-race-card .themespair-ep-bar-track {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 100%;
  }
}
