.page-heading.project-heading {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 720px);
  align-items: flex-start;
  column-gap: 20px;
}

.page-heading.project-heading > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.page-heading.project-heading > .project-navigation,
.page-heading.project-heading > .travel-heading-actions {
  width: 720px;
  max-width: 100%;
  justify-self: end;
}

.page-heading.project-heading .project-page-name,
.page-heading.project-heading > div:first-child > h1:first-child {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.1;
  text-transform: none;
  overflow-wrap: anywhere;
}

.page-heading.project-heading .project-page-name + h1 {
  margin: 0;
  color: var(--violet);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 750;
  line-height: 1.15;
}

.page-heading.project-heading .project-page-name + h1 + p {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
}

.page-heading.project-heading .project-navigation {
  width: 100%;
}

.page-heading.project-heading .travel-heading-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.page-heading.project-heading .travel-heading-actions .project-navigation {
  order: -1;
}

@media (max-width: 1100px) {
  .page-heading.project-heading {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading.project-heading > .project-navigation,
  .page-heading.project-heading > .travel-heading-actions {
    flex-basis: auto;
    width: 100%;
  }

  .page-heading.project-heading .project-navigation,
  .page-heading.project-heading .travel-heading-actions {
    justify-items: start;
  }
}

@media (max-width: 1100px) {
  .page-heading.project-heading .project-page-name,
  .page-heading.project-heading > div:first-child > h1:first-child {
    font-size: 1.75rem;
  }

  .page-heading.project-heading .project-navigation,
  .page-heading.project-heading .travel-heading-actions .project-navigation {
    width: max-content;
    max-width: 100%;
    justify-self: start;
  }

  .page-heading.project-heading .travel-heading-actions {
    width: 100%;
    align-items: flex-start;
    justify-items: start;
  }

  .page-heading.project-heading .travel-identity-shortcut {
    width: max-content;
    max-width: 100%;
  }
}

.page-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* The project sheet needs room for both its title and its player shortcut. */
@media (min-width: 701px) {
  .page-heading.project-heading:has(.project-open-player) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-heading.project-heading:has(.project-open-player) > .editing-heading-title,
  .page-heading.project-heading:has(.project-open-player) > .project-navigation {
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
  }
}
