.pdf-app{font-size:15px;background:#f7f8fb}button,select,input{font:inherit}button,select{cursor:pointer}button{border:1px solid #dfe4ee;background:#fff;border-radius:9px;padding:10px 14px;min-height:42px;transition:background .15s,border-color .15s}button:hover:not(:disabled){background:#f0f3ff;border-color:#abb9f5}button:disabled{opacity:.42;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #9cafff;outline-offset:2px}.pdf-app [hidden]{display:none!important}.primary{background:var(--blue);color:#fff;border-color:var(--blue);font-weight:650;padding:13px 22px}.primary:hover:not(:disabled){background:var(--blue-hover);border-color:var(--blue-hover)}.pdf-header{height:78px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 36px;border-bottom:1px solid var(--line);gap:20px}.pdf-header .brand{font-size:24px}.pdf-header .brand-mark{font-size:28px;width:34px;height:34px}.pdf-header-end{display:flex;align-items:center;gap:24px;font-size:13px}.staging-tag{background:#fff2d8;color:#73500d;padding:5px 10px;border-radius:20px}#workspace{max-width:1700px;margin:auto;padding:28px 32px 0}.workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px}.workspace-heading .eyebrow{font-size:11px;letter-spacing:1.6px;color:#778096}.workspace-heading h1{font-size:30px;letter-spacing:-1px;line-height:1.2;margin:9px 0}.workspace-heading p{color:var(--muted)}.history-actions{display:flex;gap:8px;flex-shrink:0}#workspace-status{min-height:22px;color:#62708d;font-size:13px;margin-bottom:10px}#workspace-error,#pdf-download-error{background:#fff0e9;color:#933b22;border:1px solid #f3c8b6;border-radius:10px;padding:13px 17px;margin-bottom:12px}.pdf-drop{border:1px dashed #bcc8ee;background:#f0f3ff;text-align:center;padding:58px 22px;border-radius:20px;max-width:940px;margin:35px auto 65px}.pdf-drop h2{font-size:28px;letter-spacing:-.6px;margin-bottom:8px}.pdf-drop p{color:var(--muted);margin:12px auto;max-width:530px}.pdf-drop .primary{margin:16px auto 7px}.empty-papers{height:115px;position:relative;width:130px;margin:0 auto 22px}.empty-papers span{position:absolute;left:20px;top:12px;height:94px;width:72px;border:1px solid #c3ceed;border-radius:9px;background:white;display:grid;place-items:center;color:#5270db;font-weight:700;box-shadow:0 8px 20px #27365c13;transform:rotate(-11deg)}.empty-papers span+span{left:50px;top:0;transform:rotate(10deg);color:#b95849}.quiet{font-size:12px;color:#68748a;line-height:1.55}.privacy-note{font-size:12px;color:#758098;line-height:1.6}.editor-toolbar{border:1px solid var(--line);background:white;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 16px;border-radius:14px 14px 0 0}.selection-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.selection-actions label{margin-right:12px;font-size:13px;display:flex;align-items:center;gap:7px}input[type=checkbox],input[type=radio]{accent-color:var(--blue);width:17px;height:17px;cursor:pointer;vertical-align:middle}.editor-layout{display:grid;grid-template-columns:176px minmax(0,1fr) 240px;border:1px solid var(--line);border-top:0;border-radius:0 0 14px 14px;background:#fff;overflow:hidden;min-height:580px}.pages-panel{padding:18px 12px;border-right:1px solid var(--line);max-height:780px;overflow:auto;background:#fbfcff}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.panel-heading h2{font-size:14px;font-weight:650}.panel-heading span{color:#7b88a1;font-size:12px}#page-list{list-style:none;padding:8px 0 0;margin:0;display:flex;flex-direction:column;gap:14px}.page-thumb{position:relative;border:1px solid #e1e6f0;border-radius:9px;background:#fff;padding:8px;cursor:grab;transition:background .15s,border-color .15s}.page-thumb.active{border-color:#4661e3;box-shadow:0 0 0 2px #dce3ff}.page-thumb.selected{background:#eff2ff}.page-thumb.drag-over{border-top:4px solid var(--blue)}.thumb-preview{height:126px;display:grid;place-items:center;overflow:hidden;background:#f5f6f9;border:0;border-radius:4px;padding:7px;width:100%;min-height:0}.thumb-preview canvas{max-width:100%;max-height:112px;box-shadow:0 2px 8px #2933501a;background:white}.thumb-footer{display:flex;align-items:center;justify-content:space-between;margin-top:7px;font-size:12px}.thumb-footer label{display:flex;align-items:center;gap:4px}.thumb-footer button{padding:0;min-height:27px;width:27px;font-size:17px;border:0;background:transparent}.source-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;color:#778197;margin-top:3px}.preview-panel{background:#eaeef5;min-width:0;display:flex;flex-direction:column;position:relative}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:12px 18px;font-size:12px;color:#5b6780;border-bottom:1px solid #dee4ef;background:#f4f6fa}.preview-toolbar>div{display:flex;align-items:center;gap:7px}.preview-toolbar button{border:0;background:transparent;min-height:32px;padding:0 8px;font-size:23px}.preview-toolbar select{border:1px solid #dce2ed;border-radius:6px;padding:6px;max-width:105px;color:#53617d;background:#fff}#paper-scroll{overflow:auto;flex:1;padding:26px;min-height:460px;max-height:685px}#paper{position:relative;background:#fff;margin:0 auto;box-shadow:0 8px 32px #25315021;overflow:hidden;isolation:isolate}#page-canvas{position:absolute;top:50%;left:50%;transform-origin:center;background:white}#page-number-preview{position:absolute;white-space:pre;color:rgb(51,59,77);font-family:Arial,Helvetica,sans-serif;line-height:1;pointer-events:none}#preview-status{height:24px;text-align:center;font-size:11px;color:#63718e}.settings-panel{padding:20px 18px;border-left:1px solid var(--line);font-size:13px;display:flex;flex-direction:column;gap:20px}.number-toggle{display:flex;justify-content:space-between;align-items:center;font-weight:550}#number-options{display:grid;gap:12px}#number-options label{display:flex;flex-direction:column;gap:5px;color:#63708a}#number-options select,#number-options input,#pdf-email{width:100%;border:1px solid #dce2ed;border-radius:7px;background:white;padding:10px;min-width:0;color:#28334a}.output-options{border-top:1px solid var(--line);padding-top:18px;display:grid;gap:10px}.output-options h3{font-size:13px;margin-bottom:2px}.output-options label{display:flex;gap:7px;align-items:center}.settings-panel .primary{width:100%;padding:13px 8px;margin-top:3px}.workspace-footer{display:flex;justify-content:space-between;gap:20px;font-size:12px;color:#798399;padding:24px 0}.workspace-footer nav{display:flex;gap:18px}.workspace-footer a:hover{color:var(--blue)}dialog{border:1px solid #dce2ef;border-radius:19px;width:min(460px,calc(100% - 28px));padding:35px;color:var(--ink);box-shadow:0 30px 100px #18254230}dialog::backdrop{background:#19284666;backdrop-filter:blur(5px)}dialog .eyebrow{font-size:11px;margin-bottom:14px}dialog h2{font-size:25px;line-height:1.2;margin:0 10px 16px 0}dialog p{margin-bottom:14px}dialog .primary{width:100%;margin:14px 0}.dialog-close{position:absolute;right:10px;top:8px;border:0;font-size:25px;padding:0;width:36px}#pdf-email-form label{display:grid;gap:6px}.pdf-drop.drag-over{outline:3px solid #6a83eb}.loading-dot{color:var(--blue)}
@media(min-width:1500px){.editor-layout{grid-template-columns:196px minmax(0,1fr) 270px}#paper-scroll{max-height:780px}}
@media(max-width:1000px){.editor-layout{grid-template-columns:148px minmax(0,1fr)}.settings-panel{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:15px 25px}.settings-panel .panel-heading,.settings-panel .privacy-note{grid-column:1/-1}.settings-panel .output-options{border-top:0;padding:0}.settings-panel .primary{align-self:end}.pages-panel{max-height:700px}.thumb-preview{height:113px}.thumb-preview canvas{max-height:100px}}
@media(max-width:620px){.pdf-header{height:65px;padding:0 16px;gap:8px}.pdf-header .brand{font-size:20px;gap:7px}.pdf-header .brand-mark{width:29px;height:29px;font-size:23px}.pdf-header-end{gap:6px}.pdf-header-end>a{display:none}.staging-tag{font-size:10px;padding:4px 8px}#workspace{padding:22px 12px 0}.workspace-heading{display:block}.workspace-heading h1{font-size:25px}.workspace-heading p{font-size:13px}.workspace-heading .eyebrow{font-size:9px}.history-actions{margin-top:14px}.history-actions button{font-size:12px;padding:7px 12px;min-height:36px}.pdf-drop{padding:32px 15px;margin:22px 0}.pdf-drop h2{font-size:23px}.pdf-drop p{font-size:13px}.pdf-drop .privacy-note{font-size:11px}.editor-toolbar{padding:10px;align-items:flex-start;flex-wrap:wrap}.selection-actions{gap:5px}.selection-actions label{width:100%;margin-bottom:3px}.editor-toolbar button{font-size:12px;padding:7px 9px;min-height:38px}.editor-layout{display:flex;flex-direction:column;min-height:0}.pages-panel{order:2;border-right:0;border-top:1px solid var(--line);padding:12px;overflow:hidden;max-height:none}.pages-panel>.quiet{display:none}#page-list{flex-direction:row;overflow:auto;padding:5px 3px 10px;gap:10px}.page-thumb{flex:0 0 112px}.thumb-preview{height:93px}.thumb-preview canvas{max-height:79px}.preview-panel{order:1}.preview-toolbar{padding:8px 10px}#paper-scroll{padding:18px;min-height:300px;max-height:530px}.preview-toolbar>span{font-size:11px}.settings-panel{order:3;display:flex;padding:18px;gap:16px}#number-options{grid-template-columns:1fr 95px}.settings-panel>.quiet{margin:0}.settings-panel .primary{position:sticky;bottom:12px;box-shadow:0 6px 18px #233f862a}.workspace-footer{font-size:10px;gap:8px}.workspace-footer nav{gap:10px}dialog{padding:28px 23px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}


/* Compact workspace: the editor begins directly under the site header. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#workspace{padding-top:16px}
.editor-toolbar{flex-wrap:wrap}
.history-actions{margin-left:auto}
#selection-label{font-size:12px;color:#586987;white-space:nowrap}
.edit-tools{display:flex;flex-wrap:wrap;gap:6px;padding:10px 16px;border:1px solid var(--line);border-top:0;background:#fafbff}
.edit-tools button{font-size:13px;min-height:36px;padding:7px 11px}
.edit-tools .tool-active{background:#e9eeff;color:#2946cc;border-color:#8297ed}
.page-more{position:relative;font-size:13px}
.page-more summary{cursor:pointer;list-style:none;border:1px solid #dfe4ee;border-radius:9px;padding:10px 13px;min-height:42px}
.page-more>div{position:absolute;z-index:15;top:calc(100% + 6px);left:0;background:#fff;border:1px solid #dce2ef;border-radius:10px;box-shadow:0 10px 30px #20314b22;min-width:185px;padding:6px;display:grid;gap:3px}
.page-more button{text-align:left;border:0}
#drawing-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#edf2ff;border:1px solid #cfdbff;padding:10px 16px;font-size:12px}
#drawing-hint{flex:1;min-width:180px}
#drawing-controls label{display:flex;align-items:center;gap:5px}
#draw-width{width:55px;padding:6px;border:1px solid #cfdbff;border-radius:6px}
input[type=color]{padding:2px;width:44px;height:32px;cursor:pointer}
#drawing-layer{position:absolute;inset:0;width:100%;height:100%;z-index:3;touch-action:none;cursor:crosshair}
#drawing-layer>*{pointer-events:none}
#edit-dialog{width:min(500px,calc(100% - 28px));max-height:calc(100dvh - 32px);overflow:auto}
#edit-fields{display:grid;gap:13px}
#edit-fields label{display:grid;gap:6px;font-size:13px;color:#45536e;min-width:0}
#edit-fields input:not([type=color]),#edit-fields textarea,#edit-fields select{border:1px solid #d5ddea;background:#fff;border-radius:7px;padding:10px;width:100%;font:inherit;color:#202b44;min-width:0}
#edit-fields textarea{resize:vertical}
#edit-fields .field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
#edit-fields input[type=color]{width:100%;height:42px}
#edit-error{padding:10px;color:#973f2a;background:#fff0e9;border-radius:7px;margin-top:12px}
#added-elements h3{font-size:13px;margin-bottom:7px}
#element-list{list-style:none;padding:0;margin:0;max-height:220px;overflow:auto}
#element-list li{display:flex;gap:4px;align-items:center;border-bottom:1px solid #e9edf4;padding:5px 0}
#element-list li>span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px}
#element-list button{font-size:11px;min-height:30px;padding:3px 6px}
@media(max-width:620px){
 #workspace{padding-top:10px}
 .history-actions{width:100%;margin:2px 0 0;justify-content:flex-end}
 .history-actions button{flex:0 0 auto}
 .selection-actions label{width:auto;margin:0}
 .selection-actions{width:100%;gap:6px}
 #selection-label{margin-left:auto;font-size:11px}
 .edit-tools{padding:8px;gap:5px}
 .edit-tools button{padding:7px 9px;font-size:12px}
 .page-more summary{min-height:38px;padding:9px}
 .page-more>div{left:auto;right:0}
 #drawing-controls{gap:8px;padding:10px}
}


/* Page history at the start, selection actions at the end. */
.editor-toolbar .history-actions{margin:0;flex-wrap:wrap}
.editor-toolbar .selection-actions{margin-left:auto;justify-content:flex-end}
#element-list{max-height:440px;scrollbar-gutter:stable}
#element-list li{gap:5px;min-height:42px}
#element-list .element-number{flex:0 0 22px;font-variant-numeric:tabular-nums;color:#667492;text-align:center;font-weight:600}
#element-list .element-label{flex:1}
#element-list .element-hidden .element-label{color:#8790a2}
#element-list button{flex-shrink:0;min-width:28px;min-height:34px;display:grid;place-items:center}
#element-list .element-visibility{color:#465b88}
#element-list .element-hidden .element-visibility{color:#8892a5}
@media(max-width:1000px){#added-elements{grid-column:1/-1}}
@media(max-width:620px){
 .editor-toolbar .history-actions{width:auto;justify-content:flex-start}
 .editor-toolbar .selection-actions{justify-content:flex-start}
 #element-list button{min-width:40px;min-height:40px}
 #element-list{max-height:400px}
}
/* Live added objects share the PDF page coordinate system. */
#object-layer{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;overflow:hidden}
#object-layer [data-object-index]{cursor:move;touch-action:none}
#object-layer [data-object-index]:focus{outline:none;stroke:#4561ea;stroke-width:1;vector-effect:non-scaling-stroke}
#drawing-layer{z-index:7}
#inline-text{position:absolute;left:0;top:0;z-index:4;transform-origin:0 0;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none!important;resize:none;overflow:hidden;font-family:Arial,Helvetica,sans-serif;letter-spacing:0;white-space:pre-wrap;overflow-wrap:anywhere;min-height:0;min-width:0;max-width:none;box-sizing:content-box;caret-color:#243974}
#object-controls{position:absolute;z-index:5;border:1.5px solid #4561ea;pointer-events:none}
#object-controls button{position:absolute;width:44px;height:44px;min-height:44px;padding:0;pointer-events:auto;touch-action:none;display:grid;place-items:center;box-shadow:none}
#object-move{top:0;left:0;transform:translate(0,-50%);border:1px solid #4561ea;background:#fff;color:#324fcc;cursor:move;font-size:18px}
#object-resize{transform:translate(-50%,-50%);border:0;background:transparent;cursor:nwse-resize}
#object-resize span{width:10px;height:10px;border:2px solid #4561ea;background:#fff;border-radius:2px}
#object-resize:hover:not(:disabled){background:transparent;border-color:transparent}
.placing-object{cursor:crosshair}
.placing-object #object-layer{pointer-events:none}
.placing-object #object-layer [data-object-index]{pointer-events:none}
.object-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 16px;background:#fff;border:1px solid #dce3f1;border-top:0;font-size:12px}
#object-hint{color:#53617a;margin-right:auto}
#text-properties{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.object-toolbar label{display:flex;gap:5px;align-items:center;color:#43526c}
.object-toolbar input[type=number]{width:62px}
.object-toolbar input[type=range]{width:80px}
.object-toolbar input[type=number],.object-toolbar select{min-height:36px;padding:5px;border:1px solid #dce3f1;border-radius:6px;background:#fff;color:#25324a}
.object-toolbar button{font-size:12px;min-height:36px;padding:7px 10px}
#object-done{background:#394ee8;color:white;border-color:#394ee8}
#object-error{width:100%;margin:0;padding:7px 10px;border-radius:6px;background:#fff0e9;color:#973f2a}
.object-toolbar[aria-busy=true]{cursor:progress}
#element-list .element-label{cursor:pointer}
@media(max-width:620px){
 .object-toolbar{position:fixed;z-index:25;bottom:var(--pdf-keyboard-inset,0px);left:0;right:0;border:1px solid #dce3f1;border-radius:14px 14px 0 0;box-shadow:0 -5px 24px #233b6822;padding:10px 12px max(10px,env(safe-area-inset-bottom));gap:7px}
 #object-hint{width:100%;font-size:12px}
 #text-properties{gap:7px}
 .object-toolbar label{font-size:11px}
 .object-toolbar input,.object-toolbar select{font-size:16px}
 .object-toolbar button{min-height:42px}
 #object-opacity-label input{width:60px}
 body.editing-object{padding-bottom:190px}
}
/* The first production package contains page organization and numbering only. */
.pdf-core-tools .edit-tools,.pdf-core-tools .page-more,.pdf-core-tools #added-elements,.pdf-core-tools #drawing-controls,.pdf-core-tools #object-toolbar,.pdf-core-tools #object-controls{display:none!important}
