/* LEVA brand tokens (navy, Kinetic Orange, DM Sans); source recorded in static/brand/PROVENANCE.json. */
@font-face{font-family:"DM Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url(brand/DMSans-Variable.woff2) format("woff2")}
:root{--leva-blue:#b9471f;--leva-accent:#ff6b35;--leva-navy:#152a45;--leva-paper:#f7fafc;--leva-soft-blue:#ff8a5f;--leva-logo-blue:#ff6b35;--leva-logo-ink:#1e3a5f;--leva-surface:#FFFFFF;--leva-text:#132033;--leva-muted:#505C6C;--leva-rule:#CDD0E5;--leva-evidence:#0E7C7B;--leva-attention:#d97706;--leva-danger:#c53030;--leva-font:"DM Sans",system-ui,sans-serif;--leva-font-data:ui-monospace,SFMono-Regular,Menlo,monospace;--leva-radius-control:7px;--leva-radius-panel:8px}
:root{font-family:var(--leva-font);color:#132033;background:#edf0f5;font-synthesis:none;--navy:#152a45;--blue:#b9471f;--violet:#9067d9;--teal:#008577;--border:#e3e7ef;--muted:#7b8797;--rail:112px;--panel:270px}*{box-sizing:border-box}body{margin:0;font-size:12px}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.45}button,a,input,select,textarea{outline-offset:4px}button:focus-visible,a:focus-visible{outline:2px solid var(--blue)}button{background:none;border:0}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button[hidden],[hidden]{display:none!important}.header{height:54px;display:flex;align-items:center;gap:16px;padding:0 18px;background:#fff;border-bottom:1px solid var(--border);position:relative;z-index:20}.brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--navy)}.brand>svg{width:23px;height:24px;stroke-width:2.1}.brand>span:not(.poc){font-size:23px;font-weight:720;letter-spacing:-1.1px}.poc{font-size:8px;font-weight:650;letter-spacing:1px;color:#8490a1;padding:3px 4px;border:1px solid #e5e9ef;border-radius:3px;margin-top:4px}.header-rule{width:1px;height:23px;background:var(--border);margin:0 1px 0 6px}.document-select{display:flex;align-items:center;gap:8px;min-width:0}.document-select>svg{width:16px;color:#8e99a8}.document-select select{border:0;background:transparent;font-weight:560;max-width:380px;cursor:pointer;color:#33435a;font-size:12px;padding:6px 20px 6px 0}.header-spacer{flex:1}.icon-button{width:30px;height:30px;display:inline-flex;justify-content:center;align-items:center;border-radius:6px;color:#778398;cursor:pointer}.icon-button:hover{background:#f0f3f8;color:var(--navy)}.icon-button svg{width:18px;height:18px}.connection{display:flex;gap:6px;align-items:center;color:#8390a2;font-size:11px}.connection>span:first-child{width:5px;height:5px;background:#c1c9d4;border-radius:100%}.connection.live>span:first-child{background:var(--teal)}.avatar{width:27px;height:27px;border-radius:50%;background:#e9edf4;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:600;color:#6b778a}.workspace{display:grid;grid-template-columns:var(--rail) minmax(0,1fr) var(--panel);height:calc(100dvh - 54px)}.workspace.panel-closed{grid-template-columns:var(--rail) minmax(0,1fr)}.workspace.panel-closed .measurements{display:none}.page-rail{background:#f8f9fc;border-right:1px solid var(--border);overflow:auto;scrollbar-width:thin;z-index:10}.rail-heading{font-size:9px;letter-spacing:1.25px;color:#8a96a7;font-weight:650;display:flex;justify-content:space-between;padding:20px 13px 13px}.rail-heading span{letter-spacing:0;color:#a3adba}.page-thumb{display:block;width:100%;padding:10px 13px;text-align:left;position:relative}.page-thumb>div{height:61px;background:#fff;border:1px solid #e0e5ed;border-radius:3px;display:flex;justify-content:center;align-items:center;overflow:hidden;box-shadow:0 1px 2px #13203305}.page-thumb img{width:100%;height:100%;object-fit:contain}.page-thumb .page-label{display:block;color:#7c889a;font-size:9px;margin-top:7px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.page-thumb.active{background:#fff3ee}.page-thumb.active>div{outline:1.5px solid var(--blue);border-color:transparent}.page-thumb.active .page-label{color:var(--blue);font-weight:600}.thumb-actors{display:flex;position:absolute;right:9px;top:4px;gap:2px}.thumb-actor{width:6px;height:6px;background:var(--actor);border-radius:50%;box-shadow:0 0 0 2px #f8f9fc}.canvas-area{position:relative;min-width:0;overflow:hidden;background:#edf0f5}.canvas-top{position:absolute;left:22px;right:20px;top:18px;z-index:5;display:flex;align-items:flex-start;gap:12px;pointer-events:none}.sheet-title{display:flex;flex-direction:column;gap:5px;min-width:0}.sheet-title>span:first-child{font-size:11px;font-weight:560;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:250px}.sheet-title>span:last-child{font:9px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.25px;color:#919bad}.agents{margin-left:auto;display:flex;gap:6px;pointer-events:auto;flex-wrap:wrap;justify-content:flex-end;max-width:65%}.agent-chip{display:flex;gap:6px;align-items:center;background:#ffffffef;border:1px solid #dce2ec;border-radius:16px;padding:5px 9px 5px 5px;box-shadow:0 2px 4px #13203304;max-width:200px}.agent-chip.following{border-color:var(--actor);box-shadow:0 0 0 1px var(--actor)}.agent-dot{display:flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:var(--actor);color:white;font-size:9px;font-weight:600}.agent-name{font-size:10px;font-weight:570;white-space:nowrap}.agent-status{font-size:9px;color:#8c97a6;max-width:90px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stage{position:absolute;inset:0;overflow:hidden;touch-action:none;outline:none}.stage[data-tool=pan]{cursor:grab}.stage.panning{cursor:grabbing}.stage[data-tool=line],.stage[data-tool=polygon],.stage[data-tool=count],.stage[data-tool=calibrate]{cursor:crosshair}.paper{position:absolute;left:0;top:0;transform-origin:0 0;background:white;box-shadow:0 6px 24px #13203312,0 1px 3px #1320330c;user-select:none}.paper>img{display:block;width:100%;height:100%;pointer-events:none}.paper>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.shape{pointer-events:all;cursor:pointer}.shape-label{font:10px -apple-system,BlinkMacSystemFont,sans-serif;font-weight:600;paint-order:stroke;stroke:white;stroke-width:3px;stroke-linejoin:round;pointer-events:none}.handle{fill:white;stroke:var(--blue);pointer-events:all;cursor:move}.toolbar{position:absolute;top:83px;left:18px;z-index:7;display:flex;flex-direction:column;gap:3px;background:#fff;padding:5px;border:1px solid #dce2eb;border-radius:10px;box-shadow:0 4px 12px #1320330b}.tool{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;color:#8190a4}.tool svg{width:19px;height:19px}.tool:hover{background:#f0f3f8;color:var(--navy)}.tool.active{background:var(--navy);color:white}.toolbar-rule{height:1px;background:var(--border);margin:4px 5px}.follow-banner{position:absolute;top:66px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;background:var(--actor);color:#fff;border-radius:5px;font-size:10px;padding:5px 7px 5px 11px;z-index:8;white-space:nowrap}.follow-banner button{color:#fff;font-size:16px;line-height:16px;padding:0 3px}.canvas-bottom{position:absolute;bottom:16px;left:18px;right:18px;display:flex;justify-content:space-between;align-items:center;pointer-events:none;z-index:5}.scale-status{font:9px ui-monospace,SFMono-Regular,Menlo,monospace;color:#8593a6;pointer-events:auto;cursor:pointer;background:#edf0f5da;padding:7px 0}.zoom{display:flex;align-items:center;border:1px solid #dde3ec;border-radius:7px;background:#fff;box-shadow:0 2px 4px #13203304;height:30px;pointer-events:auto}.zoom button{height:28px;min-width:25px;padding:0 7px;font-size:14px;color:#778397;display:flex;align-items:center;justify-content:center}.zoom #zoom-label{font:10px ui-monospace,SFMono-Regular,Menlo,monospace;min-width:46px}.zoom span{height:13px;width:1px;background:var(--border)}.zoom svg{width:13px;height:13px}.composer-wrap{position:absolute;bottom:58px;left:50%;transform:translateX(-50%);width:min(520px,calc(100% - 140px));z-index:8}.composer{display:flex;align-items:center;gap:10px;padding:9px 10px 9px 15px;background:#fff;border:1px solid #d6dfea;border-radius:12px;box-shadow:0 6px 22px #1320330d,0 1px 3px #13203305;min-height:52px}.composer:focus-within{border-color:#c98a70;box-shadow:0 0 0 3px #b9471f0b,0 6px 22px #1320330d}.agent-mark{color:var(--navy);width:18px;height:18px;stroke-width:1.5}.composer textarea{flex:1;min-width:0;resize:none;border:0;outline:0;line-height:20px;color:var(--navy);font-size:12px;padding:3px 0;max-height:90px;background:transparent;box-shadow:none}.composer textarea::placeholder{color:#94a0b0}.run-button,.stop-button{height:30px;width:30px;background:var(--navy);color:#fff;border-radius:7px;display:flex;align-items:center;justify-content:center}.run-button svg{height:18px;width:18px}.stop-button svg{width:17px;height:17px;fill:currentColor;stroke:none}.activity{padding:8px 11px;display:flex;flex-direction:column;gap:4px;font-size:10px;max-height:100px;overflow:auto;background:#ffffffed;border:1px solid #dfe5ee;border-radius:8px 8px 0 0;margin:0 10px -3px;line-height:16px;color:#738197}.activity summary{cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.activity details>div{padding-top:7px;white-space:pre-wrap}.activity strong{color:#394b66;font-weight:550}.run-error{color:#a04148;background:#fff3f2;border:1px solid #efcecf;padding:9px 12px;font-size:10px;border-radius:7px;margin-top:7px;max-height:70px;overflow:auto}.measurements{background:white;border-left:1px solid var(--border);display:flex;flex-direction:column;min-height:0;position:relative;z-index:10}.panel-header{height:62px;display:flex;align-items:center;padding:0 17px;gap:7px}.panel-header h1{margin:0;font-size:12px;font-weight:650;letter-spacing:-.1px}.panel-header>span{font:9px ui-monospace,SFMono-Regular,Menlo,monospace;color:#9ca7b6}.panel-header .icon-button{margin-left:auto;width:23px;height:23px}.panel-header .icon-button svg{width:14px;height:14px}.panel-tabs{display:flex;gap:17px;padding:0 17px;border-bottom:1px solid var(--border)}.panel-tabs button{font-size:10px;color:#94a0b0;padding:0 0 12px;border-bottom:2px solid transparent}.panel-tabs button.active{color:var(--navy);border-bottom-color:var(--navy);font-weight:600}#measurement-list{overflow:auto;flex:1;padding-bottom:12px;scrollbar-width:thin}.measure-empty{padding:30px 20px;color:#a0aaba;text-align:center;font-size:11px;line-height:18px}.measure-row{width:100%;display:grid;grid-template-columns:6px 1fr auto;gap:9px;padding:15px 17px;text-align:left;border-bottom:1px solid #eef1f6;align-items:center}.measure-row:hover{background:#fafbfe}.measure-row.selected{background:#eff4fe}.measure-swatch{width:5px;height:22px;border-radius:3px;background:var(--actor)}.measure-label{font-size:11px;color:#344760;font-weight:530;line-height:16px;display:block}.measure-meta{font-size:9px;color:#9aa5b3;display:block;margin-top:4px;line-height:13px}.measure-value{font:11px ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:550;white-space:nowrap}.measure-unit{font-size:9px;color:#9aa5b3;font-weight:400;display:block;text-align:right;margin-top:5px}.measure-check{color:var(--teal)}.panel-footer{padding:13px 17px;border-top:1px solid var(--border);font-size:9px;color:#9aa5b3;display:flex;justify-content:space-between}.panel-footer>span:first-child{color:#79879b}#selection-detail{padding:16px 17px;border-top:1px solid var(--border);background:#fbfcfe;max-height:40%;overflow:auto}.detail-title{font-size:11px;font-weight:600;margin-bottom:10px}.detail-source{font-size:10px;line-height:16px;color:#8995a6;margin-bottom:13px;white-space:pre-wrap;overflow-wrap:anywhere}.detail-actions{display:flex;gap:6px}.detail-actions button{font-size:10px;padding:7px 9px;border:1px solid #dfe5ee;border-radius:5px;background:#fff}.detail-actions .accept{background:var(--navy);color:white;border-color:var(--navy)}.detail-actions .delete{margin-left:auto;color:#aa5960}.empty-canvas{position:absolute;top:45%;width:100%;text-align:center;color:#8e9caf;font-size:13px}#toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);max-width:min(560px,90vw);background:var(--navy);color:white;padding:11px 18px;border-radius:7px;font-size:12px;box-shadow:0 5px 20px #13203320;z-index:100}dialog{border:1px solid #dfe4ed;border-radius:12px;width:340px;max-width:90vw;box-shadow:0 15px 80px #13203325;padding:25px;color:var(--navy)}dialog::backdrop{background:#13203328;backdrop-filter:blur(2px)}dialog h2{font-size:16px;letter-spacing:-.3px;margin:0 0 22px}dialog label{font-size:11px;color:#8190a4;display:block}dialog input{display:block;width:100%;border:1px solid #dce3ee;border-radius:6px;padding:10px;margin-top:7px;color:var(--navy);font-size:13px}.dialog-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:23px}.dialog-buttons button{padding:8px 14px;border-radius:6px;background:#edf0f5;font-size:11px}.dialog-buttons .primary{background:var(--navy);color:white}@media(max-width:1100px){:root{--panel:240px;--rail:92px}.header{gap:11px}.document-select select{max-width:280px}.page-thumb>div{height:49px}.canvas-top{left:18px}.agents{max-width:60%}.agent-status{display:none}.composer-wrap{width:calc(100% - 105px);left:calc(50% + 12px)}}@media(max-width:820px){:root{--rail:80px;--panel:225px}.measurements{position:absolute;right:0;top:54px;bottom:0;width:225px;box-shadow:-5px 0 20px #13203309}.workspace{grid-template-columns:var(--rail) minmax(0,1fr)}.document-select select{max-width:200px}.connection>span:last-child,.header-rule,.poc{display:none}.header{padding:0 12px;gap:9px}.canvas-top{right:12px}.sheet-title>span:first-child{max-width:150px}.agent-chip{padding-right:6px}.agent-name{max-width:65px;text-overflow:ellipsis;overflow:hidden}.page-thumb{padding:10px}.page-thumb>div{height:42px}.rail-heading{padding:18px 10px 12px;font-size:8px}.composer-wrap{width:calc(100% - 94px)}.canvas-bottom{right:12px}.toolbar{left:12px}}@media(max-width:550px){:root{--rail:60px}.header{height:50px}.brand>span:not(.poc){font-size:20px}.brand>svg{width:19px}.document-select select{max-width:145px;font-size:10px}.document-select>svg,.avatar,.connection{display:none}.workspace{height:calc(100dvh - 50px)}.measurements{top:50px}.rail-heading{font-size:7px;padding:15px 6px 8px;letter-spacing:.7px}.page-thumb{padding:9px 6px}.page-thumb>div{height:34px}.page-label{font-size:8px!important}.sheet-title{display:none}.canvas-top{top:15px}.agents{max-width:100%;gap:3px}.agent-name{max-width:50px;font-size:9px}.agent-dot{width:18px;height:18px}.toolbar{top:67px}.composer-wrap{width:calc(100% - 28px);left:50%;bottom:61px}.composer{padding-left:11px;gap:7px}.composer textarea{font-size:11px}.scale-status{font-size:8px;max-width:120px}.canvas-bottom{left:12px}.tool{width:28px;height:29px}.toolbar{padding:4px}.toolbar-rule{margin:3px 5px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}


dialog select{display:block;width:100%;border:1px solid #dce3ee;border-radius:6px;padding:10px;margin:7px 0 17px;color:var(--navy);font-size:12px;background:white}.detail-calibration-error{font-size:10px;line-height:16px;color:#a04148;margin-bottom:12px}
#stage:not([data-tool="select"]) #shapes *,#draft *,#cursors *{pointer-events:none}

.coverage-panel{border-bottom:1px solid var(--border);flex-shrink:0;font-size:11px}.coverage-panel summary{cursor:pointer;padding:13px 17px;font-weight:600}.coverage-panel[open] summary{padding-bottom:8px}#coverage-list{max-height:205px;overflow:auto;padding:0 8px 7px}.coverage-row{display:flex;align-items:baseline;gap:12px;justify-content:space-between;width:100%;padding:7px 9px;text-align:left;font-size:10px;border-radius:5px}.coverage-row:hover{background:#edf0f5}.coverage-row span{line-height:1.4}.coverage-row small{white-space:nowrap;font-size:9px;color:#8a6d39}.coverage-row .coverage-repair{color:#ad515d}.coverage-row .coverage-measured{color:#b9471f}.coverage-row .coverage-excluded{color:#8290a2}

.follow-banner select{font:inherit;color:inherit;background:transparent;border:1px solid #ffffff70;border-radius:4px;padding:3px 4px;margin-left:8px;cursor:pointer}.follow-banner select option{color:#132033;background:white}
.measurement-group{border-bottom:1px solid var(--border)}.measurement-group>summary{display:flex;align-items:center;gap:8px;padding:14px 16px 5px;cursor:pointer;font-size:10px;font-weight:650;color:#44566e;list-style:none}.measurement-group>summary:before{content:'▸';font-size:10px;color:#8a96a7}.measurement-group[open]>summary:before{content:'▾'}.measurement-group>summary>span:first-of-type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-count{margin-left:auto;color:#8994a4;font:10px ui-monospace,monospace}.group-progress{font-size:9px;color:#8a96a7;padding:0 16px 9px 30px}.measurement-group:not([open])>summary{padding-bottom:14px}

/* Deduction relationships share a warm minus mark on canvas and in the ledger. */
.deduction-badge{color:#B5533D;font-weight:600}.detail-actions{flex-wrap:wrap}
.area-breakdown{padding:8px 17px 12px}.area-line{display:flex;justify-content:space-between;gap:12px;width:100%;text-align:left;padding:7px 0;font-size:10px;line-height:15px}.area-line>span:first-child{min-width:0;overflow-wrap:anywhere}.area-line>span:last-child{flex-shrink:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-variant-numeric:tabular-nums}.deduction-line{color:#B5533D}.area-line[data-id]:hover{background:#fff6f2}.net-line{border-top:1px solid var(--border);font-weight:650;color:var(--navy);margin-top:6px;padding-top:10px}.area-source{padding:0 17px 12px;color:#8995a6;font-size:10px}.area-source summary{cursor:pointer}.area-source .detail-source{margin-top:8px}.area-stale{padding:12px 17px}.deduct-boundary{font-size:11px;line-height:17px;margin-bottom:18px;color:#344760;overflow-wrap:anywhere}#deduct-dialog{width:430px}#deduct-dialog fieldset{border:0;margin:20px 0 0;padding:0}#deduct-dialog legend{font-size:11px;color:#8190a4;margin-bottom:9px}#deduct-options{max-height:220px;overflow:auto}.deduct-option{display:flex;gap:9px;align-items:center;padding:10px 0;border-bottom:1px solid #eef1f6;color:#344760}.deduct-option input{width:15px;height:15px;margin:0;flex-shrink:0}.deduct-option>span:first-of-type{flex:1;overflow-wrap:anywhere}.deduct-option>span:last-child{white-space:nowrap;font:10px ui-monospace,SFMono-Regular,Menlo,monospace}#deduct-error{font-size:11px;color:#B5533D;margin-top:12px}
.measurement-controls{padding:12px 16px;border-bottom:1px solid var(--border)}
.measurement-controls input{width:100%;border:1px solid var(--border);border-radius:5px;padding:8px;font-size:11px;color:var(--navy);background:#fbfcfe}
.measurement-controls>div{display:flex;justify-content:space-between;gap:8px;margin-top:9px}
.measurement-controls select,.measurement-controls button{font-size:10px;color:#718199;background:white;border:0;padding:3px 0}
.show-more{width:100%;padding:12px;color:var(--blue);font-size:11px}
#notes-list{max-height:170px;overflow:auto;padding:0 8px 8px}.note-row{width:100%;text-align:left;display:block;padding:9px;font-size:11px;line-height:16px;border-bottom:1px solid var(--border)}.note-row span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.note-row small{display:block;color:#8593a6;font-size:9px;margin-top:3px}
.feedback-context{display:flex;align-items:center;justify-content:space-between;background:#fff8ea;border:1px solid #e8d6b1;border-radius:8px;padding:6px 10px;margin:0 10px 6px;font-size:11px;color:#826022}.feedback-context button:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.feedback-context button:last-child{padding:3px 6px;font-size:16px}
#annotation-dialog textarea{display:block;width:100%;resize:vertical;min-height:90px;margin-top:7px;border:1px solid var(--border);border-radius:6px;padding:10px;color:var(--navy);font:inherit;font-size:12px;line-height:18px}
.stage[data-tool=annotate]{cursor:crosshair}.annotation-pin{pointer-events:all;cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.edit-history,.edit-status{font-size:10px;color:#687c95;margin:0 0 12px}.edit-history summary{cursor:pointer}.edit-history-row{display:flex;flex-direction:column;gap:4px;padding:9px 0;border-bottom:1px solid var(--border)}.edit-history-row small{color:#8c97a6}

/* Scope colours link the quantity list and the drawing. */
#shapes > g[data-shape]{transition:opacity 100ms linear}
#shapes > g.scope-highlight .shape{stroke-width:2.5px;vector-effect:non-scaling-stroke}
.measure-row.scope-highlight{background:#e9f0f8;box-shadow:inset 3px 0 var(--actor)}
.boq-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;width:100%;padding:13px 16px;border:0;border-bottom:1px solid #e5e9ef;background:white;text-align:left;color:#132033;cursor:pointer}
.boq-row:hover,.boq-row:focus-visible{background:#eef3f9}.boq-label{font-size:11px;line-height:1.5;max-width:165px}.boq-label i{display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:2px}.boq-row strong{font-size:23px;font-weight:600;text-align:right;font-family:var(--leva-font-data);font-variant-numeric:tabular-nums}.boq-row small{display:block;font-size:10px;font-weight:400;color:#69788a;margin-top:4px}
#boq-panel{flex-shrink:0}.layer-control{display:flex;gap:8px;align-items:flex-end;margin:12px 0}.layer-control label{font-size:10px;flex:1;min-width:0}.layer-control input{display:block;width:100%;box-sizing:border-box;margin-top:4px;border:1px solid #dce2e9;padding:6px;border-radius:4px;font-size:11px}.layer-control button{padding:6px;border:1px solid #dce2e9;border-radius:4px;background:white}.report-link{font-size:12px;text-decoration:none;color:#132033;padding:8px}#evidence-dialog{max-width:520px}#evidence-quote{border-left:3px solid #b67b28;padding-left:12px;margin:16px 0;white-space:pre-wrap}#evidence-use{font-size:13px;line-height:1.6}
@media(prefers-reduced-motion:reduce){#shapes > g[data-shape]{transition:none}}

#shapes > g.scope-highlight .shape{stroke:var(--scope-color)}

.boq-section h2{margin:0;padding:10px 16px;background:#f3f6fa;color:#52647a;font-size:10px;font-weight:600;letter-spacing:.3px}
.boq-item{border-bottom:1px solid #e5e9ef}.boq-item .boq-row{border-bottom:0}.boq-basis{padding:0 16px 10px;font-size:11px;color:#52647a}.boq-basis>summary{padding:2px 0;font-size:10px;cursor:pointer}.boq-basis p{line-height:1.5;overflow-wrap:anywhere}.boq-item .boq-row strong{font-size:19px}#geometry-panel{flex-shrink:0}

.takeoff-sections{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}.takeoff-sections #measurement-list{overflow:visible;flex:none}

#shapes .shape-label{display:none}#shapes .label-visible .shape-label{display:block}.team-history{position:relative;font-size:10px;background:#fff;border:1px solid var(--border);border-radius:6px;padding:8px}.team-history summary{cursor:pointer}.team-history>div{position:absolute;right:0;top:100%;display:grid;gap:6px;background:#fff;padding:10px;border:1px solid var(--border);min-width:190px;z-index:20}.team-history .agent-name{max-width:110px}.agent-chip .agent-name{max-width:110px}

.quantity-selected>.boq-row{background:#edf2f8;box-shadow:inset 3px 0 #b9471f}

.brand img{display:block;width:111px;height:30px}.composer button[type=submit],.dialog-buttons .primary{background:#b9471f}.header{color:#152a45}

.auto-follow{pointer-events:auto;border:1px solid #d9deea;border-radius:16px;padding:6px 10px;background:white;color:#536075;font-size:11px;white-space:nowrap}.auto-follow[aria-pressed=true]{background:#fff0eb;color:#b9471f;border-color:#ffd3c2}.activity-inset{position:absolute;right:20px;bottom:150px;width:320px;max-width:35%;padding:0;overflow:hidden;background:white;border:1px solid #d7deec;border-radius:10px;box-shadow:0 8px 30px #172c6526;z-index:8;text-align:left;cursor:pointer}.activity-inset[hidden]{display:none}.activity-inset>span{display:block;padding:9px 12px;font-size:11px;color:#536075;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-inset svg{display:block;width:100%;height:210px;background:#f5f7fb}.activity-inset .shape-label{display:none}@media(max-width:800px){.activity-inset{width:220px;bottom:160px;right:10px;max-width:40%}.activity-inset svg{height:140px}}

/* A brief overlay only; never reserves space or changes the main camera. */
.activity-inset{width:230px;max-width:28%;right:18px;bottom:120px;border-radius:8px}.activity-inset>span{font-size:10px;padding:7px 9px}.activity-inset svg{height:145px}@media(max-width:800px){.activity-inset{width:180px;max-width:32%;right:10px;bottom:140px}.activity-inset svg{height:110px}}

#drawing-upload { position: relative; display: flex; align-items: center; gap: 8px; font-size: 12px; }
#drawing-upload label, #drawing-upload button { border: 1px solid #d9deeb; border-radius: 6px; padding: 7px 10px; background: #fff; color: #152a45; cursor: pointer; white-space: nowrap; }
#drawing-upload input[type=file] { width: 190px; font-size: 11px; }
#drawing-upload .upload-limit { color: #667085; white-space: nowrap; }
#drawing-upload .upload-entry { display: flex; align-items: center; gap: 6px; }
#drawing-upload progress { width: 50px; }
#drawing-upload [role=alert] { color: #a62b36; max-width: 240px; }
#paper[hidden] { display: none; }
@media (max-width: 1100px) { #drawing-upload .upload-limit, #drawing-upload .upload-entry > span:first-child { display: none; } }

.project-page { max-width: 760px; width: 100%; margin: 48px auto; padding: 24px; overflow: auto; }
.project-page h1 { font-size: 28px; margin-bottom: 32px; }
.project-create { display: flex; align-items: end; gap: 16px; margin-bottom: 32px; }
.project-create label { display: block; margin-bottom: 8px; }
.project-create input { display: block; padding: 12px; border: 1px solid #cbd2de; border-radius: 6px; min-width: 300px; }
.project-create-button { padding: 13px 20px; background: #152a45; color: white; border-radius: 6px; }
.project-card { display: block; padding: 22px 0; border-bottom: 1px solid #dce1e8; color: #152a45; font-size: 18px; }
#project-select { display: flex; align-items: center; gap: 12px; font-size: 13px; }
#project-select select { max-width: 180px; padding: 8px; border: 1px solid #dce1e8; border-radius: 6px; }

.measurement-dialog { margin: auto; padding: 24px; width: min(360px, 90vw); border: 1px solid #dce2ed; border-radius: 12px; color: #152a45; background: #fff; box-shadow: 0 16px 48px #10204030; }
.measurement-dialog::backdrop { background: #10204055; }
.measurement-dialog h2 { font-size: 18px; margin: 0 0 20px; }
.measurement-dialog label { display: block; font-size: 13px; margin-bottom: 8px; }
.measurement-dialog input { box-sizing: border-box; width: 100%; border: 1px solid #aab7cc; border-radius: 6px; padding: 10px; font: inherit; }
.measurement-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.measurement-actions button { padding: 8px 16px; border: 1px solid #dce2ed; border-radius: 6px; background: white; cursor: pointer; }
.measurement-actions button[type="submit"] { background: #152a45; color: white; border-color: #152a45; }

/* Supplier identity and navigation */
#sign-in { flex-direction: column; align-items: stretch; max-width: 420px; }
#sign-in input { min-width: 0; width: 100%; }
#sign-in button { align-self: flex-start; }
.project-page nav { display: flex; align-items: center; gap: 12px; }
.project-page a { text-decoration: none; }
.project-page .project-card { width: 100%; text-align: left; }
#members .project-card, #grants .project-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#members button { border: 1px solid #dce1e8; border-radius: 6px; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.header a { flex-shrink: 0; white-space: nowrap; text-decoration: none; color: #33435a; }
.header:has(#project-select) { gap: 10px; }
.header:has(#project-select) #drawing-upload input[type=file] { width: 1px; height: 1px; position: absolute; opacity: 0; }
.header:has(#project-select) .document-select select { max-width: 140px; }
.header:has(#project-select) #project-select { gap: 8px; }
.header:has(#project-select) #project-select select { max-width: 160px; }
@media (max-width: 820px) {
  .header:has(#project-select) { height: auto; min-height: 54px; flex-wrap: wrap; padding-block: 8px; }
  #members .project-card { align-items: flex-start; flex-direction: column; }
}

#empty-schedules { display: none; color: #657086; padding: 24px 0; }
#empty-schedules:only-child { display: block; }
#schedule-jobs { margin-top: 24px; }
#schedule-jobs .project-card { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
#schedule-jobs [data-status] { font-size: 13px; padding: 5px 10px; border-radius: 20px; background: #e4e9f2; }
#schedule-jobs [data-status="complete"] { background: #dceee5; color: #17633d; }
#schedule-jobs [data-status="failed"] { background: #f8e2dd; color: #9e362b; }
#schedule-jobs a, #schedule-jobs button, #new-schedule { font-size: 14px; text-decoration: underline; cursor: pointer; }
#schedule-jobs p { width: 100%; font-size: 14px; }
.boq-row small.review-status{font-weight:550;color:#2f6d5e}.boq-row small.review-status[data-review="Needs review"],.boq-row small.review-status[data-review=Unresolved],.boq-row small.review-status[data-review=Incomplete]{color:#895216}.boq-row small.review-note{margin-top:2px;overflow-wrap:anywhere}
/* Project overview (ADR 010): results first, the canvas only for exceptions. */
.project-overview .project-card, #projects .project-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.project-overview .project-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.project-overview h2 { margin-top: 36px; }
.project-overview textarea { display: block; width: 100%; min-width: 300px; padding: 12px; border: 1px solid #cbd2de; border-radius: 6px; }
.project-overview .project-create { align-items: stretch; flex-direction: column; }
.project-overview .project-create-button { align-self: flex-start; }
.overview-status { font-size: 16px; }
.overview-status button { margin-left: 12px; padding: 6px 12px; border: 1px solid #cbd2de; border-radius: 6px; }
.overview-hint { color: var(--muted); font-size: 14px; }
.overview-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.overview-table td { padding: 12px 8px 12px 0; border-bottom: 1px solid #dce1e8; }
.overview-table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.review-badge { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.review-badge.validated { background: #e6f4f1; color: var(--teal); }
.review-badge.accepted { background: #fff0eb; color: #b9471f; }
.review-badge.needs-review { background: #fff1e0; color: #9a5300; font-weight: 600; }
.project-run-status { color: var(--muted); font-size: 13px; }
/* Form errors, and the allowance used up (ADR 022). */
.form-error { color: #a04148; font-size: 14px; margin: -8px 0 0; }
.allowance-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 20px; margin-bottom: 20px; background: #fff0eb; border-radius: 8px; font-size: 16px; }
.privacy li { margin-bottom: 8px; line-height: 1.5; }
/* First-run hub (ADR 013): one card that follows the project. */
.overview-nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.hub-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; margin: 8px 0 24px; box-shadow: 0 2px 10px #13203308; }
.hub-card strong { font-size: 18px; }
.hub-lead { font-size: 17px; line-height: 1.5; margin: 0 0 18px; color: #33435a; }
.hub-row { display: flex; gap: 14px; align-items: flex-start; }
.hub-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.pulse { width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--leva-accent); flex-shrink: 0; animation: leva-pulse 1.4s ease-out infinite; }
@keyframes leva-pulse { 0% { box-shadow: 0 0 0 0 #ff6b3566; } 100% { box-shadow: 0 0 0 12px #ff6b3500; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.plan-list { list-style: none; padding: 0; margin: 18px 0 0 26px; font-size: 15px; }
.plan-list li { padding: 6px 0; color: #4b5a70; transition: color .3s; }
.plan-list li small { color: var(--muted); }
.plan-list .plan-measuring { color: var(--navy); font-weight: 600; }
.plan-list .plan-done { color: var(--teal); }
.plan-mark { display: inline-block; width: 20px; }
.hub-actions { display: flex; gap: 12px; align-items: center; margin: 20px 0 6px; }
.hub-actions .project-create-button { font-size: 15px; }
.secondary-button { padding: 12px 18px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; font-size: 14px; }
.hub-card details { margin-top: 14px; font-size: 14px; }
.hub-card details summary { cursor: pointer; color: #b9471f; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px; border: 2px dashed #b9c4d8; border-radius: 10px; background: #f8faff; cursor: pointer; text-align: center; font-size: 14px; color: #4b5a70; transition: border-color .2s, background .2s; }
.drop-zone:hover, .drop-zone.phx-drop-target-active { border-color: var(--blue); background: #fff0eb; }
.drop-zone-big { padding: 48px 24px; }
.drop-zone-big strong { font-size: 20px; color: var(--navy); }
.drop-zone .drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-entry { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 14px; }
.upload-entry progress { flex: 1; max-width: 240px; }
.overview-more { margin-top: 32px; font-size: 14px; }
.overview-more summary { cursor: pointer; color: #b9471f; margin-bottom: 12px; }
.overview-table a.review-badge { text-decoration: none; }
/* Canvas: the finish, the allowance used up, note confirmation. */
.finished-bar { position: absolute; bottom: 124px; left: 50%; transform: translateX(-50%); z-index: 9; display: flex; gap: 14px; align-items: center; background: #e6f4f1; color: var(--teal); border: 1px solid #bfe3db; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.finished-bar a { color: var(--navy); }
.allowance-composer { justify-content: space-between; font-size: 13px; }
.allowance-composer .project-create-button { padding: 9px 14px; font-size: 13px; }
.composer-notice { margin: 0 10px 6px; font-size: 11px; color: var(--teal); }
.overview-nav .nav-spacer { flex: 1; }
.allowance-composer .project-create-button, .hub-actions .project-create-button, .allowance-banner .project-create-button { text-decoration: none; }
#clarifications .project-card { font-size: 15px; line-height: 1.45; gap: 24px; }
#clarifications .project-card span:first-child { font-weight: 600; flex: 1; }
#clarifications .project-card span:last-child { flex: 1.4; color: #4b5a70; }
.setup-list { list-style: none; padding: 0; margin: 14px 0 0; }
.setup-list li { display: flex; gap: 10px; padding: 8px 0; font-size: 15px; }
.setup-list li small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.setup-list a { color: var(--leva-blue); font-weight: 600; }
.setup-list .setup-done { color: var(--teal); }
/* Paid marketing console (ADR 014): operator only, plain and legible. */
.marketing-page { max-width: 1320px; font-size: 14px; }
.marketing-page h2 { margin-top: 36px; }
.marketing-note { color: #505c6c; font-size: 13px; line-height: 1.5; }
.marketing-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 20px 0 8px; background: #dce1e8; border: 1px solid #dce1e8; border-radius: 8px; overflow: hidden; }
.marketing-summary > div { background: #fff; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.marketing-summary span { color: #505c6c; font-size: 12px; }
.marketing-summary strong { color: #152a45; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.marketing-summary > div:last-child strong { font-size: 14px; }
.marketing-sync { display: inline-block; margin-right: 14px; font-family: var(--leva-font-data); font-size: 12px; }
.marketing-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 24px 0 12px; }
.marketing-filters label, .marketing-imports label, .marketing-learning-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #505c6c; }
.marketing-page select, .marketing-page input[type=date], .marketing-page input[type=text], .marketing-page textarea { padding: 8px 10px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; color: #152a45; font-size: 13px; }
.marketing-table-wrap { overflow-x: auto; border: 1px solid #dce1e8; border-radius: 8px; background: #fff; }
.marketing-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.marketing-table th { text-align: left; font-size: 11px; font-weight: 600; color: #505c6c; padding: 10px 10px; border-bottom: 1px solid #dce1e8; background: #f7fafc; white-space: nowrap; }
.marketing-table td { padding: 10px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.marketing-table tr:last-child td { border-bottom: 0; }
.marketing-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.marketing-table small { display: block; color: #505c6c; font-size: 12px; margin-top: 3px; max-width: 320px; }
.marketing-id { font-family: var(--leva-font-data); font-size: 12px; white-space: nowrap; color: #152a45; }
.marketing-unknown { color: #9a5300 !important; }
.marketing-status, .marketing-verdict { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #eef1f6; color: #505c6c; }
.status-live { background: #e6f4f1; color: #0e7c7b; }
.status-paused { background: #fff1e0; color: #9a5300; }
.status-killed { background: #fbe4ea; color: #9b2c2c; }
.verdict-kill { background: #c53030; color: #fff; }
.verdict-scale { background: #0e7c7b; color: #fff; }
.verdict-keep { background: #fff0eb; color: #b9471f; }
.marketing-sources h2 { margin: 28px 0 10px; font-size: 16px; }
.marketing-source-state { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #eef1f6; color: #505c6c; }
.marketing-source-state.source-ok { background: #e3f4f1; color: #0b6b6a; }
.marketing-source-state.source-running { background: #fff0eb; color: #b9471f; }
.marketing-source-state.source-error { background: #fde8ee; color: #9b2c2c; }
.marketing-source-state.source-pending { background: #fff3e0; color: #9a5300; }
.marketing-sources button { padding: 5px 10px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; font-size: 12px; white-space: nowrap; }
.marketing-sources button:hover { border-color: #ff6b35; }
.marketing-actions { white-space: nowrap; }
.marketing-actions button { padding: 5px 10px; margin: 0 4px 4px 0; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; font-size: 12px; }
.marketing-actions button:hover { border-color: #ff6b35; }
.marketing-actions button.danger { color: #9b2c2c; border-color: #efc2cf; }
.marketing-kill { display: flex; gap: 6px; align-items: center; }
.marketing-kill input { min-width: 240px; }
.marketing-kill button[type=submit] { background: #c53030; color: #fff; border-color: #c53030; }
.marketing-imports { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.marketing-imports form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.marketing-imports .project-create-button, .marketing-learning-form .project-create-button { padding: 9px 16px; }
.marketing-learning-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 16px; }
.marketing-learning-form textarea { flex: 1 1 420px; min-height: 44px; resize: vertical; font-family: inherit; }
.marketing-learnings { list-style: none; padding: 0; margin: 0; }
.marketing-learnings li { padding: 12px 0; border-bottom: 1px solid #eef1f6; line-height: 1.5; }
.marketing-learnings span { color: #505c6c; font-size: 12px; margin-right: 10px; }
.marketing-learnings strong { font-family: var(--leva-font-data); font-size: 12px; margin-right: 8px; }
/* Operator console (/admin): navigation and the KPI dashboard (Joyne.Operator.Kpis). Numbers first. */
.admin-page { max-width: 1240px; font-size: 14px; color: var(--leva-text); }
.project-page .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 28px; padding-bottom: 12px; border-bottom: 1px solid #dce1e8; }
.admin-nav-link { padding: 7px 12px; border-radius: 6px; color: #505c6c; font-weight: 550; font-size: 14px; }
.admin-nav-link:hover { background: #eef1f6; color: var(--leva-navy); }
.admin-nav-link.active { background: var(--leva-navy); color: #fff; }
.admin-nav-end { margin-left: auto; }
.kpi-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-page .kpi-header h1 { margin: 0 0 6px; }
.kpi-lede { margin: 0; color: #505c6c; font-size: 14px; line-height: 1.5; max-width: 620px; }
.kpi-refresh { padding: 8px 12px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; font-size: 13px; color: #505c6c; font-variant-numeric: tabular-nums; }
.kpi-refresh:hover { border-color: var(--leva-blue); color: var(--leva-navy); }
.kpi-section { margin-top: 32px; }
.kpi-section h2 { margin: 0 0 12px; font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #505c6c; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kpi-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px 12px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
#kpis-north-star .kpi-grid { grid-template-columns: minmax(0, 1fr); }
#kpis-north-star .kpi-card { border-color: var(--leva-navy); border-width: 2px; }
.kpi-name { margin: 0; font-size: 14px; font-weight: 600; color: var(--leva-navy); line-height: 1.35; }
.kpi-value { display: flex; align-items: baseline; gap: 8px; }
.kpi-value strong { font-size: 30px; line-height: 1.1; font-weight: 650; color: var(--leva-navy); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-period { font-size: 12px; color: #505c6c; }
.kpi-compare { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 0; font-size: 13px; color: #505c6c; font-variant-numeric: tabular-nums; }
.kpi-note { margin: 0; font-size: 12px; color: #9a5300; line-height: 1.4; }
.kpi-freshness { display: inline-block; margin-right: 12px; font-family: var(--leva-font-data); font-size: 12px; }
.kpi-delta { font-weight: 600; white-space: nowrap; }
.kpi-good { color: #0b6b6a; }
.kpi-bad { color: #9b2c2c; }
.kpi-flat { color: #505c6c; }
.project-page svg.kpi-spark { display: block; width: 100%; height: auto; max-height: 64px; margin: 4px 0 2px; overflow: visible; stroke-width: 1; }
.kpi-spark-base { stroke: #dce1e8; stroke-width: 1; vector-effect: non-scaling-stroke; }
.kpi-spark-line { fill: none; stroke: var(--leva-blue); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.kpi-spark-dot { fill: var(--leva-blue); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.kpi-spark-now { fill: var(--leva-navy); }
.kpi-spark-hit { fill: transparent; stroke: none; cursor: default; }
.kpi-spark-empty { fill: #7b8797; font-size: 11px; text-anchor: middle; stroke: none; }
.kpi-definition { font-size: 13px; color: #505c6c; }
.kpi-definition summary { cursor: pointer; font-size: 12px; color: #b9471f; font-weight: 550; padding: 4px 0; }
.kpi-definition p { margin: 6px 0 8px; line-height: 1.5; }
.kpi-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.kpi-table th, .kpi-table td { padding: 3px 0; text-align: left; border-bottom: 1px solid #eef1f6; }
.kpi-table th:last-child, .kpi-table td:last-child { text-align: right; }
/* Business overview (ADR 016): numbers first, tables where platforms compare. */
.overview-title { margin: 36px 0 0; font-size: 20px; font-weight: 650; color: var(--leva-navy); }
.overview + .overview-title { padding-top: 24px; border-top: 1px solid #dce1e8; }
.overview-panel { margin-top: 14px; padding: 14px 16px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
.overview-panel > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #b9471f; }
.overview-panel .kpi-lede { margin-top: 10px; font-size: 12px; max-width: none; }
.overview-panel .marketing-table-wrap { border: 0; border-radius: 0; }
.overview-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.overview-panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--leva-navy); }
.overview-toggle { display: inline-flex; border: 1px solid #cbd2de; border-radius: 6px; overflow: hidden; }
.overview-toggle button { padding: 5px 12px; border: 0; background: #fff; font-size: 12px; color: #505c6c; cursor: pointer; }
.overview-toggle button + button { border-left: 1px solid #cbd2de; }
.overview-toggle button.active { background: var(--leva-navy); color: #fff; }
.overview-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.overview-table th { text-align: left; font-size: 11px; font-weight: 600; color: #505c6c; padding: 8px; border-bottom: 1px solid #dce1e8; white-space: nowrap; }
.overview-table td { padding: 8px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.overview-table .num { text-align: right; white-space: nowrap; }
.overview-table small { display: block; font-size: 11px; color: #505c6c; }
.overview-total td { font-weight: 650; border-top: 1px solid #dce1e8; border-bottom: 0; }
.overview-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 12px; align-items: end; margin-top: 12px; }
.overview-form .fieldset { margin: 0; }
.overview-form .label { font-size: 12px; color: #505c6c; }
.overview-form input, .overview-form select { width: 100%; padding: 7px 9px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; font-size: 13px; }
.overview-form button { margin-bottom: 8px; }
.overview-link { border: 0; background: none; padding: 0; color: #9b2c2c; font-size: 12px; cursor: pointer; }
.overview-sources { list-style: none; margin: 8px 0 0; padding: 0; font-family: var(--leva-font-data); font-size: 12px; color: #505c6c; }
.overview-sources li { padding: 2px 0; }
.kpi-unmeasured { background: #f7f8fb; border-style: dashed; }
.kpi-missing { margin: 2px 0 0; font-size: 16px; font-weight: 650; color: #505c6c; }
.kpi-reason { margin: 0; font-size: 13px; line-height: 1.5; color: #505c6c; }
@media (max-width: 600px) {
  .project-page.admin-page { margin: 16px auto; padding: 16px; }
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-value strong { font-size: 26px; }
  .admin-nav-end { margin-left: 0; }
}
/* Signed-out pages (JoyneWeb.AuthComponents): the product at work beside the form. Unlike the canvas, these pages scroll. */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); background: #fff; color: var(--leva-text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
:where(.auth) p { margin: 0; }
.auth svg { width: 20px; height: 20px; stroke-width: 2; }
.auth a { color: #b9471f; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.auth a:hover { color: var(--leva-navy); }
.auth :focus-visible { outline: 3px solid var(--leva-blue); outline-offset: 3px; }
.auth-brand { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; gap: 44px; padding: 64px clamp(32px, 5vw, 88px); color: #fff; background: radial-gradient(90% 60% at 0% 0%, #2a4b78 0%, transparent 70%), radial-gradient(70% 60% at 100% 100%, rgba(255, 107, 53, .38) 0%, transparent 70%), var(--leva-navy); overflow: hidden; }
.auth-brand::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 138, 95, .16) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(160deg, #000 10%, transparent 75%); mask-image: linear-gradient(160deg, #000 10%, transparent 75%); }
.auth-brand :focus-visible { outline-color: var(--leva-soft-blue); }
.auth-brand-copy { max-width: 640px; }
.auth-headline { font-size: clamp(32px, 3.3vw, 48px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; text-wrap: balance; }
.auth-proof { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 18px; color: #ffd3c2; }
.auth-proof svg { color: var(--leva-soft-blue); }
.auth-loop { position: relative; margin: 0; max-width: 760px; }
.auth-loop video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: #eef1fa; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 138, 95, .28); }
.auth-loop figcaption { margin-top: 14px; font-size: 13px; color: #ffc4ad; }
.auth-loop-toggle { position: absolute; top: 12px; right: 12px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(21, 42, 69, .78); border-radius: 999px; }
.auth-loop-toggle:hover { background: var(--leva-navy); }
.auth-panel { display: flex; flex-direction: column; align-items: center; padding: 48px 32px 32px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; margin: auto 0; }
.auth a.auth-logo { display: inline-block; margin-bottom: 44px; border-radius: 4px; }
.auth-logo img { display: block; width: 111px; height: 30px; }
.auth h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; color: var(--leva-navy); }
.auth-eyebrow { margin-bottom: 10px; font-size: 14px; font-weight: 600; color: #b9471f; }
.auth-lede { margin-bottom: 28px; color: var(--leva-muted); }
.auth-lede strong { color: var(--leva-text); font-weight: 600; overflow-wrap: anywhere; }
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }
.auth-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--leva-text); }
.auth-input { position: relative; }
.auth-input input { display: block; width: 100%; height: 50px; padding: 0 14px; font-size: 16px; color: var(--leva-navy); background: #fff; border: 1px solid #7F89A6; border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.auth-input input:hover { border-color: #4A5577; }
.auth-input input:focus { outline: 2px solid transparent; border-color: #b9471f; box-shadow: 0 0 0 3px rgba(255, 107, 53, .35); }
.auth-input input[aria-invalid="true"] { border-color: #b42a2a; }
.auth-input input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(197, 48, 48, .22); }
.auth-input:has(.auth-reveal:not([hidden])) input { padding-right: 76px; }
.auth-reveal { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); height: 38px; padding: 0 12px; font-size: 14px; font-weight: 600; color: #b9471f; border-radius: 6px; }
.auth-reveal:hover { background: #fff0eb; }
.auth-submit, .auth a.auth-submit { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin-top: 6px; font-size: 16px; font-weight: 600; color: #fff; text-decoration: none; background: #b9471f; border-radius: 8px; box-shadow: 0 10px 24px -10px rgba(185, 71, 31, .7); transition: background .15s, transform .1s; }
@media (hover: hover) { .auth-submit:hover, .auth a.auth-submit:hover { color: #fff; background: var(--leva-navy); } }
.auth-submit:active { transform: translateY(1px); }
.auth-secondary { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin-top: 10px; font-size: 16px; font-weight: 600; color: var(--leva-navy); background: #fff; border: 1px solid var(--leva-rule); border-radius: 8px; cursor: pointer; }
.auth-choice { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 16px; }
#oauth-supplier { margin: 8px 0 12px; padding: 0; border: 0; }
#oauth-supplier legend { margin-bottom: 6px; font-weight: 600; }
.assistant-url { display: flex; gap: 8px; align-items: center; margin: 8px 0 20px; }
.assistant-url code { padding: 10px 12px; font-size: 15px; background: #f4f6fa; border: 1px solid #dce1e8; border-radius: 6px; word-break: break-all; }
.auth-aside { margin-bottom: 10px; font-size: 15px; color: var(--leva-muted); }
.auth-aside:empty { display: none; }
.auth-notice { margin-bottom: 20px; padding: 12px 14px; font-size: 15px; color: var(--leva-navy); background: #fff0eb; border: 1px solid #ffd3c2; border-radius: 8px; }
.auth-notice p + p { margin-top: 4px; }
.auth-notice-title { font-weight: 600; }
/* Sign-up (ADR 022): the select, consent, field errors and next steps. */
.auth-input select { display: block; width: 100%; height: 50px; padding: 0 12px; font-size: 16px; color: var(--leva-navy); background: #fff; border: 1px solid #7F89A6; border-radius: 8px; }
.auth-input select:focus { outline: 2px solid transparent; border-color: #b9471f; box-shadow: 0 0 0 3px rgba(255, 107, 53, .35); }
.auth-input select[aria-invalid="true"] { border-color: #b42a2a; }
.auth-field-error { margin: -10px 0 0; font-size: 14px; color: #b42a2a; }
.auth-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--leva-muted); }
.auth-consent input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.auth-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-steps { margin: 0 0 20px; padding-left: 20px; line-height: 1.7; color: var(--leva-text); }
.auth-notice-error { color: #8A0429; background: #FFF1F4; border-color: #F5B3C4; }
.auth-notice-error a { color: #8A0429; }
.auth-trust { display: flex; align-items: center; gap: 8px; margin-top: 28px; padding-top: 20px; font-size: 14px; color: var(--leva-muted); border-top: 1px solid var(--leva-rule); }
.auth-trust svg { width: 18px; height: 18px; color: var(--leva-evidence); }
.auth-footer { margin-top: 32px; font-size: 15px; color: var(--leva-muted); text-align: center; }
/* Drawings-first sign-up (JoyneWeb.SignupLive): the drop zone comes first. */
.signup-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 168px; margin-bottom: 14px; padding: 24px 16px; text-align: center; color: var(--leva-navy); background: #fff7f3; border: 2px dashed #ffb89c; border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.signup-drop:hover, .signup-drop.over { background: #fff0eb; border-color: #b9471f; }
.signup-drop:focus-within { outline: 3px solid var(--leva-blue); outline-offset: 3px; }
.signup-drop.has-files { min-height: 96px; }
.signup-drop svg { width: 28px; height: 28px; fill: none; stroke: #b9471f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.signup-drop-title { font-size: 17px; font-weight: 650; }
.signup-drop-hint { font-size: 14px; color: var(--leva-muted); }
.signup-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.signup-file-error { margin: 0 0 12px; }
.signup-chips { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.signup-chip { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px 8px 12px; font-size: 14px; background: #fff; border: 1px solid var(--leva-rule); border-radius: 8px; overflow: hidden; }
.signup-chip > svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: #4A5577; stroke-width: 1.8; }
.signup-chip-name { flex: 1; min-width: 0; font-weight: 600; color: var(--leva-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signup-chip-size { color: var(--leva-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.signup-chip-state { font-weight: 600; color: #1d6b2e; }
.signup-chip-error { font-weight: 600; color: #b42a2a; white-space: nowrap; }
.signup-chip.failed { border-color: #F5B3C4; background: #FFF1F4; }
.signup-chip-remove { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: #4A5577; }
.signup-chip-remove:hover { background: #fff0eb; color: var(--leva-navy); }
.signup-chip-remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.signup-chip-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #f3ebe7; }
.signup-chip-bar span { display: block; height: 100%; background: #b9471f; transition: width .2s; }
.signup-terms { margin: -6px 0 0; font-size: 13px; line-height: 1.45; color: var(--leva-muted); text-align: center; }
.auth .signup-terms a { font-weight: 500; }
.signup-link { display: block; margin: 0 auto 8px; padding: 6px 8px; font-size: 15px; font-weight: 600; color: #b9471f; text-decoration: underline; text-underline-offset: 3px; border-radius: 6px; cursor: pointer; }
.signup-link:hover { color: var(--leva-navy); }
.auth-submit:disabled { background: #9AA6C8; box-shadow: none; cursor: not-allowed; }
.signup-address { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 20px; }
.signup-pill { max-width: 100%; padding: 6px 12px; font-size: 15px; font-weight: 600; color: var(--leva-navy); background: #fff0eb; border-radius: 999px; overflow-wrap: anywhere; }
.auth a.signup-open-mail { padding: 6px 12px; font-size: 14px; text-decoration: none; border: 1px solid #ffd3c2; border-radius: 999px; }
.auth a.signup-open-mail:hover { background: #fff0eb; }
.signup-banner { margin: 0 0 14px; padding: 8px 12px; font-size: 14px; color: #6B4A00; background: #FFF6E0; border: 1px solid #F2D58F; border-radius: 8px; }
.signup-upload-input { display: none; }
.signup-code { margin: 8px 0 14px; }
.signup-code-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.signup-code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.signup-code-boxes input { width: 100%; height: 56px; padding: 0; font-size: 24px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; color: var(--leva-navy); background: #fff; border: 1px solid #7F89A6; border-radius: 8px; }
.signup-code-boxes input:focus { outline: 2px solid transparent; border-color: #b9471f; box-shadow: 0 0 0 3px rgba(255, 107, 53, .35); }
.signup-code-boxes input[aria-invalid="true"] { border-color: #b42a2a; }
.signup-code .auth-field-error { margin: 0 0 8px; }
.signup-sent-again { margin: 0; font-size: 14px; color: #1d6b2e; }
.signup-actions { display: flex; justify-content: center; gap: 12px; }
.signup-actions .signup-link { margin: 0; }
@media (max-width: 899px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-brand { gap: 0; padding: 22px 20px 24px; }
  .auth-headline { font-size: 23px; line-height: 1.15; }
  .auth-proof { margin-top: 8px; font-size: 15px; }
  .auth-proof svg { width: 18px; height: 18px; }
  .auth-loop { display: none; }
  .auth-panel { padding: 28px 20px 24px; }
  .auth-card { margin: 0; }
  .auth a.auth-logo { margin-bottom: 28px; }
  .auth h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth *, .auth *::before { transition: none !important; }
}

/* Operator reports (/admin/marketing, /admin/seo, /admin/growth; ADR 014, 016, 018): numbers first, calm, read-only. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.report-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.admin-page .report-header h1 { margin: 0 0 6px; }
.period-tabs { display: inline-flex; gap: 2px; padding: 3px; background: #e7ebf3; border-radius: 8px; }
.project-page .period-tab { padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 550; color: #505c6c; white-space: nowrap; transition: background .15s, color .15s; }
.project-page .period-tab:hover { color: var(--leva-navy); background: #fff; }
.project-page .period-tab.active { color: #fff; background: var(--leva-navy); }
.freshness { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 18px 0 0; padding: 10px 14px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; font-size: 12px; color: #505c6c; }
.freshness li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.freshness strong { color: var(--leva-navy); font-weight: 600; }
.freshness li > span:not(.freshness-dot):not(:nth-child(3))::before { content: "·"; margin-right: 8px; color: #aab2c0; }
.freshness-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #aab2c0; }
.freshness-dot.state-ok { background: #0e7c7b; }
.freshness-dot.state-error { background: #c53030; }
.freshness-dot.state-running { background: #ff6b35; }
.freshness-dot.state-pending { background: #d97706; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-top: 16px; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
.stat-name { margin: 0; font-size: 12px; font-weight: 600; color: #505c6c; }
.stat-value { font-size: 26px; line-height: 1.15; font-weight: 650; color: var(--leva-navy); font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.stat-compare { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0; font-size: 12px; color: #505c6c; font-variant-numeric: tabular-nums; }
.report-section { margin-top: 32px; }
.report-section > h2, .report-section > header > h2 { margin: 0 0 10px; font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #505c6c; }
.report-section > .kpi-lede { margin: -4px 0 10px; font-size: 13px; max-width: none; }
.report-section .kpi-lede + .marketing-table-wrap, .report-section .marketing-table-wrap + .kpi-lede { margin-top: 10px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }
.report-grid > .report-section { margin-top: 32px; min-width: 0; }
.report-empty { margin-top: 16px; padding: 18px 20px; background: #fff; border: 1px dashed #cbd2de; border-radius: 8px; color: #505c6c; font-size: 14px; line-height: 1.5; }
.report-empty code, .report-page code { font-family: var(--leva-font-data); font-size: 12px; color: var(--leva-navy); }
.chart { margin: 0; padding: 14px 16px 10px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
.chart-panel + .chart-panel { margin-top: 14px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; font-size: 12px; color: #505c6c; }
.chart-name { font-weight: 600; color: var(--leva-navy); }
.chart-stat { margin-left: auto; font-variant-numeric: tabular-nums; }
.chart-key { flex: none; width: 10px; height: 10px; border-radius: 2px; background: #ff6b35; }
.chart-key.tone-amber { background: #d97706; }
.chart-key.tone-navy { background: #152a45; }
.project-page svg.chart-svg { display: block; width: 100%; height: 96px; overflow: visible; fill: none; stroke: none; }
.chart-bar { stroke: none; fill: #ff6b35; }
.chart-bar.tone-amber { fill: #d97706; }
.chart-bar.tone-navy { fill: #152a45; }
.chart-line { fill: none; stroke: #152a45; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.tone-blue { stroke: #ff6b35; }
.chart-line.tone-amber { stroke: #d97706; }
.chart-base { stroke: #cbd2de; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-grid { stroke: #e3e7ef; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart-hit { fill: transparent; stroke: none; }
.chart-hit:hover { fill: rgba(255, 107, 53, .1); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: #7b8797; font-variant-numeric: tabular-nums; }
.chart-caption { margin-top: 8px; font-size: 12px; line-height: 1.5; color: #505c6c; }
.chart-data { margin-top: 6px; font-size: 12px; }
.chart-data summary { cursor: pointer; padding: 4px 0; color: #b9471f; font-weight: 550; }
.chart-data .marketing-table-wrap { max-height: 320px; overflow: auto; border: 0; border-radius: 0; }
.variant-thumb { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; background: linear-gradient(135deg, #fff0eb, #ffe0d3); color: #b9471f; font-family: var(--leva-font-data); font-size: 9px; font-weight: 700; }
.variants-table td { vertical-align: middle; }
.variants-table small { max-width: 300px; }
.verdict-none { background: #eef1f6; color: #505c6c; }
.overview-table .overview-bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: #ff6b35; }
.delta-good { color: #0b6b6a; font-weight: 600; }
.delta-bad { color: #9b2c2c; font-weight: 600; }
.admin-more { font-size: 13px; font-weight: 600; color: #b9471f; }
.admin-more:hover { color: var(--leva-navy); }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.exp-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
.exp-card.exp-running { border-color: #ffb89c; box-shadow: inset 3px 0 0 #ff6b35; }
.exp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.exp-channel { font-weight: 600; color: #505c6c; }
.exp-status { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; text-transform: capitalize; background: #eef1f6; color: #505c6c; }
.exp-status-running { background: #fff0eb; color: #b9471f; }
.exp-status-planned { background: #fff; color: var(--leva-navy); box-shadow: inset 0 0 0 1px #cbd2de; }
.exp-status-won { background: #e3f4f1; color: #0b6b6a; }
.exp-status-lost { background: #fde8ee; color: #9b2c2c; }
.exp-status-inconclusive { background: #fff3e0; color: #9a5300; }
.exp-title { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 650; color: var(--leva-navy); }
.exp-hypothesis { margin: 0; font-size: 13px; line-height: 1.5; color: #505c6c; }
.exp-metric { padding: 10px 12px; background: #f7f8fc; border-radius: 6px; }
.exp-metric-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: 12px; font-weight: 600; color: var(--leva-navy); }
.exp-dates { font-weight: 450; color: #505c6c; font-variant-numeric: tabular-nums; }
.exp-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 6px; font-size: 14px; color: #505c6c; font-variant-numeric: tabular-nums; }
.exp-numbers small { display: block; font-size: 11px; font-weight: 500; color: #7b8797; }
.exp-numbers strong { font-size: 20px; font-weight: 650; color: var(--leva-navy); }
.exp-numbers > :last-child { text-align: right; }
.exp-numbers > strong { text-align: center; }
.project-page svg.exp-progress { display: block; width: 100%; height: 6px; fill: none; stroke: none; }
.exp-track { fill: #e3e7ef; }
.exp-fill { fill: #ff6b35; }
.exp-fill-met { fill: #0e7c7b; }
.exp-source { margin: 6px 0 0; font-size: 12px; color: #505c6c; }
.exp-decision { margin: 0; font-size: 13px; line-height: 1.5; color: var(--leva-text); }
.exp-decision strong { margin-right: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #505c6c; }
.exp-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: 12px; color: #505c6c; overflow-wrap: anywhere; }
.exp-links small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.learning-log { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
.learning-log li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid #eef1f6; font-size: 14px; line-height: 1.5; }
.learning-log li:last-child { border-bottom: 0; }
.learning-log time { color: #505c6c; font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.learning-log strong { display: block; font-size: 12px; color: var(--leva-navy); }
.learning-log p { margin: 0; color: var(--leva-text); }
@media (max-width: 600px) {
  .report-header { align-items: flex-start; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-tile { padding: 12px; }
  .stat-value { font-size: 21px; }
  .freshness { flex-direction: column; }
  .chart { padding: 12px; }
  .learning-log li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .variants-table .col-optional { display: none; }
}
/* Pages scroll; only the canvas workspace locks the page (its panels scroll inside).
   :has() follows live navigation between the results page and the canvas. */
body:has(.workspace) { overflow: hidden; }

/* Projects list (JoyneWeb.ProjectsLive): hundreds of projects per supplier. Counts first, one dense row per project; rows stack on a phone. */
.project-page.projects-page { max-width: 1160px; font-size: 14px; color: var(--leva-text); }
.projects-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.project-page.projects-page h1 { margin: 0; }
.projects-header .project-create { margin: 0; gap: 8px; align-items: stretch; }
.projects-header .project-create input { min-width: 260px; padding: 10px 12px; font-size: 14px; }
.projects-header .project-create-button { padding: 10px 18px; font-weight: 600; white-space: nowrap; }
.project-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin: 18px 0 12px; }
.project-filters label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #505c6c; }
.project-filters input, .project-filters select { padding: 7px 9px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; font-size: 13px; color: var(--leva-text); min-height: 34px; }
.project-filters .project-search { flex: 1 1 260px; }
.project-filters .project-search input { width: 100%; }
.project-filters label.project-archived-toggle { flex-direction: row; align-items: center; gap: 6px; min-height: 34px; }
.project-archived-toggle input { min-height: 0; }
.project-page .project-reset { align-self: center; font-size: 13px; font-weight: 600; color: #b9471f; }
.projects-table-wrap { border: 1px solid #dce1e8; border-radius: 8px; background: #fff; }
.projects-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.projects-table th { text-align: left; font-size: 11px; font-weight: 600; color: #505c6c; padding: 9px 10px; border-bottom: 1px solid #dce1e8; background: #f7fafc; white-space: nowrap; }
.projects-table th:first-child { border-top-left-radius: 8px; }
.projects-table th:last-child { border-top-right-radius: 8px; }
.projects-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.projects-table tbody tr:last-child td { border-bottom: 0; }
.projects-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-row:hover { background: #fafbff; }
.project-row:focus-within { background: #fff6f2; }
.project-name { min-width: 220px; }
.project-page .project-name a { font-weight: 600; color: var(--leva-navy); font-size: 14px; }
.project-page .project-name a:hover { text-decoration: underline; }
.project-name small { display: block; margin-top: 2px; color: #505c6c; font-size: 12px; }
.project-activity, .project-by { white-space: nowrap; color: #505c6c; }
.review-count { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 10px; background: #fff1e0; color: #9a5300; font-weight: 650; text-align: center; }
.projects-table .muted { color: #aab2c0; }
.run-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #eef1f6; color: #505c6c; }
.run-badge-running { background: #fff0eb; color: #b9471f; }
.run-badge-queued { background: #fff; color: var(--leva-navy); box-shadow: inset 0 0 0 1px #cbd2de; }
.run-badge-needs_review { background: #fff1e0; color: #9a5300; }
.run-badge-done { background: #e3f4f1; color: #0b6b6a; }
.run-badge-failed { background: #fde8ee; color: #9b2c2c; }
.run-badge-no_drawings, .run-badge-idle { background: #f5f7fa; color: #6b7686; font-weight: 500; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff6b35; animation: live-dot 1.4s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.project-actions { text-align: right; }
.project-page .project-archive { padding: 4px 9px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; color: #505c6c; }
.project-page .project-archive:hover, .project-page .project-archive:focus-visible { border-color: #cbd2de; color: var(--leva-navy); background: #fff; }
.projects-none { padding: 28px 16px; text-align: center; color: #505c6c; font-size: 14px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
.projects-none p { margin: 0; }
.projects-none a { margin-left: 6px; font-weight: 600; color: #b9471f; }
.project-page .project-more { display: block; margin: 14px auto 8px; padding: 9px 18px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; font-size: 13px; font-weight: 600; color: var(--leva-navy); }
.project-page .project-more:hover { border-color: var(--leva-blue); }
@media (max-width: 700px) {
  .project-page.projects-page { margin: 12px auto; padding: 16px; }
  .projects-header .project-create { width: 100%; }
  .projects-header .project-create input { min-width: 0; flex: 1; }
  .project-filters { gap: 8px; }
  .project-filters label { flex: 1 1 calc(50% - 8px); }
  .project-filters .project-search { flex-basis: 100%; }
  .project-filters input, .project-filters select { width: 100%; }
  .project-filters label.project-archived-toggle { flex-basis: auto; }
  .project-archived-toggle input { width: auto; }
  .projects-table-wrap { border: 0; background: none; }
  .projects-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .projects-table, .projects-table tbody { display: block; }
  .projects-table tr.project-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1px solid #dce1e8; border-radius: 8px; }
  .projects-table tr.project-row td { display: block; padding: 0; border: 0; text-align: left; }
  .project-name { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
  .projects-table td.project-status { flex: 1 1 60%; }
  .project-actions { flex: 0 0 auto; order: 1; }
  .projects-table td.num, .project-activity, .project-by { order: 2; font-size: 12px; color: #505c6c; }
  .projects-table td[data-label]::before { content: attr(data-label) " "; color: #8a94a4; }
  .projects-table td.num[data-label="To review"] .muted { color: #505c6c; }
  .project-page .project-archive { padding: 4px 10px; border-color: #dce1e8; }
}

/* Prospecting CRM (ADR 019) */
.crm { max-width: 1320px; --crm-line: #e3e7ef; --crm-soft: #f6f8fc; --crm-ink: #152a45; --crm-muted: #6b778a; }
.crm h1, .crm h2, .crm h3 { color: var(--crm-ink); }
.crm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 18px; }
.crm-title h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.crm-title p { margin: 2px 0 0; font-size: 12px; color: var(--crm-muted); font-variant-numeric: tabular-nums; }
.crm-tabs { display: flex; gap: 2px; padding: 3px; background: #eef1f6; border-radius: 9px; }
.crm-tab { padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--crm-muted); text-decoration: none; }
.crm-tab:hover { color: var(--crm-ink); }
.crm-tab.active { background: #fff; color: var(--crm-ink); box-shadow: 0 1px 2px #152a4514; }
.crm-search { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: auto; }
.crm-search input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--crm-line); border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236b778a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath d='m9.5 9.5 3 3'/%3E%3C/svg%3E") no-repeat 11px 50%; font-size: 13px; color: var(--crm-ink); }
.crm-search input:focus { outline: none; border-color: var(--leva-blue); box-shadow: 0 0 0 3px #ff6b351f; }
.crm-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--crm-line); border-radius: 10px; box-shadow: 0 12px 32px #152a451f; }
.crm-result { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 7px; text-decoration: none; color: var(--crm-ink); }
.crm-result:hover { background: var(--crm-soft); }
.crm-result > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.crm-result strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-result small { font-size: 11px; color: var(--crm-muted); }
.crm-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--crm-line); border-radius: 8px; background: #fff; color: var(--crm-ink); font-size: 13px; font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap; }
.crm-button:hover { border-color: #c5cddc; background: var(--crm-soft); }
.crm-button.primary { background: var(--leva-navy); border-color: var(--leva-navy); color: #fff; }
.crm-button.primary:hover { background: #152a45; }
.crm-button.danger { background: #c4163f; border-color: #c4163f; color: #fff; }
.crm-button.danger-quiet { color: #9b2c2c; }
.crm-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 8px; font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.crm-avatar.small { width: 26px; height: 26px; border-radius: 7px; font-size: 10px; }
.crm-avatar.large { width: 48px; height: 48px; border-radius: 12px; font-size: 17px; }
.hue-0 { background: #fff0eb; color: #b9471f; } .hue-1 { background: #dff3ef; color: #0b6b62; } .hue-2 { background: #fdeede; color: #9a5300; }
.hue-3 { background: #f1e6fb; color: #6d3fb0; } .hue-4 { background: #fde4ea; color: #9b2c2c; } .hue-5 { background: #e8edf3; color: #3d4a5c; }
.crm-stage { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #eef1f6; color: #4b5668; border: 0; }
.stage-called { background: #fff0eb; color: #b9471f; } .stage-call_booked { background: #efe6fd; color: #6d3fb0; } .stage-trial { background: #fff1dc; color: #9a5300; }
.stage-pilot { background: #dff3ef; color: #0b6b62; } .stage-customer { background: #0b6b62; color: #fff; } .stage-not_now { background: #f1f2f5; color: #7a8497; } .stage-not_a_fit { background: #f7e3e7; color: #9b2c2c; }
.crm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; padding: 0; }
.crm-dot.stage-called { background: #ff6b35; } .crm-dot.stage-call_booked { background: #8b5cf6; } .crm-dot.stage-trial { background: #d97706; }
.crm-dot.stage-pilot { background: #0e7c7b; } .crm-dot.stage-customer { background: #065f46; } .crm-dot.stage-not_now { background: #a0a9b8; } .crm-dot.stage-not_a_fit { background: #c53030; }
.crm-drop-hint { margin: 0; padding: 18px 8px; text-align: center; font-size: 12px; color: #a0a9b8; border: 1px dashed #d5dbe7; border-radius: 9px; }
.crm-segment { display: flex; gap: 2px; margin: 4px 4px 8px; padding: 3px; background: #eef1f6; border-radius: 8px; }
.crm-segment a { flex: 1; text-align: center; padding: 5px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--crm-muted); text-decoration: none; }
.crm-segment a.active { background: #fff; color: var(--crm-ink); box-shadow: 0 1px 2px #152a4514; }
.crm-tier { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 650; text-align: center; background: #eef1f6; color: #4b5668; }
.tier-A { background: var(--leva-navy); color: #fff; } .tier-pilot { background: #0b6b62; color: #fff; }
.crm-flag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 650; background: #fff1dc; color: #9a5300; vertical-align: 1px; }
.crm-due { font-size: 12px; color: var(--crm-muted); white-space: nowrap; }
.crm-due.late { color: #9b2c2c; font-weight: 600; }
.crm-muted { color: var(--crm-muted); font-size: 12px; }
.crm-empty { color: var(--crm-muted); font-size: 13px; padding: 10px 2px; margin: 0; }
.crm-error { color: #9b2c2c; font-size: 13px; margin: 8px 0 0; }
.crm-spacer { flex: 1; }
.crm-card { background: #fff; border: 1px solid var(--crm-line); border-radius: 12px; padding: 16px 18px; }
.crm-card h2, .crm-card h3 { margin: 0 0 12px; font-size: 14px; }
.crm-new { margin-bottom: 18px; }
.crm-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.crm-fields label { display: grid; gap: 4px; font-size: 12px; color: var(--crm-muted); }
.crm-fields label.wide { grid-column: 1 / -1; }
.crm input[type=text], .crm input[type=tel], .crm input[type=date], .crm input[type=search]:not(#crm-search-input), .crm select, .crm textarea { padding: 7px 9px; border: 1px solid var(--crm-line); border-radius: 7px; background: #fff; color: var(--crm-ink); font-size: 13px; font-family: inherit; }
.crm input:focus, .crm select:focus, .crm textarea:focus { outline: none; border-color: var(--leva-blue); box-shadow: 0 0 0 3px #ff6b351f; }
.crm-actions { display: flex; gap: 8px; margin-top: 14px; }

/* Today: queue beside the company */
.crm-split { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.crm-queue { position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow: auto; background: #fff; border: 1px solid var(--crm-line); border-radius: 12px; padding: 6px; }
.crm-queue section + section { border-top: 1px solid var(--crm-line); margin-top: 6px; padding-top: 6px; }
.crm-queue h2 { display: flex; justify-content: space-between; margin: 8px 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--crm-muted); }
.crm-queue h2 span { font-variant-numeric: tabular-nums; }
.crm-queue .crm-empty { padding: 4px 10px 10px; }
.crm-queue-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--crm-ink); }
.crm-queue-item:hover { background: var(--crm-soft); }
.crm-queue-item.active { background: #fff0eb; box-shadow: inset 2px 0 0 var(--leva-blue); }
.crm-queue-text { display: grid; flex: 1; min-width: 0; }
.crm-queue-text strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-queue-text small { font-size: 11px; color: var(--crm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-placeholder { display: grid; place-content: center; min-height: 360px; text-align: center; color: var(--crm-muted); background: #fff; border: 1px dashed #d5dbe7; border-radius: 12px; padding: 32px; }
.crm-placeholder p { margin: 4px 0; max-width: 40ch; }
.crm-placeholder strong { color: var(--crm-ink); font-size: 15px; }

/* Company */
.crm-page { max-width: none; }
.crm-back { display: inline-block; margin-bottom: 12px; font-size: 13px; color: var(--crm-muted); text-decoration: none; }
.crm-back:hover { color: var(--crm-ink); }
.crm-company { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.crm-company-head { display: flex; align-items: center; gap: 14px; }
.crm-company-title { flex: 1; min-width: 0; }
.crm-company-title h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.crm-company-title p { margin: 3px 0 0; font-size: 13px; color: var(--crm-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crm-stage-picker select { padding: 6px 28px 6px 12px; font-size: 13px; cursor: pointer; appearance: auto; }
.crm-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.crm-link { color: var(--leva-blue); font-size: 13px; text-decoration: none; }
.crm-link:hover { text-decoration: underline; }
.crm-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid #f0c9d2; background: #fdf3f5; border-radius: 10px; font-size: 13px; }
.crm-opener { margin: 0; padding: 12px 14px; border-radius: 10px; background: #f3f6ff; border: 1px solid #dfe7ff; font-size: 14px; color: var(--crm-ink); line-height: 1.5; }
.crm-opener span { display: block; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--leva-blue); margin-bottom: 2px; }
.crm-log { display: grid; gap: 10px; }
.crm-log h3 { margin: 0; }
.crm-log textarea { width: 100%; resize: vertical; }
.crm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-chip { position: relative; cursor: pointer; }
.crm-chip input { position: absolute; opacity: 0; pointer-events: none; }
.crm-chip span { display: inline-block; padding: 7px 12px; border: 1px solid var(--crm-line); border-radius: 999px; font-size: 13px; font-weight: 550; color: var(--crm-ink); background: #fff; }
.crm-chip:hover span { border-color: #b9c3d6; }
.crm-chip input:checked + span { background: var(--leva-navy); border-color: var(--leva-navy); color: #fff; }
.crm-chip input:focus-visible + span { box-shadow: 0 0 0 3px #ff6b3540; }
.crm-chip.small span { padding: 4px 10px; font-size: 12px; }
.crm-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crm-follow-title { flex: 1 1 160px; }
#crm-log-save { justify-self: start; }
.crm-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 16px; align-items: start; }
.crm-timeline, .crm-side > section { background: #fff; border: 1px solid var(--crm-line); border-radius: 12px; padding: 14px 16px; }
.crm-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.crm-columns > *, .crm-side > section { min-width: 0; }
.crm-timeline h3, .crm-side h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; font-size: 13px; }
.crm-note, .crm-add-task { display: flex; gap: 6px; margin-bottom: 10px; }
.crm-note input { flex: 1; }
.crm-add-task { margin: 8px 0 0; }
.crm-add-task input[type=text] { flex: 1 1 auto; min-width: 0; }
.crm-add-task input[type=date] { flex: 0 0 132px; }
#crm-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
#crm-timeline li { position: relative; padding: 8px 0 10px 16px; border-left: 2px solid var(--crm-line); margin-left: 4px; font-size: 13px; }
#crm-timeline li::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #b9c3d6; }
#crm-timeline li.kind-call::before { border-color: var(--leva-blue); }
#crm-timeline li.kind-stage::before { border-color: #0b6b62; }
#crm-timeline p { margin: 4px 0 0; color: #3c475a; white-space: pre-wrap; }
.crm-when { display: block; font-size: 11px; color: var(--crm-muted); margin-bottom: 1px; }
.crm-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.crm-tasks li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.crm-tasks li > span:first-of-type { flex: 1; }
.crm-tasks li.done > span:first-of-type { color: var(--crm-muted); text-decoration: line-through; }
.crm-x { border: 0; background: none; color: #a0a9b8; font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; cursor: pointer; }
.crm-x:hover { color: #9b2c2c; background: #fdf3f5; }
.crm-inline { border: 0; background: none; color: var(--leva-blue); font-size: 12px; font-weight: 600; cursor: pointer; }
.crm-person { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid #f0f2f6; }
.crm-person:first-of-type { border-top: 0; }
.crm-person > div { display: grid; flex: 1; gap: 1px; font-size: 13px; }
.crm-person small { color: var(--crm-muted); font-size: 12px; }
.crm-person a { color: var(--leva-blue); text-decoration: none; font-size: 12px; }
.crm-person-form { display: grid; gap: 6px; margin-top: 8px; }
.crm-research dl { margin: 0; display: grid; gap: 8px; }
.crm-research dt { font-size: 11px; color: var(--crm-muted); font-weight: 600; }
.crm-research dd { margin: 1px 0 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.crm-research details { margin-top: 10px; font-size: 12px; }
.crm-research summary { cursor: pointer; color: var(--crm-muted); }
.crm-sources { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 3px; }
.crm-sources a { color: var(--leva-blue); text-decoration: none; word-break: break-all; }

/* Pipeline */
.crm-board-note { font-size: 13px; color: var(--crm-muted); margin: 0 0 12px; }
.crm-board-note a { color: var(--leva-blue); font-weight: 600; text-decoration: none; }
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.crm-column { background: #f3f5f9; border: 1px solid transparent; border-radius: 12px; padding: 10px; min-height: 280px; }
.crm-column.drop { border-color: var(--leva-blue); background: #fff0eb; }
.crm-column h2 { display: flex; align-items: center; margin: 2px 4px 10px; font-size: 12px; }
.crm-column h2 > span:last-child { margin-left: auto; color: var(--crm-muted); font-variant-numeric: tabular-nums; }
.crm-cards { display: grid; gap: 8px; }
.crm-board-card { display: grid; gap: 3px; padding: 10px 12px; background: #fff; border: 1px solid var(--crm-line); border-radius: 9px; text-decoration: none; color: var(--crm-ink); box-shadow: 0 1px 2px #152a450a; cursor: grab; }
.crm-board-card:hover { border-color: #c5cddc; }
.crm-board-card.dragging { opacity: .5; }
.crm-board-card strong { font-size: 13px; font-weight: 600; }
.crm-board-card small { font-size: 11px; color: var(--crm-muted); }

/* Companies */
.crm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.crm-filters input[type=search] { flex: 1 1 240px; max-width: 340px; }
.crm-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--crm-ink); }
.crm-clear { font-size: 13px; color: var(--leva-blue); text-decoration: none; }
.crm-bulk { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--leva-navy); color: #fff; font-size: 13px; }
.crm-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--crm-line); border-radius: 12px; }
.crm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.crm-table th { position: sticky; top: 0; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--crm-muted); padding: 10px 12px; border-bottom: 1px solid var(--crm-line); background: #fafbfd; white-space: nowrap; }
.crm-table th a { color: inherit; text-decoration: none; }
.crm-table th a:hover { color: var(--crm-ink); }
.crm-table td { padding: 8px 12px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
.crm-table tr:last-child td { border-bottom: 0; }
.crm-table tbody tr:hover { background: #fafbfd; }
.crm-table tr.selected { background: #fff0eb; }
.crm-select { width: 32px; }
.crm-row-name { display: flex; align-items: center; gap: 10px; color: var(--crm-ink); text-decoration: none; font-weight: 600; }
.crm-row-name:hover { color: var(--leva-blue); }
#crm-count { margin: 8px 2px; }
.crm-import { margin: 18px 0; font-size: 13px; }
.crm-import summary { cursor: pointer; color: var(--crm-muted); }
.crm-import form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

@media (max-width: 900px) {
  .crm-split, .crm-columns { grid-template-columns: minmax(0, 1fr); }
  .crm-split > * { min-width: 0; }
  .crm-stage-picker { flex: 1 0 100%; }
  .crm-stage-picker select { width: 100%; }
  .crm-queue { position: static; max-height: 320px; }
  .crm-search { max-width: none; margin-left: 0; order: 3; flex-basis: 100%; }
  .crm-company-head { flex-wrap: wrap; }
}

/* App shell (ADR 024 slice 1): one left sidebar on every supplier page. A rail
   when collapsed ([) and always on the canvas; a drawer on phones. */
.shell { --side-w: 248px; --side-rail: 60px; display: flex; min-height: 100dvh; background: #edf0f5; }
.shell-menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.sidebar { position: sticky; top: 0; flex: 0 0 var(--side-w); width: var(--side-w); height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; background: #fff; border-right: 1px solid #e3e7ef; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; font-size: 14px; color: var(--leva-text); z-index: 30; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-icon { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.7; }
.side-org { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin-bottom: 6px; border-radius: 8px; color: var(--leva-navy); text-decoration: none; font-weight: 650; }
.side-org:hover { background: #f3f5fa; }
.side-mark { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--leva-navy); color: #fff; font-size: 13px; font-weight: 700; }
.side-org-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-chev { color: #8a94a4; }
.side-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 8px; }
.sidebar .side-new { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--leva-blue); color: #fff; font-weight: 600; text-decoration: none; }
.sidebar .side-new:hover { background: #963d1b; }
.side-new kbd, .side-search kbd, .side-collapse kbd { margin-left: auto; font: 11px var(--leva-font-data); padding: 1px 6px; border-radius: 4px; background: #ffffff26; color: inherit; opacity: .8; }
.side-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #dce1e8; border-radius: 8px; color: #6b7686; }
.side-search:focus-within { border-color: var(--leva-blue); box-shadow: 0 0 0 3px #ff6b351f; }
.side-search label { display: flex; cursor: text; }
.side-search input { flex: 1; width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: 0; background: none; font-size: 14px; color: var(--leva-text); }
.side-search kbd, .side-collapse kbd { background: #eef1f6; color: #6b7686; }
.side-h { margin: 12px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #8a94a4; }
.side-nav { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.side-item, .side-collapse button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 7px; color: #3a4660; text-decoration: none; font-size: 14px; text-align: left; }
.side-item:hover, .side-collapse button:hover { background: #f3f5fa; color: var(--leva-navy); }
.side-item.active { background: #fff0eb; color: var(--leva-navy); font-weight: 600; }
.side-count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: #8a94a4; }
.side-count.hot { padding: 0 7px; border-radius: 9px; background: #fff1e0; color: #9a5300; font-weight: 650; }
.side-dot { flex: 0 0 18px; display: grid; place-items: center; }
.side-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #aab2c0; }
.dot-to-check::before { background: var(--leva-attention); }
.dot-measuring::before { background: var(--leva-blue); }
.dot-done::before { background: var(--leva-evidence); }
.dot-stopped::before { background: var(--leva-danger); }
.side-foot { margin-top: auto; display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid #eef1f6; }
.side-allowance { margin: 0 10px; padding: 6px 8px; border-radius: 7px; background: #f7fafc; font-size: 12px; color: #505c6c; }
.side-me { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px 8px; }
.side-avatar { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #e9edf4; color: #505c6c; font-size: 12px; font-weight: 650; }
.side-email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #505c6c; }
.side-signout { display: flex; padding: 6px; border-radius: 7px; color: #6b7686; }
.side-signout:hover { background: #f3f5fa; color: var(--leva-navy); }
.shell-topbar, .shell-scrim { display: none; }

/* Rail: collapsed by the person, or always around the canvas. */
html.side-collapsed .shell .sidebar, .shell-rail .sidebar { flex-basis: var(--side-rail); width: var(--side-rail); padding: 12px 8px; }
html.side-collapsed .shell .side-label, .shell-rail .side-label, html.side-collapsed .shell .side-h, .shell-rail .side-h { display: none; }
html.side-collapsed .shell :is(.side-item, .side-org, .sidebar .side-new, .side-collapse button, .side-me), .shell-rail :is(.side-item, .side-org, .sidebar .side-new, .side-collapse button, .side-me) { justify-content: center; padding-left: 0; padding-right: 0; }
html.side-collapsed .shell .side-search, .shell-rail .side-search { justify-content: center; padding: 8px 0; border-color: transparent; }
html.side-collapsed .shell .side-me, .shell-rail .side-me { flex-direction: column; gap: 6px; }
.shell-rail .side-collapse { display: none; }
.dot-queued::before { background: var(--leva-soft-blue); }
.canvas-menu { display: none; }
/* The canvas rail opened over the drawing ([ or /): it keeps its 60 px slot,
   so the drawing doesn't move. */
@media (min-width: 901px) {
  .shell-rail.rail-open .sidebar { flex-basis: var(--side-w); width: var(--side-w); margin-right: calc(var(--side-rail) - var(--side-w)); padding: 12px 10px; box-shadow: 8px 0 30px #152a4524; }
  html .shell.shell-rail.rail-open :is(.side-label, .side-h) { display: revert; }
  html .shell.shell-rail.rail-open :is(.side-item, .side-org, .sidebar .side-new, .side-me) { justify-content: flex-start; padding-left: 10px; padding-right: 10px; flex-direction: row; }
  html .shell.shell-rail.rail-open .side-search { justify-content: flex-start; padding: 0 10px; border-color: #dce1e8; }
}

/* Phones: the sidebar is a drawer behind a top bar. */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar, html.side-collapsed .shell .sidebar, .shell-rail .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); padding: 12px 10px; transform: translateX(-102%); transition: transform .18s ease; box-shadow: 8px 0 30px #152a4524; }
  html.side-collapsed .shell .side-label, .shell-rail .side-label { display: revert; }
  html.side-collapsed .shell .side-h, .shell-rail .side-h { display: block; }
  html.side-collapsed .shell :is(.side-item, .side-org, .sidebar .side-new, .side-me), .shell-rail :is(.side-item, .side-org, .sidebar .side-new, .side-me) { justify-content: flex-start; padding-left: 10px; padding-right: 10px; flex-direction: row; }
  html.side-collapsed .shell .side-search, .shell-rail .side-search { justify-content: flex-start; padding: 0 10px; border-color: #dce1e8; }
  .side-collapse, .side-search kbd, .side-new kbd { display: none !important; }
  .shell-menu-toggle:checked ~ .sidebar { transform: none; }
  .shell-menu-toggle:checked ~ .shell-scrim { display: block; position: fixed; inset: 0; z-index: 29; background: #152a4540; }
  .shell-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; background: #fff; border-bottom: 1px solid #e3e7ef; }
  .shell-menu-button { display: flex; padding: 6px; border-radius: 7px; cursor: pointer; color: var(--leva-navy); }
  .shell-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; color: var(--leva-navy); font-size: 15px; }
  .shell-topbar .side-new { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 7px; background: var(--leva-blue); color: #fff; font-weight: 600; font-size: 13px; text-decoration: none; }
  /* The canvas keeps its own header on phones. */
  .shell-rail .shell-topbar { display: none; }
  .canvas-menu { display: flex; padding: 4px; margin-right: -4px; cursor: pointer; color: var(--leva-navy); }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* The job on its canvas (26 Sep 2026): the first drop zone and Joyne's questions. */
.empty-canvas.drop-first { top: 50%; left: 50%; width: min(460px, calc(100% - 48px)); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 24px; border: 2px dashed #b9c4dc; border-radius: 14px; background: #f8faffcc; color: #505c6c; font-size: 13px; cursor: pointer; z-index: 4; }
.empty-canvas.drop-first strong { font-size: 18px; color: var(--leva-navy); }
.empty-canvas.drop-first u { color: var(--leva-blue); }
.empty-canvas.drop-first .drop-note { font-size: 12px; color: #7b8797; }
.empty-canvas.drop-first:hover, .empty-canvas.drop-first.phx-drop-target-active { border-color: var(--leva-blue); background: #fff0eb; }
#questions-panel .question-item { padding: 10px 17px; border-bottom: 1px solid #eef1f6; }
.question-text { margin: 0; font-size: 12px; font-weight: 600; color: #26344f; line-height: 1.45; }
.question-assumed { margin: 4px 0 0; font-size: 11px; color: #7b8797; line-height: 1.45; }
.question-actions { display: flex; gap: 6px; margin-top: 8px; }
.question-actions button { padding: 4px 10px; border: 1px solid #d6dfea; border-radius: 6px; background: #fff; font-size: 11px; font-weight: 600; color: var(--leva-navy); }
.question-actions button:hover { border-color: var(--leva-blue); color: var(--leva-blue); }
.question-actions .question-right { color: var(--leva-evidence); border-color: #bfe3db; background: #f1faf8; }
.question-resolved { margin: 6px 0 0; font-size: 11px; color: var(--leva-evidence); font-weight: 600; }

/* A job's canvas (26 Sep 2026): navigation in the sidebar, no header. */
.workspace.job-canvas { height: 100dvh; }
.workspace.empty { grid-template-columns: minmax(0, 1fr); }
.workspace.empty :is(.measurements, .toolbar, .canvas-top, .canvas-bottom, #finished-bar, .panel-open) { display: none; }
.workspace.empty .composer-wrap:has(#run-form) { display: none; }
.panel-open { display: none; position: absolute; top: 14px; right: 14px; z-index: 9; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid #dce2eb; border-radius: 8px; background: #fff; color: #6b7686; }
.panel-open svg { width: 18px; height: 18px; }
.workspace.panel-closed .panel-open { display: flex; }
.job-section { display: grid; gap: 4px; margin-top: 6px; padding-top: 10px; border-top: 1px solid #eef1f6; }
.job-section .side-h { margin-top: 0; }
.job-name { margin: 0 10px 4px; font-size: 15px; font-weight: 650; color: var(--leva-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-drawing-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-section #drawing-upload { display: grid; gap: 4px; margin: 2px 0; }
.job-section #drawing-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.job-section .upload-label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px dashed #c5cfdf; border-radius: 7px; color: #3a4660; font-size: 14px; cursor: pointer; }
.job-section .upload-label::before { content: "+"; width: 18px; text-align: center; font-weight: 600; color: var(--leva-blue); }
.job-section .upload-label:hover { border-color: var(--leva-blue); color: var(--leva-navy); background: #fff7f3; }
.job-section .upload-limit { margin: 0 10px; font-size: 11px; color: #8a94a4; }
.job-section .upload-entry { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin: 0 10px; font-size: 12px; }
.job-section .upload-entry progress { grid-column: 1 / -1; width: 100%; height: 4px; }
@media (min-width: 901px) {
  html.side-collapsed .shell .job-section .upload-limit { display: none; }
  html.side-collapsed .shell .job-section .upload-label { justify-content: center; padding: 7px 0; font-size: 0; }
  html.side-collapsed .shell .job-section .upload-label::before { font-size: 16px; }
}
@media (max-width: 900px) { .workspace.job-canvas { height: calc(100dvh - 52px); } }

/* Talking to Joyne about one item: a comment button on hover, then a one-line pop-up. */
.boq-item, .measure-item { position: relative; }
.row-comment { position: absolute; top: 8px; right: 8px; z-index: 2; display: none; width: 26px; height: 26px; align-items: center; justify-content: center; border: 1px solid #d6dfea; border-radius: 6px; background: #fff; color: #6b7686; }
.row-comment svg { width: 14px; height: 14px; }
.boq-item:hover .row-comment, .measure-item:hover .row-comment, .boq-item:focus-within .row-comment, .measure-item:focus-within .row-comment { display: flex; }
@media (hover: none) { .row-comment { display: flex; } }
.row-comment:hover { color: var(--leva-blue); border-color: var(--leva-blue); }
.steer-pop { margin: 4px 12px 10px; padding: 4px 4px 4px 2px; border: 1px solid #ffd3c2; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px #152a451f; display: flex; align-items: center; gap: 4px; }
.steer-pop input { flex: 1; min-width: 0; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; font-size: 12px; color: var(--leva-navy); }
.steer-pop input:focus { outline: none; }
.steer-pop:focus-within { border-color: var(--leva-blue); box-shadow: 0 0 0 3px #ff6b351f, 0 8px 24px #152a451f; }
.steer-send { flex: 0 0 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--leva-blue); color: #fff; }
.steer-send svg { width: 16px; height: 16px; stroke-width: 2; }
.steer-send:hover { background: #963d1b; }
#selection-detail .steer-pop { margin: 10px 0 0; }
.side-section { min-width: 0; }
.job-section, .job-section #drawing-upload { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.job-section .side-item { min-width: 0; }
.job-section .side-nav { grid-template-columns: minmax(0, 1fr); }

/* The jobs page, live (26 Sep 2026): what Joyne is doing, and what needs a person. */
.row-activity { display: block; margin-top: 4px; font-size: 12px; color: #b9471f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.needs-review { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #f3d9b0; border-radius: 10px; background: #fffaf1; }
.needs-review h2 { margin: 0 0 10px; font-size: 14px; color: #7a4a00; }
.needs-review ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.needs-review li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.needs-review li a { font-weight: 600; color: var(--leva-navy); text-decoration: none; }
.needs-review li a:hover { text-decoration: underline; }
.needs-review .review-count { min-width: 0; padding: 1px 8px; }
.review-questions { padding: 1px 8px; border-radius: 10px; background: #fff0eb; color: #b9471f; font-weight: 600; font-size: 12px; }

/* Workspace layout (26 Sep 2026): a calm sidebar with jobs listed like
   conversations (Needs you / Running / Recent), in the style of Cursor,
   Claude and Codex. */
.sidebar { background: #f7f7f5; border-right-color: #e7e9ee; gap: 1px; padding: 10px 8px; font-size: 13.5px; }
.side-org { padding: 6px 8px; margin-bottom: 4px; }
.side-org:hover, .side-item:hover, .side-job:hover, .side-collapse button:hover { background: #eeefeb; }
.side-mark { flex-basis: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.side-actions { gap: 1px; margin-bottom: 2px; }
.sidebar .side-new { background: none; color: #2b3550; font-weight: 500; padding: 6px 10px; }
.sidebar .side-new:hover { background: #eeefeb; }
.side-new kbd, .side-search kbd, .side-collapse kbd { background: none; color: #9aa2b3; padding: 0; opacity: 1; }
.side-search { border: 0; padding: 0 10px; }
.side-search:focus-within { box-shadow: none; background: #fff; outline: 1px solid #d9dde6; }
.side-search input { padding: 6px 0; font-size: 13.5px; }
.side-item { padding: 6px 10px; font-size: 13.5px; }
.side-item.active { background: #e8e9e4; color: #0f1a33; }
.side-h { margin: 14px 10px 3px; font-size: 11px; font-weight: 600; letter-spacing: .01em; text-transform: none; color: #9aa2b3; }
.side-jobs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.side-job { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 10px; border-radius: 8px; text-decoration: none; }
.side-job.on { background: #e8e9e4; }
.side-job-name { flex: 1; min-width: 0; font-weight: 550; color: #0f1a33; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* One mark at the right edge says what state the job is in; the words are in the hover text. */
.side-job-mark { flex: 0 0 auto; }
.side-job-mark.ring { width: 16px; height: 16px; fill: none; stroke-width: 2.2; animation: side-spin 1.4s linear infinite; }
.side-job-mark.ring .ring-track { stroke: #ff6b352e; }
.side-job-mark.ring .ring-arc { stroke: var(--leva-accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 9px 9px; transition: stroke-dasharray .4s ease; }
.side-job-mark.badge { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; background: #fdefd6; color: #8a5300; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.side-job-mark.failed { width: 16px; height: 16px; fill: none; stroke: var(--leva-danger); stroke-width: 1.8; stroke-linecap: round; }
@keyframes side-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .side-job-mark.ring { animation: none; } }
.side-foot { border-top-color: #e7e9ee; }
@media (min-width: 901px) {
  html.side-collapsed .shell .side-job, .shell-rail .side-job { justify-content: center; padding: 9px 0; }
  html.side-collapsed .shell .side-job:not([data-mark])::before, .shell-rail .side-job:not([data-mark])::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c3c7cf; }
  html.side-collapsed .shell .side-jobs .side-h, .shell-rail .side-jobs .side-h { display: none; }
}

/* The job's drawings in the sheet rail; its report and schedules under the takeoff. */
.rail-docs { display: grid; gap: 2px; padding: 10px 8px 0; }
.rail-doc { padding: 5px 7px; border-radius: 6px; text-align: left; font-size: 10px; color: #5b6780; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-doc.active { background: #eaf0fb; color: var(--leva-blue); font-weight: 600; }
.page-rail #drawing-upload { display: grid; gap: 4px; margin: 6px 8px 14px; }
.page-rail #drawing-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.page-rail .upload-label { display: block; padding: 7px 4px; border: 1px dashed #c5cfdf; border-radius: 7px; text-align: center; font-size: 10px; font-weight: 600; color: #3a4660; cursor: pointer; }
.page-rail .upload-label:hover { border-color: var(--leva-blue); color: var(--leva-blue); }
.page-rail .upload-limit { display: none; }
.page-rail .upload-entry { display: grid; gap: 2px; font-size: 9px; color: #5b6780; }
.page-rail .upload-entry progress { width: 100%; height: 4px; }
.job-title { font-size: 13px !important; font-weight: 650 !important; color: #0f1a33; max-width: 420px !important; }
.panel-links { display: flex; gap: 14px; padding: 10px 17px; border-top: 1px solid var(--border); font-size: 11px; font-weight: 600; }
.panel-links a { color: #33435a; text-decoration: none; }
.panel-links a:hover { color: var(--leva-blue); }

/* An empty job hides the sheet rail, but its upload's progress, errors and
   Cancel show under the drop zone. */
.workspace.empty { position: relative; }
.workspace.empty .page-rail { display: contents; }
.workspace.empty .page-rail > :not(#drawing-upload) { display: none; }
.workspace.empty #drawing-upload { position: absolute; left: 50%; top: calc(50% + 100px); transform: translateX(-50%); z-index: 5; width: min(460px, calc(100% - 48px)); margin: 0; }
.workspace.empty #drawing-upload .upload-label { display: none; }
.workspace.empty #drawing-upload .upload-entry, .workspace.empty #drawing-upload [role=alert] { font-size: 12px; }

/* Right panel on a job: Joyne (conversation and composer) and Quantities tabs. */
.job-canvas { --panel: 360px; }
@media (max-width: 1100px) { .job-canvas { --panel: 300px; } }
@media (max-width: 820px) { .job-canvas .measurements { width: min(340px, 88vw); } }
.measurements .panel-header { height: 56px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--border); }
.panel-switch { display: flex; gap: 4px; }
.panel-switch button { padding: 6px 11px; border-radius: 7px; font-size: 12px; font-weight: 560; color: #7b8797; display: inline-flex; align-items: center; gap: 6px; }
.panel-switch button:hover { color: var(--navy); }
.panel-switch button.active { background: #eef1f6; color: var(--navy); }
.tab-count { min-width: 18px; padding: 1px 6px; border-radius: 9px; background: #fdf1dc; color: #9a5b00; font-size: 10px; font-weight: 650; text-align: center; }
.panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panel-body > .panel-tabs { padding-top: 12px; }
.leva-thread { flex: 1; min-height: 0; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.leva-msg { padding: 11px 13px; border: 1px solid #e6eaf1; border-radius: 10px; background: #fafbfd; font-size: 12px; line-height: 18px; color: #26344d; white-space: pre-wrap; overflow-wrap: anywhere; }
.questions-nudge { align-self: flex-start; padding: 8px 12px; border: 1px solid #f1d9ad; border-radius: 8px; background: #fff8ec; color: #8a5300; font-size: 12px; font-weight: 600; }
.questions-nudge:hover { border-color: #e4b760; }
.measurements .finished-bar { position: static; transform: none; margin: 0 14px 8px; }
.measurements .composer-wrap { position: static; transform: none; width: auto; margin: 0 12px 12px; }
.measurements .composer { flex-wrap: wrap; align-items: flex-end; min-height: 48px; }
.measurements .activity { margin: 0 8px -3px; }
.composer-about { flex-basis: 100%; display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%; padding: 3px 4px 3px 9px; border-radius: 6px; background: #fff0eb; color: #963d1b; font-size: 11px; font-weight: 560; }
.composer-about > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-about button { width: 18px; height: 18px; border-radius: 4px; color: #963d1b; font-size: 14px; line-height: 1; }
.composer-about button:hover { background: #dfe6ff; }
.composer-about + textarea { flex-basis: calc(100% - 44px); }
.confirm-all { padding: 10px 14px; border-top: 1px solid var(--border); }
.confirm-all button { width: 100%; padding: 9px 12px; border: 1px solid #bfe3db; border-radius: 8px; background: #f1faf8; color: var(--leva-evidence, var(--teal)); font-size: 12px; font-weight: 650; }
.confirm-all button:hover { border-color: var(--teal); }
.composer textarea:focus-visible { outline: none; }
/* One composer under every tab; a live line on Quantities while Joyne works. */
.measurements > .composer-wrap { margin-top: 10px; }
/* What Joyne is doing, on the drawing: one icon per kind of work and a few shimmering words. */
.run-pill { pointer-events: auto; align-self: flex-start; display: flex; align-items: center; gap: 7px; max-width: min(320px, 40%); height: 28px; padding: 0 12px 0 9px; border: 1px solid #ffe0d3; border-radius: 14px; background: #ffffffef; box-shadow: 0 2px 8px #1320330f; color: var(--leva-blue); font-size: 12px; font-weight: 560; }
.run-pill:hover { border-color: #ffc4ad; }
.run-pill svg { width: 16px; height: 16px; stroke-width: 1.8; color: var(--leva-accent); }
.run-pill-ask svg { color: inherit; }
.run-pill-ask { color: #8a5300; border-color: #f4d9a6; background: #fff8ecf2; }
.run-pill-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: linear-gradient(90deg, currentColor 0 40%, #ffc4ad 50%, currentColor 60% 100%) 100% 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: pill-shimmer 2.2s linear infinite; }
.run-pill-ask .run-pill-label { background: none; -webkit-text-fill-color: currentColor; animation: none; }
@keyframes pill-shimmer { to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .run-pill-label { animation: none; background: none; -webkit-text-fill-color: currentColor; } }
@media (max-width: 550px) { .run-pill { padding: 0; width: 28px; justify-content: center; } .run-pill-label { display: none; } }
/* Ask Joyne beside the selected mark on the drawing; placed by the Canvas hook. */
.ask-leva { position: absolute; left: 0; top: 0; z-index: 6; visibility: hidden; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border: 1px solid #ffd3c2; border-radius: 8px; background: #fff; color: #963d1b; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px #152a451f; }
.ask-leva svg { width: 14px; height: 14px; }
.ask-leva:hover { border-color: var(--leva-blue); color: var(--leva-blue); }
/* Phones: the drawing first; the panel button opens Joyne and Quantities over it. */
@media (max-width: 820px) {
  .job-canvas:not(.panel-shown) .measurements { display: none; }
  .job-canvas:not(.panel-shown):not(.empty) .panel-open { display: flex; }
}
/* A2UI question cards (ADR 025, JoyneWeb.A2UIComponents) */
.a2ui-page { max-width: 760px; }
.a2ui-cards { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.a2ui-card { background: #fff; border: 1px solid var(--leva-rule); border-radius: var(--leva-radius-panel); padding: 14px 16px; color: var(--leva-text); font-size: 13px; }
.a2ui-card.a2ui-open { border-left: 3px solid var(--leva-attention); }
.a2ui-card.a2ui-updating { border-left: 3px solid var(--leva-blue); }
.a2ui-column { display: flex; flex-direction: column; gap: 10px; }
.a2ui-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.a2ui-row[data-justify=end] { justify-content: flex-end; }
.a2ui-row[data-justify=spaceBetween] { justify-content: space-between; }
.a2ui-box { border: 1px solid #eef1f6; border-radius: 6px; padding: 10px; }
.a2ui-divider { border: 0; border-top: 1px solid #eef1f6; margin: 2px 0; width: 100%; }
.a2ui-text { margin: 0; line-height: 1.45; }
.a2ui-h1, .a2ui-h2, .a2ui-h3, .a2ui-h4 { font-weight: 600; color: var(--leva-navy); font-size: 14px; }
.a2ui-h1, .a2ui-h2 { font-size: 16px; }
.a2ui-caption { color: var(--leva-muted); font-size: 12px; }
.a2ui-crop { margin: 0; }
.a2ui-crop svg { width: 100%; height: auto; max-height: 260px; display: block; background: #f5f7fb; border: 1px solid #eef1f6; border-radius: 6px; fill: initial; stroke: none; }
.a2ui-crop figcaption { font-size: 11px; color: var(--leva-muted); margin-top: 5px; }
/* The crop runs the card's full width (to its edges), whatever the panel. */
.a2ui-card .a2ui-crop { margin: 0 -16px; }
.a2ui-card .a2ui-crop svg { max-height: none; border-radius: 0; border-left: 0; border-right: 0; }
.a2ui-card .a2ui-crop figcaption { padding: 0 16px; }
.a2ui-more { white-space: nowrap; }
.a2ui-pin-dot { fill: var(--leva-navy); stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.a2ui-pin-text { fill: #fff; font-weight: 700; pointer-events: none; }
.a2ui-hit { fill: #ff6b3522; stroke: var(--leva-blue); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.a2ui-hit:hover { fill: #ff6b3544; }
.a2ui-field { display: flex; flex-direction: column; gap: 5px; }
.a2ui-label { font-size: 12px; font-weight: 550; color: var(--leva-navy); }
.a2ui-number { display: inline-flex; align-items: center; gap: 6px; }
.a2ui-number input { width: 130px; }
.a2ui-field input, .a2ui-field textarea { border: 1px solid #dce3ee; border-radius: var(--leva-radius-control); padding: 8px 10px; color: var(--leva-navy); font-size: 13px; background: #fff; }
.a2ui-unit { color: var(--leva-muted); }
.a2ui-range { color: var(--leva-muted); font-size: 11px; }
.a2ui-choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.a2ui-choices legend { margin-bottom: 6px; }
.a2ui-choice { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dce3ee; border-radius: 16px; padding: 5px 11px; cursor: pointer; }
.a2ui-choice:has(input:checked) { border-color: var(--leva-blue); background: #fff0eb; }
.a2ui-pin { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--leva-navy); color: #fff; font-size: 10px; align-items: center; justify-content: center; }
.a2ui-button { border: 1px solid #dce3ee; border-radius: var(--leva-radius-control); padding: 7px 12px; font-size: 12px; background: #fff; }
.a2ui-button.a2ui-primary { background: var(--leva-navy); border-color: var(--leva-navy); color: #fff; }
.a2ui-button.a2ui-keep { color: var(--leva-evidence); border-color: #bfe3db; background: #f1faf8; }
.a2ui-error { color: #a04148; font-size: 12px; margin: 8px 0 0; }
.a2ui-status { margin-top: 10px; font-size: 12px; }
.a2ui-status p { margin: 4px 0; }
.a2ui-resolved { color: var(--leva-evidence); }
.a2ui-updating-note { color: var(--leva-blue); font-weight: 600; }
.a2ui-changes { list-style: none; padding: 0; margin: 6px 0; }
.a2ui-changes li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid #eef1f6; }
.a2ui-change { font-family: var(--leva-font-data); white-space: nowrap; }
.a2ui-change s { color: var(--leva-muted); }
.a2ui-log summary, .a2ui-change-answer summary { cursor: pointer; color: var(--leva-muted); font-size: 11px; margin-top: 6px; }
.a2ui-log ol { margin: 6px 0 0; padding-left: 18px; color: var(--leva-muted); font-size: 11px; }
.a2ui-change-answer form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; align-items: flex-start; }
/* Joyne's question cards on the Quantities tab, and the pins that find them. */
.q-slot { padding: 10px 14px 12px; border-top: 1px solid #eef1f6; display: flex; flex-direction: column; gap: 6px; }
.boq-item .q-slot { padding-left: 22px; background: #fffdf8; }
.q-slot.q-focus { box-shadow: inset 3px 0 0 #e39b27; background: #fff8ec; }
.q-change { align-self: flex-start; padding: 5px 11px; border: 1px solid #d6dfea; border-radius: 6px; background: #fff; font-size: 11px; font-weight: 600; color: var(--leva-navy); }
.q-change:hover { border-color: var(--leva-blue); color: var(--leva-blue); }
.next-question { margin: 0 0 8px auto; align-self: flex-end; line-height: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #d6dfea; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--leva-navy); background: #fff; }
.next-question kbd { font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0 4px; border: 1px solid #dfe5ee; border-radius: 3px; color: #7b8797; }
.question-pin { cursor: pointer; }
.panel-tabs .next-question { padding: 3px 8px; border-bottom: 1px solid #d6dfea; color: var(--leva-navy); }
/* Price file (F12 slice 1). */
.price-page { max-width: 980px; }
.price-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.price-meta { margin: 0; color: #6b7686; font-size: 13px; }
.price-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border: 1.5px dashed #e8c9bb; border-radius: 12px; background: #fff7f3; cursor: pointer; text-align: center; }
.price-drop:hover { border-color: var(--leva-blue); }
.price-drop strong { font-size: 15px; color: var(--leva-navy); }
.price-drop span { font-size: 12px; color: #6b7686; }
.price-upload { margin: 18px 0; }
.price-error { color: #a04148; font-size: 13px; margin: 8px 0; }
.price-draft h2 { font-size: 15px; margin: 18px 0 10px; }
.price-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.price-columns label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6b7686; }
.price-columns select { padding: 7px 8px; border: 1px solid #cbd2de; border-radius: 6px; background: #fff; color: var(--leva-navy); font-size: 13px; }
.price-counts { font-size: 13px; margin: 6px 0 10px; }
.price-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table th { text-align: left; font-weight: 600; font-size: 11px; color: #6b7686; padding: 9px 12px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.price-table td { padding: 8px 12px; border-bottom: 1px solid #eef1f6; color: #26344d; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-table .sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: nowrap; }
.price-held { margin: 14px 0; font-size: 13px; }
.price-held summary { cursor: pointer; font-weight: 600; color: #8a5300; }
.held-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.held-list li { display: grid; grid-template-columns: 70px 190px 1fr; gap: 10px; padding: 6px 10px; border-radius: 6px; background: #fff8ec; }
.held-row { color: #6b7686; font-variant-numeric: tabular-nums; }
.held-problem { color: #8a5300; font-weight: 600; }
.held-what { color: #6b7686; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.price-actions > button:first-child { padding: 9px 14px; border: 1px solid #d6dfea; border-radius: 8px; background: #fff; }
.price-list form { margin: 18px 0 10px; }
.price-list input[type=search] { width: min(420px, 100%); padding: 9px 12px; border: 1px solid #cbd2de; border-radius: 8px; font-size: 13px; }
.price-empty { color: #6b7686; font-size: 13px; }
@media (max-width: 640px) { .held-list li { grid-template-columns: 1fr; gap: 2px; } }
.price-drop { position: relative; } .price-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
/* Quote tab (F15 slice 1): each line priced from the price file, totals, download. */
.quote-tab { overflow: auto; }
.quote-empty { padding: 18px 14px; color: #6b7686; font-size: 13px; }
.quote-lines { display: flex; flex-direction: column; }
.quote-line { padding: 12px 14px; border-bottom: 1px solid #eef1f6; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.quote-line.ql-suggested { background: #fffdf8; box-shadow: inset 3px 0 0 #e39b27; }
.quote-line.ql-unmatched { box-shadow: inset 3px 0 0 #c9d2e3; }
.quote-line.ql-excluded { opacity: .7; }
.ql-head { display: flex; justify-content: space-between; gap: 8px; }
.ql-label { font-weight: 600; color: var(--leva-navy); }
.ql-qty { color: #6b7686; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ql-product { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #26344d; }
.ql-product small { display: block; color: #6b7686; margin-top: 2px; }
.ql-muted { color: #7b8797; }
.ql-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ql-actions button, .ql-product button { padding: 4px 9px; border: 1px solid #d6dfea; border-radius: 6px; background: #fff; font-size: 11px; font-weight: 600; color: var(--leva-navy); }
.ql-actions .ql-right { color: var(--leva-evidence, var(--teal)); border-color: #bfe3db; background: #f1faf8; }
.ql-numbers { display: flex; gap: 8px; }
.ql-numbers label { display: flex; flex-direction: column; gap: 2px; font-size: 10px; color: #7b8797; flex: 1; }
.ql-numbers input { width: 100%; padding: 5px 7px; border: 1px solid #d6dfea; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.ql-order { margin: 0; display: flex; justify-content: space-between; color: #6b7686; font-variant-numeric: tabular-nums; }
.ql-order b { color: var(--leva-navy); }
.ql-note { margin: 0; font-size: 11px; line-height: 1.4; color: #5a6678; }
.ql-error { margin: 0; color: #a04148; }
.ql-find { display: flex; flex-direction: column; gap: 4px; }
.ql-find input { width: 100%; padding: 6px 8px; border: 1px solid #ffd3c2; border-radius: 6px; font-size: 12px; }
.ql-result { text-align: left; padding: 6px 8px; border-radius: 6px; font-size: 12px; }
.ql-result:hover { background: #f1f4ff; }
.ql-result small { display: block; color: #6b7686; }
.quote-totals { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.quote-totals p { margin: 0; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.quote-totals .quote-total { font-size: 15px; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--border); }
.quote-confirm-all { padding: 9px 12px; border: 1px solid #bfe3db; border-radius: 8px; background: #f1faf8; color: var(--leva-evidence, var(--teal)); font-weight: 650; }
.quote-blockers { margin: 4px 0 0; padding-left: 18px; color: #8a5300; font-size: 12px; }
.quote-download { display: block; text-align: center; padding: 10px 12px; border-radius: 8px; background: var(--leva-navy); color: #fff; font-weight: 650; text-decoration: none; }
.quote-totals { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 14px #1320330a; }
.quote-send-open { padding: 9px 12px; border: 1px solid #d6dfea; border-radius: 8px; background: #fff; color: var(--leva-navy); font-weight: 650; }
.quote-send { display: flex; gap: 6px; }
.quote-send input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #ffd3c2; border-radius: 8px; font-size: 13px; }
.quote-send button { padding: 8px 14px; border-radius: 8px; background: var(--leva-navy); color: #fff; font-weight: 650; }
.quote-versions { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.quote-versions li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; color: #6b7686; }
.quote-versions a { font-weight: 650; color: var(--leva-blue); }
.quote-versions b { color: var(--leva-navy); font-variant-numeric: tabular-nums; }
/* Job stages (ADR 024): the pill, and its menu on the job page. */
.stage-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; background: #eef1f6; color: #4b5870; }
.stage-new { background: #eef1f6; color: #4b5870; }
.stage-measuring { background: #e8efff; color: #963d1b; }
.stage-to_check { background: #fff4e0; color: #8a5300; }
.stage-ready_to_quote { background: #e6f4f1; color: #006b5e; }
.stage-quoted { background: #efe9ff; color: #5a3aa8; }
.stage-won { background: #dff5e3; color: #1d6b2e; }
.stage-lost { background: #fbe9ea; color: #9b3940; }
.job-title { display: inline-flex; align-items: center; gap: 8px; }
/* The job's name, edited in place: text until hovered or focused. */
.job-title-input { field-sizing: content; min-width: 4ch; max-width: 360px; margin: -3px -6px; padding: 2px 6px; font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 6px; text-overflow: ellipsis; pointer-events: auto; }
.job-title-input:hover { border-color: #d6dfea; }
.job-title-input:focus { outline: none; background: #fff; border-color: var(--leva-blue); box-shadow: 0 0 0 3px rgba(255, 107, 53, .18); }
.stage-menu { position: relative; pointer-events: auto; }
.stage-menu > summary { cursor: pointer; list-style: none; }
.stage-menu > summary::-webkit-details-marker { display: none; }
.stage-menu-body { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 210px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px #1320331f; display: flex; flex-direction: column; gap: 1px; font-size: 12px; font-weight: 500; }
.stage-menu-body button { text-align: left; padding: 6px 8px; border-radius: 6px; color: var(--leva-navy); }
.stage-menu-body button:hover { background: #f1f4f9; }
.stage-menu-body button.current { font-weight: 700; background: #fff0eb; }
.stage-menu-label { margin: 6px 8px 2px; font-size: 10px; color: #7b8797; text-transform: uppercase; letter-spacing: .04em; }
.stage-menu-body form { border-top: 1px solid var(--border); margin-top: 6px; padding: 8px 8px 4px; }
.stage-menu-body label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #7b8797; }
.stage-menu-body select { padding: 5px 6px; border: 1px solid #d6dfea; border-radius: 6px; font-size: 12px; color: var(--leva-navy); }
.sheet-title > span.job-title:first-child { overflow: visible; max-width: none; }
.stage-new { background: #fff; border: 1px solid #d6dfea; }
.canvas-top:has(.stage-menu[open]) { z-index: 40; }
