@layer components {
  /* The project's note: the header's last line, after the criteria. */
  .project-note {
    margin-top: var(--space-lg);
  }

  .project-note__label {
    font-size: var(--text-label);
    font-weight: var(--weight-emphasis);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--ink-muted);
  }

  .project-note__text {
    max-width: 75ch;
    margin-top: var(--space-xs);
    line-height: 1.5;
    text-wrap: pretty;
    color: var(--ink);
  }

  .project-note__text--empty {
    margin-top: 0;
    font-size: var(--text-sm);
  }

  .project-note__words {
    white-space: pre-line;
  }

  .project-note__by {
    margin-left: var(--space-sm);
    font-size: var(--text-sm);
    white-space: nowrap;
    color: var(--ink-muted);
  }

  /* The ::before gives the link a 33px target without moving the text. */
  .project-note__edit {
    position: relative;
    font-size: var(--text-sm);
    font-weight: var(--weight-emphasis);
    color: var(--blue);
    border-radius: var(--radius-sm);
    cursor: pointer;

    &::before {
      content: "";
      position: absolute;
      inset: calc(-1 * var(--space-xs)) calc(-1 * var(--space-sm));
    }

    :is(.project-note__words, .project-note__by) + & {
      margin-left: var(--space-sm);
    }

    &:hover {
      text-decoration: underline;
      text-underline-offset: 3px;
    }
  }
}
