:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color-scheme:light;--bg:#f6f8fc;--surface:#fff;--surface2:#f8fafc;--surface3:#eef2f8;--text:#17233a;--muted:#6c778b;--line:#e0e6ef;--accent:#2865dd;--accent-bg:#eff5ff;--accent-text:#1b58c1;--danger:#bd4141;--shadow:0 12px 32px rgba(22,39,74,.09);--radius:12px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}body{display:flex;flex-direction:column;min-height:100vh}main{flex:1;min-height:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}svg{width:19px;height:19px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-defs{display:none}.hidden{display:none!important}.topbar{height:68px;min-height:68px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;gap:15px;position:relative;z-index:10}.brand{display:flex;align-items:center;gap:11px;min-width:0}.brand-icon{width:39px;height:39px;border-radius:10px;display:grid;place-items:center;background:var(--accent);color:#fff}.brand-icon svg{width:23px;height:23px}.brand-name{display:flex;flex-direction:column;gap:2px}.brand-name strong{font-size:16px;letter-spacing:-.42px;white-space:nowrap}.brand-name span{font-size:8.5px;letter-spacing:1.05px;font-weight:750;color:var(--muted);text-align:right}.top-actions{display:flex;align-items:center;gap:7px;min-width:0}.save-state{font-size:11px;color:var(--muted);margin-right:7px}.btn{display:inline-flex;gap:8px;align-items:center;justify-content:center;border-radius:8px;padding:10px 15px;font-size:13px;font-weight:650;line-height:1.1;min-height:39px;border:1px solid transparent;white-space:nowrap;transition:background .16s,border .16s,transform .16s;color:var(--text)}.btn svg{width:16px;height:16px}.btn-primary{background:#2865dd;color:#fff;border-color:#2865dd}.btn-primary:hover:not(:disabled){background:#1f54ba}.btn-outline{background:var(--surface);border-color:var(--line)}.btn-outline:hover:not(:disabled),.btn-quiet:hover:not(:disabled){background:var(--surface3)}.btn-quiet{background:var(--surface2)}.btn-ghost{background:transparent}.btn-ghost:hover:not(:disabled){background:var(--surface2)}.btn.small{font-size:12px;min-height:34px;padding:8px 10px}.btn.compact{padding:8px;min-height:36px}.btn.full{width:100%}.site-footer{display:flex;min-height:66px;justify-content:space-between;align-items:center;gap:20px;padding:10px 27px;background:var(--surface);border-top:1px solid var(--line)}.footer-note{font-size:11px;color:var(--muted)}.powered{display:flex;align-items:center;gap:10px}.powered>span{font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap}.powered img{width:128px;height:auto;object-fit:contain;display:block}
/* Initial screen */
.start-view{width:min(1200px,100%);min-height:min(725px,calc(100vh - 134px));padding:70px 42px 66px;margin:auto;display:grid;grid-template-columns:minmax(0,1.14fr) minmax(0,.86fr);gap:60px;align-items:center}.start-content{max-width:620px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:1.55px;color:var(--accent-text);margin-bottom:19px}.start-content h1{font-size:clamp(35px,4.1vw,59px);letter-spacing:-2.1px;line-height:1.11;margin:0 0 22px;font-weight:760}.start-content h1 span{color:var(--accent)}.start-content>p{font-size:16px;color:var(--muted);line-height:1.72;max-width:535px;margin:0 0 32px}.start-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.start-card{text-align:left;position:relative;display:flex;flex-direction:column;gap:7px;align-items:flex-start;min-width:0;background:var(--surface);border:1px solid var(--line);padding:22px 20px 19px;border-radius:14px;color:var(--text);box-shadow:0 4px 11px rgba(30,60,100,.025);transition:transform .15s,border .15s,box-shadow .15s}.start-card:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:var(--shadow)}.start-card-icon{width:38px;height:38px;border-radius:11px;background:var(--accent-bg);color:var(--accent);display:grid;place-items:center;margin-bottom:8px}.start-card strong{font-size:14px}.start-card>span:not(.start-card-icon):not(.start-arrow){font-size:12px;color:var(--muted)}.start-arrow{position:absolute;right:18px;bottom:21px;color:var(--accent);font-size:18px}.start-secondary{display:flex;align-items:center;gap:11px;margin-top:20px}.text-button{border:0;background:transparent;color:var(--accent-text);font-weight:650;font-size:12px;padding:5px 3px}.text-button:hover{text-decoration:underline}.separator{color:var(--muted)}.start-preview{position:relative;display:flex;justify-content:center;align-items:center;min-height:370px}.mock-page{width:min(100%,390px);aspect-ratio:1.23;background:linear-gradient(140deg,#f8f3ea,#fdf9f3);border:9px solid #f9f6f1;outline:1px solid #d7c9ab;box-shadow:0 24px 70px rgba(34,55,93,.13);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;color:#75634b;padding:20px;transform:rotate(-2deg)}.mock-dots{font-size:10px;letter-spacing:2px}.mock-title{font-family:Georgia,serif;font-size:37px;font-style:italic;color:#4a4336}.mock-line{font-family:Georgia,serif;font-size:14px}.mock-name{font-family:Georgia,serif;color:#284e79;border:1px dashed #7ba0d4;padding:8px 17px;font-size:24px;white-space:nowrap}.mock-rule{width:55px;border-top:1px solid #c8b690}.mock-date{font-family:Georgia,serif;font-size:13px}.mock-chip{position:absolute;padding:11px 15px;box-shadow:var(--shadow);border:1px solid var(--line);border-radius:9px;background:var(--surface);font-size:12px;font-weight:700;color:var(--text)}.chip1{top:2%;right:-1%}.chip2{bottom:0;left:-7%;color:#26856c}
/* Workspace */
.editor-view{height:calc(100vh - 134px);min-height:590px;display:flex;flex-direction:column}.workspace-toolbar{height:54px;background:var(--surface);border-bottom:1px solid var(--line);padding:0 15px;display:flex;justify-content:space-between;align-items:center;gap:12px}.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:8px;min-width:0}.toolbar-divider{width:1px;height:20px;background:var(--line);margin:0 5px}.project-name{width:min(230px,20vw);min-width:110px;max-width:250px;background:transparent;border:1px solid transparent;padding:8px;color:var(--text);font-size:13px;font-weight:700;border-radius:6px;text-overflow:ellipsis}.project-name:hover,.project-name:focus{border-color:var(--line);background:var(--surface2)}.page-info{font-size:11px;color:var(--muted);white-space:nowrap}.count-pill{background:var(--surface3);color:var(--muted);border-radius:12px;padding:2px 6px;font-size:10px}.editor-body{flex:1;display:grid;grid-template-columns:204px minmax(0,1fr) 265px;min-height:0}.insert-panel,.properties-panel{background:var(--surface);overflow-y:auto;padding:18px 13px}.insert-panel{border-right:1px solid var(--line)}.properties-panel{border-left:1px solid var(--line)}.panel-heading{display:block;color:var(--muted);font-weight:800;font-size:10px;letter-spacing:.9px;margin:2px 7px 11px}.tool-item{display:flex;align-items:center;gap:11px;width:100%;background:transparent;border:1px solid transparent;border-radius:9px;padding:10px 9px;color:var(--text);font-size:13px;font-weight:620;text-align:left}.tool-item:hover{background:var(--surface2);border-color:var(--line)}.tool-icon{border-radius:8px;background:var(--accent-bg);width:33px;height:33px;color:var(--accent);display:grid;place-items:center}.tool-icon svg{width:17px;height:17px}.curly{font-weight:800;font-size:14px}.panel-section{margin-top:21px;padding-top:18px;border-top:1px solid var(--line)}.small-help{color:var(--muted);font-size:11px;line-height:1.7}.page-list{display:flex;flex-direction:column;gap:7px;margin-bottom:10px}.page-tab{display:flex;align-items:center;gap:9px;text-align:left;background:var(--surface2);border:1px solid var(--line);border-radius:8px;width:100%;padding:8px;color:var(--text);font-size:12px}.page-tab.active{border-color:var(--accent);background:var(--accent-bg)}.page-num{width:22px;height:27px;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;font-size:10px;border-radius:3px}.page-tab span:last-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.canvas-area{min-width:0;min-height:0;display:flex;flex-direction:column;background:#edf0f5}.canvas-top{height:44px;flex:none;padding:0 17px;display:flex;align-items:center;justify-content:space-between;background:var(--surface2);border-bottom:1px solid var(--line)}.canvas-page-label{font-size:11px;color:var(--muted);font-weight:600}.canvas-top-actions,.record-nav{display:flex;align-items:center;gap:8px}.canvas-top-actions>span{font-size:11px;color:var(--muted);min-width:35px;text-align:center}.icon-button{width:30px;height:30px;border:1px solid transparent;border-radius:7px;background:transparent;display:grid;place-items:center;font-size:21px;color:var(--text)}.icon-button:hover{background:var(--surface3)}.icon-button svg{width:16px;height:16px}.canvas-scroll{flex:1;min-height:0;overflow:auto;display:flex;justify-content:center;align-items:flex-start;padding:27px 18px 48px}.page-shell{flex-shrink:0;position:relative;margin:0 auto;box-shadow:0 8px 26px rgba(23,37,65,.18);background:#fff}.page-surface{background:#fff;position:relative;transform-origin:top left;overflow:hidden;color:#202020;user-select:none}.page-surface>canvas#pageBackground{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.page-elements{position:absolute;inset:0}.editor-element{position:absolute;border:1.5px dashed transparent;cursor:move;touch-action:none;outline:0;overflow:visible}.editor-element:hover{border-color:#77a5ed}.editor-element.selected{border-color:#2865dd;background:rgba(58,116,221,.045);z-index:4}.editor-element .element-content{width:100%;height:100%;overflow:hidden;pointer-events:none}.editor-element .element-content canvas{display:block;width:100%;height:100%}.resize-handle{position:absolute;right:-6px;bottom:-6px;width:12px;height:12px;border:2px solid white;background:#2865dd;box-shadow:0 0 0 1px #2865dd;border-radius:3px;cursor:nwse-resize;display:none}.editor-element.selected .resize-handle{display:block}.preview-canvas{width:100%;height:100%;position:absolute;inset:0}.record-bar{height:49px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surface2);border-top:1px solid var(--line);padding:0 16px}.record-nav span{font-size:12px;color:var(--text);white-space:nowrap}.record-bar select{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:7px;font-size:12px;min-width:80px;max-width:200px;padding:7px 10px}.panel-header,.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.panel-header{margin:0 2px 17px}.panel-header h2,.dialog-header h2{margin:0;font-size:15px;letter-spacing:-.2px}.properties-content{font-size:12px}.empty-properties{height:200px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;text-align:center;color:var(--muted)}.empty-properties svg{height:25px;width:25px}.empty-properties strong{font-size:13px;color:var(--text)}.empty-properties p{font-size:11px;margin:0}.prop-group{display:flex;flex-direction:column;gap:7px;margin-bottom:15px}.prop-label{display:block;font-size:11px;color:var(--muted);font-weight:650}.prop-input,.prop-select,.prop-area{width:100%;border:1px solid var(--line);background:var(--surface2);color:var(--text);border-radius:7px;padding:9px;font-size:12px;outline:none}.prop-area{min-height:75px;resize:vertical;line-height:1.5}.prop-input:focus,.prop-select:focus,.prop-area:focus{border-color:var(--accent)}.prop-row{display:flex;align-items:center;gap:8px}.prop-row>.prop-group{flex:1;min-width:0}.prop-row input[type="color"]{width:45px;height:35px;border:1px solid var(--line);border-radius:7px;padding:2px;background:var(--surface)}.prop-subheading{font-size:10px;font-weight:750;letter-spacing:.7px;color:var(--muted);margin:14px 0 12px;padding-top:12px;border-top:1px solid var(--line)}.prop-check{display:flex;align-items:center;gap:9px;font-size:12px;margin:10px 0}.prop-check input{accent-color:var(--accent)}.prop-actions{display:flex;gap:8px;flex-wrap:wrap}.prop-actions .btn{flex:1}.help{font-size:11px;line-height:1.5;color:var(--muted);margin:2px 0 10px}.inline-warning{background:#ffedeb;border:1px solid #ebc8bf;border-radius:8px;color:#a24732;padding:10px;font-size:12px;line-height:1.5}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Drawers & modal */
.drawer,.modal{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:20px}.drawer-backdrop,.modal-backdrop{position:absolute;inset:0;background:rgba(8,16,29,.45)}.drawer-card,.modal-card{position:relative;z-index:1;background:var(--surface);box-shadow:var(--shadow);border:1px solid var(--line);border-radius:14px;color:var(--text);display:flex;flex-direction:column;max-height:90vh}.data-card{width:min(1120px,96vw);height:min(680px,88vh)}.dialog-header{padding:19px 22px;border-bottom:1px solid var(--line)}.dialog-header h2{font-size:18px}.dialog-header p{color:var(--muted);font-size:12px;margin:5px 0 0}.data-actions{padding:12px 19px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line)}.data-search-wrap{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:8px;background:var(--surface2);padding:0 9px;margin-left:auto}.data-search-wrap svg{color:var(--muted);width:16px;height:16px}.data-search-wrap input{border:0;background:transparent;color:var(--text);padding:8px 2px;outline:0;width:160px;font-size:12px}.table-scroll{overflow:auto;min-height:0;flex:1}.data-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12px}.data-table th,.data-table td{border-bottom:1px solid var(--line);border-right:1px solid var(--line);padding:0;min-width:160px;height:42px;text-align:left}.data-table th{position:sticky;top:0;background:var(--surface2);z-index:2;font-weight:650;height:43px}.data-table th:first-child,.data-table td:first-child{position:sticky;left:0;z-index:3;min-width:51px;width:51px;text-align:center;color:var(--muted);background:var(--surface2);font-size:11px}.data-table th:first-child{z-index:4}.data-table input{width:100%;height:100%;border:0;color:var(--text);background:transparent;outline:none;padding:0 12px;font-size:12px;min-width:154px}.data-table input:focus{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}.data-table th input{font-weight:700}.data-footer{height:48px;flex:none;display:flex;justify-content:space-between;align-items:center;padding:0 20px;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}.pagination{display:flex;align-items:center;gap:9px}.modal-card{width:min(520px,95vw)}.modal-body{padding:20px 22px;overflow:auto;max-height:60vh}.modal-actions{padding:15px 22px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;align-items:center;gap:9px}.modal-actions:empty{display:none}.modal-body .prop-group{margin-bottom:15px}.field-option{width:100%;border:1px solid var(--line);border-radius:8px;background:var(--surface);text-align:left;color:var(--text);padding:11px 13px;display:flex;justify-content:space-between;margin:7px 0;font-size:13px}.field-option:hover{background:var(--accent-bg);border-color:var(--accent)}.field-option small{color:var(--muted);font-size:11px}.field-picker-list{max-height:310px;overflow:auto}.modal-box{border:1px solid var(--line);background:var(--surface2);border-radius:9px;padding:13px;line-height:1.5;font-size:12px}.modal-box strong{display:block;margin-bottom:6px}.modal-box p{margin:5px 0}.export-cards{display:grid;gap:9px}.export-choice{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:9px;cursor:pointer}.export-choice:has(input:checked){background:var(--accent-bg);border-color:var(--accent)}.export-choice input{accent-color:var(--accent)}.export-choice div{display:flex;flex-direction:column;gap:3px}.export-choice strong{font-size:13px}.export-choice small{font-size:11px;color:var(--muted)}.progress-track{height:9px;border-radius:9px;background:var(--surface3);overflow:hidden;margin:10px 0}.progress-track>div{width:0;height:100%;background:#2865dd;transition:width .2s}.issue-list{max-height:260px;overflow:auto}.issue-item{display:flex;align-items:center;gap:10px;padding:11px 6px;border-bottom:1px solid var(--line);font-size:12px}.issue-item span{flex:1}.issue-item button{background:transparent;border:0;color:var(--accent-text);font-size:11px;font-weight:650}.toast{position:fixed;bottom:82px;left:50%;transform:translateX(-50%);background:#243752;color:#fff;padding:12px 20px;border-radius:9px;box-shadow:var(--shadow);font-size:13px;z-index:60;max-width:min(92vw,500px);text-align:center}.muted{color:var(--muted)}.nowrap{white-space:nowrap}
@media(max-width:1100px){.editor-body{grid-template-columns:174px minmax(0,1fr) 239px}.start-view{gap:34px}.insert-panel,.properties-panel{padding:15px 10px}}
@media(max-width:850px){.start-view{padding:46px 26px;grid-template-columns:1fr}.start-preview{min-height:250px;max-width:480px;width:100%;justify-self:center}.mock-page{width:65%;min-width:250px}.editor-body{grid-template-columns:70px minmax(0,1fr) 220px}.insert-panel{padding:14px 7px}.insert-panel .tool-item{justify-content:center;font-size:0;padding:9px 5px}.insert-panel .tool-icon{width:38px;height:38px}.insert-panel .panel-heading{text-align:center;margin:0 0 12px;font-size:9px}.insert-panel .page-list{gap:5px}.page-tab{padding:5px;justify-content:center;font-size:0}.page-tab .page-num{flex-shrink:0}.insert-panel .small-help{display:none}.insert-panel .panel-section .btn{font-size:0;gap:0;padding:7px}.page-info{display:none}.save-state{display:none}}
@media(max-width:640px){.topbar{height:60px;min-height:60px;padding:0 12px}.brand-icon{width:34px;height:34px}.brand-name strong{font-size:13px}.brand-name span{font-size:7px}.top-actions{gap:2px}.top-actions .optional{display:none}.top-actions .btn.compact{padding:7px}.site-footer{min-height:60px;padding:8px 13px}.powered img{width:99px}.powered>span{font-size:10px}.footer-note{font-size:10px}.start-view{min-height:calc(100vh - 120px);padding:45px 19px 50px;gap:40px}.start-content h1{font-size:39px;letter-spacing:-1.5px}.start-content>p{font-size:14px}.start-options{gap:9px}.start-card{padding:16px 12px;min-height:152px}.start-card strong{font-size:12px}.start-card>span:not(.start-card-icon):not(.start-arrow){font-size:11px}.start-card-icon{width:34px;height:34px}.start-preview{display:none}.editor-view{height:calc(100vh - 120px);min-height:485px}.workspace-toolbar{height:50px;padding:0 7px}.toolbar-left,.toolbar-right{gap:3px}.toolbar-left .optional,.toolbar-right .optional{display:none}.project-name{width:110px;min-width:60px;font-size:11px;padding:7px 3px}.toolbar-divider{margin:0 1px}.toolbar-right .btn{padding:6px;min-width:33px;min-height:33px}.toolbar-right .count-pill{display:none}.editor-body{grid-template-columns:49px minmax(0,1fr)}.insert-panel{padding:12px 3px}.tool-item{padding:8px 3px!important}.tool-icon{width:36px!important;height:36px!important}.insert-panel .panel-section{margin-top:15px;padding-top:12px}.insert-panel .panel-heading{font-size:8px}.page-tab{padding:5px 0}.properties-panel{position:fixed;right:0;bottom:60px;top:112px;width:min(310px,82vw);box-shadow:-8px 0 30px rgba(0,0,0,.2);z-index:9;display:none}.properties-panel.is-open{display:block}.canvas-top{padding:0 10px}.canvas-scroll{padding:20px 12px 35px}.record-bar{padding:0 8px}.record-bar select{max-width:130px;font-size:11px}.record-nav{gap:2px}.record-nav span{font-size:10px}.drawer,.modal{padding:8px}.data-card{width:100vw;height:92vh;max-height:92vh}.data-actions{padding:10px;gap:5px}.data-actions .btn{font-size:11px;padding:6px 8px}.data-search-wrap{margin-left:0;flex:1;min-width:130px}.data-search-wrap input{width:100%}.dialog-header{padding:14px 16px}.modal-body{padding:15px 16px}.modal-actions{padding:12px 16px}}
@media(max-width:355px){.brand-name strong{font-size:11px}.top-actions .btn.compact#undoBtn{display:none}.start-content h1{font-size:33px}.toolbar-left .btn#backHomeBtn{padding:6px}.project-name{width:83px}.powered img{width:86px}.footer-note{font-size:9px}.editor-body{grid-template-columns:45px minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:640px){.top-actions #undoBtn,.top-actions #projectOpenBtn{display:none!important}.topbar{gap:5px}.top-actions .btn-primary{padding:10px 9px}.brand{gap:7px}.toolbar-right{min-width:0}}
@media(max-width:380px){.brand-name span{display:none}.brand-name strong{font-size:12px}.top-actions .top-actions }
@media(max-width:355px){.topbar{padding-left:7px;padding-right:7px}.top-actions .btn-primary{padding-left:7px;padding-right:7px}}
@media(max-width:355px){.top-actions .top-actions .brand-icon{width:30px;height:30px}.brand{gap:5px}}

/* VariPage · task-first interface · plum/ink palette */
:root{
  --bg:#f8f7fa;--surface:#ffffff;--surface2:#fbfafc;--surface3:#f0ecf4;
  --text:#302a37;--muted:#786f80;--line:#e7e2eb;
  --accent:#77578d;--accent-bg:#f2eaf7;--accent-text:#714c85;
  --danger:#b85056;--shadow:0 14px 35px rgba(42,31,50,.085);--radius:10px;
}
body{background:var(--bg)}
.topbar{height:64px;min-height:64px;padding:0 27px;background:var(--surface)}
.brand-icon{width:40px;height:40px;border-radius:10px;background:#42314f;color:#fff;box-shadow:none}
.brand-icon .brand-mark{width:31px;height:31px;stroke:#fff;stroke-width:2.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.brand-icon .brand-mark circle{fill:#cfb0d9;stroke:none}
.brand-icon .brand-mark path:last-child{stroke:#41314f;stroke-width:2.4}
.brand-name strong{font-size:18px;letter-spacing:-.65px;font-weight:760}
.brand-name span{display:none}
.btn-primary{background:#493454;border-color:#493454;color:#fff}
.btn-primary:hover:not(:disabled){background:#65476f;border-color:#65476f}
.btn{border-radius:9px}





body:has(#startView:not(.hidden)) .save-state{display:none}
/* Welcome / setup */
.start-view{display:block;margin:0;width:100%;min-height:calc(100vh - 64px);padding:0;background:var(--bg)}
.setup-container{width:min(1090px,100%);min-height:calc(100vh - 64px);margin:0 auto;padding:44px 34px 24px;display:flex;flex-direction:column}
.setup-header{text-align:left;margin-bottom:28px}
.eyebrow{margin:0 0 13px;color:var(--accent-text);font-weight:730;font-size:10px;letter-spacing:1.4px}
.setup-header h1{font-size:clamp(32px,3.7vw,45px);letter-spacing:-1.55px;line-height:1.12;margin:0 0 10px;font-weight:760}
.setup-header>p{font-size:14px;color:var(--muted);line-height:1.55;margin:0;max-width:700px}
.journey-steps{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.journey-step{display:flex;align-items:center;gap:10px;flex:none;background:transparent;border:0;color:var(--muted);font-size:12px;font-weight:660;padding:4px 0}
.journey-step:disabled{cursor:default;opacity:.7}
.journey-step.active{color:var(--text)}
.journey-step.complete{color:var(--accent-text)}
.step-number{width:30px;height:30px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;font-size:12px;font-weight:750;background:var(--surface)}
.journey-step.active .step-number{background:#493454;border-color:#493454;color:#fff}

.journey-step.complete .step-number{background:var(--accent-bg);border-color:var(--accent);color:var(--accent-text)}
.journey-line{flex:1;height:1px;background:var(--line);min-width:14px;max-width:72px}
.setup-layout{display:grid;grid-template-columns:minmax(0,1fr) 292px;gap:20px;align-items:stretch}
.setup-main{min-width:0;border:1px solid var(--line);background:var(--surface);border-radius:15px;padding:30px 32px 28px;min-height:438px}
.setup-stage{width:100%}
.setup-card-heading{margin-bottom:24px}
.setup-caption{font-size:10px;letter-spacing:.9px;font-weight:760;color:var(--accent-text)}
.setup-card-heading h2{font-size:24px;letter-spacing:-.7px;font-weight:735;margin:10px 0 9px}
.setup-card-heading p{font-size:13px;color:var(--muted);line-height:1.62;margin:0;max-width:580px}
.import-dropzone{width:100%;border:1.5px dashed #cbbbd2;background:var(--surface2);min-height:148px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;text-align:center;color:var(--text);padding:17px 15px;transition:background .15s,border-color .15s}
.import-dropzone:hover,.import-dropzone.is-dragover{background:var(--accent-bg);border-color:var(--accent)}
.drop-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:var(--accent-bg);color:var(--accent-text);margin-bottom:5px}
.drop-icon svg{width:21px;height:21px}
.import-dropzone strong{font-size:14px;font-weight:715}
.import-dropzone>span:last-child{font-size:12px;color:var(--muted)}
.import-dropzone b{font-weight:720;color:var(--accent-text)}
.setup-divider{display:flex;align-items:center;gap:14px;margin:19px 0;color:var(--muted);font-size:11px}
.setup-divider:before,.setup-divider:after{content:"";height:1px;background:var(--line);flex:1}
.setup-alternatives{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.setup-action-card,.template-blank-card{display:flex;align-items:center;gap:12px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:10px;color:var(--text);padding:14px;min-width:0;transition:border .15s,background .15s}
.setup-action-card:hover,.template-blank-card:hover{background:var(--surface2);border-color:#bbaac7}
.setup-action-icon{flex:none;width:38px;height:38px;background:var(--surface3);color:var(--accent-text);border-radius:9px;display:grid;place-items:center}
.setup-action-icon svg{width:19px;height:19px}
.setup-action-text{min-width:0;flex:1}
.setup-action-text strong,.setup-action-text small{display:block}
.setup-action-text strong{font-size:12px;font-weight:735}
.setup-action-text small{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.4}
.setup-action-arrow{width:15px;height:15px;color:var(--muted)}
.setup-skip,.setup-back,.setup-subtle-link{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--muted);font-weight:610;font-size:12px;padding:7px 0}
.setup-skip{margin-top:20px}
.setup-skip svg{width:14px;height:14px}
.setup-skip:hover,.setup-back:hover,.setup-subtle-link:hover{color:var(--accent-text);text-decoration:underline}
.setup-sidebar{background:var(--surface2);border:1px solid var(--line);border-radius:15px;padding:25px 19px;min-width:0}
.sidebar-kicker{font-size:10px;font-weight:760;color:var(--muted);letter-spacing:.8px;margin:1px 0 14px}
.continue-project-card{position:relative;display:flex;align-items:flex-start;gap:12px;text-align:left;border:1px solid var(--line);border-radius:11px;background:var(--surface);padding:15px 12px;width:100%;color:var(--text)}
.continue-project-card:hover,.sample-card:hover{border-color:var(--accent);background:var(--accent-bg)}
.continue-icon{display:grid;place-items:center;width:37px;height:37px;flex:none;background:var(--surface3);color:var(--accent-text);border-radius:9px}
.continue-project-card strong,.continue-project-card small,.sample-card strong,.sample-card small{display:block}
.continue-project-card strong,.sample-card strong{font-size:12px;line-height:1.35;font-weight:750}
.continue-project-card small,.sample-card small{font-size:11px;line-height:1.5;color:var(--muted);margin-top:6px}
.continue-arrow{height:15px;width:15px;flex:none;margin-left:auto;color:var(--muted)}
.sidebar-divider{border-top:1px solid var(--line);margin:24px 0}
.sample-card{width:100%;display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:11px;background:var(--surface);padding:12px;color:var(--text);text-align:left}
.sample-thumb{flex:none;width:58px;height:72px;display:flex;flex-direction:column;justify-content:center;gap:7px;align-items:center;background:#f8f2ee;border:1px solid #e7d9e0;transform:rotate(-3deg);border-radius:2px}
.sample-thumb span{font:italic 8px Georgia,serif;color:#69455e;white-space:nowrap}
.sample-thumb i{width:28px;height:2px;background:#ddc6d2}
.sample-thumb i:last-child{width:17px}
.resume-project-card{display:flex;align-items:center;text-align:left;gap:11px;color:var(--text);width:100%;background:var(--accent-bg);border:1px solid #d7c7df;border-radius:10px;padding:13px;margin-top:16px}
.resume-project-card svg{color:var(--accent-text)}
.resume-project-card strong,.resume-project-card small{display:block;font-size:12px}
.resume-project-card small{font-size:11px;color:var(--muted);margin-top:4px}
/* Data-ready screen */
.setup-ready-tick{font-size:17px;color:var(--accent-text);vertical-align:3px;margin-left:4px}
.data-summary-card{border:1px solid var(--line);border-radius:12px;padding:19px;background:var(--surface2)}
.data-summary-totals{display:flex;gap:0;border-bottom:1px solid var(--line);padding-bottom:19px;margin-bottom:18px}
.data-summary-totals>div{flex:1;display:flex;align-items:baseline;gap:8px}
.data-summary-totals>div+div{border-left:1px solid var(--line);padding-left:21px}
.data-summary-totals strong{font-size:27px;letter-spacing:-1px;font-weight:750}
.data-summary-totals span{font-size:12px;color:var(--muted)}
.setup-field-chips{display:flex;align-items:flex-start;flex-wrap:wrap;gap:7px}
.data-chip{background:var(--surface);border:1px solid var(--line);color:var(--text);border-radius:7px;padding:7px 10px;font-size:11px;max-width:100%;overflow-wrap:anywhere}
.data-chip-more{color:var(--muted)}
.setup-ready-actions{display:flex;gap:9px;align-items:center;margin-top:22px;flex-wrap:wrap}
.setup-ready-actions .btn-primary{min-width:190px}
.setup-ready-actions .btn svg{width:16px;height:16px}
.setup-subtle-link{margin-top:13px}
/* Template step */
.template-dropzone{min-height:196px}
.template-blank-card{width:100%;padding:14px 16px}
.blank-page-art{width:42px;height:52px;flex:none;background:var(--surface);border:1px solid #c9b9d3;box-shadow:2px 2px 0 #ede5f2;display:flex;flex-direction:column;align-items:center;gap:5px;justify-content:center;border-radius:2px}
.blank-page-art span{width:23px;height:2px;background:#d6c8dc}
.blank-page-art span:nth-child(2){width:18px}
.blank-page-art span:nth-child(3){width:20px}
.template-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:22px}
.setup-back svg{transform:rotate(180deg);height:14px;width:14px}
.template-data-note{font-size:11px;color:var(--muted)}
.start-credit{display:flex;align-items:center;justify-content:center;gap:13px;min-height:49px;margin-top:auto;padding-top:35px;padding-bottom:5px}
.start-credit span{white-space:nowrap;font-size:14px;color:var(--muted);font-weight:560}
.start-credit img{display:block;width:153px;height:auto;max-width:44vw;object-fit:contain;flex:none}
/* Editor */
.editor-view{height:calc(100vh - 64px);min-height:585px}
.workspace-toolbar{height:57px;padding:0 16px;background:var(--surface)}
.project-name{font-size:13px}
.editor-body{grid-template-columns:104px minmax(0,1fr) 278px}
.editor-body:not(:has(.properties-panel.is-open)){grid-template-columns:104px minmax(0,1fr)}
.editor-body:not(:has(.properties-panel.is-open)) .properties-panel{display:none}
.insert-panel{background:var(--surface2);border-right:1px solid var(--line);padding:16px 8px}
.insert-panel>.panel-heading{text-align:center;font-size:9px;margin:2px 0 12px;letter-spacing:.55px}
.tool-item{flex-direction:column;justify-content:center;gap:5px;text-align:center;font-size:11px;line-height:1.25;padding:10px 3px;margin:3px 0;border-radius:8px}
.tool-item:hover{background:var(--surface);border-color:var(--line)}
.tool-icon{background:transparent;color:var(--text);width:32px;height:31px}
.tool-icon svg{height:21px;width:21px}
.tool-item:nth-of-type(2) .tool-icon{color:var(--accent-text)}
.insert-panel .panel-section{margin-top:17px;padding-top:15px}
.insert-panel .panel-section .panel-heading{text-align:center;margin:0 0 10px}
.insert-panel .page-tab{justify-content:center;flex-wrap:wrap;gap:4px;text-align:center;padding:8px 4px;background:var(--surface)}
.insert-panel .page-tab span:last-child{width:100%;font-size:10px}
.insert-panel .page-tab.active{border-color:var(--accent);background:var(--accent-bg)}
.insert-panel .page-tab .page-num{width:23px;height:28px}
.insert-panel #addPageBtn{font-size:10px;gap:3px;padding:7px 4px;white-space:normal}
.insert-panel .small-help{display:none}
.canvas-area{background:#eae6ed}

.canvas-top{height:49px;background:var(--surface2)}
.canvas-scroll{background:radial-gradient(ellipse at 50% 35%,rgba(255,255,255,.18),transparent 70%)}
.editor-element:hover{border-color:var(--accent)}
.editor-element.selected{border-color:var(--accent);background:rgba(119,87,141,.035)}
.resize-handle{background:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.properties-panel{background:var(--surface);padding:18px 14px}
.properties-panel .panel-header h2{font-size:14px}
.toast{background:#42304e;color:#fff;bottom:24px}
/* Keep mobile controls usable without a horizontal scrollbar. */
@media(max-width:1100px){
 .editor-body{grid-template-columns:91px minmax(0,1fr) 255px}
 .editor-body:not(:has(.properties-panel.is-open)){grid-template-columns:91px minmax(0,1fr)}
 .setup-container{padding:36px 27px 22px}
 .setup-layout{grid-template-columns:minmax(0,1fr) 269px}
 .setup-main{padding:26px}
}
@media(max-width:850px){
 .setup-layout{grid-template-columns:minmax(0,1fr) 240px;gap:14px}
 .setup-main{padding:23px}
 .setup-sidebar{padding:23px 14px}
 .setup-alternatives{grid-template-columns:1fr}
 .setup-container{padding:30px 23px 20px}
 .editor-body{grid-template-columns:76px minmax(0,1fr) 240px}
 .editor-body:not(:has(.properties-panel.is-open)){grid-template-columns:76px minmax(0,1fr)}
 .insert-panel .tool-item{padding:8px 2px;font-size:10px}
 .insert-panel .page-tab span:last-child{font-size:9px}
}
@media(max-width:680px){
 .topbar{height:59px;min-height:59px;padding:0 12px}
 .brand-icon{height:34px;width:34px;border-radius:9px}
 .brand-icon .brand-mark{height:26px;width:26px}
 .brand-name strong{font-size:15px}
 .top-actions{gap:2px}
 .top-actions .save-state,.top-actions #undoBtn{display:none!important}
 .top-actions .btn-primary{padding:9px 10px}
 
 
 .start-view{min-height:calc(100vh - 59px)}
 .setup-container{min-height:calc(100vh - 59px);padding:28px 18px 20px}
 .setup-header{margin-bottom:22px}
 .setup-header h1{font-size:34px;letter-spacing:-1.2px}
 .setup-layout{grid-template-columns:1fr;gap:13px}
 .setup-main{padding:23px 20px;min-height:0}
 .setup-sidebar{padding:17px 19px}
 .setup-sidebar .sidebar-divider{margin:16px 0}
 .setup-alternatives{grid-template-columns:repeat(2,minmax(0,1fr))}
 .setup-action-card{padding:11px;gap:7px}
 .setup-action-icon{width:32px;height:32px}
 .setup-action-card .setup-action-arrow{display:none}
 .setup-card-heading h2{font-size:22px}
 .start-credit{padding-top:24px}
 .editor-view{height:calc(100vh - 59px);min-height:485px}
 .editor-body,.editor-body:not(:has(.properties-panel.is-open)){grid-template-columns:61px minmax(0,1fr)}
 .insert-panel{padding:10px 3px}
 .insert-panel>.panel-heading{font-size:8px;margin:4px 0 8px}
 .insert-panel .tool-item{font-size:9px!important;padding:9px 2px!important;gap:4px}
 .insert-panel .tool-icon{width:29px!important;height:29px!important}
 .insert-panel .page-tab span:last-child{display:none}
 .insert-panel #addPageBtn{font-size:0;padding:8px 0;gap:0}
 .insert-panel #addPageBtn svg{width:17px;height:17px}
 .properties-panel{top:109px;bottom:0}
 .properties-panel.is-open{display:block}
 .toast{bottom:18px}
 .toolbar-right .btn{padding:6px}
}
@media(max-width:405px){
 .setup-container{padding:21px 12px 19px}
 .setup-header h1{font-size:30px}
 .setup-header p{font-size:12px}
 .journey-steps{gap:7px;margin-bottom:15px}
 .journey-step{font-size:11px;gap:5px}
 .step-number{height:26px;width:26px;font-size:11px}
 .journey-line{min-width:4px}
 .setup-main{padding:20px 15px}
 .setup-card-heading{margin-bottom:18px}
 .setup-card-heading h2{font-size:21px}
 .setup-card-heading p{font-size:12px}
 .setup-alternatives{gap:7px}
 .setup-action-card{padding:10px 8px}
 .setup-action-text strong{font-size:11px}
 .setup-action-text small{font-size:10px}
 .setup-action-icon{width:29px;height:29px}
 .setup-action-icon svg{height:16px;width:16px}
 .project-menu-toggle{gap:5px;padding:7px 8px;min-height:34px}
 .project-menu-toggle span{font-size:11px}
 .project-menu-toggle svg{height:16px;width:16px}
 .brand{gap:7px}
 .brand-name strong{font-size:14px}
 .toolbar-left .btn#backHomeBtn{padding:6px}
 .start-credit{gap:10px}
 .start-credit img{width:135px}
 .start-credit span{font-size:12px}
}
@media(max-width:350px){
 .topbar{padding:0 8px}
 .brand-name strong{font-size:12px}
 .brand-icon{width:30px;height:30px}
 .top-actions .btn-primary{padding:8px}
 .project-menu-toggle span{display:none}
 .project-menu-toggle{padding:7px}
 .editor-body,.editor-body:not(:has(.properties-panel.is-open)){grid-template-columns:54px minmax(0,1fr)}
 .setup-header h1{font-size:28px}
 .setup-action-text small{font-size:9px}
 .data-summary-totals strong{font-size:24px}
}



/* Brand attribution stays within the product wordmark, never as a floating control. */
.brand-name{gap:1px;align-items:flex-end;justify-content:center;line-height:1.08}
.brand-name strong{align-self:flex-start}
.brand-name span{display:block;font-size:8px;letter-spacing:.73px;line-height:1.12;font-weight:720;color:var(--muted);text-align:right;white-space:nowrap}
@media(max-width:680px){.brand-name span{font-size:7px;letter-spacing:.38px}}
@media(max-width:350px){.brand-name span{font-size:6.35px;letter-spacing:.22px}}

/* Keep the first view entirely visible on ordinary laptop displays.
   On genuinely short displays, maintain natural scrolling rather than hiding actions. */
@media(min-width:681px) and (max-height:820px){
 .setup-container{padding-top:19px;padding-bottom:10px}
 .setup-header{margin-bottom:13px}
 .setup-header h1{font-size:clamp(30px,3.2vw,39px);margin-bottom:7px}
 .setup-header .eyebrow{margin-bottom:9px}
 .journey-steps{margin-bottom:11px}
 .setup-main{min-height:0;padding:18px 23px}
 .setup-sidebar{padding:20px 17px}
 .setup-card-heading{margin-bottom:15px}
 .setup-card-heading h2{margin:7px 0 6px;font-size:22px}
 .setup-card-heading p{line-height:1.48}
 .import-dropzone{min-height:105px;padding:11px}
 .drop-icon{width:31px;height:31px;margin-bottom:0}
 .drop-icon svg{width:18px;height:18px}
 .setup-divider{margin:11px 0}
 .setup-action-card{padding:10px 12px}
 .setup-skip{margin-top:10px}
 .sidebar-kicker{margin-bottom:11px}
 .sidebar-divider{margin:16px 0}
 .continue-project-card{padding:12px}
 .sample-card{padding:9px}
 .sample-thumb{height:60px}
 .template-dropzone{min-height:140px}
 .template-bottom{margin-top:13px}
}
/* On a normal phone, preserve quick access to saved projects and the example,
   but don't force a second screenful of cards under the primary form. */
@media(max-width:680px){
 .setup-container{padding-top:16px;padding-bottom:11px}
 .setup-header{margin-bottom:12px}
 .setup-header h1{font-size:30px;margin:0 0 7px}
 .setup-header .eyebrow{margin-bottom:7px}
 .setup-header>p{line-height:1.38}
 .journey-steps{margin-bottom:10px}
 .setup-layout{gap:10px}
 .setup-main{padding:17px 17px;min-height:0}
 .setup-card-heading{margin-bottom:14px}
 .setup-card-heading h2{font-size:20px;margin:7px 0 6px}
 .setup-card-heading p{line-height:1.43}
 .import-dropzone{min-height:102px;padding:10px;gap:4px}
 .drop-icon{width:30px;height:30px;margin-bottom:0}
 .drop-icon svg{width:17px;height:17px}
 .import-dropzone strong{font-size:13px}
 .import-dropzone>span:last-child{font-size:11px}
 .setup-divider{margin:10px 0}
 .setup-action-card{padding:9px 9px}
 .setup-skip{margin-top:9px;font-size:11px}
 .setup-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0;background:transparent;border:0}
 .setup-sidebar .sidebar-kicker,.setup-sidebar .sidebar-divider{display:none}
 .continue-project-card,.sample-card{min-width:0;min-height:83px;align-items:center;gap:7px;padding:9px 10px;border-radius:11px}
 .continue-project-card strong,.sample-card strong{font-size:11px}
 .continue-project-card small,.sample-card small{font-size:10px;line-height:1.25;margin-top:3px}
 .continue-icon{width:29px;height:29px;border-radius:7px}
 .continue-icon svg{height:17px;width:17px}
 .sample-thumb{width:28px;height:40px;gap:3px}
 .sample-thumb span{font-size:5px}
 .sample-thumb i{width:16px;height:1px}
 .sample-thumb i:last-child{width:11px}
 .setup-sidebar .continue-arrow{display:none}
 .resume-project-card{grid-column:span 2;margin-top:0}
 .template-dropzone{min-height:128px}
 .template-bottom{margin-top:11px}
}
@media(max-width:405px){
 .setup-container{padding:13px 12px 10px}
 .setup-header{margin-bottom:9px}
 .setup-header h1{font-size:28px}
 .journey-steps{margin-bottom:8px}
 .setup-main{padding:14px 13px}
 .setup-card-heading{margin-bottom:12px}
 .setup-card-heading h2{font-size:19px}
 .setup-alternatives{gap:6px}
 .setup-action-card{padding:8px 7px}
 .setup-action-icon{height:26px;width:26px}
 .setup-action-text small{margin-top:3px}
 .continue-project-card,.sample-card{padding:8px 8px}
}
@media(max-width:355px){
 .setup-sidebar{grid-template-columns:1fr}
 .continue-project-card,.sample-card{min-height:56px}
 .sample-thumb{display:none}
 .resume-project-card{grid-column:auto}
}
/* Keep the attribution aligned to the right edge of the VariPage wordmark. */
.brand-name span{font-size:7.6px;letter-spacing:0}
@media(max-width:680px){.brand-name span{font-size:6.2px;letter-spacing:0}}
@media(max-width:350px){.brand-name span{font-size:5.3px;letter-spacing:0}}
@media(max-width:680px){.brand-name span{font-size:6px}}
@media(max-width:350px){.brand-name span{font-size:5.1px}}

/* Centre the complete setup journey in the available first-load viewport.
   Natural page height still expands on short screens so actions stay reachable. */
.setup-container { justify-content: center; }
@media (min-width:681px) and (min-height:821px) {
  .setup-container { padding-block: 32px; }
}
@supports (height: 100dvh) {
  .start-view, .setup-container { min-height: calc(100dvh - 64px); }
  @media (max-width:680px) {
    .start-view, .setup-container { min-height: calc(100dvh - 59px); }
  }
}

/* VariPage visual mark and simplified manual-save toolbar. */
.brand-icon,.brand-icon:hover{background:transparent!important;box-shadow:none!important;border-radius:0!important;overflow:visible;flex:none}
.brand-icon img{display:block;width:100%;height:100%;object-fit:contain}
.top-actions #saveBtn{background:transparent;color:var(--text);border-color:var(--line);min-height:38px}
.top-actions #saveBtn:hover{background:var(--surface3);border-color:var(--accent)}
.top-actions #saveBtn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.top-actions #saveBtn svg{width:16px;height:16px}
@media(max-width:640px){
 .top-actions #saveBtn{padding:9px 11px;min-height:34px;font-size:12px;gap:5px}
 .top-actions #exportBtn{font-size:12px;min-height:34px;padding:9px 11px;gap:5px}
 .top-actions #saveBtn svg,.top-actions #exportBtn svg{width:14px;height:14px}
}
@media(max-width:380px){
 .top-actions #saveBtn,.top-actions #exportBtn{padding:8px 7px;gap:4px;font-size:11px}
 .top-actions #saveBtn svg,.top-actions #exportBtn svg{width:13px;height:13px}
}

/* Match the visual width of the VariPage wordmark and its HJDP attribution. */
.brand-name strong{letter-spacing:.22px}
.brand-name span{letter-spacing:.68px}
@media(max-width:680px){
  .brand-name strong{letter-spacing:-.06px}
  .brand-name span{letter-spacing:.36px}
}
@media(max-width:350px){
  .brand-name strong{letter-spacing:-.12px}
  .brand-name span{letter-spacing:.30px}
}

/* Match both wordmark lines visually without distorting the typography. */
.brand-name{display:flex;flex-direction:column;align-items:stretch;width:100px;gap:1px}
.brand-name strong{display:block;width:100%;font-size:17px;letter-spacing:.28px;text-align:justify;text-align-last:justify;line-height:1.02;white-space:nowrap}
.brand-name span{display:block;width:100%;font-size:7.8px;letter-spacing:.32px;line-height:1.2;text-align:justify;text-align-last:justify;white-space:nowrap}
@media(max-width:680px){
 .brand-name{width:82px}
 .brand-name strong{font-size:14px;letter-spacing:0}
 .brand-name span{font-size:6.5px;letter-spacing:0}
}
@media(max-width:350px){
 .brand-name{width:71px}
 .brand-name strong{font-size:12.5px;letter-spacing:0}
 .brand-name span{font-size:5.6px;letter-spacing:0}
}
/* Keep validation information within Export rather than in the editor toolbar. */
.export-audit{font-size:11.5px;line-height:1.45;margin-top:12px}
.export-audit.is-checking,.export-audit.is-clear{color:var(--muted)}
.export-audit.has-issues{border:1px solid var(--line);border-radius:9px;padding:12px;background:var(--surface2)}
.export-audit-heading{display:flex;align-items:flex-start;gap:9px}
.export-audit-heading svg{width:17px;height:17px;color:var(--accent);margin-top:1px}
.export-audit-heading span{display:flex;flex-direction:column;gap:2px}
.export-audit-heading strong{font-size:12px}
.export-audit-heading small{font-size:11px;color:var(--muted)}
.export-audit details{margin-top:9px}
.export-audit summary{cursor:pointer;color:var(--accent-text);font-weight:650}
.export-audit .issue-item{padding:8px 2px}
.export-audit .issue-list{max-height:155px}


/* Compact brand lock-up — the wordmark matches the HJDP line without stretched spaces. */
.brand-name{width:auto;align-items:flex-start;gap:2px;line-height:1.06}
.brand-name strong{display:block;width:auto;font-size:19px;letter-spacing:1.8px;text-align:left;text-align-last:auto;line-height:1.03}
.brand-name span{display:block;width:auto;font-size:9px;letter-spacing:1px;text-align:left;text-align-last:auto;line-height:1.1}
@media(max-width:680px){
 .brand-name strong{font-size:15px;letter-spacing:1.15px}
 .brand-name span{font-size:7.1px;letter-spacing:.65px}
}
@media(max-width:350px){
 .brand-name strong{font-size:13px;letter-spacing:.83px}
 .brand-name span{font-size:6.1px;letter-spacing:.48px}
}
/* Remove duplicated stage captions; let the progress tracker carry the step number. */
.setup-header{margin-bottom:23px}
.setup-card-heading{margin-bottom:20px}
.setup-card-heading h2{margin:0 0 8px}
.setup-card-heading:not(:has(p)){margin-bottom:16px}
/* Saved projects and example are self-contained actions, not a tall empty sidebar. */
.setup-sidebar{align-self:start;background:transparent;border:0;padding:0;display:flex;flex-direction:column;gap:12px}
.setup-sidebar .continue-project-card,.setup-sidebar .sample-card{min-height:100px;border-radius:12px;padding:16px;background:var(--surface)}
.setup-sidebar .sample-thumb{height:58px}
.setup-sidebar .continue-project-card:hover,.setup-sidebar .sample-card:hover{background:var(--accent-bg)}
/* Suppress explanatory filler from the normal export state; show only meaningful warnings. */
.export-audit.is-clear{display:none}
@media(max-width:680px){
 .setup-header{margin-bottom:18px}
 .setup-card-heading{margin-bottom:16px}
 .setup-sidebar{gap:9px}
 .setup-sidebar .continue-project-card,.setup-sidebar .sample-card{min-height:76px;padding:12px}
}

/* Compact identity: wordmark and attribution share one line width. */
.brand-name{width:119px;align-items:stretch;gap:3px;line-height:1}
.brand-name strong{display:block;width:100%;font-size:19px;font-weight:770;letter-spacing:2.95px;white-space:nowrap;line-height:1.02}
.brand-name span{display:block;width:100%;font-size:8.5px;font-weight:740;letter-spacing:1.24px;line-height:1.08;text-align:left;white-space:nowrap}
@media(max-width:680px){
 .brand-name{width:104px;gap:2px}
 .brand-name strong{font-size:16px;letter-spacing:2.65px}
 .brand-name span{font-size:7.2px;letter-spacing:1.08px}
}
@media(max-width:350px){
 .brand-name{width:93px;gap:2px}
 .brand-name strong{font-size:14.5px;letter-spacing:2.25px}
 .brand-name span{font-size:6.7px;letter-spacing:.86px}
}
/* No redundant gap where the appearance pill used to be. */
.top-actions{gap:8px}
@media(max-width:680px){.top-actions{gap:5px}}

/* Both brand lines occupy the same visual width at each breakpoint. */
.brand-name strong{letter-spacing:3.85px}
.brand-name span{letter-spacing:2.35px}
@media(max-width:680px){
 .brand-name strong{letter-spacing:3.85px}
 .brand-name span{letter-spacing:2.30px}
}
@media(max-width:350px){
 .brand-name strong{letter-spacing:3.30px}
 .brand-name span{letter-spacing:1.90px}
}
/* Centre short documents without affecting scrolling for taller pages. */
.canvas-scroll .page-shell{margin-block:auto}

/* Export controls stay secondary until requested. */
.export-settings{margin:16px 0 6px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0}
.export-settings summary{cursor:pointer;font-size:12px;font-weight:650;color:var(--accent-text);padding:4px 0;list-style-position:inside}
.export-settings[open] summary{margin-bottom:12px}
.export-settings .prop-group{margin-bottom:10px}
.export-settings .prop-row{gap:12px}
.export-count{font-size:12px;font-weight:600;color:var(--muted);margin:12px 0 2px}
#filenameGroup{margin-top:16px}
#filenameGroup .prop-group{margin-bottom:5px}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.editor-element:focus-visible{outline:2px solid var(--accent);outline-offset:2px}


/* Help trigger and guide modal */
.help-trigger{width:38px;height:38px;border:1px solid var(--line);border-radius:999px;background:var(--surface);display:grid;place-items:center;color:var(--text);padding:0;flex:0 0 auto}
.help-trigger:hover{background:var(--surface3);border-color:var(--accent)}
.help-trigger svg{width:17px;height:17px}
#modal.help-modal .modal-card{width:min(960px,92vw)}
.help-intro{display:grid;grid-template-columns:1fr 1.35fr;gap:14px;margin-bottom:18px}
.help-intro-card{border:1px solid var(--line);background:var(--surface2);border-radius:12px;padding:16px}
.help-intro-card h3,.help-usecase-head h3{margin:0 0 8px;font-size:16px;letter-spacing:-.2px}
.help-intro-card p,.help-usecase-head p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}
.help-quick-steps{margin:0;padding-left:18px;display:grid;gap:10px}
.help-quick-steps li{padding-left:2px}
.help-quick-steps strong{display:block;font-size:13px;margin-bottom:2px}
.help-quick-steps span{display:block;font-size:12px;color:var(--muted);line-height:1.45}
.help-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.help-tab{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:999px;padding:8px 12px;font-size:12px;font-weight:680}
.help-tab:hover{background:var(--surface3)}
.help-tab.active{background:var(--accent-bg);border-color:var(--accent);color:var(--accent-text)}
.help-usecase-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start;margin-bottom:14px}
.help-field-list{list-style:none;margin:2px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.help-field-list li{padding:6px 9px;border-radius:999px;background:var(--surface2);border:1px solid var(--line);font-size:11px;color:var(--muted);white-space:nowrap}
.storyboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.story-card{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden;display:flex;flex-direction:column;min-width:0}
.story-art{height:148px;background:linear-gradient(180deg,var(--surface2),#f3edf7);padding:14px;display:flex;align-items:center;justify-content:center}
.story-copy{padding:12px 13px 14px;display:flex;flex-direction:column;gap:5px}
.story-step{font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted);font-weight:800}
.story-copy strong{font-size:13px}
.story-copy p{margin:0;font-size:11.5px;color:var(--muted);line-height:1.5}
.mini-table{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:5px;width:100%;max-width:182px}
.mini-table span{font-size:9px;padding:5px 6px;border-radius:6px;background:#fff;border:1px solid rgba(88,66,102,.12);color:#5b4a65;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-table span:nth-child(-n+3){background:#e9dfee;font-weight:700}
.mini-doc{position:relative;width:112px;height:132px;border-radius:12px;background:#fff;border:1px solid rgba(88,66,102,.14);box-shadow:0 8px 22px rgba(39,26,54,.08);padding:12px}
.mini-doc-top{height:8px;border-radius:999px;background:#dfd1e8;margin-bottom:16px}
.mini-doc-title{font-size:12px;letter-spacing:1.1px;font-weight:800;color:#5b456d;text-align:center;margin-bottom:13px}
.mini-doc-line{height:6px;border-radius:999px;background:#e8e1ee;margin-bottom:8px}
.mini-doc-line.long{width:100%}.mini-doc-line.short{width:72%;margin-inline:auto}.mini-doc-seal{position:absolute;right:12px;bottom:12px;width:28px;height:28px;border-radius:50%;background:#dccbe7;border:3px solid #f5eef8}
.mini-tag{display:inline-flex;padding:6px 10px;border-radius:999px;background:#efe6f5;color:#5f4775;font-size:10px;font-weight:700;margin-bottom:12px}
.mini-qr{width:38px;height:38px;border-radius:8px;background:repeating-linear-gradient(0deg,#fff 0 4px,#ddd8e0 4px 8px),repeating-linear-gradient(90deg,#fff 0 4px,#ddd8e0 4px 8px);border:4px solid #fff;box-shadow:0 0 0 1px rgba(88,66,102,.12);margin-top:12px}
.mini-qr.outlined{border-color:#fff;box-shadow:0 0 0 2px #6a4f82}
.field-pill{display:inline-flex;align-items:center;justify-content:center;padding:7px 10px;border-radius:999px;background:#f2ebf7;border:1px dashed #7d6692;color:#5b446a;font-size:9.5px;font-weight:700}
.field-pill.small{position:absolute;left:18px;bottom:26px}
.field-pill.tiny{position:absolute;right:18px;bottom:18px;font-size:8.5px;padding:5px 8px}
.cert-doc.overlay,.invite-doc.overlay{display:flex;align-items:flex-start;justify-content:center;padding-top:22px}
.mini-stack{position:relative;width:88px;height:86px}
.mini-stack div{position:absolute;inset:0;margin:auto;width:58px;height:76px;border-radius:10px;background:#fff;border:1px solid rgba(88,66,102,.14);box-shadow:0 5px 14px rgba(39,26,54,.08)}
.mini-stack div:nth-child(1){transform:translate(-10px,10px)}
.mini-stack div:nth-child(2){transform:translate(0,5px)}
.mini-stack div:nth-child(3){transform:translate(10px,0)}
.mini-stack span{position:absolute;right:1px;bottom:-3px;font-size:11px;font-weight:800;color:#5b456d}
.mini-flow-end{display:flex;align-items:center;gap:12px}.mini-flow-end svg{width:18px;height:18px;color:#776186}
.mini-phone{width:46px;height:78px;border:2px solid #6b4e82;border-radius:14px;background:#fff;display:grid;place-items:center;color:#6b4e82;font-size:10px;font-weight:800}

@media(max-width:860px){
  .help-intro{grid-template-columns:1fr}
  .help-usecase-head{grid-template-columns:1fr}
  .help-field-list{justify-content:flex-start}
  .storyboard{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .help-trigger{width:34px;height:34px}
  #modal.help-modal .modal-card{width:min(96vw,960px)}
  .help-intro-card{padding:13px}
  .storyboard{grid-template-columns:1fr}
  .story-art{height:132px}
  .story-copy{padding:11px 12px 13px}
}

/* Page cards: independent selection and deletion controls. */
.page-card{position:relative;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:8px;background:var(--surface);overflow:hidden;min-width:0}
.page-card.active{border-color:var(--accent);background:var(--accent-bg)}
.insert-panel .page-card .page-tab{border:0;background:transparent;border-radius:0;padding:7px 3px 4px;margin:0;min-height:36px}
.page-card .page-tab:focus-visible,.page-delete:focus-visible{outline-offset:-2px}
.page-delete{display:grid;place-items:center;align-self:center;width:28px;height:25px;background:transparent;color:var(--muted);border:0;border-radius:5px;padding:0;margin:0 0 3px}
.page-delete svg{width:14px;height:14px}
.page-delete:hover:not(:disabled){background:#f8e6e6;color:#a13737}
.page-delete:disabled{opacity:.3}
.btn-danger{background:#a43b40;color:white;border-color:#a43b40}.btn-danger:hover{background:#8b2e32}
.help-trigger{border-radius:8px}.help-trigger svg{width:21px;height:21px;stroke-width:2}
.help-modal .dialog-header{align-items:flex-start}.help-modal .dialog-header h2{font-size:20px}
.help-modal .modal-body{padding-bottom:22px}.help-tabs .help-tab{border-radius:8px}
.story-art{background:#f2edf4}.mini-results{display:flex;gap:6px;width:100%;justify-content:center}.mini-results>div,.mini-result-invite{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;background:white;border:1px solid #dbd0e1;border-radius:4px;min-width:0;width:50%;height:76px;text-align:center;padding:4px;color:#59456a}.mini-results b,.mini-result-invite b{font-size:7px;letter-spacing:.2px}.mini-results strong,.mini-result-invite strong{font-size:10px;line-height:1.2}.mini-results small,.mini-result-invite small{font-size:8px}.mini-result-invite{width:85px;height:105px}.mini-result-invite .mini-qr{margin:0;width:25px;height:25px}.mini-phone{flex-shrink:0}.mini-flow-end{gap:6px}.mini-flow-end svg{flex-shrink:0}
@media(max-width:680px){.page-delete{width:27px;height:27px}.insert-panel .page-card .page-tab{padding:5px 2px 0}.help-trigger{width:34px;height:34px}.storyboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.story-art{height:115px;padding:8px}.mini-doc{transform:scale(.76)}.story-copy{padding:9px}.story-copy p{font-size:11px}.mini-table{gap:2px}.mini-table span{padding:4px 2px;font-size:8px}}
@media(max-width:355px){.top-actions{gap:3px}.top-actions #saveBtn,.top-actions #exportBtn{padding:7px 5px}.top-actions #saveBtn svg,.top-actions #exportBtn svg{display:none}.help-trigger{width:30px;height:32px}.storyboard{grid-template-columns:1fr}.story-art{height:108px}}

.mini-qr{background:#fff;padding:0;border:1px solid #fff;border-radius:2px}.mini-qr svg{display:block;width:100%;height:100%;fill:#4c355c;stroke:none}.mini-doc .mini-qr{margin-top:6px}.mini-result-invite .mini-qr{margin:0}
@media(min-width:681px){.page-card .page-delete{position:absolute;right:3px;top:3px;width:22px;height:23px;margin:0}.insert-panel .page-card .page-tab{padding:8px 3px;min-height:57px}.page-card .page-delete svg{width:13px;height:13px}}

/* Field insertion: single chevron, right-aligned; hide placeholder in the options list. */
.insertion-field-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;padding-right:30px;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23685c70' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;background-size:16px 16px}
.insertion-field-select option[hidden]{display:none}
.insertion-field-select:disabled{cursor:not-allowed}

/* About: quiet header action and a compact credit within the dialog only. */
.help-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;height:38px;padding:0 10px;border:1px solid var(--line);border-radius:8px;font-size:13px;font-weight:650;line-height:1;white-space:nowrap}
.help-trigger svg{width:17px;height:17px;stroke-width:1.8}
#modal.help-modal .modal-body{min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding-bottom:20px}
.about-credit{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;margin:18px 0 0;padding:12px 0 4px;position:static}
.about-credit span{font-size:10px;font-weight:550;color:var(--muted);white-space:nowrap}
.about-credit img{display:block;width:auto;height:33px;max-width:100%;object-fit:contain}
@media(max-width:680px){.help-trigger{height:34px;padding:0 7px;gap:4px;font-size:12px}.help-trigger svg{width:16px;height:16px}.about-credit img{height:29px}.about-credit span{font-size:9.5px}.about-credit{margin-top:16px;padding:10px 0 4px}}
@media(max-width:355px){.help-trigger{height:32px;padding:0 5px;gap:3px;font-size:11px}.help-trigger svg{width:14px;height:14px}.top-actions #saveBtn,.top-actions #exportBtn{padding-inline:5px}.about-credit img{height:26px}}
