/* Shared task/checklist hierarchy; preserve the main navigation and form controls. */
.tc-builder{border-block:1px solid var(--line,#d9e1e7);padding-block:16px;margin-block:12px}
.tc-builder h3{margin-top:0}.tc-builder textarea{min-height:160px}
.tc-preview{margin-top:16px;overflow-wrap:anywhere}.tc-preview-list{padding-left:24px;max-height:380px;overflow:auto;border:1px solid var(--line,#d9e1e7);border-radius:8px;padding-top:10px;padding-bottom:10px}
.tc-preview-list li{padding:6px 14px 8px 4px}.tc-preview-list li p{margin:6px 0}
.tc-summary-line{display:flex;flex-wrap:wrap;gap:8px 18px;margin-bottom:12px}
.tc-step-list{display:grid;gap:8px;margin-block:14px}.tc-step{border:1px solid var(--line,#d9e1e7);border-radius:8px;overflow-wrap:anywhere}
.tc-step summary{display:grid;grid-template-columns:auto 1fr auto;gap:10px;padding:14px;cursor:pointer;align-items:start;list-style:disclosure-closed}
.tc-step[open] summary{border-bottom:1px solid var(--line,#d9e1e7)}.tc-step-body{padding:14px}
.tc-result{font-size:.85rem;white-space:normal}.tc-step[data-tc-state="issue"]{border-left:4px solid #ab6632}.tc-step[data-tc-state="na"]{border-left:4px solid #677886}.tc-step[data-tc-state="done"]{border-left:4px solid #218373}
.tc-step:focus-within{outline:2px solid var(--accent,#087f87);outline-offset:2px}
@media(max-width:540px){.tc-step summary{grid-template-columns:auto 1fr;gap:6px}.tc-result{grid-column:2}.tc-preview-list{max-height:290px}.tc-summary-line{gap:6px 12px}}

/* 1.34.6: one selected scratch step, inside task creation. */
.ts-layout{display:grid;grid-template-columns:minmax(170px,0.8fr) minmax(0,1.6fr);gap:18px;align-items:start}
.ts-layout>*{min-width:0}.ts-list select{width:100%;max-width:100%;min-height:150px}
.ts-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.ts-buttons .btn{white-space:normal;text-align:left}
.ts-reading{min-width:0;border:1px solid var(--border,#bccbd2);border-radius:8px;padding:12px;margin:12px 0}
.ts-reading legend{font-weight:600;padding:0 5px}.ts-limits{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ts-detail input,.ts-detail textarea{width:100%;box-sizing:border-box}.ts-detail input[type=checkbox]{width:auto}
.ts-detail h4{margin:10px 0}.ts-detail .small{overflow-wrap:anywhere}
@media(max-width:650px){.ts-layout{grid-template-columns:minmax(0,1fr)}.ts-list select{min-height:115px}.ts-limits{grid-template-columns:minmax(0,1fr)}}

dialog:has(.tc-builder){width:min(960px,calc(100vw - 24px))}
.fw-form .ts-detail textarea{min-height:84px}
.fw-form .ts-detail label.checkline{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px}
.fw-form .ts-detail label.checkline input{width:20px;min-width:20px;min-height:20px;height:20px;margin:0;flex:0 0 20px}
.fw-form .ts-detail label.checkline span{margin:0;text-align:left}

/* Keep the task-creation heading visible while scrolling the inline editor. */
dialog:has(.tc-builder) .modal-head{top:0;margin-top:0;padding-top:14px}
