.tools-search-card,
.tools-section {
  background-color: var(--md-sys-color-surface-variant);
  border: 1px solid transparent;
  border-radius: var(--md-sys-shape-corner-large);
  box-shadow: var(--md-sys-elevation-1);
  padding: 24px;
  margin-bottom: 16px;
}

.tools-search-card h2,
.tools-section h2 {
  margin: 0 0 14px;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--md-sys-color-on-surface);
}

.tools-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
}

.tools-search .material-symbols-outlined {
  color: var(--md-sys-color-on-surface-variant);
}

.tools-search input {
  width: 100%;
  min-height: 50px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: inherit;
  font-size: 0.9375rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-tab {
  appearance: none;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 999px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  padding: 8px 14px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-tab:hover,
.category-tab:focus {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 40%, var(--md-sys-color-outline-variant));
  outline: none;
}

.category-tab.is-active {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}

.tools-section__header {
  margin-bottom: 14px;
}

.tools-count {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.5;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool-list-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 112px;
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.04s ease;
}

.tool-list-card:hover,
.tool-list-card:focus {
  background: var(--md-sys-color-primary-container);
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 28%, transparent);
  box-shadow: var(--md-sys-elevation-1);
  outline: none;
}

.tool-list-card:active {
  transform: translateY(1px);
}

.tool-list-card__icon {
  flex: 0 0 auto;
  color: var(--md-sys-color-primary);
  font-size: 26px;
}

.tool-list-card__body strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.tool-list-card__body small {
  display: block;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8rem;
  line-height: 1.5;
}

.empty-message {
  margin: 18px 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .tools-search-card,
  .tools-section {
    padding: 18px;
  }

  .category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .category-tab {
    flex: 0 0 auto;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-list-card {
    min-height: auto;
  }
}