/* Review page look, after the reference design: separate soft cards on the page, a 7 / 5 split, a pill stepper, badges by kind, mono quotes.
   Appearance only. Loaded after theme.css. Everything is scoped to the review page (not the new-paper step). */
#view-review:not(.intake){--rv-cyan:#1FA2C6;--rv-cyan-d:#17829F;--rv-cyan-l:#EEF7FB;--rv-ink:#152B32;--rv-soft:#3A4B55;--rv-muted:#6b7a80;--rv-line:#DCE1DC;--rv-card:0 4px 12px rgba(21,43,50,.04),0 1px 3px rgba(21,43,50,.06);--rv-sub:0 1px 3px rgba(16,29,38,.05),0 1px 2px rgba(16,29,38,.03);--rv-mono:"JetBrains Mono",ui-monospace,Menlo,monospace}
/* ---- layout ---- */
#view-review:not(.intake) .workspace{grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:24px;align-items:start}
#view-review:not(.intake) .workspace>.panel{background:transparent;border:0;box-shadow:none;border-radius:0;height:clamp(620px,calc((100vh - 225px)/.9),980px)}
#view-review:not(.intake) .workspace>.panel>.panel-body{padding:0 6px 28px 0}
#view-review:not(.intake) #document-panel>.panel-head{display:none}
/* ---- left: cards ---- */
#view-review:not(.intake) .ctx-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;margin:0 0 12px;padding:11px 16px;border:1px solid var(--rv-line);border-radius:12px;background:#fff;box-shadow:var(--rv-sub);color:var(--rv-soft);font-size:12px;font-weight:700}
#view-review:not(.intake) .ctx-toggle::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--rv-cyan)}
#view-review:not(.intake) .ctx-toggle>span:first-child{flex:1;text-align:left}
#view-review:not(.intake) .document-language-row{padding:12px 16px;margin:-4px 0 12px;border:1px solid var(--rv-line);border-radius:12px;background:#fff;box-shadow:var(--rv-sub)}
#view-review:not(.intake) .upload-zone{padding:14px 16px;border:1px solid var(--rv-line);border-style:solid;border-bottom-color:#eef1ee;border-radius:12px 12px 0 0;background:#fff;box-shadow:var(--rv-sub)}
#view-review:not(.intake) .upload-copy strong{color:var(--rv-ink);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
#view-review:not(.intake) .upload-actions button{min-height:32px;padding:5px 12px;border-radius:8px;font-size:12px;font-weight:600}
#view-review:not(.intake) #clear-pdf{border-color:#fecaca;background:#fef2f2;color:#dc2626}
#view-review:not(.intake) #upload-status{margin:0 0 12px;padding:9px 16px;border:1px solid var(--rv-line);border-top:0;border-radius:0 0 12px 12px;background:#fff;box-shadow:var(--rv-sub);color:var(--rv-muted);font-size:12px}
#view-review:not(.intake) #upload-status:empty{display:none}
#view-review:not(.intake) .text-toggle{display:flex;align-items:center;gap:8px;width:100%;margin:0 0 12px;padding:10px 16px;border:1px solid var(--rv-line);border-radius:12px;background:#fff;box-shadow:var(--rv-sub);color:var(--rv-soft);font-size:12px;font-weight:700}
#view-review:not(.intake) .text-toggle::after{content:"Parsed OCR & tags";margin-left:auto;color:#9aa5a0;font-size:11px;font-weight:500}
#view-review:not(.intake) .pdf-viewer{position:relative;border:0;background:transparent;margin-top:0;overflow:visible}
#view-review:not(.intake) .pdf-toolbar{margin:0 0 12px;padding:8px 16px;border:1px solid var(--rv-line);border-radius:12px;background:#fff;box-shadow:var(--rv-sub);color:var(--rv-soft);font-size:12px;font-weight:700}
#view-review:not(.intake) .pdf-toolbar button{border:1px solid var(--rv-line);border-radius:8px;background:#f8faf8;color:#4b5a60;font-size:12px;font-weight:600}
#view-review:not(.intake) .pdf-toolbar button:disabled{opacity:.5;background:#f8faf8}
#view-review:not(.intake) .pdf-page-scroll{padding:56px 22px 22px;border:1px solid #cdd3cd;border-radius:12px;background:linear-gradient(180deg,#fafbfa,#fff);box-shadow:var(--rv-card)}
#view-review:not(.intake) .page-strip{position:absolute;top:calc(var(--tb,58px) + 14px);left:14px;z-index:6;display:flex;gap:6px;max-width:calc(100% - 28px);padding:6px;border:1px solid var(--rv-line);border-radius:12px;background:rgba(255,255,255,.92);backdrop-filter:blur(6px);box-shadow:0 4px 12px rgba(21,43,50,.12)}
#view-review:not(.intake) .page-strip .ps{position:relative;min-width:30px;height:30px;padding:0 8px;border:1px solid #cdd3cd;border-radius:8px;background:#fff;color:#4b5a60;font-size:12px;font-weight:800}
#view-review:not(.intake) .page-strip .ps.on{background:var(--rv-cyan);border-color:var(--rv-cyan);color:#fff;box-shadow:0 0 0 3px rgba(31,162,198,.2)}
#view-review:not(.intake) .page-strip .ps.has:not(.on){border-color:#cdd3cd;background:#fff;color:#4b5a60}
#view-review:not(.intake) .page-strip .ps i{top:-5px;right:-5px;min-width:10px;width:10px;height:10px;padding:0;border:2px solid #fff;border-radius:50%;background:#f59e0b;font-size:0;line-height:0;box-sizing:content-box}
#view-review:not(.intake) .page-strip .ps.sev-critical i,#view-review:not(.intake) .page-strip .ps.sev-high i{background:#ef4444}
#view-review:not(.intake) .page-strip .ps.sev-low i{background:#1FA2C6}
/* ---- right: heading, progress, search ---- */
#view-review:not(.intake) #findings-panel>.panel-head{display:flex;align-items:flex-start;gap:12px;min-height:0;padding:0 0 12px;border:0;background:transparent}
#view-review:not(.intake) #findings-panel>.panel-head h3{font-size:18px;font-weight:800;letter-spacing:-.01em;color:var(--rv-ink)}
#view-review:not(.intake) .findings-sub{margin:2px 0 0;color:#7a878c;font-size:12px;font-weight:500}
#view-review:not(.intake) #add-finding{display:inline-flex;align-items:center;gap:6px;border:1px solid #cdd3cd;border-radius:10px;background:#fff;color:#3A4B55;font-size:12px;font-weight:700}
#view-review:not(.intake) #add-finding::before{content:"+";font-size:15px;font-weight:600;line-height:1}
#view-review:not(.intake) #add-finding:hover{border-color:var(--rv-cyan);color:var(--rv-cyan)}
#view-review:not(.intake) .progress-row{display:grid;grid-template-columns:1fr auto;gap:8px;margin:0 0 12px;padding:14px 16px;border:1px solid var(--rv-line);border-radius:12px;background:#fff;box-shadow:var(--rv-sub)}
#view-review:not(.intake) .progress-row .rp-label{order:1;color:#4b5a60;font-size:12px;font-weight:600}
#view-review:not(.intake) .progress-row #progress-text{order:2;color:var(--rv-ink);font-family:var(--rv-mono);font-size:12px;font-weight:700}
#view-review:not(.intake) .progress-row .progress{order:3;grid-column:1/-1;height:8px;border-radius:99px;background:#f1f3f1;overflow:hidden}
#view-review:not(.intake) .progress-row #progress-bar{border-radius:99px;background:linear-gradient(90deg,#1FA2C6,#10b981)}
#view-review:not(.intake) .finding-search{height:40px;padding-left:38px;border:1px solid #e3e7e3;border-radius:12px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa5a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") 12px center/16px no-repeat;box-shadow:var(--rv-sub);font-size:12px}
/* ---- stage stepper (pill container) ---- */
#view-review:not(.intake) .stage-steps{margin:12px 0;padding:6px;border:1px solid #e3e7e3;border-radius:12px;background:rgba(241,244,241,.8);gap:6px}
#view-review:not(.intake) .stage-steps .ss-pill{top:6px;bottom:6px;left:6px;width:calc((100% - 12px)/var(--n,3));border-radius:9px;background:#fff;box-shadow:inset 0 0 0 2px var(--rv-cyan),0 1px 3px rgba(16,29,38,.08)}
#view-review:not(.intake) .stage-steps .ss{flex-direction:row;justify-content:center;gap:8px;padding:8px 6px;text-align:left}
#view-review:not(.intake) .stage-steps .ss+.ss::before{display:none}
#view-review:not(.intake) .stage-steps .ss-dot{width:20px;height:20px;font-size:10px;box-shadow:none}
#view-review:not(.intake) .stage-steps .ss-text{align-items:flex-start}
#view-review:not(.intake) .stage-steps .ss-text b{font-size:12px;font-weight:800}
#view-review:not(.intake) .stage-steps .ss-text small{font-size:10px}
#view-review:not(.intake) .stage-steps .ss.cur .ss-text small{color:#059669;font-weight:700}
/* ---- filter chips ---- */
#view-review:not(.intake) .finding-tools .chips{gap:6px}
#view-review:not(.intake) .chip{padding:4px 11px;border:1px solid #dde2dd;border-radius:99px;background:#fff;color:#4b5a60;font-size:12px;font-weight:600}
#view-review:not(.intake) .chip b{color:#9aa5a0;font-weight:500}
#view-review:not(.intake) .chip.on{border-color:#aeb8b0;color:var(--rv-ink);box-shadow:none;background:#fff}
#view-review:not(.intake) .chip[data-k="high"]{border-color:#fde68a;background:#fffbeb;color:#92400e}#view-review:not(.intake) .chip[data-k="high"] b{color:#b45309}
#view-review:not(.intake) .chip.tagchip{border-color:#bae6fd;background:#ecfeff;color:var(--rv-cyan)}
/* ---- finding cards ---- */
#view-review:not(.intake) .finding{padding:18px 18px 16px;border:1px solid #e3e7e3;border-left:4px solid var(--rv-cyan);border-radius:12px;background:#fff;box-shadow:var(--rv-card)}
#view-review:not(.intake) .finding.preview-active{border-color:#0aa5d8;box-shadow:0 0 0 2px rgba(10,165,216,.14),var(--rv-card)}
#view-review:not(.intake) .finding .preview-state{flex:none;padding:3px 8px;border:1px solid #a9e2f2;border-radius:99px;background:#e8f7fb;color:#087fa5;font:inherit;font-size:10px;font-weight:750;white-space:nowrap;cursor:pointer}.finding .preview-state:hover{background:#d9f2fa;border-color:#68cbe5}.finding .preview-state:focus-visible{outline:2px solid #0aa5d8;outline-offset:2px}
#view-review:not(.intake) .finding.high{border-left-color:#ef4444;background:#fff}
#view-review:not(.intake) .finding.critical{border-left-color:#991b1b;background:#fff}
#view-review:not(.intake) .finding.resolved{border-left-color:#10b981;background:#fff;opacity:1}
#view-review:not(.intake) .finding-labels{gap:6px}
#view-review:not(.intake) .finding .pill.pattern{min-height:24px;padding:3px 9px;border:1px solid #f3b4b4;border-radius:6px;background:#fff1f1;color:#b42332;font-size:10px;font-weight:800;letter-spacing:.035em;cursor:pointer}
#view-review:not(.intake) .finding .pill.pattern.seen_before{border-color:#d7e0e4;background:#f1f5f7;color:#52656d}
#view-review:not(.intake) .finding .pattern-details{display:grid;grid-template-columns:1fr;gap:5px;width:100%;margin:2px 0 12px;padding:11px 14px;border:1px solid #f1c4c4;border-left:4px solid #c62828;border-radius:8px;background:#fff8f8;color:#3a4b55;font-size:12.5px;line-height:1.5}
#view-review:not(.intake) .finding .pattern-details[hidden]{display:none!important}
#view-review:not(.intake) .finding .pattern-details strong{color:#b42332;font-size:11px;letter-spacing:.04em;text-transform:uppercase}
#view-review:not(.intake) .finding .pattern-details span{color:#52656d}
#view-review:not(.intake) .finding .pattern-details b{color:#152b32}
#view-review:not(.intake) .finding .pill{min-height:0;padding:2px 8px;border:1px solid transparent;border-radius:5px;background:#f1f3f1;color:#4b5a60;font-size:10px;font-weight:800;letter-spacing:.06em}
#view-review:not(.intake) .finding .pill.tag{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
#view-review:not(.intake) .finding .pill.regulatory{background:#faf5ff;border-color:#e9d5ff;color:#7e22ce}
#view-review:not(.intake) .finding .pill.medical{background:#f1f5f9;border-color:#e2e8f0;color:#334155}
#view-review:not(.intake) .finding .pill.legal{background:#fff7ed;border-color:#fed7aa;color:#c2410c}
#view-review:not(.intake) .finding .pill.high,#view-review:not(.intake) .finding .pill.critical{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
#view-review:not(.intake) .finding .pill.medium{background:#fffbeb;border-color:#fde68a;color:#b45309}
#view-review:not(.intake) .finding .pill.low{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
#view-review:not(.intake) .finding .pill.resolved{margin-left:auto;padding:2px 10px;border-radius:99px;border-color:#6ee7b7;background:#ecfdf5;color:#047857;font-size:11px}
#view-review:not(.intake) .finding h4{margin:12px 0 10px;color:var(--rv-ink);font-size:14px;font-weight:800;letter-spacing:-.005em}
#view-review:not(.intake) .finding blockquote{margin:0 0 12px;padding:10px 12px;border:1px solid #e6eae6;border-radius:8px;background:#f8faf8;color:#3A4B55;font-family:var(--rv-mono);font-size:12px;font-style:normal}
#view-review:not(.intake) .finding blockquote mark,#view-review:not(.intake) .finding blockquote em{padding:0 4px;border-radius:4px;background:#fef2f2;color:#dc2626;font-style:italic;font-weight:700}
#view-review:not(.intake) .finding p{margin:0 0 10px;padding:10px 12px;border:1px solid #eef1ee;border-radius:8px;background:#fbfbfa;color:#3A4B55;font-size:12px;line-height:1.6}
#view-review:not(.intake) .finding p .field-label{display:block;margin-bottom:3px;color:#9aa5a0;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
#view-review:not(.intake) .finding p.recommendation{border-color:#a7f3d0;background:#ecfdf5;color:#064e3b}
#view-review:not(.intake) .finding p.recommendation .field-label{color:#047857}
#view-review:not(.intake) .finding-resolution-line{margin:0 0 8px;color:#6b7a80;font-family:var(--rv-mono);font-size:11px}
#view-review:not(.intake) .finding-actions{justify-content:flex-start;gap:8px;margin-top:10px}
#view-review:not(.intake) .finding-actions button{min-height:32px;padding:5px 12px;border:1px solid #e3e7e3;border-radius:8px;background:#fff;color:#3A4B55;font-size:12px;font-weight:700}
#view-review:not(.intake) .finding-actions button:hover{background:#f8faf8}
#view-review:not(.intake) .finding-actions .finding-page-link{border-color:rgba(31,162,198,.3);background:#EEF7FB;color:var(--rv-cyan)}
#view-review:not(.intake) .finding-actions .finding-page-link:hover{background:rgba(31,162,198,.18)}
@media (max-width:1000px){#view-review:not(.intake) .workspace{grid-template-columns:1fr}#view-review:not(.intake) .workspace>.panel{height:auto}}
#view-review:not(.intake) .finding-tools .chips{flex-wrap:wrap!important;overflow:visible!important}
/* the filters scroll with the list (as in the reference); only the previous / next row stays in view */
#view-review:not(.intake) #findings-panel .finding-tools:not([hidden]){position:static;margin:0 0 4px;padding:0;border:0;box-shadow:none;background:none}
#view-review:not(.intake) .find-nav{position:sticky;top:0;z-index:5;margin:0 0 8px;padding:6px 0;background:linear-gradient(180deg,#f8fafb 70%,rgba(248,250,251,0))}
/* ---- finding rows that fold: badges, title and status on one row, a one-line note below; click to open ---- */
#view-review:not(.intake) .finding .finding-top{display:flex;align-items:center;gap:8px}
#view-review:not(.intake) .finding .finding-labels{flex:1;min-width:0}
#view-review:not(.intake) .finding .fstatus{flex:none;padding:2px 9px;border-radius:6px;background:#f1f3f1;color:#6b7a80;font-family:var(--rv-mono);font-size:11px;font-weight:600;white-space:nowrap}
#view-review:not(.intake) .finding .fstatus.open{background:#fffbeb;color:#b45309}
#view-review:not(.intake) .finding .fstatus.wait{background:#f1f3f1;color:#6b7a80}
#view-review:not(.intake) .finding .fstatus.done{background:#ecfdf5;color:#047857}
#view-review:not(.intake) .finding .fold{flex:none;display:grid;place-items:center;width:26px;height:26px;padding:0;border:0!important;border-radius:8px;background:transparent!important;box-shadow:none!important;color:#9aa5a0;transition:transform .2s;min-height:0}
#view-review:not(.intake) .finding .fold:hover{background:#f1f3f1!important}
#view-review:not(.intake) .finding:not(.collapsed) .fold{transform:rotate(180deg)}
#view-review:not(.intake) .finding.collapsed{padding:12px 14px;border-color:#e3e7e3;box-shadow:var(--rv-sub);cursor:pointer;transition:border-color .15s,box-shadow .15s}
#view-review:not(.intake) .finding.collapsed:hover{border-color:#c4cdc4;box-shadow:var(--rv-card)}
#view-review:not(.intake) .finding.collapsed>*:not(.finding-top):not(h4):not(.f-note){display:none!important}
#view-review:not(.intake) .finding.collapsed h4{margin:8px 0 2px;font-size:13px}
#view-review:not(.intake) .finding.collapsed>.f-note{display:-webkit-box!important;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;margin:0;padding:0;border:0;background:none;color:#6b7a80;font-size:12px}
#view-review:not(.intake) .finding.collapsed>.f-note .field-label{display:none}
#view-review:not(.intake) .find-nav .fold-all{margin-left:auto;min-height:30px;padding:4px 10px;border:1px solid #e3e7e3;border-radius:8px;background:#fff;color:#4b5a60;font-size:11.5px;font-weight:700}
@media (prefers-reduced-motion:reduce){#view-review:not(.intake) .finding .fold{transition:none}}
/* review progress as one thin line (a slim bar and the count), not a card */
#view-review:not(.intake) .progress-row{display:flex;align-items:center;gap:10px;margin:2px 0 10px;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#view-review:not(.intake) .progress-row .rp-label{display:none}
#view-review:not(.intake) .progress-row .progress{order:1;flex:1;grid-column:auto;height:4px;border-radius:99px;background:#e6ebe6}
#view-review:not(.intake) .progress-row #progress-text{order:2;flex:none;color:#6b7a80;font-family:var(--rv-mono);font-size:11px;font-weight:600;white-space:nowrap}

/* ---- dark theme: this file loads after dark.css and hard-codes light colours, so the dark values are restated here ---- */
html[data-theme="dark"] #view-review:not(.intake){--rv-ink:#E8F1F4;--rv-soft:#BBCBD1;--rv-muted:#8DA3AB;--rv-line:#2B3E47;--rv-cyan-l:#123242;--rv-card:0 6px 16px rgba(0,0,0,.35);--rv-sub:0 1px 3px rgba(0,0,0,.35)}
html[data-theme="dark"] :is(#filebar,#view-review:not(.intake) :is(.filebar,.ctx-toggle,.document-language-row,.upload-zone,#upload-status,.text-toggle,.pdf-toolbar,.progress-row,.finding,.finding.high,.finding.critical,.finding.resolved,.stage-steps,.find-nav,.risk-card,#risk-card,.finding-group-head,.finding-group,.workflow,#workflow-card,.review-tools,.legend)){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important;box-shadow:none}
html[data-theme="dark"] #view-review:not(.intake) :is(.pdf-page-scroll,.page-strip){background:var(--bg)!important;border-color:var(--line)!important}
html[data-theme="dark"] #view-review:not(.intake) :is(.page-strip .ps,.page-strip .ps.has:not(.on),#add-finding,.finding-actions button,.find-nav .fold-all,.find-nav button,.pdf-toolbar button,.chip,.chip.on,.stage-steps .ss-pill,.finding-search,.upload-zone button){background:var(--s2)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] #view-review:not(.intake) .page-strip .ps.on{background:var(--teal)!important;color:#04222D!important}
html[data-theme="dark"] #view-review:not(.intake) .page-strip .ps i{border-color:var(--surface)!important}
html[data-theme="dark"] #view-review:not(.intake) .chip.on{background:var(--teal-deep)!important;color:#04222D!important}
html[data-theme="dark"] #view-review:not(.intake) :is(h2,h3,h4,strong,b,.fb-file-name,.filebar-label,.finding-title,.finding h4,.group-title,.upload-title,#workflow-heading,.finding-group-head *){color:var(--ink)!important}
html[data-theme="dark"] #view-review:not(.intake) :is(.filebar-label,#fb-rev-label,#workflow-status,.hint,small,.findings-sub,.progress-label,.upload-hint){color:var(--muted)!important}
html[data-theme="dark"] #view-review:not(.intake) :is(.finding-quote,.quote,.mono-quote,.finding .quote-box){background:var(--s2)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] #view-review:not(.intake) #run.primary,html[data-theme="dark"] #view-review:not(.intake) button.primary{color:#04222D!important;background:linear-gradient(180deg,#5CCBEA,#2FB4D8)!important}
html[data-theme="dark"] #view-review:not(.intake) :is(button:disabled,.pdf-toolbar button:disabled){opacity:.45}
html[data-theme="dark"] :is(#view-review #run.primary,#view-review #approve.primary,#view-review #fb-new-version.primary,#view-review .filebar button.primary,#view-review .workflow button.primary){background:linear-gradient(180deg,#5CCBEA,#2FB4D8)!important;color:#04222D!important;border-color:#2FB4D8!important;text-shadow:none}
html[data-theme="dark"] :is(#fb-context,.fb-context){color:var(--muted)!important}
html[data-theme="dark"] :is(.flow li,#flow-sidebar .flow li){background:var(--s2)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(.flow li span,.flow li b,.flow li strong){color:var(--ink)!important}
html[data-theme="dark"] :is(.filebar label,#fb-rev-legal-wrap,#fb-rev-medical-wrap,#fb-rev-regulatory-wrap){background:var(--s2)!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme="dark"] .rk-level.medium{background:var(--amber-soft)!important;color:var(--amber)!important}
html[data-theme="dark"] .rk-level.high,html[data-theme="dark"] .rk-level.critical{background:var(--red-soft)!important;color:var(--red)!important}
html[data-theme="dark"] .rk-level.low{background:var(--green-soft)!important;color:var(--green)!important}

/* ---- calmer MLR review: prioritize decision-relevant findings and document context ---- */
#view-review:not(.intake) #risk-card{padding:10px 14px;border-radius:11px}
#view-review:not(.intake) #risk-card .rk-head{gap:10px}
#view-review:not(.intake) #risk-card .rk-score{display:none}
#view-review:not(.intake) #risk-card .rk-main{min-width:0}
#view-review:not(.intake) #risk-card .rk-level{font-size:10px;letter-spacing:.04em}
#view-review:not(.intake) #risk-card .rk-main strong{font-size:13px}
#view-review:not(.intake) #risk-card .rk-toggle{min-height:32px;padding:5px 10px;font-size:11px}
#view-review:not(.intake) #findings-panel .finding-search-label{margin:4px 0 5px;font-size:10px;letter-spacing:.09em}
#view-review:not(.intake) #findings-panel .finding-search{height:38px}
#view-review:not(.intake) #findings-panel .chips{display:flex;flex-wrap:nowrap!important;gap:6px;overflow-x:auto!important;overscroll-behavior-x:contain;padding:2px 1px 7px;scrollbar-width:thin}
#view-review:not(.intake) #findings-panel .chip{flex:0 0 auto;min-height:30px;padding:4px 9px;font-size:11px}
#view-review:not(.intake) #find-nav{padding-top:4px}
#view-review:not(.intake) #document-panel .pdf-toolbar #prev-page,
#view-review:not(.intake) #document-panel .pdf-toolbar #next-page{display:none!important}
#view-review:not(.intake) #document-panel .pdf-toolbar{grid-template-columns:1fr;padding:7px 12px}
#view-review:not(.intake) #document-panel .pdf-toolbar .pdf-page-count{justify-self:center}
#view-review:not(.intake) .page-strip{position:static;justify-content:flex-start;flex-wrap:nowrap;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#a9bbc3 transparent;padding:6px 12px;border:0;border-bottom:1px solid var(--rv-line);border-radius:0;background:#f8fafb;box-shadow:none;backdrop-filter:none}
#view-review:not(.intake) .page-strip .ps{flex:0 0 auto;scroll-snap-align:center}
#view-review:not(.intake) #upload-status{font-size:11px}
html[data-theme="dark"] #view-review:not(.intake) :is(.page-strip,.text-toggle,.pdf-toolbar){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .fstatus.open{background:var(--amber-soft)!important;color:var(--amber)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .fstatus.wait{background:var(--s2)!important;color:var(--muted)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .fstatus.done{background:var(--green-soft)!important;color:var(--green)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.collapsed>.f-note{color:var(--muted)!important}
/* Keep hard-coded light review notes readable after this stylesheet's light-mode rules. */
html[data-theme="dark"] #view-review:not(.intake) .finding p:not(.recommendation){background:var(--s2)!important;border-color:var(--line)!important;color:var(--ink-soft)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding p:not(.recommendation) .field-label{color:var(--muted)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding p.recommendation{background:#123828!important;border-color:#28684b!important;color:#ccebd9!important}
html[data-theme="dark"] #view-review:not(.intake) .finding p.recommendation .field-label{color:#78d7a5!important}
html[data-theme="dark"] #view-review:not(.intake) .finding blockquote{background:var(--s2)!important;border-color:var(--line)!important;color:var(--ink-soft)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .pill.pattern{background:#3c1f25!important;border-color:#7e3b43!important;color:#ff9b9b!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .pill.pattern.seen_before{background:var(--s2)!important;border-color:var(--line)!important;color:var(--muted)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .pattern-details{background:#231b20!important;border-color:#693b43!important;border-left-color:#f08a8a!important;color:var(--ink-soft)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .pattern-details strong{color:#ff9b9b!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .pattern-details span{color:var(--muted)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding .pattern-details b{color:var(--ink)!important}
html[data-theme="dark"] #view-review:not(.intake) .risk-card[data-level="high"]{border-left-color:var(--red)!important}
html[data-theme="dark"] #view-review:not(.intake) .risk-card[data-level="critical"]{border-left-color:var(--red)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding a{color:var(--teal-deep)!important}
@media(max-width:720px){#view-review:not(.intake) #findings-panel .chips{margin-right:-8px;padding-right:8px}}

/* Keep developer-oriented exports out of the primary reviewer action row. */
#view-review:not(.intake) #download{display:none!important}

/* Findings are the reviewer's main task. Keep workflow and classification controls secondary. */
#view-review:not(.intake) #findings-panel>.panel-body{display:flex;flex-direction:column}
#view-review:not(.intake) #findings-panel .finding-tools{order:1}
#view-review:not(.intake) #findings{order:2}
#view-review:not(.intake) #risk-card{order:3;margin-top:14px}
#view-review:not(.intake) #suggest-box{order:4}
#view-review:not(.intake) #findings-panel .stage-steps{display:none!important}
#view-review:not(.intake) #findings-panel .progress-row{display:none!important}
#view-review:not(.intake) #findings-panel>.panel-head #progress-text{margin-left:auto;margin-right:8px;color:var(--rv-muted);font-size:10px;font-weight:600;white-space:nowrap}
html[data-theme="dark"] #view-review:not(.intake) #findings-panel>.panel-head #progress-text{color:var(--muted)!important}

#view-review:not(.intake) #findings-sub{display:none}

/* Preview heading, legend, and actions stay aligned even when the document pane is narrow. */
#view-review:not(.intake) #text-preview-heading{align-items:center;flex-wrap:wrap}
#view-review:not(.intake) #text-preview-heading strong{flex:0 1 auto}
#view-review:not(.intake) #text-preview-heading span{margin-left:auto;text-align:right}
#view-review:not(.intake) .review-preview-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px 12px;flex-wrap:wrap}
#view-review:not(.intake) #legend{margin-right:auto!important}
#view-review:not(.intake) .review-preview-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0 0 0 auto!important;flex-wrap:wrap}
#view-review:not(.intake) .review-preview-actions button{min-height:36px;padding:7px 12px;white-space:nowrap}
@media(max-width:700px){
  #view-review:not(.intake) #text-preview-heading span{flex:1 1 100%;margin-left:0;text-align:left}
  #view-review:not(.intake) .review-preview-tools{align-items:flex-start}
  #view-review:not(.intake) #legend{flex-wrap:wrap;white-space:normal}
  #view-review:not(.intake) .review-preview-actions{width:100%;margin-left:0!important;justify-content:flex-start}
}

/* Make the current MLR stage explicit while keeping the workflow label quiet. */
#view-review:not(.intake) #findings-panel>.panel-head{align-items:center;flex-wrap:wrap}
#view-review:not(.intake) .review-flow-label{display:inline-flex;align-items:center;min-height:22px;padding:3px 8px;border:1px solid rgba(31,162,198,.24);border-radius:999px;background:var(--rv-cyan-l);color:var(--rv-cyan-d);font-size:10px;font-weight:750;letter-spacing:.025em;white-space:nowrap}
html[data-theme="dark"] #view-review:not(.intake) .review-flow-label{background:#123242!important;color:#71d8f3!important;border-color:#285162!important}
@media(max-width:700px){#view-review:not(.intake) .review-flow-label{order:2}#view-review:not(.intake) #findings-panel>.panel-head #progress-text{order:3;margin-left:0}}

/* Finding category colors follow the markup guide: MLR fix, tone/brief, editorial, keep. */
#view-review:not(.intake) .finding.category-mlr:not(.resolved),
#view-review:not(.intake) .finding-group.category-mlr{border-left-color:#e63946;background:#fff1f2}
#view-review:not(.intake) .finding.category-strategy:not(.resolved),
#view-review:not(.intake) .finding-group.category-strategy{border-left-color:#f08c00;background:#fff6e5}
#view-review:not(.intake) .finding.category-editorial:not(.resolved),
#view-review:not(.intake) .finding-group.category-editorial{border-left-color:#2f80ed;background:#eef5ff}
#view-review:not(.intake) .finding.category-keep:not(.resolved),
#view-review:not(.intake) .finding-group.category-keep{border-left-color:#2e9e58;background:#edf8f0}
#view-review:not(.intake) .finding.resolved{border-left-color:var(--rv-line);background:var(--surface)}
#view-review:not(.intake) .finding .pill.finding-category{font-size:9px;font-weight:800;letter-spacing:.035em}
#view-review:not(.intake) .finding.category-mlr .pill.finding-category,
#view-review:not(.intake) .finding-group.category-mlr .pill.finding-category{background:#ffe1e4;border-color:#f4a1a8;color:#b42332}
#view-review:not(.intake) .finding.category-strategy .pill.finding-category,
#view-review:not(.intake) .finding-group.category-strategy .pill.finding-category{background:#ffebc2;border-color:#f4c46f;color:#9a5700}
#view-review:not(.intake) .finding.category-editorial .pill.finding-category,
#view-review:not(.intake) .finding-group.category-editorial .pill.finding-category{background:#dceaff;border-color:#a9c9fa;color:#1f5db8}
#view-review:not(.intake) .finding.category-keep .pill.finding-category,
#view-review:not(.intake) .finding-group.category-keep .pill.finding-category{background:#d9f1df;border-color:#9fd4ac;color:#247345}
#view-review:not(.intake) .preview mark.category-mlr{background:#ffdadd!important;color:#8f1d2c!important;box-shadow:inset 0 -2px #e63946}
#view-review:not(.intake) .preview mark.category-strategy{background:#ffe9bd!important;color:#814800!important;box-shadow:inset 0 -2px #f08c00}
#view-review:not(.intake) .preview mark.category-editorial{background:#dceaff!important;color:#174e9b!important;box-shadow:inset 0 -2px #2f80ed}
#view-review:not(.intake) .preview mark.category-keep{background:#d9f1df!important;color:#1e6338!important;box-shadow:inset 0 -2px #2e9e58}
#view-review:not(.intake) .pdf-highlight.category-mlr{background:rgba(230,57,70,.24);border-bottom-color:#e63946}
#view-review:not(.intake) .pdf-highlight.category-strategy{background:rgba(240,140,0,.24);border-bottom-color:#f08c00}
#view-review:not(.intake) .pdf-highlight.category-editorial{background:rgba(47,128,237,.22);border-bottom-color:#2f80ed}
#view-review:not(.intake) .pdf-highlight.category-keep{background:rgba(46,158,88,.22);border-bottom-color:#2e9e58}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-mlr:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-mlr{background:#321f25!important;border-color:#70414a!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-strategy:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-strategy{background:#332914!important;border-color:#6b5124!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-editorial:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-editorial{background:#1e2d43!important;border-color:#3c5f93!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-keep:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-keep{background:#1b3025!important;border-color:#3e7651!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-mlr .pill.finding-category,
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-mlr .pill.finding-category{background:#532831!important;border-color:#8a4853!important;color:#ff9ba3!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-strategy .pill.finding-category,
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-strategy .pill.finding-category{background:#4d3917!important;border-color:#856323!important;color:#ffd17d!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-editorial .pill.finding-category,
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-editorial .pill.finding-category{background:#263e60!important;border-color:#4972aa!important;color:#9dc5ff!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-keep .pill.finding-category,
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-keep .pill.finding-category{background:#23472f!important;border-color:#39764b!important;color:#9ce2ad!important}

/* Reviewer assignments stay in one concise line and expand only when changed. */
#view-review:not(.intake) #fb-reviewers{align-items:center}
#view-review:not(.intake) .reviewer-summary{display:flex;align-items:center;gap:10px;min-height:34px}
#view-review:not(.intake) #fb-reviewer-summary{color:var(--rv-soft);font-size:12px;font-weight:600}
#view-review:not(.intake) #fb-reviewer-toggle{min-height:28px;padding:4px 9px;border:1px solid var(--rv-line);border-radius:8px;background:transparent;box-shadow:none;color:var(--rv-muted);font-size:10px}
#view-review:not(.intake) .reviewer-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#view-review:not(.intake) .reviewer-controls[hidden]{display:none!important}
#view-review:not(.intake) .reviewer-controls label{width:auto}
html[data-theme="dark"] #view-review:not(.intake) #fb-reviewer-summary{color:var(--ink)!important}
html[data-theme="dark"] #view-review:not(.intake) #fb-reviewer-toggle{background:var(--s2)!important;color:var(--ink)!important;border-color:var(--line)!important}

/* Keep the reviewer workspace focused on findings and reduce toolbar whitespace. */
#view-review:not(.intake) #findings-panel>.panel-head{gap:8px;min-height:0;padding-bottom:8px}
#view-review:not(.intake) .review-flow-label{font-size:12px;font-weight:600;color:var(--rv-muted)}
#view-review:not(.intake) #findings-panel .panel-body{padding-top:8px}
#view-review:not(.intake) .finding-tools{margin-bottom:8px;padding-bottom:8px}
#view-review:not(.intake) .finding-tools .chips{margin-top:6px}
#view-review:not(.intake) .finding{margin-bottom:8px;padding:12px 14px}
#view-review:not(.intake) .finding-labels{gap:5px}
#view-review:not(.intake) .finding-actions{gap:6px;margin-top:8px}

/* Give the highlighted-review controls a consistent inset from the panel edge. */
#view-review:not(.intake) #document-panel>.panel-body{padding:12px 18px 20px!important}
#view-review:not(.intake) #text-preview-heading{margin:0 0 8px!important;padding:0 2px}
#view-review:not(.intake) .review-preview-tools{padding:0 2px;margin:0 0 10px!important;row-gap:8px}
#view-review:not(.intake) #legend{gap:6px 16px}
#view-review:not(.intake) .review-preview-actions{padding-right:0}
#view-review:not(.intake) .preview{margin:0}
@media(max-width:700px){
  #view-review:not(.intake) #document-panel>.panel-body{padding:10px 12px 16px!important}
  #view-review:not(.intake) #text-preview-heading,
  #view-review:not(.intake) .review-preview-tools{padding-inline:0}
}

/* Dark-mode handoff banner: keep its status readable without a bright light surface. */
html[data-theme="dark"] #creative-banner{
  background:#172a32!important;
  color:#d5e3e8!important;
  border-color:#35515c!important;
  border-left-color:#35b8dc!important;
  box-shadow:0 4px 12px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] #creative-banner :is(strong,div){color:#d5e3e8!important}
html[data-theme="dark"] #creative-banner .cb-bad{color:#ffc27a!important}
html[data-theme="dark"] #creative-banner .cb-ok{color:#8fe0aa!important}
html[data-theme="dark"] #creative-banner button{
  background:#203640!important;
  color:#e4eef1!important;
  border-color:#3b5660!important;
}
html[data-theme="dark"] #creative-banner button.primary{
  background:linear-gradient(180deg,#5ccbea,#2fb4d8)!important;
  color:#04222d!important;
  border-color:#2fb4d8!important;
}
/* Match the compact, restrained toolbar hierarchy in the supplied reference. */
#view-review:not(.intake) #creative-banner{padding:9px 13px;font-size:12px;line-height:1.45}
#view-review:not(.intake) #creative-banner .cb-row{gap:8px}
#view-review:not(.intake) .review-preview-tools{row-gap:7px}
#view-review:not(.intake) .review-preview-actions button{min-height:34px;padding:6px 11px}

/* Use one vertical scroll surface for the full document pane, including the rendered PDF. */
#view-review:not(.intake) #document-panel.has-pdf>.panel-body{
  display:block!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain;
}
#view-review:not(.intake) #document-panel.has-pdf #pdf-viewer{
  display:block!important;
  min-height:0!important;
  height:auto!important;
}
#view-review:not(.intake) #document-panel.has-pdf .pdf-page-scroll{
  display:flex!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}

/* Prefer clear outlines over floating shadows throughout the review workspace. */
#view-review:not(.intake){--rv-border-strong:#9aabb3}
#view-review:not(.intake) :is(
  .filebar,.ctx-toggle,.document-language-row,.upload-zone,#upload-status,.text-toggle,
  .pdf-toolbar,.pdf-page-scroll,.page-strip,.finding-search,.chip,.finding,.finding-group,
  .finding-actions button,.review-preview-actions button,.reviewer-actions button,#add-finding
){box-shadow:none!important}
#view-review:not(.intake) :is(
  .filebar,.ctx-toggle,.document-language-row,.upload-zone,#upload-status,.text-toggle,
  .pdf-toolbar,.pdf-page-scroll,.page-strip,.finding-search,.chip,.finding,.finding-group,
  .finding-actions button,.review-preview-actions button,.reviewer-actions button,#add-finding
){border-color:var(--rv-border-strong)}
#view-review:not(.intake) .finding{border-width:1px;border-left-width:4px}
#view-review:not(.intake) .finding-group{border-width:1px;border-left-width:4px}
#view-review:not(.intake) .chip{border-width:1px}
#view-review:not(.intake) .pdf-page-scroll{border-width:1px}
html[data-theme="dark"] #view-review:not(.intake){--rv-border-strong:#526974}
html[data-theme="dark"] #view-review:not(.intake) :is(
  .filebar,.ctx-toggle,.document-language-row,.upload-zone,#upload-status,.text-toggle,
  .pdf-toolbar,.pdf-page-scroll,.page-strip,.finding-search,.chip,.finding,.finding-group,
  .finding-actions button,.review-preview-actions button,.reviewer-actions button,#add-finding
){border-color:var(--rv-border-strong)!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-mlr:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-mlr{border-left-color:#e66a76!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-strategy:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-strategy{border-left-color:#e2a742!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-editorial:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-editorial{border-left-color:#6ea7f2!important}
html[data-theme="dark"] #view-review:not(.intake) .finding.category-keep:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) .finding-group.category-keep{border-left-color:#62bd7d!important}
#view-review:not(.intake) .upload-actions .upload-info{width:28px;min-width:28px;height:28px;min-height:28px;padding:0;border:1px solid var(--rv-line);border-radius:50%;background:#f8faf8;color:var(--rv-soft);font-weight:800;line-height:1;cursor:help}

/* Trim excess vertical padding on the review header and dashboard overview. */
#view-review:not(.intake) .filebar{gap:8px 12px;margin-bottom:12px;padding:10px 14px}
#view-review:not(.intake) .filebar-row{padding-top:7px}
#view-dash .dashboard-main{padding-top:20px}
#view-dash .dashboard-heading{margin-bottom:16px;padding-bottom:13px}
#view-dash .home-metrics{gap:12px;margin-bottom:16px}
#view-dash .home-metrics .metric{min-height:100px;padding:15px 18px 14px}
#view-dash .dash-grid{margin-top:12px}
@media(max-width:620px){
  #view-review:not(.intake) .filebar{padding:9px 11px}
  #view-review:not(.intake) .filebar-row{padding-top:6px}
  #view-dash .dashboard-main{padding-top:16px}
  #view-dash .dashboard-heading{gap:10px;margin-bottom:14px;padding-bottom:12px}
  #view-dash .home-metrics .metric{min-height:88px;padding:12px}
}
#view-review:not(.intake) .upload-actions{position:relative}
#view-review:not(.intake) .upload-actions .upload-info{position:relative;z-index:12;width:28px;min-width:28px;height:28px;min-height:28px;padding:0;border:1px solid var(--rv-line);border-radius:50%;background:#f8faf8;color:var(--rv-soft);font-weight:800;line-height:1;cursor:help}
#view-review:not(.intake) .upload-actions .upload-info-popover{position:absolute;z-index:20;top:calc(100% + 8px);right:0;width:max-content;max-width:min(440px,calc(100vw - 32px));padding:10px 12px;border:1px solid #b8cbd4;border-radius:9px;background:#fff;color:#344e59;box-shadow:0 6px 20px rgba(21,43,50,.16);font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
#view-review:not(.intake) .upload-actions .upload-info-popover[hidden]{display:none!important}
html[data-theme="dark"] #view-review:not(.intake) .upload-actions .upload-info-popover{border-color:var(--line);background:var(--surface);color:var(--ink);box-shadow:0 8px 24px rgba(0,0,0,.38)}
#view-review:not(.intake) #findings-panel>.panel-head{padding-bottom:2px!important}
#view-review:not(.intake) #findings-panel>.panel-body{padding-top:0!important}
#view-review:not(.intake) #findings-panel .finding-tools{margin-top:0;margin-bottom:6px;padding-top:0;padding-bottom:0}
#view-review:not(.intake) #findings-panel .finding-search-label.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}

/* Keep review-category panels visibly color-coded against the dark workspace. */
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-mlr:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) #findings .finding-group.category-mlr{background:#24151b!important;background-image:none!important;border-color:#783246!important;border-left:5px solid #ff3d63!important;color:#f6d9df!important}
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-strategy:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) #findings .finding-group.category-strategy{background:#241d10!important;background-image:none!important;border-color:#795819!important;border-left:5px solid #ffb51b!important;color:#f5e5bd!important}
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-editorial:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) #findings .finding-group.category-editorial{background:#13202d!important;background-image:none!important;border-color:#28577f!important;border-left:5px solid #18b7ee!important;color:#d8eafb!important}
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-keep:not(.resolved),
html[data-theme="dark"] #view-review:not(.intake) #findings .finding-group.category-keep{background:#14231c!important;background-image:none!important;border-color:#2e6948!important;border-left:5px solid #30ca83!important;color:#d6f1df!important}
html[data-theme="dark"] #view-review:not(.intake) #findings :is(.finding,.finding-group).category-mlr :is(h4,p,blockquote,.field-label),
html[data-theme="dark"] #view-review:not(.intake) #findings :is(.finding,.finding-group).category-mlr blockquote{color:#f2d6dc!important}
html[data-theme="dark"] #view-review:not(.intake) #findings :is(.finding,.finding-group).category-strategy :is(h4,p,blockquote,.field-label){color:#f4e2b4!important}
html[data-theme="dark"] #view-review:not(.intake) #findings :is(.finding,.finding-group).category-editorial :is(h4,p,blockquote,.field-label){color:#d4e9fc!important}
html[data-theme="dark"] #view-review:not(.intake) #findings :is(.finding,.finding-group).category-keep :is(h4,p,blockquote,.field-label){color:#d2f0dd!important}
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-mlr blockquote{background:#180e13!important;border-color:#9f3d53!important}
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-strategy blockquote{background:#191307!important;border-color:#987026!important}
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-editorial blockquote{background:#0d1822!important;border-color:#3978a7!important}
html[data-theme="dark"] #view-review:not(.intake) #findings .finding.category-keep blockquote{background:#0e1b14!important;border-color:#3d8059!important}

/* Light-theme category cards: keep a white reading surface with clear markup colors. */
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-mlr:not(.resolved),
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding-group.category-mlr{background:#fff8f9!important;border:1px solid #f2bac3!important;border-left:5px solid #e63855!important}
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-strategy:not(.resolved),
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding-group.category-strategy{background:#fffaf0!important;border:1px solid #f1d18c!important;border-left:5px solid #f2a900!important}
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-editorial:not(.resolved),
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding-group.category-editorial{background:#f5f9ff!important;border:1px solid #bfd5fa!important;border-left:5px solid #1688d4!important}
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-keep:not(.resolved),
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding-group.category-keep{background:#f4fbf6!important;border:1px solid #b6dfc2!important;border-left:5px solid #269657!important}
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-mlr blockquote{background:#fff0f2!important;border-color:#f3bdc5!important;border-left:3px solid #e63855!important}
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-strategy blockquote{background:#fff6df!important;border-color:#f2d58e!important;border-left:3px solid #f2a900!important}
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-editorial blockquote{background:#eaf3ff!important;border-color:#b9d3fa!important;border-left:3px solid #1688d4!important}
html:not([data-theme="dark"]) #view-review:not(.intake) #findings .finding.category-keep blockquote{background:#eaf7ee!important;border-color:#b5dfc2!important;border-left:3px solid #269657!important}
#view-review:not(.intake) #text-preview-heading{display:none!important}
#view-review:not(.intake) #fb-reviewer-summary{display:inline-flex;align-items:center;min-width:0}
#view-review:not(.intake) .reviewer-tags{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
#view-review:not(.intake) .reviewer-tag{display:inline-flex;align-items:center;gap:6px;min-height:25px;padding:3px 8px;border:1px solid var(--rv-line);border-radius:999px;background:var(--rv-soft-bg,#f4f8f8);color:var(--rv-ink);font-size:10px;line-height:1.2;white-space:nowrap}
#view-review:not(.intake) .reviewer-tag b{font-weight:750}
#view-review:not(.intake) .reviewer-tag span{color:var(--rv-muted);font-weight:600}
html[data-theme="dark"] #view-review:not(.intake) .reviewer-tag{background:var(--s2);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] #view-review:not(.intake) .reviewer-tag span{color:var(--rv-muted)}
#view-review:not(.intake) .reviewer-summary{min-width:0;flex:1 1 auto}
#view-review:not(.intake) .reviewer-tags{flex-wrap:nowrap;max-width:min(58vw,820px);overflow-x:auto;scrollbar-width:thin}
#view-review:not(.intake) .reviewer-tag{flex:none}
@media(max-width:680px){#view-review:not(.intake) .reviewer-tags{max-width:calc(100vw - 170px)}}
#view-review:not(.intake) .finding .fstatus[hidden]{display:none!important}

/* the finding chosen in the preview stays outlined (Word, PowerPoint, Excel, picture, text view) */
.preview mark.active,.dr-image-box mark.active{outline:3px solid #0aa5d8!important;box-shadow:0 0 0 4px rgba(10,165,216,.3);position:relative;z-index:2}
.dr-image-box mark.active{background:rgba(10,165,216,.18)}
/* Previously flagged: the list of earlier papers */
#view-review:not(.intake) .finding .pattern-details .pat-list{list-style:none;margin:2px 0 0;padding:0;display:grid;gap:4px}
#view-review:not(.intake) .finding .pattern-details .pat-list li{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
#view-review:not(.intake) .finding .pattern-details .pat-list small{color:var(--c-text-muted,#647074)}

/* Confidence tag: level colour + small meter (High 90+, Medium, Low) */
.pill.conf{display:inline-flex;align-items:center;gap:6px;font-weight:600}
.pill.conf b{font-weight:800;font-variant-numeric:tabular-nums}
.pill.conf .conf-bar{display:inline-block;width:28px;height:5px;border-radius:99px;background:rgba(0,0,0,.12);overflow:hidden}
.pill.conf .conf-bar i{display:block;height:100%;border-radius:99px;background:currentColor}
.pill.conf.tier-high{background:#e3f6ec;color:#12684a;box-shadow:inset 0 0 0 1px #b7e4cc}
.pill.conf.tier-mid{background:#eaf1fb;color:#2c5282;box-shadow:inset 0 0 0 1px #c4d7f0}
.pill.conf.tier-low,.pill.conf.low{background:#fff1d6;color:#8a5200;box-shadow:inset 0 0 0 1px #f2d79b}
