:root {
  --bg: #0f1114;
  --panel: #171a1f;
  --raised: #20242b;
  --line: #2c313a;
  --text: #f2f3f5;
  --muted: #9aa1ad;
  --accent: #ff140f;
  --ok: #3ecf8e;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
[hidden] { display: none !important; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 24px 0 6px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
p { margin: 0 0 12px; }
a { color: inherit; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.card-screen { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.card { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 32px; }
.plain { padding-left: 18px; margin: 0 0 12px; }
.plain li { margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 14px; }
.notice { background: #3a2a10; border: 1px solid #7a5a1c; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.error { color: #ff8f8c; margin-top: 12px; }
.check { display: flex; gap: 10px; align-items: center; margin: 20px 0 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

button { font: inherit; font-weight: 600; border-radius: 8px; padding: 12px 20px; cursor: pointer; border: 1px solid transparent; }
button.primary { background: var(--accent); color: #fff; width: 100%; }
button.primary:disabled { opacity: .4; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
button.secondary:hover { background: var(--raised); }

/* Live session: prototype on the left, interviewer panel on the right. */
#live { display: flex; height: 100vh; }
#prototype { flex: 1; min-width: 0; height: 100%; border: 0; background: #fff; }
#panel { width: 340px; flex: none; display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--panel); border-left: 1px solid var(--line); }

.face { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; flex: none; }
.face video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.rec { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.65); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.4s infinite; }
.rec b { font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes blink { 50% { opacity: .25; } }

.mic { flex: none; }
.meter { height: 4px; background: var(--raised); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }
#heard { margin: 8px 0 0; font-size: 13px; color: var(--muted); min-height: 39px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

#prompts { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.prompt { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.prompt.current { color: var(--text); font-size: 18px; line-height: 1.35; font-weight: 600; border-color: var(--accent); animation: arrive 1.6s ease-out; }
@keyframes arrive { 0% { box-shadow: 0 0 0 0 rgba(255,20,15,.7); transform: translateY(6px); opacity: 0; } 30% { transform: none; opacity: 1; } 100% { box-shadow: 0 0 0 14px rgba(255,20,15,0); } }
.panel-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }
#end-row button { width: 100%; }
button.quiet { background: none; border: 0; padding: 4px 8px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: underline; }
button.quiet:hover { color: var(--text); }
#end-confirm { border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; font-size: 14px; }
#end-confirm p { margin-bottom: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair button { padding: 9px 8px; font-size: 14px; }
button.danger { border-color: var(--accent); color: #ff8f8c; }

/* Review pages */
body.review { padding: 32px 24px; }
.wrap { max-width: 1280px; margin: 0 auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr.row { cursor: pointer; }
tr.row:hover { background: var(--panel); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.two video { width: 100%; border-radius: 10px; background: #000; }
.timeline { max-height: 78vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.line:hover { background: var(--panel); }
.line time { color: var(--muted); font-variant-numeric: tabular-nums; }
.line.asked { background: var(--raised); font-weight: 600; }
.line.asked span::before { content: "Asked: "; color: var(--accent); }
.line.asked.question span::before { content: "Designer question: "; }
.line.page { color: var(--muted); font-size: 13px; }
.line.page span::before { content: "Went to "; }
.line.active { outline: 1px solid var(--accent); }
.meta { color: var(--muted); margin-bottom: 20px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

/* Researcher page */
.wrap.narrow { max-width: 900px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 8px 0; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-color: var(--accent); }
a.button { display: inline-block; text-decoration: none; font-weight: 600; border-radius: 8px; padding: 10px 18px; background: var(--accent); color: #fff; }
button.inline { width: auto; }
button.small { padding: 6px 12px; font-size: 13px; }
form.study { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-weight: 600; font-size: 14px; }
.field small, .question small { color: var(--muted); font-size: 13px; }
input[type="text"], input[type="number"], input[type="date"], textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; color-scheme: dark; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.questions { display: flex; flex-direction: column; gap: 8px; }
.question { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.question.fixed { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.pitch { display: flex; flex-direction: column; gap: 8px; }
.pitch .hint { margin: 8px 0 0; }
form.study > button { align-self: flex-start; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.ready { margin-top: 12px; }
.status { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; margin-bottom: 8px; }
.status.ok { border-left: 3px solid var(--ok); }
.status.warn { border-left: 3px solid #f0c860; }
.linkrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .three { grid-template-columns: 1fr; } .question { grid-template-columns: 1fr; } .head { flex-wrap: wrap; } }
