/* A job's memory (shared-memory.js): the same still lists on the dock's ⚙
   card and on the web's page view. Nothing here moves. */
.memory-view { display:flex; flex-direction:column; gap:18px; color:var(--text); min-width:0; }
.memory-section { display:flex; flex-direction:column; gap:10px; min-width:0; }
.memory-section + .memory-section { padding-top:16px; border-top:1px solid var(--border); }
.memory-head { display:flex; align-items:flex-start; flex-wrap:wrap; gap:8px 14px; }
.memory-head-text { display:flex; flex-direction:column; gap:3px; flex:1 1 240px; min-width:0; }
.memory-title { margin:0; font-size:14px; font-weight:600; line-height:1.35; color:var(--text); }
.memory-count { margin-left:8px; font-weight:400; font-size:12px; color:var(--muted); }
.memory-count:empty { display:none; }
.memory-hint { font-size:12.5px; line-height:1.45; color:var(--muted); }
.memory-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.memory-list { display:flex; flex-direction:column; min-width:0; }
.memory-status { font-size:12.5px; line-height:1.45; color:var(--muted); }
.memory-status:empty { display:none; }
.memory-warn { color:var(--warning); }
.memory-empty { font-size:12.5px; color:var(--muted); }

.memory-view .memory-btn { padding:5px 10px; border:1px solid var(--control-border); border-radius:6px; background:var(--surface); color:var(--text); font:inherit; font-size:12px; line-height:18px; cursor:pointer; }
.memory-view .memory-btn:hover,.memory-view .memory-btn:focus-visible { border-color:var(--accent-link); }
.memory-view .memory-btn:disabled { opacity:.45; cursor:default; border-color:var(--control-border); }
.memory-view .memory-btn.memory-primary { background:var(--accent); border-color:var(--accent); color:var(--accent-contrast); font-weight:600; }
.memory-view .memory-btn.memory-danger { color:var(--danger); }
.memory-view .memory-btn.memory-danger:hover,.memory-view .memory-btn.memory-danger:focus-visible { border-color:var(--danger); }
.memory-view [hidden] { display:none; }

.memory-row,.memory-change { display:flex; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--border); min-width:0; }
.memory-list > .memory-row:first-child,.memory-list > .memory-change:first-child,.memory-list > .memory-editor:first-child { border-top:0; padding-top:0; }
.memory-view .memory-btn.memory-row-open { display:flex; flex:1; min-width:0; flex-direction:column; align-items:stretch; gap:3px; padding:2px 0; border:0; border-radius:0; background:none; text-align:left; line-height:1.45; }
.memory-view .memory-btn.memory-row-open:hover .memory-row-name,
.memory-view .memory-btn.memory-row-open:hover .memory-row-body,
.memory-view .memory-btn.memory-row-open:focus-visible .memory-row-name,
.memory-view .memory-btn.memory-row-open:focus-visible .memory-row-body { color:var(--accent-link); }
.memory-row-name { font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.memory-row-sub,.memory-row-body { font-size:13px; overflow-wrap:anywhere; }
.memory-row-sub { color:var(--muted); }
.memory-row-meta { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.memory-row-meta .memory-warn { color:var(--warning); }
.memory-retired .memory-row-body { color:var(--muted); }
.memory-view .memory-btn.memory-row-act { flex:0 0 auto; }
.memory-view .memory-btn.memory-link { padding:0; border:0; border-radius:0; background:none; color:var(--accent-link); font-size:12px; line-height:18px; }
.memory-ties { display:flex; flex-direction:column; gap:3px; min-width:0; }
.memory-view .memory-btn.memory-more { align-self:flex-start; margin-top:8px; }

.memory-editor { display:flex; flex-direction:column; gap:10px; padding:12px 0; border-top:1px solid var(--border); min-width:0; }
.memory-field { display:flex; flex-direction:column; gap:5px; min-width:0; font-size:12px; color:var(--muted); }
.memory-view .memory-input { display:block; width:100%; box-sizing:border-box; padding:7px 10px; border:1px solid var(--control-border); border-radius:7px; background:var(--surface-2); color:var(--text); font:inherit; font-size:13px; line-height:20px; }
.memory-view .memory-input.memory-filter { width:170px; padding:4px 9px; font-size:12px; line-height:18px; }
.memory-view .memory-text { display:block; width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid var(--accent-link); border-radius:8px; background:var(--surface-2); color:var(--text); font:inherit; font-size:13px; line-height:1.5; resize:vertical; }
.memory-view .memory-input:focus,.memory-view .memory-text:focus { outline:none; border-color:var(--accent-link); }
.memory-page { margin:0; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); color:var(--text); font:inherit; font-size:13px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; -webkit-user-select:text; user-select:text; }
.memory-page:empty::before { content:"Nothing here yet. Edit writes the first lines."; color:var(--muted); }
.memory-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:2px; }
.memory-gap { flex:1; }
.memory-meter { font-size:12px; color:var(--muted); }
.memory-quote { font-size:12.5px; line-height:1.45; color:var(--muted); overflow-wrap:anywhere; }
.memory-seg { display:flex; flex-wrap:wrap; gap:6px; }
.memory-view .memory-seg > .memory-btn.on { border-color:var(--accent-link); background:var(--accent-soft); font-weight:600; }
.memory-grid { display:flex; flex-wrap:wrap; gap:10px 12px; }
.memory-grid > .memory-field { flex:1 1 200px; }

.memory-change-body { flex:1; min-width:0; }
.memory-change-text { font-size:13px; overflow-wrap:anywhere; }
.memory-change-state { font-size:12px; color:var(--muted); }
.memory-undone .memory-change-text { text-decoration:line-through; color:var(--muted); }
.memory-group .memory-change-text { flex:1; color:var(--muted); font-size:12.5px; }
.memory-grouped { padding-left:12px; }
