/* Text Compare only. Loaded on /text-compare/, never globally. Colours use the site tokens so light and dark both work. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cmp-wrap { position: relative; overflow-x: auto; border: 1px solid var(--ssp-line); border-radius: .6rem; background: var(--ssp-surface); }
.cmp { width: 100%; min-width: 40rem; border-collapse: collapse; table-layout: fixed; font: .875rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cmp th { padding: .4rem .6rem; text-align: left; background: var(--ssp-surface-2); border-bottom: 1px solid var(--ssp-line); font-family: var(--font-sans, system-ui); }
.cmp td { padding: .15rem .6rem; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmp .ln { width: 3.2rem; text-align: right; color: var(--ssp-muted); user-select: none; padding-right: .5rem; }
.cmp tr:focus { outline: 3px solid var(--ssp-link); outline-offset: -3px; }
.cmp-gap td { text-align: center; color: var(--ssp-muted); background: var(--ssp-surface-2); font-family: var(--font-sans, system-ui); font-size: .8rem; }
.cmp-del td.tx:nth-child(2), .cmp-chg td.tx:nth-child(2) { background: light-dark(#fde8e6, #3d1a17); box-shadow: inset 4px 0 0 light-dark(#b42318, #f97066); }
.cmp-add td.tx:nth-child(4), .cmp-chg td.tx:nth-child(4) { background: light-dark(#e3f6e8, #12301c); box-shadow: inset 4px 0 0 light-dark(#157f3b, #4ade80); }
.cmp-del td.tx:nth-child(4), .cmp-add td.tx:nth-child(2) { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--ssp-surface-2) 6px 12px); }
.cmp del { background: light-dark(#f8b4ad, #7a2a24); text-decoration: line-through; border-radius: 2px; }
.cmp ins { background: light-dark(#a6e3b8, #1f5a33); text-decoration: underline; border-radius: 2px; }
.cmp-cur td.tx { outline: 2px solid var(--ssp-accent); outline-offset: -2px; }
/* Let grid items shrink so the wide table scrolls inside .cmp-wrap instead of stretching the page. */
#tool-root > *, #tool-root .tl-cols > * { min-width: 0; max-width: 100%; }
