/* The sticky header: wordmark, the three section links and the pilot button. */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--bar);
  padding: 0 var(--gutter);
  background: var(--ground);
  border-bottom: 1px solid var(--seam);
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  display: block;
  height: 32px;
  width: auto;
}

.top nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.top .btn {
  margin-left: auto;
}

/* On a phone the bar stays one row (spec, user story 38 keeps the three links
   and the button in it): a smaller wordmark, links and button, each link at
   least 24 px tall. */
@media (max-width: 700px) {
  .top {
    gap: 10px;
  }

  .brand img {
    height: 24px;
  }

  .top nav {
    gap: 10px;
    font-size: 12px;
  }

  .top nav a {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    min-height: 24px;
  }

  .top .btn.sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }
}

/* Below 385 px the links no longer fit beside the wordmark and the button, so
   they take a second row. */
@media (max-width: 384px) {
  :root {
    --bar: 84px;
  }

  .top {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-top: 8px;
  }

  .top nav {
    order: 3;
    flex: 0 0 100%;
    padding: 2px 0 6px;
  }
}
