.title-length-page .tool-body {
  gap: var(--space-lg);
}

.title-length-field {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: var(--space-xs);
}

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

.title-length-field input,
.title-length-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;
}

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

.title-length-status {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.title-length-label,
.title-length-count,
.title-length-verdict,
.title-length-range,
.title-length-guidance,
.title-length-output,
.title-length-page .tool-hint {
  margin: 0;
}

.title-length-label,
.title-length-range,
.title-length-guidance,
.title-length-output,
.title-length-page .tool-hint {
  color: var(--muted);
  font-size: var(--text-sm);
}

.title-length-count {
  color: var(--text);
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1;
}

.title-length-verdict {
  color: var(--text);
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: var(--weight-bold);
  line-height: var(--line-tight);
}

.title-length-count.is-good,
.title-length-verdict.is-good,
.title-length-guidance.is-good {
  color: var(--positive);
}

.title-length-count.is-short,
.title-length-verdict.is-short,
.title-length-guidance.is-short {
  color: color-mix(in srgb, #b45309 88%, var(--text));
}

.title-length-count.is-long,
.title-length-verdict.is-long,
.title-length-guidance.is-long {
  color: color-mix(in srgb, #b91c1c 88%, var(--text));
}

.title-length-meter {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 74%, transparent);
}

.title-length-band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 71.42%;
  width: 14.28%;
  background: color-mix(in srgb, var(--positive) 22%, transparent);
}

.title-length-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: inherit;
  background: color-mix(in srgb, #b45309 88%, var(--primary));
  transition:
    width var(--transition-base),
    background-color var(--transition-base);
}

.title-length-meter.is-good .title-length-fill {
  background: var(--positive);
}

.title-length-meter.is-long .title-length-fill {
  background: color-mix(in srgb, #b91c1c 88%, var(--primary));
}

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

.title-length-output {
  min-height: 8rem;
  resize: vertical;
}

@media (max-width: 640px) {
  .title-length-status {
    grid-template-columns: 1fr;
  }
}
