.rtx{--rtx-ink:#0f172a;--rtx-muted:#64748b;--rtx-border:#e2e8f0;--rtx-soft:#f8fafc;--rtx-teal:#0f766e;--rtx-teal-dark:#0c5d57;min-width:0;padding:24px;color:var(--rtx-ink);font-family:Inter,system-ui,sans-serif}
.rtx *{box-sizing:border-box}
.rtx-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}
.rtx-page-head h1{margin:2px 0 0;font-size:26px;line-height:1.2;font-weight:800;letter-spacing:-.025em}
.rtx-eyebrow{margin:0;color:var(--rtx-teal);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.rtx-subtitle,.rtx-section-title p{margin:5px 0 0;color:var(--rtx-muted);font-size:13px}
.rtx-head-meta{display:flex;align-items:center;gap:10px;margin-top:10px;color:var(--rtx-muted);font-size:12px}
.rtx-card{background:#fff;border:1px solid var(--rtx-border);border-radius:13px;box-shadow:0 1px 3px rgba(15,23,42,.05)}
.rtx-btn{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px 14px;border:1px solid transparent;border-radius:9px;font:700 13px/1 Inter,system-ui,sans-serif;cursor:pointer;transition:.14s}
.rtx-btn:disabled{opacity:.55;cursor:default}
.rtx-btn--primary{color:#fff;background:var(--rtx-teal)}
.rtx-btn--primary:hover:not(:disabled){background:var(--rtx-teal-dark)}
.rtx-btn--secondary{color:#334155;background:#fff;border-color:var(--rtx-border)}
.rtx-btn--secondary:hover:not(:disabled){background:var(--rtx-soft)}
.rtx-btn--danger{color:#fff;background:#dc2626}
.rtx-btn--danger-ghost{color:#b91c1c;background:#fff;border-color:#fecaca}
.rtx-icon{width:17px;height:17px;flex:0 0 auto}
.rtx-filters{display:grid;grid-template-columns:1fr 1fr 220px;gap:14px;padding:16px;margin-bottom:16px}
.rtx-field{display:flex;min-width:0;flex-direction:column;gap:6px;color:#475569;font-size:12px;font-weight:700}
.rtx-field--full{grid-column:1/-1}
.rtx-field b{color:#dc2626}
.rtx-input{width:100%;min-height:40px;padding:9px 11px;border:1px solid var(--rtx-border);border-radius:9px;background:#fff;color:var(--rtx-ink);font:500 13px/1.3 Inter,system-ui,sans-serif}
.rtx-input:focus{outline:none;border-color:#14b8a6;box-shadow:0 0 0 3px rgba(20,184,166,.14)}
.rtx-input:disabled{color:#64748b;background:#f8fafc}
.rtx-table-card{overflow:hidden}
.rtx-table-wrap{max-width:100%;overflow-x:auto}
.rtx-table{width:100%;min-width:940px;border-collapse:collapse;font-size:12.5px}
.rtx-table th{padding:10px 13px;background:#f8fafc;color:#64748b;text-align:left;font-size:10.5px;font-weight:800;letter-spacing:.045em;text-transform:uppercase;white-space:nowrap}
.rtx-table td{padding:12px 13px;border-top:1px solid #f1f5f9;vertical-align:middle;color:#334155}
.rtx-table tbody tr{cursor:pointer;transition:.12s}
.rtx-table tbody tr:hover,.rtx-table tbody tr:focus{outline:none;background:#f0fdfa}
.rtx-table td strong{display:block;color:#0f172a;font-weight:700}
.rtx-table td small{display:block;margin-top:3px;color:#94a3b8;font-size:11px}
.rtx-code{font-family:"JetBrains Mono",monospace;font-weight:700;color:#0f766e!important;white-space:nowrap}
.rtx-status{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:10.5px;font-weight:800;white-space:nowrap}
.rtx-status--rascunho{color:#475569;background:#f1f5f9}
.rtx-status--em_elaboracao{color:#92400e;background:#fef3c7}
.rtx-status--finalizado{color:#166534;background:#dcfce7}
.rtx-state{min-height:150px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:28px;color:var(--rtx-muted);text-align:center;font-size:13px}
.rtx-state .rtx-icon{width:28px;height:28px;color:#94a3b8}
.rtx-state strong{color:#334155;font-size:14px}
.rtx-notice{margin:0 0 16px;padding:11px 13px;border:1px solid;border-radius:9px;font-size:12.5px;font-weight:600}
.rtx-notice--error{color:#991b1b;background:#fef2f2;border-color:#fecaca}
.rtx-notice--success{color:#166534;background:#f0fdf4;border-color:#bbf7d0}
.rtx-back{display:inline-flex;align-items:center;gap:6px;margin:0 0 14px;padding:0;border:0;background:none;color:#0f766e;font:700 13px Inter,system-ui,sans-serif;cursor:pointer}
.rtx-detail-card{padding:20px}
.rtx-section-title{display:flex;justify-content:space-between;gap:14px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid #f1f5f9}
.rtx-section-title h2{margin:0;font-size:16px}
.rtx-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.rtx-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:20px}
.rtx-save-state{color:var(--rtx-muted);font-size:12px}
.rtx-form-note{margin:14px 0 0;color:var(--rtx-muted);font-size:11.5px;line-height:1.5}
.rtx-next-step{display:flex;align-items:center;gap:10px;margin-top:14px;padding:13px 15px;border:1px dashed #cbd5e1;border-radius:10px;color:#64748b;background:#f8fafc;font-size:12px}
.rtx-next-step strong{color:#334155}
.rtx-conflict{display:flex;align-items:flex-start;flex-direction:column;gap:6px;margin-bottom:16px;padding:14px;border:1px solid #fcd34d;border-radius:10px;color:#78350f;background:#fffbeb;font-size:12.5px}
.rtx-conflict .rtx-btn{margin-top:3px}
.rtx-modal-layer{position:fixed;z-index:10050;inset:0;display:flex;align-items:center;justify-content:center;padding:18px}
.rtx-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.54)}
.rtx-modal{position:relative;width:min(660px,100%);max-height:calc(100vh - 36px);overflow:auto;border:1px solid var(--rtx-border);border-radius:14px;background:#fff;box-shadow:0 22px 60px rgba(15,23,42,.28)}
.rtx-modal__header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid var(--rtx-border)}
.rtx-modal__header h2{margin:2px 0 0;font-size:18px}
.rtx-close{width:32px;height:32px;border:0;border-radius:8px;background:#f1f5f9;color:#475569;font-size:22px;line-height:1;cursor:pointer}
.rtx-modal__body{padding:20px}
.rtx-modal__actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:14px 20px;border-top:1px solid var(--rtx-border);background:#f8fafc}
.rtx-loading-cover{position:fixed;z-index:10040;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(248,250,252,.72);color:#0f766e;font-size:13px;font-weight:800}
@media(max-width:900px){.rtx{padding:18px}.rtx-filters{grid-template-columns:1fr 1fr}.rtx-filters .rtx-field:last-child{grid-column:1/-1}.rtx-page-head h1{font-size:23px}}
@media(max-width:640px){.rtx{padding:14px}.rtx-page-head{align-items:stretch;flex-direction:column}.rtx-page-head>.rtx-btn{width:100%}.rtx-filters,.rtx-form-grid{grid-template-columns:1fr}.rtx-filters .rtx-field:last-child,.rtx-field--full{grid-column:auto}.rtx-detail-card{padding:15px}.rtx-next-step{align-items:flex-start;flex-direction:column}.rtx-modal-layer{align-items:flex-end;padding:0}.rtx-modal{width:100%;max-height:92vh;border-radius:14px 14px 0 0}.rtx-modal__body{padding:16px}.rtx-modal__actions{padding:12px 16px}.rtx-modal__actions .rtx-btn{flex:1}.rtx-head-meta{flex-wrap:wrap}}

/* Fase 4 — editor integrado. Todas as regras permanecem no namespace rtx. */
.rtx--editor{height:100%;padding:0;display:flex;flex-direction:column;overflow:hidden;background:#edf1ef}
.rtx-editor-head{min-height:64px;display:grid;grid-template-columns:210px minmax(0,1fr) auto;align-items:center;gap:16px;padding:10px 16px;background:#fff;border-bottom:1px solid var(--rtx-border)}
.rtx-editor-identity{min-width:0;display:flex;align-items:baseline;gap:10px}.rtx-editor-identity strong{color:#0f766e;font-family:"JetBrains Mono",monospace;font-size:12px}.rtx-editor-identity span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:800}
.rtx-editor-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.rtx-save-pill{padding:5px 9px;border-radius:999px;color:#475569;background:#f1f5f9;font-size:10.5px;font-weight:800;white-space:nowrap}.rtx-save-pill--saving,.rtx-save-pill--unsaved{color:#92400e;background:#fef3c7}.rtx-save-pill--saved{color:#166534;background:#dcfce7}.rtx-save-pill--error,.rtx-save-pill--conflict{color:#991b1b;background:#fee2e2}
.rtx-workspace{min-height:0;flex:1;display:grid;grid-template-columns:220px minmax(350px,420px) minmax(0,1fr);overflow:hidden}
.rtx-findings-pane,.rtx-edit-pane{min-height:0;overflow-y:auto;background:#f9fbfa;border-right:1px solid var(--rtx-border)}
.rtx-findings-pane{display:flex;flex-direction:column;padding:14px 10px;overflow-y:hidden}.rtx-pane-title{display:flex;align-items:center;justify-content:space-between;padding:5px 7px 12px;color:#004d3f}.rtx-count{min-width:25px;padding:4px 7px;border-radius:99px;background:#e8f2ee;text-align:center;font-size:11px;font-weight:800}
.rtx-finding-search{margin:0 2px 10px;flex:0 0 auto}
.rtx-finding-list{flex:1;min-height:0;overflow-y:auto}.rtx-finding-item{width:100%;display:grid;grid-template-columns:26px 8px minmax(0,1fr);align-items:center;gap:7px;padding:10px 8px;border:0;border-top:1px solid #e9eeeb;border-radius:7px;background:#fff;color:#17201d;text-align:left;cursor:pointer}.rtx-finding-item:hover,.rtx-finding-item.is-active{background:#e8f2ee}.rtx-finding-number{color:#00663d;font-size:11px;font-weight:800}.rtx-finding-item strong,.rtx-finding-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rtx-finding-item strong{font-size:12px}.rtx-finding-item small{margin-top:3px;color:#66716d;font-size:9.5px}.rtx-finding-dot{width:8px;height:8px;border-radius:99px;background:#94a3b8;justify-self:center}.rtx-finding-dot--nao_conformidade{background:#dc2626}.rtx-finding-dot--oportunidade_melhoria{background:#f3bd00}.rtx-finding-dot--conforme{background:#16a34a}.rtx-finding-empty{margin:10px 4px;color:#94a3b8;font-size:12px;text-align:center}.rtx-add-finding{width:100%;margin-top:12px;flex:0 0 auto}
.rtx-edit-pane{padding:16px}.rtx-general-card,.rtx-finding-form{margin-bottom:15px;border:1px solid var(--rtx-border);border-radius:11px;background:#fff}.rtx-general-card summary{display:flex;align-items:center;justify-content:space-between;padding:13px 14px;color:#004d3f;font-size:13px;font-weight:800;cursor:pointer}.rtx-general-body{padding:0 14px 15px;border-top:1px solid #f1f5f9}.rtx-general-body .rtx-form-grid{padding-top:14px}
.rtx-finding-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px}.rtx-finding-toolbar h1{margin:0;color:#004d3f;font-size:19px}.rtx-compact-actions{display:flex;gap:5px}.rtx-compact-actions button{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--rtx-border);border-radius:8px;background:#fff;color:#004d3f;cursor:pointer}.rtx-compact-actions button:disabled{opacity:.3;cursor:default}.rtx-compact-actions .is-danger{color:#b91c1c}
.rtx-finding-form{display:grid;gap:16px;padding:16px}.rtx-textarea{min-height:112px;resize:vertical;line-height:1.5}.rtx-choice-field{min-width:0;margin:0;padding:0;border:0}.rtx-choice-field legend{margin-bottom:7px;color:#475569;font-size:11px;font-weight:800;text-transform:uppercase}.rtx-choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.rtx-choice-grid--priority{grid-template-columns:repeat(4,1fr)}.rtx-choice{position:relative}.rtx-choice input{position:absolute;opacity:0}.rtx-choice span{min-height:48px;display:grid;place-items:center;padding:5px;border:1px solid #cfd8d4;border-radius:8px;color:#52615b;background:#fff;text-align:center;font-size:10.5px;font-weight:700;line-height:1.2}.rtx-choice input:checked+span{border-color:#00663d;background:#e8f2ee;color:#003f34;box-shadow:inset 0 0 0 1px #00663d}.rtx-choice-field:disabled .rtx-choice span{opacity:.68}
.rtx-preview-pane{min-width:0;min-height:0;display:flex;flex-direction:column;background:#e7ece9}.rtx-preview-toolbar{min-height:58px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 12px;padding:9px 14px;border-bottom:1px solid var(--rtx-border);background:rgba(247,250,248,.96)}.rtx-preview-toolbar>div{display:grid}.rtx-preview-toolbar strong{color:#004d3f;font-size:12px}.rtx-preview-toolbar-actions{display:flex;align-items:center;gap:8px}.rtx-preview-modes{display:inline-flex;padding:3px;border-radius:9px;background:#e8f2ee;gap:2px}.rtx-preview-modes button{padding:6px 10px;border:0;border-radius:7px;background:transparent;color:#31564b;font:700 11.5px Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap}.rtx-preview-modes button.is-active{background:#fff;color:#004d3f;box-shadow:0 1px 2px rgba(15,23,42,.12)}.rtx-preview-stage{min-width:0;min-height:0;flex:1;overflow:auto;padding:22px}.rtx-report-root{width:max-content;margin:0 auto}.rtx-editor-empty{min-height:180px;display:grid;place-items:center;border:1px dashed #cbd5e1;border-radius:11px;background:#fff;color:#64748b;font-size:13px}.rtx-mobile-tabs{display:none}
@media(max-width:1500px){.rtx-workspace{grid-template-columns:200px minmax(330px,370px) minmax(0,1fr)}.rtx-preview-stage{padding:16px}.rtx-choice-grid--priority{grid-template-columns:1fr 1fr}}
@media(max-width:1100px){.rtx--editor{height:auto;min-height:100%}.rtx-editor-head{grid-template-columns:1fr auto}.rtx-editor-identity{grid-column:1/-1;grid-row:2}.rtx-mobile-tabs{display:grid;grid-template-columns:1fr 1fr;padding:8px;background:#fff;border-bottom:1px solid var(--rtx-border)}.rtx-mobile-tabs button{padding:9px;border:0;border-radius:7px;background:#f8fafc;color:#64748b;font-weight:800}.rtx-mobile-tabs button.is-active{background:#e8f2ee;color:#004d3f}.rtx-workspace{display:block;overflow:visible}.rtx-findings-pane,.rtx-edit-pane,.rtx-preview-pane{display:none;border:0;overflow:visible}.rtx-findings-pane.is-mobile-visible,.rtx-edit-pane.is-mobile-visible{display:block}.rtx-preview-pane.is-mobile-visible{display:flex;min-height:760px}.rtx-findings-pane{padding-bottom:4px}.rtx-finding-list{max-height:220px}.rtx-preview-stage{min-height:700px}}
@media(max-width:640px){.rtx-editor-head{display:flex;align-items:stretch;flex-direction:column}.rtx-editor-actions{justify-content:flex-start;flex-wrap:wrap}.rtx-editor-identity{order:-1}.rtx-findings-pane,.rtx-edit-pane{padding:12px}.rtx-choice-grid,.rtx-choice-grid--priority{grid-template-columns:1fr 1fr}.rtx-preview-toolbar{align-items:stretch;flex-direction:column}.rtx-preview-stage{padding:10px}.rtx-report-root{margin:0}.rtx-save-pill{align-self:center}}
.rtx-evidence-panel{margin-top:22px;padding:18px;border:1px solid #d8e2de;border-radius:12px;background:#f8fbfa}.rtx-evidence-panel .rtx-pane-title{align-items:flex-start}.rtx-evidence-panel .rtx-pane-title small{display:block;margin-top:3px;color:#64748b;font-weight:500}.rtx-file-input{display:none}.rtx-evidence-list{display:grid;gap:12px;margin-top:14px}.rtx-evidence-card{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;padding:12px;border:1px solid #d9e2df;border-radius:10px;background:#fff}.rtx-evidence-thumb{height:112px;display:grid;place-items:center;overflow:hidden;border-radius:8px;background:#edf3f0;color:#64748b;font-size:12px;text-align:center}.rtx-evidence-thumb img{width:100%;height:100%;display:block;object-fit:cover}.rtx-evidence-body{min-width:0}.rtx-evidence-body>strong{display:block;margin-bottom:7px;color:#075746;font-size:12px;text-transform:uppercase}.rtx-evidence-body textarea{min-height:58px;resize:vertical}.rtx-evidence-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.rtx-evidence-actions button{min-height:32px;padding:6px 9px;border:1px solid #cbd8d3;border-radius:7px;background:#fff;color:#31564b;font-size:12px;font-weight:700;display:inline-flex;align-items:center;gap:5px}.rtx-evidence-actions button.is-danger{color:#b42318;border-color:#f1c6c1}.rtx-evidence-actions button:disabled{opacity:.45}.rtx-evidence-add{margin-top:12px}.rtx-evidence-help{margin:10px 0 0;color:#64748b;font-size:12px}@media(max-width:620px){.rtx-evidence-card{grid-template-columns:1fr}.rtx-evidence-thumb{height:190px}}

/* Bloco B: estrutura editorial, separada das constatações e do motor A4. */
.rtx-structure-body{display:grid;gap:16px;padding:0 14px 16px;min-width:0}
.rtx-structure-block,.rtx-structure-section{display:grid;gap:10px;min-width:0;margin:0;padding:12px;border:1px solid var(--rtx-border);border-radius:9px;background:#fff}
.rtx-structure-block legend,.rtx-structure-section legend{padding:0 5px;font-size:12px;font-weight:800;color:#004d3f}
.rtx-structure-toggle{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;min-height:32px}
.rtx-structure-toggle input{flex:0 0 auto;width:17px;height:17px;accent-color:#005745}
.rtx-structure-sections{display:grid;gap:12px;min-width:0;border-top:1px solid var(--rtx-border);padding-top:14px}
.rtx-structure-sections h3{margin:0;font-size:14px;color:#004d3f}
.rtx-structure-help{display:block;margin:0;color:#64748b;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.rtx-structure-actions{display:flex;flex-wrap:wrap;gap:6px}
.rtx-structure-actions button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:36px;padding:6px 9px;border:1px solid var(--rtx-border);border-radius:7px;background:#f8fbfa;color:#31564b;font-size:12px}
.rtx-structure-card button:disabled,.rtx-structure-card fieldset:disabled{opacity:.65}
.rtx-structure-card .rtx-input{min-width:0;max-width:100%;box-sizing:border-box}
.rtx-structure-card textarea{resize:vertical;line-height:1.5}
.rtx-structure-textarea{min-height:220px}
.rtx-richbar{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:6px}
.rtx-richbar-btn{min-height:28px;padding:4px 9px;border:1px solid var(--rtx-border);border-radius:6px;background:#f8fbfa;color:#31564b;font:700 11px Inter,system-ui,sans-serif;cursor:pointer}
.rtx-richbar-btn:hover:not(:disabled){background:#e8f2ee}
.rtx-richbar-btn:disabled{opacity:.5;cursor:default}
@media(max-width:640px){.rtx-structure-body{padding:0 10px 12px}.rtx-structure-block,.rtx-structure-section{padding:10px}.rtx-structure-actions button{min-height:44px;flex:1 1 auto}.rtx-structure-sections>.rtx-btn{white-space:normal}}

/* Compact per-evidence framing controls. Existing gallery sizes are unchanged. */
button.rtx-evidence-thumb{position:relative;width:100%;padding:0;border:1px solid #d8e2de;cursor:pointer;isolation:isolate}
button.rtx-evidence-thumb[aria-expanded="true"]{outline:2px solid #08705b;outline-offset:2px}
button.rtx-evidence-thumb img{position:absolute;inset:0;max-width:none;object-fit:contain}
.rtx-image-adjust{min-width:0;margin:12px 0 0;padding:10px;border:1px solid #d8e2de;border-radius:8px}
.rtx-image-adjust legend{padding:0 4px;font-size:11px;font-weight:800;color:#005745}
.rtx-image-modes{display:flex;gap:5px;flex-wrap:wrap}
.rtx-image-modes button{flex:1 1 auto;min-height:32px;padding:5px 8px;border:1px solid #cbd8d3;border-radius:6px;background:#fff;color:#31564b;font-size:12px}
.rtx-image-modes button[aria-pressed="true"]{background:#005745;color:white;border-color:#005745}
.rtx-image-sliders{display:grid;gap:9px;margin-top:10px}
.rtx-image-sliders label{display:grid;gap:5px;min-width:0;font-size:12px;color:#31564b}
.rtx-image-sliders label>span{display:flex;justify-content:space-between;gap:8px}
.rtx-image-sliders input{width:100%;min-width:0;margin:0;accent-color:#005745}
.rtx-image-adjust:disabled{opacity:.65}
@media(max-width:640px){.rtx-image-modes button{min-height:40px}.rtx-image-sliders input{min-height:28px}}
