.formatter-shell {
  margin-bottom: 3.5rem;
}

.formatter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.formatter-select-label {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 650;
}

.formatter-select-label select {
  min-height: 1.9rem;
  max-width: 9rem;
  padding: 0.2rem 0.35rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
}

.formatter-toolbar .button:disabled {
  color: #879497;
  background: #eef2f1;
  border-color: #e0e7e5;
  cursor: not-allowed;
}

.formatter-grid {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.formatter-column {
  min-width: 0;
}

.formatter-field-heading {
  display: flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.formatter-field-heading label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 760;
}

.formatter-count {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
  text-align: right;
}

.formatter-column textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 340px;
  padding: 0.85rem;
  color: var(--code-ink);
  background: var(--code-bg);
  border: 1px solid #263d43;
  border-radius: 6px;
  line-height: 1.55;
  resize: vertical;
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  overflow: auto;
  font-size: 0.8rem;
}

.formatter-column textarea:focus {
  outline: 3px solid rgba(35, 103, 201, 0.35);
  outline-offset: 2px;
}

.formatter-column textarea::placeholder {
  color: #a7bfbc;
  opacity: 1;
}

.formatter-column textarea[readonly] {
  color: #dce9e6;
}

.formatter-hint {
  min-height: 1.5rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.formatter-example-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.formatter-example-row .text-button {
  padding-left: 0;
}

.content-section ol {
  max-width: 78ch;
  padding-left: 1.4rem;
  color: #40545a;
}

.content-section li {
  padding-left: 0.2rem;
  margin: 0.45rem 0;
}

.formatter-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
}

.formatter-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.9rem;
  line-height: 1.5;
}

.formatter-table th,
.formatter-table td {
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.formatter-table thead th {
  color: var(--ink);
  background: var(--surface-muted);
}

.formatter-table tbody th {
  min-width: 8.5rem;
  font-weight: 700;
}

@media (min-width: 900px) {
  .formatter-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .formatter-column textarea {
    min-height: 390px;
  }
}

@media (max-width: 420px) {
  .formatter-field-heading {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
    padding-block: 0.35rem;
  }

  .formatter-count {
    text-align: left;
  }

  .formatter-column textarea {
    min-height: 280px;
  }
}
