/* Candidates page */
.cx { max-width: 1040px; margin: 0 auto; padding: 28px 24px 80px; position: relative; z-index: 1; }
@media (max-width: 640px) { .cx { padding: 18px 16px 60px; } }
.cx-head h1 { margin: 6px 0 8px; font-size: 44px; letter-spacing: -0.035em; font-weight: 700; line-height: 1.05; }
.cx-head p { margin: 0; font-size: 16px; max-width: 620px; }
@media (max-width: 640px) { .cx-head h1 { font-size: 36px; } }
.cx-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 26px 0 16px; }
.cx-bar .seg button { padding: 8px 16px; font-size: 14.5px; }
.cx-count { color: var(--muted); font-weight: 500; margin-left: 2px; }
.cx-tools { display: flex; gap: 8px; flex: 1; justify-content: flex-end; min-width: 260px; }
.cx-tools input { flex: 1; max-width: 420px; min-width: 0; }
.cx-tools select { border: 0; border-radius: 12px; padding: 0 12px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--glass-edge); color: var(--text); font: inherit; font-size: 14px; }
@media (max-width: 640px) { .cx-tools { min-width: 100%; } .cx-tools input { max-width: none; } }

.cx-list { display: flex; flex-direction: column; gap: 8px; }
.cx-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; text-align: left;
  padding: 14px 16px; border: 1px solid var(--glass-edge); border-radius: 18px; background: var(--glass-strong); color: var(--text);
  font: inherit; cursor: pointer; transition: transform .1s, box-shadow .15s;
}
.cx-row:hover { box-shadow: 0 8px 24px rgba(40, 32, 18, 0.08); }
.cx-row:active { transform: scale(0.995); }
.cx-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px; }
.cx-avatar.lg { width: 60px; height: 60px; font-size: 20px; flex: none; }
.cx-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cx-name { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.cx-rank { font-size: 12px; color: var(--muted); font-weight: 600; }
.cx-role { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.cx-role strong { font-weight: 600; }
.cx-meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cx-skills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; max-height: 26px; overflow: hidden; }
.cx-skills.wrap { max-height: none; }
.cx-skills span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--muted); }
.cx-score { min-width: 44px; height: 32px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.cx-score.sm { min-width: 38px; height: 28px; font-size: 13.5px; flex: none; }
.cx-score.v-strong { background: var(--strong-soft); color: var(--strong); }
.cx-score.v-good { background: var(--good-soft); color: var(--good); }
.cx-score.v-possible { background: var(--possible-soft); color: var(--possible); }
.cx-score.v-weak { background: var(--weak-soft); color: var(--weak); }
.cx-none { padding: 8px 6px; }

.cx-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cx-proj {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; border: 1px solid var(--glass-edge); border-radius: 20px;
  background: var(--glass-strong); color: var(--text); font: inherit; cursor: pointer; min-height: 130px; transition: box-shadow .15s;
}
.cx-proj:hover { box-shadow: 0 10px 28px rgba(40, 32, 18, 0.09); }
.cx-proj-title { font-size: 16.5px; font-weight: 650; line-height: 1.3; }
.cx-proj-meta { font-size: 13px; color: var(--muted); }
.cx-proj-stats { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); padding-top: 10px; }
.cx-proj-stats b { color: var(--text); }
.cx-proj-stats .s-strong b { color: var(--strong); }
.cx-proj-stats .s-good b { color: var(--good); }
.cx-back { padding-left: 0; margin-bottom: 6px; }
.cx-project-head { margin-bottom: 16px; }
.cx-project-head h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }

.cx-empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--glass-edge); border-radius: 22px; background: var(--glass); grid-column: 1 / -1; }
.cx-empty h3 { margin: 0 0 6px; font-size: 19px; }
.cx-empty p { margin: 0 auto 18px; max-width: 380px; }
.cx-empty-btn { display: inline-block; text-decoration: none; padding: 11px 22px; border-radius: 999px; }

/* Drawer */
.cx-scrim { position: fixed; inset: 0; background: rgba(20, 18, 14, 0.32); z-index: 60; }
.cx-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 61; overflow-y: auto;
  background: var(--bg, #f7f6f2); border-left: 1px solid var(--glass-edge); box-shadow: -20px 0 60px rgba(0,0,0,.12);
  padding: 28px 28px 48px; -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) { .cx-drawer { padding: 22px 18px 40px; } }
.cx-locked { overflow: hidden; }
.cx-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.cx-d-head { display: flex; gap: 16px; align-items: center; padding-right: 40px; }
.cx-d-head h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.02em; }
.cx-links { display: flex; gap: 8px; margin-top: 16px; }
.cx-links a { padding: 7px 14px; border-radius: 999px; background: var(--fill); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.cx-drawer h5 { margin: 24px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cx-drawer p { margin: 0; line-height: 1.55; }
.cx-d-projects { display: flex; flex-direction: column; gap: 6px; }
.cx-d-proj { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--fill); color: var(--text); font: inherit; cursor: pointer; }
.cx-d-proj:hover { background: var(--fill-strong); }
.cx-d-proj > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cx-d-proj .muted { font-size: 12.5px; }
.cx-pseg { margin-bottom: 14px; }
.cx-pseg button { padding: 8px 14px; font-size: 14px; }
.cx-tag { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.cx-note { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; line-height: 1.45; border-left: 3px solid var(--accent); }
.cx-proj-stats .s-added b { color: var(--accent); }
.cx-empty .btn-secondary { padding: 9px 18px; }

/* Candidates filter + Jobs/Projects */
.cx-bar { margin-top: 22px; }
.cx-tools { justify-content: flex-start; flex-wrap: wrap; }
.cx-tools input { max-width: none; min-width: 220px; }
.cx-tools select { min-height: 44px; max-width: 280px; }
@media (max-width: 640px) { .cx-tools select { flex: 1; max-width: none; } }
.cx-filter-note { margin: 0 4px 12px; }
.cx-filter-note a { color: var(--accent); font-weight: 600; }
.cx-kicker { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.cx-source-link { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.cx-jtabs { margin-bottom: 18px; }
.cx-jtabs button { padding: 8px 16px; font-size: 14.5px; }
.cx-panel { padding: 22px 24px; border-radius: 22px; background: var(--glass-strong); border: 1px solid var(--glass-edge); }
@media (max-width: 640px) { .cx-panel { padding: 18px 16px; } }
.jd-source { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 12px 14px; margin-bottom: 18px; border-radius: 14px; background: var(--accent-soft); font-size: 14.5px; }
.jd-source-label { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.jd-source a { color: var(--accent); font-weight: 600; text-decoration: none; }
.jd { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px 18px; margin: 0; }
.jd-row { display: contents; }
.jd dt { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.jd dd { margin: 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 640px) { .jd { grid-template-columns: 1fr; gap: 2px; } .jd dd { margin-bottom: 10px; } }
.jd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jd-chips span { padding: 3px 10px; border-radius: 999px; background: var(--fill); font-size: 13.5px; }
.jd-h { margin: 22px 0 8px; font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.jd-desc { font-size: 15px; line-height: 1.6; }
.jd-foot { margin: 18px 0 0; }
.jd-snap { margin: 0 4px 12px; }

/* Jobs/Projects cards */
.cx-head { margin-bottom: 22px; }
.jb-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; padding: 14px 16px 14px 20px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--glass-edge); }
.jb-kpis { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; color: var(--muted); }
.jb-kpis b { color: var(--text); font-size: 17px; margin-right: 3px; }
.jb-kpis .k-added b { color: var(--accent); }
.jb-kpis .k-strong b { color: var(--strong); }
.jb-new { padding: 10px 18px; border-radius: 999px; text-decoration: none; font-size: 14.5px; white-space: nowrap; }
.jb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .jb-grid { grid-template-columns: 1fr; } }
.jb-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 14px; border-radius: 22px; cursor: pointer;
  background: var(--glass-strong); border: 1px solid var(--glass-edge); color: var(--text); overflow: hidden;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.jb-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent)); opacity: .85; }
.jb-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(40, 32, 18, 0.12); border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-edge)); }
.jb-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.jb-src { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--fill); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.jb-src img { width: 16px; height: 16px; border-radius: 4px; background: #fff; }
.jb-src-ic { width: 16px; height: 16px; display: grid; place-items: center; font-size: 11px; color: var(--accent); }
.jb-pill { font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--fill); color: var(--muted); }
.jb-pill.a-remote { background: var(--good-soft); color: var(--good); }
.jb-pill.a-hybrid { background: var(--accent-soft); color: var(--accent); }
.jb-pill.a-onsite { background: var(--possible-soft); color: var(--possible); }
.jb-title { margin: 2px 0 0; font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jb-loc { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.jb-people { min-height: 34px; display: flex; align-items: center; }
.jb-faces { display: flex; }
.jb-face {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-left: -8px;
  background: hsl(var(--h) 55% 90%); color: hsl(var(--h) 45% 32%); border: 2.5px solid var(--glass-strong, #fff);
}
.jb-face:first-child { margin-left: 0; }
.jb-face.added { box-shadow: 0 0 0 2px var(--accent); }
.jb-face.more { background: var(--fill); color: var(--muted); font-size: 11.5px; }
@media (prefers-color-scheme: dark) { .jb-face { background: hsl(var(--h) 30% 26%); color: hsl(var(--h) 60% 82%); } }
.jb-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.jb-stat { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--fill); color: var(--muted); }
.jb-stat b { color: var(--text); font-weight: 700; }
.jb-stat.s-added { background: var(--accent-soft); color: var(--accent); }
.jb-stat.s-added b { color: var(--accent); }
.jb-stat.s-strong { background: var(--strong-soft); color: var(--strong); }
.jb-stat.s-strong b { color: var(--strong); }
.jb-stat.s-none { color: var(--faint); background: transparent; box-shadow: inset 0 0 0 1px var(--glass-edge); }
.jb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--glass-edge); font-size: 12.5px; }
.jb-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.jb-again { color: var(--accent); font-weight: 650; text-decoration: none; }
.jb-again:hover { text-decoration: underline; text-underline-offset: 3px; }
.jb-open { font-weight: 650; color: var(--text); }
.cx-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.jb-again-btn { padding: 9px 18px; border-radius: 999px; text-decoration: none; font-size: 14.5px; }
.cx-head-actions .cx-source-link { margin-top: 0; }

#projectList.cx-projects { display: block; }
/* Job/project view spacing */
.cx-project-head h2 { margin-bottom: 8px; }
.cx-project-head .muted { line-height: 1.5; }
.cx-head-actions { margin-top: 18px; }
.cx-jtabs { margin: 6px 0 22px; }
.jd-snap { margin: 0 4px 16px; }
#insBox .ins-head { padding: 0 4px; }
#insBox .ins-hero-label { max-width: 640px; }
#insBox .ins-tiles { margin-top: 4px; }
.cx-tools select { min-width: 0; text-overflow: ellipsis; }
#jobFilter { flex: 0 1 280px; }
@media (max-width: 640px) {
  .cx-tools { flex-direction: column; align-items: stretch; }
  .cx-tools input, .cx-tools select, #jobFilter { width: 100%; max-width: 100%; flex: none; }
}
