/* Introduces a page with an optional backlink, title, summary, and actions. */
.page-context {
  display: flex;
  max-width: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--space-5);
}

@scope (.page-context) {
  > div:first-child {
    max-width: var(--copy-width);
  }

  h1 {
    margin: 0;
    color: var(--color-heading);
    font-size: var(--font-size-h1);
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: var(--letter-spacing-heading);
    overflow-wrap: anywhere;
    text-shadow: 0 0.125rem 0 var(--color-heading-shadow);
  }

  p {
    max-width: 42.5rem;
    margin: var(--space-3) 0 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-body);
    line-height: 1.5;
  }

  > div:last-child:not(:first-child) {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--space-4);
  }

  > a:first-child {
    display: inline-block;
    margin-bottom: var(--space-3);
    font-size: var(--font-size-md);
    font-weight: 750;
    text-decoration: none;
  }
}

@media (max-width: 640px) {
  .page-context {
    align-items: stretch;
    flex-direction: column;
    gap: var(--space-5);
  }

  .page-context > div:last-child:not(:first-child) {
    align-items: stretch;
    flex-direction: column;
  }

  .page-context .button {
    width: 100%;
  }
}
