.template-workspace{container-type:inline-size;background:white;border:1px solid #e0e7f0;border-radius:18px;padding:20px;box-shadow:0 4px 18px #1e365807}.tw-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.tw-heading>div{display:flex;align-items:center;gap:12px}.tw-heading h2{margin:0 0 4px;font-size:23px;color:#314963}.tw-heading p{margin:0;color:#8998ac;font-size:14px}.tw-icon{width:44px;height:44px;display:grid;place-items:center;background:#fff4e5;color:#e79b36;border-radius:13px}.tw-icon svg{width:24px;height:24px}.tw-groups{display:flex;align-items:center;gap:2px;overflow:visible;border:1px solid #e5eaf2;border-radius:11px;padding:5px;margin-bottom:20px}.tw-groups button{display:flex;flex:1 1 auto;min-width:0;justify-content:center;align-items:center;gap:clamp(3px,.45cqi,7px);white-space:nowrap;border:0;background:none;color:#6d7c90;padding:10px clamp(4px,.6cqi,10px);border-radius:8px;font-size:clamp(10px,1.12cqi,14px);font-weight:600;cursor:pointer}.tw-groups button i{flex-shrink:0;height:6px;width:6px;background:var(--tw-color);border-radius:50%}.tw-groups button b{flex-shrink:0;font-size:.8em;color:#8b99ae;padding:2px 5px;background:#f1f4f9;border-radius:4px}.tw-groups .active{color:white;background:#3268eb}.tw-groups .active b{color:white;background:#ffffff29}.tw-list-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.tw-list-heading>div{display:flex;align-items:center;gap:9px}.tw-list-heading h3{margin:0;font-size:18px;color:#496079}.tw-list-heading .search{width:min(330px,45%);background:#fff;min-height:38px}.tw-folder{display:grid;place-items:center;width:32px;height:32px;background:#fff8ee;border-radius:9px}.tw-folder svg{width:19px;height:19px}.tw-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tw-card{border:1px solid #e3e9f1;border-radius:12px;background:white;overflow:hidden;transition:border-color .15s,box-shadow .15s}.tw-card:hover{border-color:#b8c9e8;box-shadow:0 4px 12px #223e6a07}.tw-card-open{display:flex;align-items:flex-start;gap:11px;text-align:left;padding:17px;width:100%;border:0;background:none;cursor:pointer;min-height:105px;color:#40566f}.tw-card-open>span{display:grid;place-items:center;border-radius:10px;background:#fff7ec;color:var(--tw-color);width:35px;height:35px;flex-shrink:0}.tw-card-open svg{width:19px;height:19px}.tw-card-open>svg{flex-shrink:0;color:#acb8c8;width:15px;height:15px;margin-left:auto;margin-top:9px}.tw-card-open>div{min-width:0}.tw-card h4{font-size:16px;line-height:1.4;margin:0 0 6px}.tw-card p{font-size:12px;line-height:1.4;margin:0;color:#8a99ae}.tw-card small{display:block;color:#a2afbf;font-size:11px;margin-top:6px}.tw-card-actions{border-top:1px solid #f0f3f8;display:flex;align-items:center;justify-content:space-between;padding:9px 16px;min-height:39px}.tw-card-actions .text-btn{font-size:13px;color:#4776ce;display:flex;gap:5px;align-items:center}.tw-card-actions svg{width:15px;height:15px}.tw-empty{grid-column:1/-1;text-align:center;padding:42px 20px;background:#fcfdff;border:1px dashed #dce5f2;border-radius:12px;color:#8c9bb0}.tw-empty>svg{display:block;margin:0 auto 12px;color:#b5c4da;width:30px;height:30px}.tw-empty b{display:block;color:#6f829b;font-size:17px}.tw-empty p{max-width:480px;margin:10px auto 16px;font-size:14px;line-height:1.6}.tw-generated{margin-top:24px;padding-top:20px;border-top:1px solid #e9edf4}.tw-generated-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #edf1f7;padding:11px 4px}.tw-document-name{display:flex;align-items:center;gap:10px;background:none;border:0;text-align:left;color:#425973;cursor:pointer}.tw-document-name>svg{color:#96a8c2;width:21px;height:21px}.tw-document-name b{font-size:14px;font-weight:600}.tw-document-name small{display:block;color:#98a7bb;font-size:12px;margin-top:4px}.tw-court-button{padding:7px 12px;min-height:34px;white-space:nowrap;color:#3969d3;border-color:#cbd9f4;font-size:13px}.tw-empty-inline,.tw-notice{font-size:13px;color:#93a1b5;line-height:1.7}.tw-notice.error{color:#b3604b}.tw-editor{display:grid;grid-template-columns:1fr 1fr;gap:14px}.tw-editor label{color:#7a8b9f;font-size:14px}.tw-editor label:first-child,.tw-text-editor,.tw-docx-editor,.tw-help,.tw-editor .check{grid-column:1/-1}.tw-editor .field{display:block;width:100%;margin-top:7px}.tw-editor textarea{font-family:inherit;line-height:1.6;resize:vertical}.tw-editor [hidden]{display:none!important}.tw-help{font-size:12px;color:#8495ac;line-height:1.6;margin:0}.dc-court-button{background:#edf3ff;color:#3c6fdf;border:1px solid #dbe6fc;border-radius:6px;cursor:pointer;font-size:12px;font-weight:600;padding:5px 8px}.dc-table th:nth-child(6){width:174px}@media(max-width:1250px){.tw-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.template-workspace{padding:14px}.tw-heading{align-items:flex-start}.tw-heading h2{font-size:19px}.tw-heading p{font-size:12px}.tw-heading .btn{padding:9px;font-size:12px}.tw-icon{display:none}.tw-cards{grid-template-columns:1fr}.tw-groups{flex-wrap:wrap}.tw-groups button{flex:1 1 auto;font-size:12px;padding:9px 6px}.tw-editor{grid-template-columns:1fr}.tw-list-heading{flex-wrap:wrap}.tw-list-heading .search{width:100%}.tw-card-open{min-height:90px}}

/* Compact template rows: one title, subject and action without duplicate captions. */
.template-workspace .tw-cards{display:flex;flex-direction:column;gap:0;border:1px solid #e3e9f1;border-radius:12px;overflow:hidden}
.template-workspace .tw-card{display:grid;grid-template-columns:minmax(0,1fr) 92px 196px;align-items:center;gap:16px;border:0;border-bottom:1px solid #edf1f6;border-radius:0;transition:background .15s}
.template-workspace .tw-card:last-child{border-bottom:0}
.template-workspace .tw-card:hover{background:#f8faff;box-shadow:none}
.template-workspace .tw-card-open{align-items:center;min-height:58px;padding:10px 16px;gap:12px}
.template-workspace .tw-card-open>span{width:30px;height:30px;border-radius:8px;background:#f0f8f4}
.template-workspace .tw-card-open>span svg{width:18px;height:18px}
.template-workspace .tw-card h4{font-size:15px;font-weight:600;line-height:1.4;margin:0;overflow-wrap:anywhere}
.template-workspace .tw-card p{margin:3px 0 0;font-size:12px}
.template-workspace .tw-card-actions{border:0;padding:8px 14px 8px 0;min-height:0;gap:8px;justify-content:flex-end}
.template-workspace .tw-card-actions .text-btn{font-size:13px;white-space:nowrap;min-height:34px;padding:6px 10px;border:1px solid #dce7fc;border-radius:7px;background:#f5f8ff;color:#3267ce}
.tw-card-actions .text-btn:hover{background:#eaf1ff}
.tw-template-badge{justify-self:start;font-size:12px;line-height:1.4;padding:4px 9px;border-radius:6px;color:#537291;background:#f0f4f9;white-space:nowrap}
.tw-template-badge.spouse{color:#986387;background:#fbf1f8}
.template-workspace .tw-empty{border:0;border-radius:0}
@media(max-width:650px){.template-workspace .tw-card{grid-template-columns:minmax(0,1fr) auto;gap:0 8px;padding:10px 12px}.template-workspace .tw-card-open{min-height:40px;padding:0;grid-column:1;grid-row:1}.template-workspace .tw-card h4{font-size:14px}.template-workspace .tw-card-open>span{display:none}.tw-template-badge{grid-column:1;grid-row:2;margin-top:5px}.template-workspace .tw-card-actions{grid-column:2;grid-row:1 / 3;padding:0}.template-workspace .tw-card-actions .text-btn{font-size:12px;padding:6px 8px}}
