/* Keep the ledger in view; batch tools expand only when needed. */
#cr-root .cr-tool-section[hidden],#cr-root .cr-maintenance[hidden]{display:none}
#cr-root .cr-tool-section{margin:10px 0}
#cr-root .cr-tools-fold{padding:0;margin:8px 0;border:1px solid var(--pv-card-border,var(--cf-border));border-radius:var(--pv-input-radius);background:var(--pv-card-surface,var(--cf-bg));min-width:0}
#cr-root .cr-tools-fold>summary{padding:10px 12px;color:var(--pv-text-primary);font-size:var(--pv-text-sm);line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
#cr-root .cr-tools-fold>summary:focus-visible,#cr-root .cr-summary-help>summary:focus-visible{outline:2px solid var(--pv-accent-cyan);outline-offset:2px;border-radius:var(--pv-input-radius)}
#cr-root .cr-tools-fold>summary h3,#cr-root .cr-tools-fold>summary h4{display:inline;font-size:var(--pv-text-sm);font-weight:600;margin:0}
#cr-root .cr-tool-count,#cr-root .cr-tool-hint{margin-left:12px;color:var(--pv-text-muted);font-size:var(--pv-text-xs);font-weight:400}
#cr-root .cr-tool-count:empty{display:none}
#cr-root .cr-tool-body{padding:12px;border-top:1px solid var(--pv-card-border,var(--cf-border));display:grid;gap:10px}
#cr-root .cr-tool-body>p{margin:0}
#cr-root .cr-tool-body>.cf-table-wrap:empty{display:none}
#cr-root .cr-tool-body>.cf-table-wrap{margin:0}
#cr-root .cr-tool-body>.cf-filters{margin:0;gap:10px}
#cr-root .cr-tool-body>.cf-actions{gap:6px}
#cr-root .cr-tool-body button{font-size:var(--pv-text-xs)}
#cr-root .cr-tool-status{display:block;margin:4px 12px;font-size:var(--pv-text-xs);line-height:1.5;color:var(--pv-text-muted);overflow-wrap:anywhere}
#cr-root .cr-tool-status:empty{display:none}
#cr-root .cr-tool-status[role=alert]{color:var(--pv-amber-text,var(--pv-amber))}
#cr-root .cr-maintenance{margin:6px 0}
#cr-root .cr-maintenance-tools>summary{padding:7px 12px;font-size:var(--pv-text-xs)}
#cr-root .cr-maintenance-tools .cr-tool-body>button{justify-self:start}
#cr-root .cr-accounting-overview{margin:10px 0;padding:12px}
#cr-root .cr-accounting-overview .cf-section-title{margin-bottom:8px;gap:10px}
#cr-root .cr-accounting-overview .cf-section-title h3{font-size:var(--pv-text-sm)}
#cr-root .cr-accounting-overview .cf-section-title button{font-size:var(--pv-text-xs)}
#cr-root .cr-accounting-summary{gap:8px}
#cr-root .cr-accounting-kpi{padding:8px 10px}
#cr-root .cr-accounting-kpi>span{font-size:var(--pv-text-xs)}
#cr-root .cr-accounting-kpi>strong{display:inline-block;font-size:var(--pv-text-lg);margin:3px 8px 0 0}
#cr-root .cr-accounting-kpi>small{display:inline;font-size:var(--pv-text-xs)}
#cr-root .cr-accounting-overview #cr-accounting-message{font-size:var(--pv-text-xs);margin:8px 0 0}
#cr-root .cr-accounting-warnings p{margin:5px 0}
#cr-root .cr-summary-help{border:0;padding:0;margin-top:6px;font-size:var(--pv-text-xs);color:var(--pv-text-muted)}
#cr-root .cr-summary-help p{margin:6px 0;line-height:1.5}
#cr-root #cr-summary{gap:8px;margin:10px 0}
#cr-root #cr-summary .cf-kpi{padding:10px 12px}
#cr-root #cr-summary .cf-kpi strong{font-size:var(--pv-text-xl);margin:4px 0}
#cr-root .cr-sources{gap:4px 16px;margin:8px 0;font-size:var(--pv-text-xs);line-height:1.5}
#cr-root .cr-workspace{margin-top:14px}
#cr-root .cr-operations>.cf-section-title{margin-bottom:8px}
@media(max-width:800px){
    #cr-root .cr-tool-count,#cr-root .cr-tool-hint{display:block;margin-left:16px;margin-top:3px}
    #cr-root .cr-accounting-overview .cf-section-title{align-items:flex-start}
    #cr-root .cr-tool-body>.cf-actions button{flex:1 1 180px}
}
