:root {
  --bg: #f5f7fb;
  --surface: rgba(255,255,255,.92);
  --surface-solid: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --primary: #6d4aff;
  --primary-dark: #5638da;
  --primary-soft: #eeeaff;
  --green: #16a06a;
  --red: #e5484d;
  --shadow: 0 24px 70px rgba(16,24,40,.12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(109,74,255,.12), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(45,189,165,.10), transparent 26%),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.ambient { position: fixed; inset: auto; border-radius: 999px; filter: blur(60px); opacity: .35; z-index: -1; }
.ambient-one { width: 260px; height: 260px; background: #a58dff; top: -80px; left: -70px; }
.ambient-two { width: 260px; height: 260px; background: #87e4d2; right: -80px; bottom: -70px; }

.site-header {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand, .sidebar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand strong, .sidebar-brand strong { display: block; font-size: 16px; }
.brand small, .sidebar-brand small { color: var(--muted); display: block; margin-top: 2px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; color: white; background: linear-gradient(135deg, #7b5cff, #5233d1);
  box-shadow: 0 10px 20px rgba(109,74,255,.28);
}
.brand-mark.small { width: 36px; height: 36px; border-radius: 12px; }
.status-pill {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.7);
  backdrop-filter: blur(12px); border-radius: 999px; color: #344054; font-size: 13px; font-weight: 600;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(22,160,106,.12); }

.shell { max-width: 1240px; margin: 0 auto; padding: 24px 28px 56px; }
.screen { display: none; animation: fade .35s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#setupScreen.active {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 150px);
}
.hero-copy { padding: 20px 0; }
.eyebrow, .step-label {
  display: inline-block; text-transform: uppercase; letter-spacing: .13em; font-size: 12px;
  font-weight: 800; color: var(--primary);
}
.hero-copy h1, .report-header h1 {
  margin: 16px 0 18px; font-size: clamp(44px, 6vw, 74px); line-height: 1.02; letter-spacing: -.055em;
}
.hero-copy > p, .report-header p { max-width: 650px; color: var(--muted); font-size: 18px; line-height: 1.75; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.feature-card {
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 18px;
  padding: 16px; display: flex; gap: 11px; box-shadow: 0 12px 35px rgba(16,24,40,.06);
}
.feature-card > span { font-size: 22px; }
.feature-card strong, .feature-card small { display: block; }
.feature-card strong { font-size: 13px; }
.feature-card small { color: var(--muted); margin-top: 5px; line-height: 1.4; font-size: 11px; }
.seo-link-panel {
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 12px 35px rgba(16,24,40,.06);
}
.seo-link-panel strong { display: block; margin-bottom: 12px; }
.seo-link-panel div { display: flex; flex-wrap: wrap; gap: 10px; }
.seo-link-panel a {
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid #dedaf8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.setup-card, .center-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,.95); backdrop-filter: blur(20px);
  border-radius: 28px; padding: 32px; box-shadow: var(--shadow);
}
.card-heading { margin-bottom: 24px; }
.card-heading h2, .center-card h2 { margin: 9px 0 8px; font-size: 28px; letter-spacing: -.03em; }
.card-heading p, .center-card p { margin: 0; color: var(--muted); line-height: 1.6; }
label { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 700; color: #344054; }
input[type="text"], input[type="tel"], select {
  width: 100%; border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 14px 15px; border-radius: 13px; margin-top: 8px; outline: none; transition: .2s;
}
input[type="text"]:focus, input[type="tel"]:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(109,74,255,.1); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-box {
  display: flex; align-items: center; gap: 12px; border: 1px dashed #b8b2d9; padding: 15px;
  border-radius: 14px; background: #fbfaff; cursor: pointer;
}
.upload-box input { display: none; }
.upload-box strong, .upload-box small { display: block; }
.upload-box small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.upload-icon {
  width: 36px; height: 36px; display: grid; place-items: center; background: var(--primary-soft);
  border-radius: 10px; color: var(--primary); font-size: 20px;
}
.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.45; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--primary); }

.primary-btn, .secondary-btn, .danger-btn, .text-btn {
  border: 0; border-radius: 13px; padding: 14px 18px; font-weight: 750; transition: .2s;
}
.primary-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(135deg, #795cff, #5c3fe0); color: white;
  box-shadow: 0 14px 26px rgba(109,74,255,.24);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 30px rgba(109,74,255,.3); }
.secondary-btn { background: var(--primary-soft); color: var(--primary-dark); }
.secondary-btn:disabled { opacity: .45; cursor: not-allowed; }
.text-btn { background: transparent; color: var(--muted); }
.danger-btn { background: #fff0f0; color: var(--red); }

.center-card.compact {
  max-width: 520px; margin: 70px auto; text-align: center; padding: 44px;
}
.mic-orb {
  width: 112px; height: 112px; border-radius: 50%; margin: 18px auto 26px; position: relative;
  display: grid; place-items: center; font-size: 36px; background: linear-gradient(135deg, #7b5cff, #5432d4);
  box-shadow: 0 20px 50px rgba(109,74,255,.28);
}
.mic-orb.ready { background: linear-gradient(135deg, #35c98b, #16835c); }
.pulse-ring { position: absolute; inset: -12px; border: 2px solid rgba(109,74,255,.25); border-radius: 50%; }
.mic-orb.testing .pulse-ring { animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.device-state {
  display: inline-flex; gap: 8px; align-items: center; margin: 22px 0; padding: 10px 14px;
  border-radius: 999px; background: #f3f4f6; color: var(--muted); font-size: 13px; font-weight: 600;
}
.device-dot { width: 8px; height: 8px; background: #98a2b3; border-radius: 50%; }
.device-state.ready { background: #eaf8f2; color: #12734f; }
.device-state.ready .device-dot { background: var(--green); }
.button-stack { display: grid; gap: 10px; margin-top: 14px; }

.interview-layout {
  min-height: calc(100vh - 155px); background: var(--surface-solid); border-radius: 28px; overflow: hidden;
  display: grid; grid-template-columns: 300px 1fr; box-shadow: var(--shadow); border: 1px solid #eef0f4;
}
.interview-sidebar {
  padding: 26px; background: #121622; color: #fff; display: flex; flex-direction: column;
}
.sidebar-brand small { color: #98a2b3; }
.candidate-summary {
  display: flex; align-items: center; gap: 12px; margin-top: 36px; padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08);
}
.avatar {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(135deg, #7b5cff, #a58dff); font-weight: 800;
}
.candidate-summary strong, .candidate-summary small { display: block; }
.candidate-summary small { color: #98a2b3; margin-top: 4px; font-size: 12px; }
.progress-block { margin-top: 28px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: #98a2b3; }
.progress-label strong { color: white; }
.progress-track { height: 7px; background: rgba(255,255,255,.1); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.progress-bar { height: 100%; width: 12.5%; background: linear-gradient(90deg, #7b5cff, #b8a8ff); border-radius: inherit; transition: .35s; }
.sidebar-meta { display: grid; gap: 16px; margin: 32px 0 auto; }
.sidebar-meta div { display: flex; justify-content: space-between; font-size: 13px; }
.sidebar-meta span { color: #98a2b3; }
.live-text { color: #6ee7b7; }

.interview-main { padding: 34px; display: grid; grid-template-rows: 1fr auto; gap: 24px; background: #f8f9fc; }
.interviewer-stage {
  min-height: 350px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 20px;
}
.ai-avatar {
  width: 94px; height: 94px; border-radius: 30px; background: linear-gradient(135deg, #1f2432, #3a2d79);
  color: white; display: grid; place-items: center; position: relative; font-weight: 800; font-size: 24px;
  box-shadow: 0 18px 40px rgba(52,43,103,.25);
}
.voice-wave { position: absolute; bottom: -11px; display: flex; gap: 3px; align-items: center; background: white; padding: 7px 10px; border-radius: 999px; box-shadow: 0 8px 18px rgba(16,24,40,.12); }
.voice-wave i { width: 3px; height: 9px; background: var(--primary); border-radius: 4px; animation: wave 1s infinite ease-in-out; }
.voice-wave i:nth-child(2) { animation-delay: .1s; height: 13px; }
.voice-wave i:nth-child(3) { animation-delay: .2s; height: 17px; }
.voice-wave i:nth-child(4) { animation-delay: .3s; height: 12px; }
.voice-wave i:nth-child(5) { animation-delay: .4s; }
@keyframes wave { 0%,100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
.speaker-label { margin-top: 24px; font-size: 13px; color: var(--muted); font-weight: 700; }
.call-state {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
}
.call-state.speaking { background: #fff7ed; color: #c2410c; }
.call-state.listening { background: #ecfdf3; color: #027a48; }
.call-state.thinking { background: #f4f3ff; color: #5b21b6; }
.question-card { max-width: 760px; }
.question-number { display: inline-block; color: var(--primary); font-weight: 800; font-size: 12px; margin-top: 16px; text-transform: uppercase; letter-spacing: .12em; }
.question-card h2 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.04em; line-height: 1.25; margin: 12px 0 0; }
.voice-link {
  margin-top: 16px;
  border: 1px solid #dedaf8;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 800;
}

.answer-panel {
  background: white; border: 1px solid #e7e9ef; border-radius: 22px; padding: 22px; box-shadow: 0 14px 35px rgba(16,24,40,.06);
}
.answer-status { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; }
.recording-time { font-variant-numeric: tabular-nums; color: var(--red); }
.transcript-box {
  min-height: 86px; margin: 14px 0 18px; padding: 15px; background: #f8f9fb; border-radius: 14px;
  line-height: 1.6; color: #344054; border: 1px solid #eef0f4;
}
.placeholder { color: #98a2b3; }
.answer-text-label {
  margin: 14px 0 0;
}
.answer-textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  resize: vertical;
  color: var(--text);
  background: #fff;
  outline: none;
}
.answer-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(109,74,255,.1);
}
.answer-actions { display: grid; grid-template-columns: 1fr 180px; gap: 12px; }
.record-btn {
  border: 0; border-radius: 14px; padding: 15px 18px; background: #121622; color: white;
  display: flex; justify-content: center; align-items: center; gap: 10px; font-weight: 800;
  user-select: none; touch-action: none;
}
.record-btn.recording { background: var(--red); transform: scale(.99); }
.record-icon { width: 12px; height: 12px; border-radius: 50%; background: #ff6b6b; }
.record-btn.recording .record-icon { background: white; animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.privacy-note { text-align: center; color: #98a2b3; font-size: 11px; margin: 14px 0 0; }

.report-header { display: flex; justify-content: space-between; align-items: end; margin: 32px 0; }
.report-header h1 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 8px; }
.report-header .secondary-btn { white-space: nowrap; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.score-card, .metric-card, .feedback-card, .next-step-card, .detail-card {
  background: white; border: 1px solid #e9ebf0; border-radius: 22px; padding: 24px; box-shadow: 0 14px 35px rgba(16,24,40,.05);
}
.score-card { display: flex; align-items: center; gap: 24px; }
.score-card h2, .next-step-card h2 { margin: 8px 0; letter-spacing: -.03em; }
.score-card p, .next-step-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.score-ring {
  flex: 0 0 130px; height: 130px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at center, white 57%, transparent 58%), conic-gradient(var(--primary) 0 74%, #ebe8fa 74% 100%);
  position: relative; font-size: 38px; font-weight: 800;
}
.score-ring small { position: absolute; bottom: 30px; right: 24px; color: var(--muted); font-size: 11px; }
.metric-card h3, .feedback-card h3 { margin-top: 0; }
.metric { display: grid; grid-template-columns: 130px 1fr 34px; gap: 12px; align-items: center; margin-top: 16px; font-size: 12px; }
.metric div { height: 7px; border-radius: 999px; background: #eceef3; overflow: hidden; }
.metric i { display: block; height: 100%; background: linear-gradient(90deg, #7b5cff, #a58dff); border-radius: inherit; }
.voice-score-card p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}
.delivery-score {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #fbfcff;
}
.delivery-score strong,
.delivery-score span { display: block; }
.delivery-score span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.feedback-card { display: flex; gap: 14px; }
.feedback-icon { flex: 0 0 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; }
.feedback-card.good .feedback-icon { background: #e9f8f1; color: var(--green); }
.feedback-card.improve .feedback-icon { background: #fff3e8; color: #dc7b19; }
.feedback-card ul { margin: 10px 0 0; padding-left: 19px; color: var(--muted); line-height: 1.8; }
.next-step-card { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.next-step-card .primary-btn { width: auto; white-space: nowrap; }
.detail-card { grid-column: 1 / -1; }
.detail-card h3 { margin: 0 0 16px; letter-spacing: -.02em; }
.fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fit-grid > div {
  padding: 16px;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #fbfcff;
}
.fit-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  letter-spacing: -.02em;
}
.job-matches {
  display: grid;
  gap: 12px;
}
.job-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #fff;
}
.job-match strong,
.job-match span {
  display: block;
}
.job-match span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.job-match p {
  margin: 9px 0 0;
  color: #344054;
  line-height: 1.5;
  font-size: 13px;
}
.job-match-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}
.job-match-actions b {
  color: var(--green);
  font-size: 20px;
}
.job-match-actions .secondary-btn {
  text-decoration: none;
  padding: 10px 14px;
}
.whatsapp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.whatsapp-actions .primary-btn,
.whatsapp-actions .secondary-btn {
  width: auto;
}
.lead-capture-card {
  background: linear-gradient(135deg, #ffffff, #fbfaff 58%, #f5fffc);
}
.lead-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.lead-card-head h3 { margin-bottom: 6px; }
.lead-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.resume-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}
.lead-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.lead-form label { margin-bottom: 0; }
.lead-form .lead-consent {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: rgba(255,255,255,.76);
}
.lead-form .primary-btn {
  grid-column: 1 / -1;
  max-width: 260px;
}
.lead-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.lead-status.success { color: var(--green); }
.lead-status.error { color: var(--red); }
.question-reviews { display: grid; gap: 14px; }
.question-review {
  border: 1px solid #edf0f5;
  border-radius: 16px;
  padding: 16px;
  background: #fbfcff;
}
.question-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.question-review-head span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.question-review-head strong { color: var(--text); }
.question-review p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.review-question {
  color: #344054 !important;
  font-weight: 700;
}
.coach-prompt {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f4f1ff;
}
.coach-prompt strong,
.coach-prompt span { display: block; }
.coach-prompt strong {
  color: var(--primary-dark);
  font-size: 12px;
  margin-bottom: 5px;
}
.coach-prompt span { color: #344054; line-height: 1.5; }
.question-review details {
  margin-top: 12px;
  color: #344054;
}
.question-review summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--primary-dark);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag-row span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
}
.practice-plan {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}
.practice-plan li { padding-left: 6px; }
.empty-state {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  #setupScreen.active { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-inline: auto; }
  .feature-row { max-width: 680px; margin-inline: auto; }
  .interview-layout { grid-template-columns: 1fr; }
  .interview-sidebar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
  .candidate-summary, .progress-block, .sidebar-meta { display: none; }
  .sidebar-brand { margin: 0; }
  .danger-btn { width: auto; }
}

@media (max-width: 640px) {
  .site-header { padding: 18px; }
  .status-pill { display: none; }
  .shell { padding: 10px 14px 36px; }
  #setupScreen.active { min-height: auto; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy > p { font-size: 16px; }
  .feature-row { grid-template-columns: 1fr; }
  .setup-card, .center-card.compact { padding: 22px; border-radius: 22px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .center-card.compact { margin: 25px auto; }
  .interview-layout { border-radius: 20px; min-height: calc(100vh - 115px); }
  .interview-sidebar { padding: 16px; }
  .interview-main { padding: 14px; }
  .interviewer-stage { min-height: 310px; padding: 10px; }
  .question-card h2 { font-size: 28px; }
  .answer-actions { grid-template-columns: 1fr; }
  .answer-actions .secondary-btn { width: 100%; }
  .report-header { display: block; }
  .report-header .secondary-btn { margin-top: 15px; width: 100%; }
  .report-grid { grid-template-columns: 1fr; }
  .score-card { display: block; text-align: center; }
  .score-ring { margin: 0 auto 18px; }
  .metric { grid-template-columns: 105px 1fr 28px; }
  .next-step-card { display: block; }
  .next-step-card .primary-btn { width: 100%; margin-top: 18px; }
  .lead-card-head { display: block; }
  .resume-link { width: 100%; margin-top: 14px; }
  .fit-grid { grid-template-columns: 1fr; }
  .job-match { grid-template-columns: 1fr; }
  .job-match-actions { justify-items: stretch; }
  .job-match-actions .secondary-btn { text-align: center; }
  .whatsapp-actions { display: grid; justify-content: stretch; }
  .lead-form { grid-template-columns: 1fr; }
  .lead-form .primary-btn { max-width: none; }
  .question-review-head { display: block; }
  .question-review-head strong { display: block; margin-top: 6px; }
}
