*{box-sizing:border-box}html{color-scheme:dark;--bg:#10232c;--surface:#17313b;--surface2:#203e48;--text:#edf6f6;--muted:#a8c1c5;--border:#36545d;--accent:#62d1cb;--ink:#10282d;--select:#efb26f;--selected:#42362e;--danger:#ffb1a7}html[data-qf-theme=light]{color-scheme:light;--bg:#eef5f4;--surface:#fff;--surface2:#e4eeed;--text:#19343b;--muted:#516c73;--border:#b8cdcd;--accent:#087b78;--ink:#fff;--select:#9b530b;--selected:#fff0dd;--danger:#a12425}@media(prefers-color-scheme:light){html[data-qf-theme=system]{color-scheme:light;--bg:#eef5f4;--surface:#fff;--surface2:#e4eeed;--text:#19343b;--muted:#516c73;--border:#b8cdcd;--accent:#087b78;--ink:#fff;--select:#9b530b;--selected:#fff0dd;--danger:#a12425}}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.5 system-ui,sans-serif}button,input,select,textarea{font:inherit;color:var(--text);background:var(--surface2);border:1px solid var(--border);border-radius:9px;padding:9px 12px;min-height:40px}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button.primary{background:var(--accent);color:var(--ink);border-color:var(--accent);font-weight:700}button.chosen,.tree button.chosen{border-color:var(--select);background:var(--selected);color:var(--select);font-weight:650}button.danger{color:var(--danger)}input[type=checkbox]{min-height:0;accent-color:var(--accent)}input[type=file]{max-width:100%}textarea{width:100%;resize:vertical}label{display:block;margin:7px 0}input:not([type=checkbox]),select{max-width:100%}.field{display:grid;gap:5px;margin:10px 0}.field input,.field select{width:100%}.top{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid var(--border);background:var(--surface);flex-wrap:wrap}.brand{display:flex;align-items:center;gap:12px;flex:1}.brand img{height:44px;width:44px;border-radius:10px}.brand strong{font-size:1.25rem;display:block}.muted,small{color:var(--muted)}.nav,.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.nav{padding:12px 20px}.bar{padding:12px 20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.layout{display:grid;grid-template-columns:minmax(210px,1fr) minmax(300px,1.25fr) minmax(260px,1fr);gap:14px;padding:0 20px 20px;align-items:start}.layout.two{grid-template-columns:minmax(230px,1fr) minmax(360px,2fr)}.panel{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:16px;min-width:0;overflow-wrap:anywhere}.panel h2{font-size:1.15rem;margin:0 0 12px}.panel h3{font-size:1rem;margin:16px 0 8px}.tree{max-height:70vh;overflow:auto;scrollbar-width:thin}.tree .row{display:flex;align-items:center;gap:3px;margin:3px 0}.tree button{border:1px solid transparent;background:transparent;text-align:left;padding:7px;min-height:36px}.tree .entry{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree .arrow{width:32px;flex:none;text-align:center}.cards{display:grid;gap:8px}.cards button{text-align:left;padding:12px}.card{border:1px solid var(--border);border-radius:11px;padding:12px;margin:10px 0;background:var(--surface2)}.report{background:#fff;color:#243439;border-radius:8px;padding:17px;min-height:120px;white-space:pre-wrap}.report table{border-collapse:collapse;width:100%;margin:8px 0 14px}.report td{border:1px solid #bac9cc;padding:6px;white-space:pre-wrap}.report tr:first-child{background:#e4eeee;font-weight:600}.notice{margin:0 20px 12px;padding:12px 16px;background:var(--surface2);border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:10px}.error{color:var(--danger);border-left-color:var(--danger)}.splash{text-align:center;padding:12vh 20px}.splash img{width:90px}.qpbl-update-dialog,.qpbl-update-completed{position:fixed;bottom:16px;right:16px;z-index:1200;width:min(410px,calc(100% - 32px));background:var(--surface);border:2px solid var(--accent);padding:16px;border-radius:14px;box-shadow:0 12px 36px #0005}.qpbl-update-dialog strong,.qpbl-update-completed strong{font-size:1.1rem}.qpbl-update-dialog button:first-child,.qpbl-update-completed button{background:var(--accent);color:var(--ink)}.qpbl-update-dialog.postponed{border-width:1px}.empty{padding:40px;text-align:center;color:var(--muted)}.block{border:1px solid var(--border);border-radius:12px;padding:12px;margin:12px 0}.block .segment{border-left:2px solid var(--accent);padding-left:10px;margin:10px 0}.legal{white-space:pre-wrap;max-height:75vh;overflow:auto}.spacer{flex:1}hr{border:0;border-top:1px solid var(--border);margin:16px 0}@media(max-width:1050px){.layout{grid-template-columns:minmax(200px,1fr) minmax(0,1.5fr)}.preview{grid-column:1/-1}}@media(max-width:680px){.layout,.layout.two{grid-template-columns:1fr;padding:0 10px 10px}.top,.bar,.nav{padding:10px}.notice{margin:0 10px 10px}.tree{max-height:38vh}.panel{padding:12px}.preview{grid-column:auto}button,input,select{min-height:44px}}

/* QPL Premium Flow — navigation and two equal work areas. */
html{--bg:#0e202b;--surface:#142d3a;--surface2:#1b3945;--border:#34525e;--text:#edf6f8;--muted:#adc4ce;--accent:#62d1cb;--ink:#10282d;--select:#efb26f;--selected:#42362e;--shadow:0 16px 42px #030e1655;--hero:radial-gradient(ellipse at 80% 0%,#1e4b56 0%,transparent 60%)}
html[data-qf-theme=light]{--bg:#edf3f5;--surface:#fff;--surface2:#e5eff1;--border:#c0d3d9;--text:#193541;--muted:#48636f;--accent:#087b78;--ink:#fff;--select:#92520c;--selected:#fff0dd;--shadow:0 14px 36px #284e6010;--hero:radial-gradient(ellipse at 80% 0%,#d6e9eb 0%,transparent 60%)}
@media(prefers-color-scheme:light){html[data-qf-theme=system]{--bg:#edf3f5;--surface:#fff;--surface2:#e5eff1;--border:#c0d3d9;--text:#193541;--muted:#48636f;--accent:#087b78;--ink:#fff;--select:#92520c;--selected:#fff0dd;--shadow:0 14px 36px #284e6010;--hero:radial-gradient(ellipse at 80% 0%,#d6e9eb 0%,transparent 60%)}}
body{font-family:Inter,"Segoe UI",system-ui,sans-serif;background:var(--hero),var(--bg);min-height:100vh}button{transition:background-color .15s,border-color .15s,box-shadow .15s}button:not(:disabled):hover{border-color:var(--accent)}.ui-glyph{flex:none;vertical-align:middle}.top{padding:14px clamp(14px,3vw,38px);gap:18px;box-shadow:0 4px 18px #0000000d}.brand-button{background:transparent;border:0;padding:0;min-height:48px;flex:1 0 auto;text-align:left}.brand-button img{height:48px;width:48px;object-fit:contain}.brand strong{font-size:1.3rem;letter-spacing:-.035em}.brand small{font-size:.72rem;letter-spacing:.08em}.top .nav{padding:0;gap:5px}.top .nav button,.header-actions button{display:inline-flex;align-items:center;gap:8px;min-height:43px;background:transparent;border-color:transparent;color:var(--muted);font-weight:600;white-space:nowrap}.top .nav button.chosen{background:var(--selected);border-color:var(--select);color:var(--select)}.header-actions{display:flex;gap:5px}.header-actions button{border-color:var(--border)}.header-actions .ui-glyph{color:var(--accent)}.home-page{max-width:1240px;padding:clamp(26px,5vw,62px) clamp(16px,4vw,44px) 32px;margin:0 auto}.home-intro{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:30px}.eyebrow{display:block;font-size:.73rem;letter-spacing:.17em;font-weight:750;color:var(--accent)}.home-intro h1,.workspace-heading h1{font-size:clamp(1.8rem,3.4vw,2.65rem);line-height:1.16;letter-spacing:-.045em;margin:9px 0 10px}.home-intro p,.workspace-heading p{color:var(--muted);margin:0;max-width:62ch}.local-status{white-space:nowrap;display:flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid var(--border);border-radius:30px;color:var(--muted);font-size:.82rem;background:var(--surface)}.local-status .ui-glyph{color:var(--accent);width:18px;height:18px}.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.area-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--border);border-top:3px solid var(--accent);border-radius:20px;padding:clamp(22px,3vw,34px);background:var(--surface);box-shadow:var(--shadow)}.area-card-catalog{border-top-color:#b78b58}.area-top{display:flex;align-items:center;justify-content:space-between}.area-icon{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:18px;background:var(--surface2);border:1px solid var(--border);color:var(--accent)}.area-icon .ui-glyph{width:34px;height:34px}.area-number{color:var(--muted);font-size:.82rem;letter-spacing:.14em;font-weight:700}.area-card h2{font-size:clamp(1.35rem,2.4vw,1.85rem);letter-spacing:-.035em;line-height:1.2;margin:20px 0 10px}.area-card p{color:var(--muted);margin:0 0 22px;max-width:48ch}.area-card ul{list-style:none;padding:18px 0 24px;margin:0;border-top:1px solid var(--border);display:grid;gap:13px}.area-card li{display:flex;align-items:center;gap:10px;font-size:.94rem}.area-card li .ui-glyph{color:var(--accent);width:18px;height:18px}.area-actions{margin-top:auto;display:grid;gap:9px}.area-primary{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;font-size:1rem;min-height:52px;border-radius:11px}.area-actions small{font-size:.8rem}.home-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:24px;padding:17px 20px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--muted);font-size:.88rem}.home-foot>div{display:flex;align-items:center;gap:10px}.home-foot .ui-glyph{color:var(--accent)}.home-foot strong{color:var(--text)}.home-foot button{white-space:nowrap}.test-note{font-size:.78rem;color:var(--muted);margin:14px 0 0}.workspace-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:25px 26px 12px}.workspace-heading h1{font-size:clamp(1.45rem,2.5vw,2rem)}.document-label{max-width:45%;overflow-wrap:anywhere;border:1px solid var(--border);background:var(--surface);padding:8px 12px;border-radius:10px;color:var(--muted);font-size:.85rem}.bar{margin:10px 20px 18px;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:12px 16px;box-shadow:var(--shadow)}.file-action{position:relative;display:inline-flex;align-items:center;margin:0;padding:10px 15px;border:1px solid var(--accent);border-radius:9px;color:var(--accent);font-weight:650;min-height:44px;cursor:pointer;background:var(--surface2);overflow:hidden}.file-action input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;padding:0}.file-action:focus-within{outline:2px solid var(--accent);outline-offset:2px}.file-action:has(input:disabled){opacity:.45;cursor:default}.workspace-empty{max-width:680px;text-align:center;margin:24px auto;padding:42px 25px;box-shadow:var(--shadow)}.workspace-empty h2{margin:20px 0 8px;font-size:1.35rem}.workspace-empty p{color:var(--muted);margin:auto;max-width:48ch}.panel{box-shadow:0 5px 18px #0000000b}.qpbl-settings{width:min(460px,100%);max-height:90vh;overflow:auto;padding:24px;box-shadow:var(--shadow)}.settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.settings-head h2{margin:0}.notice{margin-top:12px}.qpbl-update-dialog,.qpbl-update-completed{box-shadow:var(--shadow)}
@media(max-width:1000px){.top{gap:10px}.top .nav{order:3;width:100%;flex-wrap:nowrap;overflow-x:auto}.header-actions{margin-left:auto}.top .nav button{flex:1;justify-content:center}.home-grid{gap:16px}.home-intro{flex-wrap:wrap}}@media(max-width:680px){.home-grid{grid-template-columns:1fr}.home-page{padding-top:26px}.home-intro{margin-bottom:22px}.home-foot{align-items:flex-start;flex-direction:column}.header-actions button span{display:none}.header-actions button{padding:10px}.brand strong{font-size:1.15rem}.brand-button{flex:1 1 auto}.brand-button img{width:40px;height:40px}.top .nav button{font-size:.82rem;gap:5px;padding:8px}.top .nav .ui-glyph{width:17px;height:17px}.workspace-heading{padding:18px 14px 8px}.bar{margin:8px 10px 16px}.workspace-empty{margin:15px 10px;padding:30px 20px}.home-intro h1{font-size:1.85rem}}

/* Native file input covers the entire accessible drop target. */
.workspace-empty.dropzone{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;border:2px dashed var(--border);cursor:pointer;overflow:hidden;transition:border-color .15s,background-color .15s;min-height:270px}
.dropzone:hover,.dropzone:focus-within,.dropzone.drag-active{border-color:var(--accent);background:var(--surface2)}
.dropzone:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.dropzone h2{margin:8px 0 0}.dropzone p{margin:0 auto 8px}.dropzone .drop-action{background:var(--accent);color:var(--ink);border-radius:9px;padding:10px 16px;font-weight:650}.dropzone small{margin-top:4px}
.dropzone input[type=file]{position:absolute;inset:0;width:100%;height:100%;max-width:none;opacity:0;cursor:pointer;padding:0;z-index:1}.dropzone:has(input:disabled){opacity:.55;cursor:default}

/* Premium05: QF flow dialog composition, QPL palette. */
.qp-dialog-overlay{position:fixed;inset:0;background:rgba(5,15,24,.64);z-index:1500;display:flex;align-items:center;justify-content:center;padding:20px;overscroll-behavior:contain}
.qp-confirm-overlay{z-index:1600}.qp-dialog{width:min(580px,100%);max-height:min(90vh,850px);max-height:min(90dvh,850px);display:flex;flex-direction:column;overflow:hidden;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 90px #0005;outline:none}.qp-dialog-wide{width:min(900px,100%)}.qp-confirm{width:min(480px,100%)}
.qp-dialog-head{padding:20px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:13px;flex:none}.qp-dialog-head h2{font-size:1.25rem;margin:0;line-height:1.3}.qp-dialog-head small{display:block;margin-top:3px}.qp-dialog-glyph{width:48px;height:48px;border-radius:12px;background:var(--surface2);color:var(--accent);display:grid;place-items:center;flex:none}.qp-dialog-glyph svg{width:27px;height:27px}.qp-icon-close{margin-left:auto;min-width:42px;padding:0;font-size:1.5rem;background:transparent;color:var(--muted)}
.qp-dialog-body{padding:18px 22px;overflow:auto;min-height:0;overscroll-behavior:contain}.qp-dialog-body>p{margin:0 0 12px}.qp-dialog-foot{padding:15px 22px;border-top:1px solid var(--border);display:flex;gap:10px;align-items:center;justify-content:flex-end;flex:none}.qp-dialog-foot small{margin-right:auto}.qp-section-label{color:var(--muted);font-size:.76rem;text-transform:uppercase;letter-spacing:.10em;font-weight:700;margin:0 0 8px}.qp-section-label:not(:first-child){margin-top:20px}
.qp-setting,.qp-setting-link{border:1px solid var(--border);background:var(--surface2);border-radius:12px;padding:14px;margin:0 0 9px}.qp-setting>label:first-child,.qp-setting>strong{font-weight:650;margin:0 0 7px;display:block}.qp-setting select{width:100%;background:var(--surface)}.qp-setting summary{font-weight:650;cursor:pointer}.qp-setting summary .ui-glyph,.qp-setting-link .ui-glyph{vertical-align:middle;color:var(--accent);margin-right:5px}.qp-setting-link{width:100%;display:flex;align-items:center;text-align:left;gap:8px;font-weight:650}.qp-setting-link span{flex:1}.qp-theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.qp-theme-grid button{display:flex;flex-direction:column;align-items:center;gap:7px;background:var(--surface);min-height:74px;justify-content:center}.qp-theme-grid button.chosen{background:var(--selected);color:var(--select)}.qp-legal-text{white-space:pre-wrap;overflow-wrap:anywhere;padding-top:16px}.qp-destructive{background:var(--danger);color:var(--bg);border-color:var(--danger);font-weight:700}.qp-dialog:focus-within{outline:none}
@media(min-width:1051px){.layout>.panel{max-height:calc(100dvh - 205px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.layout>.panel .tree{max-height:54vh}.workspace-heading{padding-top:14px;padding-bottom:4px}.workspace-heading p{margin:3px 0}.bar{margin-top:6px;margin-bottom:10px}}
@media(max-width:600px){.qp-dialog-overlay{padding:10px}.qp-dialog-head,.qp-dialog-body,.qp-dialog-foot{padding:14px}.qp-dialog-head h2{font-size:1.1rem}.qp-dialog{max-height:94dvh}.qp-dialog-foot button{flex:1}.qp-dialog-foot small{display:none}}

.qp-help-title{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}.qp-help-title button{flex:none;display:grid;place-items:center}.qs-help-topic[aria-pressed=true]{border-color:var(--select);color:var(--select);background:var(--selected)}.qs-help-topic .ui-glyph{flex:none;vertical-align:middle;margin-right:6px}

/* Premium07a: honest indeterminate feedback. */
.qp-progress-overlay{z-index:1700}.qp-progress{width:min(100%,490px)}.qp-progress-line,.qp-preview-progress{display:flex;gap:12px;align-items:center;min-height:30px;color:var(--text)}.qp-spinner{flex:none;display:inline-block;width:24px;height:24px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:qp-progress-spin .85s linear infinite}.qp-preview-progress .qp-spinner{width:16px;height:16px;border-width:2px}.qp-progress-track{height:7px;border-radius:999px;overflow:hidden;background:var(--border);margin:18px 0 12px}.qp-progress-track span{display:block;width:35%;height:100%;border-radius:inherit;background:var(--accent);animation:qp-progress-slide 1.5s ease-in-out infinite alternate}.qp-notice-close{float:right;margin:-4px -4px -4px 12px;min-width:32px;padding:2px 8px;background:transparent;color:var(--muted);font-size:1.1rem}.qp-progress-overlay~*{pointer-events:none}@keyframes qp-progress-spin{to{transform:rotate(360deg)}}@keyframes qp-progress-slide{from{transform:translateX(-30%)}to{transform:translateX(215%)}}@media(prefers-reduced-motion:reduce){.qp-spinner,.qp-progress-track span{animation:none}.qp-progress-track span{width:100%;opacity:.45}}
