/* ═══════════════════════════════════════════════════════════
   CareerPath — Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --c-primary: #6366f1;
  --c-primary-dark: #4f46e5;
  --c-primary-light: #818cf8;
  --c-secondary: #06b6d4;
  --c-accent: #f59e0b;
  --c-success: #10b981;
  --c-danger: #ef4444;

  --c-bg: #f0f4f8;
  --c-surface: #ffffff;
  --c-surface-alt: #f8fafc;
  --c-text: #1e293b;
  --c-text-muted: #64748b;
  --c-text-light: #94a3b8;
  --c-border: #e2e8f0;

  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --gradient-cool: linear-gradient(135deg, #06b6d4, #6366f1);
  --gradient-nature: linear-gradient(135deg, #10b981, #06b6d4);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 14px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.12);
  --shadow-glow: 0 0 30px rgba(99,102,241,.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: .25s cubic-bezier(.4,0,.2,1);
  --bounce: .5s cubic-bezier(.34,1.56,.64,1);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; }
input { font-family: inherit; }

/* ── Accessibility ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ── Screens (general) ──────────────────────────────────── */
#app { min-height: 100dvh; position: relative; }
.screen {
  display: none; flex-direction: column;
  min-height: 100dvh; width: 100%;
}
.screen.active { display: flex; }

/* ═══════════════════════════════════════════════════════════
   WELCOME SCREEN
   ═══════════════════════════════════════════════════════════ */
#welcome {
  align-items: center; justify-content: center;
  background: var(--c-bg);
  position: relative; overflow: hidden;
  padding: 2rem;
}

/* floating blobs */
.welcome-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.shape {
  position: absolute; border-radius: 50%;
  opacity: .35; filter: blur(80px);
  will-change: transform;
}
.shape-1 { width: 500px; height: 500px; background: #6366f1; top: -15%; left: -10%; animation: float-a 22s ease-in-out infinite; }
.shape-2 { width: 400px; height: 400px; background: #06b6d4; top: 50%; right: -8%; animation: float-b 18s ease-in-out infinite; }
.shape-3 { width: 350px; height: 350px; background: #f59e0b; bottom: -10%; left: 30%; animation: float-c 25s ease-in-out infinite; }
.shape-4 { width: 280px; height: 280px; background: #8b5cf6; top: 20%; right: 25%; animation: float-a 20s ease-in-out infinite reverse; }
.shape-5 { width: 200px; height: 200px; background: #10b981; bottom: 25%; left: 5%; animation: float-b 24s ease-in-out infinite reverse; }

@keyframes float-a { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.05); } 66% { transform: translate(-20px,40px) scale(.95); } }
@keyframes float-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,30px) scale(1.08); } }
@keyframes float-c { 0%,100% { transform: translate(0,0) scale(1); } 40% { transform: translate(30px,-50px) scale(1.04); } 80% { transform: translate(-40px,20px) scale(.96); } }

.welcome-content {
  position: relative; z-index: 1;
  text-align: center; max-width: 660px;
  animation: fadeUp .8s ease-out;
}
.welcome-icon { font-size: 4rem; margin-bottom: 1rem; animation: pulse-glow 3s ease-in-out infinite; }
.welcome-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.welcome-subtitle { margin-top: 1.2rem; font-size: 1.1rem; color: var(--c-text-muted); max-width: 520px; margin-inline: auto; }
.welcome-badges {
  display: flex; flex-wrap: wrap; gap: .75rem;
  justify-content: center; margin-top: 2rem;
}
.badge {
  display: flex; align-items: center; gap: .45rem;
  padding: .5rem 1rem; border-radius: var(--radius-full);
  background: var(--c-surface); box-shadow: var(--shadow-sm);
  font-size: .85rem; font-weight: 500; color: var(--c-text);
  border: 1px solid var(--c-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.badge-icon { font-size: 1.1rem; }

.welcome-note { margin-top: 1.5rem; font-size: .8rem; color: var(--c-text-light); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-glow { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gradient-primary);
  color: #fff; font-weight: 600; font-size: 1rem;
  padding: .75rem 1.8rem; border-radius: var(--radius-full);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-lg), 0 0 40px rgba(99,102,241,.35); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .45; pointer-events: none; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.15rem; }
.btn-sm { padding: .5rem 1.2rem; font-size: .85rem; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--c-surface); color: var(--c-text-muted);
  font-weight: 500; font-size: .95rem;
  padding: .7rem 1.4rem; border-radius: var(--radius-full);
  border: 1px solid var(--c-border);
  transition: all var(--transition);
}
.btn-secondary:hover { color: var(--c-text); border-color: var(--c-text-light); background: var(--c-surface-alt); }
.btn-secondary:disabled { opacity: .35; pointer-events: none; }

.btn-mic {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--c-surface-alt); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-muted); transition: all var(--transition);
}
.btn-mic:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-mic.recording { background: var(--c-danger); color: #fff; border-color: var(--c-danger); animation: pulse-rec 1.2s ease-in-out infinite; }
@keyframes pulse-rec { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); } 50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } }

/* ═══════════════════════════════════════════════════════════
   TEST HEADER & PROGRESS
   ═══════════════════════════════════════════════════════════ */
#test { background: var(--c-bg); }
.test-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240,244,248,.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  padding: 1rem 1.5rem .8rem;
}
.progress-wrap { margin-bottom: .8rem; }
.progress-track {
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--c-border); overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 3px;
  background: var(--gradient-primary);
  width: 0%; transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-dots {
  display: flex; justify-content: space-between;
  margin-top: .45rem; padding: 0 2px;
}
.progress-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-border); border: 2px solid var(--c-bg);
  transition: all var(--transition); position: relative;
}
.progress-dot.completed { background: var(--c-primary); }
.progress-dot.active { background: var(--c-primary); transform: scale(1.3); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
.progress-dot-label {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  font-size: .6rem; color: var(--c-text-light); white-space: nowrap;
  display: none;
}
@media (min-width: 640px) { .progress-dot-label { display: block; } }

.section-info {
  display: flex; align-items: center; gap: .8rem;
}
.section-icon { font-size: 2rem; }
.section-title { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.section-subtitle { font-size: .85rem; color: var(--c-text-muted); margin-top: .15rem; }

/* ═══════════════════════════════════════════════════════════
   TEST CONTENT AREA
   ═══════════════════════════════════════════════════════════ */
.test-content {
  flex: 1; padding: 1.5rem;
  max-width: 960px; width: 100%; margin: 0 auto;
  animation: fadeIn .4s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft  { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }

/* ── Section 1: Interest Cards ──────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
}
.interest-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: .4rem; padding: 1.3rem .8rem;
  background: var(--c-surface); border: 2px solid var(--c-border);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all var(--transition);
  text-align: center; user-select: none;
}
.interest-card:hover { border-color: var(--c-primary-light); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.interest-card.selected {
  border-color: var(--c-primary); background: rgba(99,102,241,.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.interest-card.selected::after {
  content: '✓'; position: absolute; top: 6px; right: 8px;
  font-size: .75rem; font-weight: 700; color: #fff;
  background: var(--c-primary); width: 20px; height: 20px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  animation: popIn .3s var(--bounce);
}
.card-icon { font-size: 2rem; }
.card-label { font-size: .82rem; font-weight: 500; color: var(--c-text); line-height: 1.3; }
.cards-hint { text-align: center; color: var(--c-text-light); font-size: .8rem; margin-bottom: 1rem; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

/* ── Section 2: Paired Scales ───────────────────────────── */
.scales-list { display: flex; flex-direction: column; gap: 1.5rem; }
.scale-item {
  background: var(--c-surface); border-radius: var(--radius-md);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  animation: slideInRight .5s ease-out both;
}
.scale-item:nth-child(even) { animation-name: slideInLeft; }
.scale-texts {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem;
}
.scale-left, .scale-right { flex: 1; font-size: .88rem; line-height: 1.45; color: var(--c-text); }
.scale-left { text-align: left; font-weight: 600; }
.scale-right { text-align: right; color: var(--c-text-muted); }
.scale-dots {
  display: flex; justify-content: center; gap: 1rem;
  padding: .5rem 0;
}
.scale-dot {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--c-border); background: var(--c-surface);
  cursor: pointer; transition: all var(--transition);
  position: relative;
}
.scale-dot:hover { border-color: var(--c-primary-light); transform: scale(1.15); }
.scale-dot.active {
  border-color: var(--c-primary); background: var(--c-primary);
  transform: scale(1.1); box-shadow: 0 0 0 4px rgba(99,102,241,.2);
}
.scale-dot:nth-child(1).active { background: var(--c-primary); }
.scale-dot:nth-child(2).active { background: var(--c-primary-light); }
.scale-dot:nth-child(3).active { background: var(--c-text-light); }
.scale-dot:nth-child(4).active { background: var(--c-secondary); border-color: var(--c-secondary); box-shadow: 0 0 0 4px rgba(6,182,212,.2); }
.scale-dot:nth-child(5).active { background: var(--c-secondary); border-color: var(--c-secondary); box-shadow: 0 0 0 4px rgba(6,182,212,.2); }
.scale-labels {
  display: flex; justify-content: space-between;
  font-size: .7rem; color: var(--c-text-light); margin-top: .3rem;
}

/* ── Section 3: Scenario Cards ──────────────────────────── */
.scenarios-list { display: flex; flex-direction: column; gap: 1.5rem; }
.scenario-pair {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem;
  align-items: stretch;
  animation: fadeIn .5s ease-out both;
}
.scenario-card {
  background: var(--c-surface); border: 2px solid var(--c-border);
  border-radius: var(--radius-md); padding: 1.5rem 1.2rem;
  cursor: pointer; transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: .6rem;
}
.scenario-card:hover { border-color: var(--c-primary-light); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.scenario-card.selected {
  border-color: var(--c-primary); background: rgba(99,102,241,.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
  transform: scale(1.02);
}
.scenario-card .card-icon { font-size: 2.5rem; }
.scenario-card .card-label { font-size: .9rem; font-weight: 500; line-height: 1.4; }
.scenario-or {
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--c-text-light);
  text-transform: uppercase; letter-spacing: .08em;
}

/* ── Section 4: Skills Rating ───────────────────────────── */
.ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.rating-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-md); padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
  animation: fadeIn .4s ease-out both;
}
.rating-card-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.rating-card-head .card-icon { font-size: 1.6rem; }
.rating-card-head .card-label { font-size: .95rem; font-weight: 600; }
.rating-desc { font-size: .78rem; color: var(--c-text-muted); margin-bottom: .8rem; }
.star-row { display: flex; gap: .4rem; }
.star-btn {
  font-size: 1.6rem; background: none; color: var(--c-border);
  transition: all .15s ease; cursor: pointer;
  line-height: 1; padding: 2px;
}
.star-btn.lit { color: var(--c-accent); transform: scale(1.15); }
.star-btn:hover { transform: scale(1.25); }

/* ── Section 5: Voice / Open Questions ──────────────────── */
.voice-list { display: flex; flex-direction: column; gap: 2rem; }
.voice-item {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: var(--shadow-sm);
  animation: slideInRight .5s ease-out both;
}
.voice-item h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.voice-item p { font-size: .85rem; color: var(--c-text-muted); margin-bottom: 1rem; }
.voice-input-area { display: flex; gap: .8rem; align-items: flex-start; }
.voice-textarea {
  flex: 1; min-height: 80px; resize: vertical;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: .8rem; font-size: .9rem; font-family: var(--font);
  color: var(--c-text); background: var(--c-surface-alt);
  transition: border-color var(--transition);
}
.voice-textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.voice-mic-wrap { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.voice-mic-hint { font-size: .65rem; color: var(--c-text-light); }
.voice-waveform {
  display: none; height: 30px;
  align-items: center; gap: 2px; margin-top: .5rem;
}
.voice-waveform.active { display: flex; }
.wave-bar {
  width: 3px; background: var(--c-primary); border-radius: 2px;
  animation: wave 1s ease-in-out infinite;
}
.wave-bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 18px; animation-delay: .1s; }
.wave-bar:nth-child(3) { height: 25px; animation-delay: .2s; }
.wave-bar:nth-child(4) { height: 15px; animation-delay: .3s; }
.wave-bar:nth-child(5) { height: 22px; animation-delay: .15s; }
@keyframes wave { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.4); } }

/* ── Section 6: Visual Explorer ─────────────────────────── */
.visual-intro { text-align: center; color: var(--c-text-muted); font-size: .9rem; margin-bottom: 1.2rem; }
.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.visual-card {
  aspect-ratio: 1; border-radius: var(--radius-md);
  cursor: pointer; position: relative; overflow: hidden;
  border: 3px solid transparent;
  transition: all var(--transition);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .4rem; text-align: center; padding: .8rem;
}
.visual-card:hover { transform: scale(1.05); box-shadow: var(--shadow-lg); }
.visual-card.selected { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
.visual-card.selected::after {
  content: '✓'; position: absolute; top: 6px; right: 6px;
  font-size: .7rem; font-weight: 700; color: #fff;
  background: var(--c-primary); width: 22px; height: 22px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  animation: popIn .3s var(--bounce);
}
.visual-card .card-icon { font-size: 2.8rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
.visual-card .card-label { font-size: .72rem; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.3); }

.upload-area {
  margin-top: 1.5rem; padding: 2rem;
  border: 2px dashed var(--c-border); border-radius: var(--radius-lg);
  text-align: center; color: var(--c-text-muted); font-size: .9rem;
  cursor: pointer; transition: all var(--transition);
  background: var(--c-surface-alt);
}
.upload-area:hover { border-color: var(--c-primary-light); background: rgba(99,102,241,.04); }
.upload-area .upload-icon { font-size: 2rem; margin-bottom: .5rem; }
.upload-area input[type="file"] { display: none; }

/* ═══════════════════════════════════════════════════════════
   TEST FOOTER
   ═══════════════════════════════════════════════════════════ */
.test-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(240,244,248,.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border);
  position: sticky; bottom: 0; z-index: 50;
}
.question-counter { font-size: .8rem; color: var(--c-text-light); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════ */
#loading {
  align-items: center; justify-content: center;
  background: var(--c-bg); text-align: center; gap: 1.5rem;
}
.loading-content {
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}
.loading-spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 4px solid var(--c-border);
  border-top-color: var(--c-primary);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 1.5rem; font-weight: 700; }
.loading-subtitle { color: var(--c-text-muted); }

/* ═══════════════════════════════════════════════════════════
   RESULTS SCREEN
   ═══════════════════════════════════════════════════════════ */
#results { background: var(--c-bg); padding: 2rem 1rem 4rem; }
#results-content { max-width: 960px; margin: 0 auto; }

.results-header {
  text-align: center; margin-bottom: 2.5rem;
  animation: fadeUp .6s ease-out;
}
.results-header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; }
.results-header p { color: var(--c-text-muted); margin-top: .5rem; font-size: 1rem; }

/* Radar chart */
.chart-section {
  background: var(--c-surface); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  animation: fadeUp .6s ease-out .1s both;
}
/* Profile grid: chart + bars side by side */
.results-profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
}
@media (max-width: 640px) {
  .results-profile-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Score bars panel */
.score-bars-panel { display: flex; flex-direction: column; gap: .8rem; }
.score-bar-item {}
.score-bar-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .3rem; font-size: .85rem; font-weight: 500;
}
.score-bar-pct { font-weight: 700; font-size: .9rem; }
.score-bar-track {
  height: 10px; background: var(--c-border); border-radius: 5px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%; border-radius: 5px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}

.chart-container { max-width: 420px; margin: 0 auto; }
.chart-container svg { width: 100%; height: auto; }
.chart-label {
  font-size: 13px; font-weight: 600; fill: var(--c-text);
}
.chart-value { font-size: 11px; fill: var(--c-text-muted); }
.chart-polygon-bg { fill: rgba(99,102,241,.06); stroke: var(--c-border); stroke-width: 1; }
.chart-polygon-data {
  fill: rgba(99,102,241,.2); stroke: var(--c-primary); stroke-width: 2.5;
  stroke-linejoin: round;
  transition: all 1s cubic-bezier(.4,0,.2,1);
}
.chart-dot { fill: var(--c-primary); transition: all .6s ease; }

/* Type cards */
.types-section { margin-bottom: 2rem; }
.types-section h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem;
  animation: fadeUp .5s ease-out .2s both;
}
.type-cards { display: flex; flex-direction: column; gap: 1rem; }
.type-card {
  display: flex; gap: 1.2rem; align-items: flex-start;
  background: var(--c-surface); border-radius: var(--radius-md);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--c-primary);
  animation: slideInRight .5s ease-out both;
}
.type-card:nth-child(2) { animation-delay: .1s; border-color: var(--c-secondary); }
.type-card:nth-child(3) { animation-delay: .2s; border-color: var(--c-accent); }
.type-rank {
  font-size: 2rem; font-weight: 800; color: var(--c-primary);
  min-width: 40px; text-align: center; line-height: 1;
}
.type-card:nth-child(2) .type-rank { color: var(--c-secondary); }
.type-card:nth-child(3) .type-rank { color: var(--c-accent); }
.type-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .2rem; }
.type-info .type-label { font-size: .8rem; color: var(--c-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.type-info p { font-size: .9rem; color: var(--c-text-muted); line-height: 1.55; }

/* Career recommendations */
.careers-section { margin-bottom: 2rem; }
.careers-section h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem;
  animation: fadeUp .5s ease-out .3s both;
}
.career-chips {
  display: flex; flex-wrap: wrap; gap: .6rem;
  animation: fadeIn .6s ease-out .4s both;
}
.career-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: var(--radius-full);
  font-size: .85rem; font-weight: 500;
  background: var(--c-surface); border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.career-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-primary-light); }
.career-chip .chip-icon { font-size: 1rem; }
.career-chip.match-high { border-color: var(--c-primary); background: rgba(99,102,241,.06); }
.career-chip.match-mid { border-color: var(--c-secondary); background: rgba(6,182,212,.06); }

/* AI Insight (legacy) */
.ai-insight-section {
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.08));
  border: 1px solid rgba(99,102,241,.15);
  border-radius: var(--radius-lg); padding: 2rem;
  margin-bottom: 2rem;
  animation: fadeUp .6s ease-out .5s both;
}
.ai-insight-section h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .8rem; display: flex; align-items: center; gap: .5rem; }
.ai-insight-section p { font-size: .92rem; color: var(--c-text-muted); line-height: 1.6; }
.ai-insight-section .ai-loading { display: flex; align-items: center; gap: .6rem; color: var(--c-text-muted); }

/* AI Report — comprehensive analysis */
.ai-report-section {
  background: var(--c-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
  margin-bottom: 2rem;
  animation: fadeUp .6s ease-out .5s both;
}
.ai-report-header {
  background: var(--gradient-primary); padding: 1.5rem 2rem;
  color: #fff;
}
.ai-report-header h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .3rem; }
.ai-report-header p { font-size: .88rem; opacity: .85; }
.ai-report-body {
  padding: 2rem; font-size: .93rem; line-height: 1.7;
  color: var(--c-text);
}
.ai-report-body h3.ai-section-title {
  font-size: 1.15rem; font-weight: 700; color: var(--c-primary-dark);
  margin: 1.8rem 0 .8rem; padding-bottom: .4rem;
  border-bottom: 2px solid rgba(99,102,241,.15);
}
.ai-report-body h3.ai-section-title:first-child { margin-top: 0; }
.ai-report-body h4.ai-subsection-title {
  font-size: 1rem; font-weight: 600; color: var(--c-text);
  margin: 1.2rem 0 .5rem;
}
.ai-report-body p { margin-bottom: .8rem; color: var(--c-text-muted); }
.ai-report-body strong { color: var(--c-text); }
.ai-report-body ul {
  list-style: none; padding: 0; margin: .5rem 0 1rem;
}
.ai-report-body li {
  position: relative; padding-left: 1.4rem; margin-bottom: .5rem;
  color: var(--c-text-muted); line-height: 1.6;
}
.ai-report-body ul li::before {
  content: ''; position: absolute; left: 0; top: .55rem;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-primary);
}
.ai-report-body ol {
  list-style: none; padding: 0; margin: .5rem 0 1rem;
  counter-reset: step-counter;
}
.ai-report-body ol li {
  position: relative; padding-left: 2.2rem; margin-bottom: .7rem;
  color: var(--c-text-muted); line-height: 1.6;
  counter-increment: step-counter;
}
.ai-report-body ol li::before {
  content: counter(step-counter); position: absolute; left: 0; top: .1rem;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gradient-primary); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ai-report-placeholder {
  text-align: center; padding: 3rem 2rem; color: var(--c-text-muted);
}

/* Report tier badges */
.report-tier-badge {
  display: inline-block; padding: .25rem .75rem; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: .5rem;
}
.free-badge { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.pro-badge { background: rgba(255,255,255,.25); color: #fff; border: 1px solid rgba(255,255,255,.4); }

.ai-report-header-free { background: linear-gradient(135deg, #64748b, #475569); }
.ai-report-header-full { background: linear-gradient(135deg, #6366f1, #a855f7); }

/* ── Paywall Section ───────────────────────────────────── */
.paywall-section {
  margin-top: 0; position: relative;
  animation: fadeUp .6s ease-out .5s both;
}
.paywall-inner {
  position: relative; overflow: hidden;
  background: var(--c-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 2px solid var(--c-primary-light);
  padding: 3rem 2rem; text-align: center;
}
.paywall-glow {
  position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
  pointer-events: none;
}
.paywall-icon { font-size: 3rem; margin-bottom: .8rem; }
.paywall-title {
  font-size: 1.6rem; font-weight: 800; color: var(--c-text);
  margin-bottom: .5rem;
}
.paywall-subtitle {
  font-size: 1rem; color: var(--c-text-muted); max-width: 480px;
  margin: 0 auto 2rem;
}
.paywall-features {
  display: flex; flex-direction: column; gap: .8rem;
  max-width: 520px; margin: 0 auto 2rem; text-align: left;
}
.paywall-feature {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .8rem 1rem; border-radius: var(--radius-md);
  background: var(--c-surface-alt); border: 1px solid var(--c-border);
}
.paywall-feature-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.paywall-feature strong {
  display: block; font-size: .9rem; color: var(--c-text); margin-bottom: .15rem;
}
.paywall-feature span {
  font-size: .82rem; color: var(--c-text-muted); line-height: 1.4;
}
.paywall-price {
  margin-bottom: 1.5rem;
}
.paywall-price-amount {
  display: block; font-size: 2.4rem; font-weight: 900;
  background: var(--gradient-primary); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.paywall-price-note {
  display: block; font-size: .82rem; color: var(--c-text-muted); margin-top: .2rem;
}
.paywall-cta {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 1rem 2.5rem; border: none; border-radius: var(--radius-full);
  background: var(--gradient-primary); color: #fff;
  font-size: 1.1rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 20px rgba(99,102,241,.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.paywall-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,.45);
}
.paywall-cta:active { transform: translateY(0); }

.paywall-methods {
  margin-top: 1.5rem; margin-bottom: .5rem;
}
.paywall-method-label {
  display: block; font-size: .75rem; color: var(--c-text-light);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: .6rem;
}
.paywall-method-icons {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
}
.pay-method {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .7rem; border-radius: var(--radius-sm);
  background: var(--c-surface-alt); border: 1px solid var(--c-border);
  font-size: .78rem; font-weight: 500; color: var(--c-text-muted);
}
.pay-method-blik {
  background: #000; color: #fff; border-color: #000;
}
.pay-method-blik svg { margin-right: .1rem; }

.paywall-guarantee {
  margin-top: 1rem; font-size: .78rem; color: var(--c-text-light);
}

@media (max-width: 768px) {
  .ai-report-body { padding: 1.2rem; font-size: .88rem; }
  .ai-report-header { padding: 1.2rem 1.5rem; }
  .paywall-inner { padding: 2rem 1.2rem; }
  .paywall-title { font-size: 1.3rem; }
  .paywall-price-amount { font-size: 2rem; }
  .paywall-cta { padding: .9rem 2rem; font-size: 1rem; }
}
.ai-typing-dots span {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-primary); animation: typing .8s ease-in-out infinite;
}
.ai-typing-dots span:nth-child(2) { animation-delay: .15s; }
.ai-typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* Results actions */
.results-actions {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center;
  margin-top: 2rem;
  animation: fadeUp .5s ease-out .6s both;
}

/* ═══════════════════════════════════════════════════════════
   WELCOME — Dual CTAs
   ═══════════════════════════════════════════════════════════ */
.welcome-ctas {
  display: flex; flex-direction: column; gap: .8rem;
  align-items: center; margin-top: 2.5rem;
}
.welcome-ctas .btn-lg { min-width: 260px; justify-content: center; }
@media (min-width: 480px) {
  .welcome-ctas { flex-direction: row; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   CONVERSATION MODE
   ═══════════════════════════════════════════════════════════ */
#conversation {
  background: linear-gradient(180deg, #f0f4f8 0%, #e8edf5 100%);
}
.conv-layout {
  display: flex; height: 100dvh; width: 100%;
}

/* ── Sidebar ───────────────────────────────────────────── */
.conv-sidebar {
  width: 280px; min-width: 280px;
  background: var(--c-surface); border-right: 1px solid var(--c-border);
  padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0,0,0,.04);
}
.conv-sidebar.hidden { display: none; }
.conv-sidebar-header {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 1rem;
}
.conv-progress-pct {
  font-size: .85rem; font-weight: 700;
  color: var(--c-primary); background: rgba(99,102,241,.1);
  padding: .2rem .7rem; border-radius: var(--radius-full);
}
.conv-mini-chart {
  width: 100%; max-width: 200px; margin: 0 auto;
}
.conv-mini-chart svg { width: 100%; height: auto; }

.conv-riasec-bars { display: flex; flex-direction: column; gap: .55rem; }
.riasec-bar-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem;
}
.riasec-bar-label { width: 90px; font-weight: 500; white-space: nowrap; }
.riasec-bar-track {
  flex: 1; height: 8px; background: var(--c-border);
  border-radius: 4px; overflow: hidden; position: relative;
}
.riasec-bar-fill {
  height: 100%; border-radius: 4px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  width: 0%;
}
.riasec-bar-value { width: 32px; text-align: right; font-weight: 600; font-size: .75rem; color: var(--c-text-muted); }
.riasec-bar-row.active .riasec-bar-label { color: var(--c-primary); font-weight: 700; }
.riasec-bar-row.active .riasec-bar-track { box-shadow: 0 0 0 2px rgba(99,102,241,.2); }

.conv-results-btn {
  margin-top: auto; width: 100%;
  justify-content: center;
}
.conv-results-btn:disabled { opacity: .4; pointer-events: none; }

/* ── Main Chat Area ────────────────────────────────────── */
.conv-main {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; position: relative;
}

/* Header */
.conv-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
  z-index: 10;
}
.conv-header-left { display: flex; align-items: center; gap: .7rem; }
.conv-header-left strong { font-size: 1.05rem; font-weight: 700; }
.conv-header-left small { display: block; font-size: .72rem; color: var(--c-success); font-weight: 500; }
.conv-header-right { display: flex; gap: .5rem; }
.conv-avatar {
  font-size: 1.5rem; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-primary); border-radius: 50%;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

.btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--c-surface-alt); border: 1px solid var(--c-border);
  color: var(--c-text-muted); display: flex;
  align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-icon.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ── Messages ──────────────────────────────────────────── */
.conv-messages {
  flex: 1; overflow-y: auto;
  padding: 1.2rem 1rem;
  display: flex; flex-direction: column; gap: .8rem;
  scroll-behavior: smooth;
  background: linear-gradient(180deg, rgba(240,244,248,.3) 0%, transparent 60%);
}

/* Bot avatar inline */
.conv-msg-row {
  display: flex; gap: .6rem; align-items: flex-end;
  align-self: flex-start; max-width: 88%;
  animation: fadeIn .35s ease-out;
}
.conv-msg-row .conv-msg-avatar {
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 50%; background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; line-height: 1;
  box-shadow: 0 2px 6px rgba(99,102,241,.2);
  margin-bottom: 2px;
}

.conv-msg {
  max-width: 100%; padding: .9rem 1.15rem;
  border-radius: var(--radius-lg); font-size: .93rem; line-height: 1.6;
  animation: fadeIn .35s ease-out;
  word-wrap: break-word;
}
.conv-msg.bot {
  background: var(--c-surface); color: var(--c-text);
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.03);
}
.conv-msg.user {
  background: var(--gradient-primary); color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  max-width: 82%;
  box-shadow: 0 2px 10px rgba(99,102,241,.25);
}
.conv-msg.system {
  align-self: center; max-width: 90%;
  background: rgba(99,102,241,.08); color: var(--c-text-muted);
  text-align: center; font-size: .82rem;
  border-radius: var(--radius-full); padding: .5rem 1.2rem;
}
.conv-msg.bot.streaming {
  border-left: 3px solid var(--c-primary);
  background: linear-gradient(135deg, var(--c-surface) 0%, rgba(99,102,241,.04) 100%);
}

.conv-msg-photo {
  max-width: 200px; border-radius: var(--radius-sm);
  margin-bottom: .5rem;
}

/* Typing indicator */
.conv-typing {
  display: flex; align-items: flex-end; gap: .6rem;
  align-self: flex-start; padding: 0;
  animation: fadeIn .3s ease-out;
}
.conv-typing .conv-msg-avatar {
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 50%; background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; line-height: 1;
  box-shadow: 0 2px 6px rgba(99,102,241,.2);
}
.conv-typing-bubble {
  background: var(--c-surface); border-radius: var(--radius-lg);
  border-bottom-left-radius: 6px;
  padding: .8rem 1.2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.conv-typing-dots {
  display: flex; gap: 5px;
}
.conv-typing-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-primary); opacity: .4;
  animation: typing-bounce .8s ease-in-out infinite;
}
.conv-typing-dots span:nth-child(2) { animation-delay: .15s; }
.conv-typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%,100% { opacity: .4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-5px); }
}

/* Progress celebration */
.conv-celebration {
  align-self: center; text-align: center;
  background: var(--gradient-primary); color: #fff;
  padding: .6rem 1.5rem; border-radius: var(--radius-full);
  font-size: .85rem; font-weight: 600;
  animation: popIn .4s var(--bounce);
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
}

/* ── Input Bar ─────────────────────────────────────────── */
.conv-input-area {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem .8rem;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -2px 10px rgba(0,0,0,.04);
}
.conv-input-area input[type="text"] {
  flex: 1; border: 1.5px solid var(--c-border); border-radius: var(--radius-full);
  padding: .65rem 1rem; font-size: .9rem; color: var(--c-text);
  background: var(--c-surface-alt);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 0;
}
.conv-input-area input[type="text"]::placeholder {
  font-size: .82rem; color: var(--c-text-light);
}
.conv-input-area input[type="text"]:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.btn-mic-lg {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 50%;
  background: var(--gradient-primary); color: #fff;
  border: none; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.btn-mic-lg:hover { transform: scale(1.08); box-shadow: var(--shadow-lg), var(--shadow-glow); }
.btn-mic-lg.recording {
  background: var(--c-danger); animation: pulse-rec 1.2s ease-in-out infinite;
}

.conv-input-area .btn-primary.btn-sm {
  width: 40px; height: 40px; min-width: 40px;
  padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.conv-input-area .btn-icon {
  width: 40px; height: 40px; min-width: 40px;
  border-radius: 50%; border: none;
  background: var(--c-surface-alt); color: var(--c-text-muted);
}
.conv-input-area .btn-icon:hover {
  background: rgba(99,102,241,.1); color: var(--c-primary);
}

/* Safe area for mobile nav bar */
.conv-input-area {
  padding-bottom: max(.7rem, env(safe-area-inset-bottom));
}

/* ── Conversation Mobile Responsive ────────────────────── */
@media (max-width: 768px) {
  .conv-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0;
    z-index: 100; width: 300px;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .conv-sidebar.visible { transform: translateX(0); }
  .conv-sidebar.hidden { display: flex; }
  .conv-layout { flex-direction: column; }
  .conv-messages { padding: 1rem .8rem; }
  .conv-msg { font-size: .9rem; padding: .8rem 1rem; }
  .conv-msg.user { max-width: 85%; }
  .conv-msg-row { max-width: 90%; }
}

/* Sidebar overlay backdrop on mobile */
.conv-sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(15,23,42,.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.conv-sidebar-overlay.visible { display: block; }

/* ═══════════════════════════════════════════════════════════
   AI CHAT OVERLAY
   ═══════════════════════════════════════════════════════════ */
.chat-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 1rem;
  animation: fadeIn .25s ease-out;
}
.chat-overlay.hidden { display: none; }
.chat-container {
  width: 100%; max-width: 520px; max-height: 80dvh;
  background: var(--c-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column;
  animation: slideUp .35s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--c-border);
}
.chat-header-left { display: flex; align-items: center; gap: .6rem; }
.chat-avatar { font-size: 1.8rem; }
.chat-header-left strong { font-size: .95rem; }
.chat-header-left small { display: block; font-size: .7rem; color: var(--c-text-light); }
.chat-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-surface-alt); border: none;
  font-size: 1.3rem; color: var(--c-text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.chat-close:hover { background: var(--c-danger); color: #fff; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem 1.2rem;
  display: flex; flex-direction: column; gap: .8rem;
}
.chat-msg {
  max-width: 85%; padding: .7rem 1rem;
  border-radius: var(--radius-md); font-size: .9rem; line-height: 1.5;
  animation: fadeIn .3s ease-out;
}
.chat-msg.bot { background: var(--c-surface-alt); color: var(--c-text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--gradient-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-input-area {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1rem; border-top: 1px solid var(--c-border);
}
.chat-input-area input {
  flex: 1; border: 1px solid var(--c-border); border-radius: var(--radius-full);
  padding: .6rem 1rem; font-size: .9rem; color: var(--c-text);
  background: var(--c-surface-alt);
  transition: border-color var(--transition);
}
.chat-input-area input:focus { outline: none; border-color: var(--c-primary); }

/* ═══════════════════════════════════════════════════════════
   CONFETTI
   ═══════════════════════════════════════════════════════════ */
.confetti-piece {
  position: fixed; z-index: 9999;
  width: 8px; height: 14px; border-radius: 2px;
  opacity: 0; pointer-events: none;
  animation: confetti-fall 3s ease-out forwards;
}
@keyframes confetti-fall {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .scenario-pair { grid-template-columns: 1fr; }
  .scenario-or { padding: .3rem 0; }
  .scale-texts { flex-direction: column; gap: .3rem; }
  .scale-left, .scale-right { text-align: center; }
  .ratings-grid { grid-template-columns: 1fr; }
  .visual-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .type-card { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .7rem; }
  .interest-card { padding: 1rem .6rem; }
  .card-icon { font-size: 1.6rem; }
  .welcome-title { font-size: 1.8rem; }
  .welcome-badges { gap: .5rem; }
  .badge { padding: .4rem .7rem; font-size: .75rem; }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .test-footer, .test-header, #welcome, #loading, #conversation, .chat-overlay,
  .results-actions, .btn-primary, .btn-secondary { display: none !important; }
  #results { padding: 0; }
  .chart-section, .type-card, .careers-section, .ai-insight-section {
    break-inside: avoid; box-shadow: none; border: 1px solid #ddd;
  }
}
