/* ═══════════════════════════════════════════════════════════════
   dashboard-shared.css
   Shared styles for /dashboard /memories /tasks /collections
   /agents /signals. Extracted from dashboard.html so the
   six authed pages stay in lockstep.
   ═══════════════════════════════════════════════════════════════ */

/* ── Tab bar ── */
.dash-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; position: sticky; top: var(--nav-height, 53px); z-index: 90; background: var(--nav-bg, var(--bg)); backdrop-filter: blur(12px); padding-top: 8px; }
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; padding: 10px 16px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-muted); transition: all 0.15s;
  white-space: nowrap; flex-shrink: 0; text-decoration: none;
}
.dash-tab:hover { color: var(--text); background: var(--surface); }
.dash-tab.active { color: var(--accent-light); border-bottom-color: var(--accent); background: var(--surface); border: 1px solid var(--accent-underline); border-bottom: 2px solid var(--accent); border-radius: 6px 6px 0 0; }

/* ── Identity bar ── */
.dash-identity { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.dash-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
.dash-greeting { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.dash-greeting span { color: var(--accent); }
.dash-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ── Stats row ── */
.dash-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.dash-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
  transition: all 0.15s; cursor: pointer; text-decoration: none; display: block; color: inherit;
}
.dash-stat:hover { border-color: var(--accent); background: var(--surface-hover); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.dash-stat-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.dash-stat-label { font-size: 11px; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Overview grid ── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; align-items: start; }
.dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: left;
}
.dash-card.full { grid-column: 1 / -1; }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-card-header h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 0; }
.dash-card-header .dash-count { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dash-card-scroll { max-height: 400px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.dash-card-scroll::-webkit-scrollbar { width: 4px; }
.dash-card-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Topic chips ── */
.topic-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 10px; font-size: 13px; color: var(--text-muted);
  transition: all 0.15s; cursor: pointer;
}
.topic-chip:hover { border-color: var(--accent-border); background: var(--accent-glow); color: var(--text); }
.topic-chip .chip-count { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.topic-chip.macro { background: var(--accent-glow); border-color: var(--accent-underline); color: var(--accent-light); font-weight: 600; }

/* ── Type bar ── */
.type-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--border); margin-bottom: 12px; }
.type-bar-segment { height: 100%; transition: width 0.4s; cursor: pointer; }
.type-bar-segment:hover { opacity: 0.8; }
.type-bar-segment.facts { background: var(--accent); }
.type-bar-segment.decisions { background: var(--cyan); }
.type-bar-segment.preferences { background: var(--amber); }
.type-bar-segment.tasks { background: var(--emerald); }
.type-bar-segment.paths { background: oklch(calc(0.65 - var(--mode, 0) * 0.15) 0.15 330); }
.type-bar-segment.other { background: var(--text-dim); }
.type-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-dim); }
.type-legend-item { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.type-legend-item:hover { color: var(--text); }
.type-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

/* ── Expandable collection breakdown ── */
.breakdown-toggle { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 6px; }
.breakdown-toggle:hover { color: var(--text); }
.breakdown-caret { display: inline-block; transition: transform 0.2s; font-size: 10px; color: var(--text-dim); }
.breakdown-caret.open { transform: rotate(90deg); }
.breakdown-collections { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.breakdown-collections.open { max-height: 600px; }
.breakdown-collection { padding: 8px 0 4px 0; border-top: 1px solid var(--border); }
.breakdown-collection:first-child { border-top: none; }
.breakdown-col-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.breakdown-col-bar .type-bar { height: 8px; margin-bottom: 6px; }
.breakdown-col-bar .type-legend { gap: 8px; font-size: 11px; }
.breakdown-col-bar .type-legend-dot { width: 6px; height: 6px; }

/* ── Task/pref items ── */
.dash-task { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.dash-task:last-child { border-bottom: none; }
.dash-task:hover { background: var(--bg-subtle); margin: 0 -8px; padding: 10px 8px; border-radius: var(--radius-sm); border-left: 3px solid var(--accent); padding-left: 5px; }
.dash-task-status { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.dash-task-status.active { background: var(--accent); }
.dash-task-status.pending { background: oklch(0.65 0.12 250); }
.dash-task-status.blocked { background: var(--amber); }
.dash-task-status.review { background: var(--cyan); }
.dash-task-info { flex: 1; min-width: 0; text-align: left; }
.dash-task-title { font-size: 14px; font-weight: 500; color: var(--text); text-align: left; }
.dash-task-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.dash-task-progress { width: 60px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.dash-task-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.pref-item { font-size: 13px; color: var(--text-muted); line-height: 1.5; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: color 0.15s; text-align: left; }
.pref-item:hover { color: var(--text); }
.pref-item:last-child { border-bottom: none; }

/* ── Task detail (expanded) ── */
.task-detail { display: none; margin-top: 8px; padding: 12px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dash-task.expanded .task-detail { display: block; }
.task-steps { list-style: none; padding: 0; margin: 0 0 10px; }
.task-step { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.task-step:last-child { border-bottom: none; }
.task-step input[type="checkbox"] { margin-top: 2px; cursor: pointer; accent-color: var(--accent); }
.task-step.done { text-decoration: line-through; color: var(--text-dim); }
.task-step .step-remove {
  width: 24px; height: 24px; padding: 0; font-size: 16px; line-height: 24px;
  text-align: center; border-radius: 50%; margin-left: auto; flex-shrink: 0;
  display: none; background: transparent; border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444; cursor: pointer; transition: all 0.15s;
}
.task-step .step-remove:hover { background: rgba(239,68,68,0.15); }
.task-step:hover .step-remove { display: inline-block; }
.task-step.onboarding-step:not(.done) .step-text { cursor: pointer; color: var(--accent-light); }
.task-step.onboarding-step:not(.done) .step-text:hover { text-decoration: underline; }
.onboarding-answer-form { margin: 8px 0 4px 28px; display: flex; flex-direction: column; gap: 8px; }
.onboarding-answer-form textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--accent); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; font-family: inherit; resize: vertical; min-height: 60px; line-height: 1.5;
}
.onboarding-answer-form textarea:focus { outline: none; border-color: var(--accent-light); box-shadow: 0 0 0 2px var(--accent-glow); }
.onboarding-answer-form .form-actions { display: flex; gap: 8px; align-items: center; }
.onboarding-answer-form .form-hint { font-size: 12px; color: var(--text-dim); }
.task-result-item:hover { background: rgba(0,255,200,0.08) !important; }
.task-status-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.task-status-btn {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); transition: all 0.15s; font-family: inherit;
}
.task-status-btn:hover { border-color: var(--accent-border); color: var(--text); }
.task-status-btn.current { border-color: var(--accent); color: var(--accent-light); background: var(--accent-glow); }

.pref-item .pref-preview { display: block; }
.pref-item .pref-full { display: none; }
.pref-item.expanded .pref-preview { display: none; }
.pref-item.expanded .pref-full { display: block; }

/* ── Memories tab ── */
.mem-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.mem-search {
  flex: 1; min-width: 200px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px; font-family: inherit;
}
.mem-search:focus { outline: none; border-color: var(--accent); }
.mem-search::placeholder { color: var(--text-dim); }
.mem-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.mem-filter {
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 12px;
  padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.mem-filter:hover { color: var(--text); border-color: var(--border-hover); }
.mem-filter.active { background: var(--accent-glow); border-color: var(--accent-underline); color: var(--accent-light); }
.mem-list { list-style: none; padding: 0; margin: 0; }
.mem-item {
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; position: relative;
}
.mem-item:hover { border-color: var(--accent-border); background: var(--surface); }
.mem-item.expanded { border-color: var(--accent); }
.mem-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mem-type-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 8px; flex-shrink: 0;
}
.mem-type-badge.fact { color: var(--accent-light); background: var(--accent-glow); }
.mem-type-badge.preference { color: var(--amber); background: rgba(245,158,11,0.1); }
.mem-type-badge.decision { color: var(--cyan); background: rgba(6,182,212,0.1); }
.mem-type-badge.task { color: var(--emerald); background: rgba(16,185,129,0.1); }
.mem-type-badge.path { color: var(--text-dim); background: var(--bg-subtle); border: 1px solid var(--border); }
.mem-type-badge.task_done { color: var(--text-dim); background: rgba(16,185,129,0.12); text-decoration: line-through; font-style: italic; }
.mem-type-badge.result { color: var(--cyan); background: rgba(6,182,212,0.15); }
.mem-type-badge.summary { color: var(--amber); background: rgba(245,158,11,0.15); font-weight: 600; }
.mem-topics { font-size: 11px; color: var(--text-dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mem-preview { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.mem-full { display: none; font-size: 14px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.mem-full.editable { cursor: text; border-radius: 6px; padding: 8px; margin: -8px; transition: background 0.15s; }
.mem-full.editable:hover { background: rgba(255,255,255,0.03); }
.mem-full.editable::after { content: 'click to edit'; float: right; font-size: 11px; color: var(--text-dim); opacity: 0; transition: opacity 0.15s; margin-top: -2px; }
.mem-full.editable:hover::after { opacity: 1; }
.mem-full.editing { padding: 0; margin: 0; background: none; }
.mem-full.editing::after { display: none; }
.mem-inline-edit textarea {
  width: 100%; min-height: 100px; background: var(--bg); color: var(--text);
  border: 1px solid var(--accent); border-radius: 6px;
  padding: 10px; font-size: 14px; font-family: inherit; line-height: 1.6; resize: vertical;
}
.mem-inline-edit textarea:focus { outline: none; border-color: var(--accent-light); box-shadow: 0 0 0 2px var(--accent-glow); }
.mem-inline-edit .edit-bar { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.mem-inline-edit .edit-hint { font-size: 12px; color: var(--text-dim); margin-left: auto; }
.mem-item.expanded .mem-preview { display: none; }
.mem-item.expanded .mem-full { display: block; }
.mem-actions { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.mem-item.expanded .mem-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mem-actions .mem-topics-display { flex: 1; font-size: 11px; color: var(--text-dim); }
.mem-actions .mem-topics-display span { cursor: pointer; }
.mem-actions .mem-topics-display span:hover { color: var(--accent-light); }
.mem-edit-area { display: none; margin-top: 8px; }
.mem-edit-area textarea {
  width: 100%; min-height: 120px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px; font-size: 14px; font-family: inherit; line-height: 1.6; resize: vertical;
}
.mem-edit-area textarea:focus { outline: none; border-color: var(--accent); }
.mem-edit-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.mem-edit-row select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 13px; font-family: inherit; }
.mem-edit-row input { flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 13px; font-family: inherit; }
.mem-status-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 13px; color: var(--text-dim); }

/* ── CRUD patterns ── */
.crud-list { list-style: none; padding: 0; margin: 0; }
.crud-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.crud-item-info { flex: 1; min-width: 0; }
.crud-item-name { font-size: 15px; font-weight: 600; color: var(--text); }
.crud-item-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.crud-item-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.type-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 2px 8px; border-radius: 8px;
  color: var(--text-dim); background: var(--bg-subtle); border: 1px solid var(--border);
}
.type-badge.primary { color: var(--accent-light); background: var(--accent-glow); border-color: var(--accent-underline); }
.type-badge.owner { color: var(--amber); background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); }
.type-badge.invitation { color: var(--accent-light); background: var(--accent-glow); border-color: var(--accent-underline); }
.inline-form {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-top: 12px; display: none;
}
.inline-form.visible { display: block; }
.inline-form label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.inline-form input, .inline-form select {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 6px; font-size: 14px; font-family: inherit; width: 100%; margin-bottom: 10px;
}
.inline-form .form-row { display: flex; gap: 8px; align-items: flex-end; }
.inline-form .form-row > * { flex: 1; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-header h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 0; }
.access-select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 8px; font-size: 12px; cursor: pointer; outline: none;
}
.btn-sm {
  background: var(--surface); color: var(--text-muted); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-sm:hover { background: var(--surface-hover); color: var(--text); }
.btn-sm:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm.danger { color: #ef4444; border-color: rgba(239,68,68,0.3); }
.btn-sm.danger:hover { background: rgba(239,68,68,0.1); }
.btn-sm.accent { color: var(--accent-light); border-color: var(--accent-underline); }
.btn-sm.accent:hover { background: var(--accent-glow); }
.members-list { margin-top: 8px; padding-left: 16px; }
.member-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.member-row:last-child { border-bottom: none; }
.invite-row { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.invite-row input { flex: 1; font-size: 13px; padding: 6px 10px; }
.invite-row select { width: 120px; font-size: 13px; padding: 6px 8px; }
.invite-row input, .invite-row select {
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-family: inherit;
}

/* ── Account-style cards (used by /dashboard signed-out hero) ── */
.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.account-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.account-section h2 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.account-section p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* ── Namespace pills ── */
.ns-pill {
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 12px;
  padding: 3px 10px; font-size: 12px; font-weight: 500; color: var(--text-dim);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.ns-pill:hover { color: var(--text); border-color: var(--border-hover); }
.ns-pill.active { background: var(--accent-glow); border-color: var(--accent-underline); color: var(--accent-light); }
.ns-pill .ns-count { font-size: 10px; color: var(--text-dim); margin-left: 2px; }
.ns-hidden { display: none !important; }
#namespace-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
#namespace-select { display: none; }
@media (max-width: 768px) { #namespace-bar { display: none !important; } #namespace-select { display: block !important; } #namespace-select.ns-hidden { display: none !important; } }

/* ── Pagination toolbar ── */
.pagination-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; margin-bottom: 8px; font-size: 13px; color: var(--text-dim);
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.pagination-bar a { color: var(--accent-light); text-decoration: none; font-weight: 500; }
.pagination-bar a:hover { text-decoration: underline; }
.page-size-btn {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 8px; font-size: 12px; color: var(--text-dim); cursor: pointer; font-family: inherit;
}
.page-size-btn.active { border-color: var(--accent); color: var(--accent-light); }
.page-size-btn:hover { color: var(--text); }

/* ── Clickable affordance ── */
.mem-item:hover::after { content: '\203A'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--text-dim); pointer-events: none; }

/* ── Focus-visible outlines ── */
.btn-sm:focus-visible, .dash-tab:focus-visible, .ns-pill:focus-visible,
.mem-filter:focus-visible, .access-select:focus-visible,
.task-status-btn:focus-visible, .page-size-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Stat loading placeholder ── */
@keyframes stat-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }
.dash-stat-placeholder {
  display: inline-block; width: 32px; height: 6px; background: var(--text-dim);
  border-radius: 3px; animation: stat-pulse 1.5s ease-in-out infinite;
}

/* ── Empty/loading ── */
.dash-empty { text-align: center; padding: 24px 16px; font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.dash-loading { text-align: center; padding: 20px; font-size: 13px; color: var(--text-dim); }
.tab-loading { text-align: center; padding: 32px; color: var(--text-dim); font-size: 14px; }
.tab-error { text-align: center; padding: 24px; color: #ef4444; font-size: 14px; }

/* ── Signed out ── */
.dash-signed-out { text-align: center; padding: 80px 24px; }
.dash-signed-out h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.dash-signed-out p { color: var(--text-muted); font-size: 18px; margin-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 768px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .crud-item { flex-direction: column; align-items: flex-start; }
  .crud-item-actions { width: 100%; justify-content: flex-end; }
  .invite-row { flex-wrap: wrap; }
  .dash-tabs { flex-wrap: wrap; overflow-x: visible; gap: 0; }
  .dash-tab { flex: 1 1 calc(33.33% - 2px); text-align: center; min-height: 44px; padding: 8px 4px; font-size: 13px; }
  .dash-subtitle { display: none; }
  .dash-greeting { font-size: 18px; }
  .dash-identity { margin-bottom: 12px; }
  .mem-filters { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .mem-filters::-webkit-scrollbar { display: none; }
  .mem-filter { flex-shrink: 0; }
  .btn-sm { min-height: 44px; display: inline-flex; align-items: center; }
  .ns-pill { min-height: 44px; display: inline-flex; align-items: center; }
  .page-size-btn { min-height: 44px; min-width: 44px; }
  .mem-filter { min-height: 44px; display: inline-flex; align-items: center; }
  .access-select { min-height: 44px; }
  .task-status-btn { min-height: 44px; }
  .topic-chip { min-height: 36px; }
}
@media (max-width: 480px) {
  .dash-stats { gap: 8px; }
  .dash-stat { padding: 12px; }
  .dash-stat-value { font-size: 22px; }
  .dash-identity { flex-direction: column; text-align: center; }
  .dash-greeting { font-size: 18px; }
  .dash-card { padding: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   Quick-start card (Trio A, tasks 3d1319b0 + c3728bb0)
   Used on /setup?welcome=1 (primary) and as the zero-memory
   empty-state on /dashboard, /tasks, /account. Mirrors the
   .dash-card visual language so the welcome surface looks
   like a first-class member of the dashboard, not a snowflake.
   ══════════════════════════════════════════════════════════════ */
.quick-start-card {
  background: var(--surface); border: 1px solid var(--accent-underline);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
  box-shadow: 0 0 0 1px var(--accent-glow);
}
.quick-start-card.compact { padding: 14px 16px; }
.qs-head { margin-bottom: 12px; }
.qs-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.qs-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.qs-body { display: flex; flex-direction: column; gap: 10px; }
.qs-input {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical;
  line-height: 1.5; min-height: 60px;
}
.qs-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.qs-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qs-save { font-size: 13px; padding: 8px 16px; }
.qs-hint { font-size: 12px; color: var(--text-dim); }
.qs-success { padding: 10px 0; }
.qs-success-title { font-size: 15px; font-weight: 700; color: var(--accent-light); margin-bottom: 4px; }
.qs-success-sub { font-size: 13px; color: var(--text-muted); }
.qs-success-sub a { color: var(--accent-light); }

/* Seed-task panel — wraps the standard .dash-task render on /setup so the
   guided checklist sits inside the welcome card. The task itself is rendered
   by renderTaskDetailHtml so it stays visually identical to the /tasks pane. */
.seed-task-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 24px;
}
.seed-task-card .seed-head { margin-bottom: 12px; }
.seed-task-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.seed-task-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.seed-task-progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.seed-task-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s ease; }
.seed-task-empty { font-size: 13px; color: var(--text-dim); padding: 8px 0; }

/* Quick-start link in welcome banner — short, single-click bridge from
   "I'm signed in" to "I made my first memory". */
.welcome-quickstart-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--accent-light);
  margin-left: 12px; text-decoration: none; padding: 4px 10px;
  border-radius: var(--radius-sm); background: var(--accent-glow);
  border: 1px solid var(--accent-underline);
}
.welcome-quickstart-link:hover { background: var(--accent-underline); color: var(--text); }
.welcome-quickstart-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Plain "next steps" list — used by the static fallback when no server-
   injected seed task exists. No checkboxes (those would be misleadingly
   never-checkable). Just a bulleted list of pointers. */
.next-steps {
  list-style: disc inside;
  margin: 12px 0 0;
  padding: 0 0 0 4px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}
.next-steps li { margin: 0; padding: 0; }
.next-steps a { color: var(--accent); text-decoration: underline; }
