.text-tool-fields { display: grid; gap: 1rem; margin-bottom: 1rem; }
.text-tool-fields label { display: grid; gap: .45rem; font-weight: 650; min-width: 0; }
.text-tool-fields textarea { width: 100%; min-height: 12rem; resize: vertical; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); color: var(--ink); padding: .75rem; font: .9rem/1.5 ui-monospace, monospace; }
.text-tool-fields textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.text-tool-result { margin-top: 1rem; }
.text-tool-result textarea { min-height: 15rem; }
.text-tool-result .result-download { margin-top: .75rem; }
.text-diff { max-width: 100%; max-height: 32rem; overflow: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: .55rem; }
.text-diff:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.text-diff pre { margin: 0; padding: .65rem; font: .87rem/1.5 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.text-diff [data-change=added] { background: #edf5e9; color: #2d592e; }
.text-diff [data-change=removed] { background: #fbe8e3; color: #8a281d; }
@media (min-width: 45rem) { .text-tool-fields[data-columns=two] { grid-template-columns: 1fr 1fr; } }
