#links {
  display: grid;
  grid-template-columns: 1;
  gap: 1em;
  margin: 1em 0;
}
.link {
  /* visit-tracker's removeRow waits for this transition's transitionend
     before removing the row — keep them in sync. */
  transition: opacity 0.3s ease;

  /* Applied when a link is opened while the "new links" filter is active,
     just before the row is removed from the list. */
  &.removing {
    opacity: 0;
  }

  /* Keyboard-navigation selection: an outline.
     Negative margins offset the padding so neighbouring rows don't shift. */
  &.selected {
    outline: 0.1875rem solid var(--highlight-color);
    border-radius: 0.5rem;
    padding: 0.5em 0.75em;
    margin: -0.5em -0.75em;
    transition: outline-width 0.2s linear;

    /* Brief confirmation that "y" copied the URL. */
    &.copied {
      outline-width: 0.5em;
    }
  }

  .link-title {
    color: var(--fg-color);
    font-weight: bold;
    text-decoration: underline;
    text-decoration-thickness: 0.125rem;
    text-decoration-color: var(--highlight-color);
    transition: none;
    overflow-wrap: break-word;

    display: block;

    &:hover {
      color: var(--link-color);
    }
  }
  &.visited .link-title {
    text-decoration-color: var(--border-color);
    &:hover {
      text-decoration-color: var(--highlight-color);
    }
  }

  .link-description,
  .link-tags {
    font-size: 0.75em;
    color: var(--mid-color);
    overflow-wrap: break-word;
  }

  .link-etc {
    font-size: 0.75em;
    display: flex;
    align-items: center;
    gap: 0.5em;
  }

  .start-page-toggle {
    transition: 0.2s ease-out all;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
  }

  .start-page-toggle svg {
    width: 1em;
    height: 1em;
    transition: 0.2s ease-out all;
  }

  .start-page-toggle.not-added {
    opacity: 0.5;
  }

  .start-page-toggle.not-added svg {
    fill: var(--mid-color);
  }

  .start-page-toggle.not-added:hover {
    opacity: 1;
  }

  .start-page-toggle.not-added:hover svg {
    fill: var(--highlight-color);
  }

  .start-page-toggle.added svg {
    fill: var(--highlight-color);
  }

  .start-page-toggle.added:hover svg {
    fill: var(--positive-color);
  }
}
