/* ── Browse all tools ──
   Used by _includes/tools-browse.html on the home page and the download page. */
.tb {
  --tb-brand: #dd4db5;
  --tb-brand-strong: #c2379b;
  --tb-brand-soft: #fdf1fa;
  --tb-brand-line: #f6cfea;
  --tb-ink: #17131f;
  --tb-text: #4b4758;
  --tb-muted: #7b7788;
  --tb-line: #e9e7ef;
  --tb-tint: #faf9fc;
  width: 100%;
  color: var(--tb-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

.tb *,
.tb *::before,
.tb *::after {
  box-sizing: border-box;
}

.tb p {
  margin: 0;
}

.tb ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tb ul li {
  margin: 0;
  padding: 0;
}

/* The theme sizes every "ul li span" as a 20px icon slot */
.tb ul li span {
  width: auto;
  margin-right: 0;
}

.tb a {
  text-decoration: none;
}

.tb svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Main tool cards ── */
.tb-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tb .tb-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--tb-line);
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tb .tb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 12px;
  background: var(--tb-brand-soft);
  color: var(--tb-brand-strong);
}

.tb .tb-icon svg {
  width: 22px;
  height: 22px;
}

.tb .tb-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tb .tb-card-name {
  color: var(--tb-ink);
  font-size: 16px;
  font-weight: 700;
}

.tb .tb-card-desc {
  color: var(--tb-muted);
  font-size: 14px;
  line-height: 1.45;
}

.tb .tb-card-arrow {
  margin-top: 12px;
  color: #c4c1cf;
  transition: color 0.18s ease, transform 0.18s ease;
}

.tb .tb-card:hover,
.tb .tb-card:focus-visible {
  border-color: var(--tb-brand);
  box-shadow: 0 10px 28px rgba(221, 77, 181, 0.14);
  transform: translateY(-2px);
  outline: none;
}

.tb .tb-card:hover .tb-card-arrow {
  color: var(--tb-brand);
  transform: translateX(3px);
}

.tb .tb-card--primary {
  border-color: var(--tb-brand-line);
  background: var(--tb-brand-soft);
}

.tb .tb-card--primary .tb-icon {
  background: var(--tb-brand);
  color: #fff;
}

/* ── Link groups ── */
.tb-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.tb-group,
.tb-social {
  padding: 22px;
  border: 1px solid var(--tb-line);
  border-radius: 16px;
  background: #fff;
}

.tb-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--tb-line);
}

.tb .tb-group-title {
  margin: 0;
  color: var(--tb-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

.tb .tb-group-desc {
  margin-top: 2px;
  color: var(--tb-muted);
  font-size: 13.5px;
}

.tb .tb-group-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  color: var(--tb-text);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.tb .tb-group-links svg {
  width: 16px;
  height: 16px;
  color: #c4c1cf;
  transition: color 0.15s ease, transform 0.15s ease;
}

.tb .tb-group-links a:hover,
.tb .tb-group-links a:focus-visible {
  background: var(--tb-brand-soft);
  color: var(--tb-brand-strong);
  outline: none;
}

.tb .tb-group-links a:hover svg {
  color: var(--tb-brand);
  transform: translateX(3px);
}

/* ── Social media ── */
.tb-social {
  margin-top: 14px;
}

.tb-social-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tb .tb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tb-brand-strong);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.tb .tb-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.tb .tb-link:hover svg {
  transform: translateX(3px);
}

.tb-social-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.tb .tb-social-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--tb-line);
  border-radius: 12px;
  color: var(--tb-ink);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.tb .tb-social-item img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.tb .tb-social-item:hover,
.tb .tb-social-item:focus-visible {
  border-color: var(--tb-brand);
  background: var(--tb-brand-soft);
  color: var(--tb-brand-strong);
  outline: none;
}

@media (max-width: 1100px) {
  .tb-social-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tb-cards,
  .tb-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tb-social-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .tb-cards,
  .tb-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .tb-social-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tb .tb-social-item {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tb * {
    transition: none !important;
  }
}
