:root{color-scheme:light;--ink:#172033;--muted:#667085;--line:#d7dce5;--panel:#fff;--soft:#f3f5f9;--purple:#6d3ce7;--purple-dark:#5025bd;--danger:#b42318;--shadow:0 12px 32px rgb(16 24 40/.14)}
[hidden]{display:none!important}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;background:var(--soft);color:var(--ink);font:15px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,.button-link,input,textarea{font:inherit}button,.button-link{min-height:42px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);padding:.55rem .8rem;text-decoration:none;font-weight:650;cursor:pointer}button:hover:not(:disabled),.button-link:hover{border-color:var(--purple);color:var(--purple-dark)}button:focus-visible,.button-link:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #f5b942;outline-offset:2px}button:disabled{opacity:.45;cursor:not-allowed}.primary{border-color:var(--purple);background:var(--purple);color:#fff}.primary:hover:not(:disabled){background:var(--purple-dark);color:#fff}.danger{color:var(--danger)}.skip-link{position:fixed;z-index:100;left:1rem;top:-5rem;background:#fff;padding:.75rem}.skip-link:focus{top:1rem}.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.65rem 1rem;border-bottom:1px solid var(--line);background:#fff}.brand{display:flex;align-items:baseline;gap:.5rem;white-space:nowrap}.brand strong{font-size:1.2rem}.eyebrow{color:var(--purple);font-weight:800;text-transform:uppercase;letter-spacing:.08em;font-size:.7rem}.actions{display:flex;flex-wrap:wrap;gap:.45rem;justify-content:flex-end}.workspace{display:grid;grid-template-columns:190px minmax(0,1fr) 230px;min-height:0}.sidebar,.tools{overflow:auto;background:var(--panel)}.sidebar{border-right:1px solid var(--line)}.tools{border-left:1px solid var(--line);padding:0 .75rem}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:.85rem .25rem}.thumbnails{display:grid;gap:.8rem;list-style:none;margin:0;padding:.25rem .65rem 1rem}.thumbnail{position:relative;border:2px solid transparent;border-radius:8px;background:var(--soft);padding:.35rem;cursor:pointer}.thumbnail.selected{border-color:var(--purple)}.thumbnail.dragging{opacity:.45}.thumbnail canvas{display:block;width:100%;height:auto;background:#fff;box-shadow:0 2px 8px rgb(16 24 40/.12)}.thumbnail span{display:block;margin-top:.35rem;text-align:center;font-size:.8rem}.stage{min-width:0;min-height:0;overflow:hidden}.drop-zone,.document-view{width:100%;height:100%;overflow:auto}.drop-zone{display:grid;place-items:center;padding:2rem}.drop-zone.dragover{background:#ebe5ff}.drop-card{max-width:560px;text-align:center;border:2px dashed #ad9be8;border-radius:22px;background:#fff;padding:3rem;box-shadow:var(--shadow)}.drop-card h1{font-size:clamp(1.7rem,4vw,2.7rem);line-height:1.05;margin:.8rem 0}.drop-card p{color:var(--muted)}.drop-icon{display:grid;place-items:center;width:70px;height:82px;margin:auto;border-radius:10px 20px 10px 10px;background:#eee9ff;color:var(--purple);font-weight:900}.document-view{padding:32px}.page-shell{position:relative;margin:auto;background:#fff;box-shadow:var(--shadow);transform-origin:top center}.page-shell canvas{display:block;width:100%;height:100%}.annotation-layer{position:absolute;inset:0;overflow:hidden}.text-object{position:absolute;min-width:80px;min-height:32px;padding:4px 7px;border:1px dashed transparent;white-space:pre-wrap;overflow:hidden;resize:both;cursor:move;touch-action:none}.text-object:hover,.text-object.selected{border-color:var(--purple);background:rgb(255 255 255/.72)}.tools>button{width:100%;margin-bottom:.5rem}.tool-hint{color:var(--muted);font-size:.85rem}.tools fieldset{display:grid;gap:.75rem;margin:1rem 0;border:1px solid var(--line);border-radius:12px;padding:.8rem}.tools label{display:grid;gap:.25rem;font-size:.84rem;font-weight:650}.tools textarea,.tools input{width:100%;border:1px solid var(--line);border-radius:7px;padding:.45rem}.statusbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:48px;padding:.4rem 1rem;border-top:1px solid var(--line);background:#fff}.status-controls{display:flex;align-items:center;gap:.45rem}.status-controls button{min-height:34px;padding:.25rem .6rem}.privacy{color:#08783e}dialog{max-width:520px;border:0;border-radius:16px;padding:1.5rem;box-shadow:var(--shadow)}dialog::backdrop{background:rgb(23 32 51/.55)}
@media(max-width:800px){.topbar{align-items:flex-start}.brand{display:none}.workspace{grid-template-columns:1fr}.sidebar{position:fixed;z-index:20;left:0;top:64px;bottom:48px;width:170px;transform:translateX(-100%)}.tools{display:flex;gap:.4rem;align-items:center;overflow:auto;border:0;border-top:1px solid var(--line);padding:.4rem}.tools .panel-heading,.tools .tool-hint,.tools fieldset{display:none}.tools>button{width:auto;white-space:nowrap;margin:0}.stage{min-height:0}.document-view{padding:16px}.statusbar{font-size:.8rem}.privacy{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.text-hit-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.text-hit{position:absolute;border:0;background:transparent;padding:0;min-height:0;border-radius:2px;color:transparent;pointer-events:auto;cursor:text}
.text-hit:hover,.text-hit:focus-visible{background:rgb(245 185 66/.28);outline:2px solid #f5b942}
.text-hit-layer:not(.active) .text-hit{display:none}
.annotation-layer.editing-text{pointer-events:none}
.annotation-layer.masking{cursor:crosshair}
.annotation-layer.masking .editable-object{pointer-events:none}
.mobile-only{display:none}
.editable-object{position:absolute;border:1px dashed transparent;cursor:move;touch-action:none}
.editable-object:hover,.editable-object.selected{border-color:var(--purple);outline:2px solid rgb(109 60 231/.18)}
.text-object{position:absolute;min-width:80px;min-height:32px;padding:4px 7px;white-space:pre-wrap;overflow:hidden;resize:none}
.text-object.replacement-object{min-width:0;min-height:0;padding:0 2px;white-space:pre;overflow:hidden}
.text-object.replacement-object[contenteditable="true"]{cursor:text}
.text-object.replacement-object[contenteditable="true"]:focus{outline:2px solid var(--purple);border-color:var(--purple)}
.mask-object{min-width:8px;min-height:8px;background:#fff;resize:both}
.highlight-object{min-width:24px;min-height:12px;background:#ffe45c;mix-blend-mode:multiply;resize:both}
.image-object{min-width:40px;min-height:40px;object-fit:contain;resize:both;overflow:hidden}
.resize-handle{display:none;position:absolute;right:-7px;bottom:-7px;z-index:4;width:16px;height:16px;min-height:0;padding:0;border:2px solid #fff;border-radius:3px;background:var(--purple);box-shadow:0 0 0 1px var(--purple);cursor:nwse-resize;touch-action:none}.editable-object.selected>.resize-handle,.editable-object:focus>.resize-handle{display:block}
.drawing-object{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.annotation-layer.drawing{cursor:crosshair}
.annotation-layer.drawing .editable-object{pointer-events:none}
.tools>button.active{border-color:var(--purple);background:#eee9ff;color:var(--purple-dark)}
.dialog-field{display:grid;gap:.35rem;margin:1rem 0;font-weight:650}
.dialog-field input{width:100%;padding:.55rem;border:1px solid var(--line);border-radius:8px}
.dialog-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1.25rem}
.vault-choices{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin:1.25rem 0}.vault-choices button{min-height:54px}.security-guidance{padding-left:1.25rem;color:var(--muted)}.security-guidance li+li{margin-top:.45rem}dialog code{font-size:.9em}
.thumbnail.selected{background:#eee9ff}.thumbnail.current{box-shadow:0 0 0 2px #f5b942}
.page-actions-dialog{padding:1rem;min-width:240px}.page-actions-dialog h2{margin:.25rem 0}.page-actions-dialog [role="menu"]{display:grid;gap:.4rem}.page-actions-dialog button{text-align:left}.page-actions-dialog #contextCancelButton{margin-top:.4rem;text-align:center}
#vaultGeneratorLink a{display:inline-block;color:var(--purple-dark);font-weight:700}
.preflight{margin-top:1rem;border:1px solid var(--line);border-radius:10px;background:var(--soft);padding:.75rem}.preflight h3{margin:0 0 .4rem}.preflight ul{margin:.25rem 0;padding-left:1.25rem}.preflight .warning{color:#8a4b00}.preflight .pass{color:#08783e}
.dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.dialog-grid label{display:grid;gap:.3rem;font-weight:650}.dialog-grid input,.dialog-field select{width:100%;padding:.55rem;border:1px solid var(--line);border-radius:8px}.security-warning{border-left:4px solid #f5b942;padding:.6rem .8rem;background:#fff8e6}
.wide-dialog{max-width:760px}.preflight .error{color:var(--danger);font-weight:650}.preflight .info{color:var(--ink)}
@media(max-width:800px){.mobile-only{display:inline-block}.sidebar.open{transform:translateX(0);box-shadow:var(--shadow)}.actions{flex-wrap:nowrap;overflow-x:auto;max-width:100%}.topbar{min-width:0}.topbar button,.topbar .button-link{white-space:nowrap}}
