:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #f5f3ea;
  --muted: #a8ad9e;
  --panel: rgba(24, 29, 22, 0.76);
  --panel-border: rgba(231, 238, 211, 0.12);
  --lime: #ccff67;
  --mint: #82e9b2;
  --amber: #ffc66d;
  --red: #ff7d79;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0b0e0a;
}

body {
  color: var(--ink);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.3;
  pointer-events: none;
}

body::before {
  width: 520px;
  height: 520px;
  left: -150px;
  top: -220px;
  background: #6d9440;
}

body::after {
  width: 480px;
  height: 480px;
  right: -160px;
  bottom: -230px;
  background: #2d7160;
}

.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  grid-template-rows: 1fr auto;
  gap: clamp(24px, 4vw, 60px);
  min-height: 100vh;
  padding: clamp(42px, 6vw, 82px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 45% 45%, rgba(204, 255, 103, 0.05), transparent 35%);
  background-size: 44px 44px, 44px 44px, auto;
}

.hero {
  align-self: center;
}

.eyebrow,
.card-label,
.response-label {
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 30px 0 28px;
}

.avatar {
  position: relative;
  z-index: 3;
  width: 144px;
  height: 144px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: #dcd8c9;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.avatar svg {
  width: 100%;
  height: 100%;
}

.orbit,
.level {
  position: absolute;
  border-radius: 50%;
}

.orbit {
  z-index: 1;
  inset: 3px;
  border: 1px solid rgba(204, 255, 103, 0.28);
}

.orbit-two {
  inset: 16px;
  border-color: rgba(130, 233, 178, 0.22);
}

.level {
  z-index: 2;
  width: 168px;
  height: 168px;
  border: 3px solid transparent;
  border-top-color: var(--lime);
  opacity: 0.75;
  animation: spin 4s linear infinite;
}

.avatar-wrap[data-state="listening"] .orbit,
.avatar-wrap[data-state="thinking"] .orbit,
.avatar-wrap[data-state="speaking"] .orbit {
  animation: pulse 1.6s ease-in-out infinite;
}

.avatar-wrap[data-state="thinking"] .level {
  border-top-color: var(--amber);
  animation-duration: 0.8s;
}

.avatar-wrap[data-state="speaking"] .level {
  border-color: var(--mint) transparent var(--mint) transparent;
  animation-duration: 1.1s;
}

.avatar-wrap[data-state="error"] .level {
  border-top-color: var(--red);
}

h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

h1 span {
  color: var(--lime);
}

.lede {
  max-width: 620px;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}

.signals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #d8dccf;
  font-size: 13px;
  font-weight: 650;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5b6257;
  box-shadow: 0 0 0 4px rgba(91, 98, 87, 0.12);
}

.dot.ready {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(130, 233, 178, 0.12);
}

.dot.error {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 125, 121, 0.12);
}

.conversation-card {
  align-self: center;
  min-height: 360px;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(24px);
}

.exchange {
  margin-top: 30px;
}

.speaker-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.speaker {
  font-size: 18px;
  font-weight: 750;
}

.timestamp {
  color: #73796f;
  font-size: 12px;
}

.exchange > p {
  min-height: 64px;
  margin: 16px 0 28px;
  color: #bcc1b4;
  font-size: 17px;
  line-height: 1.55;
}

.response {
  padding: 22px 24px;
  border-left: 3px solid var(--lime);
  border-radius: 0 18px 18px 0;
  background: rgba(204, 255, 103, 0.07);
}

.response p {
  margin: 9px 0 0;
  font-size: 19px;
  line-height: 1.48;
}

footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  color: #6f756b;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.separator {
  margin: 0 9px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.35; }
  50% { transform: scale(1.06); opacity: 0.9; }
}

@media (max-width: 860px) {
  .stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-content: center;
    overflow-y: auto;
  }

  .conversation-card {
    min-height: 0;
  }

  footer {
    grid-column: 1;
  }
}
