@charset "UTF-8";
:root{--ink:#0f172a;--text:#334155;--muted:#5f6f86;--accent:#2563eb;--accent-dark:#1d4ed8;--accent-light:#eff6ff;--line:#e2e8f0;--paper:#fff;--ground:#f8fafc;--soft:#f1f5f9;--radius:14px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);background:var(--ground);font-synthesis:none}

*{box-sizing:border-box}
body{margin:0;min-width:0;font-size:13px;line-height:1.5}
button,input,select{font:inherit}
button,a,input,summary{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button{border:0;background:none;color:inherit}
a{color:inherit;text-decoration:none}
button:disabled{cursor:not-allowed;opacity:.42}
button,summary,a,input,select{outline-offset:4px}
button:focus-visible,summary:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid #3b82f6;outline-offset:3px}
button,a,select{transition:background .16s,color .16s,border-color .16s,box-shadow .16s}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.icon-defs{display:none}
[hidden]{display:none!important}
h1,h2,h3,p{margin:0}
input[type=checkbox]{width:14px;height:14px;accent-color:var(--accent);margin:0;cursor:pointer}
input[type=range]{accent-color:var(--accent);width:100%;height:4px;margin:12px 0}
input[type=number]{color:var(--ink);border:1px solid var(--line);border-radius:5px;background:white}
input[type=number]::-webkit-inner-spin-button{opacity:0}

.app-header{min-width:0;min-height:72px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.88);display:flex;align-items:center;flex-wrap:wrap;padding:14px 36px;gap:20px;row-gap:10px}
.brand{display:flex;align-items:center;flex:0 0 auto;gap:10px;font-size:20px;letter-spacing:-.6px;font-weight:650;color:var(--ink)}
.brand-wordmark{white-space:nowrap}
.brand-mark{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:33px;height:33px;background:var(--accent);border-radius:10px;color:white}
.brand-mark svg{width:23px;height:23px;stroke-width:1.5}
.header-divider{height:18px;width:1px;background:#e2e8f0}
.header-caption{color:var(--muted);font-size:13px}
.connection{display:flex;align-items:center;gap:7px;margin-left:auto;min-width:0;white-space:nowrap;color:var(--muted);font-size:12px}
.status-dot{height:6px;width:6px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 4px #f1f5f9}
.connection span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
.connection.online .status-dot{background:#3b82f6;box-shadow:0 0 0 4px #eff6ff}
.connection.offline .status-dot{background:#d97706}
.text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;padding:7px 9px;border-radius:6px;color:var(--muted);white-space:nowrap}
.text-button:hover{color:var(--accent);background:var(--accent-light)}
.help-button{margin-left:0;flex-shrink:0}
.language-picker{min-width:0;display:inline-flex;align-items:center;gap:8px;flex-shrink:0}
.language-label,.lang-label{font-size:11px;white-space:nowrap;color:var(--muted)}
.language-select,.language-picker select{min-height:34px;max-width:136px;min-width:86px;padding:6px 9px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--text);font-size:12px;cursor:pointer;flex-shrink:0}
.language-select:hover,.language-picker select:hover{border-color:#94a3b8}
.help-button svg{width:15px;height:15px}

.app-main{width:100%;min-width:0;max-width:1552px;margin:0 auto;padding:30px 36px 0}
.page-heading>div:first-child{min-width:0}
.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:24px}
.eyebrow{font-size:11px;letter-spacing:2.2px;color:var(--muted);margin-bottom:8px;font-weight:600}
h1{font-size:28px;line-height:1.25;letter-spacing:-.65px;overflow-wrap:break-word;font-weight:620;color:var(--ink)}
.product-title{white-space:nowrap}
.page-heading p{max-width:680px;font-size:13px;color:var(--muted);margin-top:7px}
.workflow{display:flex;align-items:center;gap:13px;white-space:nowrap;font-size:12px;color:var(--muted);margin-top:17px}
.workflow span{display:flex;gap:6px;align-items:center}
.workflow b{font-size:11px;font-weight:500;letter-spacing:.5px}
.workflow i{width:25px;height:1px;background:#e2e8f0}
.workflow .current{color:var(--accent)}
.workflow .done{color:var(--muted)}

.workspace{min-width:0;display:grid;grid-template-columns:278px minmax(0,1fr);gap:20px;align-items:start}
.source-panel{min-width:0;padding:21px;background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 3px 9px #0f172a03}
.section-heading{min-width:0;gap:8px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
h2{font-size:13px;font-weight:600;color:var(--ink)}
.section-heading .subtle{font-size:10px;letter-spacing:1px;color:var(--muted)}
.dropzone{border:1px dashed #cbd5e1;border-radius:9px;background:#f8fafc;min-height:176px;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:20px 6px;cursor:pointer;text-align:center;transition:all .15s}
.dropzone:hover,.dropzone.dragging{background:#eff6ff;border-color:#60a5fa}
.upload-icon{width:40px;height:40px;display:grid;place-items:center;border:1px solid #dbeafe;background:#fff;border-radius:12px;color:var(--muted);margin-bottom:12px;box-shadow:0 2px 4px #0f172a05}
.upload-icon svg{height:20px;width:20px}
.dropzone strong{font-size:13px;color:#334155;font-weight:500;margin-bottom:4px}
.dropzone>span:not(.upload-icon){color:var(--muted);font-size:12px}
.link-color{color:var(--accent);margin-left:4px}
.dropzone small{font-size:10px;color:var(--muted);margin-top:14px;white-space:normal;max-width:100%;line-height:1.6}
.primary-button,.secondary-button{max-width:100%;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;font-size:13px;font-weight:500;border-radius:8px;padding:10px 15px}
.primary-button{background:var(--accent);color:white;border:1px solid var(--accent);box-shadow:0 2px 3px #1d4ed814}
.primary-button:hover:not(:disabled){background:var(--accent-dark);border-color:var(--accent-dark);box-shadow:0 3px 9px #1d4ed820}
.primary-button:disabled{background:#f1f5f9;border-color:#e2e8f0;color:var(--muted);opacity:1;box-shadow:none}
.analyze-button{width:100%;margin-top:16px;min-height:42px;height:auto;padding:10px 12px;gap:7px}
.analyze-button svg{width:17px;height:17px}
.analyze-button kbd{border:1px solid #ffffff32;font-size:11px;font-family:inherit;background:#ffffff10;padding:0 4px;border-radius:3px;line-height:16px;margin-left:3px;flex-shrink:0}
.analyze-button>svg{margin-left:0}
.analyze-button>span{margin-right:0;min-width:0;white-space:normal;line-height:1.3}
.source-hint{font-size:11px;color:var(--muted);text-align:center;margin-top:9px;min-height:15px}
.panel-divider{height:1px;background:var(--line);margin:22px 0 20px}
.section-heading.compact{margin-bottom:8px}
.setting-description{font-size:11px;line-height:1.7;color:var(--muted);max-width:210px}
.switch{position:relative;display:inline-flex;align-items:center;justify-content:flex-end;min-width:44px;min-height:30px;cursor:pointer}
.switch input{position:absolute;opacity:0;width:100%;height:100%}
.switch>span{position:relative;display:block;width:29px;height:17px;border-radius:10px;background:#cbd5e1;transition:background .2s;pointer-events:none}
.switch>span:before{content:"";position:absolute;width:11px;height:11px;border-radius:50%;top:3px;left:3px;background:white;box-shadow:0 1px 3px #0001;transition:transform .2s}
.switch input:checked+span{background:#2563eb}
.switch input:checked+span:before{transform:translateX(12px)}
.switch input:focus-visible+span{outline:2px solid #3b82f6;outline-offset:3px}
.advanced{margin-top:19px;border-top:1px solid #e2e8f0;padding-top:14px}
.advanced summary{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:12px;cursor:pointer;list-style:none}
.advanced summary::-webkit-details-marker{display:none}
.advanced summary svg{width:12px;height:12px;transition:transform .2s}
.advanced[open] summary svg{transform:rotate(180deg)}
.advanced-content{padding-top:16px}
.check-row{display:flex;align-items:center;gap:7px;color:#475569;font-size:12px}
.advanced-content p{font-size:11px;color:var(--muted);line-height:1.8;margin:7px 0 16px}
.range-label{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted)}
.range-label output{font-family:monospace;font-size:11px}
.thresholds{display:grid;gap:8px}
.thresholds label{min-width:0;overflow-wrap:anywhere;display:flex;align-items:center;font-size:12px;color:var(--muted)}
.thresholds input{margin-left:auto;width:54px;height:30px;text-align:center;font-size:12px}
.thresholds span{margin-left:4px}
.local-note{display:flex;align-items:flex-start;gap:7px;padding-top:25px;font-size:11px;color:var(--muted);line-height:1.9}
.local-note svg{height:13px;width:13px;margin-top:3px;opacity:.8}
.file-heading{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.file-icon{width:28px;height:33px;border-radius:6px;background:#f1f5f9;display:grid;place-items:center;color:var(--muted);flex-shrink:0}
.file-icon svg{width:16px;height:16px}
.file-heading>div{min-width:0;flex:1}
.file-heading strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155;font-weight:500}
.file-heading span:not(.file-icon){display:block;overflow-wrap:anywhere;font-size:10px;color:var(--muted);margin-top:3px}
.file-heading .icon-button{width:32px;height:32px;color:var(--muted)}
.source-preview{height:200px;padding:10px;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:7px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.source-preview img{width:100%;height:100%;object-fit:contain;display:block;filter:drop-shadow(0 1px 3px #0002)}
.replace-button{display:flex;gap:5px;align-items:center;justify-content:center;width:100%;font-size:12px;color:var(--muted);margin-top:10px;padding:4px}
.replace-button:hover{color:var(--accent)}
.replace-button svg{width:12px;height:12px}
.page-control{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:5px;margin:10px 0 0;color:var(--muted);font-size:11px}
.page-control input{width:43px;text-align:center;font-size:12px;height:30px;margin:0 3px}
.page-control .icon-button{width:32px;height:32px;border:1px solid var(--line)}
.page-control svg{width:12px;height:12px}

.viewer-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:visible;box-shadow:0 5px 14px #0f172a04}
.viewer-header{min-width:0;display:flex;justify-content:space-between;align-items:center;padding:0 19px;height:59px;border-bottom:1px solid var(--line);gap:12px}
.view-tabs{display:flex;flex:1;min-width:0;align-self:stretch;gap:25px;overflow:auto;scrollbar-width:none}
.view-tabs button{font-size:13px;white-space:nowrap;padding:0 0;position:relative;color:var(--muted);border-radius:0}
.view-tabs button:hover{color:#1d4ed8}
.view-tabs button.active{color:var(--accent);font-weight:600}
.view-tabs button.active:after{content:"";position:absolute;height:2px;background:var(--accent);bottom:-1px;left:0;right:0;border-radius:3px}
.secondary-button{background:#fff;border:1px solid #cbd5e1;color:#475569;box-shadow:0 1px 2px #0f172a05}
.secondary-button:hover:not(:disabled){border-color:#94a3b8;background:#f8fafc}
.secondary-button.small{padding:7px 11px;border-radius:6px;font-size:12px;gap:6px}
.secondary-button.small svg{width:13px;height:13px}
.secondary-button .chevron{width:11px!important;height:11px!important;margin-left:3px}
.export-wrap{position:relative;flex-shrink:0}
.export-menu{max-width:calc(100vw - 48px);position:absolute;z-index:12;right:0;top:38px;width:236px;background:#fff;padding:6px;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 32px #0f172a18}
.export-menu a{display:flex;align-items:center;gap:8px;padding:11px 9px;font-size:12px;color:#334155;border-radius:5px}
.export-menu a:hover{background:#eff6ff}
.export-menu a svg{width:14px;height:14px;color:var(--muted)}
.export-menu a span{margin-left:auto;font-size:10px;color:var(--muted);letter-spacing:.5px}
.export-menu a.unavailable{opacity:.4;pointer-events:none}
.viewer-context{height:40px;display:flex;justify-content:space-between;align-items:center;padding:0 19px;font-size:11px;gap:12px;color:var(--muted)}
.viewer-context>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:55%;font-size:11px}
.result-summary{color:var(--muted);font-size:11px;white-space:nowrap}
.viewer-body{display:grid;grid-template-columns:minmax(0,1fr);margin:0 12px;position:relative}
.viewer-body.inspecting{grid-template-columns:minmax(0,1fr) 230px}
.document-stage{height:clamp(400px,57vh,650px);min-height:400px;position:relative;background-color:#f1f5f9;overflow:hidden;border:1px solid #e2e8f0;border-radius:7px;touch-action:pan-y pinch-zoom;user-select:none;isolation:isolate}
.empty-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:20px;text-align:center}
.empty-state h2{font-size:17px;font-weight:500;margin-top:26px;letter-spacing:.1px;color:#334155}
.empty-state p{font-size:12px;margin-top:7px;color:var(--muted)}
.empty-state>.secondary-button{margin-top:21px;padding:8px 12px;font-size:11px;background:#ffffff;border-color:#cbd5e1;border-radius:6px}
.empty-state>.secondary-button svg{width:12px;height:12px}
.paper-illustration{width:184px;height:168px;position:relative;margin-bottom:7px}
.paper-back{position:absolute;top:12px;left:47px;width:110px;height:141px;background:#e8edf5;border:1px solid #cbd5e1;border-radius:5px;transform:rotate(11deg)}
.paper-front{position:absolute;top:0;left:29px;width:112px;height:147px;background:#fff;border:1px solid #cbd5e1;border-radius:5px;box-shadow:0 7px 17px #0f172a10;transform:rotate(-7deg)}
.paper-title{position:absolute;left:14px;top:18px;width:48px;height:6px;background:#93b5ed;border-radius:2px}
.paper-line{position:absolute;left:14px;height:3px;background:#e2e8f0;border-radius:1px}
.paper-line.a{top:33px;width:81px}
.paper-line.b{top:40px;width:78px}
.paper-line.c{top:47px;width:69px}
.paper-line.d{top:122px;width:80px}
.paper-line.e{top:129px;width:53px}
.paper-region{position:absolute;top:63px;height:47px;border-radius:2px}
.text-region{left:13px;width:42px;background:#eff6ff;border:1px solid #60a5fa;padding:8px 5px}
.text-region i{display:block;width:100%;height:2px;background:#93c5fd;margin:3px 0}
.chart-region{left:62px;width:36px;background:#f1f5f9;border:1px solid #a5b4cb;display:flex;align-items:flex-end;gap:3px;padding:7px 5px}
.chart-region i{display:block;width:5px;background:#94a3b8;height:13px}
.chart-region i:nth-child(2){height:24px}
.chart-region i:nth-child(3){height:19px}
.region-corner{position:absolute;height:9px;width:9px;border-color:#3b82f6;border-style:solid}
.region-corner.one{left:7px;top:11px;border-width:1.5px 0 0 1.5px}
.region-corner.two{right:7px;bottom:9px;border-width:0 1.5px 1.5px 0}
.illustration-tag{position:absolute;bottom:-2px;left:17px;white-space:nowrap;border:1px solid #dbe3ef;padding:5px 8px;display:flex;align-items:center;gap:5px;border-radius:5px;background:#ffffffec;box-shadow:0 3px 7px #0f172a08;font-size:10px;color:var(--muted);transform:rotate(-3deg)}
.illustration-tag svg{width:11px;height:11px}

.image-content{position:absolute;left:50%;top:50%;line-height:0;transform-origin:center;will-change:transform}
.image-content>img{display:block;max-width:none;max-height:none;background:white;box-shadow:0 3px 14px #0f172a20;pointer-events:none}
.image-content>svg{position:absolute;inset:0;width:100%;height:100%;stroke:#2563eb;stroke-width:4;fill:#60a5fa2b;vector-effect:non-scaling-stroke;pointer-events:none}
.document-stage.has-image{cursor:grab}
.document-stage.dragging{cursor:grabbing}
.zoom-toolbar{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:2px;padding:4px 5px;border:1px solid #dbe3ef;background:#fffffff2;box-shadow:0 3px 12px #0f172a14;border-radius:8px;z-index:3;cursor:default;backdrop-filter:blur(12px)}
.icon-button{display:inline-flex;align-items:center;justify-content:center;border-radius:6px;color:var(--muted);width:34px;height:34px;flex-shrink:0}
.icon-button:hover:not(:disabled){color:var(--accent);background:#eff6ff}
.icon-button svg{width:15px;height:15px}
.previous svg{transform:rotate(180deg)}
#zoomValue{font-size:11px;min-width:39px;text-align:center;color:var(--muted);font-variant-numeric:tabular-nums}
.toolbar-divider{height:13px;width:1px;background:#e2e8f0;margin:0 4px}
.zoom-tip{position:absolute;right:13px;bottom:11px;font-size:10px;color:var(--muted);pointer-events:none}
.stage-message{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:40px;background:#f1f5f9;color:var(--muted)}
.message-icon{display:grid;place-items:center;height:43px;width:43px;background:#dbeafe;color:var(--accent);border-radius:50%;margin-bottom:13px}
.stage-message h3{font-size:15px;font-weight:500;color:var(--ink)}
.stage-message p{overflow-wrap:break-word;font-size:12px;color:var(--muted);line-height:1.8;max-width:370px;margin-top:8px}
.stage-message button{margin-top:18px}
.loading-state{position:absolute;inset:0;display:grid;place-items:center;z-index:7;background:#f8fafce8;backdrop-filter:blur(5px)}
.loading-card{display:flex;align-items:center;flex-direction:column;padding:30px 25px;text-align:center}
.spinner{display:inline-block;width:25px;height:25px;border-radius:50%;border:2px solid #dbeafe;border-top-color:#2563eb;animation:spin .75s linear infinite;margin-bottom:19px}
.loading-card strong{font-size:14px;font-weight:500;color:var(--ink)}
.loading-card p{font-size:11px;color:var(--muted);margin:9px 0 14px;line-height:1.8;max-width:290px}
.loading-card .text-button{font-size:11px;color:var(--muted)}
.analyze-button.busy svg{animation:spin 2s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}
}

.display-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 19px 11px;overflow:auto;white-space:nowrap;font-size:12px;color:var(--muted)}
.toolbar-label{font-size:11px;color:var(--muted);margin-right:3px}
.display-toolbar label{display:flex;align-items:center;gap:5px;cursor:pointer}
.display-toolbar input[type=checkbox]{width:14px;height:14px}
.display-toolbar .arrow-width-control{gap:7px;max-width:100%}
.display-toolbar .arrow-width-control input{width:90px;min-width:55px;margin:0;direction:ltr}
.arrow-width-control output{min-width:35px;font-variant-numeric:tabular-nums;color:var(--ink)}
.arrow-width-control:has(input:disabled){opacity:.5}
.brand-wordmark,.product-title,.image-content,.zoom-toolbar,.json-pane pre{direction:ltr;unicode-bidi:isolate}
.json-pane pre{text-align:left}
#fileName,#documentContext{direction:ltr;unicode-bidi:isolate}
[dir=rtl] .connection{margin-left:0;margin-right:auto}
[dir=rtl] .block-list-button{margin-left:0;margin-right:auto}
[dir=rtl] .export-menu{right:auto;left:0}
[dir=rtl] .export-menu a span{margin-left:0;margin-right:auto}
[dir=rtl] .example-navigation .icon-button svg,[dir=rtl] .page-control .icon-button svg{transform:scaleX(-1)}
[dir=rtl] .example-navigation .previous svg,[dir=rtl] .page-control .previous svg{transform:none}
.block-list-button{margin-left:auto;padding:5px 0;font-size:12px;gap:5px}
.block-list-button svg{width:13px;height:13px}
.block-list-button[aria-pressed=true]{color:var(--accent)}
.category-strip{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:2px 19px 14px}
.category-chip{max-width:100%;display:flex;align-items:center;gap:5px;min-height:28px;border:1px solid #e2e8f0;background:#f8fafc;padding:3px 7px;border-radius:5px;font-size:12px;color:var(--muted)}
.category-chip.active{border-color:#93c5fd;color:#1d4ed8;background:#eff6ff}
.category-chip:hover{border-color:#93c5fd}
.category-chip .dot{width:5px;height:5px;border-radius:50%;background:var(--color,#3b82f6)}
.category-chip b{font-size:10px;font-weight:400;opacity:1;margin-left:1px}
.viewer-footer{display:flex;justify-content:space-between;border-top:1px solid #e2e8f0;gap:15px;padding:10px 19px;font-size:10px;color:var(--muted);align-items:center;min-height:34px}
.footer-state{display:flex;gap:5px;align-items:center;color:var(--muted)}
.small-dot{width:4px;height:4px;border-radius:50%;background:#94a3b8}
.viewer-footer>span:last-child{text-align:right}
.inspector{min-width:0;max-height:clamp(400px,57vh,650px);overflow:auto;background:#f8fafc;border:1px solid #e2e8f0;border-left:0;border-radius:0 7px 7px 0;padding:9px}
.viewer-body.inspecting .document-stage{border-radius:7px 0 0 7px}
.inspector-heading{display:flex;align-items:center;justify-content:space-between;padding-left:4px}
.inspector-heading strong{font-size:11px;font-weight:500;color:var(--muted)}
.inspector>p{font-size:10px;color:var(--muted);margin:0 0 10px 4px}
.block-row{max-width:100%;width:100%;overflow-wrap:anywhere;display:flex;align-items:center;padding:10px 8px;min-height:38px;border:1px solid transparent;border-radius:6px;gap:7px;font-size:12px;text-align:left;color:var(--muted)}
.block-row:hover{background:#f1f5f9}
.block-row.selected{border-color:#93c5fd;background:#eff6ff}
.block-row>span:nth-child(3){min-width:0;flex:1;overflow-wrap:anywhere}
.block-row .block-swatch{flex-shrink:0;width:5px;height:17px;opacity:.7;border-radius:2px;background:var(--color)}
.block-row .block-number{flex-shrink:0;font-size:11px;color:var(--muted);min-width:14px}
.block-row .block-score{flex-shrink:0;margin-left:auto;font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.inspector-empty{font-size:11px;color:var(--muted);text-align:center;padding:30px 0}
.json-pane{margin:0 12px;border:1px solid #e2e8f0;border-radius:7px;background:#f8fafc;overflow:hidden}
.json-heading{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);padding:12px 14px;border-bottom:1px solid #e2e8f0;background:#ffffff}
.json-pane pre{height:clamp(350px,52vh,600px);overflow:auto;margin:0;padding:18px;font:12px/1.8 "SFMono-Regular",Consolas,monospace;white-space:pre;color:#334155;tab-size:2}
.viewer-card:fullscreen,.viewer-card.expanded{border:0;border-radius:0;padding:16px;background:#f8fafc;overflow:auto}
.viewer-card.expanded{position:fixed;inset:16px;width:auto;max-width:none;z-index:60;box-shadow:0 16px 100px #0f172a40}
.viewer-card:is(:fullscreen,.expanded) .document-stage{height:calc(100dvh - 235px);min-height:300px;touch-action:none}
.viewer-card:is(:fullscreen,.expanded) .inspector{max-height:calc(100dvh - 235px)}

.examples-section{min-width:0;margin-top:26px}
.examples-heading{min-width:0;gap:12px;display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}
.examples-heading h2{font-size:13px}
.examples-heading h2 span{display:inline-block;font-size:11px;color:var(--muted);font-weight:400;margin-left:13px}
.example-navigation{display:flex;gap:4px}
.example-navigation .icon-button{height:32px;width:32px;border:1px solid #e2e8f0;background:#fff}
.example-navigation svg{height:12px;width:12px}
.examples-track{min-width:0;max-width:100%;display:flex;gap:12px;overflow-x:auto;padding:1px 1px 10px;scrollbar-color:#cbd5e1 transparent;scrollbar-width:thin;scroll-snap-type:x proximity}
.example-card{display:flex;align-items:center;gap:11px;min-width:190px;max-width:190px;height:91px;border:1px solid #e2e8f0;background:#fff;border-radius:9px;padding:10px;text-align:left;scroll-snap-align:start}
.example-card:hover{border-color:#93c5fd;background:#f8fbff;box-shadow:0 3px 8px #1d4ed80a}
.example-card.selected{border-color:#60a5fa;background:#eff6ff}
.example-thumb{height:66px;width:51px;min-width:51px;padding:3px;display:grid;place-items:center;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;overflow:hidden}
.example-thumb img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(0 1px 1px #0001)}
.example-copy{min-width:0}
.example-copy strong{font-size:12px;color:var(--ink);font-weight:500;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.example-copy p{font-size:10px;color:var(--muted);margin-top:4px;line-height:1.7}
.example-copy span{font-size:10px;color:var(--muted);display:block;margin-top:6px;font-variant-numeric:tabular-nums}
.page-footer{padding:20px 0 21px;gap:12px;flex-wrap:wrap;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:10px;letter-spacing:.2px}
.page-footer>span:first-child{font-size:11px;letter-spacing:.3px;color:var(--muted)}
.toast-region{position:fixed;top:85px;right:25px;z-index:100;display:flex;align-items:flex-end;flex-direction:column;gap:9px;max-width:370px}
.toast{max-width:100%;overflow-wrap:anywhere;padding:12px 15px;background:#fff;border:1px solid #dbe3ef;border-radius:9px;color:var(--muted);font-size:13px;box-shadow:0 5px 20px #0f172a1a;display:flex;gap:9px;align-items:flex-start;animation:toast-in .2s ease-out}
.toast.error{border-color:#fecaca;color:#b42318;background:#fff7f7}
.toast svg{height:16px;width:16px;margin-top:1px}
.toast .toast-close{margin-left:8px;opacity:.5;cursor:pointer}
.toast-close svg{height:13px;width:13px}
@keyframes toast-in{from{transform:translateY(-8px);opacity:0}
  to{transform:translateY(0);opacity:1}
}
.help-dialog{border:1px solid #e2e8f0;border-radius:17px;padding:28px;max-width:490px;width:calc(100% - 36px);box-shadow:0 20px 100px #0f172a20;color:var(--text)}
.help-dialog::backdrop{background:#0f172a4d;backdrop-filter:blur(3px)}
.dialog-heading{display:flex;align-items:center;gap:10px;margin-bottom:24px}
.dialog-heading h2{min-width:0;font-size:16px;font-weight:500}
.dialog-heading>.icon-button{margin-left:auto}
.dialog-heading .brand-mark{width:28px;height:28px;border-radius:8px}
.dialog-heading .brand-mark svg{height:20px;width:20px}
.help-dialog ol{padding-left:23px;display:grid;gap:20px;margin:0}
.help-dialog li{color:var(--muted);padding-left:7px;font-size:13px}
.help-dialog li b{color:#334155;font-weight:500}
.help-dialog li p{font-size:12px;color:var(--muted);line-height:1.9;margin-top:5px}
.help-note{font-size:11px;color:var(--muted);line-height:1.9;margin:24px 0;padding:13px;background:#f1f5f9;border-radius:7px}
.help-dialog>.primary-button{width:100%;font-size:13px;height:39px}

@media(min-width:1600px){
  .app-main{padding-top:38px}
  .page-heading{margin-bottom:30px}
  .workspace{grid-template-columns:300px minmax(0,1fr);gap:24px}
  .source-panel{padding:24px}
  .document-stage{height:62vh;max-height:710px}
  .inspector{max-height:62vh}
  .source-preview{height:240px}
}

@media(max-width:1150px){
  .app-header{padding:12px 24px;gap:14px}
  .header-caption,.header-divider{display:none}
  .app-main{padding:25px 24px 0}
  .workspace{grid-template-columns:252px minmax(0,1fr);gap:16px}
  .source-panel{padding:17px}
  .view-tabs{gap:19px}
  .viewer-header{padding:0 15px}
  .display-toolbar{gap:10px;padding-left:15px;padding-right:15px}
  .workflow{display:none}
  .viewer-body.inspecting{grid-template-columns:minmax(0,1fr) 190px}
  .block-list-button{font-size:0}
  .block-list-button svg{width:16px;height:16px}
  .zoom-tip{display:none}
  .dropzone small{font-size:10px}
  .viewer-context{padding:0 15px}
  .viewer-context>span:first-child{max-width:46%}
  .result-summary{font-size:10px}
}

@media(max-width:850px){
  .app-header{min-height:62px;height:auto;flex-wrap:wrap;padding:12px 20px;gap:12px}
  .help-button{font-size:0;width:34px;height:34px;padding:7px;gap:0;margin-left:0}
  .language-label,.lang-label{display:none}
  .help-button svg{width:18px;height:18px}
  .brand{font-size:18px}
  .brand-mark{width:29px;height:29px}
  .connection{font-size:11px}
  .app-main{padding:25px 18px 0}
  .page-heading{margin-bottom:20px}
  h1{font-size:23px}
  .workspace{grid-template-columns:210px minmax(0,1fr);gap:12px}
  .source-panel{padding:15px}
  .dropzone{min-height:170px}
  .dropzone small{white-space:normal;max-width:150px;line-height:1.7}
  .source-preview{height:180px}
  .view-tabs{gap:14px}
  .view-tabs button{font-size:12px}
  .viewer-header{padding:0 12px;height:53px;gap:8px}
  .secondary-button.small{padding:7px 9px;font-size:12px}
  .secondary-button .chevron{display:none}
  .viewer-context{padding:0 13px;height:38px}
  .viewer-context .result-summary{font-size:10px;max-width:54%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .document-stage{height:450px;min-height:350px}
  .display-toolbar{gap:12px;padding:12px;font-size:12px}
  .display-toolbar .toolbar-label{display:none}
  .display-toolbar input[type=checkbox]{width:14px;height:14px}
  .viewer-body.inspecting{grid-template-columns:minmax(0,1fr)}
  .inspector{position:absolute;right:0;top:0;bottom:0;width:210px;z-index:5;box-shadow:-5px 0 20px #0f172a18;background:#ffffff;border-left:1px solid var(--line)}
  .viewer-body.inspecting .document-stage{border-radius:7px}
  .empty-state h2{font-size:15px}
  .empty-state p{font-size:11px;max-width:190px;line-height:1.8}
  .empty-state{padding:10px}
  .paper-illustration{transform:scale(.85);margin:-10px 0}
  .viewer-footer{font-size:10px;padding:9px 13px}
  .viewer-footer>span:last-child{display:none}
  .category-strip{padding:0 12px 12px;gap:5px}
  .category-chip{font-size:12px;padding:4px 7px}
  .source-hint{font-size:10px}
  .local-note{font-size:10px}
}

@media(max-width:640px){
  .app-header{min-height:58px;padding:11px 14px;gap:8px;row-gap:10px}
  .brand{gap:7px;font-size:16px;flex:1 0 auto}
  .brand-mark{width:28px;height:28px}
  .language-select,.language-picker select{min-width:82px;max-width:108px;padding:6px 7px;font-size:12px}
  .connection{order:4;flex-basis:100%;margin-left:0;font-size:11px}
  .app-main{padding:23px 14px 0}
  .eyebrow{font-size:10px;letter-spacing:1.6px;margin-bottom:7px}
  h1{font-size:21px}
  .page-heading p{font-size:11px;max-width:320px;line-height:1.8}
  .page-heading{margin-bottom:19px}
  .workspace{display:flex;flex-direction:column;gap:15px}
  .source-panel{width:100%;padding:17px}
  .section-heading{margin-bottom:12px}
  .dropzone{min-height:137px;padding:14px}
  .upload-icon{width:31px;height:31px;border-radius:9px;margin-bottom:9px}
  .upload-icon svg{height:17px;width:17px}
  .dropzone strong{font-size:13px}
  .dropzone small{font-size:10px;max-width:none;margin-top:9px}
  .analyze-button{margin-top:12px;min-height:42px;height:auto}
  .source-hint{font-size:11px}
  .source-panel>.panel-divider{margin:16px 0 12px}
  .source-panel>.section-heading.compact{margin-bottom:5px}
  .source-panel>.setting-description{max-width:none;font-size:12px}
  .source-panel>.advanced{margin-top:12px;padding-top:11px}
  .source-panel>.local-note{font-size:11px;padding-top:14px;line-height:1.7}
  .thresholds{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .thresholds label{position:relative;display:flex;flex-wrap:wrap;gap:6px;font-size:11px}
  .thresholds input{margin-left:0;width:100%;height:32px;padding-right:17px}
  .thresholds span{position:absolute;right:9px;bottom:6px}
  .source-loaded{position:relative;display:grid;grid-template-columns:87px minmax(0,1fr);column-gap:14px;min-height:122px;padding-left:0}
  .file-heading{grid-column:2;grid-row:1;margin:6px 0 8px;min-height:35px;align-self:start}
  .source-preview{position:static;grid-column:1;grid-row:1/3;width:87px;height:122px;padding:7px}
  .file-icon{display:none}
  .file-heading strong{font-size:12px}
  .file-heading span:not(.file-icon){font-size:11px;margin-top:5px}
  .replace-button{grid-column:2;grid-row:2;align-self:start;justify-content:flex-start;margin-top:0;font-size:12px;white-space:normal}
  .page-control{grid-column:1/-1;grid-row:3;margin-top:10px;max-width:none}
  .viewer-card{width:100%}
  .viewer-header{padding:0 13px;height:53px;gap:10px}
  .view-tabs{gap:12px}
  .view-tabs button{font-size:12px}
  .viewer-context{height:37px}
  .document-stage{height:470px;min-height:300px}
  .viewer-body{margin:0 9px}
  .viewer-body.inspecting{gap:10px}
  .inspector{position:static;inset:auto;width:auto;max-height:220px;overflow:auto;overscroll-behavior:contain;border:1px solid #e2e8f0;border-radius:7px;box-shadow:none;z-index:auto}
  .viewer-card:is(:fullscreen,.expanded) .inspector{max-height:220px}
  .display-toolbar{padding:12px 13px;gap:12px;font-size:12px}
  .display-toolbar input[type=checkbox]{width:14px;height:14px}
  .block-list-button{min-width:17px}
  .category-strip{padding:0 13px 13px}
  .category-chip{font-size:12px;padding:5px 8px}
  .viewer-footer{font-size:10px;padding:10px 13px}
  .viewer-footer>span:last-child{display:block;max-width:50%;overflow-wrap:anywhere}
  .empty-state h2{font-size:17px}
  .empty-state p{max-width:none;font-size:12px}
  .paper-illustration{transform:scale(1)}
  .empty-state>.secondary-button{font-size:12px}
  .examples-section{margin-top:23px}
  .examples-heading h2 span{display:block;font-size:11px;margin:3px 0 0}
  .example-card{min-width:174px;max-width:174px;height:85px;padding:9px}
  .example-thumb{height:60px;width:45px;min-width:45px}
  .example-copy strong{font-size:12px}
  .example-copy p{font-size:10px}
  .toast-region{left:14px;right:14px;top:70px;max-width:none}
  .toast{font-size:12px;padding:11px 13px}
  .page-footer{font-size:10px;padding-top:15px}
  .json-pane pre{height:440px;font-size:11px}
  .viewer-card:fullscreen,.viewer-card.expanded{padding:8px}
  .viewer-card.expanded{inset:8px}
  .viewer-card:is(:fullscreen,.expanded) .viewer-context{padding:0 10px}
}

@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
