/* ── layout shell ────────────────────────────────────────── */
/* Two columns: the .deck (chat/goals) and the .roster-rail, side by side,
   full-bleed. .deck keeps its own internal column layout + max-width so it
   doesn't stretch edge-to-edge on a wide monitor even though the shell is. */
.studio-layout {
  display: flex;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}
.deck {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100vh;
  max-width: 820px;
  margin: 0 auto;
}

/* ── top bar ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--divider);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.wordmark .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); display: inline-block;
}
.title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: 1;
}
/* Real pill, not colored text — dot + tinted background + border, matching the
   Figma reference's status/LIVE badges (HQ_app/.../albertistudios_figma/src/App.tsx). */
.live {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.live.on {
  color: var(--green);
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.live.on::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
.live.off {
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── event feed ──────────────────────────────────────────── */
.feed {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: rise 0.18s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.card .tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.card .body { color: var(--text); line-height: 1.35; }
.feed-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  text-align: center;
  font-size: 0.9rem;
}

.card.utterance { border-left-color: var(--text-faint); }
.card.goal      { border-left-color: var(--purple); }
.card.assigned  { border-left-color: var(--green); }
.card.rejected  { border-left-color: var(--red); }
.card.synthesis { border-left-color: var(--gold); }
.card.task      { border-left-color: var(--blue); }
.card.failed    { border-left-color: var(--red); }

/* ── composer ────────────────────────────────────────────── */
.composer {
  display: flex;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--divider);
}
.utterance {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
}
.utterance::placeholder { color: var(--text-faint); }
.utterance:focus { outline: none; border-color: var(--gold); }
.send {
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0 1.1rem;
  cursor: pointer;
}
.send:hover { background: var(--gold-hover); }

/* ── auth-rejected banner ────────────────────────────────── */
.auth-banner {
  background: #3a1414;
  color: var(--text);
  border-bottom: 1px solid var(--red);
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

/* ── goals & tasks spine (Chapter 6, first slice) ───────────── */
.goals-spine {
  border-bottom: 1px solid var(--divider);
  padding: 0.6rem 1.25rem;
  max-height: 220px;
  overflow-y: auto;
}
.goals-spine-label {
  color: var(--text-faint);
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.goals-spine-empty { color: var(--text-faint); font-size: 0.8rem; }
.goal-row { margin-bottom: 0.5rem; }
.goal-row-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.goal-item {
  font-size: 0.75rem;
  padding-left: 0.7rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.goal-item .status {
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}
.goal-item .status.written {
  color: var(--green);
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.goal-item .status.proposed {
  color: var(--gold);
  background: var(--gold-tint, rgba(233, 188, 88, 0.1));
  border: 1px solid rgba(233, 188, 88, 0.3);
}

/* ── context panel: deliverables + notes (Chapter 6, last piece) ─────────── */
.context-panel {
  border-bottom: 1px solid var(--divider);
  padding: 0.6rem 1.25rem;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.75rem;
}
.context-panel-label {
  color: var(--text-faint);
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.context-panel-empty { color: var(--text-faint); }
.context-group-label {
  color: var(--blue);
  font-weight: 600;
  margin: 0.4rem 0 0.15rem;
}
.context-row { color: var(--text-muted); padding-left: 0.5rem; }

/* ── roster rail ─────────────────────────────────────────── */
.roster-rail {
  width: 220px;
  overflow-y: auto;
  border-left: 1px solid var(--divider);
  padding: 0.75rem;
  font-size: 0.75rem;
  background: var(--surface);
}
.roster-rail-label {
  color: var(--text-faint);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.roster-division {
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--divider);
}
.roster-division:last-child { border-bottom: none; }
.roster-division-label {
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.roster-agent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  color: var(--text-muted);
}
/* AgentAvatar port — tinted circle, division color, initials. */
.roster-agent-avatar {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
}
