:root { color-scheme: light dark; --hl: #fde68a; --hl-fg: #111; --muted: #6b7280; --line: #d1d5db; }
@media (prefers-color-scheme: dark) { :root { --hl: #854d0e; --hl-fg: #fff; --muted: #9ca3af; --line: #374151; } }
* { box-sizing: border-box; }
body { font: 15px/1.5 system-ui, sans-serif; margin: 0 auto; max-width: 1200px; padding: 1rem; }
h2 { font-size: 1rem; margin: 1rem 0 .4rem; }
.notice { position: sticky; top: 0; margin: 0 0 1rem; padding: .6rem .8rem; border: 1px solid var(--line);
          border-left: 4px solid #2563eb; background: Canvas; z-index: 1; }
#controls { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; }
main { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { main { grid-template-columns: 1fr; } }
textarea, .draft { width: 100%; min-height: 18rem; padding: .6rem; border: 1px solid var(--line);
                   font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft { overflow: auto; }
.hl { background: var(--hl); color: var(--hl-fg); border-radius: 2px; cursor: help; }
.hl.word { background: none; color: inherit; border-bottom: 2px solid #d97706; cursor: default; }
.notice.warn { border-left-color: #d97706; position: static; }
.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.tabs button { padding: .4rem .9rem; border: 1px solid var(--line); background: Canvas; color: CanvasText; font: inherit; cursor: pointer; }
.tabs button[aria-pressed="true"] { border-color: #2563eb; border-bottom-width: 3px; font-weight: 600; }
#d-controls { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; }
.band { font-size: 1.15rem; font-weight: 600; margin: 0 0 .6rem; }
#d-signals { margin-bottom: .4rem; }
.hl:focus { outline: 2px solid #2563eb; }
.hl.empty::before { content: "\00b7"; }   /* visible marker for removed text; not copied */
.checks { list-style: none; padding: 0; margin: -.6rem 0 1rem; font-size: .85rem; }
.checks .off, .checks .warn { color: #b45309; }
.detail { min-height: 2.6rem; margin-top: .4rem; font-size: .9rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.edits { list-style: none; padding: 0; margin: 0; }
.edit { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.edit label { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.edit.rejected { opacity: .55; }
.rule { font-family: ui-monospace, monospace; font-size: .85rem; }
.risk.high { color: #b91c1c; font-weight: 600; }
.reason, .muted { color: var(--muted); }
.small { font-size: .8rem; }
table { border-collapse: collapse; }
td, th { border: 1px solid var(--line); padding: .25rem .6rem; text-align: left; }
td:nth-child(n+2) { font-variant-numeric: tabular-nums; }
