/* Tools hub: the same horizontal layout and type scale as category cards. */
.directory-page--tools .tools-grid-bento {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.directory-page--tools .tools-grid-bento .tool-card {
  --tool-card-icon-size: 80px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  min-height: 156px;
  padding: 1.15rem;
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .035);
}

.directory-page--tools .tools-grid-bento .tool-card__top {
  flex: 0 0 var(--tool-card-icon-size);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-width: 0;
}

.directory-page--tools .tools-grid-bento .tool-card__badges > .tool-card-badges {
  flex-direction: column;
  justify-content: center;
  max-width: 100%;
}

.directory-page--tools .tools-grid-bento .tool-card__icon,
.directory-page--tools .tools-grid-bento .tool-card:hover .tool-card__icon {
  width: var(--tool-card-icon-size);
  height: var(--tool-card-icon-size);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: none;
}

.directory-page--tools .tools-grid-bento .tool-card__icon > .alltoll-icon {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  font-size: var(--tool-card-icon-size);
  transition: transform 220ms ease;
}

.directory-page--tools .tools-grid-bento .tool-card__icon > svg.alltoll-icon {
  width: 65%;
  height: 65%;
}

.directory-page--tools .tools-grid-bento .tool-card__body {
  flex: 1;
  gap: .4rem;
  min-width: 0;
}

.directory-page--tools .tools-grid-bento .tool-card__name {
  margin: 0;
  color: var(--directory-ink);
  font-size: .98rem;
  font-weight: var(--font-semibold);
  line-height: 1.4;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.directory-page--tools .tools-grid-bento .tool-card__desc {
  display: -webkit-box;
  flex: none;
  overflow: hidden;
  margin: 0;
  font-size: .8125rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.directory-page--tools .tools-grid-bento .tool-card__bottom {
  gap: .65rem;
  margin-top: .15rem;
  padding: 0;
  border: 0;
}

.directory-page--tools .tools-grid-bento .tool-card__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .4rem;
  color: var(--directory-blue);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.5;
}

.directory-page--tools .tools-grid-bento .tool-card__cta svg {
  flex: 0 0 auto;
  transition: transform 200ms ease;
}

.directory-page--tools .tools-grid-bento .tool-card__cat {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: .75rem;
  line-height: 1.5;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-page--tools .tools-grid-bento .tool-card:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--directory-blue) 35%, var(--directory-border));
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, .2);
}

.directory-page--tools .tools-grid-bento .tool-card:is(:hover, :focus-visible) .tool-card__icon > img {
  transform: scale(1.06);
}

.directory-page--tools .tools-grid-bento .tool-card:is(:hover, :focus-visible) .tool-card__cta svg {
  transform: translateX(3px);
}

.directory-page--tools .tools-grid-bento .tool-card:focus-visible {
  outline: 3px solid var(--directory-blue);
  outline-offset: 3px;
}

[data-theme="dark"] .directory-page--tools .tools-grid-bento .tool-card__cta {
  color: #93c5fd;
}

@media (min-width: 1600px) {
  .directory-page--tools .tools-grid-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .directory-page--tools .tools-grid-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .directory-page--tools .tools-grid-bento { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .directory-page--tools .tools-grid-bento .tool-card {
    --tool-card-icon-size: 64px;
    min-height: 136px;
    padding: .9rem;
    gap: .85rem;
  }
  .directory-page--tools .tools-grid-bento .tool-card__name { font-size: .94rem; }
}

@media (prefers-reduced-motion: reduce) {
  .directory-page--tools .tools-grid-bento .tool-card,
  .directory-page--tools .tools-grid-bento .tool-card__icon > .alltoll-icon,
  .directory-page--tools .tools-grid-bento .tool-card__cta svg { transition: none; }
}
