.text-diff-card { overflow: hidden; }
.text-diff-controls,
.text-diff-actions,
.text-diff-file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.text-diff-controls { justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--gt-line); background: rgba(7, 17, 31, 0.28); }
.text-diff-control-label { display: grid; gap: 5px; color: var(--gt-muted); font-size: 0.85rem; font-weight: 700; }
.text-diff-control-label select { min-height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--gt-line-strong); border-radius: 10px; color: var(--gt-text); background: #0b1b2e; font: inherit; }
.text-diff-inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.text-diff-editor { min-width: 0; padding: 22px; background: rgba(7, 17, 31, 0.38); }
.text-diff-editor + .text-diff-editor { border-left: 1px solid var(--gt-line); }
.text-diff-editor-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.text-diff-editor-heading h3 { margin: 0; font-size: 1.05rem; }
.text-diff-editor-heading span { color: var(--gt-subtle); font-size: 0.8rem; }
.text-diff-source { display: block; width: 100%; min-height: 220px; resize: vertical; padding: 14px; border: 1px solid var(--gt-line-strong); border-radius: 12px; color: #dbeafe; background: #081522; font: 0.88rem/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.text-diff-source:focus,
.text-diff-control-label select:focus { outline: 3px solid rgba(56, 189, 248, 0.28); outline-offset: 2px; border-color: var(--gt-accent); }
.text-diff-file-label { display: inline-flex; align-items: center; min-height: 38px; padding: 0 11px; border: 1px solid var(--gt-line-strong); border-radius: 9px; color: var(--gt-muted); cursor: pointer; font-size: 0.8rem; font-weight: 700; }
.text-diff-file-label:hover,
.text-diff-file-label:focus-within { border-color: var(--gt-accent); color: var(--gt-text); }
.text-diff-file-label input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-diff-status { min-height: 1.7em; margin: 12px 0 0; color: var(--gt-muted); font-size: 0.86rem; }
.text-diff-results { padding: 22px; color: #172033; background: #f8fafc; }
.text-diff-results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.text-diff-results-heading h3 { margin: 0; color: #0f172a; font-size: 1.05rem; }
.text-diff-stats { color: #64748b; font-size: 0.8rem; }
.text-diff-empty { margin: 0; padding: 20px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #64748b; text-align: center; }
.diff-output { display: grid; overflow: auto; border: 1px solid #cbd5e1; border-radius: 12px; font: 0.86rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.diff-output[hidden] { display: none; }
.diff-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.diff-row + .diff-row { border-top: 1px solid #e2e8f0; }
.diff-cell { min-width: 0; min-height: 1.55em; padding: 5px 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.diff-cell + .diff-cell { border-left: 1px solid #e2e8f0; }
.diff-cell-deleted { background: #fee2e2; }
.diff-cell-inserted { background: #dcfce7; }
.diff-cell-empty { background: #f1f5f9; }
.diff-cell-equal { background: #fff; }
@media (max-width: 760px) {
  .text-diff-inputs { grid-template-columns: 1fr; }
  .text-diff-editor + .text-diff-editor { border-top: 1px solid var(--gt-line); border-left: 0; }
}
@media (max-width: 480px) {
  .text-diff-controls, .text-diff-editor, .text-diff-results { padding: 16px; }
  .text-diff-controls { align-items: stretch; }
  .text-diff-control-label, .text-diff-control-label select { width: 100%; }
  .text-diff-source { min-height: 190px; font-size: 0.82rem; }
  .text-diff-results-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}
