:root {
  font: 15px/1.55 "Avenir Next", "Inter", system-ui, sans-serif;
  color-scheme: dark;
  --ink:#edf2ed;
  --quiet:#a7b4ae;
  --line:#293b35;
  --panel:#121e1a;
  --field:#0c1512;
  --accent:#d5f987;
  --accent-ink:#17230b;
  --mono:"IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  color:var(--ink);
  background:#0b1310;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; min-width:320px; }
button,input,select,textarea { font:inherit; }
button,select,summary { cursor:pointer; }
button {
  border:1px solid #395046; border-radius:8px; padding:.53rem .85rem;
  background:#182721; color:var(--ink); font-weight:620; white-space:normal;
}
button:disabled { opacity:.44; cursor:default; }
button:not(:disabled):hover { border-color:#789584; background:#20352b; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,canvas:focus-visible,summary:focus-visible {
  outline:2px solid var(--accent); outline-offset:3px;
}
button.primary { color:var(--accent-ink); background:var(--accent); border-color:var(--accent); }
button.primary:not(:disabled):hover { background:#e5ffaf; border-color:#e5ffaf; }
input,select,textarea {
  width:100%; border:1px solid #34473e; border-radius:8px; padding:.57rem .65rem;
  background:var(--field); color:var(--ink);
}
input::placeholder, textarea::placeholder { color:#879990; }
textarea { resize:vertical; }
label { display:grid; gap:5px; color:var(--ink); font-size:13px; font-weight:650; }
form { display:grid; gap:12px; }
form button { justify-self:start; }
h1,h2,h3,p { margin:0; }
h1 { font-size:clamp(35px,4.1vw,60px); line-height:1.05; letter-spacing:-.055em; }
h2 { font-size:20px; font-weight:680; line-height:1.3; letter-spacing:-.024em; }
h3 { font-size:15px; }
p { color:var(--quiet); }
.muted { color:var(--quiet); font-size:13px; }
.top {
  min-height:64px; display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:0 clamp(16px,3vw,46px); background:#101b17; border-bottom:1px solid var(--line);
}
.identity,.header-tools,.room-actions,.form-actions { display:flex; align-items:center; gap:10px; }
.identity { color:#f1f6ef; font-size:16px; font-weight:700; letter-spacing:-.02em; }
.brand-icon {
  display:grid; place-items:center; width:33px; height:33px;
  border:1px solid #799258; border-radius:8px; background:#1d2d17; color:var(--accent);
  font:700 17px/1 var(--mono);
}
.header-tools { flex-wrap:wrap; justify-content:flex-end; }
#mode,.scene-status,.scene-orbit,.section-kicker { font:600 11px/1.35 var(--mono); letter-spacing:.065em; }
#mode {
  display:inline-flex; align-items:center; gap:7px; padding:6px 9px; border:1px solid #365044; border-radius:6px;
  background:#13221a; color:#c1cfbc;
}
#mode:empty { display:none; }
#mode::before,.scene-status::before {
  content:""; display:inline-block; width:6px; height:6px; flex:none; border-radius:50%;
  background:var(--accent); box-shadow:0 0 8px #b9df7866;
}
main { max-width:1760px; margin:auto; }
.card { min-width:0; padding:20px; border:1px solid var(--line); border-radius:13px; background:var(--panel); }
.welcome {
  min-height:calc(100svh - 65px); display:grid; grid-template-columns:minmax(0,1fr) minmax(270px,380px);
  align-content:center; align-items:center; gap:8vw; padding:clamp(26px,8vw,120px);
  background:radial-gradient(ellipse at 70% 42%,#1a342a 0%,transparent 48%),
    repeating-linear-gradient(90deg,#344f4020 0px,#344f4020 1px,transparent 1px,transparent 52px),
    repeating-linear-gradient(0deg,#344f4020 0px,#344f4020 1px,transparent 1px,transparent 52px);
}
.section-kicker { color:var(--accent); margin-bottom:14px; text-transform:uppercase; }
#pilot-offer { margin-top:26px; max-width:480px; border-top:1px solid #3d5547; padding-top:16px; }
#pilot-price { display:flex; align-items:baseline; gap:8px; }
#pilot-price strong { font-size:36px; color:var(--accent); }
#pilot-price span { color:var(--quiet); font-size:14px; letter-spacing:0; }
#pilot-offer ul { display:grid; gap:6px; padding-left:20px; margin:10px 0; }
#pilot-offer li::marker { color:var(--accent); }
.welcome-copy h1 { max-width:690px; font-size:clamp(52px,7.7vw,112px); line-height:.94; }
.welcome-copy > p:not(.section-kicker) { max-width:480px; margin-top:22px; font-size:clamp(16px,1.6vw,21px); }
.welcome-access { padding:30px; box-shadow:0 22px 70px #050b0a70; }
.welcome-access h2 { margin-bottom:8px; }
.workspace { display:grid; min-height:calc(100vh - 65px); grid-template-columns:216px minmax(0,1fr); }
.sidebar {
  border-right:1px solid var(--line); padding:24px 14px; background:#0f1915;
}
.aside-head,.room-header,.project-head,.section-head,.upgrade {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.aside-head h2 { font-size:15px; letter-spacing:0; }
#new-project { padding:.15rem .5rem; }
#projects { display:grid; gap:6px; margin:15px 0 25px; }
#projects button {
  text-align:left; padding:.56rem .65rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  border-color:transparent; background:transparent;
}
#projects button[aria-current="true"] { color:var(--accent); border-color:#3d5438; background:#1d3024; }
.persona-tools { display:grid; gap:6px; margin-bottom:15px; }
#custom-personas { margin:12px 0; }
.persona-library-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:10px 0; border-bottom:1px solid var(--line); }
.persona-library-row div { flex:1 1 120px; overflow-wrap:anywhere; }
#allowance { padding-top:13px; border-top:1px solid var(--line); line-height:1.65; }
.content { min-width:0; padding:clamp(16px,2.5vw,38px); }
.project-head { margin-bottom:24px; }
.project-head p { margin-top:8px; overflow-wrap:anywhere; }
.project-head button { flex:none; }
.tabs { display:flex; gap:12px; border-bottom:1px solid var(--line); margin-bottom:17px; }
.tabs button { border:0; border-radius:0; background:transparent; padding:10px 12px; color:var(--quiet); }
.tabs button[aria-pressed="true"] { box-shadow:inset 0 -2px var(--accent); color:var(--accent); }
.interview-layout { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(230px,1fr); gap:15px; align-items:start; }
.room-card { padding:16px; }
.room-header { gap:14px; }
.room-header label { display:flex; align-items:center; gap:8px; color:var(--quiet); }
#room-persona-slot { margin-top:12px; }
.interview-progress {
  margin-top:12px; padding:10px 12px; border:1px solid #365343; border-left:3px solid var(--accent);
  border-radius:7px; background:#192c22;
}
.interview-progress p { margin-top:2px; font-size:13px; }
.interview-progress[data-state="working"] { border-left-color:#f8d08a; }
.interview-progress[data-state="attention"] { border-left-color:#f8d08a; }
#room-persona-slot label { display:flex; align-items:center; gap:8px; }
#room-persona-slot select { width:min(100%,260px); }
.setup-heading { margin:8px 0 14px; }
.setup-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.setup-cards h3,.setup-debate h3 { font-size:17px; }
.setup-cards h3+p,.setup-debate h3+p { margin-top:6px; }
#setup-persona-slot,#setup-goal,.setup-cards label { margin-top:12px; }
.setup-cards label { display:block; }
#interviewer-guidance,.setup-cards label + p { margin-top:6px; }
.setup-debate { margin-top:14px; }
.setup-launch { margin-top:20px; }
.setup-launch > h3 { margin-bottom:8px; }
.launch-option { display:flex; flex-direction:column; align-items:flex-start; }
.launch-option p { flex:1; }
.launch-option button { margin-top:14px; }
#setup-status { margin-top:8px; }
#setup-tour {
  position:fixed; inset:0; width:100%; height:100%; max-width:none; max-height:none; margin:0;
  padding:0; border:0; border-radius:0; background:transparent; overflow:hidden; pointer-events:none;
}
#setup-tour::backdrop { background:transparent; }
#tour-spotlight { position:absolute; border:2px solid var(--accent); border-radius:10px; box-shadow:0 0 0 200vmax #050a08c9; }
#tour-card {
  position:absolute; width:min(350px,calc(100% - 24px)); overflow:auto; pointer-events:auto;
  border:1px solid #567060; border-radius:12px; padding:16px 18px;
  background:var(--panel); box-shadow:0 14px 44px #050a0899;
}
#setup-tour #tour-title { margin:.3rem 0 .55rem; }
#setup-tour .form-actions { margin-top:20px; flex-wrap:wrap; }
.scene {
  position:relative; isolation:isolate; aspect-ratio:1.68; min-height:290px; max-height:530px;
  border:1px solid #466052; border-radius:9px; overflow:hidden; margin:14px 0;
  background:#15281f;
}
.scene canvas { display:block; width:100%; height:100%; position:absolute; inset:0; touch-action:none; cursor:grab; }
#room-cue {
  position:absolute; inset:0; z-index:2; display:grid; place-items:center; pointer-events:none;
  background:radial-gradient(ellipse at center,#0b1a14d9 0%,#0b1a1470 60%,#0b1a1433 100%);
  color:var(--accent); text-shadow:0 2px 16px #080e0b;
  font:800 clamp(48px,9vw,105px)/1 var(--mono); letter-spacing:.05em;
}
.scene canvas:active { cursor:grabbing; }
.viewport-labels { position:absolute; inset:10px 11px auto; display:flex; gap:8px; justify-content:space-between; pointer-events:none; }
.scene-status,.scene-orbit {
  display:flex; align-items:center; gap:8px; min-width:0; padding:5px 8px;
  color:#e5f1e7; background:#0d1917eb; border:1px solid #618172; border-radius:4px;
}
.scene-status[data-state="working"]::before { background:#f8d08a; box-shadow:0 0 8px #f8d08a80; }
.scene-orbit { color:#b3cbbd; }
#scene-caption {
  padding:12px 14px; overflow-wrap:anywhere;
  color:#edf5ed; background:#0d1917; border:1px solid #618172; border-radius:6px;
}
#scene-caption strong { color:var(--accent); }
#scene-caption p { margin:4px 0 0; color:inherit; }
.room-actions { flex-wrap:wrap; }
#debate-settings { margin-block:14px 8px; }
.personas-checklist { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:8px; }
.personas-checklist label { display:flex; align-items:center; gap:6px; }
.personas-checklist input { width:auto; }
#step-in { border-top:1px solid var(--line); padding-top:14px; margin-top:14px; }
.transcript-card { display:flex; flex-direction:column; max-height:735px; min-height:245px; padding:16px; }
.transcript-head { flex:none; padding-bottom:14px; border-bottom:1px solid var(--line); }
.transcript-head p { margin-top:5px; }
#conversation { overflow:auto; overscroll-behavior:contain; }
#conversation > p { padding-top:13px; }
.line { margin-top:9px; border-left:2px solid #4b6c5e; padding:8px 10px; border-radius:0 6px 6px 0; background:#172720; }
.line.persona-line { border-color:#a6c870; background:#1a2d21; }
.line h3 { color:#e3eddd; font-weight:700; font-size:13px; }
.line p { margin:.24rem 0 0; overflow-wrap:anywhere; color:#c5d2c8; }
.line button { margin-top:8px; font-size:12px; padding:2px 8px; }
#conversation .turn,#findings article,#campaign-results article { padding:12px 0; border-bottom:1px solid var(--line); }
#findings,#campaign-results { margin-top:18px; }
blockquote { margin:.55rem 0; padding-left:10px; border-left:2px solid #73946c; overflow-wrap:anywhere; color:#b9c9bf; }
#campaign-form { grid-template-columns:1fr 1fr auto; align-items:end; margin:17px 0; }
#campaign-panel,#campaign-panel-empty { grid-column:1/-1; }
.persona-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); gap:10px; }
#persona-form details .persona-form-grid { margin-top:10px; }
.upgrade { background:#243722; border-color:#55704a; margin-bottom:17px; }
.project-settings { padding:15px 0; font-size:13px; color:var(--quiet); }
.project-settings p { margin:8px 0; }
.status {
  position:fixed; z-index:5; bottom:14px; left:50%; transform:translateX(-50%); width:max-content;
  max-width:calc(100% - 26px); padding:9px 16px; border:1px solid #64856e; border-radius:9px;
  color:var(--ink); background:#202e25; text-align:center; box-shadow:0 8px 30px #04090375;
}
.status:empty { display:none; }
dialog { width:min(490px,calc(100% - 28px)); padding:23px; color:var(--ink); background:var(--panel); border:1px solid #567060; border-radius:12px; }
dialog::backdrop { background:#050a08b5; }
#project-dialog { width:min(640px,calc(100% - 28px)); }
#project-empty p { margin:8px 0 14px; }
.research-goal { display:grid; gap:6px; }
.research-goal label { display:block; }
.research-goal label .muted { font-weight:400; }
.goal-examples { min-width:0; margin:0; padding:0; border:0; }
.goal-examples legend { padding:0; font-size:13px; font-weight:650; }
.goal-example-options { display:grid; gap:6px; margin-top:8px; }
.goal-example-options button { display:grid; gap:2px; width:100%; text-align:left; font-size:13px; }
.goal-example-options button span { color:var(--quiet); font-weight:400; }
.form-actions { justify-content:flex-end; }
#hosted-notice { margin-bottom:12px; }
@media (max-width:1060px) {
  .workspace { grid-template-columns:174px minmax(0,1fr); }
  .interview-layout,.setup-cards { grid-template-columns:1fr; }
  .transcript-card { max-height:470px; min-height:170px; }
}
@media (max-width:640px) {
  .top { padding:10px 13px; flex-wrap:wrap; }
  .header-tools { justify-content:flex-start; }
  .workspace,.welcome,#campaign-form { grid-template-columns:1fr; }
  .welcome { gap:25px; }
  .sidebar { border-right:0; border-bottom:1px solid var(--line); padding:12px; }
  #projects { display:flex; flex-wrap:wrap; margin:7px 0 12px; }
  #projects button { max-width:100%; }
  .content,.card { padding:13px; }
  .project-head,.section-head,.upgrade,.room-header { align-items:flex-start; flex-direction:column; }
  .room-header select { max-width:100%; }
  .scene { min-height:230px; aspect-ratio:1.35; }
  .scene-orbit { display:none; }
}

#persona-profile { margin:10px 0; color:var(--quiet); }
#persona-profile summary { cursor:pointer; }
#persona-profile-fields { display:grid; grid-template-columns:minmax(6rem,auto) 1fr; gap:6px 12px; margin:8px 0; font-size:13px; }
#persona-profile-fields dt { font-weight:600; }
#persona-profile-fields dd { margin:0; overflow-wrap:anywhere; }

#automatic-status { margin-top:8px; }
#automatic-progress { display:block; width:min(100%,360px); margin:12px 0; accent-color:var(--accent); }
.automatic-actions,#report-room { margin-top:12px; }

#interview-depth { margin:16px 0 0; padding:0; border:0; min-width:0; }
#interview-depth legend { padding:0; font-weight:700; }
.depth-options { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.depth-options label { display:flex; align-items:center; gap:8px; cursor:pointer; padding:8px 14px; border:1px solid var(--line); border-radius:7px; background:var(--field); }
.depth-options label:has(input:checked) { border-color:var(--accent); background:#223828; }
.depth-options input { width:auto; accent-color:var(--accent); }
.depth-options span { display:grid; }
.depth-options small { color:var(--quiet); font-weight:400; }

#voice-controls { margin-block:10px; }
#voice-controls label { display:flex; align-items:center; gap:8px; }
#voice-controls p { margin:4px 0 0; }
#voice-controls p:empty { display:none; }

.topic-bar { margin-bottom:16px; padding:14px 16px; }
.topic-bar .room-actions { align-items:end; }
.topic-bar select { min-width:min(240px,65vw); }
.topic-bar p { margin:6px 0 0; }
.material-library { margin-top:10px; display:flex; gap:8px 18px; flex-wrap:wrap; }
.material-library a { color:var(--accent); overflow-wrap:anywhere; }
.material-fields { border:1px solid var(--line); border-radius:8px; padding:10px; }
.material-fields p { margin:4px 0; }
.material-fields input[type="file"] { width:100%; }
.material-fields [data-existing-files] label { display:flex; align-items:center; gap:6px; overflow-wrap:anywhere; }
.material-fields [data-new-files] label { margin-block:6px; overflow-wrap:anywhere; }
.form-error { color:#ffd09c; }
.form-error:empty { display:none; }
