.cw-root,.cw-save { color:var(--ink,#26382e); border:1px solid var(--g5,#d8d2c2); border-radius:16px; padding:24px; margin:0 0 24px; background:var(--wht,#f9f6ec); }
.cw-root *, .cw-dialog *, .cw-save * { box-sizing:border-box; }
.cw-root button,.cw-dialog button,.cw-save button { font:inherit; font-size:14px; line-height:1.5; min-height:44px; padding:10px 16px; border:1px solid var(--g5,#d8d2c2); border-radius:9px; background:transparent; color:inherit; cursor:pointer; }
.cw-root button:hover,.cw-dialog button:hover,.cw-save button:hover { background:var(--g6,#eeeade); }
.cw-root button:disabled,.cw-dialog button:disabled,.cw-save button:disabled { opacity:.55; cursor:default; }
.cw-root :focus-visible,.cw-dialog :focus-visible,.cw-save :focus-visible { outline:3px solid var(--gold,#9b7942); outline-offset:3px; }
.cw-heading { display:flex; justify-content:space-between; align-items:start; gap:16px; }
.cw-heading h2,.cw-dialog h2 { margin:4px 0 8px; font-size:28px; line-height:1.35; }
.cw-heading p { margin:6px 0; }
.cw-kicker { font-size:12px; letter-spacing:.06em; color:var(--g2,#6c7167); margin:0; }
.cw-root h3,.cw-dialog h3 { font-size:18px; margin:0 0 14px; }
.cw-filters,.cw-sections,.cw-actions { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.cw-filters button[aria-pressed=true],.cw-dialog .cw-primary,.cw-save .cw-primary { background:var(--bl,#284f3e); color:var(--cream,#fffdf4); border-color:var(--bl,#284f3e); }
.cw-filters { padding-bottom:8px; border-bottom:1px solid var(--g5,#d8d2c2); }
.cw-tasks { list-style:none; margin:0; padding:0; }
.cw-task { display:flex; gap:14px; justify-content:space-between; align-items:center; padding:14px 0; border-bottom:1px solid var(--g5,#d8d2c2); overflow-wrap:anywhere; }
.cw-task div { min-width:0; }
.cw-task small,.cw-customer small,.cw-history small { display:block; font-size:12px; color:var(--g2,#6c7167); margin-top:5px; }
.cw-task-request { margin:7px 0 0; color:var(--ink,#26382e); font-size:13px; line-height:1.55; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.cw-task button { flex-shrink:0; }
.cw-task-priority { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-radius:10px; background:var(--g6,#eeeade); }
.cw-task-priority strong { font-size:14px; }
.cw-task-priority span { color:var(--g2,#6c7167); font-size:12px; text-align:right; }
.cw-more-customer-tasks { margin-top:8px; border-bottom:1px solid var(--g5,#d8d2c2); }
.cw-more-customer-tasks > summary { min-height:44px; padding:12px 0; color:var(--g2,#6c7167); font-size:13px; font-weight:700; cursor:pointer; }
.cw-empty { padding:20px 0; color:var(--g2,#6c7167); }
.cw-customers-heading { margin-top:30px; }
.cw-customers { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; margin-top:12px; }
.cw-customers .cw-customer { min-width:0; padding:16px; border:1px solid var(--g5,#d8d2c2); border-radius:11px; background:var(--wht,#f9f6ec); text-align:left; }
.cw-customers .cw-customer[hidden] { display:none; }
.cw-customer strong { display:block; font-size:17px; }
.cw-customer-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.cw-status { font-size:12px; text-align:right; }
.cw-customer-glance { margin:12px 0 0; color:var(--ink,#26382e); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.cw-customer-answer-preview { margin-top:10px; border-top:1px solid var(--g5,#d8d2c2); border-bottom:1px solid var(--g5,#d8d2c2); }
.cw-customer-answer-preview summary { display:flex; align-items:center; min-height:44px; padding:10px 0; color:var(--g2,#6c7167); font-size:13px; font-weight:700; cursor:pointer; }
.cw-customer-answer-preview .helper-intake-answers { grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:8px; }
.cw-customer-answer-preview .helper-intake-answers > div { padding:10px 8px; }
.cw-customer-answer-preview .helper-intake-answers > div:last-child { grid-column:span 2; }
.cw-customer-actions { display:flex; justify-content:flex-end; margin-top:12px; }
.cw-customer-actions button { min-width:112px; background:var(--bl2,#1b64da); color:var(--cw-action-ink,#fff); border-color:var(--bl2,#1b64da); }
.cw-root label,.cw-dialog label,.cw-save label { display:flex; flex-direction:column; gap:7px; font-size:14px; margin:12px 0; }
.cw-root input,.cw-dialog input,.cw-dialog select,.cw-dialog textarea,.cw-save select { width:100%; min-width:0; min-height:44px; border:1px solid var(--g5,#b8b8a7); border-radius:8px; padding:11px 12px; background:var(--wht,#fffdf6); color:inherit; font:inherit; font-size:16px; }
.cw-dialog textarea { resize:vertical; }
.cw-dialog .cw-check,.cw-save .cw-check { flex-direction:row; align-items:flex-start; line-height:1.6; }
.cw-check input { flex:0 0 20px; width:20px; height:20px; min-height:20px; margin:3px 6px 0 0; }
.cw-intake-answers-wrap { margin-top:24px; }
.cw-intake-answers-wrap h4 { margin:0 0 10px; font-size:16px; }
.helper-intake-answers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; border-top:1px solid var(--g5,#d8d2c2); }
.helper-intake-answers > div { min-width:0; padding:14px 12px; border-bottom:1px solid var(--g5,#d8d2c2); }
.helper-intake-answers dt { display:flex; align-items:center; gap:8px; color:var(--g2,#6c7167); font-size:12px; font-weight:700; }
.helper-intake-answers dt span { color:var(--gold,#9b7942); font-size:10px; letter-spacing:.06em; }
.helper-intake-answers dd { margin:7px 0 0; color:var(--ink,#26382e); font-size:14px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.cw-original-table { margin-top:20px; }
.cw-enabled > .outreach-overview { display:none; }
.cw-original-table summary,.cw-dialog summary { cursor:pointer; min-height:44px; padding:12px 0; font-size:14px; }
.cw-dialog { width:min(850px,calc(100vw - 40px)); max-height:calc(100dvh - 40px); border:1px solid var(--g5,#d8d2c2); border-radius:18px; color:var(--ink,#26382e); background:var(--wht,#f9f6ec); padding:0; overscroll-behavior:contain; }
.cw-dialog::backdrop { background:rgba(20,30,23,.45); }
.cw-loading { min-height:310px; display:flex; flex-direction:column; justify-content:center; padding:28px; }
.cw-loading p { margin:0 0 22px; color:var(--g2,#6c7167); }
.cw-skeleton { display:grid; gap:12px; }
.cw-skeleton span { display:block; height:58px; border-radius:10px; background:linear-gradient(90deg,var(--g6,#eeeade) 20%,var(--wht,#f9f6ec) 50%,var(--g6,#eeeade) 80%); background-size:240% 100%; animation:cw-skeleton 1.25s ease-in-out infinite; }
.cw-skeleton span:nth-child(2) { width:86%; }.cw-skeleton span:nth-child(3) { width:72%; }
.cw-loading-close { margin:0 28px 28px; }
@keyframes cw-skeleton { from { background-position:100% 0; } to { background-position:-100% 0; } }
.cw-dialog-head { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; gap:16px; padding:24px 28px 16px; background:var(--wht,#f9f6ec); border-bottom:1px solid var(--g5,#d8d2c2); }
.cw-dialog-head p { margin:4px 0; }
.cw-detail { padding:0 28px 28px; }
.cw-detail > section { padding:28px 0; border-bottom:1px solid var(--g5,#d8d2c2); scroll-margin-top:145px; }
.cw-sections { position:relative; gap:20px; }
.cw-sections a { color:inherit; min-height:44px; padding:12px 0; text-underline-offset:5px; }
.cw-quote { padding:18px 0 18px 16px; border-left:1px solid var(--gold,#a37d47); line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.cw-help { color:var(--g2,#6c7167); font-size:13px; line-height:1.7; }
.cw-message { color:var(--ink,#26382e); line-height:1.6; white-space:pre-wrap; }
.cw-message:empty { display:none; }
.cw-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; align-items:end; }
.cw-grid button { align-self:center; }
.cw-history { padding-left:20px; }
.cw-history li { padding:10px 0; }
.cw-pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.cw-save { margin:18px 0; }
.cw-save [data-save-status] { font-weight:600; line-height:1.6; }
.cw-conflict { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.cw-conflict pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:240px; overflow:auto; font-size:13px; }
.cw-manage { padding-top:20px; }
@media (max-width:600px) {
 .cw-root,.cw-save { padding:18px 14px; border-radius:10px; }
 .cw-heading h2 { font-size:24px; }
 .cw-heading { align-items:center; }
 .cw-heading > button { flex-shrink:0; }
 .cw-customers,.cw-grid,.cw-conflict,.helper-intake-answers { grid-template-columns:1fr; }
 .cw-customer-head { gap:10px; }
 .cw-customer-answer-preview .helper-intake-answers { grid-template-columns:1fr; }
 .cw-customer-answer-preview .helper-intake-answers > div:last-child { grid-column:auto; }
 .cw-customer-actions button { width:100%; }
 .cw-dialog { width:100vw; max-width:100vw; max-height:100dvh; height:100dvh; margin:0; border:0; border-radius:0; }
 .cw-dialog-head { padding:18px 18px 12px; }
 .cw-dialog-head h2 { font-size:25px; }
 .cw-detail { padding:0 18px calc(24px + env(safe-area-inset-bottom)); }
 .cw-dialog .cw-primary { width:100%; }
 .cw-actions { flex-direction:column; }
 .cw-task { align-items:flex-start; }
 .cw-task button { padding:8px 10px; }
 .cw-filters { gap:6px; }
 .cw-filters button { font-size:13px; padding:8px 10px; }
 .cw-search input { width:100%; }
 .cw-save { scroll-margin-top:80px; }
}
@media (prefers-reduced-motion:no-preference) { .cw-dialog[open] { animation:cw-enter .16s ease-out; } @keyframes cw-enter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } } }

.cw-task { flex-wrap:wrap; }
.cw-task > div { flex:1; }
.cw-task-edit { flex-basis:100%; }
.cw-task-edit summary { color:var(--g2); font-size:12px; }

.cw-root { border:0; border-radius:0; padding:24px 0 0; background:transparent; }
.cw-filters button[aria-pressed=true],.cw-dialog .cw-primary,.cw-save .cw-primary,.cw-filters button[aria-pressed=true]:hover,.cw-dialog .cw-primary:hover,.cw-save .cw-primary:hover { background:var(--bl2,#1b64da); color:#fff; border-color:var(--bl2,#1b64da); }
.cw-root,.cw-dialog,.cw-save,.cw-intake-dialog { --cw-action-ink:#fff; }
html[data-theme="dark"] :is(.cw-root,.cw-dialog,.cw-save,.cw-intake-dialog),html[data-theme="gray"] :is(.cw-root,.cw-dialog,.cw-save,.cw-intake-dialog) { --cw-action-ink:#061628; }
.cw-filters button[aria-pressed=true],.cw-dialog .cw-primary,.cw-save .cw-primary,.cw-filters button[aria-pressed=true]:hover,.cw-dialog .cw-primary:hover,.cw-save .cw-primary:hover { color:var(--cw-action-ink); }
.cw-root input::placeholder,.cw-dialog input::placeholder,.cw-dialog textarea::placeholder { color:var(--g2); opacity:1; }

.cw-intake-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.cw-intake-actions button:first-child { background:var(--bl2,#1b64da); color:var(--cw-action-ink); border-color:var(--bl2,#1b64da); }
.cw-customer-tools { display:grid; grid-template-columns:minmax(0,1fr) 150px auto; gap:10px; align-items:end; }
.cw-customer-tools label { margin:12px 0 4px; }
.cw-customer-tools > button { margin-bottom:4px; white-space:nowrap; }
.cw-customer-tools select { width:100%; min-height:44px; border:1px solid var(--g5,#b8b8a7); border-radius:8px; padding:10px 12px; background:var(--wht,#fffdf6); color:inherit; font:inherit; font-size:16px; }
.cw-customer-sources { display:flex; flex-wrap:wrap; gap:7px; margin:10px 0 4px; }
.cw-customer-sources button[aria-pressed=true] { background:var(--bl2,#1b64da); color:var(--cw-action-ink); border-color:var(--bl2,#1b64da); }
.cw-empty-customers { grid-column:1/-1; border:1px dashed var(--g5,#d8d2c2); padding:22px; border-radius:10px; }
.cw-empty-customers strong { color:var(--ink,#26382e); }
.cw-empty-customers p { margin:8px 0 0; line-height:1.7; }
.cw-intake-dialog { width:min(760px,calc(100vw - 40px)); max-height:calc(100dvh - 40px); padding:0; border:1px solid var(--g5,#d8d2c2); border-radius:18px; color:var(--ink,#26382e); background:var(--wht,#f9f6ec); overscroll-behavior:contain; }
.cw-intake-dialog::backdrop { background:rgba(20,30,23,.45); }
.cw-intake-dialog * { box-sizing:border-box; }
.cw-intake-dialog header { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:22px 26px 15px; background:var(--wht,#f9f6ec); border-bottom:1px solid var(--g5,#d8d2c2); }
.cw-intake-dialog h2 { margin:4px 0 0; font-size:26px; line-height:1.35; }
.cw-intake-dialog button { min-height:44px; padding:10px 16px; border:1px solid var(--g5,#d8d2c2); border-radius:9px; background:transparent; color:inherit; cursor:pointer; font:inherit; font-size:14px; }
.cw-intake-dialog button:disabled { opacity:.55; cursor:default; }
.cw-intake-dialog :focus-visible { outline:3px solid var(--gold,#9b7942); outline-offset:3px; }
.cw-intake-dialog .cw-primary { background:var(--bl2,#1b64da); color:var(--cw-action-ink,#fff); border-color:var(--bl2,#1b64da); }
.cw-intake-body { padding:22px 26px calc(26px + env(safe-area-inset-bottom)); }
.cw-intake-lead { margin:0 0 18px; line-height:1.75; }
.cw-intake-dialog label { display:flex; flex-direction:column; gap:7px; margin:12px 0; font-size:14px; }
.cw-intake-dialog input,.cw-intake-dialog select,.cw-intake-dialog textarea { width:100%; min-width:0; min-height:44px; border:1px solid var(--g5,#b8b8a7); border-radius:8px; padding:11px 12px; background:var(--wht,#fffdf6); color:inherit; font:inherit; font-size:16px; }
.cw-intake-dialog textarea { resize:vertical; }
.cw-intake-dialog .cw-check,.cw-intake-dialog .cw-duplicate { flex-direction:row; align-items:flex-start; line-height:1.6; }
.cw-intake-dialog .cw-check input,.cw-intake-dialog .cw-duplicate input { flex:0 0 20px; width:20px; height:20px; min-height:20px; margin:3px 6px 0 0; }
.cw-intake-submit { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; }
.cw-file { padding:20px; border:1px dashed var(--gold,#9b7942); border-radius:10px; }
.cw-map-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; }
.cw-map-list label span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.cw-import-map h3,.cw-import-review h3 { margin:10px 0; }
.cw-import-counts { display:flex; flex-wrap:wrap; gap:8px; margin:15px 0; }
.cw-import-counts span { padding:8px 11px; border:1px solid var(--g5,#d8d2c2); border-radius:999px; }
.cw-import-table { max-height:360px; overflow:auto; border:1px solid var(--g5,#d8d2c2); border-radius:10px; }
.cw-import-table table { width:100%; border-collapse:collapse; font-size:13px; }
.cw-import-table th,.cw-import-table td { padding:10px; text-align:left; vertical-align:top; border-bottom:1px solid var(--g5,#d8d2c2); }
.cw-import-table th { position:sticky; top:0; background:var(--wht,#f9f6ec); z-index:1; }
.cw-import-table tr.is-error td:last-child { color:#9c2f25; }
.cw-import-table tr.is-review td:last-child { color:var(--gold,#7e5c28); }
@media (max-width:600px) {
 .cw-customers-heading { align-items:flex-start; }
 .cw-customers-heading,.cw-intake-actions { width:100%; }
 .cw-intake-actions button { flex:1; }
 .cw-customer-tools { grid-template-columns:1fr; gap:0; }
 .cw-customer-tools > button { width:100%; margin:8px 0 0; }
 .cw-customer-sources { overflow-x:auto; flex-wrap:nowrap; padding-bottom:4px; }
 .cw-customer-sources button { flex:0 0 auto; }
 .cw-intake-dialog { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border:0; border-radius:0; }
 .cw-intake-dialog header { padding:18px 18px 12px; }
 .cw-intake-dialog h2 { font-size:24px; }
 .cw-intake-body { padding:18px; }
 .cw-map-list { grid-template-columns:1fr; }
 .cw-intake-submit { flex-direction:column-reverse; }
 .cw-intake-submit button { width:100%; }
 .cw-import-table { max-height:45dvh; }
}
@media (prefers-reduced-motion:no-preference) { .cw-intake-dialog[open] { animation:cw-enter .16s ease-out; } }
@media (prefers-reduced-motion:reduce) { .cw-skeleton span { animation:none; } }
/* v12.1: keep list controls and restoration visible on touch screens. */
.cw-root select { width:100%; min-width:0; min-height:44px; border:1px solid var(--g5,#b8b8a7); border-radius:8px; padding:10px 12px; background:var(--wht,#fffdf6); color:inherit; font:inherit; font-size:16px; }
.cw-list-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:8px 16px; margin:12px 0; }
.cw-list-toolbar > label { flex:1 1 160px; min-width:0; margin:0; }
.cw-list-toolbar > button { margin:0; }
.cw-root .cw-check,.cw-intake-dialog .cw-check { display:flex; flex-direction:row; align-items:center; min-height:44px; }
.cw-root .cw-check input,.cw-intake-dialog .cw-check input { width:20px; min-height:20px; height:20px; flex:0 0 20px; padding:0; }
.cw-period { border-bottom:1px solid var(--g5,#d8d2c2); }
.cw-period > summary,.cw-filter-options > summary,.cw-delete-zone > summary { min-height:44px; padding:14px 0; cursor:pointer; font-weight:600; }
.cw-period > summary span { margin-left:8px; font-size:13px; color:var(--g2,#6c7167); }
.cw-period .cw-task:last-child { border-bottom:0; }
.cw-list-hint { margin:12px 0; font-size:13px; color:var(--g2,#6c7167); line-height:1.6; }
.cw-task > div:first-child { flex:1; }
.cw-customer-actions { flex-wrap:wrap; gap:8px; }
.cw-customer-actions .cw-secondary { background:transparent; border-color:var(--g5,#d8d2c2); color:inherit; }
.cw-customer-dates { margin-top:10px; font-variant-numeric:tabular-nums; }
.cw-list-manage { display:grid; gap:8px; }
.cw-list-manage p { font-size:14px; line-height:1.6; color:var(--g2,#6c7167); margin:0 0 18px; }
.cw-delete-zone { margin-top:24px; border-top:1px solid var(--g5,#d8d2c2); }
.cw-delete-zone p { line-height:1.6; }
@media(max-width:600px) {
 .cw-root .cw-heading { flex-wrap:wrap; }
 .cw-root .cw-list-toolbar > label { flex:1 1 100%; }
 .cw-root .cw-task { flex-wrap:wrap; gap:8px; }
 .cw-root .cw-task > div:first-child { flex:1 1 100%; }
 .cw-root .cw-task > button { flex:1; }
 .cw-root .cw-customer-tools { flex-wrap:wrap; }
 .cw-root .cw-customer-tools > label { flex:1 1 100%; }
 .cw-customer-head { flex-wrap:wrap; gap:8px; }
}
@media(prefers-reduced-motion:no-preference) { .cw-root button:active { transform:translateY(1px); } }
@media(min-width:601px) { .cw-intake-dialog { margin:auto; } }
