/* The brokerage track (hz): the business-setup wizard and the lender-partner
   directory. Everything else on those screens is the shared kit.

   No new colours and no new type sizes: every value below is a token
   public/app.css or public/theme-apple.css already defines, so both themes and
   both widths follow the rest of the product with nothing extra to keep in
   step. Colour never carries meaning alone — each step's state is also a word
   in its accessible name. */

/* ── the numbered step strip ─────────────────────────────────────────────── */
.setup-steps{margin:0 0 16px}
.setup-steps ol{display:flex; flex-wrap:wrap; gap:6px; list-style:none; margin:0; padding:0}
.setup-steps li{flex:1 1 0; min-width:124px}
.setup-steps a{
  display:flex; align-items:center; gap:8px; min-height:44px; padding:8px 10px;
  border:1px solid var(--hair); border-radius:var(--r); background:var(--surface);
  color:var(--ink-2); text-decoration:none; font-size:13px; font-weight:500;
}
.setup-steps a:hover{border-color:var(--line); color:var(--ink)}
.setup-steps .n{
  display:inline-grid; place-items:center; flex:0 0 auto; width:22px; height:22px;
  border-radius:50%; border:1px solid var(--line); font-size:11px; font-variant-numeric:tabular-nums;
}
.setup-steps .t{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.setup-steps li.current a{border-color:var(--navy); color:var(--ink)}
.setup-steps li.current .n{background:var(--navy); border-color:var(--navy); color:#fff}
.setup-steps li.done .n{background:var(--ok-tint); border-color:var(--ok); color:var(--ok)}
.setup-steps li.done .t{color:var(--ink)}

@media (max-width:600px){
  .setup-steps ol{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr))}
  .setup-steps li{min-width:0}
}

/* ── the wizard's own cards ──────────────────────────────────────────────── */
.setup-card .card-lede{margin:0; padding:12px 16px 4px; color:var(--ink-2); font-size:13px}
/* pilot (re-verification): the wizard reads as a form, not a 1,150px-wide sheet,
   and a finished step shows a tick rather than a tinted number nobody reads as "done". */
.setup-steps, .setup-card{max-width:920px}
.setup-steps li.done .n{font-size:0}
.setup-steps li.done .n::after{content:"✓"; font-size:12px; font-weight:700}
.setup-acts{display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end}
.setup-add{margin-top:12px}
.setup-add h3{margin:0; font:600 14px/1.3 var(--ui); color:var(--ink)}

/* The standing "not set up yet" bar: the same shape as the "View as role" bar
   it sits beside, so a page that shows both reads as one strip. */
.setup-bar{
  display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; justify-content:space-between;
  padding:8px 20px; font-size:13px;
  background:var(--navy-tint); color:var(--ink);
  border-bottom:1px solid var(--hair);
}
.setup-bar .btn{white-space:nowrap}
@media (max-width:600px){ .setup-bar{padding:8px 16px} }

/* ── "how does your company work": one radio per card ────────────────────── */
fieldset.choices{border:0; margin:0; padding:0; display:grid; gap:10px}
.choice{
  position:relative;
  display:grid; grid-template-columns:auto 1fr; gap:12px; align-items:start;
  padding:14px; border:1px solid var(--hair); border-radius:var(--r);
  background:var(--surface); cursor:pointer;
}
.choice:hover{border-color:var(--line)}
.choice:has(input:checked){border-color:var(--navy); box-shadow:inset 0 0 0 1px var(--navy)}
.choice:has(input:focus-visible){outline:2px solid var(--navy); outline-offset:2px}
/* The real radio covers the card, the way .seg-o's does in components.css: a
   20px dot is under the 44pt phone floor, and what somebody taps here is the
   whole card anyway. The dot beside it is the drawing of the same state. */
.choice input{position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer}
.choice .dot{
  flex:none; width:20px; height:20px; margin-top:2px; border-radius:50%;
  border:1.5px solid var(--line); background:var(--surface);
  transition:border-color var(--t-fast,.15s) var(--ease,ease), border-width var(--t-fast,.15s) var(--ease,ease);
}
.choice input:checked ~ .dot{border:6px solid var(--navy)}
.choice-body{display:grid; gap:4px; min-width:0}
.choice-t{font:600 15px/1.3 var(--ui); color:var(--ink)}
.choice-s{font-size:13px; color:var(--ink-2)}
.choice-d{font-size:12px; color:var(--ink-3)}

/* ── the lender partner record ───────────────────────────────────────────── */
.lender-note{margin:0; white-space:pre-wrap; font-size:13px; color:var(--ink-2)}

/* ── the brokerage dashboard's pipeline strip ────────────────────────────── */
.bk-stages{display:grid; grid-template-columns:repeat(auto-fit, minmax(128px, 1fr)); gap:8px}
.bk-stage{
  display:grid; gap:2px; min-height:64px; padding:10px 12px;
  border:1px solid var(--hair); border-radius:var(--r); background:var(--surface);
  text-decoration:none; color:var(--ink);
}
.bk-stage:hover{border-color:var(--line)}
.bk-stage .l{font-size:11.5px; color:var(--ink-3); line-height:1.25}
.bk-stage .n{font:600 20px/1 var(--ui); font-variant-numeric:tabular-nums}
.bk-stage .a{font-size:11.5px; color:var(--ink-2); font-variant-numeric:tabular-nums}

/* ── picking lenders to send a file to ──────────────────────────────────── */
fieldset.picks{border:0; margin:0 0 12px; padding:0; display:grid; gap:6px}
fieldset.picks legend{font-size:12px; font-weight:500; color:var(--ink); padding:0 0 4px}
.pick-row{
  position:relative;
  display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:start;
  min-height:44px; padding:10px 12px;
  border:1px solid var(--hair); border-radius:var(--r); background:var(--surface); cursor:pointer;
}
.pick-row:hover{border-color:var(--line)}
.pick-row:has(input:checked){border-color:var(--navy); box-shadow:inset 0 0 0 1px var(--navy)}
.pick-row:has(input:focus-visible){outline:2px solid var(--navy); outline-offset:2px}
/* Same trick as .choice and .seg-o: the input is the whole row, so the tap
   target is the row and not a 20px box inside it. */
.pick-row input{position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer}
.pick-row > span{display:grid; gap:2px; min-width:0}
.pick-t{font-size:13px; font-weight:500; color:var(--ink)}
/* The dot that draws what the invisible input holds. */
.pick-row::before{
  content:""; grid-column:1; width:18px; height:18px; margin-top:2px;
  border:1.5px solid var(--line); border-radius:4px; background:var(--surface);
}
.pick-row:has(input:checked)::before{background:var(--navy); border-color:var(--navy)}

/* ── small things on the lender and commission tables ───────────────────── */
.split-line{display:block; font-size:12px; color:var(--ink-2)}
.split-line + .split-line{margin-top:2px}
.warn-text{color:var(--bad)}
.cm-acts{display:inline-flex; align-items:center; gap:6px; justify-content:flex-end; white-space:nowrap}
@media (max-width:600px){ .cm-acts > .btn{display:none} } /* pilot: the row menu carries "Record money received…" on a phone */
/* pilot: "Add a lender partner" folds away once there is a real one. */
details.setup-add > summary{cursor:pointer; list-style:none}
details.setup-add > summary::-webkit-details-marker{display:none}
details.setup-add > summary h3{color:var(--accent-ink, var(--navy))}
details.setup-add > summary h3::before{content:"+ "}
details.setup-add[open] > summary h3::before{content:"− "}
details.setup-add:not([open]) > summary{border-bottom:0}
form.setup-add > h3{margin:6px 0 12px}
.iso-empty{display:block; padding:18px 16px}
/* pilot (audit F-17): a button inside a banner keeps its own ink (the banner's
   link rule made it blue-on-blue, 3.1:1), and the folded rows meet the 44px floor. */
.banner a.btn{color:var(--on-accent, #fff); text-decoration:none}
.banner a.btn.ghost{color:var(--accent-ink, var(--navy))}
details.setup-add > summary{min-height:44px; box-sizing:border-box}
