/* Paragraph anchor link: visible on hover/focus only; does not disrupt layout. */
.c-paragraph {
  position: relative;
}

.c-paragraph__anchor-link {
  position: absolute;
  left: 0.25rem; /* Keep inside the container to avoid being clipped by overflow */
  /* Removed translateX(-100%) which could place the link outside and hidden */
  padding: 0 0.25rem;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  line-height: 1;
  z-index: 2; /* Ensure it sits above nearby content for hoverability */
}

/* USWDS/Gesso friendly: inherit font sizing. Use currentColor to inherit */
.c-paragraph__anchor-link,
.c-paragraph__anchor-link:visited {
  color: currentColor;
}
.c-paragraph__anchor-link:hover,
.c-paragraph__anchor-link:focus {
  text-decoration: underline;
}

/* Only show on hover/focus of the container or the link itself */
.c-paragraph:hover > .c-paragraph__anchor-link,
.c-paragraph:focus-within > .c-paragraph__anchor-link,
.c-paragraph__anchor-link:focus {
  opacity: 1;
}

/* Ensure it doesn't overlap interactive content at the start */
.c-paragraph__anchor-link {
  top: 0.25rem; /* small offset from top, uses USWDS scale approximation */
}
