body > footer {
  --focus-color: var(--accent);
  background: var(--dark);
  color: var(--dark-muted);
  border-top: 1px solid var(--dark-line);
  font-size: 14px;
}
body > footer > div {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.foot-brand > span:first-child {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.foot-brand img {
  display: block;
  width: 26px;
  height: 26px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-left: auto;
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--dark-link);
  text-decoration: none;
  transition: color 0.15s ease;
}
.foot-links a:hover {
  color: var(--dark-link-hover);
}
.foot-social {
  display: flex;
  gap: 8px;
}
.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-sm);
  color: var(--dark-link);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.foot-social a:hover {
  color: var(--dark-link-hover);
  border-color: var(--dark-link-hover);
}
/* Below the width that fits everything on one line, the mark and the icons share the top row, the links follow and the copyright closes
   the footer; on a phone everything is centred: the icons on top, the links as a grid, the mark beside the copyright. */
@media (max-width: 960px) {
  body > footer > div {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "mark social" "links links" "copy copy";
  }
  .foot-brand {
    display: contents;
  }
  .foot-brand > span:first-child {
    grid-area: mark;
    justify-self: start;
  }
  .foot-brand > span:last-child {
    grid-area: copy;
    font-size: 13px;
  }
  .foot-social {
    grid-area: social;
  }
  .foot-links {
    grid-area: links;
    margin-left: 0;
  }
}
@media (max-width: 520px) {
  body > footer > div {
    grid-template-columns: 1fr;
    grid-template-areas: "social" "links" "copy";
  }
  .foot-brand {
    display: flex;
    grid-area: copy;
    justify-self: center;
  }
  .foot-social {
    justify-self: center;
  }
  .foot-links {
    justify-items: center;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0 16px;
  }
}

/* Every page's footer is the same slim line, which fits from 921px; the app shell (site.css) keeps it in view under the page. */
@media (min-width: 921px) and (min-height: 480px) {
  body > footer > div {
    display: flex;
    padding-block: 8px;
    font-size: 13px;
  }
  body > footer .foot-brand {
    display: flex;
  }
  body > footer .foot-links {
    margin-left: auto;
  }
  body > footer .foot-brand img {
    width: 18px;
    height: 18px;
  }
  body > footer .foot-brand > span:first-child {
    padding: 3px;
  }
  body > footer .foot-social a {
    width: 28px;
    height: 28px;
  }
}
