.workspace{margin-top:14px}.summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:9px;margin:20px 0}.summary-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-left:4px solid currentColor;background:#fff;border-radius:11px;padding:11px 12px;font-size:14px;font-weight:700}.summary-item strong{font-size:19px}.summary-empty{grid-column:1/-1;color:var(--muted);background:var(--soft);border-radius:11px;padding:13px}.result-grid{align-items:start}.comparison-panel{min-width:0}.compare-surface{width:100%;height:320px;min-height:320px;max-height:320px;overflow:auto;border:1px solid var(--line);background:#fbfdff;border-radius:14px;padding:17px;font-size:15px;font-family:inherit;line-height:1.72;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink)}.protected-output{resize:none;margin:0 0 10px}.entity-mark{display:inline;border:0;border-bottom:2px solid currentColor;border-radius:4px;padding:1px 3px;margin:0 -1px;font:inherit;line-height:inherit;cursor:pointer;box-decoration-break:clone;-webkit-box-decoration-break:clone;transition:box-shadow .15s,filter .15s,transform .15s}.entity-mark.inactive{color:#717b89!important;background:#edf0f4!important;border-bottom-color:#9ca7b4!important;text-decoration:line-through}.entity-mark.linked,.entity-chip.linked{box-shadow:0 0 0 3px #10243f,0 0 0 6px rgba(255,255,255,.95);position:relative;z-index:2}.category-person{color:#174ea6!important;background:#dceaff!important;border-color:#79a8ed}.category-company{color:#6533a5!important;background:#eee3ff!important;border-color:#b89ade}.category-phone{color:#08735a!important;background:#d9f5e9!important;border-color:#80cdb4}.category-email{color:#086a73!important;background:#d6f3f5!important;border-color:#7bc6cd}.category-address{color:#9b470c!important;background:#ffead8!important;border-color:#e8aa78}.category-id{color:#74520a!important;background:#fff2bd!important;border-color:#d6b34d}.category-secret{color:#a52222!important;background:#ffe0e0!important;border-color:#e29393}.result-mark{font-weight:760}.review-confirm{display:flex;align-items:flex-start;gap:9px;margin:12px 2px 3px;color:var(--muted);font-size:13px;line-height:1.45}.review-confirm input{width:17px;height:17px;margin:1px 0 0;accent-color:var(--blue)}.share-button{margin-top:9px}.details-toggle{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-top:1px solid var(--line);background:transparent;color:var(--blue);font-weight:760;padding:18px 10px 8px;margin-top:18px}.details-panel{padding:10px 0 4px}.entity-list{margin:0}.entity-chip{border-width:1px;border-style:solid;font-weight:650}.entity-dot{background:currentColor}.restore-prompt{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:18px;padding:13px;background:var(--soft);border-radius:12px;color:var(--muted);font-size:14px}.back-button{padding:0;margin:0 0 20px}.restore-card{margin:24px auto 0}.caution{margin-top:14px}.secondary-row{display:none}
@media(max-width:760px){.workspace{margin-top:8px}.summary{grid-template-columns:repeat(2,minmax(0,1fr))}.compare-surface{height:280px;min-height:280px;max-height:380px;font-size:15px}.result-grid{gap:20px}.restore-prompt{align-items:flex-start;flex-direction:column;gap:2px}.restore-prompt .text-button{padding-left:0}.entity-mark.linked,.entity-chip.linked{box-shadow:0 0 0 2px #10243f}}
.unified-card{padding:clamp(18px,2.2vw,30px)}.live-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}.panel-head{min-height:32px;margin-bottom:8px}.panel-head label,.panel-head>span:first-child{font-size:16px;font-weight:800;color:var(--navy)}.compare-input,.compare-surface{width:100%;min-height:440px!important;height:auto;max-height:none!important;overflow:visible!important;margin:0!important;font-size:16px!important;line-height:1.75!important;padding:20px!important}.compare-input{resize:none}.editable-source{outline:none;cursor:text}.editable-source:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(27,99,233,.11)}.editable-source .entity-mark{cursor:text}.empty-result{display:grid;place-items:center;min-height:398px;padding:24px;text-align:center;color:var(--muted);font-size:14px}.compact-privacy{margin:18px 0 12px}.detect-wide{max-width:420px;display:block;margin:0 auto}.result-summary-card{margin-top:14px}.result-summary-card .summary{margin-bottom:8px}.source-panel .editor-footer{min-height:50px;padding-bottom:0}.result-panel .review-confirm{min-height:37px}.result-panel .primary{margin-top:0}
@media(min-width:761px){main{width:min(1480px,calc(100% - 48px))}.intro{max-width:980px}}
@media(max-width:760px){.live-grid{grid-template-columns:1fr;gap:12px}.compare-input,.compare-surface{min-height:360px!important;font-size:16px!important;padding:17px!important}.empty-result{min-height:318px}.compact-privacy{margin-top:16px}.detect-wide{max-width:none}.panel-head{margin-bottom:6px}.result-panel{margin-top:0}}

/* Live editor: a real textarea keeps Korean IME stable; highlights sit behind it. */
.source-editor-stack{position:relative;height:520px}.source-editor-stack .compare-input,.source-editor-stack .highlight-backdrop{position:absolute;inset:0;width:100%;height:520px!important;min-height:520px!important;max-height:520px!important;margin:0!important;font:inherit;font-size:16px!important;line-height:1.75!important;padding:20px!important;white-space:pre-wrap;overflow-wrap:anywhere}.source-editor-stack .compare-input{z-index:2;overflow:auto!important;resize:none;background:#fbfdff}.source-editor-stack .compare-input.with-highlights{background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:var(--ink)}.source-editor-stack .compare-input.with-highlights::selection{background:rgba(27,99,233,.2);color:transparent;-webkit-text-fill-color:transparent}.source-editor-stack .highlight-backdrop{z-index:1;overflow:hidden!important;pointer-events:none;color:var(--ink);background:#fbfdff}.highlight-backdrop .entity-mark{padding:0;margin:0;border-radius:2px;cursor:default}.result-panel>.compare-surface{height:520px!important;min-height:520px!important;max-height:520px!important;overflow:auto!important}.empty-result{min-height:478px}.micro-actions{align-items:center}.protect-action{min-height:34px;padding:0 15px;border:0;border-radius:9px;background:var(--blue);color:#fff;font-weight:800;box-shadow:0 5px 14px rgba(27,99,233,.18)}.protect-action:hover{background:var(--blue2)}
@media(max-width:760px){.panel-head{align-items:flex-start}.micro-actions{gap:5px;flex-wrap:wrap;justify-content:flex-end}.protect-action{order:-1}.source-editor-stack{height:400px}.source-editor-stack .compare-input,.source-editor-stack .highlight-backdrop,.result-panel>.compare-surface{height:400px!important;min-height:400px!important;max-height:400px!important}.empty-result{min-height:358px}}

/* Compact single-screen review controls */
@media(min-width:761px){main{padding:26px 0 42px}.intro h1{font-size:clamp(34px,4vw,50px)}.lede{margin:10px 0 18px}.workspace{margin-top:8px}.unified-card{padding:20px 24px}.source-editor-stack{height:clamp(340px,42vh,460px)}.source-editor-stack .compare-input,.source-editor-stack .highlight-backdrop,.result-panel>.compare-surface{height:clamp(340px,42vh,460px)!important;min-height:340px!important;max-height:460px!important}.empty-result{min-height:298px}}
.result-actions{display:flex;align-items:center;gap:7px}.compact-result-action,.copy-icon-button{height:34px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--blue);font-weight:750}.compact-result-action{padding:0 11px}.copy-icon-button{width:36px;display:grid;place-items:center;padding:0}.copy-icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.compact-result-action:hover,.copy-icon-button:hover{background:#edf3ff;border-color:#a9c2ee}.inline-results{border-top:1px solid var(--line);margin-top:10px;padding-top:11px}.inline-results h2{margin:0 0 8px;font-size:16px;color:var(--navy)}.inline-results .summary{display:flex;flex-wrap:wrap;gap:7px;margin:0}.inline-results .summary-item{min-width:112px;flex:1 1 112px;max-width:190px;padding:8px 10px;border-left-width:3px;cursor:pointer}.inline-results .summary-item strong{font-size:16px}.inline-results .summary-item.selected{box-shadow:0 0 0 2px currentColor;transform:translateY(-1px)}.inline-results .details-panel{padding:9px 0 0}.inline-results .entity-list{margin:0}.inline-results .entity-chip{border-radius:9px;padding:7px 9px}.entity-state{margin-left:3px;font-size:11px;font-weight:850}.inline-footer{display:flex;align-items:center;gap:9px;margin-top:11px;color:var(--muted);font-size:12px}.inline-footer .text-button{white-space:nowrap}.help-badge{display:inline-flex;align-items:center;gap:7px;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:9px;line-height:1.35}.help-badge strong{font-size:12px;white-space:nowrap}.help-badge-wrong{color:#8a581d;background:#fff8ec;border-color:#eddbbc}.help-badge-missed{color:#315f91;background:#f1f7fd;border-color:#cfdfef}.source-panel .editor-footer{min-height:34px}.result-panel>.compare-surface{margin-bottom:0}.result-summary-card,.compact-privacy,.trust-row{display:none!important}
@media(max-width:760px){.inline-results{margin-top:14px}.inline-results .summary-item{max-width:none}.inline-footer{align-items:stretch;flex-direction:column}.help-badge{width:100%}.result-actions{gap:5px}}

/* Product navigation, ad inventory, theme, and direct entity controls */
.top-controls{display:grid;grid-template-columns:max-content minmax(420px,970px);justify-content:space-between;align-items:center;gap:20px;margin-bottom:14px}.product-nav{display:flex;gap:6px;padding:5px;border:1px solid var(--line);border-radius:14px;background:var(--soft)}.product-nav-button{height:44px;padding:0 20px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:800}.product-nav-button.active{background:var(--blue);color:#fff;box-shadow:0 6px 16px rgba(27,99,233,.2)}.ad-slot{height:72px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:0 20px;border:1px dashed #a9b9cc;border-radius:14px;background:repeating-linear-gradient(135deg,var(--soft),var(--soft) 10px,var(--paper) 10px,var(--paper) 20px);color:var(--muted)}.ad-slot span{font-size:10px;letter-spacing:.12em}.ad-slot strong{text-align:center;font-size:15px;color:var(--ink)}.ad-slot small{font-size:11px}.theme-button{width:39px;height:36px;padding:0;display:grid;place-items:center}.theme-button svg{grid-area:1/1;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sun-icon{display:none}.highlight-backdrop{z-index:3!important;pointer-events:none!important}.highlight-backdrop .entity-mark{pointer-events:none!important;cursor:default!important}.result-panel .entity-mark{cursor:pointer}.entity-chip.inactive,.result-panel .entity-mark.inactive,.highlight-backdrop .entity-mark.inactive{opacity:.48;filter:saturate(.25);text-decoration:line-through}.entity-state{display:none!important}
@media(min-width:761px){main{padding-top:16px}.workspace{margin-top:0}}
@media(max-width:1000px){.top-controls{grid-template-columns:1fr}.ad-slot{height:72px}.product-nav{width:100%}.product-nav-button{flex:1}}
@media(max-width:760px){main{padding-top:14px}.top-controls{gap:10px;margin-bottom:10px}.product-nav-button{height:42px;padding:0 10px;font-size:13px}.ad-slot{height:64px;padding:0 12px;gap:8px}.ad-slot span{display:none}.ad-slot strong{text-align:left}.ad-slot small{white-space:nowrap}}
[data-theme="dark"]{--ink:#e7eef9;--muted:#9cacbf;--line:#324158;--paper:#111b2a;--soft:#182538;--navy:#f2f6fc;--blue:#6ea0ff;--blue2:#8bb3ff;--shadow:0 18px 50px rgba(0,0,0,.3);color-scheme:dark;background:#09111d}[data-theme="dark"] body{background:radial-gradient(circle at 80% 5%,rgba(65,122,230,.14),transparent 28rem),#09111d}[data-theme="dark"] .topbar{background:rgba(9,17,29,.9);border-bottom-color:#26364d}[data-theme="dark"] .compact,[data-theme="dark"] .compact-result-action,[data-theme="dark"] .copy-icon-button{background:#152236;color:var(--ink)}[data-theme="dark"] textarea,[data-theme="dark"] .compare-surface,[data-theme="dark"] .source-editor-stack .compare-input,[data-theme="dark"] .source-editor-stack .highlight-backdrop{background:#0d1725;color:var(--ink)}[data-theme="dark"] .source-editor-stack .compare-input.with-highlights{background:transparent;color:transparent}[data-theme="dark"] .editor-card,[data-theme="dark"] .restore-card,[data-theme="dark"] .dialog{background:var(--paper)}[data-theme="dark"] .summary-item{background:#152236}[data-theme="dark"] .ad-slot{border-color:#44536a}[data-theme="dark"] .moon-icon{display:none}[data-theme="dark"] .sun-icon{display:block}
[data-theme="dark"] .category-person{color:#9bc1ff!important;background:#18345d!important;border-color:#4f79ac}[data-theme="dark"] .category-company{color:#d4b5ff!important;background:#39265a!important;border-color:#775a9b}[data-theme="dark"] .category-phone{color:#8de1c4!important;background:#153d35!important;border-color:#3d816d}[data-theme="dark"] .category-email{color:#8edce2!important;background:#163b42!important;border-color:#3d7d84}[data-theme="dark"] .category-address{color:#ffc293!important;background:#50301d!important;border-color:#98623e}[data-theme="dark"] .category-id{color:#ffe393!important;background:#4a3b18!important;border-color:#8b7330}[data-theme="dark"] .category-secret{color:#ffaaaa!important;background:#512323!important;border-color:#934949}

/* Original text controls wrapping; one unbroken alias is centered on the widest line fragment. */
.rich-output{position:relative}.highlight-backdrop .entity-mark,.result-panel .entity-mark{display:inline!important;width:auto!important;max-width:none!important;white-space:inherit!important;overflow-wrap:inherit!important;vertical-align:baseline}.aligned-token{position:relative;padding:0!important;margin:0!important;border-radius:2px!important;font-weight:inherit;color:transparent!important;-webkit-text-fill-color:transparent!important;text-shadow:none!important;box-decoration-break:clone;-webkit-box-decoration-break:clone}.alias-overlay{position:absolute;display:flex;min-width:0;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;pointer-events:none;z-index:2;font:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;text-align:center;background:transparent!important;border:0!important;box-shadow:none!important;-webkit-text-fill-color:currentColor!important}

/* Restore uses the same two-pane comparison model as protection. */
.restore-workspace-card{padding:20px 24px}.restore-compare-input{width:100%;height:clamp(340px,52vh,520px);min-height:340px;max-height:520px;overflow:auto;resize:none;margin:0;font-size:16px;line-height:1.75;padding:20px;background:#fbfdff}.restore-result-panel .protected-output{margin:0}.restore-result-panel .panel-head{justify-content:space-between}.restore-result-panel .copy-icon-button:disabled{opacity:.38}

/* Refined dark theme: layered charcoal surfaces with restrained indigo accents. */
[data-theme="dark"]{--ink:#edf1f7;--muted:#96a0b1;--line:#2b3443;--paper:#151a23;--soft:#1b222e;--navy:#f4f6fb;--blue:#8998ff;--blue2:#aab4ff;--shadow:0 24px 80px rgba(0,0,0,.42);color-scheme:dark;background:#0a0d12}
[data-theme="dark"] body{background:radial-gradient(circle at 82% -8%,rgba(91,105,218,.17),transparent 34rem),radial-gradient(circle at 10% 100%,rgba(43,93,147,.10),transparent 32rem),#0a0d12}
[data-theme="dark"] .topbar{background:rgba(10,13,18,.82);border-bottom-color:rgba(145,158,181,.16);box-shadow:0 1px 0 rgba(255,255,255,.015);backdrop-filter:blur(20px) saturate(135%)}
[data-theme="dark"] .brand{color:#f3f5fa}[data-theme="dark"] .brand-mark{background:linear-gradient(145deg,#8f9dff,#6674dc);color:#fff;box-shadow:0 8px 24px rgba(101,116,220,.28),inset 0 1px 0 rgba(255,255,255,.28)}
[data-theme="dark"] .editor-card,[data-theme="dark"] .restore-card,[data-theme="dark"] .dialog{background:linear-gradient(180deg,rgba(23,28,38,.98),rgba(17,21,29,.98));border-color:#2d3645;box-shadow:0 24px 80px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.025)}
[data-theme="dark"] textarea,[data-theme="dark"] .compare-surface,[data-theme="dark"] .source-editor-stack .compare-input,[data-theme="dark"] .source-editor-stack .highlight-backdrop{background:#0e131b;color:var(--ink);border-color:#303a49;box-shadow:inset 0 1px 0 rgba(255,255,255,.018),inset 0 12px 28px rgba(0,0,0,.10)}
[data-theme="dark"] textarea:focus,[data-theme="dark"] select:focus,[data-theme="dark"] .editable-source:focus{border-color:#7f8ff2;box-shadow:0 0 0 3px rgba(127,143,242,.14),inset 0 1px 0 rgba(255,255,255,.02)}
[data-theme="dark"] .source-editor-stack .compare-input.with-highlights{background:transparent;color:transparent;box-shadow:none}
[data-theme="dark"] .product-nav{background:#111720;border-color:#2c3544;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
[data-theme="dark"] .product-nav-button{color:#9ba6b8}[data-theme="dark"] .product-nav-button.active,[data-theme="dark"] .protect-action{background:linear-gradient(135deg,#8797ff,#6878e4);color:#fff;box-shadow:0 8px 24px rgba(94,111,220,.27),inset 0 1px 0 rgba(255,255,255,.22)}
[data-theme="dark"] .product-nav-button.active:hover,[data-theme="dark"] .protect-action:hover{background:linear-gradient(135deg,#99a6ff,#7484ec)}
[data-theme="dark"] .compact,[data-theme="dark"] .compact-result-action,[data-theme="dark"] .copy-icon-button{background:#181f2a;color:#dce2ee;border-color:#323c4d;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
[data-theme="dark"] .compact:hover,[data-theme="dark"] .compact-result-action:hover,[data-theme="dark"] .copy-icon-button:hover{background:#222a37;border-color:#465269;color:#fff}
[data-theme="dark"] .help-badge-wrong{color:#d8b37d;background:#2a241b;border-color:#4b3d2b}[data-theme="dark"] .help-badge-missed{color:#9db9d8;background:#182431;border-color:#314457}
[data-theme="dark"] .summary-item{background:#181f2a;box-shadow:inset 0 1px 0 rgba(255,255,255,.022)}
[data-theme="dark"] .ad-slot{border-color:#3a4557;background:repeating-linear-gradient(135deg,#111720,#111720 10px,#161d28 10px,#161d28 20px);color:#8490a3}
[data-theme="dark"] .ad-slot strong{color:#dce2ec}[data-theme="dark"] .inline-results{border-top-color:#2a3341}[data-theme="dark"] .toast{background:#eef1f7;color:#111721;box-shadow:0 16px 48px rgba(0,0,0,.5)}
[data-theme="dark"] .moon-icon{display:none}[data-theme="dark"] .sun-icon{display:block}
*::-webkit-scrollbar{width:10px;height:10px}[data-theme="dark"] *{scrollbar-color:#4d586a transparent}[data-theme="dark"] *::-webkit-scrollbar-thumb{background:#4d586a;border:3px solid #0e131b;border-radius:999px}
[data-theme="dark"] .category-person{color:#afc9ff!important;background:#203657!important;border-color:#5576a8}[data-theme="dark"] .category-company{color:#d8c2ff!important;background:#382b50!important;border-color:#715d91}[data-theme="dark"] .category-phone{color:#9edfc9!important;background:#183b34!important;border-color:#477d6d}[data-theme="dark"] .category-email{color:#a0dce1!important;background:#193940!important;border-color:#49777e}[data-theme="dark"] .category-address{color:#f5c19c!important;background:#462e20!important;border-color:#865b3e}[data-theme="dark"] .category-id{color:#ead58f!important;background:#41371f!important;border-color:#786a37}[data-theme="dark"] .category-secret{color:#f2aaa9!important;background:#472729!important;border-color:#855052}
[data-theme="dark"] .entity-mark.linked,[data-theme="dark"] .entity-chip.linked{box-shadow:0 0 0 2px #0b0f16,0 0 0 5px rgba(149,161,255,.72)}

@media(max-width:760px){.restore-workspace-card{padding:16px}.restore-compare-input{height:400px;min-height:400px;max-height:400px}.restore-source-panel .panel-head{align-items:center}}

/* Three reserved ad positions: one leaderboard plus two desktop rails. */
.topbar,main{position:relative;z-index:1}
@media(min-width:1680px){main{width:min(1360px,calc(100% - 360px))}}

/* Keep the usable text width identical even when only one pane needs a scrollbar. */
.source-editor-stack .compare-input,.source-editor-stack .highlight-backdrop,.result-panel>.compare-surface{scrollbar-gutter:stable}.source-editor-stack .highlight-backdrop{overflow-x:hidden!important;overflow-y:scroll!important;scrollbar-color:transparent transparent}.source-editor-stack .compare-input::-webkit-scrollbar,.source-editor-stack .highlight-backdrop::-webkit-scrollbar,.result-panel>.compare-surface::-webkit-scrollbar{width:10px;height:10px}.source-editor-stack .highlight-backdrop::-webkit-scrollbar-thumb,.source-editor-stack .highlight-backdrop::-webkit-scrollbar-track{background:transparent!important;border-color:transparent!important}

/* A missed term can be selected in the original and promoted to a first-class forced alias. */
.selection-action{position:absolute;z-index:8;left:calc(100% - 150px);top:calc(100% - 48px);height:36px;padding:0 13px;border:1px solid rgba(255,255,255,.72);border-radius:10px;background:#132d5d;color:#fff;font-size:13px;font-weight:850;box-shadow:0 10px 28px rgba(16,36,63,.28),0 0 0 3px rgba(27,99,233,.16);white-space:nowrap}.selection-action:hover{background:#1b63e9}.category-forced{color:#81245f!important;background:#f9dff0!important;border-color:#d78abb}.selection-action[hidden]{display:none!important}
[data-theme="dark"] .selection-action{background:linear-gradient(135deg,#9a4e85,#74365f);border-color:#d79bc3;box-shadow:0 12px 30px rgba(0,0,0,.42),0 0 0 3px rgba(214,126,185,.12)}[data-theme="dark"] .selection-action:hover{background:linear-gradient(135deg,#b45f9c,#894571)}[data-theme="dark"] .category-forced{color:#f0b6dc!important;background:#4b263f!important;border-color:#945879}

/* Selected source text and result aliases must remain unmistakably readable. */
.source-editor-stack .compare-input.with-highlights::selection{background:#245fd7!important;color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:none!important}
.source-editor-stack.has-manual-selection{box-shadow:0 0 0 3px rgba(36,95,215,.26);border-radius:14px}
.source-editor-stack.has-manual-selection .compare-input{z-index:5!important}
.source-editor-stack.direct-selection .highlight-backdrop{visibility:hidden!important}.source-editor-stack.direct-selection .compare-input.with-highlights{z-index:5!important;background:#fbfdff!important;color:var(--ink)!important;-webkit-text-fill-color:var(--ink)!important;caret-color:var(--ink)!important}
.source-editor-stack.has-manual-selection .selection-action{background:linear-gradient(135deg,#184cae,#123574);border-color:#fff;box-shadow:0 14px 32px rgba(14,48,110,.38),0 0 0 4px rgba(36,95,215,.23)}
.result-panel .entity-mark:not(.inactive){opacity:1!important;filter:none!important;text-shadow:none!important}
[data-theme="dark"] .source-editor-stack .compare-input.with-highlights::selection{background:#7a5cff!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
[data-theme="dark"] .source-editor-stack.direct-selection .compare-input.with-highlights{background:#0e131b!important;color:var(--ink)!important;-webkit-text-fill-color:var(--ink)!important}
[data-theme="dark"] .source-editor-stack.has-manual-selection{box-shadow:0 0 0 3px rgba(145,124,255,.42)}

/* Quiet completion state and a more refined protected-result surface. */
.result-heading{display:flex;align-items:center;gap:10px;min-width:0}.result-heading>span:first-child{font-size:16px;font-weight:800;color:var(--navy)}
.protection-status{display:inline-flex;align-items:center;gap:6px;height:25px;padding:0 9px;border:1px solid #cbd8ea;border-radius:999px;background:#f4f7fb;color:#53657d;font-size:12px;font-weight:750;white-space:nowrap}.protection-status i{width:7px;height:7px;border-radius:50%;background:#8a9ab0}.protection-status[data-state="scanning"] i{width:12px;height:12px;border:2px solid #b9c8dd;border-top-color:var(--blue);background:transparent;animation:shield-spin .75s linear infinite}.protection-status[data-state="complete"]{border-color:#b9ddcf;background:#f0faf6;color:#17634d}.protection-status[data-state="complete"] i{background:#20a474;box-shadow:0 0 0 3px rgba(32,164,116,.12)}.protection-status[data-state="error"]{border-color:#edc6c3;background:#fff6f5;color:#9f312d}.protection-status[data-state="error"] i{background:#d9514b}
@keyframes shield-spin{to{transform:rotate(360deg)}}
.protect-action:disabled{cursor:wait;opacity:.86}.compact-result-action:disabled,.copy-icon-button:disabled{cursor:not-allowed;opacity:.38}
.result-panel>.compare-surface{background:linear-gradient(180deg,#fcfdff,#f8fbff);box-shadow:inset 0 1px 0 rgba(255,255,255,.9),inset 0 0 0 1px rgba(32,71,126,.015)}
[data-theme="dark"] .protection-status{border-color:#39465a;background:#151d28;color:#b1bdce}[data-theme="dark"] .protection-status[data-state="scanning"] i{border-color:#44536b;border-top-color:#a9b5ff}[data-theme="dark"] .protection-status[data-state="complete"]{border-color:#285c4e;background:#102a24;color:#9ae2c8}[data-theme="dark"] .protection-status[data-state="complete"] i{background:#57d3a8}[data-theme="dark"] .protection-status[data-state="error"]{border-color:#68403f;background:#2b191a;color:#ffaaa6}
[data-theme="dark"] .result-panel>.compare-surface{background:linear-gradient(180deg,#101720,#0d141d);box-shadow:inset 0 1px 0 rgba(255,255,255,.025),inset 0 0 0 1px rgba(255,255,255,.01)}
@media(max-width:760px){.result-heading{gap:7px}.protection-status{height:23px;padding:0 7px;font-size:11px}}

/* Feedback review: click false positives, or switch to a real text-selection surface for misses. */
.feedback-toolbar{display:grid;gap:10px;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--soft)}
.feedback-guide{display:flex;align-items:baseline;gap:10px;line-height:1.45}.feedback-guide strong{color:var(--navy);font-size:14px}.feedback-guide span{color:var(--muted);font-size:13px}
.feedback-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.feedback-control,.feedback-submit,.forced-type-row select{min-height:38px;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);font-size:13px;font-weight:750}.feedback-control,.feedback-submit{padding:0 13px}.feedback-control:hover:not(:disabled),.forced-type-row select:hover{border-color:#8aaee9;background:#edf3ff}.feedback-submit{margin-left:auto;border-color:#174da9;background:#174da9;color:#fff}.feedback-submit:hover:not(:disabled){background:#1b63e9}.feedback-control:disabled,.feedback-submit:disabled{cursor:not-allowed;opacity:.42}
.feedback-status-row{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px}.feedback-status-row span:last-child{text-align:right}
[data-theme="dark"] .feedback-toolbar{background:#151d28}[data-theme="dark"] .feedback-control,[data-theme="dark"] .forced-type-row select{background:#1b2431;border-color:#364253;color:#e7edf7}[data-theme="dark"] .feedback-control:hover:not(:disabled),[data-theme="dark"] .forced-type-row select:hover{background:#222d3c;border-color:#66799a}
@media(max-width:760px){.feedback-guide{align-items:flex-start;flex-direction:column;gap:3px}.feedback-controls{display:flex}.feedback-submit{margin-left:auto}.feedback-status-row{align-items:flex-start;flex-direction:column;gap:4px}.feedback-status-row span:last-child{text-align:left}}

/* Final feedback review and visible local evolution progress. */
.modal-open{overflow:hidden}.feedback-dialog-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(4,9,18,.68);backdrop-filter:blur(5px)}.feedback-dialog-backdrop[hidden]{display:none!important}.feedback-dialog{width:min(560px,100%);max-height:min(720px,calc(100vh - 40px));overflow:auto;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--paper);box-shadow:0 30px 90px rgba(0,0,0,.38)}.feedback-dialog h2{margin:0 0 8px;color:var(--navy);font-size:20px}.feedback-dialog-summary,.feedback-type-help{margin:0;color:var(--muted);font-size:14px;line-height:1.55}.feedback-type-help{margin-top:18px}.forced-type-list{display:grid;gap:8px;margin-top:10px}.forced-type-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(145px,180px);align-items:center;gap:10px;padding:10px 11px;border:1px solid var(--line);border-radius:11px;background:var(--soft)}.forced-type-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-size:14px}.forced-type-row span{color:var(--muted);font-size:12px}.forced-type-row select{width:100%;padding:0 9px}.feedback-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.feedback-dialog-actions .feedback-submit{margin-left:0}.feedback-progress-step{text-align:center;padding:16px 4px 6px}.feedback-progress-step p{min-height:44px;margin:12px 0 16px;color:var(--muted);font-size:14px;line-height:1.5}.feedback-progress{height:12px;overflow:hidden;border-radius:999px;background:var(--soft);box-shadow:inset 0 1px 3px rgba(0,0,0,.12)}.feedback-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#315fde,#7f8ff2);transition:width .28s ease}.feedback-progress-percent{margin-top:8px;color:var(--blue);font-size:13px;font-weight:850}[data-theme="dark"] .feedback-dialog{background:#151a23;border-color:#343e4e}[data-theme="dark"] .forced-type-row{background:#1b222e;border-color:#343e4e}
@media(max-width:560px){.feedback-dialog{padding:19px}.forced-type-row{grid-template-columns:1fr auto}.forced-type-row select{grid-column:1/-1}.feedback-dialog-actions .feedback-control,.feedback-dialog-actions .feedback-submit{flex:1}}

/* Restore highlights mirror the editable and restored text without changing restore data. */
.restore-grid{height:auto;flex:1 1 auto}.restore-editor-stack{position:relative;min-height:0;flex:1 1 auto}.restore-editor-stack .restore-compare-input{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.restore-editor-stack textarea{z-index:2;overflow:auto}.restore-editor-stack textarea.with-highlights{background:transparent!important;color:transparent!important;-webkit-text-fill-color:transparent!important;caret-color:var(--ink)!important}.restore-editor-stack textarea.with-highlights::selection{background:rgba(102,120,235,.24);color:transparent;-webkit-text-fill-color:transparent}.restore-highlight-backdrop{z-index:1;overflow:hidden!important;pointer-events:none;color:var(--ink);background:#fbfdff}.restore-highlight-backdrop .entity-mark{padding:0 2px;margin:0 -2px;border-radius:2px;cursor:default;pointer-events:none}.restore-summary{flex:0 0 auto;max-height:128px}.restore-summary .summary-item{cursor:default}.restore-summary .summary:empty{display:none}[data-theme="dark"] .restore-highlight-backdrop{background:#0d1725;color:var(--ink)}
.restore-editor-stack .restore-compare-input{scrollbar-gutter:stable}.restore-highlight-backdrop .restore-slot{padding:0!important;margin:0!important}.restore-highlight-backdrop .aligned-token{color:transparent!important;-webkit-text-fill-color:transparent!important}
@media(max-height:800px){.restore-summary{max-height:112px}.restore-summary .summary-item{padding:6px 9px}}
@media(max-width:760px){.restore-editor-stack .restore-compare-input{padding:10px;font-size:13px}.restore-summary{max-height:110px}.restore-summary h2{font-size:12px}.restore-summary .summary{gap:4px}.restore-summary .summary-item{min-width:70px;padding:4px 6px;font-size:10px}.restore-summary .summary-item strong{font-size:11px}}

/* Viewport-locked workspace: navigation at the top, ads on the rails and footer. */
html,body{width:100%;height:100%;overflow:hidden}body{min-height:0;display:grid;grid-template-rows:68px minmax(0,1fr)}
.topbar{position:relative;top:auto;display:grid;grid-template-columns:1fr auto 1fr;align-items:center}.topbar .brand{justify-self:start}.topbar .product-nav{justify-self:center;width:auto;margin:0}.topbar .header-actions{justify-self:end}
.history-link{display:inline-flex;align-items:center;gap:7px;min-height:36px;text-decoration:none;white-space:nowrap}.history-link svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
main{width:min(1480px,calc(100% - 48px));height:100%;min-height:0;padding:14px 0 12px;display:grid;grid-template-rows:minmax(0,1fr) 72px;gap:12px;overflow:hidden}.workspace{height:100%;min-height:0;margin:0;overflow:hidden}.editor-card.unified-card{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}.live-grid{height:auto;min-height:0;flex:1 1 auto;overflow:hidden}.comparison-panel{min-height:0;display:flex;flex-direction:column}.source-editor-stack{height:auto!important;min-height:0;flex:1 1 auto}.source-editor-stack .compare-input,.source-editor-stack .highlight-backdrop{height:100%!important;min-height:0!important;max-height:none!important}.result-panel{padding-bottom:34px}.result-panel>.compare-surface{height:auto!important;min-height:0!important;max-height:none!important;flex:1 1 auto;overflow:auto!important}.restore-grid{height:100%}.restore-compare-input{height:auto;min-height:0;max-height:none;flex:1 1 auto;overflow:auto}.inline-results{flex:0 0 auto;max-height:170px;overflow:hidden;margin-top:10px;padding-top:10px}.result-meta-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:8px}.result-meta-row h2{margin:0}.help-notes{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px 18px;color:var(--muted);font-size:12px}.help-note{display:inline-flex;align-items:center;gap:6px;line-height:1.35;white-space:nowrap}.help-note::before{content:"";width:6px;height:6px;flex:0 0 6px;border-radius:50%}.help-note strong{font-size:12px}.help-note-wrong::before{background:#c28a43}.help-note-wrong strong{color:#a76c25}.help-note-missed::before{background:#628fba}.help-note-missed strong{color:#4779a8}.bottom-ad{width:min(970px,100%);height:72px;margin:0 auto}.selection-action{left:8px;top:8px;max-width:calc(100% - 16px);transition:left .08s ease,top .08s ease,background .15s ease}.source-editor-stack.direct-selection .highlight-backdrop{visibility:visible!important}.source-editor-stack.direct-selection .compare-input.with-highlights{z-index:5!important;background:transparent!important;color:transparent!important;-webkit-text-fill-color:transparent!important;caret-color:var(--ink)!important}
[data-theme="dark"] .help-note-wrong strong{color:#d8b37d}[data-theme="dark"] .help-note-missed strong{color:#9db9d8}[data-theme="dark"] .source-editor-stack.direct-selection .compare-input.with-highlights{background:transparent!important;color:transparent!important;-webkit-text-fill-color:transparent!important}
@media(min-width:1680px){main{width:min(1360px,calc(100% - 360px))}}
@media(max-height:800px){body{grid-template-rows:58px minmax(0,1fr)}.topbar{height:58px}main{padding:8px 0;grid-template-rows:minmax(0,1fr) 56px;gap:8px}.bottom-ad{height:56px}.unified-card{padding:14px 18px}.panel-head{min-height:28px;margin-bottom:5px}.inline-results{max-height:145px;margin-top:7px;padding-top:7px}.inline-results .summary-item{padding:6px 9px}.source-panel .editor-footer{min-height:26px;padding-top:5px}.result-panel{padding-bottom:26px}}
@media(max-width:760px){body{grid-template-rows:64px minmax(0,1fr)}.topbar{height:64px;padding:0 8px;grid-template-columns:38px minmax(0,1fr) 114px;gap:6px}.brand>span:last-child{display:none}.brand-mark{width:30px;height:34px}.topbar .product-nav{width:100%;gap:3px;padding:3px}.product-nav-button{height:46px;padding:0 5px;font-size:clamp(10px,2.4vw,12px);line-height:1.2}.header-actions{gap:4px}.history-link{width:34px;height:34px;justify-content:center}.history-link span{display:none}.theme-button{width:34px}.compact{padding:6px}main{width:calc(100% - 16px);padding:8px 0;grid-template-rows:minmax(0,1fr) 50px;gap:7px}.bottom-ad{height:50px;padding:0 9px}.live-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;gap:8px}.unified-card{padding:10px}.panel-head{align-items:center;min-height:30px}.panel-head label,.panel-head>span:first-child,.result-heading>span:first-child{font-size:13px}.micro-actions{gap:2px}.text-button{padding:3px;font-size:11px}.protect-action{min-height:30px;padding:0 8px;font-size:12px}.source-editor-stack .compare-input,.source-editor-stack .highlight-backdrop,.result-panel>.compare-surface{height:100%!important;min-height:0!important;max-height:none!important;padding:10px!important;font-size:13px!important}.result-actions{gap:3px}.compact-result-action,.copy-icon-button{height:30px}.copy-icon-button{width:31px}.source-panel .editor-footer{min-height:22px;padding:4px 1px 0}.result-panel{padding-bottom:22px}.inline-results{max-height:132px;margin-top:6px;padding-top:6px}.result-meta-row{align-items:flex-start;gap:8px;margin-bottom:5px}.result-meta-row h2{font-size:12px;white-space:nowrap}.help-notes{gap:2px 8px;font-size:10px}.help-note{gap:4px}.help-note strong{font-size:10px}.help-note span{display:none}.inline-results .summary{gap:4px}.inline-results .summary-item{min-width:70px;max-width:none;padding:4px 6px;font-size:10px}.inline-results .summary-item strong{font-size:11px}.selection-action{height:32px;padding:0 9px;font-size:11px}.ad-slot strong{font-size:12px}.ad-slot small{font-size:9px}}

/* Category details stay inside the single-screen workspace instead of being
   clipped by the compact review area's default maximum height. */
.inline-results.showing-details{max-height:min(260px,38vh);overflow-y:auto;padding-bottom:5px;scrollbar-gutter:stable}
.inline-results.showing-details .details-panel{display:block;min-height:40px;padding-bottom:3px}
@media(max-width:760px){.inline-results.showing-details{max-height:min(210px,34vh)}}

/* Equal editor heights, two-line mode labels, and persistent rail ads on smaller monitors. */
.live-grid{align-items:stretch}.live-grid>.comparison-panel{height:100%}.product-nav-button{height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;line-height:1.1}.product-nav-button>span{font-size:14px;font-weight:850}.product-nav-button>small{font-size:11px;font-weight:700;opacity:.72}.product-nav-button.active>small{opacity:.88}
@media(min-width:900px){main{width:min(1360px,calc(100% - clamp(162px,18vw,360px)))}}
@media(max-height:800px){.product-nav-button{height:46px}.product-nav-button>span{font-size:13px}.product-nav-button>small{font-size:10px}}
@media(max-width:760px){.product-nav-button{height:48px;padding:0 4px}.product-nav-button>span{font-size:clamp(10px,2.4vw,12px)}.product-nav-button>small{font-size:9px}}
