.toolbox-directory-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.toolbox-directory-table th {
  white-space: nowrap;
}

.toolbox-directory-table th:nth-child(1),
.toolbox-directory-table td:nth-child(1) {
  width: 22%;
  min-width: 12.5rem;
}

.toolbox-directory-table th:nth-child(2),
.toolbox-directory-table td:nth-child(2) {
  width: 50%;
}

.toolbox-directory-table th:nth-child(3),
.toolbox-directory-table td:nth-child(3) {
  width: 28%;
}

.toolbox-directory-table td {
  vertical-align: top;
}

.toolbox-directory-table tbody tr[hidden] {
  display: none;
}

.directory-category {
  font-weight: 700;
  color: var(--text-primary);
  white-space: normal;
  overflow-wrap: anywhere;
}

.directory-icon-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.directory-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 66%, var(--primary-color) 34%);
  background: color-mix(in srgb, var(--card-background) 84%, var(--primary-color) 16%);
  box-shadow: inset 0 1px 0 var(--neutral-overlay-10);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.directory-icon-link:hover,
.directory-icon-link:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary-color) 58%, var(--border-color) 42%);
  background: color-mix(in srgb, var(--card-background) 68%, var(--primary-color) 32%);
  box-shadow: 0 0.5rem 1rem var(--neutral-overlay-20), 0 0 0 1px color-mix(in srgb, var(--primary-color) 44%, transparent);
  text-decoration: none;
}

.directory-icon-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.directory-icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 0.5rem;
  object-fit: contain;
}

.directory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tag-desktop {
  background: color-mix(in srgb, #1f6feb 18%, var(--card-background));
  border-color: color-mix(in srgb, #1f6feb 40%, var(--border-color));
  color: color-mix(in srgb, #1f6feb 80%, var(--text-primary));
}

.tag-mobile {
  background: color-mix(in srgb, #2da44e 16%, var(--card-background));
  border-color: color-mix(in srgb, #2da44e 38%, var(--border-color));
  color: color-mix(in srgb, #2da44e 78%, var(--text-primary));
}

.tag-web {
  background: color-mix(in srgb, #bf8700 18%, var(--card-background));
  border-color: color-mix(in srgb, #bf8700 36%, var(--border-color));
  color: color-mix(in srgb, #bf8700 78%, var(--text-primary));
}

.tag-lib {
  background: color-mix(in srgb, #8250df 18%, var(--card-background));
  border-color: color-mix(in srgb, #8250df 36%, var(--border-color));
  color: color-mix(in srgb, #8250df 78%, var(--text-primary));
}

@media (max-width: 47.99rem) {
  .toolbox-directory-table th:nth-child(1),
  .toolbox-directory-table td:nth-child(1) {
    width: 30%;
    min-width: 8.75rem;
  }

  .directory-icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .directory-icon-link {
    width: 2.25rem;
    height: 2.25rem;
  }
}
