.tools-main {
  padding: 6rem 0 4rem;
  background: var(--bg-darker);
  min-height: 70vh;
}

.tools-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.tools-intro {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.tools-intro a {
  color: var(--primary-teal);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.tool-card:hover {
  border-color: var(--primary-teal);
  transform: translateY(-3px);
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.5;
}

.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  max-width: 720px;
}

.tool-panel .form-label {
  display: block;
  margin: 1rem 0 0.35rem;
}

.tool-panel .form-input,
.tool-panel .form-select,
.tool-textarea {
  width: 100%;
  margin-bottom: 0.5rem;
}

.tool-textarea {
  min-height: 140px;
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-main);
  resize: vertical;
}

.tool-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.tool-output {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 60px;
  margin-top: 1rem;
}

.tool-output.tool-error {
  color: var(--accent-red);
}

.tool-result {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(0, 148, 169, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  line-height: 1.6;
}

.tool-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tool-hint a {
  color: var(--primary-teal);
}

.tool-stats {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--primary-teal);
}

.tools-promo {
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed rgba(0, 148, 169, 0.4);
  border-radius: 12px;
  max-width: 720px;
}

.tools-promo p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.serp-preview {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
}

.serp-url {
  font-size: 0.8rem;
  color: #202124;
}

.serp-title {
  font-size: 1.25rem;
  color: #1a0dab;
  margin: 0.25rem 0;
  line-height: 1.3;
}

.serp-desc {
  font-size: 0.88rem;
  color: #4d5156;
  line-height: 1.5;
}

.tool-subhead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 1.25rem 0 0.5rem;
}

.tool-swatch {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  margin-top: 0.75rem;
}
