/* Direct toolbox briefing, scoped to this form only. */
#dialog[open]:has(.toolbox-simple-form){box-sizing:border-box;width:min(900px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:20px;overflow:auto}
.toolbox-simple-form{min-width:0}.toolbox-simple-form .bf-content{min-width:0;max-height:calc(100dvh - 320px);overflow:auto;overscroll-behavior:contain;padding:0 12px 8px 0}
.toolbox-simple-form .bf-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.toolbox-simple-form .bf-assignment{margin-top:16px;padding-top:10px;border-top:1px solid var(--line,#cbd5e1)}
.toolbox-simple-form .bf-people{max-height:240px;overflow:auto;border:1px solid var(--line,#cbd5e1);border-radius:8px;padding:10px}.toolbox-simple-form .bf-people legend{font-weight:600;font-size:.9rem}
.toolbox-simple-form .bf-person{margin:0;padding:9px 4px;display:flex;align-items:flex-start;gap:10px;border-bottom:1px solid var(--line,#cbd5e1)}.toolbox-simple-form .bf-person:last-child{border:0}.toolbox-simple-form .bf-person input{width:20px;height:20px;flex:none;margin-top:3px}.toolbox-simple-form .bf-person span{min-width:0;overflow-wrap:anywhere}.toolbox-simple-form .bf-person small{display:block;margin-top:3px}.toolbox-simple-form [hidden]{display:none!important}
.toolbox-simple-form details{border:1px solid var(--line,#cbd5e1);border-radius:8px;margin:14px 0;padding:12px;background:var(--surface,#fff)}.toolbox-simple-form summary{cursor:pointer;font-weight:650;min-height:24px}.toolbox-simple-form summary span{font-size:.85rem;font-weight:400;margin-left:6px}.toolbox-simple-form details[open]>summary{margin-bottom:14px}.toolbox-simple-form .bf-boundary{border-top:1px solid var(--line,#cbd5e1);padding-top:12px}.toolbox-simple-form .bf-badge{font-size:.72rem;border:1px solid var(--line,#cbd5e1);border-radius:4px;padding:3px 5px;margin-left:6px}.toolbox-simple-form .bf-retained{font-weight:600}.toolbox-simple-form p,.toolbox-simple-form label{overflow-wrap:anywhere}.toolbox-simple-form input,.toolbox-simple-form select,.toolbox-simple-form textarea{box-sizing:border-box;max-width:100%;min-width:0}
.toolbox-simple-form .actions{padding-top:10px;border-top:1px solid var(--line,#cbd5e1)}.toolbox-simple-form #fw-local-state{margin:8px 0}.toolbox-simple-form .bf-content>section:first-of-type>label>textarea{min-height:110px}
@media(max-width:600px){#dialog[open]:has(.toolbox-simple-form){padding:12px}.toolbox-simple-form .bf-grid{grid-template-columns:1fr;gap:0}.toolbox-simple-form .bf-content{max-height:calc(100dvh - 335px);padding-right:6px}.toolbox-simple-form .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.toolbox-simple-form #fw-save{grid-column:1/-1;grid-row:1}.toolbox-simple-form .actions .btn{white-space:normal;min-width:0;font-size:.87rem}.toolbox-simple-form .bf-people{max-height:210px}}
@media(max-height:620px){.toolbox-simple-form .bf-content{max-height:none}#dialog[open]:has(.toolbox-simple-form){overflow:auto}}
/* Size the scrolling content around the actual fixed actions, not a guessed height. */
#dialog[open]:has(.toolbox-simple-form){padding:0;max-height:94dvh}
#dialog .toolbox-simple-form{display:flex;flex-direction:column;gap:0;overflow:hidden;max-height:calc(92dvh - 142px)}
.toolbox-simple-form .bf-content{min-height:0;max-height:none;overflow-y:auto;scrollbar-gutter:stable}
.toolbox-simple-form>.actions,.toolbox-simple-form>#fw-error,.toolbox-simple-form>#fw-local-state{flex-shrink:0}
.toolbox-simple-form>#fw-local-state{font-size:12px;line-height:1.4;margin:7px 0 2px}
.toolbox-simple-form>#fw-error:empty{display:none}
@media(max-width:640px){#dialog[open]:has(.toolbox-simple-form){max-height:97dvh;width:calc(100vw - 12px);max-width:calc(100vw - 12px)}#dialog:has(.toolbox-simple-form) .modal{padding:12px}#dialog:has(.toolbox-simple-form) .modal-head{padding:8px 0;margin-bottom:5px}#dialog:has(.toolbox-simple-form) .modal-head h2{font-size:20px}#dialog .toolbox-simple-form{max-height:calc(96dvh - 155px)}}
@media(max-height:500px){#dialog .toolbox-simple-form{max-height:none;overflow:visible}}

.toolbox-simple-form h3{margin:14px 0 10px}.toolbox-simple-form h3 small{display:block;font-weight:400;font-size:.8rem}
.toolbox-simple-form .bf-tick{display:flex;align-items:flex-start;gap:10px;padding:10px 4px;margin:0;border-bottom:1px solid var(--line,#cbd5e1)}
.toolbox-simple-form .bf-tick input{width:20px;height:20px;flex:none;margin-top:3px}.toolbox-simple-form .bf-tick span{min-width:0;overflow-wrap:anywhere}.toolbox-simple-form .bf-tick small{display:block;margin-top:3px}
.toolbox-simple-form .bf-topics{border:1px solid var(--line,#cbd5e1);border-radius:8px;padding:4px 10px}.toolbox-simple-form .bf-tick:last-child{border:0}
.toolbox-simple-form .bf-tools,.toolbox-simple-form .bf-bulk[open]{display:flex;flex-wrap:wrap;gap:8px}.toolbox-simple-form .bf-bulk summary{width:100%}
.toolbox-simple-form .bf-guest{border:1px solid var(--line,#cbd5e1);border-radius:8px;padding:12px;margin:12px 0;min-width:0}
.toolbox-simple-form>#bf-progress{flex-shrink:0;font-size:12px;margin:4px 0;line-height:1.45}.toolbox-simple-form #fw-local-state{font-size:11px}
.bf-template-list [hidden]{display:none!important}.bf-template-list{max-height:55dvh;overflow:auto}.bf-template-list button{text-align:left;white-space:normal;overflow-wrap:anywhere}
.toolbox-simple-form .bf-content{padding-left:1px}.toolbox-simple-form .notice input{background:var(--surface,#fff);color:var(--text,#172b4d)}
