.material-source-trigger{white-space:nowrap}.material-source-modal{width:min(1080px,100vw - 32px);max-width:1080px;height:min(900px,100dvh - 32px);max-height:calc(100dvh - 32px);overflow:hidden}.material-source-modal[data-state=open]{grid-template-rows:auto auto minmax(0,1fr) auto;display:grid}.material-source-body{overscroll-behavior:contain;scrollbar-gutter:stable;min-width:0;min-height:0;padding-right:4px;overflow:hidden auto}.material-source-body:focus-visible,.source-sheet-scroll:focus-visible{outline:2px solid var(--primary);outline-offset:-2px;border-radius:12px}.material-source-modal .modal-actions{background:var(--surface);margin-top:16px}.material-source-modal .modal-head{margin-bottom:18px}.material-source-toolbar{border:1px solid var(--line);background:var(--paper);border-radius:12px;min-width:0;margin-bottom:16px;padding:14px 16px}.material-source-toolbar-heading,.material-source-toolbar-heading>span:first-child{align-items:center;gap:10px;display:flex}.material-source-toolbar-heading{color:var(--muted);justify-content:space-between;margin-bottom:10px;font-size:.8125rem;font-weight:500}.material-source-position{background:var(--soft);font-variant-numeric:tabular-nums;border-radius:6px;flex-shrink:0;padding:3px 8px}.material-source-selector{background:var(--surface);width:100%}.material-source-filename{overflow-wrap:anywhere;min-width:0;margin:0;line-height:1.5;color:var(--ink)!important;font-size:.9375rem!important}.source-pdf-controls,.source-pdf-controls>nav{align-items:center;gap:10px;display:flex}.source-pdf-controls{z-index:2;background:var(--surface);justify-content:center;padding:0 0 10px;position:sticky;top:0}.source-pdf-controls nav>span{text-align:center;min-width:64px;color:var(--muted);font-size:.8125rem}.source-pdf-controls-skeleton{width:162px;height:38px}.source-pdf-stage{border:1px solid var(--line);background:var(--soft);border-radius:12px;min-width:0;min-height:360px;padding:12px;position:relative}.source-pdf-stage canvas{background:#fff;max-width:100%;height:auto;margin:0 auto;display:block;box-shadow:0 3px 16px #00000015}.source-pdf-text>summary{cursor:pointer;min-height:44px;color:var(--primary);padding-top:12px;font-size:.8125rem}.source-pdf-text pre{border:1px solid var(--line);color:var(--ink);background:var(--paper);font-family:var(--font-reading);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:10px;padding:14px;font-size:.875rem;line-height:1.6}.source-file-skeleton .source-preview-placeholder,.source-pdf-loading .source-preview-placeholder{border-radius:12px;height:min(62dvh,720px);min-height:360px}.source-pdf-loading{z-index:1;pointer-events:none;position:absolute;inset:0}.source-text-preview{border:1px solid var(--line);background:var(--paper);min-height:260px;color:var(--ink);font-family:var(--font-reading);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:12px;margin:0;padding:20px;font-size:.9375rem;line-height:1.7}.source-image-preview{border:1px solid var(--line);background:var(--paper);border-radius:12px;place-items:center;min-height:240px;padding:16px;display:grid}.source-image-preview img{object-fit:contain;max-width:100%;height:auto}.source-preview-empty{border:1px dashed var(--line);background:var(--paper);min-height:200px;color:var(--muted);border-radius:12px;align-content:center;justify-items:start;padding:24px;font-size:.9375rem;display:grid}.source-preview-note{color:var(--muted);margin:12px 0 0;font-size:.8125rem}.source-document-format{margin:0 0 10px}.source-document-preview{border:1px solid var(--line);min-height:260px;color:var(--ink);background:var(--paper);border-radius:12px;padding:clamp(18px,4vw,42px)}.source-document-preview .prose>:first-child{margin-top:0}.source-document-preview .prose{overflow-wrap:anywhere}.source-document-preview .rich-table-scroll{overflow:visible}.source-document-preview .rich-table-scroll table{table-layout:auto;width:100%;display:table;overflow:visible}.source-document-preview .prose th,.source-document-preview .prose td{overflow-wrap:anywhere;min-width:0}.source-document-preview .prose :is(th,td) p{font-size:inherit}.source-document-preview .prose :is(th,td)>:last-child{margin-bottom:0}.material-source-editor{border-top:1px solid var(--line);gap:12px;min-width:0;margin-top:12px;padding-top:18px;display:grid}.material-source-editor-heading,.material-source-editor-actions{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}.material-source-editor-heading{font-size:.9375rem;font-weight:600}.material-source-count{color:var(--muted);font-size:.8125rem;font-weight:400}.material-source-editor-list{gap:8px;margin:0;padding:0;list-style:none;display:grid}.material-source-editor-list li{align-items:center;gap:10px;min-width:0;padding:4px 0;font-size:.875rem;display:flex}.material-source-editor-list li>span{overflow-wrap:anywhere;flex:1;min-width:0}.material-source-editor-actions{justify-content:flex-start}.material-source-editor>small{color:var(--muted);font-size:.8125rem}.material-source-editor>.form-error{margin:0}.source-storage-content{padding:0 18px 18px}.source-storage-note,.source-storage-empty{color:var(--muted);margin:0 0 14px;font-size:.875rem;line-height:1.6}.source-storage-list{margin:0;padding:0;list-style:none;display:grid}.source-storage-row{border-top:1px solid var(--line);align-items:center;gap:12px;min-width:0;min-height:76px;padding:12px 0;display:flex}.source-storage-row>svg{color:var(--muted);flex-shrink:0}.source-storage-name{flex:1;gap:4px;min-width:0;display:grid}.source-storage-name strong{overflow-wrap:anywhere;font-size:.875rem;font-weight:600}.source-storage-name small,.source-storage-pagination>span{color:var(--muted);font-size:.8125rem}.source-storage-actions{align-items:center;gap:8px;display:flex}.source-storage-actions>.ds-button{white-space:nowrap}.source-storage-pagination{justify-content:space-between;align-items:center;gap:10px;padding-top:14px;display:flex}.source-storage-error{flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0;display:flex}.source-storage-error>p{color:var(--danger);flex:200px;margin:0;font-size:.875rem}.source-storage-icon{flex-shrink:0;width:18px;height:18px}.source-storage-title{width:min(280px,90%);height:18px}.source-storage-size{width:76px;height:13px}.source-storage-preview{width:93px;height:38px}.source-storage-remove{width:184px;height:38px}@media (max-height:480px){.material-source-modal{padding:16px}.material-source-modal .modal-head,.material-source-selector{margin-bottom:10px}.material-source-modal .modal-actions{margin-top:10px}}@media (max-width:600px){.material-source-modal{width:calc(100vw - 20px);height:calc(100dvh - 20px);max-height:calc(100dvh - 20px);padding:18px}.source-pdf-stage,.source-file-skeleton .source-preview-placeholder,.source-pdf-loading .source-preview-placeholder{min-height:300px}.source-text-preview,.source-document-preview{padding:14px}.source-document-preview .prose th,.source-document-preview .prose td{padding:7px 6px;font-size:.8125rem}.source-storage-row{grid-template-columns:18px minmax(0,1fr);gap:10px 12px;display:grid}.source-storage-actions{flex-wrap:wrap;grid-column:2}.source-storage-actions>.ds-button{font-size:.75rem}.source-storage-preview{width:86px}.source-storage-remove{width:155px}}.source-spreadsheet-preview{flex-direction:column;min-width:0;height:100%;min-height:240px;display:flex}.source-sheet-controls{flex-wrap:wrap;align-items:center;gap:10px 16px;padding-bottom:12px;display:flex}.source-sheet-selector{width:min(360px,100%)}.source-sheet-name{overflow-wrap:anywhere;min-width:0;font-size:.875rem}.source-sheet-size{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.8125rem}.source-sheet-scroll{overscroll-behavior:contain;border:1px solid var(--line);background:var(--paper);scrollbar-gutter:stable;border-radius:12px;flex:1;min-width:0;min-height:0;overflow:auto}.source-sheet-table{border-spacing:0;border-collapse:separate;width:max-content;min-width:100%;font-size:.8125rem;line-height:1.5}.source-sheet-table :is(th,td){border-right:1px solid var(--line);border-bottom:1px solid var(--line);vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;min-width:120px;max-width:320px;padding:10px 12px}.source-sheet-table th{color:var(--muted);text-align:center;background:var(--soft);font-weight:500}.source-sheet-table thead th{z-index:2;position:sticky;top:0}.source-sheet-table tr>th:first-child{z-index:1;font-variant-numeric:tabular-nums;min-width:48px;position:sticky;left:0}.source-sheet-table thead th:first-child{z-index:3}.source-sheet-table tr>:last-child{border-right:0}.source-sheet-table tbody tr:last-child>*{border-bottom:0}.source-sheet-table tbody tr:hover td{background:var(--surface)}
