:root{font-family:system-ui,sans-serif;color:#30271e;background:#f0e9d9}*{box-sizing:border-box}body{margin:0}header{display:flex;align-items:center;gap:24px;padding:24px 5%;background:#e1d4bc;border-bottom:2px solid #876444;flex-wrap:wrap}header img{width:165px}header p{margin:4px 0}a{color:#644520}main{max-width:1150px;margin:auto;padding:25px}nav,.actions,.titlebar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}button{background:#62472f;color:white;padding:12px 17px;border:0;border-radius:4px;cursor:pointer;font:inherit}button:disabled{opacity:.5;cursor:wait}h1,h2{font-family:Georgia,serif}label{display:block;margin:14px 0;font-weight:600}input,select,textarea{display:block;width:100%;padding:11px;border:1px solid #ad9b82;border-radius:4px;background:#fffdf8;color:#30271e;font:inherit;margin-top:6px}textarea{resize:vertical}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.notice{padding:15px;background:#e6dcc8;font-size:.92rem;line-height:1.5}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:15px}.card{padding:20px;border:1px solid #b8a78e;background:#fffaf0;margin:12px 0;overflow-wrap:anywhere}.card p{white-space:pre-wrap}.photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}.photos figure{margin:15px 0}.photos img{width:100%;height:230px;object-fit:contain;background:#ded5c6}.photos figcaption{white-space:pre-wrap;overflow-wrap:anywhere}.task{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;align-items:center}.check{display:flex;align-items:center;gap:10px}.check input{width:auto}output{display:block;padding:18px;background:#fffaf0;white-space:pre-wrap;line-height:1.8}#message{min-height:24px;font-weight:600}section{margin-top:25px}[hidden]{display:none!important}@media(max-width:650px){.grid{grid-template-columns:1fr}.task{grid-template-columns:1fr 1fr}.task label:first-child{grid-column:1/-1}main{padding:16px}header{gap:15px}button{padding:10px}}

.invoice-table{width:100%;border-collapse:collapse;overflow-wrap:anywhere}.invoice-table th,.invoice-table td{text-align:left;padding:12px;border-bottom:1px solid #b8a78e}.invoice-table td:last-child,.invoice-table th:last-child{text-align:right;white-space:nowrap}form+form{margin-top:12px}
.inquiry-row>summary{font-weight:650;cursor:pointer;line-height:1.6;min-height:44px}.inquiry-row button{margin:8px 8px 8px 0}.inquiry-row details{margin:18px 0}.inquiry-row details>summary{cursor:pointer;padding:10px 0}button[aria-pressed="true"]{outline:3px solid #ad8a46;outline-offset:2px}
.status-tag{display:inline-block;margin:8px;padding:6px 12px;border-radius:20px;font-weight:650;border:1px solid currentColor}.status-tag.red{color:#8f1f20;background:#ffe7e7}.status-tag.yellow{color:#674900;background:#fff2b3}.status-tag.blue{color:#164a83;background:#dcecff}.status-tag.green{color:#17592f;background:#dff3e4}.status-tag.gray{color:#464646;background:#ececec}.wo-task input[type=checkbox]{width:auto}#taskTimers{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}#timeLog>details{padding:16px;border-top:1px solid #ad9b82}#timeLog summary{cursor:pointer;line-height:1.6}
.workshop-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch;margin:20px 0}.workshop-nav .nav-group{--nav-accent:#245b88;--nav-tint:#e7f0f8;margin:0;padding:16px;background:var(--nav-tint);border:1px solid var(--nav-accent);border-top:5px solid var(--nav-accent);border-radius:8px}.workshop-nav .money{--nav-accent:#835719;--nav-tint:#fff1d6}.workshop-nav .reference{--nav-accent:#684782;--nav-tint:#f1eaf7}.workshop-nav .settings{--nav-accent:#475a60;--nav-tint:#e7edef}.workshop-nav h2{margin:0 0 12px;font:700 1rem system-ui,sans-serif;color:var(--nav-accent)}.nav-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.workshop-nav .nav-tile{display:flex;align-items:center;gap:12px;min-height:68px;width:100%;margin:0;padding:12px;background:#fffdf8;color:#30271e;text-decoration:none;text-align:left;border:1px solid #b7b5ad;border-radius:6px;font:600 1rem/1.35 system-ui,sans-serif;overflow-wrap:anywhere}.nav-icon{font-size:1.65rem;line-height:1;flex:0 0 32px;text-align:center}.nav-tile:hover,.nav-tile:focus-visible{outline:3px solid var(--nav-accent);outline-offset:1px}.workshop-nav .nav-tile[aria-pressed="true"]{background:white;border:2px solid var(--nav-accent);outline:2px solid var(--nav-accent);outline-offset:1px}.workshop-nav .nav-label{min-width:0}@media(max-width:700px){.workshop-nav{grid-template-columns:1fr;gap:14px}.workshop-nav .nav-group{padding:12px}.workshop-nav .nav-tile{gap:8px;padding:10px;min-height:72px}.nav-icon{flex-basis:28px;font-size:1.5rem}}@media(max-width:350px){.nav-tiles{grid-template-columns:1fr}}
.estimate-status{display:inline-block;padding:.45rem .7rem;border:2px solid;border-radius:.35rem;font-weight:700;margin:.3rem 0}.estimate-status.red{color:#8b2525;background:#fff0ee}.estimate-status.yellow{color:#715200;background:#fff5cf}.estimate-status.blue{color:#184b7e;background:#e8f2ff}.estimate-status.green{color:#1a6032;background:#e7f5e9}.estimate-line{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.estimate-line textarea{width:100%}@media(max-width:600px){.estimate-line{grid-template-columns:1fr}}

/* Keep long worksheets from widening the mobile viewport. */
html{font-size:16px}body{min-width:0;font-size:1rem;line-height:1.5}main,section,form,details,.grid>*{min-width:0}pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-width:100%;font:inherit;font-size:.94rem;line-height:1.6}h1{font-size:1.85rem}h2{font-size:1.4rem}button,a,input,textarea,select{touch-action:manipulation}textarea{min-height:6rem}button{min-height:44px;line-height:1.4}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #245b88;outline-offset:3px}
#message{position:sticky;top:0;z-index:10;margin:0 0 18px;padding:12px 16px;border-left:5px solid #245b88;background:#e7f0f8;box-shadow:0 2px 8px #30271e22;overflow-wrap:anywhere}#message:empty{display:none}#message[data-tone=error]{border-color:#8f1f20;background:#ffe7e7}#message[data-tone=success]{border-color:#17592f;background:#e3f3e8}
#workshopMenu>summary,.workshop-help>summary,.project-import>summary,.reference-fold>summary{cursor:pointer;min-height:44px;padding:12px;font-weight:650}#workshopMenu{border:1px solid #ad9b82;border-radius:8px;background:#fffaf0}#workshopMenu .workshop-nav{margin:0;padding:12px}.workshop-help{margin:12px 0}.project-sections{gap:8px;margin:20px 0}.project-sections a{padding:10px 14px;background:#fffaf0;border:1px solid #ad9b82;border-radius:6px;text-decoration:none}.project-savebar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;padding:12px 16px;background:#e7edef;border-radius:8px}.project-import{margin:16px 0}.project-import>button,.project-import form{margin:8px}.project-panel{border:1px solid #b8a78e;background:#fffaf0;padding:24px;border-radius:8px;margin-top:24px;scroll-margin-top:110px}.project-panel h2:first-child{margin-top:0}.project-panel>p{max-width:70ch}.project-panel>summary{cursor:pointer;font-weight:700;font-size:1.2rem;min-height:44px}.reference-fold{margin:20px 0;background:#e7edef;border-radius:6px;padding:8px}.reference-fold pre{padding:8px}.estimate-total{font-size:1.15rem;font-weight:700;background:#e7f0f8;padding:16px;border-radius:6px}.estimate-line{display:block;padding:0}.estimate-line>summary{cursor:pointer;min-height:60px;padding:16px;font-weight:650;overflow-wrap:anywhere}.estimate-line-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;padding:0 20px 20px}.estimate-line-fields label[data-wide]{grid-column:1/-1}.estimate-line-fields .check{grid-column:1/-1}.estimate-line-fields textarea{min-height:7rem}.actions{margin:16px 0;align-items:stretch}.actions button{flex:1 1 200px}#planningCharges .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#planningCharges #save{grid-column:1/-1}button[aria-busy=true]{opacity:.7;cursor:wait}button[aria-busy=true]::after{content:' · Working…'}
@media(max-width:650px){header{padding:16px}header img{width:140px}.project-panel{padding:16px}.project-sections{display:grid;grid-template-columns:1fr 1fr}.project-sections a{font-size:.94rem}.estimate-line-fields{grid-template-columns:1fr;padding:0 16px 16px}.project-savebar{flex-wrap:wrap}.project-savebar button{width:100%}#planningCharges .actions{grid-template-columns:1fr}#message{font-size:.94rem}#projectDocuments a{display:inline-block;padding:8px 0;overflow-wrap:anywhere}}

.task{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto}.task label{min-width:0}output{overflow-wrap:anywhere}#billing{scroll-margin-top:110px}@media(max-width:650px){.task{grid-template-columns:repeat(2,minmax(0,1fr))}}

#projects,#inquiries,#editor,#tasks,#estimateChargePanel,#reference-result{scroll-margin-top:110px}

.stock-level{display:inline-block;padding:.3rem .6rem;border-radius:1rem;font-weight:700;font-size:.85rem}.stock-level.red{background:#fce2dc;color:#8c2415}.stock-level.yellow{background:#fff1c5;color:#745100}.stock-level.green{background:#dcece0;color:#245836}.stock-card h3{margin-top:.8rem}.receipt-drop{padding:1.5rem;border:2px dashed #97714b;border-radius:.6rem;background:#f7f1e8}.receipt-drop.dragging{background:#e5eddf}.stock-card form{padding:.5rem}.stock-card details{margin-top:1rem}#stock-history button{margin-left:.75rem}
#hcw-assistant-toggle{position:fixed;right:1rem;bottom:1rem;z-index:1000;border-radius:2rem;box-shadow:0 4px 18px #0003;background:#443223;color:#fff;padding:.85rem 1.1rem}#hcw-assistant{position:fixed;right:1rem;bottom:4.75rem;z-index:1001;width:min(440px,calc(100vw - 2rem));max-height:calc(100dvh - 7rem);display:flex;flex-direction:column;background:#fffdf8;border:1px solid #b9a58c;border-radius:1rem;box-shadow:0 8px 32px #0004;overflow-y:auto;text-align:left}#hcw-assistant[hidden]{display:none}.hcw-assistant-header{display:flex;justify-content:space-between;align-items:center;padding:.7rem 1rem;background:#eee3d2}.hcw-assistant-header h2{font-size:1.1rem;margin:0}.hcw-assistant-header button{padding:.35rem .6rem}.hcw-assistant-intro{font-size:.85rem;line-height:1.4;margin:.6rem 1rem}#hcw-assistant>a{margin:0 1rem .5rem;font-size:.9rem}.hcw-assistant-log{overflow-y:auto;padding:.5rem 1rem;flex:1;min-height:90px;max-height:38dvh;overscroll-behavior:contain}.hcw-assistant-message{padding:.7rem;margin-bottom:.7rem;border-radius:.6rem;background:#eee6da}.hcw-assistant-message.user{background:#e2eade}.hcw-assistant-message p{white-space:pre-wrap;margin:.3rem 0;font-size:.9rem}.hcw-assistant-message button{font-size:.85rem;margin-top:.5rem;padding:.45rem .7rem}#hcw-assistant form{padding:.6rem 1rem;border-top:1px solid #d9cebd;margin:0}#hcw-assistant label{font-size:.85rem;margin:.3rem 0}#hcw-assistant textarea{min-height:65px;max-height:150px;width:100%}#hcw-assistant input[type=file]{font-size:.8rem;padding:.3rem}#hcw-assistant form>button{padding:.45rem .9rem;margin:.4rem 0}.hcw-assistant-status{font-size:.8rem;line-height:1.35;margin:.3rem 0}body:has(#hcw-assistant-toggle){padding-bottom:5rem}@media(max-width:600px){#hcw-assistant{max-height:calc(100dvh - 6rem);bottom:4.3rem}.hcw-assistant-intro{font-size:.78rem}.hcw-assistant-log{max-height:34dvh}}

.hcw-guide-link{display:block;padding:.6rem 0;color:#f4d397}

.draft-label{display:inline-block;font-weight:700;color:#714a17;border:2px solid currentColor;padding:.75rem}.document-footer{margin-top:2rem;border-top:1px solid #b7afa0;padding-top:1rem;font-size:.9rem}

.review-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:1rem}.review-photo-grid figure{margin:0;padding:.7rem;border:1px solid #cdbfae;border-radius:.5rem;min-width:0}.review-photo-grid img{width:100%;max-height:300px;object-fit:contain}.review-photo-grid textarea{width:100%;box-sizing:border-box}dd.form-copy{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 1rem}
