.archive-sheet{background:#fafbf8;border:1px solid #d7dfd4;border-radius:10px;padding:22px clamp(14px,3vw,46px)}
.archive-tools,.folderbar,.folderbar #folderList,.rowoptions,.strip{display:flex;align-items:center;gap:8px}
.archive-tools{gap:14px;margin-bottom:15px}.archive-tools label{display:grid;gap:3px;font-size:13px;font-weight:600}.archive-tools label:first-child{width:min(440px,65%)}
.folderbar{justify-content:space-between;flex-wrap:wrap;border-block:1px solid #e2e7df;padding:10px 0;margin-bottom:16px}.folderbar #folderList{flex-wrap:wrap}
.folderbar button,.strip button{background:white;border:1px solid #ccd8cd;color:#244434;font-weight:600;white-space:nowrap;border-radius:6px}
.folderbar #folderList button{width:auto;margin:0;padding:7px 12px}.folderbar #folderList [aria-pressed=true]{background:#254d36;color:white}
.editor-head,.editor-row{display:grid;grid-template-columns:minmax(0,1.56fr) minmax(0,.97fr) minmax(0,.97fr) minmax(0,2fr);column-gap:16px;align-items:stretch;padding:14px 20px}
.editor-head{align-items:center;color:#536b5c;background:#e2eae0;text-transform:uppercase;font-size:12px;font-weight:650;letter-spacing:.055em;min-height:56px}
.editor-row{position:relative;isolation:isolate;background:white;border:1px solid #b5c6b7;border-left:4px solid #507158;border-radius:10px;margin-top:9px;padding-left:17px;row-gap:5px;color:#284737;min-height:150px}
.editor-row:has(.rowlink:focus-visible){outline:3px solid #c47517;outline-offset:0;background:#f1f6ef}
@media(hover:hover){.editor-row:has(.rowlink:hover){outline:2px solid #c47517;outline-offset:-2px;background:#f1f6ef}}
.identity{align-self:start;display:grid;justify-items:start;gap:5px;font-size:14px}.identity h3{margin:0 0 3px;font-size:20px;line-height:1.25}.rowlink{color:inherit;text-decoration:none}.rowlink::after{content:"";position:absolute;inset:0;border-radius:10px;z-index:1}.identity h3 span{font-size:18px}.planpill{border-radius:5px;padding:3px 7px;background:#e6f1e2}
.datecell{background:#f3f6ef;border-radius:9px;padding:12px;display:flex;flex-direction:column;justify-content:center;gap:7px;font-size:13px;color:#536658}.datecell time{font-size:15px;font-weight:650;color:#345342}.datecell.due{border-left:4px solid #789d7f}.issues{color:#a33527;font-size:14px}
.strips{align-self:center;display:grid;gap:4px}.strip{min-width:0;padding:4px 7px;justify-content:space-between;border-radius:7px;font-size:14px}.annual{background:#e8f1e3}.survey{background:#e7f0fa;color:#2c597c}.strip button{position:relative;z-index:2;min-height:30px;font-size:13px;padding:3px 12px}
.rowoptions{grid-column:1/-1;justify-content:flex-end;gap:10px}.rowoptions button{position:relative;z-index:2}.rowoptions .keygroup{min-height:30px;padding:4px 7px}.rowoptions .more{background:none;border:0;text-decoration:underline;font-size:13px;min-height:30px;padding:2px}.mobilelabel{display:none}
@media(max-width:780px){.archive-sheet{padding:12px}.editor-head{display:none}.editor-row{grid-template-columns:1fr 1fr;padding:13px;gap:10px}.identity,.strips{grid-column:1/-1}.mobilelabel{display:block;font-size:12px;font-weight:600;color:#43564a}.editor-row .datecell{padding:9px}.archive-tools label{min-width:0}.strip button{min-height:36px}}

.sort-field{display:grid;gap:3px;min-width:155px;color:#244334;font-size:13px;font-weight:600}
#sort-picker{position:relative}#sort-picker summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border:1px solid #b9cabc;border-radius:8px;background:#f7faf5;color:#244b37;font-size:14px;font-weight:650}
#sort-picker summary::-webkit-details-marker{display:none}#sort-picker summary i{margin-left:auto;width:7px;height:7px;border-right:1.6px solid;border-bottom:1.6px solid;transform:rotate(45deg)}#sort-picker[open] summary i{transform:rotate(225deg)}#sort-picker summary:hover,#sort-picker[open] summary{background:#e8f1e7;border-color:#7c9a82}
.sort-options{position:absolute;inset:calc(100% + 4px) 0 auto;z-index:5;border:1px solid #c4d4c6;border-radius:9px;box-shadow:0 6px 18px #173c241c;background:white;margin:0;padding:4px}
.archive-tools .sort-options label{width:100%;display:flex;gap:8px;align-items:center;padding:8px;cursor:pointer;border-radius:5px;font-size:14px}.sort-options input{accent-color:#245039;width:15px;min-height:0;height:15px}.sort-options label:has(:checked){background:#eaf2e7}
.agreement{display:flex;gap:16px;align-items:center;border-top:1px solid #d9e2d8;padding:16px 0}.agreement:first-of-type{margin-top:12px}.agreement>div{flex:1}.agreement h3,.paper h3{margin:3px 0;font-size:19px}.agreement p,.agreement small,.paper small{margin:0;font-size:14px;color:#526458}.agreement-status{font-size:13px;border-radius:6px;padding:4px 9px;background:#f0f1ec;color:#526055}.agreement-status.active{color:#2c563b;background:#e2eedd}.paper dl{display:grid;grid-template-columns:auto 1fr;gap:6px 15px;background:#f3f6f0;padding:14px;border-radius:6px;font-size:14px}.paper dd{margin:0;font-weight:600}.paper h4{margin:18px 0 3px}.paper p{line-height:1.5}
@media(max-width:560px){.archive-tools{flex-wrap:wrap}.archive-tools label:first-child{width:100%}.agreement{flex-wrap:wrap;gap:8px}.agreement>div{flex-basis:100%}.paper dl{grid-template-columns:1fr;gap:3px}.paper dt:not(:first-child){margin-top:5px}}

.editor-row.ended{border-left-color:#b54842;cursor:default}
.ended-status{display:inline-block;border-radius:5px;padding:3px 7px;background:#f8e8e5;color:#923b34}

#reports{container-type:inline-size;display:grid;gap:10px}
.protocol-entry{--type:#2a6242;--wash:#e5f1e6;display:grid;grid-template-columns:minmax(145px,1.25fr) minmax(135px,.9fr) minmax(185px,1.12fr) auto;align-items:center;gap:16px;padding:16px 18px;border:1px solid #d6dfd7;border-inline-start:4px solid var(--type);border-radius:10px;background:#fff}
.protocol-inspection{--type:#305f87;--wash:#e6f0fb}
.protocol-kind{display:inline-block;padding:4px 9px;background:var(--wash);color:var(--type);font-size:.9rem;font-weight:700;line-height:1.3;border-radius:5px}
.protocol-ident h3{font-size:1.1rem;margin:7px 0 0;letter-spacing:-.015em}.protocol-ident small,.protocol-date>span{color:#54665c;font-size:.875rem}
.protocol-date{display:grid;gap:3px}.protocol-date time{font-size:1rem;font-weight:650}
.protocol-state{justify-self:start;display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:6px;font-size:.9rem;line-height:1.35;font-weight:600}
.protocol-state.unresolved{color:#933922;background:#fff0e8}.protocol-state.clear{color:#376447;background:#f0f5ef}
.protocol-state i{display:inline-grid;place-items:center;border:1.4px solid currentColor;border-radius:50%;width:16px;height:16px;flex:none;font:700 11px/1 sans-serif}
.protocol-entry .button{justify-self:end;white-space:nowrap}
@container(max-width:810px){.protocol-entry{grid-template-columns:1fr 1fr;gap:10px 14px}.protocol-entry .button{justify-self:start}}
@container(max-width:470px){.protocol-entry{grid-template-columns:1fr;gap:10px;padding:14px}.protocol-date{display:flex;gap:8px;align-items:baseline}}

#roomPanel {display:block} #folderList {display:flex;margin:0;gap:6px} #folderList button::before{display:none}
#roomDialog {max-width:min(680px,94vw);max-height:85vh} #roomDialogBody {display:grid;gap:12px;margin-top:16px}
#roomDialogBody .protocol-entry{grid-template-columns:1fr auto;gap:10px} #roomDialogBody .folder-picker{justify-self:start}
.archive-tools input[type=search]{width:100%}.editor-row div{min-width:0;overflow-wrap:anywhere}
.agreement-panel{margin-top:16px} .agreement-panel details{border-top:1px solid #d9e2d8;padding:16px 0}.agreement-panel summary{cursor:pointer;font-weight:650}.agreement-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;margin-top:12px}
.archive-tools .sort-options label:first-child{width:100%} .archive-tools .sort-options label{flex-direction:row} 
@media(max-width:520px){#roomDialogBody .protocol-entry{grid-template-columns:1fr}.folderbar #folderList{max-width:100%}}

.contract-paper{max-width:min(720px,94vw);max-height:86vh}.contract-paper>p{margin-top:12px;color:#55675c}.contract-paper pre{padding-top:12px;border-top:1px solid #d9e2d8;font-size:.95rem;line-height:1.55}
