/* Shared nine-slide carousel presentation. Load after each slide's styles. */
body {
  padding: 24px !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.viz-header {
  display: block;
  order: -1 !important;
  flex: 0 0 auto;
  margin: 0 0 16px;
  padding: 0 !important;
}

.viz-header h1 {
  margin: 0 0 8px !important;
  color: #0c2c57 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
}

.viz-header .subtitle {
  margin: 0 !important;
  color: #4b5863 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

button,
select,
input {
  font-family: Arial, Helvetica, sans-serif;
}

.footer,
.footer-note,
.foot-text,
.outlier-note {
  color: #596875;
  font-size: 11px;
  line-height: 1.5;
}

.outlier-note {
  display: block;
  margin: 8px 0 0;
}

.chart-wrap {
  flex-shrink: 0;
}

.viz-header + .controls,
.controls-row,
.chips-row {
  margin-bottom: 12px;
}

/* The carousel's 720px outer iframe leaves 612px for each visualization
   after its navigation and dot rows. On desktop, fit fixed-height charts to
   that real child viewport instead of sizing them for the outer iframe. */
@media (min-width: 481px) {
  html,
  body {
    height: 100%;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  /* ECharts can leave a few off-canvas pixels in scroll geometry after it
     measures a resized flex container. All flow content is sized below;
     the stacked information drilldown keeps its intentional scrollbar. */
  body:not(:has(.drilldown)) {
    overflow: hidden !important;
  }

  body > #chart,
  .chart-wrap {
    flex: 1 1 0;
    min-height: 0;
  }

  body > #chart,
  .chart-wrap > #chart {
    height: auto !important;
  }

  .chart-wrap {
    display: flex;
    flex-direction: column;
  }

  .chart-wrap > #chart {
    flex: 1 1 0;
    min-height: 0;
  }
}

@media (max-width: 768px) {
  body {
    padding: 20px !important;
  }

  .viz-header h1 {
    font-size: 18px !important;
  }
}

@media (max-width: 480px) {
  body {
    padding: 16px !important;
  }
}
