:root {
  color-scheme: light;
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #eef0f4; --ink: #15171c; --ink-2: #4a505c; --ink-3: #6b7280;
  --line: #dde1e8; --accent: #3b4fd8; --accent-ink: #ffffff;
  --a: #b4492c; --b: #2a7a52;
  --same: #8b93a1; --same-bg: transparent;
  --rew: #2f6fb8; --rew-bg: #eaf2fc;
  --chg: #b26a00; --chg-bg: #fff4e0;
  --rem: #b3261e; --rem-bg: #fdecea;
  --add: #1d7a3e; --add-bg: #e7f5ec;
  --mov: #7a4cc2;
  --del-bg: #f9d3cf; --ins-bg: #cdeed8;
  --good: #1d7a3e; --bad: #b3261e; --warn: #8a5a00;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(20,30,60,.05);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111318; --panel: #1a1d24; --panel-2: #232731; --ink: #eef0f4; --ink-2: #c0c5cf; --ink-3: #959cab;
  --line: #2d323d; --accent: #8c9bff; --accent-ink: #0d1020;
  --a: #f08a6c; --b: #6fcf9c;
  --same: #8b93a1; --rew: #7fb2ff; --rew-bg: #1b2a40; --chg: #f0b45a; --chg-bg: #3a2c12;
  --rem: #ff8a80; --rem-bg: #3d1d1b; --add: #6fcf8e; --add-bg: #173323; --mov: #c3a2ff;
  --del-bg: #5c2622; --ins-bg: #1e4a30;
  --good: #6fcf8e; --bad: #ff8a80; --warn: #f0c060; --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111318; --panel: #1a1d24; --panel-2: #232731; --ink: #eef0f4; --ink-2: #c0c5cf; --ink-3: #959cab;
    --line: #2d323d; --accent: #8c9bff; --accent-ink: #0d1020;
    --a: #f08a6c; --b: #6fcf9c;
    --same: #8b93a1; --rew: #7fb2ff; --rew-bg: #1b2a40; --chg: #f0b45a; --chg-bg: #3a2c12;
    --rem: #ff8a80; --rem-bg: #3d1d1b; --add: #6fcf8e; --add-bg: #173323; --mov: #c3a2ff;
    --del-bg: #5c2622; --ins-bg: #1e4a30;
    --good: #6fcf8e; --bad: #ff8a80; --warn: #f0c060; --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }

button, .filebtn { font: inherit; cursor: pointer; border-radius: 10px; padding: .55rem 1rem; border: 1px solid var(--line); background: var(--panel); color: var(--ink); min-height: 40px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.ghost:hover:not(:disabled), .filebtn:hover { background: var(--panel-2); }
button.small, .filebtn { font-size: .875rem; padding: .35rem .75rem; min-height: 34px; }
.filebtn { display: inline-flex; align-items: center; white-space: nowrap; }
button:focus-visible, input:focus-visible, textarea:focus-visible, .filebtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.linkbtn { border: 0; background: none; color: var(--accent); padding: 0; min-height: 0; text-decoration: underline; font-size: inherit; }
input[type="text"] { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .55rem; }
textarea { width: 100%; font: 15px/1.55 ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; resize: vertical; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1rem; max-width: 1240px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .6rem; }
.backlink { font-weight: 700; text-decoration: none; color: var(--ink); }
.freechip { font-size: .75rem; font-weight: 700; letter-spacing: .02em; color: var(--good); border: 1px solid currentColor; border-radius: 99px; padding: .05rem .5rem; }
.topactions { display: flex; align-items: center; gap: .5rem; }
.who { font-size: .85rem; color: var(--ink-3); }
.glyphbtn { width: 40px; padding: 0; font-size: 1.1rem; }

main { max-width: 1240px; margin: 0 auto; padding: 0 1rem 2rem; }
.hero { padding: 1.2rem 0 .8rem; }
.hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
.lede { color: var(--ink-2); max-width: 760px; margin: 0; }

.modes { display: inline-flex; gap: 4px; padding: 4px; background: var(--panel-2); border-radius: 12px; margin: .4rem 0 1rem; }
.mode { border: 0; background: transparent; min-height: 36px; padding: .4rem 1rem; }
.mode.on { background: var(--panel); box-shadow: var(--shadow); font-weight: 600; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: 1rem; }
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.doc { border-radius: 12px; }
.doc.over textarea { border-color: var(--accent); background: var(--panel-2); }
.doc-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.docname { flex: 1; min-width: 0; font-weight: 600; }
.side { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 7px; font-weight: 800; font-size: .85rem; color: #fff; flex: none; }
.side-a { background: var(--a); } .side-b { background: var(--b); }
:root[data-theme="dark"] .side { color: #111; }
.docbox { min-height: 220px; }
.optrow { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; }
.seg { display: inline-flex; align-items: center; gap: .9rem; }
.seg-label { color: var(--ink-3); font-size: .9rem; }
.seg label { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.runrow, .btnrow { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .8rem; }
.hint { margin: .45rem 0 0; font-size: .9rem; color: var(--ink-2); min-height: 1.2em; }
.hint.bad { color: var(--bad); } .hint.good { color: var(--good); } .hint.warn { color: var(--warn); }
.modelnote { margin: .6rem 0 0; }
.warnings { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--warn); font-size: .9rem; }
.warnings:empty { display: none; }

.prog-head { display: flex; justify-content: space-between; align-items: baseline; }
.elapsed { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.steps { list-style: none; padding: 0; margin: .3rem 0 .8rem; display: grid; gap: .35rem; }
.steps li { position: relative; padding-left: 1.6rem; color: var(--ink-3); }
.steps li::before { content: ""; position: absolute; left: .2rem; top: .45em; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--line); }
.steps li.on { color: var(--ink); font-weight: 600; }
.steps li.on::before { border-color: var(--accent); animation: pulse 1s infinite alternate; }
.steps li.done { color: var(--ink-2); }
.steps li.done::before { background: var(--good); border-color: var(--good); }
.stepinfo { font-weight: 400; color: var(--ink-3); margin-left: .4rem; font-size: .9rem; }
@keyframes pulse { from { opacity: 1; } to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .steps li.on::before { animation: none; } }
.bar { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--accent); transition: width .25s; }

.res-head { display: flex; align-items: center; gap: .6rem; }
.res-head h2 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.badge-ex { font-size: .75rem; font-weight: 700; border-radius: 99px; padding: .1rem .55rem; background: var(--panel-2); color: var(--ink-2); }
.verdict { margin: .4rem 0 .9rem; color: var(--ink-2); font-size: 1.02rem; }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.tile { display: flex; flex-direction: column; text-align: left; align-items: flex-start; gap: .1rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); min-height: 0; }
.tile-main { background: var(--panel-2); }
.t-big { font-size: 1.7rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.t-small { font-weight: 600; font-size: .9rem; }
.t-sub { font-size: .78rem; color: var(--ink-3); }
.tile.st-changed .t-big { color: var(--chg); } .tile.st-removed .t-big { color: var(--rem); } .tile.st-added .t-big { color: var(--add); }
.tile.st-reworded .t-big { color: var(--rew); } .tile.st-same .t-big { color: var(--same); }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.2rem; align-items: start; }
.controls .check { grid-column: 1 / -1; }
.ctl { display: flex; flex-direction: column; gap: .3rem; }
.ctl > span { font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: .4rem; }
.range input { width: 100%; accent-color: var(--accent); }
output { font-variant-numeric: tabular-nums; color: var(--accent); }
.check { display: flex; gap: .5rem; align-items: center; font-size: .95rem; }

.viewbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { min-height: 32px; padding: .2rem .7rem; border-radius: 99px; font-size: .86rem; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.views { display: inline-flex; gap: 4px; padding: 3px; background: var(--panel-2); border-radius: 10px; }
.vbtn { border: 0; background: transparent; min-height: 32px; padding: .2rem .7rem; font-size: .86rem; }
.vbtn.on { background: var(--panel); box-shadow: var(--shadow); font-weight: 600; }

.colhead { display: grid; grid-template-columns: 1fr 120px 1fr; gap: .6rem; font-weight: 700; font-size: .85rem; color: var(--ink-3); padding: 0 .2rem .3rem; }
.colhead span:first-child { color: var(--a); } .colhead span:last-child { color: var(--b); }
.rows { display: grid; gap: .5rem; }
.row { display: grid; grid-template-columns: 1fr 120px 1fr; gap: .6rem; padding: .6rem; border-radius: 10px; border: 1px solid var(--line); border-left-width: 4px; }
.row .flags { grid-column: 1 / -1; }
.cell { font-size: .95rem; overflow-wrap: anywhere; }
.empty-cell { color: var(--ink-3); font-size: .82rem; font-style: italic; align-self: center; }
.utag { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--ink-3); margin-right: .35rem; font-variant-numeric: tabular-nums; }
.mid { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; }
.badge { font-size: .75rem; font-weight: 700; border-radius: 99px; padding: .1rem .5rem; line-height: 1.3; }
.score { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.05rem; }
.movedtag { font-size: .72rem; font-weight: 700; color: var(--mov); border: 1px solid currentColor; border-radius: 99px; padding: 0 .45rem; }
.row.st-same { border-left-color: var(--same); }
.row.st-same .cell { color: var(--ink-2); }
.row.st-same .badge { background: var(--panel-2); color: var(--ink-3); }
.row.st-reworded { border-left-color: var(--rew); }
.row.st-reworded .badge { background: var(--rew-bg); color: var(--rew); }
.row.st-changed { border-left-color: var(--chg); background: var(--chg-bg); }
.row.st-changed .badge { background: var(--panel); color: var(--chg); }
.row.st-removed { border-left-color: var(--rem); background: var(--rem-bg); }
.row.st-removed .badge { background: var(--panel); color: var(--rem); }
.row.st-added { border-left-color: var(--add); background: var(--add-bg); }
.row.st-added .badge { background: var(--panel); color: var(--add); }
.row.is-moved { box-shadow: inset 0 0 0 1px var(--mov); }
del { background: var(--del-bg); text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 3px; padding: 0 2px; }
ins { background: var(--ins-bg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; border-radius: 3px; padding: 0 2px; }
.flags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.flag { font-size: .8rem; border-radius: 6px; padding: .1rem .5rem; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); }
.flag.fk-negation, .flag.fk-opposite { color: var(--rem); border-color: currentColor; }
.flag.fk-number, .flag.fk-date, .flag.fk-obligation, .flag.fk-quantity { color: var(--chg); border-color: currentColor; }
.chip.st-changed:not(.on) { color: var(--chg); } .chip.st-removed:not(.on) { color: var(--rem); } .chip.st-added:not(.on) { color: var(--add); } .chip.st-reworded:not(.on) { color: var(--rew); }
.rows.v-list .row { grid-template-columns: 1fr; }
.rows.v-list .mid { flex-direction: row; justify-content: flex-start; order: -1; }
.rows.v-list .empty-cell { display: none; }
.more { justify-self: center; }
.empty { color: var(--ink-3); margin: .5rem 0 0; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.exrow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .7rem; }
.gauge { display: grid; gap: .35rem; }
.g-num { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.g-bar { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--panel-2) 0 35%, var(--rew-bg) 35% 60%, var(--panel-2) 60% 80%, var(--add-bg) 80%); overflow: hidden; border: 1px solid var(--line); }
.g-fill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s; }
.g-scale { display: grid; grid-template-columns: 35% 25% 20% 20%; font-size: .75rem; color: var(--ink-3); }
#pairResult.has-flags .g-num { color: var(--chg); }
#pairResult.band-same:not(.has-flags) .g-num, #pairResult.band-identical .g-num { color: var(--add); }
.pairdiff p { margin: .4rem 0; display: flex; gap: .5rem; align-items: baseline; }

.savedlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.savedlist li { border: 1px solid var(--line); border-radius: 10px; padding: .7rem; }
.savedlist .btnrow { margin-top: .4rem; }
.report { white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: .7rem; border-radius: 8px; max-height: 420px; overflow: auto; }
.howto ol { padding-left: 1.2rem; margin: 0 0 .5rem; color: var(--ink-2); }
.howto li { margin-bottom: .35rem; }
.faq h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.faq p { margin: 0 0 .5rem; color: var(--ink-2); line-height: 1.5; }
.foot { max-width: 1240px; margin: 0 auto; padding: 0 1rem 2rem; color: var(--ink-3); font-size: .85rem; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .docs, .pair, .controls { grid-template-columns: 1fr; }
  .colhead { display: none !important; }
  .rows.v-side .row { grid-template-columns: 1fr; }
  .rows.v-side .mid { flex-direction: row; justify-content: flex-start; order: -1; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-big { font-size: 1.4rem; }
  .topbar { padding: .6rem 1rem; }
  .who { display: none; }
  .runrow button { flex: 1 1 auto; }
}

/* ---- 2026-12 layout: header, drop zones, sensitivity, summary, What changed, sticky toolbar, quiet rows ---- */
.brand-icon { border-radius: 6px; flex: none; }
.topactions button { white-space: nowrap; }
@media (min-width: 721px) { .badge { white-space: nowrap; } .rows.v-side .row, .colhead { grid-template-columns: 1fr 140px 1fr; } }
.brand-name { font-weight: 750; letter-spacing: -.01em; white-space: nowrap; }
.topactions .backlink { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.topactions .backlink:hover { color: var(--ink); text-decoration: underline; }
a:focus-visible, summary:focus-visible, select:focus-visible, .segctl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.doc-head { gap: .45rem; }
.docname { border-color: transparent !important; background: transparent !important; padding: .2rem .35rem; border-radius: 6px; text-overflow: ellipsis; text-decoration: underline dotted var(--line); text-underline-offset: 4px; }
.docname:hover { background: var(--panel-2) !important; }
.docname:focus { border-color: var(--line) !important; background: var(--panel) !important; text-decoration: none; }
.filebtn { border: 1px solid var(--line); background: var(--panel); }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 4px 4px 0; transition: border-color .15s, background-color .15s; }
.dropzone textarea { border: 0; background: transparent; display: block; min-height: 190px; }
.dropzone textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.drophint { margin: 0; padding: .35rem .6rem .45rem; font-size: .85rem; color: var(--ink-3); border-top: 1px dashed var(--line); }
.dropzone.filled { border-style: solid; }
.dropzone.filled .drophint { display: none; }
.dropzone.over { border-color: var(--accent); background: var(--panel-2); }
.dropzone.over .drophint { color: var(--accent); font-weight: 600; display: block; }

.optrow { gap: .7rem 1.6rem; margin-top: .9rem; }
.opt { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.opt-label { color: var(--ink-3); font-size: .9rem; }
.segctl { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border-radius: 10px; }
.segctl label { position: relative; cursor: pointer; }
.segctl input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segctl span { display: block; padding: .3rem .8rem; border-radius: 8px; font-size: .9rem; min-height: 32px; line-height: 1.5; }
.segctl input:checked + span { background: var(--panel); box-shadow: var(--shadow); font-weight: 650; }
.sensdesc { margin-top: .4rem; }
.tune { margin-top: .5rem; border: 0; padding: 0; box-shadow: none; background: transparent; }
.tune > summary, .advanced > summary, .manage > summary { cursor: pointer; font-size: .9rem; color: var(--accent); width: fit-content; padding: .15rem 0; }
.tune[open] > summary { margin-bottom: .5rem; }
.checks { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; margin: 0 0 .6rem; display: grid; gap: .35rem; }
.checks legend { font-size: .85rem; color: var(--ink-3); padding: 0 .3rem; }
.checks .check { align-items: flex-start; }
.checks .check input { margin-top: .3rem; flex: none; }
.checks small { display: block; }
.advanced { margin: 0 0 .5rem; }
.advanced .controls { margin-top: .5rem; }
.tunefoot { margin: .3rem 0 0; }
.runrow { margin-top: 1rem; }
button.big { font-size: 1.05rem; padding: .7rem 1.8rem; min-height: 46px; }
/* "press this next": a soft ring that pulses a few times, then stays as a plain ring */
.nudge { box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px var(--accent); animation: nudge 1.2s ease-in-out 3; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px var(--accent); } 50% { box-shadow: 0 0 0 3px var(--panel), 0 0 0 11px transparent; } }
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; } }
.tryex { color: var(--ink-3); font-size: .9rem; margin-left: auto; }
.tryex .linkbtn, .altmode .linkbtn, .tunefoot .linkbtn, .subline .linkbtn { padding: .3rem 0; min-height: 30px; }
.modelnote { display: flex; flex-wrap: wrap; gap: .2rem .7rem; align-items: baseline; }
.manage p { margin: .2rem 0 0; }
.altmode { margin: .7rem 0 0; }
#pairPane h2 { margin-top: .6rem; }

.res-head { flex-wrap: wrap; }
.res-head #editTexts { margin-left: auto; }
#resTitle:focus { outline: none; }
#resTitle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.verdict { font-size: 1.12rem; color: var(--ink); margin: .5rem 0 .7rem; }
.counts { display: flex; flex-wrap: wrap; gap: .4rem; }
.count { display: inline-flex; align-items: baseline; gap: .35rem; min-height: 36px; padding: .25rem .75rem; border-radius: 99px; }
.count .t-big { font-size: 1.05rem; font-weight: 750; line-height: 1.2; }
.count .t-small { font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.count.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.count.st-changed .t-big { color: var(--chg); } .count.st-removed .t-big { color: var(--rem); } .count.st-added .t-big { color: var(--add); }
.count.st-reworded .t-big { color: var(--rew); } .count.st-same .t-big { color: var(--same); } .count.st-moved .t-big { color: var(--mov); }
.subline { margin: .55rem 0 0; }

.digest h2 { font-size: 1.2rem; margin-bottom: .2rem; }
.digest > p { margin: 0 0 .6rem; }
.dg-list { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .4rem; }
.dg-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; width: 100%; text-align: left; padding: .55rem .75rem; min-height: 44px; border-radius: 10px; border-left: 4px solid var(--chg); }
.dg-item:hover { background: var(--panel-2); }
.dg-removed .dg-item { border-left-color: var(--rem); }
.dg-added .dg-item { border-left-color: var(--add); }
.dg-where { font-size: .78rem; font-weight: 650; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dg-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.rc { font-size: .88rem; font-weight: 650; border-radius: 6px; padding: .05rem .5rem; border: 1px solid currentColor; color: var(--chg); background: var(--panel); overflow-wrap: anywhere; }
.rc-negation, .rc-opposite, .rc-removed { color: var(--rem); }
.rc-added { color: var(--add); }
.rc-moved { color: var(--mov); }
.rc-drift { color: var(--ink-2); }
.dg-text { font-size: .9rem; color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.listcard { padding-top: 0; }
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; background: var(--panel); padding: .7rem 0 .6rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.tb-item { display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; }
.tb-label { color: var(--ink-3); }
.toolbar select { font: inherit; font-size: .88rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .45rem; min-height: 34px; max-width: 100%; }
.toolbar .pager { margin-left: auto; }
.pager { display: inline-flex; align-items: center; gap: .35rem; }
#changePos { min-width: 4.2rem; text-align: center; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tb-check { cursor: pointer; }
.legend { margin: 0 0 .6rem; }
.row { scroll-margin-top: 120px; }
.row:focus { outline: none; }
.row.is-current, .row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row .rowfoot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.rowmore { font-size: .82rem; }
.score { display: none; font-size: .75rem; font-weight: 500; color: var(--ink-3); }
.rows.show-scores .score { display: inline; }
.utag { border-radius: 5px; padding: 0 .35rem; color: #fff; font-size: .7rem; }
.utag-a { background: var(--a); } .utag-b { background: var(--b); }
:root[data-theme="dark"] .utag { color: #111; }
/* reworded and unchanged passages stay quiet: muted text, no fill, no word marks unless asked for */
.row.st-reworded .cell, .row.st-same .cell { color: var(--ink-3); }
.row.st-reworded, .row.st-same { border-left-width: 2px; padding-top: .45rem; padding-bottom: .45rem; }
.rows.v-redline .cell { font-size: 1rem; line-height: 1.65; }
.rows.v-redline .row.st-reworded .cell del, .rows.v-redline .row.st-reworded .cell ins { background: transparent; }
.howto h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.howto ul { padding-left: 1.2rem; margin: 0 0 .5rem; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (max-width: 720px) {
  .chip-extra { display: none; }
  .topbar .brand { min-width: 0; gap: .4rem; }
  .topactions { gap: .3rem; flex: none; }
  .topactions button.small { padding: .3rem .55rem; }
  .brand-name { font-size: .95rem; }
  .topbar { gap: .5rem; }
  .topactions .backlink { display: none; }
  .tryex { margin-left: 0; flex-basis: 100%; }
  .runrow .big { flex: 1 1 100%; }
  .runrow button.small { flex: 0 1 auto; }
  .dropzone textarea { min-height: 120px; height: 150px; }
  /* once there is a result, the two texts fold down to a few lines; focusing one opens it again */
  .has-result .dropzone textarea { min-height: 68px; height: 68px; }
  .has-result .dropzone textarea:focus { height: 200px; }
  .counts { gap: .3rem; }
  .count { padding: .2rem .6rem; min-height: 34px; }
  .listcard { padding-left: .8rem; padding-right: .8rem; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .5rem; padding: .5rem 0 .45rem; }
  .toolbar .tb-label { display: none; }
  .toolbar .tb-item select { width: 100%; }
  .toolbar .pager { margin-left: 0; justify-self: end; gap: .15rem; }
  .toolbar .views { justify-self: start; }
  .pager .ghost { padding: .3rem .6rem; }
  .pager .lbl { display: none; }
  #changePos { min-width: 3.4rem; }
  .vbtn { padding: .2rem .6rem; }
  #vSide { display: none; }       /* on a narrow screen side by side is the stacked view */
  .tb-check { display: none; }
  .row { scroll-margin-top: 150px; }
  .rows.v-side .row .cell + .mid { order: -1; }
}

/* print: the result with its settings, the summary of changes and the rows; nothing else */
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; --bg: #fff; --panel: #fff; --panel-2: #f2f2f2; --ink: #000; --ink-2: #222; --ink-3: #555; --line: #bbb;
    --chg-bg: #fff; --rem-bg: #fff; --add-bg: #fff; --rew-bg: #fff; --del-bg: #eee; --ins-bg: #eee; --chg: #7a4a00; --rem: #8f1d17; --add: #145c2e; --rew: #1f4f86; --shadow: none; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .hero, #inputCard, #progress, .toolbar, #savedCard, #pairPane, .howto, .foot, .noprint, #results > .card:last-child, .more, .rowmore { display: none !important; }
  main { max-width: none; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; margin-bottom: 12pt; }
  .count, .dg-item, .row { break-inside: avoid; }
  .dg-item { border-top: 0; border-right: 0; border-bottom: 0; border-radius: 0; min-height: 0; padding: 2pt 6pt; }
  .dg-text { display: block; }
  .row { border-radius: 0; }
  .row.is-current { outline: none; }
  .row.st-reworded .cell, .row.st-same .cell { color: #333; }
  del { text-decoration: line-through; } ins { text-decoration: underline; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* docs pages (api.html, tokens.html) */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.sep { color: var(--ink-3); }
@media (max-width: 440px) { .freechip { display: none; } .brand-name { overflow: hidden; text-overflow: ellipsis; } }
