/* Results page — mobile refinements.
 * Presentation only: every aggregate stays backend-produced.
 * The curve is drawn as SVG (see dashboard_styles.css); the previous
 * horizontally scrolling bar chart is gone, so no scroll hint is needed.
 */

.stats-population-note {
  margin: calc(var(--s2) * -1) 0 var(--s5);
}

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

@media (max-width: 800px) {
  /* Keep the curve genuinely usable at thumb size rather than shrinking it. */
  .chart-panel {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }

  .chart-head {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }

  /* Filters scroll horizontally instead of wrapping into a tall stack. */
  .curve-controls {
    gap: var(--s4);
  }

  .curve-controls fieldset {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .curve-controls fieldset::-webkit-scrollbar {
    display: none;
  }

  .curve-controls .button {
    flex: 0 0 auto;
  }

  /* A tooltip near the edges must stay inside the viewport. */
  .chart-tooltip {
    max-width: min(78vw, 260px);
    white-space: normal;
  }
}
