/* Shared accessible accordion treatment, including dynamically rendered sections. */
details > summary {list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;cursor:pointer;overflow-wrap:anywhere;}
details > summary::-webkit-details-marker {display:none;}
details > summary::marker {content:"";}
details > summary::after,.project-arrow::after {content:"";display:block;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s ease;flex:none;margin:0 5px 4px;}
details[open] > summary::after {transform:rotate(225deg);margin-bottom:0;}
details > summary:focus-visible,.project-toggle:focus-visible {outline:3px solid #bb8d4e;outline-offset:2px;border-radius:6px;}
#projects > article[data-project] {padding:0;overflow:hidden;min-width:0;scroll-margin-top:16px;}
#projects .project-toggle {display:flex;align-items:center;gap:12px;width:100%;min-height:76px;padding:16px 20px;border-radius:0;background:#fff;color:#60192a;text-align:left;}
#projects .project-toggle:hover {background:#f8f1ed;}
#projects .project-toggle[aria-expanded=true] {background:#60192a;color:#fff;}
#projects .project-toggle[aria-expanded=true] small {color:#f5dfbd;}
.project-name {display:grid;gap:4px;flex:1;min-width:0;overflow-wrap:anywhere;}
.project-name strong {font-size:17px;}
.project-alerts {font-size:13px;}
.project-alerts:empty {display:none;}
#projects .project-arrow {display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:50%;background:#bb8d4e22;transform:none;}
#projects .project-toggle[aria-expanded=true] .project-arrow {transform:none;}
.project-toggle[aria-expanded=true] .project-arrow::after {transform:rotate(225deg);margin-bottom:0;}
#projects .project-body {padding:18px 22px;min-width:0;animation:accordion-reveal .18s ease-out;}
#projects .project-body[hidden] {display:none!important;}
.project-list-tools {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;}
.project-list-tools h2 {margin:0 auto 0 0;}
.project-list-tools button {padding:9px 12px;min-height:44px;}
@keyframes accordion-reveal {from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){#projects .project-toggle{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:14px;}.project-name{grid-column:1;grid-row:1;}.project-toggle .tag{grid-column:1;justify-self:start;}.project-toggle .project-arrow{grid-column:2;grid-row:1 / span 2;}.project-toggle .project-alerts{grid-column:1/-1;}#projects .project-body{padding:12px;}.project-list-tools h2{flex-basis:100%;}}
@media(prefers-reduced-motion:reduce){details > summary::after,.project-arrow::after{transition:none;}#projects .project-body{animation:none;}}

/* Owner sidebar totals use the same predicates as the project list. */
body[data-mode="owner"] aside button[data-filter]{display:flex;align-items:center;justify-content:space-between;gap:6px;text-align:left;}
.project-filter-label{min-width:0;overflow-wrap:anywhere;}
.project-count{flex:none;min-width:24px;padding:3px 6px;border-radius:999px;background:#60192a14;color:inherit;font-size:11px;font-weight:700;line-height:1.3;text-align:center;font-variant-numeric:tabular-nums;border:1px solid currentColor;}

.completed-lock-note{padding:.75rem 1rem;background:#f4ece8;border:1px solid #dfcec7;border-radius:10px;color:#60192a;font-size:.9rem;margin:0 0 1rem}.completed-readonly .project-body :is(input[readonly],textarea[readonly],select:disabled,input:disabled){background:#f4f1ef;color:#55434a;cursor:default;opacity:1}.completed-readonly .project-body button:disabled{opacity:.5;cursor:not-allowed}
