/* ──────────────────────────────────────────────────────────────────────────
   Career Paths Renderer — Phase B CSS

   Companion stylesheet to `static/js/career_paths_renderer.js`. Included
   on both pages that render structured Career Paths output:
     • /kit/<id>       (templates/kit_detail.html)
     • /form results   (templates/index.html — post-generate view)

   All rules are .cp-* prefixed to avoid colliding with the unrelated
   .path-* selectors elsewhere in the codebase. Each path column carries
   --cp-primary / --cp-deep / --cp-tint as inline CSS vars set by the
   renderer JS (one of teal/indigo/orange per path id). Section identity
   (purple = --section-careers) lives in the section ribbon, NOT in this
   file, per the established product-level identity rule.

   This file uses design system tokens (--color-*, --space-*, etc.).
   Both consumer pages already define those tokens in their :root.
   ────────────────────────────────────────────────────────────────────── */

.cp-wrap { padding: var(--space-6) var(--space-6) var(--space-8); }

.cp-intro { margin-bottom: var(--space-6); }
.cp-intro-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--section-careers);
  margin-bottom: 6px;
}
.cp-intro-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-3) 0;
}
.cp-intro-target {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.cp-intro-target-label { font-size: 12.5px; color: var(--color-text-secondary); font-weight: 500; }
.cp-intro-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3e8ff;
  border: 1.5px solid var(--section-careers);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #7c3aed;
}
.cp-intro-body {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 720px;
  line-height: var(--line-height-normal, 1.5);
}

.cp-viz { padding: var(--space-4) 0; }
.cp-root-wrap { display: flex; justify-content: center; margin-bottom: var(--space-6); }
.cp-root {
  max-width: 340px;
  background: var(--color-text-primary);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  text-align: center;
  box-shadow: 0 4px 12px rgba(17,24,39,.08);
}
.cp-root-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--color-gray-300);
  margin-bottom: 4px;
}
.cp-root-role { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.cp-root-sub  { font-size: 12px; color: var(--color-gray-400); margin-top: 4px; }

.cp-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: flex-start;
}
.cp-path {
  background: var(--color-white);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-card-sm);
  transition: opacity .2s, transform .15s;
}
/* Hover dim other columns to focus the hovered one — UX trick from the v3 mockup. */
.cp-paths:hover .cp-path { opacity: .5; }
.cp-paths .cp-path:hover { opacity: 1; transform: translateY(-2px); }

.cp-path-head { text-align: center; padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border-subtle); }
.cp-path-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cp-path-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.cp-path-summary { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 6px; }
.cp-path-duration {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--color-text-tertiary);
  font-weight: 600;
}
.cp-path-duration svg { width: 12px; height: 12px; }

.cp-path-nodes { display: flex; flex-direction: column; gap: var(--space-3); }
.cp-node {
  position: relative;
  background: var(--color-gray-50);
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.cp-node.is-destination { background: var(--color-white); }
.cp-node-flag {
  position: absolute;
  top: -10px;
  right: var(--space-3);
  width: 24px;
  height: 24px;
  background: var(--color-white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.cp-node-flag svg { width: 12px; height: 12px; }
.cp-node-time {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
}
.cp-node-role { font-size: 14px; font-weight: 700; color: var(--color-text-primary); margin-bottom: 4px; }
.cp-node-salary {
  font-size: 12.5px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cp-node-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cp-node-edu {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cp-node-edu svg { width: 12px; height: 12px; flex-shrink: 0; }

.cp-ai-insight {
  background: linear-gradient(90deg, rgba(167,139,250,.06) 0%, rgba(167,139,250,.02) 100%);
  border: 1px solid rgba(167,139,250,.25);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.cp-ai-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  min-height: 44px;   /* mobile tap target */
}
.cp-ai-trigger:hover { background: linear-gradient(90deg, rgba(167,139,250,.10) 0%, rgba(167,139,250,.04) 100%); }
.cp-ai-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa 0%, var(--section-careers) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  flex-shrink: 0;
}
.cp-ai-icon svg { width: 12px; height: 12px; }
.cp-ai-trigger-text { flex: 1; font-size: 12px; color: var(--color-text-primary); font-weight: 600; }
.cp-ai-trigger-sub  { display: block; font-weight: 500; color: var(--color-text-secondary); font-size: 11.5px; margin-top: 1px; }
.cp-ai-chev { display: inline-flex; align-items: center; flex-shrink: 0; color: var(--color-text-tertiary); transition: transform .2s; }
.cp-ai-chev svg { width: 14px; height: 14px; }
.cp-ai-insight.open .cp-ai-chev { transform: rotate(180deg); }
.cp-ai-insight.open .cp-ai-trigger { background: linear-gradient(90deg, rgba(167,139,250,.10) 0%, rgba(167,139,250,.04) 100%); }
.cp-ai-body { display: none; padding: var(--space-3); border-top: 1px solid var(--color-border-subtle); background: var(--color-gray-50); }
.cp-ai-insight.open .cp-ai-body { display: block; }
.cp-ai-intro { font-size: 12.5px; color: var(--color-text-primary); margin-bottom: var(--space-3); line-height: 1.5; }
.cp-ai-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.cp-ai-options.is-single { grid-template-columns: 1fr; }
.cp-ai-option {
  background: var(--color-white);
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  transition: border-color .15s, box-shadow .15s;
}
.cp-ai-option:hover { border-color: #a78bfa; box-shadow: 0 4px 12px rgba(167,139,250,.15); }
.cp-ai-option-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7c3aed;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cp-ai-option-label svg { width: 11px; height: 11px; }
.cp-ai-option-title { font-size: 13px; font-weight: 700; color: var(--color-text-primary); margin-bottom: 4px; }
.cp-ai-option-body { font-size: 11.5px; color: var(--color-text-secondary); line-height: 1.5; }
.cp-ai-option-actions { margin: 6px 0 0 0; padding: 0 0 0 16px; list-style: none; }
.cp-ai-option-actions li {
  position: relative;
  padding-left: 12px;
  margin-bottom: 3px;
}
.cp-ai-option-actions li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #a78bfa;
}
.cp-ai-option-impact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #f3e8ff;
  color: #7c3aed;
  margin-top: 6px;
}
.cp-ai-option-impact svg { width: 10px; height: 10px; }

.cp-path-footer { margin-top: auto; text-align: center; }
.cp-path-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s, box-shadow .15s;
  min-height: 44px;
}
.cp-path-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.cp-path-cta svg { width: 13px; height: 13px; }

.cp-parse-error {
  padding: var(--space-6);
  text-align: center;
  background: var(--color-gray-50);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  margin: var(--space-4);
}
.cp-parse-error-title { font-size: 14px; font-weight: 700; color: var(--color-text-primary); margin-bottom: 6px; }
.cp-parse-error-body  { font-size: 12.5px; color: var(--color-text-secondary); line-height: 1.5; max-width: 480px; margin: 0 auto; }

@media (max-width: 900px) {
  .cp-paths { grid-template-columns: 1fr; gap: var(--space-5); }
  .cp-paths:hover .cp-path { opacity: 1; }   /* no dim on touch */
  .cp-ai-options { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cp-wrap { padding: var(--space-4); }
  .cp-intro-title { font-size: 18px; }
}
