/*
 * Overview statistics on the opening phone screen (October 7, 2026).
 * Same approach as the 1858 census v26.8 phone change approved by
 * Marshall Hicks.
 *
 * Phone widths only (max-width: 800px). Tablet (820px and wider) and desktop
 * layouts are untouched. No content is hidden and no wording changes: hero
 * spacing, the binding-fan stage height and the type scale are tightened so
 * the first row of statistics is visible on the opening screen.
 */
@media (max-width: 800px) {
  body[data-design] #t-overview:checked ~ .hero {
    min-height: 0 !important;
  }

  body[data-design] #t-overview:checked ~ .hero .hero-inner {
    padding-top: 16px !important;
    padding-bottom: 14px !important;
    row-gap: 10px !important;
  }

  body[data-design] #t-overview:checked ~ .hero h1.bibliographical-title {
    margin: 0 0 6px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .census-purpose {
    font-size: 19px !important;
    line-height: 1.25 !important;
  }

  body[data-design] #t-overview:checked ~ .hero .census-edition {
    margin: 4px 0 10px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .full-historical-title {
    margin: 0 0 10px !important;
    font-size: 14px !important;
    line-height: 1.42 !important;
  }

  body[data-design] #t-overview:checked ~ .hero .author-credit {
    margin: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
  }

  /* Shorter fan stage; the books sit higher so the label stays clear. */
  body[data-design] #t-overview:checked ~ .hero .hero-stage {
    min-height: 196px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .hero-stage:not(.hero-single) .hero-book {
    inset: 46% auto auto 50% !important;
  }

  /* Statistics: slimmer cells (the "At a Glance" heading keeps its space). */
  body[data-design] #t-overview:checked ~ .stats .stat {
    min-height: 0 !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
  }
}

/* Very short phone screens (for example 360 x 640). */
@media (max-width: 800px) and (max-height: 660px) {
  body[data-design] #t-overview:checked ~ .hero .hero-inner {
    padding-top: 12px !important;
    padding-bottom: 10px !important;
  }

  body[data-design] #t-overview:checked ~ .hero h1.bibliographical-title {
    font-size: 30px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .census-purpose {
    font-size: 18px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .census-edition {
    margin: 3px 0 8px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .full-historical-title {
    margin-bottom: 8px !important;
    font-size: 13.5px !important;
    line-height: 1.38 !important;
  }

  body[data-design] #t-overview:checked ~ .hero .author-credit {
    font-size: 13px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .hero-stage {
    min-height: 176px !important;
  }

  body[data-design] #t-overview:checked ~ .hero .hero-stage:not(.hero-single) .hero-book {
    width: min(27%, 210px) !important;
  }
}
