/* ldu/pages-dan-library.css: Daniel's Your agent (/agent), All files (/vault) and Notes (/memory), redone with ux hierarchy (Milan, 13 Nov 2026).
   Layout only, tokens only, scoped to the pages' `.dlib` frame so nothing else moves. The older rules in pages-account, pages-vault, pages-experts and
   comms/notes_shell still load; where they meet these, these win by weight. No rule here touches a button's skin or any hover (DS sweep's). */

.page.dlib.ldu-page { max-width: none; }

/* ── shared pieces: section, title, lede, small line ── */
.dlib__grid { display: grid; gap: 24px; align-items: stretch; min-width: 0; }
@container page (min-width: 960px) { .dlib__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dlib__grid--top { align-items: start; } /* the register form and How it works: each card as tall as its own content */
.dlib__section { display: grid; gap: 16px; align-content: start; min-width: 0; }
.dlib__head { display: grid; gap: 4px; min-width: 0; }
.page.dlib.ldu-page .dlib__h2 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0;
  font-family: var(--display); font-size: var(--fs-h2); font-weight: 600; line-height: 1.3; color: var(--ink);
}
.page.dlib.ldu-page .dlib__h2 > .chip { font-family: var(--sans); }
/* a P2 section's title (.dlib__h3) is the h2 size; the status's title (P1) is a step above it, under the page's h1 */
.page.dlib.ldu-page .dlib__h3 { margin: 0; font-family: var(--display); font-size: var(--fs-h2); font-weight: 600; line-height: 1.3; color: var(--ink); }
.page.dlib.ldu-page .dlib-status .dlib__h2 { font-size: calc(var(--fs-h2) * 1.2); line-height: 1.25; }
.page.dlib.ldu-page .dlib__lede { margin: 0; max-width: 56ch; font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); }
.page.dlib.ldu-page .dlib__meta { margin: 0; font-size: var(--fs-meta); line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.page.dlib.ldu-page .dlib__meta .mono { font-family: var(--mono); font-size: inherit; color: var(--ink); }

/* ── a value to copy: a white read-only field and its Copy button (the address, the listen command) ── */
.dlib-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 40rem; min-width: 0; }
.page.dlib.ldu-page .dlib-copy__value {
  flex: 1 1 16rem; min-width: 0; display: flex; align-items: center; box-sizing: border-box; min-height: var(--btn-h-md); margin: 0; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-2);
  font-family: var(--mono); font-size: var(--fs-ui); line-height: 1.5; color: var(--ink); overflow-wrap: anywhere;
}
.dlib-copy > :last-child { flex: none; }

/* ── Your agent: the status card (P1), and who other agents see beside the address ── */
/* the two cards side by side share one treatment, one top and one height */
.page.dlib.ldu-page .dlib-card { display: grid; gap: 20px; align-content: start; margin: 0; padding: 24px; }
/* the card's address: one line, cut with an ellipsis; the whole address is its tooltip */
.page.dlib.ldu-page .dlib-cardurl { display: flex; gap: 4px; min-width: 0; }
.page.dlib.ldu-page .dlib-cardurl > :first-child { flex: none; }
.page.dlib.ldu-page .dlib-cardurl > .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlib-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dlib-who__id { display: grid; gap: 2px; min-width: 0; }
.dlib-who__name { font-size: var(--fs-body); font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.dlib-who__meta { font-size: var(--fs-ui); line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }

/* ── Your agent: register card, the three steps, the edit modal's Remove ── */
.page.dlib.ldu-page .dlib-register { display: grid; gap: 24px; margin: 0; padding: 24px; }
.page.dlib.ldu-page .dlib-form .agentpage__form { max-width: none; }
.page.dlib.ldu-page .dlib-form .input { background-color: var(--bg-2); }
.dlib-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.dlib-steps > li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.dlib-steps__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-2); background: var(--bg-2); color: var(--ink-2); }
.dlib-steps > li > span:last-child { display: grid; gap: 2px; min-width: 0; padding-top: 2px; }
.dlib-steps strong { font-size: var(--fs-body); font-weight: 600; line-height: 1.4; color: var(--ink); }
.dlib-steps strong + span { font-size: var(--fs-ui); line-height: 1.5; color: var(--ink-2); }
.dlib-remove { display: grid; justify-items: start; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.dlib-remove [data-testid="agent-remove"] { margin-left: -12px; } /* the ghost button's own 12px padding (its form is display: contents): its text then starts on the fields' edge */
/* the shared form's picture row wraps on a narrow modal, so "No picture chosen" is never cut */
.page.dlib.ldu-page .dlib-form .agentpage__picture, .page.dlib.ldu-page .dlib-form .filepick { flex-wrap: wrap; }
.page.dlib.ldu-page .dlib-form .filepick__name { white-space: normal; }

/* ── Tasks table ── */
.page.dlib.ldu-page .dlib__table table { min-width: 0; }
.page.dlib.ldu-page .dlib__num { text-align: right; }
.page.dlib.ldu-page .dlib__nowrap { white-space: nowrap; }
.page.dlib.ldu-page .dlib__table td { vertical-align: middle; }

/* ── All files and Notes: the header's actions, the filter bar, the list ── */
.page.dlib.ldu-page .page-header__actions { flex: 0 1 auto; min-width: 0; }
.page.dlib.ldu-page .page-header__actions > .vfiles__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page.dlib.ldu-page.notes-list .page-header__actions .notes-list__actions { margin-left: 0; }
.page.dlib.ldu-page.notes-list .page-header__actions .notes-list__places { gap: 2px; margin-right: 8px; }
/* a starred note: an ink star (the others are ink-3), never the lilac accent on the light page */
.page.dlib.ldu-page.notes-list .notes__star--on .icon { color: var(--ink); }
.dlib-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.dlib-bar > .xg__bar { flex: 1 1 auto; min-width: 0; }
.page.dlib.ldu-page .dlib-bar .xg__search { flex: 1 1 20rem; max-width: 28rem; }
.page.dlib.ldu-page .vfiles { gap: 12px; }
.dlib-count { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dlib-count > :last-child { margin-right: -12px; } /* the ghost button's padding: its text ends on the table's right edge */
.page.dlib.ldu-page .dlib__table td.vfiles__act { width: 1%; text-align: right; white-space: nowrap; }

/* the vault app's status in the header: a dot and a muted state beside the label */
.dlib-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dlib-dot--on { background: var(--ok); }
.dlib-dot__state { font-weight: 400; color: var(--ink-2); }
.dlib-dot__state::before { content: "·"; margin: 0 6px 0 2px; color: var(--ink-3); }

/* a narrow page: the tasks drop their Messages count; Notes puts Capture and New note on the first row, the places under them */
@container page (max-width: 560px) {
  .page.dlib.ldu-page .dlib__table .dlib__num { display: none; }
  .page.dlib.ldu-page.notes-list .notes-list__places { order: 2; flex: 1 0 100%; margin: 0 0 0 -12px; }
  .page.dlib.ldu-page.notes-list .notes-list__places .icon { display: none; } /* the four words alone fit one row */
}

@media (max-width: 720px) {
  .page.dlib.ldu-page .dlib-card, .page.dlib.ldu-page .dlib-register { padding: 20px 16px; }
  .page.dlib.ldu-page .dlib-bar .xg__search { max-width: none; }
}
