/* Compare: the page. Colours come from the --sl-* tokens that shared/theme/theme.js sets (with fallbacks); the
 * removed and added colours are mixed into the theme's own background, so text keeps its contrast in every theme. */
:root {
  --df-bg: var(--sl-background, #161616); --df-panel: var(--sl-surface, #1f1f1f); --df-line: var(--sl-border, #333);
  --df-fg: var(--sl-text, #ececec); --df-dim: color-mix(in srgb, var(--df-fg) 78%, var(--df-panel));
  --df-accent: var(--sl-accent, #e7efff); --df-radius: 8px;
  --df-red: #e5484d; --df-green: #30a46c;
  --df-del: color-mix(in srgb, var(--df-red) 16%, var(--df-panel)); --df-ins: color-mix(in srgb, var(--df-green) 16%, var(--df-panel));
  --df-del-w: color-mix(in srgb, var(--df-red) 38%, var(--df-panel)); --df-ins-w: color-mix(in srgb, var(--df-green) 38%, var(--df-panel));
  --df-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--df-bg); color: var(--df-fg); font: 14px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; display: flex; flex-direction: column; overflow: hidden; }
p, h2 { margin: 0; }
.df-bar { position: sticky; top: 0; z-index: 5; background: var(--df-panel); border-bottom: 1px solid var(--df-line); padding: 0 16px;
  --tlbx-hbtn-h: 36px; --tlbx-hbtn-radius: 8px; --tlbx-hbtn-bg: var(--df-panel); --tlbx-hbtn-line: var(--df-line); --tlbx-hbtn-fs: 13px; }
.df-bar .brand { display: grid; place-items: center; width: 36px; height: 36px; flex: none; color: var(--df-accent); text-decoration: none; }
/* View · Panel (shared/frame/frame.css): the sides and the result in the middle, the settings on the right */
.df-main { flex: 1 1 auto; min-height: 0; }
.df-work { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-width: 0; overflow-y: auto; }
.df-sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.df-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; background: var(--df-panel); border: 1px solid var(--df-line); border-radius: var(--df-radius); }
.df-side.df-over { outline: 2px dashed var(--df-accent); outline-offset: 2px; }
.df-side-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.df-side-head h2 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.df-tag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--df-fg); }
.df-side[data-side="a"] .df-tag { background: var(--df-del-w); }
.df-side[data-side="b"] .df-tag { background: var(--df-ins-w); }
.df-name { flex: 1 1 8em; min-width: 0; color: var(--df-dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-side-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.df-mini { padding: 3px 8px; font-size: 12.5px; min-height: 28px; }
.df-text { width: 100%; min-height: 8.5em; height: 11em; max-height: 45vh; resize: vertical; font: 12.5px/1.45 var(--df-mono); color: var(--df-fg);
  background: var(--df-bg); border: 1px solid var(--df-line); border-radius: 6px; padding: 8px; tab-size: 4; }
.df-text:focus-visible { outline: 2px solid var(--df-accent); outline-offset: 1px; }
.df-text::placeholder { color: var(--df-dim); }
.df-file { display: flex; align-items: center; gap: 10px; min-height: 8.5em; padding: 8px; border: 1px solid var(--df-line); border-radius: 6px; background: var(--df-bg); }
.df-thumb { max-width: 45%; max-height: 9em; object-fit: contain; border-radius: 4px; background: repeating-conic-gradient(#8883 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.df-pdf { display: grid; place-items: center; width: 58px; height: 74px; border-radius: 4px; background: var(--df-del-w); color: var(--df-fg); font-weight: 700; font-size: 13px; }
.df-meta { color: var(--df-dim); font-size: 12.5px; }
.df-swap { align-self: center; min-width: 36px; min-height: 36px; padding: 0 8px; font-size: 16px; }
.df-err { padding: 10px 12px; border-radius: var(--df-radius); background: var(--df-del); color: var(--df-fg); border: 1px solid var(--df-red); }
.df-drop { border: 1px dashed var(--df-line); border-radius: var(--df-radius); padding: 14px; background: var(--df-panel); }
.df-settings { display: grid; gap: 10px; }
.df-group { display: grid; gap: 10px; }
.df-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; }
.df-check input { width: 18px; height: 18px; margin: 0; }
@media (pointer: coarse) { .df-mini { min-height: 44px; } .df-check input { width: 24px; height: 24px; } }
/* phones: the sides stack, the swap button sits between them */
@media (max-width: 860px) {
  .df-work { padding: 12px 12px 96px; }
  .df-sides { grid-template-columns: minmax(0, 1fr); }
  .df-swap { justify-self: center; transform: rotate(90deg); }
  .df-text { height: 8em; }
}
