/* The Data manager (issue #42): #/data and #/data/memory — public/data/*.js. Classes only (strict CSP: no inline style). */
.dm-grid { display: grid; grid-template-columns: minmax(200px, 250px) 1fr; gap: 16px; align-items: start; border: 2px dashed transparent; border-radius: var(--radius); }
.dm-grid.drag { border-color: var(--accent-ink); background: var(--accent-soft); }
@media (max-width: 860px) { .dm-grid { grid-template-columns: 1fr; } }
.dm-main { min-width: 0; }
.dm-colls ul { list-style: none; margin: 0; padding: 0; }
.dm-colls li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-sm); }
.dm-colls li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.dm-colls li.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--yellow); }
.dm-colls li.on a { font-weight: 700; }
.dm-colls li .row-acts { width: 100%; display: flex; gap: 4px; justify-content: flex-end; }
.dm-colls li:not(:hover):not(:focus-within) .row-acts .btn { opacity: .55; }
.dm-search { display: flex; gap: 8px; margin-bottom: 8px; }
.dm-search input { flex: 1; min-width: 0; }
.dm-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dm-bulk { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.dm-bulk[hidden], .dm-members[hidden], [data-dm-progress][hidden] { display: none; }
.dm-bulk b { margin-right: 6px; }
.dm-chips { display: inline-flex; gap: 3px; flex-wrap: wrap; vertical-align: middle; }
.dm-chip { font: 700 10.5px var(--display); padding: 1px 8px; border-radius: var(--pill); border: 1px solid var(--line); color: var(--muted); }
.dm-chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.dm-st.ok { background: var(--ok-soft); color: var(--ok); }
.dm-st.bad { background: var(--danger-solid); color: var(--on-danger); }
.dm-st.warn, .tag.warn { background: var(--yellow); color: var(--navy); }
.dm-soon { color: var(--danger); font-weight: 700; }
.dm-drop-hint { text-align: center; padding: 10px 0; }
.dm-prog { margin-bottom: 10px; }
.dm-up-h { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.dm-up { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
.dm-up li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px; gap: 8px; align-items: center; padding: 2px 0; font-size: 13px; }
.dm-up li.bad .dm-up-s { color: var(--danger); font-weight: 700; }
.dm-up-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-bar { display: block; height: 5px; background: var(--line-2); border-radius: var(--pill); overflow: hidden; }
.dm-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.dm-results { margin-bottom: 12px; }
.dm-hits { margin: 0; padding-left: 20px; }
.dm-hits li { margin: 6px 0; }
.dm-hits p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; }
/* the file panel: a drawer on the right */
.dm-drawer { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; justify-content: flex-end; }
.dm-dr-in { width: min(760px, 100%); height: 100%; overflow: auto; background: var(--surface); border-radius: var(--radius-lg) 0 0 var(--radius-lg); box-shadow: var(--shadow-pop); padding: 20px 24px 28px; }
.dm-dr-h { display: flex; align-items: flex-start; gap: 10px; }
.dm-dr-h h2 { flex: 1; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.dm-dr-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.dm-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.dm-dl > span { color: var(--muted); }
.dm-tabs { margin: 14px 0 10px; }
.dm-tab h3 { font-size: 14px; margin: 14px 0 6px; }
.dm-viewer { height: 70vh; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.dm-pic { max-width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: var(--radius-xs); }
.dm-pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.5 var(--mono); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-xs); padding: 10px; margin: 4px 0; max-height: 60vh; overflow: auto; }
.dm-chunks { padding-left: 0; list-style: none; }
.dm-chunks li { margin-bottom: 10px; }
.dm-list { padding-left: 18px; }
/* My memory */
.dm-mem { margin-bottom: 12px; }
.dm-mem-l { list-style: none; margin: 0; padding: 0; }
.dm-mem-l li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
@media (max-width: 640px) { .dm-mem-l li, .dm-up li { grid-template-columns: 1fr; } .dm-dl { grid-template-columns: 1fr; } }
