@charset "UTF-8";
:root{--green:#245448;--green-dark:#1c443a;--green-soft:#eaf2ed;--ink:#263a33;--muted:#7a867f;--border:#e4e9e5;--canvas:#eef1ee;--white:#fff;--danger:#a54545;--shadow:0 3px 14px #19362a09;--zoom:1;color-scheme:light;font-family:Arial,Helvetica,sans-serif;font-size:13px;color:var(--ink);background:var(--canvas)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.35}button,input,select{outline:none}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #5c9d85;outline-offset:2px}a{color:var(--green)}button{border:0;background:none}input,select{border:1px solid var(--border);border-radius:5px;background:white}input::placeholder{color:#97a09a}svg{width:18px;height:18px;display:block;stroke-width:1.65;flex-shrink:0} [data-icon]{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.small-icon svg{width:13px;height:13px}.hidden{display:none!important}#app{height:100dvh;display:flex;flex-direction:column;overflow:hidden}.app-header{height:78px;flex-shrink:0;background:white;display:flex;align-items:center;padding:0 24px;gap:30px;border-bottom:1px solid #edf0ed}.brand{display:flex;align-items:center;gap:10px;padding:0;letter-spacing:-.6px;text-align:left;font-family:Georgia,serif;font-size:25px;font-weight:bold;color:var(--green);line-height:1.05;flex-shrink:0}.brand-mark{width:39px;height:42px;background:var(--green);border-radius:10px;color:white}.brand-mark svg{width:24px;height:24px;stroke-width:1.45}.brand-sub{font:8px Arial,sans-serif;letter-spacing:2.3px;display:block;margin-top:5px}.document-heading{border-left:1px solid var(--border);padding-left:28px;display:flex;flex-direction:column;min-width:120px;gap:6px;flex:1}.document-heading input{border:0;font-size:16px;font-weight:600;padding:0;width:100%;max-width:420px;background:transparent;letter-spacing:-.2px}.document-heading input:hover{background:#f6f8f5}.save-state{font-size:10.5px;color:var(--muted);display:flex;align-items:center;gap:6px}.state-dot{display:inline-block;width:6px;height:6px;background:#79a88c;border-radius:50%;flex-shrink:0}.save-state.error{color:var(--danger)}.save-state.error .state-dot{background:var(--danger)}.header-actions{display:flex;align-items:center;gap:8px}.button{min-height:36px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:500;padding:8px 13px;white-space:nowrap;transition:background .14s,border-color .14s}.button svg{width:16px;height:16px}.button.primary{background:var(--green);color:#fff;border:1px solid var(--green)}.button.primary:hover{background:var(--green-dark)}.button.quiet{color:#5a6961;border:1px solid transparent}.button.quiet:hover{background:#f0f4f0}.button.outline{border:1px solid #dce4de;background:#fff}.button.outline:hover{background:#f5f8f5;border-color:#bed0c3}.button.small{min-height:31px;font-size:11.5px;padding:6px 9px;gap:5px}.button.full{width:100%}.button.danger{background:var(--danger);color:white}.danger-quiet{color:var(--danger)}.danger-quiet:hover{background:#faf0ef}.icon-button,.tool{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:4px;flex-shrink:0;color:#506158}.icon-button:hover,.tool:hover{background:#edf2ee}.help-button{margin-left:5px;border:1px solid var(--border);border-radius:50%;width:30px;height:30px}.tabs{height:40px;flex-shrink:0;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid var(--border)}.tab-list{display:flex;height:100%;gap:28px}.tab{position:relative;font-size:12px;color:#7a857d;padding:0 2px;display:flex;align-items:center;gap:6px}.tab.active{color:var(--green);font-weight:600}.tab.active:after{position:absolute;bottom:0;height:2px;background:var(--green);left:0;right:0;content:""}.tab.table-tab{color:var(--green)}.tab.table-tab svg{width:14px;height:14px}.toolbars{flex-shrink:0;background:white;border-bottom:1px solid #dce3dd;box-shadow:0 2px 5px #24382e03;z-index:9}.toolbar{height:57px;display:flex;align-items:center;padding:0 22px;gap:12px;overflow-x:auto;scrollbar-width:thin}.tool-group{display:flex;align-items:center;gap:2px;border-right:1px solid var(--border);padding-right:12px;flex-shrink:0}.tool-group.last{border:0;padding-right:0;flex:1;justify-content:flex-end}.toolbar select{height:30px;font-size:11.5px;padding:0 6px;background:white;border-color:#e5eae6;max-width:135px}.font-group{gap:4px}.font-group #fontFamily{width:108px}.font-group #fontSize{width:51px}#textStyle{width:116px}.tool.active{background:#e8f0ea;color:var(--green)}.text-tool{font-size:16px;font-family:Georgia,serif}.bold{font-weight:bold}.italic{font-style:italic}.underline{text-decoration:underline}.strike{text-decoration:line-through}.color-tool{height:32px;width:32px;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer}.color-tool:hover{background:#edf2ee}.color-tool input,.custom-color input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.color-strip{height:3px;width:15px;position:absolute;bottom:3px;left:9px;background:#26352f}.ribbon-action{display:flex;align-items:center;gap:7px;height:34px;border-radius:5px;padding:0 10px;white-space:nowrap;font-size:12px;color:#52635a}.ribbon-action:hover{background:#edf3ee}.ribbon-action svg{width:19px;height:19px}.separator{height:23px;width:1px;background:var(--border);flex-shrink:0}.toolbar-note{font-size:11px;color:var(--muted);margin-left:auto;white-space:nowrap}.inline-field{display:flex;align-items:center;gap:8px;font-size:11px;white-space:nowrap}.workspace{flex:1;display:flex;min-height:0;overflow:hidden}.canvas{background:var(--canvas);flex:1;overflow:auto;padding:25px 36px 24px;min-width:0;position:relative;scrollbar-color:#cbd5cd transparent;scrollbar-width:thin}.workspace-caption{display:flex;justify-content:space-between;align-items:center;margin:0 auto 18px;max-width:1040px;font-size:9px;letter-spacing:1.4px;color:#8c978f}.workspace-caption>span:first-child{display:flex;align-items:center;gap:7px}.workspace-caption>span:last-child{font-size:10px;letter-spacing:.2px;color:#7e8b82}.caption-dot{width:5px;height:5px;border-radius:50%;background:#8fa499}.ruler-wrap{height:22px;margin:0 auto 9px;width:210mm;zoom:var(--zoom);color:#8a958e;position:relative}.ruler{position:absolute;top:0;left:0;right:0;height:22px;border-bottom:1px solid #ccd6ce;background:repeating-linear-gradient(to right,transparent 0,transparent calc(5mm - 1px),#bdc9c0 calc(5mm - 1px),#bdc9c0 5mm) bottom/100% 4px no-repeat}.ruler span{position:absolute;font-size:9px;bottom:7px;transform:translateX(-50%)}.ruler span:after{content:"";position:absolute;width:1px;height:7px;background:#afbeb3;top:14px;left:50%}.page-shell{margin:auto;width:210mm;zoom:var(--zoom);padding-bottom:1px}.paper{background:#fff;min-height:297mm;width:210mm;padding:18mm;box-shadow:0 2px 5px #263a3310,0 8px 30px #263a3305;border:1px solid #e0e5df;position:relative;border-radius:1px}.ProseMirror{outline:none;font-family:Arial,Helvetica,sans-serif;font-size:11pt;line-height:1.5;color:#29372f;overflow-wrap:break-word;min-height:252mm;white-space:pre-wrap}.ProseMirror p{margin:0 0 10px}.ProseMirror h1{font-size:28pt;font-weight:600;line-height:1.15;letter-spacing:-.7px;margin:0 0 15px;color:#234a3e}.ProseMirror h2{font-size:16pt;line-height:1.3;letter-spacing:-.2px;margin:25px 0 12px;color:#2e4a3c;font-weight:600}.ProseMirror h3{font-size:12.5pt;margin:18px 0 8px}.ProseMirror ul,.ProseMirror ol{padding-left:24px;margin:10px 0 14px}.ProseMirror li p{margin:3px 0}.ProseMirror blockquote{border-left:3px solid #9bbba6;margin:15px 0;padding:3px 0 3px 17px;color:#6e7f72}.ProseMirror hr{border:0;border-top:1px solid #d5dfd6;margin:22px 0}.ProseMirror img{max-width:100%;height:auto;display:inline-block}.ProseMirror a{color:#276f75;text-decoration:underline}.ProseMirror pre{background:#f1f4f0;padding:14px;border-radius:4px;font-size:10pt;white-space:pre-wrap}.ProseMirror code{font-family:"Courier New",monospace;font-size:.9em;background:#f4f6f2;padding:1px 3px}.ProseMirror .is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:#a0aaa1;pointer-events:none;height:0}.ProseMirror .tableWrapper{overflow-x:auto;margin:18px 0;scrollbar-width:thin}.ProseMirror table{border-collapse:collapse;table-layout:fixed;margin:0;width:100%;overflow:visible;border-spacing:0;font-size:10.5pt}.ProseMirror td,.ProseMirror th{min-width:48px;border:1px solid #cdd8d0;padding:8px;vertical-align:top;position:relative;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;word-break:normal;height:auto;text-align:left}.ProseMirror td p,.ProseMirror th p{margin:0 0 5px}.ProseMirror td p:last-child,.ProseMirror th p:last-child{margin:0}.ProseMirror th{font-weight:600;background:#e5efea;color:#2b4e3e}.ProseMirror table[data-theme="sage"] th,.ProseMirror table[data-table-theme="sage"] th{background:#e5efea}.ProseMirror table[data-theme="blue"] th,.ProseMirror table[data-table-theme="blue"] th{background:#e5edf6;color:#2b4961}.ProseMirror table[data-theme="plain"] th,.ProseMirror table[data-table-theme="plain"] th{background:#f4f5f3;color:#303a34}.ProseMirror .selectedCell:after{content:"";position:absolute;inset:0;background:#4678601c;pointer-events:none;z-index:2;outline:1.5px solid #518b6c;outline-offset:-1.5px}.ProseMirror .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background:#609879;z-index:20;pointer-events:none}.resize-cursor{cursor:col-resize!important}.row-resize-grip{height:7px!important;cursor:row-resize;pointer-events:auto;background:transparent;border-top:2px solid #62977b;color:#46765d}.row-resize-grip:after{content:"";position:absolute;left:-10px;top:-5px;width:8px;height:8px;border-radius:3px;background:#62977b;border:1px solid white}.row-resize-tooltip{position:fixed;z-index:10001;background:#244d3e;color:white;font:11px Arial;padding:5px 8px;border-radius:4px;pointer-events:none;box-shadow:0 2px 8px #0002}body.is-row-resizing,body.is-row-resizing *{cursor:row-resize!important;user-select:none!important}.page-break{height:30px;border-top:1px dashed #b6c7b9;margin:28px -20px 10px;position:relative;user-select:none}.page-break:after{content:"SALT DE PAGINĂ";position:absolute;top:-7px;left:50%;transform:translateX(-50%);background:white;color:#92a295;font:9px Arial;letter-spacing:1px;padding:0 10px}.search-result{background:#ffedb3;border-radius:2px}.search-result.current{background:#ffce71}.canvas-tip{max-width:max-content;margin:20px auto 0;background:#e4eae4;border:1px solid #dae3da;padding:9px 12px;border-radius:6px;display:flex;gap:8px;align-items:center;font-size:10.5px;color:#718274}.canvas-tip svg{width:14px;height:14px}.canvas-tip button{color:#9ba89c;padding:0;margin-left:8px}.canvas-bottom{text-align:center;margin-top:13px;color:#97a498;font-size:9px;letter-spacing:.2px}.properties-panel{width:278px;flex-shrink:0;background:#fff;border-left:1px solid var(--border);overflow-y:auto;scrollbar-width:thin}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:18px 18px 14px}.panel-heading h2{font-size:13px;letter-spacing:-.15px;margin:0;font-weight:600}.panel-heading .tool{width:25px;height:25px;color:#8c978e}.panel-heading svg{width:15px;height:15px}.selection-summary{display:flex;align-items:center;justify-content:space-between;font-size:9.5px;color:#869187;margin:0 18px 17px}.badge{border-radius:4px;display:inline-flex;gap:5px;align-items:center;background:#edf3ed;padding:5px 7px;font-size:10px;color:#4f705b}.badge svg{width:13px;height:13px}.property-section{border-top:1px solid #edf0eb;padding:17px 18px}.property-section h3{margin:0 0 14px;font-size:9px;color:#8a978c;letter-spacing:1.25px;font-weight:600}.dimension-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dimension-grid label{font-size:10.5px;color:#748277;display:flex;flex-direction:column;gap:8px}.unit-input{position:relative}.unit-input input{width:100%;height:34px;padding:5px 25px 5px 10px;font-size:12px;font-weight:500;color:#36543f}.unit-input span{position:absolute;right:9px;top:10px;font-size:10px;color:#97a096;pointer-events:none}.unit-input input::-webkit-inner-spin-button{appearance:none}.switch-row{display:flex;align-items:center;justify-content:space-between;position:relative;font-size:11px;color:#4f6556;margin:16px 0 8px;cursor:pointer}.switch-row input{position:absolute;right:0;opacity:0;width:32px;height:18px;cursor:pointer}.switch{width:29px;height:17px;background:#c4cec6;border-radius:10px;position:relative;pointer-events:none;transition:background .15s}.switch:after{position:absolute;width:11px;height:11px;background:white;content:"";left:3px;top:3px;border-radius:50%;transition:transform .15s}.switch-row input:checked+.switch{background:var(--green)}.switch-row input:checked+.switch:after{transform:translateX(12px)}.switch-row input:focus-visible+.switch{outline:2px solid #67a684;outline-offset:2px}.field-help{font-size:10px;line-height:1.6;color:#92a095;margin:9px 0 14px}.pair-buttons{display:flex;gap:7px;margin-top:8px}.pair-buttons>*{flex:1}.pair-buttons .button{padding-left:6px;padding-right:6px;font-size:10px;gap:5px}.pair-buttons .button svg{width:13px;height:13px}.field-label{display:block;font-size:10.5px;color:#748277;margin-bottom:8px}.segmented{display:flex;border:1px solid #dfe6df;border-radius:5px;padding:3px;gap:2px}.segmented button{flex:1;height:29px;display:flex;gap:5px;align-items:center;justify-content:center;font-size:10px;color:#809084;border-radius:3px}.segmented button svg{width:14px;height:14px}.segmented button.active{background:#edf3ed;color:#365e44}.segmented button:hover{background:#f2f6f0}.property-line{display:flex;justify-content:space-between;align-items:center;margin:13px 0;font-size:10.5px;color:#738276;gap:8px}.property-line select{height:29px;padding:0 5px;font-size:10px;width:100px}.swatches{display:flex;gap:8px;align-items:center;margin:10px 0 15px}.swatch{width:23px;height:23px;border-radius:50%;background:var(--swatch);border:1px solid #d5ddd6;padding:0;position:relative;flex-shrink:0}.swatch.active{outline:2px solid #6a9677;outline-offset:2px}.swatch.no-fill{background:linear-gradient(135deg,white 45%,#dba8a4 47%,#dba8a4 52%,white 54%)}.custom-color{display:flex;align-items:center;justify-content:center;background:#fff;cursor:pointer}.custom-color svg{width:12px;height:12px;color:#6d8274}.table-themes{display:flex;gap:8px}.theme-card{border:1px solid #e2e8e1;border-radius:5px;flex:1;padding:8px 7px;font-size:9px;color:#8c978b;display:flex;flex-direction:column;align-items:center;gap:7px}.theme-card:hover{background:#f6f8f4}.theme-card.active{border-color:#72987f;background:#f5f9f3;color:#3d664a}.mini-table{display:block;width:52px;height:31px;border:1px solid #b9cabd;background:linear-gradient(to right,transparent 48%,#cbd6cc 49%,#cbd6cc 51%,transparent 52%),repeating-linear-gradient(to bottom,transparent 0,transparent 9px,#cbd6cc 9px,#cbd6cc 10px);position:relative}.mini-table:after{content:"";position:absolute;left:0;right:0;top:0;height:9px;background:#e1eee4;z-index:0}.mini-table.plain:after{background:#f1f3ef}.mini-table.blue:after{background:#dde9f6}.structure-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px}.structure-grid .button{font-size:9.5px;padding:5px;justify-content:flex-start}.structure-grid svg{width:12px;height:12px}.select-actions{justify-content:flex-start;gap:12px;margin:9px 0 12px}.select-actions button{font-size:9px;text-decoration:underline;text-underline-offset:3px;color:#71917a;padding:0}.structure-section .danger-quiet{font-size:9.5px}.table-empty{text-align:center;padding:38px 24px;color:#829285}.empty-table-icon{height:58px;width:58px;border-radius:14px;background:#f0f5ed;margin-bottom:12px;color:#7a9e80}.empty-table-icon svg{width:29px;height:29px;stroke-width:1.3}.table-empty h3{font-family:Georgia,serif;font-size:18px;color:#52725b;font-weight:normal}.table-empty p{font-size:11px;line-height:1.8;margin:12px 0 20px}.table-empty .button{font-size:11px}.empty-tips{border-top:1px solid #edf1e9;padding-top:18px;margin-top:40px;text-align:left}.empty-tips p{display:flex;align-items:center;gap:11px;font-size:10px;margin:12px 0}.empty-tips svg{width:15px;height:15px;color:#96ab97}.statusbar{height:34px;background:#fff;border-top:1px solid #dfe5dc;display:flex;align-items:center;justify-content:space-between;padding:0 20px;flex-shrink:0;font-size:10px;color:#8b988d;z-index:8}.statusbar>div{display:flex;align-items:center;gap:14px;height:100%}.status-divider{height:11px;width:1px;background:#e0e6dd}.editable-status{display:flex;align-items:center;gap:6px;color:#638169}.statusbar select{border:0;background:#fff;font-size:10px;color:#738675;width:68px;height:26px}.status-button{width:20px;padding:0;color:#7f927f}.status-button svg{width:13px;height:13px}.documents-panel{background:#fbfcfa;width:237px;border-right:1px solid var(--border);flex-shrink:0;padding:0 13px;display:flex;flex-direction:column;overflow:auto}.documents-panel .panel-heading{padding:18px 5px 16px}.documents-panel h2{font-size:12px}.new-document{width:100%;margin-bottom:14px;font-size:11px}.search-docs{display:flex;position:relative}.search-docs input{width:100%;height:31px;padding:6px 10px 6px 28px;background:#f6f8f4;font-size:10px}.search-docs [data-icon]{position:absolute;left:8px;top:9px;color:#99a694}.search-docs svg{width:12px;height:12px}#documentList{display:flex;flex-direction:column;gap:7px;padding-top:14px;flex:1}.doc-card{border:1px solid transparent;border-radius:7px;padding:12px 9px;display:flex;align-items:flex-start;gap:9px;cursor:pointer;position:relative}.doc-card:hover{background:#f0f4ee}.doc-card.active{background:#ebf2e9;border-color:#dce6d9}.doc-card>svg{color:#7a9a7c;width:18px;height:21px;flex-shrink:0;margin-top:1px}.doc-card-content{flex:1;min-width:0}.doc-card h3{font-size:10.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0 6px;color:#4e6650;max-width:140px}.doc-card p{font-size:9px;color:#95a190;margin:0}.doc-card .doc-actions{position:absolute;bottom:7px;right:5px;display:flex;gap:2px;opacity:0}.doc-card:hover .doc-actions,.doc-card:focus-within .doc-actions{opacity:1}.doc-actions button{padding:3px;background:#f7faf4;border-radius:3px;color:#8e9e87}.doc-actions svg{height:12px;width:12px}.local-note{display:flex;gap:8px;color:#9aa692;border-top:1px solid #e5eade;padding:14px 1px;margin-top:15px;flex-shrink:0}.local-note>span{align-self:flex-start;margin-top:2px}.local-note svg{height:14px;width:14px}.local-note p{font-size:9px;line-height:1.7;margin:0}.dropdown-anchor{position:relative}.menu{position:absolute;right:0;top:calc(100% + 9px);background:white;border:1px solid var(--border);border-radius:9px;box-shadow:0 10px 35px #182f2425;padding:7px;z-index:200;min-width:270px}.menu button{display:flex;gap:10px;align-items:center;width:100%;text-align:left;padding:10px;border-radius:5px;font-size:12px}.menu button:hover{background:#f0f5ee}.menu small{display:block;font-size:10px;color:#96a08f;margin-top:4px}.menu button svg{width:17px;height:17px;color:#6f8770}.menu-line{border-top:1px solid var(--border);margin:5px}.find-bar{display:flex;gap:8px;align-items:center;padding:8px 24px;background:#f7faf5;border-bottom:1px solid #dee6d9;flex-shrink:0}.find-bar input{height:30px;padding:5px 8px;width:180px;font-size:11px}.find-bar #findCount{font-size:10px;color:#96a08f;min-width:70px}.find-bar .tool{width:26px;height:26px}.find-bar .button{font-size:10px}.find-bar>span svg{width:15px;height:15px;color:#82977b}dialog{border:1px solid #dfe7da;border-radius:13px;box-shadow:0 25px 90px #142d2450;padding:26px;width:min(440px,calc(100vw - 32px));color:var(--ink)}dialog::backdrop{background:#1a2e243b;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.dialog-heading h2{font-family:Georgia,serif;font-size:24px;font-weight:normal;margin:6px 0 12px;letter-spacing:-.6px}.dialog-heading .tool{width:27px;height:27px;color:#8c9c87}.eyebrow{font-size:9px;letter-spacing:1.4px;color:#8c9b86}.muted{font-size:12px;color:#94a08d;line-height:1.6;margin:5px 0 18px}.table-picker{display:grid;grid-template-columns:repeat(8,1fr);gap:5px;max-width:290px;margin:20px auto 12px}.picker-cell{height:24px;border:1px solid #d6dfd0;background:#f7f9f4;border-radius:2px}.picker-cell.selected{background:#d7e7d7;border-color:#92b595}.picker-caption{text-align:center;font-size:11px;color:#64845f;margin:13px 0 20px}dialog .dimension-grid input{width:100%;padding:8px 10px;height:37px}dialog .dimension-grid label{font-size:12px}.checkbox-row{display:flex;gap:8px;align-items:center;font-size:12px;color:#78866e;margin:18px 0}.checkbox-row input{accent-color:var(--green)}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:23px;padding-top:18px;border-top:1px solid #eaf0e3}.dialog-actions .button{font-size:12px}.block-field{display:flex;gap:12px;flex-direction:column;margin-top:15px;font-size:12px;color:#7b8f72}.block-field input{padding:10px;width:100%}.help-dialog{width:min(610px,calc(100vw - 32px));max-height:85dvh}.help-content{font-size:12px;color:#7d8c72;line-height:1.8}.help-content h3{font-size:13px;color:#486a3f;margin:24px 0 7px}.help-content p{margin:7px 0 12px}.help-content strong{color:#5c7a50;font-weight:600}.shortcut-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px;margin:20px 0}.shortcut-grid span{display:flex;justify-content:space-between}kbd{padding:2px 5px;border-radius:4px;border:1px solid #dae3d1;background:#f6f8f2;font:10px Arial;box-shadow:0 1px 0 #e1e8d8}.license-note{font-size:10px;color:#9da991;border-top:1px solid #e5ebdd;padding-top:13px}.toast{position:fixed;bottom:54px;left:50%;transform:translateX(-50%);background:#244d3b;color:white;box-shadow:0 5px 22px #24382e25;padding:12px 18px;border-radius:7px;font-size:12px;z-index:99999;max-width:min(600px,90vw);line-height:1.6}.toast.error{background:#873f38}.busy-overlay{position:fixed;inset:0;background:#f5f8efaa;z-index:100000;display:grid;place-items:center;backdrop-filter:blur(2px)}.busy-overlay>div{background:white;padding:25px 40px;border:1px solid #dee6d4;border-radius:12px;box-shadow:0 10px 40px #34512716;display:flex;align-items:center;gap:13px}.busy-overlay p{font-size:12px;color:#6f8462}.spinner{width:21px;height:21px;border:2px solid #d5e2d0;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1550px){.canvas{padding-left:50px;padding-right:50px}.properties-panel{width:292px}.property-section{padding-left:22px;padding-right:22px}.panel-heading{padding-left:22px;padding-right:22px}.selection-summary{margin-left:22px;margin-right:22px}}
@media(max-width:1200px){.app-header{gap:18px;padding:0 18px}.document-heading{padding-left:18px}.toolbar{padding:0 12px;gap:7px}.tool-group{padding-right:7px}.tool{width:29px}.canvas{padding:23px 22px}.properties-panel{width:256px}.property-section{padding-left:14px;padding-right:14px}.panel-heading{padding-left:14px;padding-right:14px}.selection-summary{margin-left:14px;margin-right:14px}.swatches{gap:7px}.brand{font-size:23px}.header-actions{gap:3px}.toolbar-note{display:none}}
@media(max-width:1000px){.header-actions .quiet .label{display:none}.header-actions .quiet{padding:7px 9px}.canvas{padding:20px 14px}.documents-panel{position:absolute;top:175px;bottom:34px;left:0;z-index:30;box-shadow:7px 0 25px #20372115}.app-header{height:73px}.tabs{padding:0 18px}.properties-panel{width:240px}.dimension-grid{gap:8px}.property-section{padding:15px 12px}.swatches{gap:6px}.swatch{width:22px;height:22px}.theme-card{padding:7px 5px}.mini-table{width:49px}.property-line{font-size:10px}.status-layout{display:none}}
@media(max-width:760px){.brand-sub{display:none}.brand>span:last-child{display:none}.brand-mark{width:32px;height:35px;border-radius:8px}.brand-mark svg{width:21px;height:21px}.document-heading{border:0;padding-left:0}.app-header{gap:12px;padding:0 12px;height:67px}.document-heading input{font-size:13px}.save-state{font-size:8px}.header-actions .button{min-height:32px;padding:6px 9px;font-size:11px}.header-actions .help-button{display:none}.header-actions #documentsButton{display:none}.properties-panel{position:absolute;right:0;top:164px;bottom:34px;z-index:30;width:267px;box-shadow:-10px 0 35px #25422c18}.tabs{padding:0 12px}.tab-list{gap:22px}.tabs>.button{font-size:10px}.toolbar{height:57px}.toolbar .tool-group.last{margin-right:6px}.workspace-caption{font-size:8px;letter-spacing:1px}.workspace-caption>span:last-child{display:none}.canvas{padding:18px 12px}.statusbar{padding:0 10px;font-size:9px}.statusbar>div{gap:7px}.editable-status{display:none}.editable-status+.status-divider{display:none}#selectionStatus{max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.find-bar{padding:7px 10px;flex-wrap:wrap;gap:5px}.find-bar input{width:130px}.find-bar #findCount{min-width:55px;font-size:9px}.find-bar .button{font-size:9px;padding:4px}.find-bar .separator{display:none}.canvas-tip{font-size:9px;max-width:90%;line-height:1.5}.canvas-bottom{font-size:8px}.documents-panel{top:164px}.help-dialog{padding:20px}.help-dialog h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{body{background:white}#app{height:auto;overflow:visible}.app-header,.tabs,.toolbars,.statusbar,.properties-panel,.documents-panel,.workspace-caption,.ruler-wrap,.canvas-tip,.canvas-bottom,.find-bar,dialog,.toast,.row-resize-grip{display:none!important}.workspace,.canvas{display:block;overflow:visible;padding:0}.page-shell{width:auto!important;zoom:1!important}.paper{border:0;box-shadow:none;padding:0!important;min-height:0;width:auto!important}.ProseMirror{min-height:0}.ProseMirror .tableWrapper{overflow:visible}tr{break-inside:avoid}.page-break{break-before:page;border:0;height:0;margin:0}.page-break:after{display:none}}
.tab-actions{display:flex;gap:8px;align-items:center}.tab-actions>[data-action="insertTable"]{color:var(--green);font-weight:600}.toolbar #pasteMode{width:155px;max-width:155px;font-size:10px}.table-menu-trigger{position:fixed;z-index:75;background:white;color:var(--green);border:1px solid #cddccf;border-radius:5px;width:29px;height:25px;padding:0;box-shadow:0 2px 8px #203c2810;font-size:24px;line-height:18px;letter-spacing:1px}.table-menu-trigger:hover,.table-menu-trigger[aria-expanded="true"]{background:#e6f1e7;border-color:#7ca78b}.table-context-menu{position:fixed;z-index:500;width:290px;max-height:calc(100dvh - 16px);overflow:auto;scrollbar-width:thin;background:#fff;border:1px solid #d9e4d8;border-radius:9px;padding:6px;box-shadow:0 10px 45px #20382a35}.context-heading{display:flex;align-items:center;justify-content:space-between;padding:8px 9px 10px;font-size:11px;color:#48704d}.context-heading>span{display:flex;gap:7px;align-items:center}.context-heading svg{width:14px;height:14px}.context-heading small{font-size:9px;color:#95a28e}.context-group{border-top:1px solid #edf1e9;padding:4px 0}.context-group button{display:flex;align-items:center;gap:9px;width:100%;padding:8px 10px;text-align:left;border-radius:5px;font-size:11px;color:#4f6651;min-height:31px}.context-group button:hover,.context-group button:focus-visible{background:#eef5e9;outline:none}.context-group button:disabled{opacity:.35}.context-group button svg{width:15px;height:15px}.context-hint{font-size:9px;color:#99a58f;margin:4px 10px 5px}.context-two-col{display:grid;grid-template-columns:1fr 1fr}.context-two-col button{font-size:10px;padding:8px 6px;gap:5px}.context-delete button{color:#a2534b}.open-dialog{width:min(540px,calc(100vw - 32px))}.import-dropzone{width:100%;border:1px dashed #afc6ab;background:#f5f9ef;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:28px 18px;margin:12px 0 23px;color:var(--green)}.import-dropzone:hover{background:#edf5e5;border-color:#6d9669}.import-dropzone svg{width:28px;height:28px;stroke-width:1.4}.import-dropzone strong{font-size:14px;font-weight:600}.import-dropzone>span:last-child{font-size:10px;color:#94a18b}.format-list{display:flex;flex-direction:column;gap:14px}.format-list>div{display:grid;grid-template-columns:145px 1fr;gap:14px;font-size:10px;line-height:1.65}.format-list b{font-weight:600;color:#6d825e}.format-list span{color:#8d9b80}.import-note{font-size:10px;line-height:1.7;color:#95a28c;margin-top:18px}.import-mode{display:flex;align-items:flex-start;gap:12px;border:1px solid #e1e8d9;border-radius:8px;padding:15px 12px;margin:12px 0;cursor:pointer}.import-mode:has(input:checked){background:#f2f8eb;border-color:#9db48d}.import-mode input{accent-color:var(--green);margin-top:3px}.import-mode strong{font-size:12px;font-weight:600;color:#56734b;display:block;margin-bottom:6px}.import-mode small{font-size:10px;line-height:1.7;color:#92a086;display:block}.import-report-dialog{width:min(570px,calc(100vw - 32px));max-height:85dvh}.import-report-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.import-pill{display:inline-block;border-radius:20px;font-size:10px;background:#eaf3e4;color:#527346;padding:6px 10px}.import-statistics{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0}.import-stat{flex:1;min-width:80px;background:#f6f8f2;border:1px solid #e7eddf;border-radius:7px;padding:11px;text-align:center}.import-stat strong{display:block;font-size:20px;font-weight:500;color:#52723f}.import-stat span{font-size:9px;color:#8f9d81;margin-top:5px;display:block}#importWarnings{font-size:11px;color:#7c8e6d;line-height:1.8}#importWarnings ul{margin:0;padding-left:18px}#importWarnings li{margin:8px 0}.download-ready{position:fixed;z-index:2000;bottom:48px;right:24px;border:1px solid #d8e2d0;background:white;border-radius:10px;box-shadow:0 10px 40px #233d2625;padding:14px;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 30px)}.download-ready>span:nth-child(2){display:flex;flex-direction:column;gap:5px;min-width:100px;max-width:220px}.download-ready strong{font-size:11px;font-weight:600;color:#516d42}.download-ready small{font-size:9px;color:#94a286;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-ready a{text-decoration:none;font-size:10px}.drop-overlay{position:fixed;inset:12px;z-index:20000;border:2px dashed #8ba977;border-radius:18px;background:#f5faefee;backdrop-filter:blur(4px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:var(--green);pointer-events:none}.drop-overlay>span[data-icon] svg{width:45px;height:45px;stroke-width:1.25}.drop-overlay strong{font:28px Georgia,serif}.drop-overlay>span:last-child{font-size:12px;color:#8b9c79}@media(max-width:760px){.tab-actions{gap:2px}.tab-actions .button{font-size:9px;padding:4px 5px;gap:4px}.tab-actions .button svg{width:12px;height:12px}.tabs{gap:7px}.tab-list{gap:14px}.format-list>div{grid-template-columns:1fr;gap:3px}.download-ready{right:12px;left:12px;gap:8px}.download-ready>span:nth-child(2){flex:1;min-width:80px}.download-ready a{white-space:normal;text-align:center}.drop-overlay strong{font-size:21px;text-align:center;padding:20px}.drop-overlay>span:last-child{text-align:center;padding:0 25px}}@media print{.table-menu-trigger,.table-context-menu,.download-ready,.drop-overlay{display:none!important}}

.app-header {
  height: 58px;
  gap: 19px;
}

.brand { font-size: 22px; }
.brand .brand-mark {
  width: 33px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font: 750 19px/1 Arial, sans-serif;
  letter-spacing: 0;
}
.brand-mark svg { width: 21px; height: 21px; }
.header-actions .icon-button { width: 34px; height: 34px; }
.document-heading { min-width: 0; }

.menubar {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 33px;
  flex-shrink: 0;
  padding: 0 21px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 40;
}

.menubar-button {
  font-size: 12px;
  font-weight: 600;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
}

.menubar-button:hover,
.menubar-button[aria-expanded="true"] { background: #edf4ed; color: var(--green); }
.editor-menu {
  left: 0;
  right: auto;
  top: calc(100% + 4px);
  min-width: 220px;
  width: max-content;
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 120px);
  overflow: auto;
}
.editor-menu button { justify-content: space-between; min-height: 34px; padding: 7px 10px; }
.editor-menu button.active { background: #edf4ed; color: var(--green); }
.editor-menu button.active::before { content: "✓"; color: var(--green); margin-right: 3px; }
.editor-menu button:disabled { opacity: .48; }
.editor-menu-field { display: grid; gap: 6px; padding: 6px 10px 9px; font-size: 11px; }
.editor-menu-field select { max-width: 100%; height: 31px; }
#downloadMenu { max-height: min(540px, calc(100dvh - 70px)); overflow: auto; }
#downloadMenu button { padding: 7px 10px; }
#downloadMenu small { margin-top: 2px; }

.toolbar { height: 42px; padding: 0 21px; gap: 9px; }
.toolbar .tool-group { padding-right: 8px; }
.toolbar #fontFamily { width: 127px; }
.toolbar #fontSize { width: 52px; padding: 4px 4px 4px 7px; height: 29px; font-size: 11px; }
.toolbar .tool { width: 29px; height: 29px; }
.toolbar .last .button { min-height: 28px; }
.toolbar-colors { gap: 4px; }
.color-control { display: flex; align-items: center; }
.toolbar-color { position: relative; }
.toolbar-color .text-color-symbol { font: 700 17px Arial, sans-serif; margin-top: -2px; }
.toolbar-color > span[data-icon] { margin-top: -3px; }
.toolbar-color .color-strip { left: 6px; bottom: 2px; width: 17px; border-radius: 1px; }
.toolbar .tool.palette-trigger { width: 17px; }
.palette-trigger svg { width: 11px; height: 11px; }
.palette-trigger[aria-expanded="true"] { background: #e9f1e9; }
.editor-color-menu {
  position: fixed;
  top: auto;
  right: auto;
  width: 192px;
  min-width: 0;
  max-height: calc(100dvh - 16px);
  overflow: auto;
  z-index: 201;
}
.editor-color-menu > strong { display: block; margin: 6px 6px 9px; font-size: 12px; }
.color-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 0 3px 8px; }
.editor-color-menu .color-grid button {
  display: grid;
  place-items: center;
  padding: 2px;
  min-height: 29px;
  border: 1px solid transparent;
}
.editor-color-menu .color-grid button:hover,
.editor-color-menu .color-grid button:focus-visible { border-color: #a1b8a8; background: #edf4ed; }
.color-grid button > span {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid #0002;
  border-radius: 3px;
  background: var(--palette-swatch);
}
.custom-editor-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.custom-editor-color input { width: 28px; height: 24px; padding: 0; cursor: pointer; }
.workspace { position: relative; }
.open-other-instances { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 20px; }
.doc-card .doc-actions { background: #f7faf4; border-radius: 3px; }
.doc-card .doc-recovery { padding: 0; font-size: 10px; text-align: left; color: var(--green); text-decoration: underline; }
.ProseMirror table[data-w-fit] {
  width: var(--w-table-width) !important;
  min-width: 0 !important;
  max-width: 100%;
}
.ProseMirror table[data-w-fit] > colgroup > col {
  width: var(--w-column-width) !important;
  min-width: 0 !important;
}
.ProseMirror table[data-w-fit] :is(td, th),
.ProseMirror table[data-w-compact] :is(td, th) { min-width: 0; }
.ProseMirror table[data-w-compact] { font-size: var(--w-table-font); }
.ProseMirror table[data-w-compact] :is(td, th) {
  padding-inline: var(--w-cell-padding) !important;
}
.ProseMirror table[data-w-compact] :is(pre, code) { white-space: pre-wrap; overflow-wrap: anywhere; }
.canvas-bottom button, #pageStatus { font: inherit; color: var(--green); }
.canvas-bottom button:hover, #pageStatus:hover { text-decoration: underline; text-underline-offset: 3px; }
.statusbar > div { min-width: 0; }
#pageStatus { white-space: nowrap; }
.status-orientation { display: flex; align-items: center; gap: 8px; }
.statusbar .status-orientation select {
  width: 76px;
  height: 25px;
  padding: 1px 4px;
  color: #395347;
  border: 1px solid #d7e3da;
  border-radius: 5px;
}
.status-orientation label { display: flex; align-items: center; gap: 4px; color: #395347; cursor: pointer; }
.status-orientation input { margin: 0; accent-color: var(--green); }

.paragraph-fields { margin-top: 15px; }
#paragraphDialog select { padding: 8px; }
.formula-symbols { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.formula-symbols button {
  min-width: 28px;
  min-height: 28px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 15px;
  background: #f6f9f5;
}
.formula-symbols button:hover { background: #e9f1e9; }
#formulaOutput { display: block; min-height: 20px; color: var(--green); font-weight: 600; }
#formulaOutput.formula-error { color: #953e35; font-size: 12px; font-weight: 500; }

@media (max-width: 1000px) {
  .documents-panel { top: 0; bottom: 0; }
}
@media (max-width: 760px) {
  .app-header { height: 54px; gap: 8px; }
  .menubar { padding: 0 7px; }
  .menubar-button { padding: 4px 6px; font-size: 11px; }
  .menubar .dropdown-anchor:nth-child(n+4) .editor-menu { right: 0; left: auto; }
  .toolbar { padding: 0 9px; gap: 5px; }
  .toolbar .tool-group { padding-right: 5px; }
  .properties-panel { top: 0; bottom: 0; }
  #downloadMenu { min-width: min(270px, calc(100vw - 24px)); }
}
@media (max-width: 600px) {
  #selectionStatus, .selection-divider, .zoom-divider { display: none; }
}
@media (max-width: 425px) {
  #wordCount, #wordCount + .status-divider { display: none; }
  .statusbar .status-button { width: 16px; }
}
@media print { .menubar, .editor-color-menu { display: none !important; } }

.atelier-page-dialog {
  width: min(660px, calc(100vw - 30px));
  max-height: 90dvh;
}

.atelier-page-dialog .dialog-heading,
.atelier-page-preview .dialog-heading {
  padding: 0;
  align-items: flex-start;
}

.atelier-page-dialog fieldset {
  min-width: 0;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--border, #dce4df);
  border-radius: 8px;
}

.atelier-page-dialog legend {
  padding: 0 6px;
  color: var(--green, #315943);
  font-size: 12px;
  font-weight: 650;
}

.atelier-page-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.atelier-page-number-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.atelier-page-fields label,
.atelier-print-margin {
  display: grid;
  min-width: 0;
  gap: 6px;
  font-size: 12px;
}

.atelier-page-fields :is(input, select, textarea),
.atelier-print-margin input {
  min-width: 0;
  width: 100%;
  padding: 7px 8px;
  background: white;
  border: 1px solid var(--border, #dce4df);
  border-radius: 5px;
}

.atelier-page-fields textarea { resize: vertical; }
.atelier-page-fields :disabled { opacity: .5; }

.atelier-page-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
  cursor: pointer;
}

.atelier-page-check input { accent-color: var(--green, #315943); }
.atelier-page-note { color: var(--muted, #6c786f); font-size: 11px; line-height: 1.5; }
.atelier-page-dialog .atelier-page-note { margin: 9px 0 0; }
.atelier-print-dialog { width: min(1060px, calc(100vw - 30px)); }
.atelier-print-layout {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  gap: 18px;
}
.atelier-print-options { min-width: 0; }
.atelier-print-options fieldset { margin: 10px 0; }
.atelier-print-options fieldset .atelier-page-note { margin: 0; }
.atelier-print-color-options { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.atelier-print-color-options label { margin: 2px 0; }
.atelier-print-preview-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.atelier-print-preview-heading h3 { color: var(--green, #315943); font-size: 14px; margin: 0; }
.atelier-print-preview-heading .atelier-page-note { margin: 0; text-align: right; }
.atelier-print-preview.atelier-preview-stack { height: clamp(260px, 55dvh, 680px); max-height: none; }
.atelier-print-preview[aria-busy="true"] { cursor: progress; }
.atelier-print-preview.atelier-print-grayscale .atelier-sheet,
.atelier-print-filter-fallback .atelier-sheet,
.atelier-print-root.atelier-print-grayscale .atelier-sheet img { filter: grayscale(1); }
.atelier-print-margin { max-width: 240px; }
.atelier-print-edge-fields { margin-top: 10px; }

.atelier-measure-host {
  position: fixed;
  top: 0;
  left: -150vw;
  width: max-content;
  visibility: hidden;
  pointer-events: none;
  contain: layout style;
}

.atelier-sheet {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: var(--sheet-width);
  height: calc(var(--sheet-height) - 1px);
  padding: var(--sheet-margin);
  color: #29372f;
  background: #fff;
  overflow: hidden;
  font: 10pt/1.4 Arial, Helvetica, sans-serif;
}

.atelier-sheet .atelier-sheet-body {
  display: flow-root;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.atelier-sheet-body > table {
  margin: 12px 0;
}

.atelier-sheet .atelier-sheet-body :is(td, th) {
  min-width: 0;
}

.atelier-sheet-header,
.atelier-sheet-footer {
  flex: none;
  max-height: 44mm;
  color: #4d6155;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.atelier-sheet-header { padding-bottom: 2.8mm; }
.atelier-sheet-footer { padding-top: 2.8mm; }
.atelier-page-line-text { white-space: pre-wrap; }
.atelier-page-number.align-left { text-align: left; }
.atelier-page-number.align-center { text-align: center; }
.atelier-page-number.align-right { text-align: right; }

.atelier-page-slice { display: flow-root; overflow: hidden; }
.atelier-page-slice-inner { display: flow-root; transform-origin: top left; }

.atelier-edit-page-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.atelier-edit-page-marker {
  position: absolute;
  left: -8px;
  transform: translateX(-100%);
  color: #526e5d;
  background: #e8efea;
  padding: 3px 5px;
  border-radius: 4px;
  white-space: nowrap;
  font: 600 9px/1 Arial, sans-serif;
}

.atelier-edit-page-marker::after {
  position: absolute;
  left: 100%;
  width: 8px;
  top: 50%;
  border-top: 1px dashed #a7b9aa;
  content: '';
}

.atelier-page-preview {
  width: min(1170px, calc(100vw - 28px));
  max-height: 93dvh;
  padding: 14px;
}

.atelier-preview-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-height: min(72dvh, 1050px);
  overflow: auto;
  padding: 16px;
  margin-top: 10px;
  border: 1px solid #d6e1d8;
  border-radius: 6px;
  background: #e9efe9;
}

.atelier-preview-stack > .atelier-sheet {
  flex: none;
  box-shadow: 0 2px 9px #263a3329;
}

.atelier-page-preview .dialog-actions { margin-top: 12px; }
.atelier-print-frame { position: fixed; left: -150vw; top: 0; width: 1200px; height: 1200px; border: 0; }

@media (max-width: 560px) {
  .atelier-page-number-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atelier-page-number-fields label:last-child { grid-column: 1 / -1; }
  .atelier-edit-page-marker { left: 3px; transform: none; }
  .atelier-edit-page-marker::after { display: none; }
}

@media (max-width: 720px) {
  .atelier-print-layout { grid-template-columns: minmax(0, 1fr); }
  .atelier-print-preview.atelier-preview-stack { height: clamp(220px, 43dvh, 440px); }
}

@page atelierPortrait { size: 210mm 297mm; margin: 0; }
@page atelierLandscape { size: 297mm 210mm; margin: 0; }

@media print {
  body.atelier-print-root {
    margin: 0;
    padding: 0;
    background: white;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .atelier-print-root .atelier-sheet {
    break-after: page;
    break-inside: avoid;
  }

  .atelier-print-root .atelier-sheet:last-child { break-after: auto; }
  .atelier-print-root .atelier-sheet-portrait { page: atelierPortrait; }
  .atelier-print-root .atelier-sheet-landscape { page: atelierLandscape; }
}

.ProseMirror {
  position: relative;
  display: flow-root;
}

.ProseMirror :is(p,h1,h2,h3,h4,h5,h6):has(img[data-layout="overlay"][data-anchor="paragraph"]) {
  position: relative;
}

.ProseMirror a[data-media-link] {
  text-decoration: none;
}

.tiptap[contenteditable="true"] img[data-atelier-media] {
  cursor: pointer;
}

.tiptap[contenteditable="true"] img[data-layout="overlay"] {
  cursor: move;
  touch-action: none;
}

.tiptap[contenteditable="true"] img[data-atelier-media].ProseMirror-selectednode,
.tiptap[contenteditable="true"] a.ProseMirror-selectednode > img[data-atelier-media] {
  outline: 2px solid #528269;
  outline-offset: 2px;
}

.atelier-media-dialog {
  max-height: calc(100dvh - 32px);
}

.media-fields {
  display: grid;
  gap: 12px;
}

.media-fields [hidden],
.atelier-media-dialog [hidden] {
  display: none !important;
}

.media-fields label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #536d5b;
}

.media-fields :is(input,select) {
  width: 100%;
  padding: 8px;
  min-width: 0;
}

.media-fields small {
  color: #697a6d;
  font-size: 11px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.media-error {
  margin: 12px 0 0;
  color: #873f38;
  font-size: 12px;
}

.media-remove-link {
  margin-right: auto;
}

.table-structure-toolbar {
  position: fixed;
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 12px);
  padding: 3px;
  overflow-x: auto;
  border: 1px solid #cddccf;
  border-radius: 7px;
  background: #fff;
  color: var(--green);
  box-shadow: 0 2px 10px #203c2821;
}
.table-structure-group { display: flex; align-items: center; gap: 2px; padding-right: 3px; border-right: 1px solid #e4ebe3; }
.table-structure-toolbar button { display: grid; place-items: center; min-width: 25px; height: 24px; padding: 0 4px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.table-structure-toolbar button:hover, .table-structure-toolbar button[aria-pressed="true"] { background: #e9f3e9; }
.table-structure-toolbar button:focus-visible { outline-offset: -1px; }
.table-structure-toolbar button[data-quick-table^="delete"] { color: #a2534b; }
.table-structure-toolbar button[data-quick-table^="delete"]:hover { background: #faf0ef; }
.table-structure-toolbar svg { width: 15px; height: 15px; }
.table-structure-toolbar .table-menu-trigger { position: static; flex-shrink: 0; width: 26px; border: 0; box-shadow: none; font-size: 20px; line-height: 1; }
@media print { .table-structure-toolbar { display: none !important; } }

.canvas.has-margin-rulers { padding-inline-start: max(36px, 2.4vw); }
.margin-ruler-shell { position: relative; }
.ruler-wrap.margin-ruler-wrap { position: relative; height: 25px; margin-bottom: 8px; }

.margin-ruler {
  position: absolute;
  display: block;
  color: #526358;
  background: #f8fbf8;
  border: 1px solid #cbd7cd;
  box-sizing: border-box;
  isolation: isolate;
  z-index: 4;
}

.margin-ruler-horizontal { top: 0; left: 0; right: 0; height: 25px; }
.margin-ruler-vertical { top: 0; right: calc(100% + 8px); width: 25px; height: var(--ruler-length); }
.margin-ruler-labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.margin-ruler-horizontal .margin-ruler-labels {
  background: repeating-linear-gradient(to right, #b4c3b8 0 1px, transparent 1px 5mm) bottom / 100% 4px no-repeat;
}
.margin-ruler-vertical .margin-ruler-labels {
  background: repeating-linear-gradient(to bottom, #b4c3b8 0 1px, transparent 1px 5mm) right / 4px 100% no-repeat;
}
.margin-ruler-label { position: absolute; font-size: 10px; font-variant-numeric: tabular-nums; line-height: 12px; }
.margin-ruler-unit { position: absolute; font-size: 9px; font-weight: 650; }
.margin-ruler-horizontal .margin-ruler-unit { left: 4px; bottom: 7px; }
.margin-ruler-vertical .margin-ruler-unit { top: 3px; right: 6px; }
.margin-ruler-label::after { position: absolute; content: ''; background: #9cafa0; }
.margin-ruler-horizontal .margin-ruler-label { left: var(--ruler-tick); bottom: 7px; transform: translateX(-50%); }
.margin-ruler-horizontal .margin-ruler-label::after { left: 50%; top: 100%; width: 1px; height: 7px; }
.margin-ruler-vertical .margin-ruler-label { top: var(--ruler-tick); right: 7px; transform: translateY(-50%); }
.margin-ruler-vertical .margin-ruler-label::after { top: 50%; left: 100%; width: 7px; height: 1px; }

.margin-ruler-zone { position: absolute; background: #dde8de; }
.margin-ruler-zone[data-side="left"] { inset: 0 auto 0 0; width: var(--ruler-margin); }
.margin-ruler-zone[data-side="right"] { inset: 0 0 0 auto; width: var(--ruler-margin); }
.margin-ruler-zone[data-side="top"] { inset: 0 0 auto; height: var(--ruler-margin); }
.margin-ruler-zone[data-side="bottom"] { inset: auto 0 0; height: var(--ruler-margin); }

.margin-ruler-handle {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green, #315943);
  touch-action: none;
  z-index: 2;
}
.margin-ruler-handle::before {
  content: '';
  background: currentColor;
  border-radius: 2px;
}
.margin-ruler-handle:hover,
.margin-ruler-handle.dragging { color: #1f6a46; }
.margin-ruler-handle:focus-visible { outline: 2px solid #277350; outline-offset: -2px; border-radius: 3px; }
.margin-ruler-horizontal .margin-ruler-handle {
  left: var(--ruler-position);
  bottom: -4px;
  width: 20px;
  height: 16px;
  transform: translateX(-50%);
  cursor: ew-resize;
}
.margin-ruler-horizontal .margin-ruler-handle::before {
  width: 11px;
  height: 10px;
  clip-path: polygon(0 0, 100% 0, 100% 53%, 50% 100%, 0 53%);
}
.margin-ruler-vertical .margin-ruler-handle {
  top: var(--ruler-position);
  right: -4px;
  width: 16px;
  height: 20px;
  transform: translateY(-50%);
  cursor: ns-resize;
}
.margin-ruler-vertical .margin-ruler-handle::before {
  width: 10px;
  height: 11px;
  clip-path: polygon(0 0, 53% 0, 100% 50%, 53% 100%, 0 100%);
}

.margin-ruler-guide {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  color: #225b40;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.margin-ruler-guide[data-axis="horizontal"] {
  left: var(--guide-position);
  top: 0;
  bottom: 0;
  border-left: 1px dashed #448766;
  padding: 6px;
}
.margin-ruler-guide[data-axis="vertical"] {
  top: var(--guide-position);
  left: 0;
  right: 0;
  border-top: 1px dashed #448766;
  padding: 4px 8px;
}

@media (min-width: 1550px) { .canvas.has-margin-rulers { padding-inline-start: 50px; } }
@media (max-width: 760px) { .margin-ruler-label { font-size: 13px; } }
@media print { .margin-ruler, .margin-ruler-guide { display: none !important; } }
