/* Keep the SVG in normal flow: oversized charts must overflow to the right,
   not disappear behind the left edge of a flex/grid-aligned container. */
#tab-dashboard #monthlyChart {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: .75rem 0;
}

#tab-dashboard #monthlyChart .monthly-combo-svg {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  margin: 0;
}

#tab-dashboard #monthlyChart .monthly-chart-period {
  margin: 0 0 .75rem;
  text-align: left;
  white-space: normal;
  font-size: .78rem;
}

#tab-dashboard #monthlyChart .combo-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: .5rem;
}

#monthlyChart:focus-visible {
  outline: 2px solid #315f87;
  outline-offset: 3px;
  border-radius: 6px;
}

.monthly-chart-scroll-hint { display: none; }

@media screen and (max-width: 640px) {
  #tab-dashboard #monthlyChart .monthly-combo-svg { min-width: 680px; }
  .monthly-chart-scroll-hint {
    display: block;
    margin: .25rem 0 0;
    color: #52627a;
    font-size: .75rem;
    line-height: 1.5;
  }
  #monthlyChart.empty-state + .monthly-chart-scroll-hint { display: none; }
}
