/* Small-screen overrides, gathered in one file and loaded after every other
   stylesheet, so a screen that breaks on a phone has a single place to look.
   The column layouts come literally from the prototype and were drawn for a
   desktop width: rather than reflow them into a table the design never had,
   the rows keep their proportions and scroll sideways. */

@media (max-width: 980px) {
  /* Eight steps with their labels never fit. The numbers stay, the label only
     for the step being filled in. */
  .step-rail {
    overflow-x: auto;
  }

  .step-rail__item {
    flex: none;
  }

  .step-rail__label {
    display: none;
  }

  .step-rail__item--current .step-rail__label {
    display: inline;
  }
}

@media (max-width: 780px) {
  .topbar {
    padding: 0 14px;
    gap: 12px;
  }

  .topbar__brand-sub,
  .topbar__divider {
    display: none;
  }

  .content {
    padding: 20px 16px 48px;
  }

  .content__title {
    font-size: 21px;
  }

  .content__header--split {
    flex-direction: column;
    gap: 12px;
  }

  .wizard-card {
    padding: 18px 16px;
  }

  .grid-table {
    overflow-x: auto;
  }

  .panel__grid {
    display: block;
    overflow-x: auto;
  }

  .grid-table__head,
  .grid-table__row,
  .panel__head,
  .panel__row {
    min-width: 600px;
  }

  .readback,
  .field-grid,
  .profile-grid,
  .change-block,
  .tile-grid {
    grid-template-columns: 1fr;
  }

  .filters__search {
    min-width: 0;
    flex-basis: 100%;
  }

  .wizard-nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .wizard-nav__spacer {
    display: none;
  }

  .wizard-nav .button {
    flex: 1 1 auto;
  }
}

@media (max-width: 520px) {
  .role-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card,
  .panel__title,
  .panel__foot {
    padding-left: 14px;
    padding-right: 14px;
  }
}
