:root {
  --bg: #0b1020;
  --bg-soft: #121a32;
  --card: #1a2340;
  --card-soft: #212c4f;
  --line: #2a3660;
  --ink: #e6ecff;
  --muted: #9aa6d1;
  --accent: #7ab8ff;
  --accent-strong: #4d9bff;
  --live: #22d39a;
  --mock: #8a95c0;
  --warn: #ffb347;
  --danger: #ff6b6b;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: radial-gradient(ellipse at top, #15204a 0%, var(--bg) 70%); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; min-height: 100vh; }

.hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 32px 40px 12px 40px;
  max-width: 1320px; margin: 0 auto;
}
.hero h1 { margin: 6px 0 8px 0; font-size: 32px; letter-spacing: -0.01em; }
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: 11px; letter-spacing: 0.18em; }
.lede { color: var(--muted); max-width: 820px; line-height: 1.55; margin: 0; }
.hero-cta { display: flex; gap: 10px; }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); padding: 10px 16px; border-radius: 10px; font-size: 14px;
  cursor: pointer; transition: transform 80ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent-strong)); border-color: transparent; color: #0b1020; font-weight: 600; }
.btn.ghost { background: transparent; }

.pipeline {
  display: flex; align-items: stretch; gap: 12px; padding: 24px 40px;
  max-width: 1320px; margin: 0 auto; flex-wrap: wrap;
}
.arrow { color: var(--muted); align-self: center; font-size: 22px; }

.stage {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; min-width: 200px; box-shadow: var(--shadow);
  position: relative; transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.stage.agent { min-width: 300px; flex-direction: column; align-items: stretch; }
.stage.agent > .stage-body { display: flex; align-items: center; gap: 12px; }
.stage-icon { font-size: 26px; line-height: 1; }
.stage-title { font-weight: 600; font-size: 15px; }
.stage-sub { font-size: 12px; color: var(--muted); }
.stage-dot {
  position: absolute; top: 10px; right: 12px;
  width: 8px; height: 8px; border-radius: 50%; background: #3a4878;
  transition: background 200ms ease, box-shadow 200ms ease;
}
.stage.active { border-color: var(--accent); transform: translateY(-1px); }
.stage.active .stage-dot { background: var(--live); box-shadow: 0 0 0 6px rgba(34, 211, 154, 0.2); }
.stage.done .stage-dot { background: var(--accent); }
.stage-tag {
  position: absolute; bottom: 8px; right: 10px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.stage-tag.mock { background: #2a3660; color: var(--mock); }
.stage-tag.live { background: rgba(34, 211, 154, 0.15); color: var(--live); }

.sublets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.sublet {
  background: var(--card-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px; text-align: center; font-size: 11px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sublet.active { color: var(--live); border-color: var(--live); background: rgba(34, 211, 154, 0.08); }
.sublet.active span { filter: drop-shadow(0 0 4px rgba(34, 211, 154, 0.8)); }

.workbench {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 16px; padding: 8px 40px 24px 40px; max-width: 1320px; margin: 0 auto;
}
@media (max-width: 980px) { .workbench { grid-template-columns: 1fr; } }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; box-shadow: var(--shadow);
}
.panel-title { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 10px; }
.status { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.status.live { color: var(--live); border-color: var(--live); }

.transcript-body, .events-body {
  background: #0e1530; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; height: 320px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
}
.msg { margin-bottom: 8px; line-height: 1.45; }
.msg.agent { color: #a5d7ff; }
.msg.caller { color: #ffd8a7; }
.msg.meta { color: var(--muted); font-size: 12px; }
.msg .who { font-weight: 600; margin-right: 6px; }

.input-row { display: flex; gap: 8px; margin-top: 10px; }
.input-row input {
  flex: 1; background: var(--card-soft); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.input-row input:disabled { opacity: 0.6; }
.hint { color: var(--muted); font-size: 11px; margin-top: 6px; }
.hint.hint-warn { color: #c2410c; }

.readiness-banner {
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 16px;
}
.readiness-banner code {
  font-size: 12px;
  word-break: break-all;
}

.outcome { max-width: 1320px; margin: 0 auto 40px auto; padding: 16px 40px; }
.outcome pre { background: #0e1530; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 12.5px; overflow: auto; max-height: 360px; }

.events-body .ev { padding: 2px 0; }
.events-body .ev.stt { color: #ffd8a7; }
.events-body .ev.llm { color: #c5b3ff; }
.events-body .ev.db  { color: #8de3ff; }
.events-body .ev.tts { color: #a5d7ff; }
.events-body .ev.flow { color: var(--muted); }
.events-body .ev .ts { color: var(--muted); margin-right: 8px; font-size: 11px; }
