/* cv.css · CV Matcher — explainable candidate ranking. Demo-specific layout. */
.cv-stage {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

/* ---- JD column ---- */
.cv-jd { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }
.cv-block { display: flex; flex-direction: column; gap: 9px; }
.cv-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft);
}
.cv-textarea {
  width: 100%; resize: vertical; min-height: 168px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: var(--text-1);
  background: var(--softer); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 13px; transition: border-color .15s, box-shadow .15s;
}
.cv-textarea:focus {
  outline: none; border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(4,190,140,.14);
}
.cv-hint { font-size: 11.5px; line-height: 1.5; color: var(--text-soft); }
.cv-run { width: 100%; }
.cv-run.is-busy { pointer-events: none; opacity: .65; }

/* ---- results column ---- */
.cv-results { display: flex; flex-direction: column; gap: 16px; }
.cv-ranklist { display: flex; flex-direction: column; gap: 0; min-height: 120px; }

/* a candidate row */
.cv-cand {
  border-top: 1px solid var(--line-soft);
  animation: cv-in .45s cubic-bezier(.2,.7,.2,1) backwards;
}
.cv-cand:first-child { border-top: 0; }
@keyframes cv-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.cv-cand__head {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px;
  width: 100%; text-align: left; padding: 13px 4px;
  border-radius: 10px; transition: background .15s;
}
.cv-cand__head:hover { background: var(--mint-tint-2); }
.cv-cand__head:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
.cv-rank {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-soft);
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--soft); border-radius: 8px;
}
.cv-cand.is-top .cv-rank { background: var(--mint); color: #fff; }

.cv-who { min-width: 0; }
.cv-who b {
  font-family: var(--font-display); font-weight: 800; font-size: 14.5px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 7px;
}
.cv-who span { display: block; font-size: 12px; color: var(--text-dim); margin-top: 1px; }

.cv-score { display: flex; align-items: center; gap: 11px; }
.cv-score__bar { width: 110px; display: flex; align-items: center; }
/* track/fill are <span>s here — force block so width/height apply */
.cv-score__bar .bar-track { display: block; width: 100%; height: 8px; }
.cv-score__bar .bar-fill { display: block; }
.cv-score__pct { font-family: var(--font-mono); font-size: 13px; font-weight: 600; width: 38px; text-align: right; color: var(--text-1); }
.cv-caret {
  width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--text-soft); transition: transform .25s, color .15s;
}
.cv-cand.is-open .cv-caret { transform: rotate(90deg); color: var(--mint-ink); }
.cv-caret svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.4; fill: none; }

/* expandable rationale */
.cv-explain {
  overflow: hidden; max-height: 0;
  transition: max-height .35s cubic-bezier(.2,.7,.2,1);
}
.cv-cand.is-open .cv-explain { max-height: 340px; }
.cv-explain__inner {
  padding: 4px 4px 16px 42px; display: flex; flex-direction: column; gap: 12px;
}
.cv-rationale { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
.cv-rationale b { color: var(--text-1); }
.cv-explain__grp .cv-glabel {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-soft); margin-bottom: 7px; display: block;
}

/* shortlist card (mint surface) */
.cv-shortlist[hidden] { display: none; }
.cv-short-body { display: flex; flex-direction: column; gap: 9px; }
.cv-short-row {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.85); border-radius: 11px; padding: 10px 13px;
  animation: cv-in .4s cubic-bezier(.2,.7,.2,1) backwards;
}
.cv-short-row .cv-srank {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--mint-ink);
  background: var(--mint-tint); width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; flex-shrink: 0;
}
.cv-short-row > div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cv-short-row b { font-family: var(--font-display); font-weight: 800; font-size: 13.5px; color: var(--ink); }
.cv-short-row span { font-size: 11.5px; color: #1c4b3c; }
.cv-short-row .cv-sscore { margin-left: auto; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink); }

/* thinking shimmer rows */
.cv-think { display: flex; flex-direction: column; gap: 10px; padding: 6px 4px; }
.cv-think .shimmer { height: 46px; }
.cv-think .shimmer:nth-child(2) { width: 92%; }
.cv-think .shimmer:nth-child(3) { width: 84%; }
.cv-think .shimmer:nth-child(4) { width: 76%; }

@media (max-width: 860px) {
  .cv-stage { grid-template-columns: 1fr; }
  .cv-jd { position: static; }
  .cv-score__bar { width: 70px; }
}
