/* challenge-finder.css — /find-your-challenge/ (tools/finder/build-finder.py, js/challenge-finder.js).
   Page frame, chips, filters and "How this works" come from listing.css. Type sizes use the --fs-* tokens only. */

.cf-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.cf-quick > span { font-weight: 600; }

/* ---------- form ---------- */
.cf-form { display: grid; gap: 12px; margin: 0 0 12px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; }
.cf-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.cf-set legend { padding: 0; margin: 0 0 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary); }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px 12px; }
.cf-form .lst-f select { padding-right: 34px; text-overflow: ellipsis; }
.cf-grid .lst-f { min-width: 0; }
.cf-cks { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.cf-ck { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; background: var(--bg-elevated); border: 1px solid var(--border-light);
  border-radius: 8px; font-size: var(--fs-sm); color: var(--text-primary); cursor: pointer; }
.cf-ck input { width: 18px; height: 18px; margin: 0; accent-color: var(--orange); }
.cf-ck:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.cf-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.cf-unk { flex: 1 1 280px; background: none; }
.cf-sort { flex: 0 1 340px; }
.cf-how { margin-bottom: 16px; }

/* ---------- results ---------- */
.cf-out .lst-count { margin: 0 0 10px; }
.cf-list { display: grid; gap: 12px; }
.cf-card { padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; min-width: 0; }
.cf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cf-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cf-firm { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; color: var(--text-primary); text-decoration: none; }
a.cf-firm:hover { color: var(--link-hover); }
.cf-prog { font-size: var(--fs-sm); color: var(--text-primary); }
.cf-sub { font-size: var(--fs-xs); color: var(--text-tertiary); }
.cf-ti { flex: 0 0 auto; padding: 4px 10px; border: 1px solid var(--border-light); border-radius: 999px; font-size: var(--fs-xs); color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.cf-ti b { color: var(--text-primary); }
.cf-ti--none { color: var(--text-tertiary); }
.cf-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 8px; }
.cf-n { min-width: 0; }
.cf-n dt { margin: 0 0 2px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-tertiary); }
.cf-n dd { margin: 0; font-size: var(--fs-base); font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cf-nn { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--text-tertiary); }
.cf-rules { margin: 0 0 8px; font-size: var(--fs-xs); line-height: 1.55; color: var(--text-secondary); }
.cf-why { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.cf-why li { padding: 3px 10px; border-radius: 999px; font-size: var(--fs-xs); line-height: 1.5; }
.cf-ok { background: var(--success-subtle); color: var(--text-primary); }
.cf-ok::before { content: '\2713\00a0'; color: var(--success); font-weight: 700; }
.cf-unk { }
.cf-why .cf-unk { background: none; border: 1px dashed var(--border-light); color: var(--text-secondary); }
.cf-why .cf-unk::before { content: '?\00a0'; color: var(--text-tertiary); font-weight: 700; }
.cf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cf-foot .visit-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; padding: 6px 14px;
  background: var(--action); border: 1px solid var(--action); border-radius: 8px; color: #000; font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cf-foot .visit-btn:hover { filter: brightness(1.08); }
.cf-foot .visit-btn:focus-visible, .cf-lnk:focus-visible, .cf-copy:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.cf-lnk { color: var(--link); font-size: var(--fs-sm); font-weight: 500; }
.cf-lnk:hover { color: var(--link-hover); }
.cf-meta { font-size: var(--fs-xs); color: var(--text-tertiary); }
.cf-code { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px dashed var(--orange); border-radius: 8px; font-size: var(--fs-xs); color: var(--text-secondary); }
.cf-code b { font-family: var(--mono, monospace); font-size: var(--fs-sm); color: var(--text-primary); letter-spacing: .04em; }
.cf-copy { min-height: 32px; padding: 4px 10px; background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 6px; color: var(--text-primary); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.cf-more { margin: 14px 0 0; text-align: center; }
.cf-h2 { margin: 32px 0 6px; font-size: var(--fs-lg); }

@media (max-width: 640px) {
  .cf-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-foot .visit-btn { flex: 1 1 100%; }
  .cf-sort { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .cf-form { padding: 12px; gap: 10px; }
  .cf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-grid .lst-f label { min-height: 2.6em; display: flex; align-items: flex-end; }
  .cf-ck { min-height: 36px; padding: 4px 10px; font-size: var(--fs-xs); }
}
.cf-off { color: var(--orange); font-weight: 700; }
