.chart-panel {
  max-height: 390px;
  overflow: hidden;
}

.coverage .ev-status-label {
  float: none;
  color: #9cb1c9;
}

.chart-panel canvas {
  display: block;
  width: 100% !important;
  height: 320px !important;
  max-height: 320px;
}

.ev-breakdown {
  margin-top: 18px;
}

.ev-breakdown td:not(:first-child),
.ev-breakdown th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

#ev-return-statewide {
  display: inline-block;
  margin: 0 0 12px;
}

@media (max-width: 650px) {
  .chart-panel {
    height: 340px;
    max-height: 340px;
  }

  .chart-panel canvas {
    height: 275px !important;
    max-height: 275px;
  }

  .county-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* Stack wide party/method breakdowns so every county percentage is visible. */
@media (max-width: 650px) {
  .ev-breakdown table, .ev-breakdown tbody, .ev-breakdown tr { display: block; }
  .ev-breakdown thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .ev-breakdown tr { margin-bottom: 18px; border: 1px solid #29415f; border-radius: 6px; }
  .ev-breakdown td, .ev-breakdown td:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-align: right;
    white-space: normal;
  }
  .ev-breakdown td::before {
    content: attr(data-label);
    text-align: left;
    color: #9fb4ce;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .ev-breakdown td:first-child { display: block; text-align: left; }
  .ev-breakdown td:first-child::before { content: none; }
  .ev-breakdown td:last-child { border-bottom: 0; }
}
