/* Shared mobile corrections for the ported data pages
   (cities, households, generations, regions). Loaded after each page.css. */

@media (max-width: 1080px) {
  .regdata .band .wrap:has(> .sec-head) > *:not(.sec-head),
  .hhdata .band .wrap:has(> .sec-head) > *:not(.sec-head),
  .citydata .band .wrap:has(> .sec-head) > *:not(.sec-head),
  .gendata .band .wrap:has(> .sec-head) > *:not(.sec-head) {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .regdata .wrap,
  .hhdata .wrap,
  .citydata .wrap,
  .gendata .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .regdata,
  .hhdata,
  .citydata,
  .gendata {
    overflow-x: hidden;
  }

  /* Wide fixed-width visuals scroll instead of overflowing the page */
  .regdata .casc,
  .regdata .aff,
  .regdata .tmap,
  .hhdata .casc,
  .hhdata .aff,
  .citydata .casc,
  .gendata .casc {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .regdata svg,
  .hhdata svg,
  .citydata svg,
  .gendata svg,
  .regdata canvas,
  .hhdata canvas,
  .citydata canvas,
  .gendata canvas {
    max-width: 100%;
  }

  .regdata h1,
  .hhdata h1,
  .citydata h1,
  .gendata h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
    line-height: 1.05;
  }

  .regdata h2,
  .hhdata h2,
  .citydata h2,
  .gendata h2 {
    font-size: clamp(1.5rem, 7.4vw, 2.1rem);
    line-height: 1.1;
  }

  .regdata .ctasec h2,
  .hhdata .ctasec h2,
  .citydata .ctasec h2,
  .gendata .ctasec h2 {
    white-space: normal;
  }
}
