.serp-preview-page .tool-body {
  gap: var(--space-lg);
}

.serp-editor {
  align-items: start;
}

.serp-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.serp-field-wide {
  grid-column: 1 / -1;
}

.serp-field label {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.serp-field input,
.serp-field textarea,
.serp-output {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--input-text);
  font: inherit;
  line-height: var(--line-normal);
  padding: 0.8rem 0.9rem;
}

.serp-field textarea,
.serp-output {
  resize: vertical;
}

.serp-field input:focus,
.serp-field textarea:focus,
.serp-output:focus {
  border-color: var(--primary);
  outline: 2px solid color-mix(in srgb, var(--primary) 24%, transparent);
  outline-offset: 2px;
}

.serp-counter,
.serp-output,
.serp-preview-page .tool-hint {
  color: var(--muted);
  font-size: var(--text-sm);
}

.serp-counter.is-good {
  color: var(--positive);
}

.serp-counter.is-warning {
  color: color-mix(in srgb, #b45309 88%, var(--text));
}

.serp-actions {
  --ml-cluster-gap: var(--space-sm);
}

.serp-output {
  min-height: 8.5rem;
}

.serp-preview-shell {
  margin-block: var(--space-xl);
}

.serp-preview-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.serp-preview-card h2 {
  margin: 0;
}

.serp-result {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: var(--space-lg);
}

.serp-result-mobile {
  max-width: 390px;
}

.serp-url,
.serp-title,
.serp-description {
  margin: 0;
}

.serp-url {
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 76%, var(--muted));
  font-size: 0.86rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.serp-title {
  overflow: hidden;
  margin-top: 0.25rem;
  color: #1a0dab;
  font-size: 1.22rem;
  line-height: 1.3;
}

.serp-description {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.3rem;
  color: #4d5156;
  font-size: 0.95rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.serp-result-mobile .serp-title {
  font-size: 1.08rem;
}

.serp-result-mobile .serp-description {
  -webkit-line-clamp: 3;
}

html.dark .serp-title {
  color: #8ab4f8;
}

html.dark .serp-description {
  color: #bdc1c6;
}

@media (max-width: 720px) {
  .serp-editor {
    grid-template-columns: 1fr;
  }

  .serp-preview-shell {
    grid-template-columns: 1fr;
  }

  .serp-result-mobile {
    max-width: none;
  }
}
