*{box-sizing:border-box}body{margin:0;background:#f3f5f3;color:#203431;font:15px/1.5 'Segoe UI',sans-serif}aside{position:fixed;width:236px;height:100vh;padding:35px 23px;background:#123c3b;color:#eaf2ed}.brand{font-size:36px;letter-spacing:2px;font-weight:800;color:white;text-decoration:none}.brand:first-letter{color:#dcbb75}.brand small{display:block;font-size:9px;letter-spacing:2.5px;margin-top:-6px}.workspace{font-size:10px;letter-spacing:1.2px;color:#9ab7af;margin:48px 9px 25px}.workspace b{font-size:15px;color:white;letter-spacing:0}nav button{display:block;width:100%;text-align:left;background:none;border:0;color:#b9cfca;margin:7px 0;padding:13px;border-radius:7px}nav button.active{background:#2b5651;color:white}nav button span{margin-right:17px;color:#a9b9a0}.aside-bottom{position:absolute;bottom:30px;font-size:11px;line-height:1.9;color:#a5beb5}.shell{margin-left:236px}header{height:78px;border-bottom:1px solid #dde4df;background:#fff;padding:26px 42px;display:flex;justify-content:space-between;font-size:12px;color:#6c7d75}.badge,.pill{border:1px solid #d6e1d8;border-radius:20px;padding:5px 11px;font-size:11px;color:#386858;background:#f2f7f2}main{max-width:1450px;margin:auto;padding:38px 42px;min-height:calc(100vh - 133px)}.eyebrow{font-size:11px;letter-spacing:2px;color:#557d6e;font-weight:700}h1{font-size:32px;letter-spacing:-1px;line-height:1.2;margin:10px 0}h2{font-size:19px;margin:0 0 7px}h3{font-size:15px;margin:0 0 12px}p{color:#687970;margin:8px 0 23px}.topline,.section-head{display:flex;justify-content:space-between;gap:20px;align-items:center}.actions{display:flex;gap:9px;flex-wrap:wrap}button,.button{cursor:pointer;border:1px solid #cfdad3;background:#fff;color:#244a40;padding:10px 16px;font:600 13px 'Segoe UI';border-radius:6px;text-decoration:none}button:hover{filter:brightness(.95)}button.primary{background:#226457;color:white;border-color:#226457}button:focus-visible,a:focus-visible{outline:3px solid #d6b16a;outline-offset:3px}.notice{background:#fff7e5;border:1px solid #e8dbb8;border-left:3px solid #b98e3e;border-radius:6px;padding:13px 18px;font-size:12px;color:#725c31;margin:25px 0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:25px 0}.stat,.card{background:white;border:1px solid #dce4de;border-radius:9px;padding:24px}.stat label{font-size:12px;color:#6c7e73}.stat strong{display:block;font-size:29px;font-weight:600;margin:8px 0}.stat small{font-size:11px;color:#7d8c82}.card{margin:18px 0}.project{display:flex;justify-content:space-between;gap:25px;align-items:center}.project h2{margin:12px 0 4px}.muted{color:#728277;font-size:12px}.split{display:grid;grid-template-columns:1fr 1.1fr;gap:20px}.tree{padding:6px 0}.node{display:block;width:100%;text-align:left;margin:5px 0;border:1px solid transparent;background:#f6f8f5;font-weight:400}.node.selected{background:#e7f1e9;border-color:#8dac98}.node small{display:block;font-size:10px;color:#698373}.field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;margin-bottom:15px}input,select,textarea{width:100%;border:1px solid #cdd9cf;border-radius:5px;background:#fff;color:#243e32;padding:11px;font:14px 'Segoe UI'}textarea{min-height:70px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.reference{font-size:12px;background:#f1f5ef;padding:14px;border-left:3px solid #91ab92;margin:15px 0;white-space:pre-wrap}.load{border-top:1px solid #e2e8e1;padding:17px 0;display:flex;justify-content:space-between;gap:15px}.load p{font-size:12px;margin:5px 0}.load button{padding:6px 10px}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:12px;border-bottom:1px solid #e1e7e1}th{color:#6e8075;font-size:11px}footer{padding:18px 42px;font-size:11px;color:#7b8c7f}dialog{border:0;border-radius:12px;padding:28px;width:min(580px,94vw);max-height:90vh;box-shadow:0 20px 100px #1234}dialog::backdrop{background:#102c2bb0}#toast{position:fixed;bottom:20px;right:20px;background:#153f35;color:white;padding:0;border-radius:7px;max-width:90vw;z-index:5}#toast:not(:empty){padding:15px 22px}.pending{font-size:20px!important;color:#927743}.report-title{border-bottom:2px solid #234e41;padding-bottom:20px}.mobile-scroll{overflow:auto}#import-file{display:none}@media(max-width:800px){aside{position:static;width:100%;height:auto;padding:16px 20px}.brand{font-size:26px}.brand small{font-size:8px}.workspace,.aside-bottom{display:none}nav{display:flex;overflow:auto;gap:4px;margin-top:16px}nav button{white-space:nowrap;padding:10px;width:auto;margin:0;font-size:12px}nav button span{display:none}.shell{margin:0}header{padding:17px 20px;height:auto;gap:10px}.badge{font-size:9px}main{padding:26px 20px}.topline,.project{align-items:flex-start;flex-direction:column}h1{font-size:28px}.stats{gap:9px;grid-template-columns:1fr}.stat{padding:17px}.stat strong{font-size:25px;display:inline-block;margin:0 10px}.split,.grid2{grid-template-columns:1fr}.card{padding:20px}.section-head{align-items:flex-start;flex-direction:column}footer{padding:18px 20px}}@media print{aside,header,footer,.actions,.notice,.no-print,#toast{display:none!important}.shell{margin:0}main{padding:0}.card{break-inside:avoid;border:0;padding:10px 0}.report-title:before{content:'RINISA · RELATÓRIO PRELIMINAR';font-size:14px}body{background:white}h1{font-size:24px}}
aside{top:0}@media(max-width:800px){aside{top:auto}.stat strong{display:block;margin:7px 0}.stat small{display:block}}
.load{align-items:flex-start}dialog{scrollbar-gutter:stable}
.table-scroll{overflow-x:auto}#reference-preview{max-width:100%}
.reference-group{margin:18px 0}.reference-group h4{margin:14px 0 6px}.reference-grid{min-width:1050px;table-layout:auto}.reference-grid caption{text-align:left;font-weight:600;padding:12px 0}.reference-grid td{vertical-align:top;white-space:pre-line;overflow-wrap:anywhere}.grid-editor fieldset{min-width:0;width:100%;border:1px solid #ccd9d1;border-radius:8px;margin:18px 0;padding:16px}.grid-editor legend{font-weight:650;padding:0 8px}.grid-editor .reference-grid{min-width:1400px}.grid-editor .reference-grid td{min-width:150px}.grid-editor label{display:block;font-size:12px;margin-bottom:8px}.grid-editor input,.grid-editor textarea,.grid-editor select{margin-top:5px}.grid-editor .grid-check{display:flex;align-items:center;gap:8px;margin:9px 0}.grid-editor .grid-check input{width:auto;margin:0}.grid-editor output{display:block;margin:8px 0;font-weight:650;color:#244d45}.grid-editor #grid-error:not(:empty){padding:14px;background:#fff0e8;color:#863b20;border-left:3px solid #b2592f;margin:12px 0}.project-reference h2{font-size:17px;margin-top:0}.reference-trace{margin-top:14px}.reference-trace>summary{cursor:pointer}.card,.grid-editor{min-width:0}@media(max-width:650px){.grid-editor fieldset{padding:10px}.project-reference{padding:16px}.reference-grid{font-size:12px}}

header{height:auto;min-height:110px;align-items:center;gap:20px;padding:20px 42px;flex-wrap:wrap}.project-context{flex:1;min-width:180px;max-width:620px}.project-context .field{margin:0}.context-scope{font-size:11px;margin-top:6px}.nav-label{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#9ab7af;margin:16px 10px 5px}aside{overflow-y:auto}.aside-bottom{position:static;margin-top:25px}.workspace{margin:24px 9px 20px}nav button{margin:3px 0;padding:10px} @media(max-width:800px){header{padding:18px 20px}.nav-group{display:flex;gap:4px}.nav-label{display:none}nav{align-items:center}.project-context{max-width:none;width:100%}header>.actions{width:100%}header .field select{max-width:100%}}

.compact-reference{max-width:900px}.compact-reference .compact{font-size:13px}.compact-bands{max-width:650px;font-size:13px}.compact-bands caption{text-align:left;margin:12px 0;font-weight:600}.compact-bands th,.compact-bands td{padding:7px 12px}.compact-notes{margin-top:18px}.compact-notes summary{cursor:pointer;font-weight:600}.compact-notes li{margin:9px 0;color:#61736b;font-size:13px}@media(max-width:650px){.compact-reference{padding:16px}.compact-bands{font-size:12px}.compact-bands th,.compact-bands td{padding:7px}.compact-reference h2{font-size:18px}}
/* Print only the prepared memory. Internal source notes and history stay on screen. */
#print-memory{display:none}
.table-scroll{overflow-x:auto}
@media print{
 body>*{display:none!important}
 body>#print-memory{display:block!important;color:#111;background:white;font:10pt Arial,sans-serif}
 #print-memory table{width:100%;border-collapse:collapse;margin-bottom:18px}
 #print-memory th,#print-memory td{padding:6px;border:1px solid #999;text-align:left}
 #print-memory h1{font-size:18pt}#print-memory h2{font-size:14pt}#print-memory h3{break-after:avoid}
 #print-memory tr{break-inside:avoid}
 @page{size:A4;margin:15mm}
}
@media print{
 #print-memory p{margin:6px 0 10px;color:#333;line-height:1.3}
 #print-memory h3{margin:10px 0 6px}
 #print-memory table{margin-bottom:10px}
}
/* Safari print: constrain the physical page and keep headings with content. */
@media print{
 body>#print-memory{width:180mm;max-width:100%;font-size:9pt}
 #print-memory p{break-inside:avoid;page-break-inside:avoid}
 #print-memory h1,#print-memory h2,#print-memory h3{break-inside:avoid;page-break-inside:avoid;break-after:avoid;page-break-after:avoid}
 #print-memory table{max-width:100%;table-layout:fixed}
 #print-memory td,#print-memory th{overflow-wrap:anywhere}
}
@media print{
 #print-memory table{break-inside:avoid;page-break-inside:avoid}
 #print-memory .distribution-table{font-size:8pt}
 #print-memory .distribution-table td,#print-memory .distribution-table th{padding:3px}
}
@media print{#print-memory h3{break-before:page;page-break-before:always}}
@media print{#print-memory thead{display:table-row-group}#print-memory table{break-inside:auto;page-break-inside:auto}}
