/* Mobile navigation and reference-index refinements. */
.site-footer p:last-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 1000px) {
  /* Keep execution and movement labels aligned even when a value is empty. */
  .model-row {
    align-items: start;
  }
}

/* Keep the main links readable on portrait tablets without changing phones. */
@media (min-width: 621px) and (max-width: 1100px) and (orientation: portrait) {
  .site-header nav {
    font-size: 16px;
  }

  .site-header nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 620px) {
  /* Keep the two most useful catalogue links visible on small screens. */
  .site-header nav a:not(:first-child):not(:last-child) {
    display: inline;
  }

  .site-header nav a:last-child {
    display: none;
  }

  /* Model name first, then execution and movement data in one compact row. */
  .model-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    column-gap: 12px;
    row-gap: 10px;
  }

  .model-reference,
  .model-row > span:nth-child(5) {
    grid-column: 1 / -1;
  }

  .model-note:empty {
    display: none;
  }

  .model-note:not(:empty)::before {
    display: none !important;
  }
}
