/* flow: lender profiles, contacts, fit verdicts (agent flow) */

/* ── a set of checkboxes that posts as one field ─────────────────────────────
   Positions, products, frequencies, restricted industries. Each tick is a
   44px-tall target on a phone; the fieldset spans both columns of a form grid. */
.tick-group{border:0; margin:0; padding:0; min-width:0; display:grid; gap:6px}
.form-grid > .tick-group{grid-column:1 / -1}
.tick-group legend{font-size:12px; font-weight:500; color:var(--ink); padding:0 0 2px}
.ticks{display:flex; flex-wrap:wrap; gap:6px}
.tick{
  position:relative; display:inline-flex; align-items:center; gap:7px; box-sizing:border-box;
  min-height:32px; padding:5px 11px 5px 9px; border:1px solid var(--hair); border-radius:999px;
  background:var(--surface); font-size:13px; color:var(--ink); cursor:pointer; user-select:none;
}
.tick input{width:15px; height:15px; margin:0; flex:none; accent-color:var(--sys-blue, var(--navy))}
.tick:hover{border-color:var(--line)}
.tick:has(input:checked){border-color:var(--navy); background:var(--navy-tint, rgba(0,122,255,.10))}
.tick:has(input:focus-visible){outline:2px solid var(--navy); outline-offset:2px}
.tick-group .hint{color:var(--ink-3); font-size:11.5px}
.caps-grid{grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); gap:8px}
.lender-suggest{margin:10px 0 0}
.lender-fold{margin-top:12px}
.lender-fold > .more-b{margin-top:10px}

/* ── the lender page ────────────────────────────────────────────────────── */
.lender-sum{display:block; max-width:46ch}
.lender-tabs > .tab-bar{border-bottom:1px solid var(--hair)}
.guide-head{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px}
.guide-checked{margin:0; font-size:13px; color:var(--ink-2)}
.guide-acts{margin-top:0}
.guide-group{border-top:1px solid var(--hair)}
.guide-h{margin:0; padding:12px 16px 2px; font:600 12px/1.3 var(--ui); letter-spacing:.02em; color:var(--ink-3); text-transform:none}
.fact .v.no-rule{color:var(--ink-3); font-weight:400}
#recipients .card-head{flex-wrap:wrap; gap:8px}
#recipients .card-head .btn{margin-left:auto}

/* ── the fit verdict ─────────────────────────────────────────────────────
   Colour is never the only signal: every chip carries its word and an icon. */
.fit{display:inline-flex; align-items:center; gap:5px; padding:2px 8px 2px 6px; border-radius:999px; font:600 11.5px/1.5 var(--ui); white-space:nowrap}
.fit svg{width:12px; height:12px; flex:none}
.fit-fits{background:var(--ok-tint); color:var(--ok)}
.fit-check{background:var(--sys-orange-tint, #FBF1DC); color:var(--sys-orange-text, #7A4B00)}
.fit-no{background:var(--bad-tint); color:var(--bad)}
.fit-why{list-style:none; margin:4px 0 0; padding:0; display:grid; gap:2px; font-size:12px; color:var(--ink-2)}
.fit-why li{display:flex; gap:6px; align-items:baseline}
.fit-why li::before{content:"–"; color:var(--ink-3); flex:none}
.fit-why li.miss{color:var(--ink)}
.fit-why li.ok{color:var(--ink-3)}
.fit-more{position:relative; z-index:1; margin-top:2px; font-size:12px}
.fit-more > summary{cursor:pointer; color:var(--navy); list-style:none; display:inline-block; min-height:24px}
.fit-more > summary::-webkit-details-marker{display:none}
.fit-more[open] > summary{color:var(--ink-3)}
.fit-legend{display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin:0 0 10px; font-size:12px; color:var(--ink-2)}
.fit-legend .fit{font-weight:600}
.pick-row .pick-t{display:flex; flex-wrap:wrap; align-items:center; gap:6px}
/* Send sheet (measured round 4): where the package goes is a note under the
   reasons, not a second heading; the loose hints in the form read as hints. */
#send-lenders .pick-row .hint,#send-lenders .picks > .hint,#send-lenders form > .hint{display:block; margin:0; font-size:12px; line-height:1.4; color:var(--ink-2)}
#send-lenders .pick-row .hint{margin-top:2px; overflow-wrap:anywhere}
/* a ticked lender shows a tick, not only a filled square */
.pick-row:has(input:checked)::before{background:var(--navy) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5 6.5 11.5 12.5 5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/14px no-repeat}
/* "and N more" belongs to the lender above it: the same card, continued */
.pick-wrap:has(> .fit-more) > .pick-row{border-bottom:0; border-bottom-left-radius:0; border-bottom-right-radius:0}
.pick-wrap > .fit-more{margin:0; padding:0 12px 8px 40px; border:1px solid var(--hair); border-top:0; border-radius:0 0 var(--r) var(--r); background:var(--surface)}
.pick-wrap:has(> .pick-row input:checked) > .fit-more{border-color:var(--navy); box-shadow:inset 1px 0 0 var(--navy), inset -1px 0 0 var(--navy), inset 0 -1px 0 var(--navy)}
.pick-wrap:has(> .pick-row input:checked) > .pick-row{box-shadow:inset 1px 0 0 var(--navy), inset -1px 0 0 var(--navy), inset 0 1px 0 var(--navy)}
/* the legend: each verdict with its meaning, one to a line on a phone */
@media (max-width:600px){
  .fit-legend{display:grid; grid-template-columns:auto 1fr; align-items:center; gap:6px 8px}
}
.fit-cell{display:block; margin-top:4px}

/* ── the thread on a lender row ─────────────────────────────────────────── */
.thread-line{display:block; margin-top:2px; font-size:12px; color:var(--ink-3)}
.reply-line{display:block; margin-top:2px; font-size:12px; color:var(--ink-2)}
.reply-line b{font-weight:600; color:var(--ink)}
fieldset.doc-picks{border:0; margin:0 0 12px; padding:0; display:grid; gap:4px}
fieldset.doc-picks legend{font-size:12px; font-weight:500; color:var(--ink); padding:0 0 4px}

@media (max-width:600px){
  /* six short facts, most of them "—" on a new lender: two to a line, not six screens of rows */
  .lender-contact .facts{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .lender-contact .fact .v{overflow-wrap:anywhere}
}
@media (max-width:700px){
  .tick{min-height:44px; padding:8px 14px 8px 12px; font-size:15px}
  /* the whole 44px chip is the box a thumb lands on: the native tick is
     stretched over it, invisible, and the mark is drawn in its place */
  .tick input{position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer}
  .tick::before{content:""; flex:none; width:18px; height:18px; box-sizing:border-box; border-radius:5px; border:1.5px solid var(--line); background:var(--surface)}
  .tick:has(input:checked)::before{
    background:var(--sys-blue, var(--navy)) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5 6.5 11.5 12.5 5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/14px no-repeat;
    border-color:var(--sys-blue, var(--navy))}
  .fit-more > summary{min-height:44px; display:flex; align-items:center}
  .guide-head{align-items:flex-start}
  .guide-acts .btn{min-height:44px}
  .caps-grid{grid-template-columns:1fr 1fr}
}
