/* Daniel's Playbooks and Intake pages (Milan, 13 Nov, round 1), and the label-over-value Facts pattern they share. Loaded after pages-work-client.css, whose
   mtr-* board Intake reuses. Their own sheet so they stay clear of pages-work.css, which other workers edit. */

/* ── Facts: labelled values, the label OVER its value (Milan, 13 Nov: the label-left/value-right list squeezed values to a word a line). Used by a playbook's
   clauses and a lead's review on Intake. Items flow into as many columns as fit, one on a phone; a modal always has one. ── */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 16px 24px; margin: 0; }
.facts__item { display: grid; align-content: start; gap: 4px; min-width: 0; }
.facts dt { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: var(--fs-meta); font-weight: 500; line-height: 1.4; }
.facts dt > .icon { flex: none; color: var(--ink-3); }
.facts dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.facts dd p { margin: 0 0 4px; }
.facts dd p:last-child { margin-bottom: 0; }
.facts__none { color: var(--ink-3); }
.facts dd a:not(.btn) { color: var(--ink); text-decoration-color: var(--ink-4); text-underline-offset: 3px; }   /* ink on a light surface, never lilac */
/* Intake's review only (hub 27: the app-wide link sweep is its own task): the house link, lilac, its underline fading in on hover (Milan, 16 Nov:
   "the lilac text with on hover the underline") */
.pipe .facts dd a:not(.btn) { color: var(--accent); text-decoration-color: transparent; transition: color var(--dur), text-decoration-color var(--dur); }
.pipe .facts dd a:not(.btn):hover { text-decoration-color: currentColor; }
.ldu-modal .facts { grid-template-columns: minmax(0, 1fr); }

/* ── Playbooks (Milan, 13 Nov, round 1): the list is a table whose rows open a playbook; a playbook's clauses are cards with Edit as a pencil at the top
   right and the twin's three steps side by side (Starts with, May offer, Never accepts), stacked on a phone ── */
.pbk__scope { margin: 0; color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.8; }   /* the chip and its sentence flow as one line of text */
.pbk__scope > .chip { margin-right: 6px; }
.pbk-clause { gap: 16px; padding: 20px; }
.pbk-clause__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 32px; }
.pbk-clause__edit { margin-left: auto; margin-right: -6px; }   /* the pencil's glyph sits on the card's padding edge, like the title on the left */
.pbk .pbk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pbk-step--never dt > .icon { color: var(--danger); }
.pbk-step__note { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-meta); }
.pbk .pbk-more { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-ui); }
.pbk-table td { white-space: nowrap; }
.pbk-row { position: relative; }
.pbk-row__open { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; text-decoration: none; }
.pbk-row__open::after { content: ""; position: absolute; inset: 0; }   /* the whole row is the link */
.pbk-row__open:focus-visible { outline: none; }
.pbk-row:has(.pbk-row__open:focus-visible) { outline: var(--ring-w) solid var(--ring); outline-offset: calc(var(--ring-w) * -1); }
.pbk-row__mark { display: inline-grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: var(--r-2); background: var(--bg); color: var(--ink-2); }
.pbk-row__name { display: grid; gap: 2px; }
.pbk-row__meta { display: none; color: var(--ink-2); font-size: var(--fs-meta); font-weight: 400; }
.ldu-table .pbk-row__go { width: 16px; color: var(--ink-3); }
@media (max-width: 720px) {
  .pbk .pbk-steps, .pbk .pbk-more { grid-template-columns: minmax(0, 1fr); }
  .pbk-table :is(thead, td) { display: none; }
  .pbk-table :is(table, tbody, tr, th) { display: block; }
  .pbk-table th { white-space: normal; }
  .pbk-row__meta { display: block; }
}

/* ── Intake as Dan's pipeline (Milan, 13 Nov, round 1): the Activity Tracker's board, cards and list (mtr-*, pages-work-client.css, loaded after this
   sheet, so the rules here carry .pipe to win); only the pipeline's own bits. A lead opens its review in a modal; Decided is a plain list under it. ── */
.page.ldu-page.mtr.pipe { height: auto; }   /* the tracker's frame is one screen tall; Intake grows with its leads, so the main pane's bottom padding clears the phone's Menu bar */
/* the board and its scrolling are every board's (ldu/components.css, "board"): a column stops at 70% of the screen and its leads scroll inside it */
/* the whole pipeline at once (Milan, 13 Nov, round 3: "I can't see all the columns"): the columns share the width, never under 208px, so all five
   fit at 1440 with the sidebar open; narrower, the board scrolls and its arrows (components/ldu/_board_nav) say more sit to the right */
.pipe .mtr-col { flex: 1 1 0; min-width: 208px; max-width: none; }
.pipe .mtr-col.is-drop { outline: 2px dashed var(--accent); outline-offset: -2px; }   /* the column a dragged lead will land in */
.pipe .pipe-card[draggable=true] { cursor: grab; }
.pipe .pipe-card.is-lifted { opacity: .5; }
.pipe-move { margin: 0 0 12px; }
.pipe-move + .ldu-modal__note { margin-top: 0; }   /* the note belongs to Approve below it, not to the dropdown above */
.pipe .mtr-col__empty { padding: 12px; text-align: center; line-height: 1.4; }
.pipe .pipe-open { padding: 0; border: 0; background: none; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; text-align: left; cursor: pointer; }
.pipe .pipe-row .mtr-row__stage { flex: 1 1 100%; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }   /* company and time on one line, cut with an ellipsis (Milan, 13 Nov, point 11) */
.pipe .pipe-card .mtr-card__meta { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }   /* a card's company: one line, the full name in its tip */   /* company and time always on their own line, every row alike */
.pipe-card__need { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ink); font-size: var(--fs-ui); line-height: 1.45; overflow-wrap: anywhere;
  -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.pipe .pipe-card > .mtr-card__foot { flex-wrap: wrap; gap: 2px 12px; }   /* the time drops under the check when the column is narrow, never squeezing it */
.pipe-card__when { flex: none; color: var(--ink-2); font-size: var(--fs-meta); }
.pipe .pipe-row { grid-template-columns: minmax(0, 1fr) auto 16px; grid-template-areas: "main meta go"; }
.pipe .pipe-row > .mtr-row__main { grid-area: main; }
.pipe .pipe-row > .act-line { grid-area: meta; align-items: center; }
.pipe .pipe-row > .mtr-card__go { display: inline-grid; grid-area: go; }
.pipe-row__need { flex: 1 1 100%; overflow: hidden; color: var(--ink); font-size: var(--fs-ui); white-space: nowrap; text-overflow: ellipsis; }
.pipe-modal__hint { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-meta); }
.pipe-later { display: flex; align-items: flex-start; gap: 8px; margin: -24px 0 0; color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.5; }
.pipe-later > .icon { flex: none; margin-top: .25em; }
.pipe-decided.is-empty { display: none; }   /* a search that leaves no decided prospect: the empty state above says so once */
.pipe-decided { margin-top: 8px; }
/* a decided row is one line (Milan, 13 Nov): name and company, a small status chip, its age, Open client. The chip, age and button
   columns are fixed so they line up down the list; the company gives way first, cut with an ellipsis (its full text is the tooltip). */
.pipe-done { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 4rem 7rem; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px 8px 16px; }
.pipe-done[hidden] { display: none; }
.pipe-done + .pipe-done { border-top: 1px solid var(--line); }
.pipe-done__main { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.pipe-done__main > strong { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }   /* the name keeps its width; only a name too long for the row is cut */
.pipe-done__company { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--ink-2); font-size: var(--fs-meta); text-overflow: ellipsis; }
.pipe-done > .chip { justify-self: start; }
.pipe-done__when { color: var(--ink-2); font-size: var(--fs-meta); white-space: nowrap; }
.pipe-done > :last-child { justify-self: end; }
@media (max-width: 720px) {
  .pipe .mtr-bar__selects { display: grid; flex: 1 1 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* the two dropdowns side by side, equal */
  .pipe .mtr-bar__selects .ldu-dd__trigger { width: 100%; }
  .pipe .pipe-row { grid-template-columns: minmax(0, 1fr) 16px; grid-template-areas: "main go" "meta go"; }
  /* a phone: the name line (company still cut to one line) over the chip and its age, Open client on the right */
  .pipe-done { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 8px; padding: 12px 12px 12px 14px; }
  .pipe-done > .pipe-done__main { grid-column: 1 / span 2; grid-row: 1; }
  .pipe-done > .chip { grid-column: 1; grid-row: 2; }
  .pipe-done > .pipe-done__when { grid-column: 2; grid-row: 2; }
  .pipe-done > :last-child { grid-column: 3; grid-row: 1 / span 2; }
}
/* ── Intake sources (Milan, 16 Nov: the waiting list in the pipeline, "all should be labeled correctly"): a quiet label at the top of every card and
   row (waiting list, referred, added by you), and Turn into client in a lead's review. Grey chip only: colour stays for the conflict check. ── */
.pipe-source { align-self: flex-start; justify-self: start; width: fit-content; max-width: 100%; overflow: hidden; color: var(--ink); font-size: var(--fs-meta); white-space: nowrap; text-overflow: ellipsis; }
.pipe-source.pipe-source--you { padding-inline: 0; background: none; color: var(--ink-2); }   /* Daniel's own: a plain line, so the waiting list's chips stand out */
.pipe-source > span { overflow: hidden; text-overflow: ellipsis; }
.pipe-source:is(.pipe-source--waitlist, .pipe-source--referred) { background: color-mix(in srgb, var(--ink) 10%, transparent); font-weight: 500; }   /* from the waiting list: a firmer grey than any other chip on the card */
.pipe .pipe-card .pipe-source--referred { white-space: normal; }   /* the referrer's name is the fact: it wraps in a narrow column rather than being cut */
.pipe .pipe-row .pipe-source { flex: none; margin-bottom: 2px; }
.pipe-client { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.pipe-client__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pipe-client__text > small { color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.4; }
.pipe-client__form { flex: none; margin: 0; }
@media (max-width: 720px) {
  .pipe .mtr-bar__selects > :last-child:nth-child(odd) { grid-column: 1 / -1; }   /* three dropdowns on a phone: two side by side, Sort across the row */
}
/* Sort orders the board, it narrows nothing: no filter's firmer border on it (Milan, 16 Nov: "should just be default like the others") */
.pipe .pipe-sort.ldu-dd--on:not([open]) > .ldu-dd__trigger { border-color: var(--line); }
/* a column's count is a quiet number: no outline (Milan, 16 Nov); the border stays transparent so the chip keeps its size */
.pipe .board__head .chip { border-color: transparent; }
/* Move to in a lead's review floats like every dropdown (Milan, 16 Nov: the in-place panel shifted the review on open). It opens upward: the
   review's facts are always above it, so the panel stays inside the scrolling body, where opening down would be cut off at the footer. */
.ldu-modal__body .pipe-move .ldu-dd__panel { position: absolute; top: auto; bottom: calc(100% + 4px); width: 100%; max-width: none; margin-top: 0; }
