.list-end-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.list-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.list-back-to-top svg {
  width: 18px;
  height: 18px;
}

.list-back-to-top:hover,
.list-back-to-top:focus-visible {
  background: var(--accent-soft);
}

.list-back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body[data-page="category"] #main:not(:has(#platform-grid:not([hidden]))) .list-end-actions,
body[data-page="tools"] #main:not(:has(#sb-tool-grid .sb-tool-card)) .list-end-actions,
body[data-page="news"] #main:not(:has(.sb-news-grid:not([hidden]) .sb-news-card)) .list-end-actions {
  display: none;
}

@media (min-width: 721px) {
  body[data-page="socials"] #main:not(:has(#authors-table tbody tr)) .list-end-actions {
    display: none;
  }
}

@media (max-width: 720px) {
  body[data-page="socials"] #main:not(:has(#authors-directory .author-card)) .list-end-actions {
    display: none;
  }
}
