:root{--ink:#152c3f;--muted:#647583;--blue:#23668b;--blue-dark:#19526f;--pale:#edf5fa;--line:#dfe6eb;--bg:#f5f7f8;--white:#fff;--green:#287256;--amber:#8c6217;--shadow:0 8px 35px #17334808;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);font-size:15px;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,a:focus-visible{outline:3px solid #8db9d6;outline-offset:3px}a{color:var(--blue);text-decoration:none}button{border:1px solid #a9c9da;border-radius:9px;padding:11px 16px;min-height:44px;background:#e1eff7;color:#184e69;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:background .15s}button:hover{background:#cde4f1}button.primary{background:var(--blue);border-color:var(--blue);color:white}button.primary:hover{background:var(--blue-dark)}button.quiet{border-color:transparent;background:transparent;color:var(--muted)}button.danger,button[data-action="discard-continue"],button[data-action="delete-template"],button[data-action="remove-clause"],button[data-action="remove-field"]{color:#8b302d;background:#fbe5e3;border-color:#dcaaa6}
button:is(.danger,[data-action="discard-continue"],[data-action="delete-template"],[data-action="remove-clause"],[data-action="remove-field"]):hover{background:#f3cdca}
button:is([data-action="send-reminder"],[data-action="send-confirmation-reminder"]){color:#175646;background:#d6eee5;border-color:#99cbb9}
button:is([data-action="send-reminder"],[data-action="send-confirmation-reminder"]):hover{background:#c0e2d5}
button:is([data-action="copy-contract"],[data-action="copy-link"]){color:#563779;background:#ece4f7;border-color:#cbb7e1}
button:is([data-action="copy-contract"],[data-action="copy-link"]):hover{background:#dfd1ef}button.small{font-size:13px;padding:7px 10px;min-height:36px}svg{width:19px;height:19px;flex-shrink:0;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}.demo-strip{background:#e9f0f5;color:#4a6578;font-size:12px;letter-spacing:.015em;padding:9px 20px;text-align:center;border-bottom:1px solid #dce6ed;position:relative;z-index:20}.demo-strip b{color:#264a64}.shell{display:grid;grid-template-columns:minmax(244px,max-content) minmax(0,1fr);min-height:calc(100vh - 34px)}.sidebar{background:white;border-right:1px solid var(--line);padding:30px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:calc(100vh - 34px)}.brand{display:flex;gap:7px;align-items:center;padding:0 5px 26px}.brand img{width:53px;height:53px;object-fit:contain}.brand strong{font-size:17px;letter-spacing:-.5px;display:block}.brand span{font-size:11px;text-transform:uppercase;letter-spacing:2px;color:var(--muted)}.nav{display:grid;gap:8px}.nav button{white-space:nowrap;justify-content:flex-start;padding:12px 14px;border:0;background:transparent;font-weight:500;color:var(--muted)}.nav button.active{background:var(--pale);color:var(--blue);font-weight:650}.sidebar-footer{margin-top:auto;border-top:1px solid var(--line);padding:21px 8px 0;display:flex;align-items:center;gap:10px}.avatar{background:#eaf0f4;width:37px;height:37px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:12px;font-weight:700}.sidebar-footer strong{font-size:13px}.sidebar-footer small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.workspace{min-width:0}.topbar{height:76px;padding:0 40px;background:#ffffffa8;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px}.topbar .crumb{display:flex;gap:10px;align-items:center;font-size:13px;color:var(--muted)}.topbar .crumb button{padding:0;min-height:36px;border:0;background:transparent;color:var(--muted);font-size:13px}.save-state{color:var(--green);font-size:12px;display:flex;align-items:center;gap:6px}.save-state svg{width:15px;height:15px}.content{max-width:1320px;margin:auto;padding:36px 40px 70px}.eyebrow{text-transform:uppercase;letter-spacing:1.5px;color:var(--muted);font-size:11px;font-weight:650;margin:0 0 10px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:28px}h1{font-size:30px;letter-spacing:-1px;font-weight:650;margin:0;line-height:1.2}h2{font-size:18px;letter-spacing:-.35px;margin:0 0 6px;font-weight:650}h3{font-size:15px;margin:0 0 8px}.subtext{margin:9px 0 0;color:var(--muted);font-size:14px;line-height:1.6}.muted{color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:29px}.stat{padding:21px 24px;background:white;border:1px solid var(--line);border-radius:12px}.stat-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted)}.stat-top svg{color:#82a0b4}.stat strong{display:block;font-size:29px;font-weight:600;margin-top:9px}.card{background:white;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);overflow:hidden}.card-head{padding:21px 24px;border-bottom:1px solid var(--line);display:flex;gap:14px;align-items:center;justify-content:space-between}.card-head h2{margin:0;font-size:16px}.card-head p{font-size:12px;margin:6px 0 0;color:var(--muted)}.card-body{padding:24px}.search{position:relative;max-width:340px;width:100%}.search svg{position:absolute;left:12px;top:12px;color:var(--muted)}.search input{padding-left:39px!important;background:#f8fafb}.table-head,.customer-row{display:grid;grid-template-columns:minmax(190px,1.6fr) 1.3fr .7fr 30px;align-items:center;gap:20px;padding:16px 24px}.table-head{background:#fafbfc;text-transform:uppercase;font-size:10px;letter-spacing:1px;color:var(--muted)}.customer-row{background:transparent;color:var(--ink);width:100%;text-align:left;border:0;border-radius:0;min-height:95px;font-weight:400}.customer-row:hover{background:#f7fafc}.customer-cell{display:flex;gap:13px;align-items:center;min-width:0}.customer-cell .initial{width:42px;height:42px;background:#edf3f7;border-radius:10px;display:grid;place-items:center;color:var(--blue);font-size:14px;font-weight:650;flex-shrink:0}.customer-cell strong{display:block;font-size:14px}.customer-cell small{display:block;color:var(--muted);font-size:12px;margin-top:6px}.count{font-size:13px}.empty{padding:50px 20px;text-align:center;color:var(--muted)}.pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;padding:6px 10px;border-radius:20px;white-space:nowrap;background:#f0f3f5;color:#657481;font-weight:600}.pill:before{content:'';height:5px;width:5px;background:currentColor;border-radius:50%}.pill.sent{background:#edf4fc;color:#376d9f}.pill.signed{background:#eaf5ee;color:#287256}.pill.changes{background:#fff5e4;color:#97631a}.contract-row{padding:24px;border-bottom:1px solid var(--line)}.contract-row-body{display:flex;justify-content:space-between;gap:20px;align-items:center}.contract-row:last-child{border:0}.contract-row h3{font-size:clamp(20px,2vw,24px);line-height:1.25;margin:9px 0}.contract-meta{display:flex;gap:17px;flex-wrap:wrap;font-size:12px;color:var(--muted);line-height:1.8}.contract-meta span{display:flex;align-items:center;gap:6px}.contract-meta svg{width:15px;height:15px}.customer-info{display:flex;gap:28px;margin:22px 0 28px;color:var(--muted);font-size:13px;line-height:1.7}.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:24px;align-items:start}.editor-main{display:grid;gap:20px;min-width:0}.editor-side{position:sticky;top:22px;display:grid;gap:16px}.editor-side .card-body{padding:20px}.editor-side button{width:100%;margin-top:10px}.editor-side h3{font-size:13px}.total{font-size:29px;letter-spacing:-.7px;margin:12px 0 7px}.mini-label{font-size:11px;color:var(--muted);line-height:1.6}.divider{height:1px;background:var(--line);margin:17px 0}.side-row{display:flex;justify-content:space-between;gap:12px;font-size:12px;margin:12px 0}.side-row span{color:var(--muted)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.full{grid-column:1/-1}label.field{display:block;min-width:0}label.field>span,.field-label{font-size:12px;font-weight:600;display:block;margin-bottom:8px;line-height:1.5}.required-star{color:#ad663c;margin-left:3px}input:not([type=checkbox]),textarea,select{width:100%;border:1px solid #d8e1e7;border-radius:7px;padding:11px 12px;background:white;color:var(--ink);outline:none;min-height:44px;transition:border .15s}input:focus,textarea:focus,select:focus{border-color:#4c8cb0;box-shadow:0 0 0 3px #2b749610}textarea{resize:vertical;min-height:86px;line-height:1.65}input[readonly],textarea[readonly]{background:#f6f8f9;color:#586b79}input[type=checkbox]{width:18px;height:18px;accent-color:var(--blue);flex-shrink:0;margin:0}.checkline{display:flex;align-items:flex-start;gap:11px;line-height:1.6;font-size:13px;margin:13px 0;cursor:pointer}.checkline input{margin-top:2px}.field-help{font-size:11px;color:var(--muted);margin:7px 0 0;line-height:1.6}.inline-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:12px}.lock-label{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted)}.lock-label svg{width:13px;height:13px}.date-input-wrap{position:relative}.date-display{position:absolute;inset:1px 35px 1px 1px;border-radius:7px;background:white;padding:12px;pointer-events:none;white-space:nowrap;font-size:14px}.date-input-wrap input{color:transparent!important;min-width:0}.date-input-wrap:focus-within .date-display{display:none}.date-input-wrap:focus-within input{color:var(--ink)!important}.item{padding:18px 0;border-bottom:1px solid var(--line)}.item:first-child{padding-top:0}.item:last-child{border:0;padding-bottom:0}.item textarea{font-size:13px;min-height:102px}.item-numbers{display:grid;grid-template-columns:1fr 1fr 1fr;gap:15px;margin-top:12px;align-items:end}.item-numbers .amount{font-size:14px;text-align:right;padding-bottom:13px}.field-edit{border:1px solid var(--line);border-radius:9px;padding:17px;margin-bottom:12px}.field-edit:last-child{margin-bottom:0}.field-edit-top{display:flex;justify-content:space-between;gap:10px;align-items:center}.field-edit-top strong{font-size:13px}.field-edit-top small{font-size:10px;color:var(--muted);display:block;margin-top:5px}.field-edit-actions{display:flex;gap:4px;align-items:center}.field-edit-actions button{padding:4px;min-height:32px;width:32px}.field-edit-actions svg{width:15px}.field-edit .preview-answer{margin-top:14px}.clause{border-bottom:1px solid var(--line)}.clause:last-child{border:0}.clause summary{cursor:pointer;min-height:56px;font-size:13px;font-weight:600;line-height:1.6;padding:16px 0;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px}.clause summary:after{content:'+';font-size:20px;color:#7c909e}.clause[open] summary:after{content:'−'}.clause textarea{margin-bottom:15px;min-height:180px}.clause input{margin-bottom:12px}.text-actions{display:flex;gap:8px;flex-wrap:wrap}.notice{font-size:12px;line-height:1.7;background:#f1f6f9;border:1px solid #dfebf1;padding:13px 16px;border-radius:8px;color:#4d6b7e}.notice.amber{background:#fff8ec;border-color:#f0e4cd;color:#836633}.history-entry{padding:0 0 17px 16px;border-left:1px solid var(--line);position:relative;font-size:12px;line-height:1.6}.history-entry:before{content:'';position:absolute;left:-4px;top:4px;width:7px;height:7px;border-radius:50%;background:#93afc0}.history-entry strong{display:block}.history-entry small{display:block;color:var(--muted);margin-top:5px}.history-entry p{margin:5px 0;color:var(--muted)}.mobile-actions{display:none}.view-switch{display:flex;gap:4px;background:#eaf0f4;border-radius:8px;padding:4px}.view-switch button{min-height:34px;padding:7px 12px;font-size:12px;border:0;background:transparent}.view-switch button.active{background:#d4e9f5;box-shadow:0 1px 4px #193b5210}.client-shell{max-width:880px;margin:0 auto;padding:24px 28px 100px}.client-top{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.client-top .brand{padding:0}.client-top .brand img{width:52px}.client-top>a{font-size:12px}.paper{background:white;border:1px solid var(--line);border-radius:12px;padding:46px 48px;box-shadow:var(--shadow)}.paper-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;border-bottom:1px solid var(--line);padding-bottom:26px;margin-bottom:28px}.paper h1{font-size:29px;line-height:1.3;max-width:470px}.paper .sender{font-size:12px;color:var(--muted);line-height:1.8;margin-top:13px}.document-summary{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:25px 0 30px}.document-summary dt{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;margin-bottom:7px}.document-summary dd{font-size:14px;margin:0;line-height:1.6;white-space:pre-line}.document-section{padding-top:28px;margin-top:28px;border-top:1px solid var(--line)}.document-section h2{font-size:17px;margin-bottom:20px}.document-section .equipment-block{white-space:pre-line;font-size:13px;line-height:1.85}.invoice-line{display:flex;justify-content:space-between;gap:20px;padding:15px 0;border-bottom:1px solid var(--line);font-size:13px}.invoice-total{display:flex;justify-content:space-between;margin-top:19px;font-size:17px;font-weight:650}.terms-text{font-family:Georgia,"Times New Roman",serif;font-size:15px;line-height:1.85;color:#334653;white-space:pre-line;overflow-wrap:anywhere}.terms-text h3{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:13px;color:var(--ink);line-height:1.65;margin:25px 0 9px}.terms-text p{margin:0 0 20px}.client-fields{display:grid;grid-template-columns:1fr 1fr;gap:20px}.roof-field{border:0;padding:0;margin:0}.roof-field legend{font-size:12px;font-weight:600;margin-bottom:7px}.signature-area{background:#f7fafc;border:1px solid var(--line);border-radius:10px;padding:25px}.signature-area .signature-input{font-family:Georgia,serif;font-style:italic;font-size:28px;padding:15px;min-height:65px}.signature-area button.primary{width:100%;margin-top:15px}.client-downloads{display:flex;gap:8px;flex-wrap:wrap;margin-top:19px}.client-footer{text-align:center;font-size:11px;color:var(--muted);line-height:1.8;margin:25px 0}.signed-panel{text-align:center;padding:32px 20px}.signed-panel .seal{width:55px;height:55px;background:#e6f3eb;border-radius:50%;display:grid;place-items:center;color:var(--green);margin:0 auto 16px}.signed-panel .seal svg{width:28px;height:28px}.signed-panel h2{font-size:22px}.signed-name{font-size:30px;font-family:Georgia,serif;font-style:italic;margin:20px 0 5px}.hash{font-family:ui-monospace,monospace;font-size:10px;word-break:break-all;color:var(--muted);line-height:1.7}.progress-copy{font-size:12px;color:var(--muted);margin:0 0 18px}.request-panel{margin-top:18px}.error{color:#a23f3f;font-size:13px;line-height:1.65;margin:12px 0}.integration-list{display:grid;gap:11px;margin:17px 0}.integration{display:flex;justify-content:space-between;align-items:center;font-size:12px}.integration small{color:#7a8992;background:#f0f3f5;border-radius:4px;padding:4px 6px}.empty-note{font-size:13px;color:var(--muted);line-height:1.8}dialog{border:1px solid var(--line);border-radius:14px;box-shadow:0 25px 100px #152c3f33;padding:30px;width:min(540px,calc(100% - 28px));max-height:90vh;overflow:auto;color:var(--ink)}dialog::backdrop{background:#152c3f66;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px;gap:15px}.dialog-heading h2{font-size:22px}.dialog-heading button{padding:4px;min-width:32px;min-height:32px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.dialog-fields{display:grid;gap:17px}.link-copy{display:flex;gap:8px;margin-top:18px}.link-copy input{font-size:12px}.modal-list{display:grid;gap:12px;margin:20px 0}.modal-list button{justify-content:flex-start;text-align:left;display:flex;padding:17px}.modal-list button strong{display:block}.modal-list button small{display:block;font-weight:400;color:var(--muted);line-height:1.7;margin-top:6px}#toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%,20px);background:#19384d;color:white;padding:13px 21px;border-radius:9px;box-shadow:0 8px 24px #19384d33;z-index:100;opacity:0;transition:.2s;max-width:calc(100vw - 32px);font-size:13px;pointer-events:none;line-height:1.5}#toast.visible{transform:translate(-50%,0);opacity:1}.template-note{margin-bottom:22px}.template-editor{max-width:850px}.compact-fields{display:flex;gap:10px;align-items:center}.compact-fields label{font-size:11px;color:var(--muted)}.read-value{font-size:14px;white-space:pre-line;line-height:1.75}.stack{display:grid;gap:20px}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.filters button{min-height:34px;padding:6px 12px;font-size:12px;border-radius:20px}.filters button.active{background:var(--ink);border-color:var(--ink);color:white}.after-save{color:var(--green)}.subtle-button{color:var(--blue);font-size:12px;border:0;padding:5px;background:none;min-height:30px}.mobile-bottom-nav{display:none}
@media(min-width:1500px){.content{padding-top:45px}.editor-layout{grid-template-columns:minmax(0,1fr) 290px;gap:30px}}
@media(max-width:1100px){.shell{grid-template-columns:minmax(222px,max-content) minmax(0,1fr)}.sidebar{padding:24px 13px}.brand strong{font-size:15px}.brand img{width:44px;height:44px}.content{padding:28px 25px 70px}.topbar{padding:0 25px}.editor-layout{grid-template-columns:minmax(0,1fr) 235px;gap:18px}.editor-side .card-body{padding:17px}.table-head,.customer-row{grid-template-columns:1.5fr 1fr .7fr 20px;gap:12px}.form-grid{gap:16px}.card-body{padding:20px}}
@media(max-width:850px){.shell{display:block}.sidebar{display:none}.topbar{height:60px;padding:0 20px}.content{padding:26px 20px 120px}.page-heading{align-items:flex-start;margin-bottom:24px}h1{font-size:27px}.editor-layout{display:block}.editor-side{position:static;margin-top:20px;grid-template-columns:1fr 1fr}.editor-side>.card:first-child{grid-column:1/-1}.editor-side .primary,.editor-side [data-action=preview]{display:none}.mobile-actions{display:flex;gap:10px;position:fixed;bottom:0;left:0;right:0;background:#fffffff5;backdrop-filter:blur(12px);border-top:1px solid var(--line);padding:12px 20px calc(12px + env(safe-area-inset-bottom));z-index:15}.mobile-actions button{flex:1}.mobile-bottom-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;background:white;border-top:1px solid var(--line);padding:8px 4px calc(8px + env(safe-area-inset-bottom));gap:2px;z-index:15}.mobile-bottom-nav button{font-size:11px;flex-direction:column;gap:3px;border:0;background:transparent;min-width:0;color:var(--muted);padding:5px}.mobile-bottom-nav button.active{color:var(--blue)}.customer-info{flex-wrap:wrap;gap:13px}.stats{gap:10px}.stat{padding:16px}.stat strong{font-size:26px}.stat-top svg{display:none}.demo-strip{font-size:11px;padding:8px 14px}.contract-row{padding:20px}.contract-row-body{align-items:flex-start}.client-shell{padding:20px 22px 50px}.paper{padding:32px}.client-top{margin-bottom:20px}.save-state{font-size:11px}#toast{bottom:90px}}
@media(max-width:540px){.content{padding:23px 16px 115px}.topbar{padding:0 16px}.topbar .crumb{font-size:12px;gap:7px}.topbar .crumb button{font-size:12px}.page-heading{gap:12px}.page-heading>.primary{font-size:12px;padding:10px 12px;white-space:nowrap}.page-heading>.primary svg{width:15px}.eyebrow{font-size:10px;margin-bottom:8px}.subtext{font-size:12px}.stats{gap:8px;margin-bottom:22px}.stat{padding:14px 12px}.stat-top{font-size:10px}.stat strong{font-size:25px}.card-head{padding:18px;flex-wrap:wrap}.card-head .search{max-width:none}.table-head{display:none}.customer-row{display:flex;padding:20px 16px;gap:12px}.customer-row>.row-location{display:none}.customer-row>.count{margin-left:auto;font-size:11px}.customer-cell .initial{width:38px;height:38px}.customer-cell strong{font-size:13px}.customer-cell small{font-size:11px}.customer-row>svg{width:16px}.card-body{padding:18px}.form-grid{grid-template-columns:1fr;gap:18px}.form-grid>.full{grid-column:auto}.editor-main{gap:16px}.editor-side{grid-template-columns:1fr;gap:16px}.editor-side>.card:first-child{grid-column:auto}.card-head h2{font-size:15px}.card-head p{font-size:11px}.lock-label{font-size:10px}.contract-row-body{display:block}.contract-meta{gap:5px;display:grid}.customer-info{display:block;margin:18px 0 24px;font-size:12px}.customer-info>div{margin-top:9px}.customer-cell{min-width:0}.item-numbers{gap:10px}.item-numbers label.field>span{font-size:11px}.item-numbers input{padding:10px}.item-numbers .amount{font-size:12px}.field-edit{padding:14px}.client-shell{padding:18px 12px 45px}.client-top{padding:0 6px}.client-top .brand strong{font-size:14px}.client-top .brand span{font-size:9px}.client-top .brand img{width:43px;height:43px}.client-top>a{font-size:11px}.paper{padding:26px 20px;border-radius:10px}.paper h1{font-size:25px}.paper-header{display:block;padding-bottom:23px}.paper-header .pill{margin-top:17px}.paper .sender{font-size:11px}.document-summary{gap:20px 14px}.document-summary dd{font-size:12px}.document-summary dt{font-size:9px}.client-fields{grid-template-columns:1fr;gap:18px}.client-fields>.full{grid-column:auto}.terms-text{font-size:15px;line-height:1.85}.signature-area{padding:18px}.signature-area .form-grid{gap:15px}.client-downloads button{flex:1;font-size:11px;padding:9px}.notice{font-size:11px;padding:12px}.client-top .brand{gap:4px}.mobile-actions{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.mobile-actions button{font-size:13px}.view-switch button{font-size:11px;padding:7px 9px}.field-edit-top{align-items:flex-start}.compact-fields{gap:6px}dialog{padding:23px}.link-copy{display:block}.link-copy button{margin-top:10px;width:100%}.paper-header .sender{max-width:240px}.document-section{padding-top:25px;margin-top:25px}}
@media print{.demo-strip,.client-top,.client-footer,.client-downloads,.request-panel,.client-quick-nav,.signature-area button{display:none!important}.client-shell{padding:0;max-width:none}.paper{border:0;padding:0;box-shadow:none}.terms-text{font-size:10pt}.paper h1{font-size:22pt}.document-section{break-inside:auto}.terms-text h3{break-after:avoid}body{background:white}.signature-area{background:white}}

@media(max-width:540px){.topbar .save-state{display:none}.topbar .crumb{min-width:0;overflow:hidden;white-space:nowrap}.topbar [data-action=reset]{white-space:nowrap;font-size:11px;padding:7px;flex-shrink:0}}

.correction-note { margin-bottom: 20px; }
.correction-note p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.filters { flex-wrap: wrap; }

.review-stack { display:grid; gap:12px; max-width:850px; }
.editor-invoice-row { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:inherit; row-gap:14px; align-items:start; }
.document-summary .received-field { white-space:normal; }
.editor-contact-column { min-width:0; margin:0; padding:0; border:0; }
.editor-contact-column legend { padding:0; margin-bottom:12px; font-size:16px; font-weight:650; }
.editor-contact-column > .field + .field,.editor-contact-column > .person-name-row + .field { margin-top:14px; }
.person-name-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.person-name-row .field { min-width:0; }
.editor-event-dates { margin-bottom:24px; }
.schedule-fields { display:grid; gap:14px; min-width:0; }
.review-section { margin:0; }
.review-section > summary { padding:18px 22px; cursor:pointer; font-weight:650; }
.review-section > summary small { color:var(--muted); font-weight:450; margin-left:8px; }
.review-section .card-body { padding-top:0; }
.review-stack .text-actions, dialog .text-actions, .dialog-actions { flex-wrap:wrap; }
.email-envelope { background:#f5f7f8; padding:12px 15px; border-radius:8px; overflow-wrap:anywhere; }
.email-envelope small { color:var(--muted); margin-right:6px; }
.email-body { padding:8px 14px; }
.email-body p, .approval-questions p { line-height:1.5; }
.mail-link { display:inline-flex; align-items:center; gap:8px; background:#e1eff7; padding:9px 14px; border:1px solid var(--line); border-radius:9px; color:var(--blue); }
.approval-questions li { margin-bottom:4px; }
.email-missing { background:#fff0f0; color:#762f32; padding:1px 4px; border-radius:3px; -webkit-box-decoration-break:clone; box-decoration-break:clone; }


.customer-header {
 display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 24px;
 grid-template-areas:"logo heading" "sender sender";
 align-items:start; border-bottom:1px solid var(--line); padding-bottom:24px; margin-bottom:24px;
}
.contract-heading-group { grid-area:heading; display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.contract-meta { grid-area:meta; display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; }
.contract-meta .eyebrow { margin:0; overflow-wrap:anywhere; }
.paper .customer-header h1 { grid-area:title; margin:0; max-width:none; font-size:clamp(25px,4vw,34px); line-height:1.15; letter-spacing:-.035em; overflow-wrap:anywhere; }
.paper .customer-header .sender { grid-area:sender; margin:0; font-size:13px; line-height:1.55; overflow-wrap:anywhere; }
.customer-header .sender strong { color:var(--ink); font-weight:600; }
.contract-logo { grid-area:logo; justify-self:start; width:200px; max-width:100%; height:auto; }
.contract-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:24px; }
.contract-actions > :is(button,a) {
 display:inline-flex; align-items:center; justify-content:center; gap:5px;
 min-height:34px; padding:5px 10px; font-family:inherit; font-size:12px;
 font-weight:600; line-height:1.3; border:1px solid transparent; border-radius:7px; text-align:center;
}
.contract-actions > a.action-invoice { background:#654680; color:white; }
.contract-actions svg { width:14px; height:14px; flex:none; }
.contract-actions a:hover { filter:brightness(.9); }
.paper .document-section { border-top:3px solid var(--blue); margin-top:28px; padding-top:14px; }
.paper .document-section > h2 {
 color:var(--blue-dark); font-size:clamp(23px,3vw,27px); font-weight:700;
 line-height:1.2; letter-spacing:-.025em; margin:0 0 18px; break-after:avoid;
}
.paper .sign-instruction { margin:0 0 8px; font-weight:600; }

button.action-pdf { background:#913c33; border-color:#913c33; color:white; }
button.action-word { background:#245784; border-color:#245784; color:white; }
button.action-change { background:#27654f; border-color:#27654f; color:white; }
.contract-actions button:hover,button.action-change:hover { filter:brightness(.9); }
.paper .document-summary dt,.paper label.field>span,.paper .roof-field legend {
 font-size:18px; line-height:1.35; font-weight:650; text-transform:none; letter-spacing:0; color:var(--ink);
}
.paper .document-summary dd,.paper .field input,.paper .field select,.paper .field textarea,.paper .date-display,.paper .checkline { font-size:16px; font-weight:400; }
.paper .signature-input { font-size:16px; }
.paper .document-summary dd { overflow-wrap:anywhere; }
.request-page { max-width:680px; margin:0 auto; }
.request-page h1 { margin-top:22px; }
.request-page form { margin-top:28px; }
.request-page blockquote { white-space:pre-wrap; overflow-wrap:anywhere; margin:20px 0; padding:12px 16px; background:#f4f7f6; }
.email-request-link { display:inline-block; padding:12px 16px; border-radius:8px; background:#27654f; color:white; }
@media(max-width:540px){
 

 .customer-header { gap:10px 16px; padding-bottom:20px; margin-bottom:20px; }
 .customer-header .contract-logo { justify-self:start; width:144px; margin-bottom:10px; }
 .customer-header .contract-meta { align-self:flex-end; }
 .contract-meta { align-self:center; flex-direction:column; align-items:flex-start; }
 .contract-actions { gap:5px; }
 .contract-actions > :is(button,a) { flex:1 1 0; min-width:0; font-size:12px; min-height:40px; line-height:1.2; padding:4px 3px; white-space:normal; }
 .contract-actions > :is(button,a) { flex:1 1 44%; min-height:44px; }
}
@media print { .contract-actions { display:none; } }

.contract-parties { grid-auto-flow:column; grid-template-rows:repeat(3,auto); }
.signer-phone-field { margin:8px 0; white-space:normal; }
.contract-parties > * { margin:0; min-width:0; }
:is(.contract-invoice,.contract-total) :is(dt,dd) { display:inline; }
@media (width > 540px) {
 .contract-parties > .contract-invoice { grid-area:3 / 1; }
 .contract-parties > .contract-total { grid-area:3 / 2; }
}
@media (max-width:540px) {
 .contract-parties { grid-auto-flow:row; grid-template-columns:1fr; grid-template-rows:auto; }
}

#signing { scroll-margin-top:12px; }
.field-guide, .guide-step { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 16px; }
.field-guide { margin-top:16px; padding:10px 14px; border-left:3px solid var(--blue); background:#f2f7fb; }
.field-guide:has(.guide-start:not([hidden])) { background:#fff0eb; border-left-color:#a83324; color:#76261b; }
.field-guide button[hidden] { display:none; }
.field-guide > span { font-size:15px; font-weight:600; }
.field-guide button, .guide-step button { min-height:44px; color:var(--blue-dark); }
.field-guide .guide-start { color:white; background:#a83324; border-color:#a83324; }
.field-guide .guide-start:hover { background:#85291d; }
.guided-field { background:#fff4d7; border-radius:7px; outline:2px solid #aa7019; padding:12px; align-self:start; }
.guide-step { margin-top:8px; }
.guide-step span { font-size:13px; color:var(--muted); }
#terms-title { scroll-margin-top:18px; }
@media print {
 .field-guide, .guide-step { display:none; }
 .guided-field { outline:none; padding:0; background:transparent; }
}

.contract-title-link { display:inline-block; padding:6px 4px; margin:-6px -4px; border-radius:4px; color:var(--blue-dark); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.contract-title-link:hover, .contract-title-link:focus-visible { background:#deeff9; color:#124d70; text-decoration-thickness:2px; }

.editor-save { display:flex; align-items:center; justify-content:flex-end; gap:14px; }
.editor-save .save-state { display:inline; color:var(--muted); font-size:13px; }
.copy-contact { margin-top:12px; }
@media screen {
 :is(input,select,textarea).missing-data, input.missing-data + .date-display,
 .roof-field.missing-data .checkline, .checkline.missing-data { background-color:#fff0f0; }
 :is(input,select,textarea).missing-data { border-color:#cb9292; }
}

.paper .event-dates { grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); }

.mail-copy { white-space:pre-wrap; overflow-wrap:anywhere; }

.email-fields { margin:12px 0; }
.email-fields .email-buttons { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.email-fields .mail-link { min-width:0; text-align:center; }
.email-buttons .mail-link:first-child { color:white; background:var(--blue); border-color:var(--blue); font-weight:600; }

.contact-copy { margin-top:10px; }
.contact-copy select { width:100%; min-width:0; }

.company-address { min-width:0; padding:0; margin:0; border:0; }
.company-address legend { font-weight:650; padding:0; margin-bottom:10px; }
.address-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1.4fr); gap:12px; }
.company-address .address-grid > :first-child,.address-entry[data-part="Street"],.address-entry[data-part="Venue"] { grid-column:1/-1; }
.address-entry[data-part="City"] { grid-column:1; }
.address-entry[data-part="State"] { grid-column:2; }
.address-entry[data-part="Zip"] { grid-column:3; }
.address-grid > *, .address-grid .field { min-width:0; }
.delivery-card { min-width:0; padding:16px; border:1px solid var(--line); border-radius:9px; margin-bottom:12px; }
.delivery-card fieldset { border:0; margin:0; padding:0; min-width:0; }
.delivery-instructions { margin-top:12px; }
.delivery-card legend { padding:0; margin-bottom:12px; font-weight:650; }
.address-entry.guided-field { padding:0; }
@media(max-width:540px){
 .delivery-card { padding:12px; }
 .address-grid { column-gap:6px; }
 .address-grid input { padding-inline:6px; }
}
.address-grid > label.field,.address-entry > label.field { display:flex; flex-direction:column; height:100%; }
.address-grid > label.field > input,.address-entry > label.field > input { margin-top:auto; }


.recorded-field { margin:0; min-width:0; }
.recorded-field dt { font-size:18px; font-weight:650; line-height:1.35; }
.recorded-field dd { margin:7px 0 0; font-size:16px; line-height:1.5; white-space:pre-line; overflow-wrap:anywhere; }

.customer-address-inputs[hidden],.address-summary[hidden] { display:none; }
.address-summary p { margin:0; line-height:1.5; overflow-wrap:anywhere; }
.address-summary button { margin-top:8px; }
.delivery-card.customer-delivery { border:0; padding:0; margin:0; }
.customer-delivery > [data-part="Venue"] { margin-bottom:20px; }
@media (width > 540px) {
 .customer-delivery:has(> [data-part="Venue"]) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
 .customer-delivery > [data-part="Venue"] { grid-column:1; margin-bottom:0; }
 .customer-delivery > .delivery-instructions { grid-column:1 / -1; }
}
.customer-delivery .address-summary strong { display:block; font-size:18px; line-height:1.35; margin-bottom:7px; }

.equipment-group{min-width:0;margin:0;padding:0;border:0}
.equipment-group legend{font-weight:700;margin-bottom:.4rem}
.equipment-group .checkline{display:flex;align-items:center;gap:.6rem;min-height:40px;margin:0;cursor:pointer}
.equipment-group:has(input[data-equipment="stage"]):not(:has(:checked)){
  align-self:start;
  background:#fff0f0;
  outline:1px solid #cb9292;
  border-radius:7px;
}
.equipment-group:has(input[data-equipment="stage"]):not(:has(:checked)) legend{color:#922d26}

.payment-section { scroll-margin-top:20px; }
.payment-options { padding-left:1.6em; line-height:1.55; }
.payment-options li { padding-left:.3em; margin-bottom:.8em; }
.signer-mail-preview { margin-top:24px; border-top:1px solid var(--line); padding-top:16px; }
.signer-mail-preview summary { cursor:pointer; font-weight:600; }

.signed-copy-email { margin-top:16px; padding:20px; border:1px solid var(--line); border-radius:10px; overflow-wrap:anywhere; }
.signed-copy-email h2 { margin:0 0 12px; line-height:1.3; }
.signed-copy-attachment { margin-top:18px; border-top:1px solid var(--line); padding-top:12px; }
.signed-copy-attachment button { max-width:100%; margin-top:6px; text-align:left; white-space:normal; }

.signer-email-text { white-space:pre-wrap; overflow-wrap:anywhere; }

@media (min-width:541px) { .customer-cell .mobile-location { display:none; } }

.customer-event-details { display:flex; flex-wrap:wrap; gap:4px 20px; color:var(--muted); font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
.customer-event-details strong { color:var(--ink); font-weight:600; }
@media(max-width:540px){
 .customer-event-details { display:grid; gap:3px; }
}

.contract-row-actions { display:flex; flex-wrap:wrap; flex:0 1 auto; align-items:center; justify-content:flex-end; gap:8px; margin-left:auto; }
.contract-row-actions button { min-height:40px; }
.contract-row-actions .icon-only { min-width:44px; padding-inline:0; justify-content:center; }
@media(max-width:540px){
 .contract-row-actions { margin-top:12px; }
 .contract-row-actions button { min-height:44px; }
}

.contract-row-customer { display:grid; gap:2px; margin:0 0 10px; font-size:15px; overflow-wrap:anywhere; }
.contract-row-customer small { color:var(--muted); font-size:13px; }

.filters [data-filter="Draft"],
.contract-row[data-status="Draft"] { --row-bg:#f3effb; --badge-bg:#e5dcf6; --badge-text:#583e7b; }
.filters [data-filter="Sent"],
.contract-row[data-status="Sent"] { --row-bg:#eaf3fc; --badge-bg:#d4e6f8; --badge-text:#245783; }
.filters [data-filter="Needs changes"],
.contract-row[data-status="Needs changes"] { --row-bg:#fff2dc; --badge-bg:#ffe0a5; --badge-text:#784600; }
.filters [data-filter="Signed"],
.contract-row[data-status="Signed"] { --row-bg:#e9f5eb; --badge-bg:#cee9d4; --badge-text:#245f37; }
.filters [data-filter="Awaiting confirmation"] { --badge-bg:#fff0cf; --badge-text:#724900; }
.filters [data-filter="unsigned-soon"] { --badge-bg:#fde6e5; --badge-text:#922d26; }
.filters [data-filter="unpaid-soon"] { --badge-bg:#ffe4cf; --badge-text:#833d12; }
.filters button[data-filter] {
 background:var(--badge-bg,#e6ecf0); color:var(--badge-text,var(--ink));
 border-color:transparent;
}
.filters button[aria-pressed="true"] { border-color:currentColor; box-shadow:inset 0 0 0 1px currentColor; }
.contract-row[data-status] { background:var(--row-bg,white); --muted:#526373; }
.event-cards { display:grid; gap:20px; grid-template-columns:minmax(0,1fr); }
.contract-row + .contract-row { margin-top:4px; }
.contract-row[data-status] .pill { background:var(--badge-bg,#f0f3f5); color:var(--badge-text,var(--ink)); }

.contract-row[data-status].install-soon { --row-bg:#fde6e5; }
.contract-row[data-status].install-past { --row-bg:#eceff1; }
.contract-row-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.contract-row-totals { display:grid; justify-items:end; gap:4px; text-align:right; }
.contract-status-group { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.imported-badge { border:1px solid #b9c7d3; border-radius:999px; padding:2px 8px; color:#42596d; background:#f8fafc; font-size:11px; font-weight:600; }
.confirmation-badge { display:inline-block; border-radius:999px; padding:3px 9px; background:#fff0cf; color:#724900; font-size:11px; font-weight:600; }
.contract-row-timing { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; }
.install-countdown { display:inline-block; color:var(--muted); font-size:13px; font-weight:600; }
.install-countdown.due-soon { color:#922d26; }
.row-field-status, .row-received { flex:none; text-align:right; font-size:13px; font-weight:600; }
.row-field-status.missing, .row-received { color:#922d26; }
.row-field-status.missing { background:transparent; padding:0; min-height:0; border:0; border-radius:3px; text-decoration:underline; text-underline-offset:3px; }
.row-field-status.missing:hover { background:#f9d8d6; }
.row-field-status.complete, .row-received.positive { color:#245f37; }

@media (max-width: 600px) {
 .customer-page-heading {flex-direction:column;align-items:flex-start}
}
.confirmation-details { margin:12px 0 0; line-height:1.5; overflow-wrap:anywhere; }
.confirmation-details dt,.confirmation-details dd { display:inline; margin:0; }
.confirmation-details dt { font-weight:600; }

.filters button svg,.crumb button svg { width:15px; height:15px; }
.mail-link[style] svg { vertical-align:middle; margin-right:6px; }

.template-settings-actions { margin-top:16px; }
.template-save-actions { justify-content:flex-end; }
#template-email-preview { margin-top:20px; scroll-margin-top:16px; }
#preview-email-contract { max-width:100%; min-width:0; }
.template-tabs { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.template-tabs a { display:inline-flex; align-items:center; gap:7px; padding:10px 14px; min-height:44px; border-radius:8px 8px 0 0; border-bottom:3px solid transparent; background:#edf4f8; color:var(--blue-dark); font-size:14px; font-weight:600; }
.template-tabs a:hover { background:#deedf5; }
.template-tabs a[aria-current="page"] { background:#d6eaf5; border-bottom-color:var(--blue); }
.template-tabs svg { width:16px; height:16px; }
@media(max-width:540px){
 .template-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .template-tabs a { font-size:13px; padding:8px; }
}

.customer-search-results { max-height:14rem; overflow:auto; }
.customer-search-results:not(:empty) { margin-top:8px; border:1px solid var(--line); border-radius:8px; }
.customer-search-results button { display:block; width:100%; text-align:left; border:0; border-radius:0; background:white; overflow-wrap:anywhere; }
.customer-search-results button:hover,.customer-search-results button:focus-visible { background:var(--pale); }
.customer-search-results button small { display:block; color:var(--muted); font-weight:400; }

.field-edit [data-action="copy-onsite-contact"] { margin-top:10px; }

.event-summary-details { margin-top:18px; display:grid; grid-template-columns:minmax(0,1fr) minmax(190px,32%); gap:24px; align-items:start; overflow-wrap:anywhere; }
.event-summary-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:10px 20px; }
.event-summary h2 { min-width:0; overflow-wrap:anywhere; margin:0; font-size:21px; line-height:1.25; }
.event-summary-status { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.event-summary .install-countdown,.event-summary .row-field-status { display:inline-flex; align-items:center; gap:5px; border-radius:99px; padding:5px 10px; font-size:12px; line-height:16px; font-weight:600; }
.event-summary .install-countdown { background:#edf2f5; white-space:nowrap; }
.event-summary .due-soon,.event-summary .row-field-status.missing { background:#fde6e5; color:#922d26; }
.event-summary .row-field-status.missing { text-decoration:none; }
.event-summary .row-field-status.missing:hover { background:#f9d8d6; text-decoration:underline; }
.event-summary .row-field-status svg { width:14px; height:14px; }
.event-summary .row-field-status.complete { background:#e5f3e8; color:#245f37; }
.event-summary #summary-countdown { margin-top:8px; }
.event-summary-dates { display:flex; flex-wrap:wrap; gap:12px 28px; margin:0; }
.event-summary dt { font-size:12px; color:var(--muted); }
.event-summary dd { margin:3px 0 0; font-size:14px; }
.summary-payments { margin:0; padding-left:20px; border-left:1px solid var(--line); display:grid; gap:10px; }
.summary-payments div { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.summary-payments dd { margin:0; text-align:right; font-weight:600; font-variant-numeric:tabular-nums; }
.event-summary .text-actions { margin-top:18px; border-top:1px solid var(--line); padding-top:14px; }
@media(max-width:650px){
 .event-summary-heading { flex-direction:column; }
 .event-summary-status { order:-1; align-self:flex-end; }
 .event-summary-details { grid-template-columns:minmax(0,1fr); gap:16px; }
 .summary-payments { border-left:0; border-top:1px solid var(--line); padding:14px 0 0; }
}

#request-details-action[hidden] { display:none; }
.event-summary button.request-details { background:#9b3931; border-color:#9b3931; color:white; }
.event-summary button.request-details:hover:enabled { background:#802d27; }
.request-actions { display:inline-flex; }
.request-actions #request-details-action { border-radius:8px 0 0 8px; }
.request-actions .request-history { border-radius:0 8px 8px 0; padding-inline:10px; min-width:44px; color:#802d27; background:#fcece9; border-color:#c88780; text-decoration:underline; text-underline-offset:2px; }
#request-details-form .email-fields { margin-top:16px; }
#request-details-form textarea { min-height:12em; }
.dialog-actions .email-request-link { display:inline-flex; align-items:center; gap:7px; }
#view-count:empty,#last-request:empty { display:none; }
.event-summary .view-history-pill { display:inline-flex; align-items:center; gap:5px; min-height:26px; padding:4px 10px; border:0; border-radius:99px; color:#205976; background:#e5f2fa; font-size:12px; text-decoration:underline; text-underline-offset:2px; }
.view-history-pill svg { width:14px; height:14px; }
.view-history-list { list-style:none; margin:0; padding:0; }
.view-history-list li { display:grid; gap:4px; padding:12px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.view-history-list li span { color:var(--muted); font-size:13px; }
.sent-request summary { cursor:pointer; color:var(--blue); }
.sent-request-meta { display:flex; flex-wrap:wrap; gap:3px 12px; margin-top:4px; }
.sent-request-body { margin-top:12px; white-space:pre-wrap; line-height:1.6; }
.resend-request { margin-top:12px; }
.request-reply { display:block; margin-top:5px; }
.request-reply .reply-link { min-height:28px; padding:0 2px; background:none; border:0; color:var(--green); text-decoration:underline; text-underline-offset:2px; }
.client-reply { padding:12px; background:#f2f7f4; border-radius:8px; }

.reply-apply { margin-top:12px; }
.reply-field-rows { display:grid; gap:12px; margin:18px 0; }
.reply-match { min-width:0; border:1px solid var(--line); border-radius:8px; padding:12px; }
.reply-match legend label { display:inline-flex; align-items:center; gap:6px; font-weight:600; }
.reply-match .field-help { margin:0 0 8px; overflow-wrap:anywhere; }
#reply-field-review [data-action="reply-add"] { margin-top:8px; }

.applied-reply { margin-top:6px; }
.applied-reply summary { cursor:pointer; }
.applied-reply summary::before { display:none; }
.applied-reply summary svg { width:14px; height:14px; }
.applied-reply section { padding:12px; margin-top:8px; border:1px solid var(--line); border-radius:8px; }
.applied-reply section ul { margin:6px 0 0; padding-left:20px; }
.applied-reply section li { overflow-wrap:anywhere; white-space:pre-line; }
.review-zip:not([hidden]) { padding:12px; margin-bottom:12px; border:1px solid var(--line); border-radius:8px; }
