/* Phones and tablets (under 1024px): readable text, comfortable tap targets, nothing wider than the
   screen. Loaded after every other stylesheet. Every rule sits inside the one media query below, so
   the desktop layout (1024px and up) is untouched. */
@media (max-width: 1023px) {

  /* ---------------------------------------------------------------- text: 16px at the least */
  :root {
    --t-small: 16px;  /* small print, form labels, footer links, status and error lines */
    --t-label: 16px;  /* the credits line, labels */
  }

  .perf__kind,
  .nav__actions .btn {
    font-size: 16px;
  }

  /* a long word, address or link wraps instead of pushing the page sideways */
  body {
    overflow-wrap: break-word;
  }

  /* ---------------------------------------------------------------- images and embeds fit the screen */
  img,
  video,
  canvas,
  svg,
  picture,
  iframe,
  embed,
  object {
    max-width: 100%;
  }

  iframe,
  embed,
  object {
    display: block;
    width: 100%;
  }

  /* a video embed (YouTube, Vimeo) keeps its shape as it shrinks */
  iframe[src*="youtube"],
  iframe[src*="youtu.be"],
  iframe[src*="vimeo"] {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  pre {
    max-width: 100%;
    overflow-x: auto;
  }

  /* ---------------------------------------------------------------- tap targets: 44 by 44 at the least
     The kit does this on a phone (under 640px); a tablet is a touch screen too, so it applies up to 1024px. */
  :root {
    --btn-h-sm: 44px;
  }

  .nav__logo,
  .footer__mark,
  .link,
  :is(a, button).pill {
    min-height: 44px;
  }

  :is(a, button).pill {
    height: auto;
  }

  .footer ul:has(> li > a) {
    gap: 0;
  }

  .footer ul:has(> li > a)>li:not(:has(> a)) {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  :is(.footer ul, .footer__legal, .footer__nav) a:not(.btn) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
  }

  .credits>summary {
    display: block;
    min-height: 44px;
    padding-block: 12px;
    line-height: 20px;
  }

  .socials a,
  .footer__legal .socials a {
    width: 44px;
    height: 44px;
  }

  /* the photograph credits page: each source and licence link is its own 44px target */
  .credits-list li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }
}
