/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .shell { padding: 0 20px; }

  /* The version pill costs more room than the four links can spare. */
  .nav { padding: 16px 0; }
  .nav__version { display: none; }
  .nav__links { gap: 20px; }
  .nav__link { font-size: 12px; }

  .hero { padding: 130px 0 80px; }
  .hero__sub { font-size: 16px; }

  .section { padding: 72px 0; }
  .section__title { margin-bottom: 32px; }

  /* Trim the code frames so the listings keep more usable width. The
     gutter shares the code metrics, or the numbers drift off their lines. */
  .code { padding: 18px 16px; font-size: 12px; }
  .code--sm { padding: 16px 14px; }
  .src .code { padding: 18px 14px; }
  .src__nums { width: 34px; padding: 18px 8px 18px 0; font-size: 12px; }
  .src__copy { padding: 7px 10px; }

  /* Hover only: no cursor to follow on a phone. */
  .perf__readout { display: none; }

  /* Perf table becomes one block per metric, so nothing scrolls sideways. */
  .table { display: block; }
  .table thead { display: none; }
  .table tbody { display: block; }

  .table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
    padding: 16px 0 18px;
    border-bottom: 1px solid var(--line);
  }

  .table tbody tr:last-child { border-bottom: 0; }

  .table td {
    display: block;
    padding: 0;
    border-bottom: 0;
  }

  .table td:first-child {
    grid-column: 1;
    grid-row: 1;
    color: var(--text);
    font-size: 14px;
  }

  .table td:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    padding-right: 0;
    text-align: right;
  }

  .table td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    padding-top: 12px;
  }

  .table td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    padding-top: 12px;
  }

  /* The column headers are gone, so each cell carries its own label. */
  .table td:nth-child(2)::before,
  .table td:nth-child(3)::before {
    display: block;
    margin-bottom: 5px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .table td:nth-child(2)::before { content: "threading"; }
  .table td:nth-child(3)::before { content: "async"; }

  .table td:nth-child(4)::before {
    content: "factor";
    margin-right: 7px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(233, 236, 233, 0.26);
  }

  .cta { padding: 80px 0 96px; }
}
