/* 五个工具沿用工具箱的卡片布局，结果区独立滚动，窄屏也可查看完整列。 */
.workbench .utility-pane-heading { font-weight: 600; }
.workbench .utility-editor:focus-within { box-shadow: inset 0 0 0 2px #719afb; }
.workbench-result { margin-top: 20px; }
.workbench-result[hidden] { display: none; }
.workbench-scroll { max-height: 31rem; overflow: auto; }
.workbench-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; color: #43556f; }
.workbench-table caption { padding: 14px 18px; color: #475b77; text-align: left; }
.workbench-table th, .workbench-table td { padding: 9px 14px; border-bottom: 1px solid #edf0f5; }
.workbench-table thead { position: sticky; top: 0; background: #f6f8fc; z-index: 1; }
.workbench-table td { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 24rem; min-width: 5rem; }
.text-diff-table { table-layout: fixed; }
.text-diff-table tr { scroll-margin-block-start: 3rem; }
.text-diff-table td { vertical-align: top; }
.text-diff-table td > code { font: 14px/1.6 var(--mono); }
.text-diff-number { color: #586a85; font: 12px/1.6 var(--mono); display: inline-block; min-width: 4ch; margin-right: 10px; }
.text-diff-changed td:first-child, .text-diff-removed td:first-child { background: #fff0f0; }
.text-diff-changed td:last-child, .text-diff-added td:last-child { background: #eaf9ef; }
.text-diff-changed td:first-child mark { color: #731c1c; background: #ffd1d1; }
.text-diff-changed td:last-child mark { color: #174e36; background: #b5edca; }
.text-diff-table tr.is-current td { box-shadow: inset 0 2px #4b74cf, inset 0 -2px #4b74cf; }
#text-diff-position { color: #52647d; font-size: 14px; }
.regex-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(5rem,8rem); gap: 14px; padding: 18px 20px; }
.regex-fields label { display: grid; gap: 6px; color: #43556f; font-size: 14px; }
.regex-fields label:last-child { grid-column: 1 / -1; }
.regex-fields input, .regex-fields textarea { min-width: 0; padding: 9px 10px; border: 1px solid #dfe5ee; border-radius: 6px; font: 15px/1.5 var(--mono); }
.workbench .regex-fields textarea:focus-visible { outline: 2px solid #719afb !important; }
.regex-fields textarea { resize: vertical; }
.regex-result-text { margin: 0; min-height: 4rem; max-height: 16rem; overflow: auto; padding: 15px 20px; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.7 var(--mono); }
.regex-result-text mark { background: #ffebad; color: #503a04; }
.regex-details { margin: 0; max-height: 18rem; overflow: auto; padding: 12px 20px 12px 45px; color: #475b77; overflow-wrap: anywhere; }
.regex-details:empty { display: none; }
@media (max-width: 640px) {
  .regex-fields { padding: 14px; }
  .workbench-table th, .workbench-table td { padding: 8px; }
  .text-diff-number { margin-right: 3px; }
}
