/* ldu/pages-flow.css: the expert flow in the LDU look (slice 12).

   Leads, an agreement, Projects, a project and /admin/experts carry `page flow ldu-page`, so the page frame, buttons,
   fields, cards, notice bar, back link and empty state of ldu/pages-work.css already apply. Everything below keys on
   `.flow.ldu-page` (or on the experts landing's own ids), so the other pages that share names like .coll__list,
   .coll__form and .eng__form are untouched. The Engage and seat cards on a profile are styled in pages-experts.css.
   Nothing is removed or renamed; the visual order is the DOM order. Colours are var() of fraction-ds tokens; hover
   moves colour, a border step or a wash in 150ms and never lifts or casts a shadow. */

/* chips are DS .chip (status as a dot); a heading's chip sits beside its words */
.flow.ldu-page > h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.flow.ldu-page .small { font-size: var(--fs-ui); }
.flow.ldu-page .muted { color: var(--ink-2); }
.flow.ldu-page a:not(.btn):not(.backlink) { text-underline-offset: 3px; transition: color var(--dur); }
.flow.ldu-page > p.muted > strong { color: var(--ink); font-weight: 600; }

/* ── a list of leads, projects, tasks, decisions: one row each, hairlines between ── */
.flow.ldu-page .coll__list { margin: 0; }
.flow.ldu-page .coll__list + .coll__list, .flow.ldu-page .coll__list + h3 { margin-top: 0; }
.flow.ldu-page .coll__list > li {
  padding: 16px 0; gap: 8px 12px; align-items: center; line-height: 1.5;
}
.flow.ldu-page .coll__list > li:first-child { padding-top: 0; }
.flow.ldu-page .coll__list > li:last-child { padding-bottom: 0; }
.flow.ldu-page .coll__list > li > p { flex: 1 0 100%; margin: 0; font-size: var(--fs-ui); max-width: 75ch; }
.flow.ldu-page .coll__list > li > small, .flow.ldu-page .coll__list > li > .small { font-size: var(--fs-ui); color: var(--ink-2); }
.flow.ldu-page [data-testid="needs-you"] { color: var(--accent); font-weight: 600; }
.flow.ldu-page .card > .coll__list + .coll__list { margin-top: 16px; }
.flow.ldu-page .card > h3.spend__h:first-child { margin-top: 0; }
.flow.ldu-page .card > h3.spend__h:not(:first-child) { margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.flow.ldu-page .card > h2.spend__h + h3.spend__h:not(:first-child) { margin-top: 0; padding-top: 0; border-top: 0; }
.flow.ldu-page [data-testid="terms"] > p.muted.small { margin: -8px 0 12px; }

/* the row's buttons sit at the far end, wrapping under the text on a narrow screen */
.flow__actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.flow.ldu-page .eng__form { margin: 0; display: inline-flex; }
.flow.ldu-page > .eng__form { justify-self: start; }
.flow.ldu-page .flow__actions .btn { min-width: 0; }
@media (max-width: 640px) {
  .flow__actions { flex: 1 0 100%; margin-left: 0; }
}

/* the waiting leads read as the thing to do: a little accent edge on the card that holds them */
.flow.ldu-page [data-testid="lead-inbox"]:has([data-testid="lead-row"]) { border-color: var(--accent); }
.flow.ldu-page [data-testid="lead-earlier"] > li > a, .flow.ldu-page [data-testid="my-lead-row"] > a { color: var(--ink); font-weight: 500; }
.flow.ldu-page [data-testid="lead-earlier"] > li > a:last-child, .flow.ldu-page [data-testid="my-lead-agreement"] { margin-left: auto; color: var(--accent); }

/* ── add a task or a decision, set a price: the form that ends a card ── */
.flow.ldu-page .coll__form { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.flow.ldu-page .coll__form > textarea.input { height: auto; min-height: 72px; resize: vertical; }
.flow.ldu-page .coll__form > .field__label { flex: 0 0 auto; margin: 0 -4px 0 0; align-self: center; font-size: var(--fs-ui); color: var(--ink-2); }
.flow.ldu-page .coll__form > input[type="date"] { flex: 0 1 11rem; }
.flow.ldu-page .coll__form > label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: var(--fs-ui); }
.flow.ldu-page [data-testid="admin-expert-row"] .coll__form > .input { flex: 0 1 10rem; }
.flow.ldu-page [data-testid="admin-expert-row"] > h2.spend__h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 8px; }
.flow.ldu-page [data-testid="admin-expert-row"] > h2.spend__h .muted { font-family: var(--sans); font-size: var(--fs-ui); font-weight: 400; letter-spacing: 0; }
.flow.ldu-page [data-testid="admin-expert-row"] > p { max-width: none; }
.flow.ldu-page [data-testid="admin-expert-row"] > h2 a { text-decoration: none; }
.flow.ldu-page [data-testid="admin-expert-row"] > h2 a:hover { text-decoration: underline; }
.flow.ldu-page [data-testid="admin-expert-row"] > p + p, .flow.ldu-page [data-testid="admin-expert-row"] > p + form { margin-top: 8px; }

/* ── the agreement: rate and scope, the terms, who has accepted ── */
.flow.ldu-page [data-testid="agreement-rate"] strong { font-family: var(--display); font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.flow.ldu-page [data-testid="agreement-scope"] { margin-top: 8px; white-space: pre-line; }
.flow.ldu-page .agentpage__form { display: grid; gap: 8px; }
.flow.ldu-page .agentpage__form .field__label:not(:first-child) { margin-top: 8px; }
.flow.ldu-page .agentpage__form .btn { justify-self: start; margin-top: 8px; }
.flow.ldu-page [data-testid="terms"] > ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.flow.ldu-page [data-testid="terms"] > ul > li {
  position: relative; padding: 12px 0 12px 20px; border-top: 1px solid var(--line);
  font-size: var(--fs-ui); line-height: 1.5; color: var(--ink-2); max-width: 75ch;
}
.flow.ldu-page [data-testid="terms"] > ul > li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 6px; height: 6px; border-radius: 999px; background: var(--ink-4); }
.flow.ldu-page [data-testid="terms"] > ul > li:first-child { border-top: 0; }
.flow.ldu-page [data-testid="terms"] > h2 .chip { margin-left: 8px; }
.flow.ldu-page [data-testid="agreement-signatures"] > p:not(.muted) {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  padding: 12px 0; border-top: 1px solid var(--line); max-width: none; margin: 0;
}
.flow.ldu-page [data-testid="agreement-signatures"] > h2 + p { border-top: 0; padding-top: 0; }
.flow.ldu-page [data-testid="agreement-signatures"] > .btn, .flow.ldu-page [data-testid="agreement-signatures"] > .eng__form { margin-top: 16px; }
.flow.ldu-page [data-testid="agreement-signatures"] > p.muted { margin-top: 16px; }

/* ── the experts landing: the first screen's Apply, then plain sections, the FAQ as framed rows ── */
.landing__panelview:has([data-testid="experts-apply"]) .landing__apply,
#expert-apply .landing__apply { height: 44px; padding: 0 20px; border-radius: var(--r-2); font-size: var(--fs-body); font-weight: 500; }
.landing__panelview:has([data-testid="experts-apply"]) .landing__actions { margin: 24px 0 0; }
#expert-how, #expert-control, #expert-earn, #expert-profile, #expert-stack, #expert-faq, #expert-apply { background: transparent; }
#expert-control, #expert-profile, #expert-stack { min-height: 0; padding-top: 72px; padding-bottom: 72px; }
#expert-control .landing__lede, #expert-profile .landing__lede, #expert-stack .landing__lede { max-width: 56ch; }
#expert-how .landing__visual, #expert-earn .landing__visual, #expert-control .landing__visual, #expert-profile .landing__visual, #expert-stack .landing__visual { display: none; }   /* a dashed "Diagram placeholder" box says nothing to an expert */
#expert-faq { min-height: 0; padding-top: 72px; padding-bottom: 72px; gap: 0; }
#expert-faq .landing__section-title { margin-bottom: 24px; }
#expert-faq .landing__faq {
  max-width: 640px; padding: 0 20px;
  border: 1px solid var(--line); border-top-width: 0; background: var(--bg-2);
}
#expert-faq .landing__section-title + .landing__faq { border-top-width: 1px; border-radius: var(--r-3) var(--r-3) 0 0; }
#expert-faq .landing__faq:last-of-type { border-radius: 0 0 var(--r-3) var(--r-3); }
#expert-faq .landing__faq > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--ink);
}
#expert-faq .landing__faq > summary::-webkit-details-marker { display: none; }
#expert-faq .landing__faq > summary::after { content: "+"; flex: none; font-size: 20px; font-weight: 400; color: var(--ink-3); }
#expert-faq .landing__faq[open] > summary::after { content: "\2212"; color: var(--accent); }
#expert-faq .landing__faq > summary:hover { color: var(--accent); }
#expert-faq .landing__faq > summary:focus-visible { outline: var(--ring-w) solid var(--ring); outline-offset: var(--ring-offset); border-radius: var(--r-1); }
#expert-faq .landing__faq > p { margin: 0 0 16px; max-width: 56ch; }
#expert-apply { min-height: 0; padding-top: 72px; padding-bottom: 96px; }
@media (max-width: 860px) {
  #expert-control, #expert-profile, #expert-stack, #expert-faq, #expert-apply { padding-top: 40px; padding-bottom: 40px; }
}

/* ── a project: its tasks and decisions as rows (s13) ─────────────────────────────────────────────── */
.flow.ldu-page [data-testid="tasks"] > h3.spend__h, .flow.ldu-page [data-testid="decisions"] > h3.spend__h {
  font-size: var(--fs-ui); font-weight: 600; color: var(--ink-2);
}
.flow.ldu-page [data-testid="tasks"] .coll__list { gap: 8px; margin: 12px 0 0; }
.flow.ldu-page [data-testid="tasks"] .coll__list > li, .flow.ldu-page [data-testid="decisions"] .coll__list > li {
  display: flex; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-2);
  background: var(--bg-2); font-weight: 500; color: var(--ink);
}
.flow.ldu-page [data-testid="tasks"] .coll__list > li:first-child, .flow.ldu-page [data-testid="tasks"] .coll__list > li:last-child,
.flow.ldu-page [data-testid="decisions"] .coll__list > li:first-child, .flow.ldu-page [data-testid="decisions"] .coll__list > li:last-child { padding: 12px 16px; }
.flow.ldu-page [data-testid="tasks"] .coll__list > li small, .flow.ldu-page [data-testid="decisions"] .coll__list > li small { font-weight: 400; }
.flow.ldu-page [data-testid="tasks"] > p.muted { margin: 8px 0 0; }
@media (max-width: 640px) {
  .flow.ldu-page .coll__form > .input, .flow.ldu-page .coll__form > input[type="date"] { flex: 1 0 100%; }
  .flow.ldu-page > p.muted { line-height: 1.7; }
}
/* the terms list's rules run the full card width */
.flow.ldu-page [data-testid="terms"] > ul > li { max-width: none; }
.flow.ldu-page [data-testid="terms"] > ul > li > * { max-width: 75ch; }

/* Leads: the Agreement link is an icon and its word on one line */
.flow.ldu-page [data-testid="my-lead-agreement"] { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.flow.ldu-page [data-testid="my-lead-agreement"]:hover { text-decoration: underline; text-underline-offset: 3px; }
