.checklists-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.checklists-heading h3 {font-size:21px;line-height:1.35}
.checklists-heading p,.checklist-editor-heading p {margin:6px 0 0;color:#687c70;font-size:13px}
.checklists-heading .btn {flex-shrink:0}
.checklists-layout {display:grid;grid-template-columns:220px minmax(0,1fr);gap:24px;align-items:start}
.checklist-navigation {display:grid;gap:8px;min-width:0}
.checklist-choice {display:grid;gap:6px;width:100%;padding:14px 15px;text-align:left;color:#41584d;border:1px solid #e2eae5;border-radius:11px;background:#fff;transition:background 160ms,border-color 160ms}
.checklist-choice strong {font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.checklist-choice span {font-size:12px;color:#667c6f}
.checklist-choice:hover {background:#f4f9f6;border-color:#b5d6c9}
.checklist-choice.is-active {background:#eaf6f0;border-color:#9fcebb;box-shadow:inset 3px 0 #008967}
.checklist-choice.is-active strong {color:#007958}
.checklist-choice:focus-visible,.checklist-pencil:focus-visible {outline:2px solid #008967;outline-offset:3px}
.checklist-sheet {min-width:0;border:1px solid #dfe8e2;border-radius:14px;overflow:hidden;background:#fff}
.checklist-sheet-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 14px}
.checklist-sheet-heading h3 {font-size:22px;line-height:1.4;overflow-wrap:anywhere}
.checklist-facts {display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:8px;font-size:12px;color:#667c6f}
.checklist-facts .person {font-size:12px}
.checklist-pencil {flex:0 0 40px;width:40px;height:40px;background:#f1f7f3;color:#008967;border:1px solid #deebe3;border-radius:10px}
.checklist-completion {display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;padding:0 22px 18px;font-size:12px;color:#3a5a49}
.checklist-save-state {color:#73857b}
.checklist-progress {width:100%;height:5px;overflow:hidden;border-radius:5px;background:#e5eee8}
.checklist-progress>span {display:block;height:100%;border-radius:inherit;background:#008967;transition:width 180ms ease}
.checklist-item {display:flex;align-items:flex-start;gap:12px;padding:15px 22px;min-height:54px;border-top:1px solid #e9efeb;cursor:pointer;background:#fff;transition:background 150ms}
.checklist-item:hover {background:#f6faf7}
.checklist-item.is-done {background:#f1f8f4}
.checklist-item-number {flex:0 0 20px;color:#8a9a90;font-size:12px;line-height:23px;font-variant-numeric:tabular-nums;text-align:right}
.checklist-item-label {min-width:0;color:#304c3d;font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.checklist-item.is-done .checklist-item-label {color:#698174}
.checklist-item input[type=checkbox] {appearance:none;display:block;position:relative;flex:0 0 22px;width:22px;height:22px;min-height:22px;margin:1px 0 0;padding:0;border:1.5px solid #acbfb2;border-radius:6px;background:#fff;cursor:pointer;box-shadow:none}
.checklist-item input[type=checkbox]:checked {border-color:#008967;background:#008967 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3.2 3.2L15 6.7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat}
.checklist-item input[type=checkbox]:focus-visible {outline:2px solid #008967;outline-offset:3px}
.checklist-item input[type=checkbox]:disabled {opacity:.6;cursor:progress}
.checklist-error {margin:0 22px 14px;padding:10px 12px;border:1px solid #ebc8c8;border-radius:8px;background:#fff5f4;color:#9b3535;font-size:13px;line-height:1.5}
.checklist-error[hidden] {display:none}
.checklist-empty {padding:24px 22px;border-top:1px solid #e9efeb}
.checklist-empty p {margin-bottom:14px;color:#687c70}
.checklist-sheet-footer {padding:12px 22px;border-top:1px solid #e9efeb;background:#fafcfb}
.checklist-sheet-footer .btn {font-size:12px}
.checklist-editor-body>.form-grid {margin-bottom:24px}
.checklist-editor-heading {margin-bottom:14px}
.checklist-editor-list {display:grid;gap:10px;margin-bottom:14px}
.checklist-editor-row {display:grid;grid-template-columns:24px minmax(0,1fr) 110px;gap:10px;align-items:start;padding:12px;background:#f7faf8;border:1px solid #e3ebe5;border-radius:10px}
.checklist-editor-number {padding-top:12px;text-align:center;font-size:12px;color:#718578;font-variant-numeric:tabular-nums}
.checklist-editor-field {min-width:0}
.checklist-editor-field textarea {display:block;width:100%;min-height:70px;resize:vertical;line-height:1.5}
.checklist-editor-field small {display:block;margin-top:6px;color:#007958;font-size:11px}
.checklist-editor-actions {display:flex;gap:2px;padding-top:4px}
.checklist-editor-actions .icon-btn {flex:0 0 34px;width:34px;height:34px;font-size:19px;background:#fff}
.checklist-editor-actions .icon-btn:disabled {opacity:.25;cursor:default}
.checklist-editor-field>.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}
@media(max-width:900px){.checklists-layout{grid-template-columns:180px minmax(0,1fr);gap:16px}}
@media(max-width:600px){
 .modal-tabs[aria-label="Разделы договора"] {display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:2px;padding:0 10px;scrollbar-width:thin;overscroll-behavior-x:contain}
 .modal-tabs[aria-label="Разделы договора"]>button {flex:0 0 auto;padding:13px 12px;font-size:12px;white-space:nowrap}
 .checklists-heading {align-items:flex-start;flex-direction:column;gap:12px;margin-bottom:16px}
 .checklists-heading h3 {font-size:19px}
 .checklists-layout {display:block}
 .checklist-navigation {display:flex;gap:8px;overflow-x:auto;padding:2px 2px 12px;margin-bottom:8px;scroll-snap-type:x proximity}
 .checklist-choice {flex:0 0 155px;padding:11px 12px;scroll-snap-align:start}
 .checklist-choice strong {font-size:13px}
 .checklist-sheet-heading {padding:16px 14px 12px;gap:10px}
 .checklist-sheet-heading h3 {font-size:19px}
 .checklist-completion {padding:0 14px 14px;gap:7px}
 .checklist-save-state {width:100%;font-size:11px}
 .checklist-item {padding:14px;gap:9px}
 .checklist-item-number {flex-basis:15px}
 .checklist-item-label {font-size:13px;line-height:1.6}
 .checklist-sheet-footer,.checklist-empty {padding:12px 14px}
 .checklist-error {margin:0 14px 12px}
 .checklist-editor-row {grid-template-columns:20px minmax(0,1fr);gap:8px;padding:10px}
 .checklist-editor-actions {grid-column:2;justify-content:flex-end;padding-top:0}
}
@media(prefers-reduced-motion:reduce){.checklist-choice,.checklist-item,.checklist-progress>span{transition:none}}

/* Confirmation is a separate compact dialog; the contract beneath it stays still. */
#checklist-confirmation {
 position:fixed;inset:0;box-sizing:border-box;width:min(400px,calc(100vw - 32px));max-width:400px;
 height:fit-content;min-height:0;max-height:calc(100dvh - 32px);margin:auto;padding:0;
 overflow:auto;overscroll-behavior:contain;scrollbar-gutter:auto;border:1px solid #e1eae5;border-radius:22px;
 background:#fff;color:#253e31;box-shadow:0 20px 70px #10271b2b,0 3px 12px #10271b0b;
 animation:none;transition:none;filter:none;opacity:1;transform:none;
}
#checklist-confirmation[open] {display:block}
#checklist-confirmation:not([open]) {display:none}
#checklist-confirmation::backdrop {background:#17362826;backdrop-filter:none;animation:none}
#checklist-confirmation .checklist-confirmation-content {position:relative;padding:28px 28px 24px}
#checklist-confirmation .checklist-confirmation-symbol {display:grid;place-items:center;width:44px;height:44px;margin-bottom:18px;border-radius:14px;background:#e8f6ee;color:#008967}
#checklist-confirmation .checklist-confirmation-symbol svg {width:24px;height:24px}
#checklist-confirmation .checklist-confirmation-close {position:absolute;top:18px;right:18px;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #e6ede8;border-radius:12px;background:#f4f7f5;color:#738479}
#checklist-confirmation .checklist-confirmation-close svg {width:18px;height:18px}
#checklist-confirmation h2 {margin:0;font-size:21px;font-weight:600;line-height:1.3;letter-spacing:-.3px}
#checklist-confirmation #checklist-confirmation-item {margin:12px 0 0;color:#687c70;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
#checklist-confirmation .checklist-confirmation-actions {display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 28px 26px}
#checklist-confirmation .checklist-confirmation-actions button {min-height:46px;padding:11px 18px;border:1px solid #e0e9e3;border-radius:13px;font:inherit;font-size:14px;font-weight:600;line-height:1.4}
#checklist-confirmation .checklist-confirmation-no {background:#f4f7f5;color:#53695c}
#checklist-confirmation .checklist-confirmation-actions .checklist-confirmation-yes {background:#008967;border-color:#008967;color:#fff;box-shadow:0 3px 9px #00896718}
#checklist-confirmation button {cursor:pointer;transition:background-color 150ms ease,border-color 150ms ease,transform 180ms cubic-bezier(.2,.8,.2,1),box-shadow 180ms ease}
#checklist-confirmation button:active {transform:scale(.96)}
#checklist-confirmation button:focus-visible {outline:2px solid #008967;outline-offset:3px}
@media(hover:hover){
 #checklist-confirmation .checklist-confirmation-no:hover {background:#eaf1ec;border-color:#cdded2}
 #checklist-confirmation .checklist-confirmation-yes:hover {background:#007859;box-shadow:0 5px 12px #00896726}
 #checklist-confirmation .checklist-confirmation-close:hover {background:#edf3ef;color:#008967;transform:rotate(4deg)}
}
@media(prefers-reduced-motion:no-preference){
 #checklist-confirmation[open]::backdrop {animation:checklist-confirmation-backdrop-in 190ms ease-out both}
 #checklist-confirmation[open][data-closing]::backdrop {animation:checklist-confirmation-backdrop-out 130ms ease-in both}
}
@keyframes checklist-confirmation-backdrop-in {from{opacity:0}to{opacity:1}}
@keyframes checklist-confirmation-backdrop-out {from{opacity:1}to{opacity:0}}
@media(prefers-reduced-motion:reduce){
 #checklist-confirmation button,#checklist-confirmation button:is(:hover,:active) {transition:none;transform:none}
}
@media(max-width:380px){
 #checklist-confirmation .checklist-confirmation-content {padding:24px 22px 20px}
 #checklist-confirmation .checklist-confirmation-actions {padding:0 22px 22px}
 #checklist-confirmation h2 {font-size:20px}
}
