.tool-discovery {
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1rem;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e0d7ca);
  border-radius: 16px;
}

.tool-discovery h2,
.related-tools h2 {
  margin: 0 0 0.65rem;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
}

.tool-search-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.tool-search-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.tool-search-form input,
.tool-search-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--text, #18120b);
  background: var(--bg-soft, #fffdf8);
  border: 1px solid var(--border, #e0d7ca);
  border-radius: 8px;
}

#tool-search-status {
  margin: 0.7rem 0 0;
  color: var(--muted, #5f574e);
}

.tool-search-results {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.tool-search-results li {
  border-top: 1px solid var(--border, #e0d7ca);
  padding: 0.75rem 0;
}

.tool-search-results p {
  margin: 0.25rem 0 0;
}

.tool-search-results a,
.related-tools a {
  font-weight: 700;
  color: var(--link, #005f4a);
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.tool-search-category {
  display: inline-block;
  margin-inline-start: 0.65rem;
  color: var(--muted, #5f574e);
  font-size: 0.85em;
}

.related-tools {
  width: min(1080px, 92vw);
  margin: 0 auto 1.5rem;
  padding: 0.9rem 0;
  min-width: 0;
  border-top: 1px solid var(--border, #e0d7ca);
  font-family: "Space Grotesk", sans-serif;
}

.related-tools ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 520px) {
  .tool-search-form { grid-template-columns: minmax(0, 1fr); }
}

body.support-modal-open {
  overflow: hidden;
}

.support-fab {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border, #e0d7ca);
  background: #0f2f2a;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 1500;
  transition: transform 140ms ease, background 140ms ease;
}

.support-fab:hover,
.support-fab:focus-visible {
  transform: translateY(-1px);
  background: var(--accent, #007a61);
}

.support-modal-panel::backdrop {
  background: rgba(14, 20, 28, 0.55);
}

.support-modal-panel {
  width: min(820px, 94vw);
  max-height: min(86vh, 860px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--theme-border, #2d3e55);
  background: var(--theme-surface, #11192a);
  color: var(--theme-text, #f2f3f6);
  padding: 1.05rem 1.1rem 1.2rem;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

.support-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.support-modal-head h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.25rem, 2.3vw, 1.9rem);
}

.support-modal-close {
  border: 1px solid var(--theme-border, #3a4d68);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0.38rem 0.84rem;
  cursor: pointer;
}

.support-modal-panel p {
  margin: 0 0 0.75rem;
  line-height: 1.44;
}

.support-modal-link-row {
  margin-top: 0.5rem;
}

.support-modal-link-row a {
  color: var(--theme-link, #ffd88f);
  font-weight: 700;
  text-underline-offset: 0.14em;
}

@media print {
  .promotion-links, .support-fab, .support-modal-panel { display: none; }
}
