/* A meeting-room look: dark, rounded tiles, one accent colour. Familiar on
   purpose — practising in something that feels like the real call is the point. */

:root {
  --bg: #1f1f1f;
  --surface: #292929;
  --surface-2: #333333;
  --line: #3d3d3d;
  --text: #f3f2f1;
  --muted: #9a9a9a;
  --accent: #5b5fc7;
  --accent-soft: rgba(91, 95, 199, .18);
  --good: #6bb700;
  --warn: #f8a800;
  --bad: #c4314b;
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, "Segoe UI", BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin: 22px 0 10px; }
h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11.5px; }

.screen { min-height: 100vh; padding: 24px 16px; }
.card {
  max-width: 980px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 26px;
}
.card.narrow { max-width: 380px; margin-top: 14vh; }

button { font: inherit; cursor: pointer; }
.primary {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 10px 18px; font-weight: 600;
}
.primary.big { padding: 13px 26px; font-size: 16px; }
.primary:hover { filter: brightness(1.1); }
.ghost {
  background: transparent; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 15px; font-weight: 500;
}
.ghost.small { padding: 4px 10px; font-size: 12px; }
.ghost:hover { background: var(--surface-2); }

input[type=password], input[type=text], textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font: inherit; resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 24px; }
.msg { font-size: 12.5px; color: var(--muted); }
.msg.ok { color: var(--good); }
.msg.bad { color: var(--bad); }
.note {
  font-size: 12.5px; color: var(--muted); margin-top: 14px;
  border-left: 2px solid var(--line); padding-left: 11px;
}

.file-btn {
  display: inline-block; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 15px; font-size: 13.5px;
}
.file-btn:hover { border-color: var(--accent); }

.setup-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .setup-grid { grid-template-columns: 1fr 1fr; gap: 34px; } }

.choices { display: grid; gap: 8px; }
.choice {
  text-align: left; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px;
  font-weight: 600; font-size: 14px;
}
.choice small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.choice.active { border-color: var(--accent); background: var(--accent-soft); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; margin-top: 12px; color: #ddd; }
.check input { margin-top: 3px; accent-color: var(--accent); }

/* ---------- the meeting ---------- */
.meeting {
  display: flex; flex-direction: column; height: 100vh; padding: 0;
  overflow: hidden;
}
.meeting-bar {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.meeting-title { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--bad);
  box-shadow: 0 0 0 4px rgba(196,49,75,.18);
}

.stage {
  flex: 1 1 auto; display: grid; gap: 12px; padding: 14px 18px; min-height: 0;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .stage { grid-template-columns: 1.5fr 1fr; } }
.panel-tiles { display: grid; gap: 12px; min-height: 0; }
@media (min-width: 560px) { .panel-tiles { grid-template-rows: 1fr 1fr; } }
.panel-tiles .tile { min-height: 120px; }
.panel-tiles .avatar { width: 64px; height: 64px; font-size: 21px; }

.tile {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden; min-height: 180px;
}
.tile.speaking { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.avatar {
  width: 92px; height: 92px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; font-size: 30px; font-weight: 700; letter-spacing: 1px;
}
.tile-name {
  position: absolute; left: 12px; bottom: 11px; font-size: 13px; font-weight: 600;
  background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 6px;
  display: flex; align-items: center; gap: 7px;
}
.tile-sub { position: absolute; right: 12px; bottom: 13px; font-size: 11.5px; color: var(--muted); }
.speaking-pill, .mic-pill {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
  background: var(--accent); padding: 1px 6px; border-radius: 20px;
}
.mic-pill { background: var(--bad); }
.tile.self video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.no-camera { position: absolute; color: var(--muted); font-size: 13px; }

.captions {
  flex: 0 0 auto; padding: 12px 18px; border-top: 1px solid var(--line);
  background: var(--surface); max-height: 34vh; overflow-y: auto;
}
.caption-question { font-size: 16px; font-weight: 600; line-height: 1.45; }
.caption-answer {
  margin-top: 9px; font-size: 14.5px; color: #d6d6d6; white-space: pre-wrap;
  min-height: 1.4em;
}
.caption-answer .interim { color: var(--muted); }

.controls {
  flex: 0 0 auto; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
.ctrl {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px 18px; font-weight: 600; font-size: 14px;
}
.ctrl:hover { background: #3d3d3d; }
.ctrl.active { background: var(--bad); border-color: var(--bad); color: #fff; }
.ctrl.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ctrl.danger { background: transparent; border-color: var(--bad); color: #ff8ea0; }
.ctrl:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- feedback ---------- */
.coach-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(430px, 92vw); z-index: 20;
  background: var(--surface); border-left: 1px solid var(--line);
  padding: 18px; overflow-y: auto;
  box-shadow: -14px 0 40px rgba(0,0,0,.4);
}
.coach-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.score-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.score { font-size: 32px; font-weight: 700; line-height: 1; }
.score.s1, .score.s2 { color: var(--bad); }
.score.s3 { color: var(--warn); }
.score.s4, .score.s5 { color: var(--good); }
.verdict { font-size: 14.5px; font-weight: 600; }

.block { margin-top: 16px; }
.block h4 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); margin: 0 0 7px;
}
.block ul { margin: 0; padding-left: 18px; }
.block li { margin-bottom: 6px; font-size: 13.5px; }
.quote {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 11px 13px; font-size: 13.5px; line-height: 1.5;
}
.star-row { display: flex; gap: 6px; flex-wrap: wrap; }
.star-chip {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  padding: 3px 9px; border-radius: 20px; background: rgba(196,49,75,.16); color: #ff8ea0;
}
.star-chip.yes { background: rgba(107,183,0,.16); color: #a8d84f; }

.pill {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 8px; border-radius: 20px;
  background: var(--accent-soft); color: #aeb1ff; margin-left: 8px;
}

table.history { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.history td, table.history th {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line);
}
table.history th { color: var(--muted); font-weight: 500; font-size: 12px; }

.vignette {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px; line-height: 1.6;
}
.answer-review { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.answer-review .said { color: #d6d6d6; font-size: 13.5px; white-space: pre-wrap; margin: 8px 0; }

/* The model answer: a long read, so it gets more room to breathe than a quote,
   and the bits she has to supply herself are marked rather than explained. */
.quote.model { line-height: 1.65; padding: 14px 16px; border-left-color: var(--good); }
.gap {
  background: rgba(248, 168, 0, .18); color: #ffce6b;
  border-bottom: 1px dashed rgba(248, 168, 0, .5);
  padding: 0 3px; border-radius: 3px;
}
.gap-note { font-size: 12px; color: var(--muted); margin: 7px 0 0; }

/* Interview length: a small segmented switch above the session choices. */
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.segmented button {
  background: var(--surface-2); color: var(--muted); border: none; padding: 7px 14px;
  font-size: 13px; font-weight: 600; border-right: 1px solid var(--line);
}
.segmented button:last-child { border-right: none; }
.segmented button.active { background: var(--accent-soft); color: var(--text); }

.meeting-title .over { color: var(--warn); font-weight: 600; }

/* Readiness: the dial on the left, what it is made of on the right. */
.readiness {
  display: grid; gap: 18px; align-items: center; margin: 18px 0 22px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
}
@media (min-width: 720px) { .readiness { grid-template-columns: 220px 1fr; } }
.readiness-dial { position: relative; text-align: center; }
.gauge { width: 100%; max-width: 220px; display: block; margin: 0 auto; }
.readiness-score { margin-top: -6px; }
.readiness-score b { font-size: 30px; }
.readiness-score span { color: var(--muted); font-size: 14px; }
.readiness-band { font-weight: 700; font-size: 15px; }
.readiness-more { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.checks li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; }
.checks li small { display: block; color: var(--muted); font-size: 12px; }
.checks .tick { width: 18px; flex: 0 0 18px; color: var(--muted); font-weight: 700; }
.checks li.ok .tick { color: var(--good); }
.next { margin-top: 12px; font-size: 13.5px; border-left: 3px solid var(--accent); padding-left: 10px; }
.history { margin-top: 12px; }
.history-bars { display: flex; align-items: flex-end; gap: 5px; height: 42px; }
.history-bars span { width: 16px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.history small { color: var(--muted); font-size: 11.5px; }

/* Repeats: a small marker on the question line, and the before/after in feedback. */
.repeat-pill {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; background: rgba(248,168,0,.16); color: #ffce6b;
}
.since { background: var(--surface-2); border-radius: var(--radius); padding: 11px 13px; }
.since-scores { display: flex; align-items: baseline; gap: 8px; }
.since-scores .score { font-size: 24px; }
.since-scores .arrow { color: var(--muted); }
.since-word { font-weight: 600; font-size: 13px; color: var(--muted); }
.since p { margin: 8px 0 0; font-size: 13.5px; }

.mini-list { margin-top: 14px; }
.mini-list h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin: 0 0 6px; }
.mini-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.mini-list li { font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.trail { font-weight: 700; white-space: nowrap; color: var(--good); }
.score-dot {
  flex: 0 0 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; background: rgba(196,49,75,.2); color: #ff8ea0;
}
.score-dot.s3 { background: rgba(248,168,0,.18); color: #ffce6b; }

/* Home */
.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.home-head .muted { margin: 0; }
.nav-row { margin-bottom: 10px; }
.table-wrap { overflow-x: auto; }
table.history tr.clickable { cursor: pointer; }
table.history tr.clickable:hover td { background: var(--surface-2); }
.model-details { margin-top: 8px; font-size: 13px; }
.model-details summary { cursor: pointer; color: #aeb1ff; font-weight: 600; }
.model-details .quote { margin-top: 8px; }

/* Her extra documents, one per line. */
.doc-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.doc-list li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px 6px 11px;
}
.doc-list .doc-name { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* Questions arrive as chat messages, as the letter says they will. */
.chat-msg {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px;
  padding: 9px 13px; font-size: 15.5px; font-weight: 600; line-height: 1.45; max-width: 860px;
}
.chat-msg + .chat-msg { margin-top: 8px; border-color: var(--accent); }
.chat-msg.faded { opacity: .55; font-size: 13.5px; font-weight: 500; }
.chat-from { font-size: 11.5px; font-weight: 700; color: #aeb1ff; margin-bottom: 3px; }
.chat-from span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.think-timer {
  display: inline-block; margin-bottom: 8px; font-size: 12.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; background: rgba(248,168,0,.16); color: #ffce6b;
}
.followup-line { font-size: 13px; color: #aeb1ff; margin-top: 6px; }

/* The research paper box in setup. */
.paper-box {
  margin-top: 16px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.paper-box h4 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.paper-status { font-size: 13.5px; margin-bottom: 9px; }
.paper-status .muted { font-size: 12px; }
.ok-dot { color: var(--good); font-weight: 700; }
#paper-pick {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font: inherit; font-size: 13px; max-width: 100%;
}
