:root {
  --bg: #0b0d12;
  --panel: #131722;
  --panel-2: #1a1f2e;
  --ink: #e7ecf3;
  --muted: #8b96a8;
  --accent: #6ea8fe;
  --accent-2: #9b8cff;
  --ok: #5ad19a;
  --line: #232a3a;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0e1119, #0b0d12);
}
.brand { font-weight: 700; letter-spacing: .3px; }
.brand span { color: var(--accent); font-weight: 600; }
.archetype {
  font-size: 13px; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
}
.archetype b { color: var(--accent-2); }

.layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 18px;
  padding: 18px; max-width: 1240px; margin: 0 auto; height: calc(100% - 58px);
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; height: auto; } }

.convo { display: flex; flex-direction: column; min-height: 0; }
.stage-pill {
  align-self: flex-start; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; margin-bottom: 12px;
}

.transcript {
  flex: 1; overflow-y: auto; padding: 6px 4px; min-height: 320px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg { max-width: 82%; padding: 12px 14px; border-radius: var(--radius); line-height: 1.5; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--accent); color: #06101f; }
.msg.assistant { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); }
.msg.system { align-self: center; color: var(--muted); font-size: 13px; background: transparent; }

/* Interviewer voice picker — male/female, both Australian. The chosen option
   carries .is-selected; the choice is sent with each live-voice turn. */
.voice-picker {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
}
.voice-picker-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-right: 4px;
}
.voice-opt {
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel-2); color: var(--muted);
  padding: 6px 14px; cursor: pointer; font: inherit; font-size: 13px;
  transition: border-color .15s, color .15s, background .15s;
}
.voice-opt small { color: var(--muted); font-size: 10px; letter-spacing: .5px; margin-left: 3px; }
.voice-opt:hover { border-color: var(--accent); }
.voice-opt.is-selected {
  color: var(--ink); border-color: var(--accent); background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.voice-opt.is-selected small { color: var(--accent); }

.composer {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
  margin-top: 14px; align-items: end;
}
.composer textarea {
  resize: none; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; font: inherit;
}
.mic, .send, .cta {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel-2); color: var(--ink); padding: 12px 16px; cursor: pointer; font: inherit;
}
.mic { font-size: 20px; line-height: 1; }
.mic.live { background: #3a1320; border-color: #6e2238; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,60,90,.5);} 50% { box-shadow: 0 0 0 8px rgba(220,60,90,0);} }
.send { background: var(--accent); color: #06101f; font-weight: 600; border: none; }
.send:disabled, .cta:disabled { opacity: .5; cursor: not-allowed; }
.statusline { min-height: 18px; margin-top: 8px; color: var(--muted); font-size: 13px; }

/* Visuals pane — the interviewer pulls up a website or image search to clarify
   what you mean; results render here, pushed over the live voice channel. */
.visuals {
  margin-top: 12px; padding: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 10px;
}
.visuals img { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); }
.visuals a { color: var(--accent); font-size: 13px; text-decoration: none; }
.visuals a:hover { text-decoration: underline; }

.rail { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: .3px; }

.principles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.principles li { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.principles li.done { color: var(--ink); }
.principles li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; margin-top: 4px; }
.principles li.done .dot { background: var(--ok); }

.profile { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.profile b { color: var(--ink); }

.team { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.emp {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer;
  background: var(--panel-2); transition: border-color .15s;
}
.emp:hover { border-color: var(--accent); }
.emp .name { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.emp .one { font-size: 12px; color: var(--muted); margin-top: 3px; }
.emp .badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.emp.built .badge { color: #06101f; background: var(--ok); border: none; }
.emp.building .badge { color: var(--accent); }
.cta { width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #06101f; font-weight: 700; border: none; }

/* "Build my whole team" — the headline path, sits above the per-employee grid. */
#buildAll { margin-bottom: 12px; }

/* Live per-step progress of the async whole-team build. */
.build-progress { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.bstep { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.bstep .bdot { flex: none; width: 14px; text-align: center; color: var(--line); }
.bstep .blabel { flex: 1; }
.bstep.running { color: var(--ink); }
.bstep.running .bdot { color: var(--accent); animation: spin 1.4s linear infinite; display: inline-block; }
.bstep.done { color: var(--ink); }
.bstep.done .bdot { color: var(--ok); }
.bstep.error { color: #f3a0a0; }
.bstep.error .bdot { color: #e05a6e; }
.bstep .berr { font-size: 11px; color: #f3a0a0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pre-interview intake form — short questionnaire that warms up the four
   employee buckets before the voice session. All fields optional. Collapses
   with a brief transition after submit or skip. */
.intake-lead { font-size: 13px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.intake-form { display: flex; flex-direction: column; gap: 10px; }
.intake-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.intake-form input, .intake-form textarea {
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px;
  transition: border-color .15s;
}
.intake-form input:focus, .intake-form textarea:focus {
  border-color: var(--accent); outline: none;
}
.intake-form textarea { resize: vertical; min-height: 48px; }
.intake-actions { display: flex; gap: 8px; margin-top: 4px; }
.cta.subtle { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.cta.subtle:hover { border-color: var(--accent); color: var(--ink); }
