:root {
  --mint: #7fddbe;
  --mint-strong: #5ed3a6;
  --teal: #2e9b8f;
  --teal-deep: #227b72;
  --sky: #93c5fd;
  --navy: #0b3a42;
  --ink: #0a2a30;
  --bg-light: #f4f8f6;
  --white: #ffffff;
  --border: #1c545c;
  --border-light: #dde9e6;
  --danger: #ff6b5e;
  --glow: 0 0 24px rgba(127, 221, 190, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #e7f3f0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(46, 155, 143, 0.35), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(147, 197, 253, 0.18), transparent 55%),
    linear-gradient(180deg, #071f24 0%, #0a2a30 45%, #0b3a42 100%);
  background-attachment: fixed;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(127, 221, 190, 0.45));
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 4px 8px;
}
.brand .brand-text { display: flex; flex-direction: column; }
.brand h1 {
  font-size: 15px; margin: 0; color: var(--mint);
  letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700;
}
.brand .sub { font-size: 12px; color: #9fc9c2; letter-spacing: 0.5px; }

.card {
  background: rgba(11, 42, 48, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
  border: 1px solid rgba(127, 221, 190, 0.18);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--mint), var(--sky), transparent);
  opacity: 0.8;
}

h2 { color: var(--white); margin-top: 0; font-weight: 700; }
p.lead { color: #b9d9d3; line-height: 1.6; }

label { display: block; font-weight: 600; font-size: 13px; color: var(--mint); margin: 18px 0 6px; letter-spacing: 0.3px; text-transform: uppercase; }
input[type="text"], input[type="email"], select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 15px; background: rgba(10, 42, 48, 0.6); color: var(--white);
}
input::placeholder { color: #6f9a94; }
input:focus, select:focus { outline: none; border-color: var(--mint); box-shadow: var(--glow); }
select option { background: #0b3a42; color: var(--white); }

.file-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  background: rgba(10, 42, 48, 0.4);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: #b9d9d3;
}
.file-drop:hover, .file-drop.drag { border-color: var(--mint); box-shadow: var(--glow); }
.file-drop input { display: none; }
.file-name { margin-top: 8px; font-size: 13px; color: var(--mint); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px; border: none; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: transform 0.08s, opacity 0.15s, box-shadow 0.15s;
  letter-spacing: 0.3px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--mint-strong), var(--teal));
  color: #06201d;
  box-shadow: 0 8px 24px rgba(94, 211, 166, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(94, 211, 166, 0.5); }
.btn-primary:disabled { background: #5a716e; color: #9fb3b0; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--mint); border: 1.5px solid var(--border); }
.btn-danger { background: var(--danger); color: #2a0805; }
.btn-block { width: 100%; margin-top: 24px; }

.error-msg { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(3, 15, 17, 0.75);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
  backdrop-filter: blur(4px);
}
.modal-hidden { display: none; }
.modal {
  background: linear-gradient(160deg, #0e424a, #0a2a30); border-radius: 18px; padding: 30px; max-width: 480px; width: 100%;
  box-shadow: 0 24px 70px rgba(0,0,0,0.5); border: 1px solid rgba(127, 221, 190, 0.25);
}
.modal h3 { margin-top: 0; color: var(--white); }
.modal ul { padding-left: 20px; line-height: 1.65; color: #b9d9d3; }
.consent-check {
  display: flex; align-items: flex-start; gap: 10px; margin: 18px 0;
  background: rgba(10, 42, 48, 0.6); padding: 13px; border-radius: 10px; font-size: 14px;
  border: 1px solid var(--border); color: #dcefeb;
}
.consent-check input { margin-top: 3px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

/* Interview page */
.progress-bar {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; margin-bottom: 8px;
}
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--mint), var(--sky)); transition: width 0.3s; box-shadow: 0 0 10px rgba(127,221,190,0.6); }
#progressLabel { font-size: 12px; color: #9fc9c2; margin-bottom: 6px; letter-spacing: 0.4px; text-transform: uppercase; }

.jenny-tag {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 12px; color: var(--mint); letter-spacing: 0.5px; text-transform: uppercase; font-weight: 700;
}
.jenny-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.mic-stage { text-align: center; padding: 24px 0 6px; }
.mic-ring {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(127,221,190,0.12), transparent 70%);
  position: relative;
}
.mic-btn {
  width: 84px; height: 84px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: white; font-size: 30px;
  box-shadow: 0 8px 26px rgba(46, 155, 143, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center; transition: transform 0.15s, background 0.2s;
}
.mic-btn:hover:not(:disabled) { transform: scale(1.05); }
.mic-btn.listening { background: linear-gradient(135deg, var(--danger), #b3392f); animation: pulse 1.4s infinite; }
.mic-btn.speaking { background: linear-gradient(135deg, var(--sky), #5b8fd6); }
.mic-btn:disabled { background: #35494a; cursor: not-allowed; box-shadow: none; animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,107,94,0.45); }
  70% { box-shadow: 0 0 0 20px rgba(255,107,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,94,0); }
}
.mic-status { margin-top: 14px; font-size: 14px; color: var(--mint); font-weight: 600; min-height: 20px; letter-spacing: 0.2px; }

.qa-log { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; max-height: 44vh; overflow-y: auto; padding-right: 4px; }
.qa-log::-webkit-scrollbar { width: 6px; }
.qa-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.bubble { padding: 14px 17px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.bubble.bot { background: rgba(46, 155, 143, 0.14); border: 1px solid rgba(127,221,190,0.25); color: #eafcf6; }
.bubble.you { background: rgba(147, 197, 253, 0.12); border: 1px solid rgba(147,197,253,0.3); color: #eef6ff; align-self: flex-end; max-width: 88%; }
.bubble .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; opacity: 0.75; display: block; margin-bottom: 5px; }
.bubble.bot .tag { color: var(--mint); }
.bubble.you .tag { color: var(--sky); }
.live-transcript { font-style: italic; color: #7fa8a2; min-height: 20px; margin-top: 8px; font-size: 14px; }

.footer-note { text-align: center; font-size: 12.5px; color: #6f9a94; margin-top: 20px; }

/* Report page */
.score-hero { text-align: center; padding: 18px 0 10px; }
.score-num { font-size: 54px; font-weight: 800; color: var(--mint); text-shadow: 0 0 24px rgba(127,221,190,0.5); }
.score-label { color: #9fc9c2; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.q-block { border: 1px solid rgba(127,221,190,0.2); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; background: rgba(10,42,48,0.5); }
.q-block h4 { margin: 0 0 8px; color: var(--white); font-size: 15px; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-right: 6px; }
.pill.good { background: rgba(94,211,166,0.2); color: var(--mint); border: 1px solid rgba(94,211,166,0.4); }
.pill.gap { background: rgba(255,107,94,0.15); color: #ff9184; border: 1px solid rgba(255,107,94,0.35); }
.turn { margin-top: 8px; font-size: 13.5px; color: #cbe7e1; }

/* ---------- Intake wizard ---------- */
.step-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.dot-ind { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: background 0.2s, transform 0.2s; }
.dot-ind.active { background: var(--mint); box-shadow: 0 0 8px var(--mint); transform: scale(1.2); }

.step { text-align: center; }
.step-hidden { display: none; }
.step-eyebrow { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mint); font-weight: 700; margin-bottom: 10px; }
.step-q { font-size: 26px; color: var(--white); margin: 0 0 22px; font-weight: 700; line-height: 1.3; }

.big-input {
  width: 100%; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border);
  font-size: 22px; background: rgba(10, 42, 48, 0.55); color: var(--white); text-align: center;
}
.big-input:focus { outline: none; border-color: var(--mint); box-shadow: var(--glow); }
select.big-input { font-size: 17px; text-align: left; appearance: none; }
select.big-input option { background: #0b3a42; }

.step-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.step-actions .btn { flex: 1; max-width: 220px; }
.step-next.btn-block { margin-top: 24px; }

/* ---------- Avatar ---------- */
.avatar-wrap { display: flex; justify-content: center; padding: 10px 0 6px; }
.avatar-ring {
  width: 200px; height: 200px; border-radius: 50%; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow 0.3s;
}
.avatar-ring::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(127, 221, 190, 0.25); pointer-events: none;
}
.avatar-ring.idle { animation: breathe 3.5s ease-in-out infinite; box-shadow: 0 0 30px rgba(127,221,190,0.18); }
.avatar-ring.speaking { animation: speakPulse 0.9s ease-in-out infinite; box-shadow: 0 0 55px rgba(127,221,190,0.55); }
.avatar-ring.listening { box-shadow: 0 0 45px rgba(255,107,94,0.5); }
.avatar-ring.listening::after { border-color: rgba(255,107,94,0.5); animation: ringSpin 2.5s linear infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes speakPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes ringSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.avatar-face { width: 100%; height: 100%; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.4)); }
#mouth { transition: d 0.05s linear; }

/* ---------- Interview controls ---------- */
.control-row { display: flex; justify-content: center; margin-top: 26px; }
.control-row .btn { min-width: 220px; }
.control-row-double { gap: 14px; }
.control-row-double .btn { min-width: 160px; }

/* ---------- Error reporting ---------- */
.report-row { text-align: center; margin-top: 10px; }
.btn-small { padding: 7px 14px; font-size: 12.5px; }
.btn-small.reported { color: var(--mint); border-color: var(--mint); cursor: default; }

/* ---------- Volume/duration meter ---------- */
.level-meter-wrap { max-width: 320px; margin: 14px auto 0; }
.level-meter-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; border: 1px solid rgba(127,221,190,0.15); }
.level-meter-fill { height: 100%; width: 0%; border-radius: 6px; transition: width 0.08s linear, background 0.15s; background: var(--mint); }
.level-meter-fill.level-low { background: #ff9b6b; }
.level-meter-row { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: #9fc9c2; }
#levelMeterHint { color: #ff9b6b; font-weight: 600; }
