.diff-input { min-height: 12rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .95rem; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
/* Grid items default to min-width:auto; without this a long pre-formatted line widens the page. */
#diff-form > *, #result-section, .diff-scroll { min-width: 0; }
.diff-scroll { max-width: 100%; }
.diff-options { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.diff-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.diff-summary[hidden], .diff-note[hidden], #result-section[hidden] { display: none; }
.diff-note { margin: 0; padding: .75rem 1rem; border-inline-start: 4px solid var(--accent); border-radius: .5rem; background: #0c1220; }
.diff-scroll { max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: .75rem; background: #0c1220; }
.diff-scroll:focus-visible { outline-offset: -3px; }
.diff-table { width: 100%; border-collapse: collapse; font: .92rem/1.45 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.diff-table thead th { position: sticky; top: 0; z-index: 1; padding: .45rem .5rem; background: var(--card); color: var(--muted); font: 600 .8rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; text-align: start; white-space: nowrap; }
.diff-table td { padding: .1rem .5rem; vertical-align: top; }
.diff-num { width: 1%; color: var(--muted); text-align: end; white-space: nowrap; user-select: none; direction: ltr; }
.diff-mark { width: 1%; font-weight: 800; text-align: center; user-select: none; }
.diff-text { white-space: pre; min-width: 12rem; }
.diff-remove { background: #3a1820; }
.diff-remove .diff-mark { color: var(--danger); }
.diff-add { background: #133224; }
.diff-add .diff-mark { color: var(--ok); }
.diff-text del { background: #7a2b38; color: #fff; text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 2px; }
.diff-text ins { background: #23704a; color: #fff; text-decoration: underline; text-underline-offset: 2px; border-radius: 2px; }
.diff-hidden td { padding: .4rem .75rem; color: var(--muted); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-style: italic; background: var(--panel); }
.diff-eol { color: #ffd36e; font: italic .8rem system-ui, -apple-system, "Segoe UI", sans-serif; }
@media (max-width: 480px) {
  .diff-summary { grid-template-columns: 1fr; }
}
