.material-notice{padding:12px 15px;border-left:3px solid #bc9660;background:#faf6ee;border-radius:4px;color:#775b32!important;font-size:.85rem;line-height:1.7}
/* Source directory: desktop list with an in-place detail panel. */
#materials-view[data-page=sources]{padding:14px 28px;height:100%;overflow:hidden}
#materials-view[data-page=sources] #materials-root{max-width:none;height:100%}
.source-workspace{display:flex;flex-direction:column;height:100%;min-height:0}
.source-filters{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.source-filters .source-search{display:block;flex:0 0 300px;margin:0}
#source-list-query{width:100%;height:36px;padding:6px 9px 6px 36px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font:inherit;font-size:13px}
.source-filters .filter-picker{position:relative;flex-shrink:0}
.source-filters .filter-panel{left:0;right:auto}
.source-filter-group>span{display:block;font-size:12px;color:var(--muted);margin:2px 0 8px}
.source-filter-group .quick-ranges{margin-bottom:4px}
.source-filter-footer{border-top:1px solid var(--line);padding-top:10px;display:flex;justify-content:flex-end}
.source-filter-footer button{font-size:12px}
.source-filters .active-filters{display:flex;gap:6px;flex-wrap:wrap;padding-top:0}
.source-filters .active-filters button{font-size:12px;border:0;background:var(--accent-soft);color:var(--ink);padding:4px 8px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#source-result-count{margin-left:auto;display:flex;align-items:center;gap:20px;white-space:nowrap;font-variant-numeric:tabular-nums}
.source-count-total{display:flex;align-items:baseline;gap:7px;color:var(--muted);font-size:12px}
.source-count-total strong{font-size:24px;line-height:1.2;font-weight:600;letter-spacing:-.5px;color:var(--ink)}
.source-count-parts{display:flex;gap:22px;padding-left:20px;border-left:1px solid var(--line)}
.source-count-part{display:grid;gap:2px;font-size:11px;line-height:1.25;color:var(--muted)}
.source-count-part b{font-size:14px;line-height:1.3;color:var(--ink);font-weight:500}

.source-content{display:grid;grid-template-columns:minmax(0,1fr);flex:1;min-height:0;border-top:1px solid var(--line);background:var(--surface,#fff)}
.source-content.with-detail{grid-template-columns:minmax(0,1fr) 390px}
.source-table-scroll{overflow:auto;min-height:0;overscroll-behavior:contain}
.source-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px;text-align:left}
.source-table th{position:sticky;top:0;background:var(--surface,#fff);z-index:1;color:var(--muted);font-size:12px;font-weight:500;padding:14px 12px;border-bottom:1px solid var(--line)}
.source-table th:first-child{width:31%}.source-table th:nth-child(2){width:15%}.source-table th:nth-child(3){width:13%}.source-table th:nth-child(4){width:18%}.source-table th:last-child{width:23%}
.source-table td{padding:15px 12px;border-bottom:1px solid var(--line);vertical-align:middle;overflow-wrap:anywhere;font-size:12px}
.source-table tbody tr{cursor:pointer}.source-table tbody tr:hover{background:var(--accent-soft)}.source-table tbody tr.selected{background:var(--accent-soft);box-shadow:inset 3px 0 var(--blue)}
.source-name{font:inherit;font-size:13px;font-weight:550;line-height:1.5;color:var(--ink);background:none;border:0;padding:0;text-align:left;cursor:pointer}
.source-name:hover{color:var(--blue)}.source-table td>small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:11px;margin-top:5px}
.source-stock{text-decoration:none;color:var(--blue);font-size:14px;font-variant-numeric:tabular-nums}.source-stock small{margin-left:4px;color:var(--muted);font-size:11px}
.source-situation{font-size:12px;line-height:1.6;color:var(--muted)}.source-situation[data-state=issue]{color:#93622f}.source-situation[data-state=running],.source-situation[data-state=waiting]{color:var(--blue)}
#source-detail{border-left:1px solid var(--line);overflow:auto;padding:24px;overscroll-behavior:contain;min-width:0}
.source-detail-heading{display:flex;justify-content:space-between;align-items:start;gap:14px}.source-detail-heading>div>span{font-size:11px;color:var(--muted)}
.source-detail-heading h2{font-size:21px;line-height:1.5;margin:7px 0 0;overflow-wrap:anywhere}.source-detail-heading h2:focus{outline:none}
.source-close{font-size:24px!important;line-height:1;padding:3px 7px!important}
#source-detail section{padding:21px 0;border-bottom:1px solid var(--line)}#source-detail section:last-of-type{border-bottom:0}
#source-detail h3{font-size:13px;font-weight:600;margin:0 0 14px}
.source-facts{display:grid;gap:12px;margin:0;font-size:12px;line-height:1.65}.source-facts>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px}.source-facts dt{color:var(--muted)}.source-facts dd{margin:0;overflow-wrap:anywhere}
.source-stock-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px;font-size:12px}.source-stock-heading strong{font-size:25px;font-weight:550;font-variant-numeric:tabular-nums}.source-stock-heading small{font-size:12px;color:var(--muted);font-weight:400;margin-left:7px}
.source-help{color:var(--muted);font-size:12px;line-height:1.8;margin:12px 0 0}
.source-query{font-size:12px}.source-query code{font-size:11px;line-height:1.7;overflow-wrap:anywhere;display:block;background:var(--accent-soft);padding:10px;border-radius:4px}
.source-empty{text-align:center;padding:65px 20px;color:var(--muted);font-size:13px}
.source-detail-heading{position:sticky;top:-24px;z-index:2;background:var(--surface,#fff);margin:-24px -24px 0;padding:24px 24px 16px;border-bottom:1px solid var(--line)}

.source-search>.control-icon{z-index:1}
.source-filter-group .quick-ranges button.active{background:var(--accent-soft);border-color:var(--brand-border);color:var(--blue);font-weight:600}

/* Collection management uses one desktop workspace for settings and runs. */
#materials-view:is([data-page=materials],[data-page=updates]){padding:14px 28px 24px;height:100%;overflow:auto}
#materials-view:is([data-page=materials],[data-page=updates]) #materials-root{max-width:none;height:100%}
.collection-workspace{min-height:100%;font-size:13px}
.cm-filters>.report-primary{padding:8px 14px;font-size:13px}
.cm-context{display:inline-block;margin-bottom:14px;font-size:12px;text-decoration:none}
.cm-filters{flex-wrap:nowrap;display:flex;align-items:center;gap:10px;margin-bottom:12px;min-height:36px}
.cm-search{display:block;width:300px;flex:0 0 300px;position:relative}
#cm-search,#cm-source-search{height:36px;padding:6px 12px 6px 36px;font-size:13px}
.cm-search>.control-icon{z-index:1}
.cm-filters .filter-picker{position:relative}.cm-filters .filter-panel{left:0;right:auto;z-index:5}
.cm-count{margin-left:auto;color:var(--muted);font-size:12px}
#cm-chips{display:flex;gap:6px}#cm-chips button{padding:5px 8px;font-size:12px;background:var(--accent-soft);border:0}
.cm-table{width:100%;border-collapse:collapse;table-layout:fixed;text-align:left;background:white}
.cm-table th{padding:12px 14px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:12px;color:var(--muted);font-weight:500;background:#fafbfd}
.cm-table th:first-child{width:29%}.cm-table th:last-child{width:20%}
.cm-table td{padding:17px 14px;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6;vertical-align:middle;overflow-wrap:anywhere}
.cm-table tr:hover{background:#fafbfd}.cm-table td>small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.cm-title{background:none;border:0;font-size:13px;color:var(--ink);font-weight:550;padding:0;text-align:left;text-decoration:none;line-height:1.6;cursor:pointer}
.cm-title:hover{color:var(--blue)}.cm-actions{white-space:nowrap}.cm-actions>*+*{margin-left:14px}.cm-actions a,.cm-actions button{font-size:12px;text-decoration:none;padding:0;background:none;border:0;color:var(--blue);cursor:pointer}.cm-actions .report-primary{padding:8px 14px;background:var(--blue);color:white}
.cm-status{font-size:12px;display:inline-flex;align-items:center;gap:7px;color:var(--muted)}.cm-status:before{content:'';width:5px;height:5px;border-radius:50%;background:#a4adb7}.cm-status[data-state=active]{color:var(--blue)}.cm-status[data-state=active]:before{background:var(--blue)}.cm-status[data-state=attention]{color:#916632}.cm-status[data-state=attention]:before{background:#b38850}.cm-status[data-state=completed]:before{background:#678476}
.cm-sync{display:flex;align-items:center;gap:16px;border-top:1px solid var(--line);margin-top:32px;padding:19px 14px;color:var(--muted);font-size:12px}
.cm-sync strong{display:block;color:var(--ink);font-size:13px;font-weight:550;margin-bottom:6px}.cm-sync-icon{font-size:22px;color:var(--blue)}.cm-sync-data{margin-left:auto;text-align:right}.cm-sync small{display:block;font-size:11px;margin-top:6px}
.cm-detail-heading{display:flex;align-items:center;gap:22px;margin:22px 0 12px}.cm-detail-heading h1{font-size:21px;font-weight:600;margin:0;flex:1}.cm-detail-heading>a{font-size:12px;text-decoration:none}.cm-meta{font-size:12px;color:var(--muted);margin:0 0 24px}.cm-meta span{margin-left:22px}.cm-live{display:flex;align-items:center;gap:24px;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:12px}.cm-live>span:last-child{color:var(--muted);margin-left:auto}.cm-warning{color:#916632}
.cm-results-heading{display:flex;align-items:center;justify-content:space-between;margin:24px 0 12px}.cm-results-heading h2,.cm-section-title{font-size:14px;font-weight:600;margin:0}.cm-section-title{margin-bottom:16px}.cm-results-heading label{flex-direction:row;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}
#cm-results .cm-table th:first-child{width:27%}#cm-results .cm-table th:last-child{width:38%}.cm-result-note{font-size:12px;color:#916632;margin-right:10px}.cm-browse{font-size:11px;display:block;text-decoration:none;margin-top:8px}.cm-issues{font-size:12px;line-height:1.8}.cm-issues ul{padding-left:18px}.cm-issues p{margin:6px 0}.cm-technical{border-top:1px solid var(--line);margin-top:28px;padding-top:16px;font-size:12px;color:var(--muted)}.cm-technical>summary{cursor:pointer}#cm-more{margin-top:16px}
.cm-backdrop{position:fixed;inset:0;background:rgba(22,40,57,.18);z-index:90}
.cm-editor{position:fixed;right:0;top:0;bottom:0;width:640px;background:white;box-shadow:-10px 0 36px #132a421c;z-index:91;display:flex;flex-direction:column}
.cm-editor>header{height:72px;padding:0 28px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.cm-editor h2{font-size:19px;font-weight:600;margin:0}
#cm-form{display:flex;flex:1;min-height:0;flex-direction:column}.cm-editor-body{padding:24px 28px;overflow:auto;flex:1}.cm-field{display:grid;gap:10px;font-size:13px;font-weight:550}.cm-editor fieldset{border:0;padding:0;margin:24px 0}.cm-editor legend{display:flex;align-items:center;width:100%;font-size:13px;font-weight:550;margin-bottom:12px}#cm-selected{font-size:12px;font-weight:400;margin-left:auto;color:var(--muted)}
.cm-editor .quick-ranges button{font-size:12px;padding:7px 14px}.collection-workspace .quick-ranges button.active{background:var(--accent-soft);border-color:var(--brand-border);color:var(--blue);font-weight:600}.cm-editor .cm-search{width:100%}.cm-shortcuts{display:flex;align-items:center;gap:10px;margin:10px 0;font-size:11px;color:var(--muted)}.cm-shortcuts button{font-size:11px;padding:4px 6px}.cm-shortcuts button:last-child{margin-left:auto}
#cm-source-list{max-height:255px;overflow:auto;border:1px solid var(--line);border-radius:6px}#cm-source-list label{display:flex;flex-direction:row;align-items:start;gap:10px;padding:10px 12px;cursor:pointer;font-size:12px;line-height:1.5;border-bottom:1px solid #f0f2f5}#cm-source-list label:last-child{border:0}#cm-source-list label:has(:checked){background:var(--accent-soft)}#cm-source-list input{margin-top:2px}#cm-source-list small{display:block;color:var(--muted);font-size:10px;margin-top:2px;overflow-wrap:anywhere}
.cm-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.cm-date-grid label{display:grid;gap:8px;font-size:12px;color:var(--muted)}.cm-editor footer{padding:18px 28px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:14px}.cm-editor footer button{font-size:13px;padding:9px 18px}

#cm-source-list input[type="checkbox"],.cm-results-heading input[type="checkbox"]{min-height:0}

/* Compact RSS controls on the collection task page. */
.cm-sync-copy{flex:1;min-width:0}.cm-sync-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.cm-sync-actions>button,.cm-sync-settings>button{font-size:12px;padding:6px 12px;white-space:nowrap}.cm-sync-settings{position:relative}.cm-sync-popover{position:absolute;right:0;bottom:calc(100% + 10px);z-index:25;width:300px;padding:16px;background:var(--paper,#fff);color:var(--ink);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 28px #14203518;text-align:left}.cm-sync-popover[hidden]{display:none}.cm-sync-popover-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.cm-sync-popover-heading strong{margin:0}.cm-sync-popover-heading button{padding:0 4px;font-size:19px;line-height:1}.cm-sync-popover form{display:grid;gap:10px}.cm-sync-popover label{font-size:12px}.cm-sync-popover input{width:100%;box-sizing:border-box;min-height:34px;padding:6px 10px;border:1px solid var(--line);border-radius:5px;background:var(--paper,#fff);color:var(--ink);font:inherit}.cm-sync-presets{display:flex;gap:5px}.cm-sync-presets button{font-size:11px;padding:4px 7px;white-space:nowrap}.cm-sync-popover p{margin:0;color:var(--muted);font-size:11px;line-height:1.6}.cm-sync-popover button[type=submit]{justify-self:end;font-size:12px;padding:6px 12px}.cm-sync #cm-sync-error,.cm-sync #cm-sync-form-error,.cm-sync #cm-sync-result[data-state=failed]{color:var(--danger,#a63b31)}.cm-sync #cm-sync-message{color:var(--blue)}.cm-sync button:disabled{opacity:.5;cursor:default}

.cm-records #cm-table th:first-child{width:28%}.cm-records #cm-table th:nth-child(2){width:19%}.cm-records #cm-table th:nth-child(3){width:10%}.cm-records #cm-table th:nth-child(4){width:29%}.cm-records #cm-table th:last-child{width:14%}

/* Shared record filters and complete pagination, using reader filter controls. */
.record-filters{position:relative;margin-bottom:16px}
.record-filters .filter-section{padding:0;border:0;background:transparent;min-width:0}
.record-filters .filter-form{display:flex;gap:12px;align-items:center;min-height:36px;padding-right:140px;margin-bottom:12px}
.record-filters .filter-form .search-control{width:300px;flex:0 0 300px;margin:0}
#materials-root .record-filters .filter-form .search-control input,#materials-view .cm-search input{box-sizing:border-box;width:100%;height:36px;padding:6px 12px 6px 36px;font-size:13px}
.record-filters .search-control>.control-icon{left:12px;width:16px;height:16px;z-index:1}
.record-filters .filter-picker[hidden]{display:none}
.record-filters .date-panel,.record-filters .source-panel{left:0;right:auto;z-index:22}
.record-filters .date-toggle,.record-filters .source-toggle{height:36px;font-size:12px}
.record-extra-filters,.cm-inline-filters{display:flex;align-items:center;flex-wrap:nowrap;gap:10px;margin:0}
.record-filters .active-filters,#cm-chips{display:none}
.record-filters .filter-section{display:block}
.record-filters .filter-form{flex-wrap:nowrap;margin-bottom:0;padding-right:120px;gap:10px}
.record-filters .filter-form .search-control{width:240px;flex:0 1 240px;min-width:180px}
.record-filters .date-picker{flex:0 0 auto;width:auto}
.record-filters .source-picker{flex:0 0 auto;width:auto}
.record-filters .date-toggle,.record-filters .source-toggle{width:auto;min-width:130px;max-width:260px}
.record-filters .record-clear{border:0;padding:0;margin:0;flex:none}
.record-filters .record-clear button,.cm-filters>[data-cm=reset]{font-size:12px;padding:6px 10px;white-space:nowrap}
.list-filter-menu{position:relative;flex:none;font-size:12px}
.list-filter-menu>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;height:36px;padding:6px 12px;border:1px solid var(--line);border-radius:6px;background:var(--paper,#fff);cursor:pointer;white-space:nowrap;min-width:110px}
.list-filter-menu>summary::-webkit-details-marker{display:none}
.list-filter-menu>summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.list-filter-options{position:absolute;top:calc(100% + 6px);left:0;z-index:25;min-width:100%;width:max-content;padding:5px;background:var(--paper,#fff);border:1px solid var(--line);border-radius:6px;box-shadow:0 8px 24px #203d561a}
.list-filter-options button{display:block;width:100%;text-align:left;white-space:nowrap;border:0;background:transparent;color:var(--ink);padding:8px 12px;font-size:12px}
.list-filter-options button:hover,.list-filter-options button[aria-pressed=true]{background:var(--accent-soft);color:var(--blue)}
.record-count{position:absolute;right:0;top:0;color:var(--muted);font-size:12px;white-space:nowrap;line-height:36px}
.record-pagination{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:18px;font-size:12px;color:var(--muted)}
.record-page-actions{display:flex;align-items:center;gap:8px}
.record-pagination button{font-size:12px;padding:6px 9px;white-space:nowrap}
.record-page-actions>[data-page-label]{padding:0 8px;white-space:nowrap;font-variant-numeric:tabular-nums}
.record-page-jump{display:flex;align-items:center;gap:8px;margin-left:12px}
.record-page-jump input{width:54px;padding:5px 6px;text-align:center;font-size:12px}
.reading-history .record-pagination{justify-content:space-between}
.reading-history .record-pagination button{border:0;background:transparent}
.record-page-jump label{display:flex;flex-direction:row;align-items:center;gap:6px;white-space:nowrap;margin:0}
.record-page-jump input{margin:0}

.cm-editor .cm-schedule-enabled{display:flex;flex-direction:row;align-items:center;gap:8px;margin:18px 0;font-size:13px}.cm-editor .cm-schedule-enabled input{width:auto;margin:0}
