:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, #dff8e7, transparent 34rem),
    linear-gradient(145deg, #f6fbff, #f7f5ff 55%, #fff8ef);
  color: #172033;
}

main { width: min(760px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 64px; }
.back { color: #536079; font-size: 14px; font-weight: 750; text-decoration: none; }
.hero { display: flex; gap: 20px; align-items: center; padding: 40px 0 24px; }
.phone {
  width: 76px; height: 76px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 24px; background: #dff8e7; font-size: 40px; transform: rotate(-12deg);
}
.eyebrow { margin: 0 0 7px; color: #667087; font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(38px, 8vw, 62px); letter-spacing: -.055em; line-height: .96; }
.lede { margin: 12px 0 0; color: #566078; line-height: 1.5; }
.panel {
  margin-top: 18px; padding: clamp(20px, 5vw, 34px); border: 1px solid rgba(23,32,51,.09);
  border-radius: 28px; background: rgba(255,255,255,.85); box-shadow: 0 20px 70px rgba(35,48,75,.11);
}
form { display: grid; gap: 22px; }
label { display: grid; gap: 8px; font-weight: 800; }
input, select, textarea {
  width: 100%; border: 1px solid #cfd6e4; border-radius: 14px; padding: 13px 14px;
  background: #fff; color: #172033; font: inherit; font-weight: 550; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #3569f5; box-shadow: 0 0 0 4px rgba(53,105,245,.12); }
textarea { resize: vertical; min-height: 120px; }
small { color: #737c91; font-size: 12px; font-weight: 500; line-height: 1.45; }
.messageMeta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aiButton {
  padding: 9px 12px; border: 1px solid #b9c7ff; border-radius: 12px; background: #eef2ff; color: #304da8;
  box-shadow: none; font-size: 12px; white-space: nowrap;
}
.aiButton:hover { background: #e3e9ff; }
.aiStatus { min-height: 18px; color: #2f5f48; font-size: 12px; font-weight: 600; line-height: 1.45; }
.aiStatus.error { color: #b42318; }
.phoneInput { display: grid; grid-template-columns: auto 1fr; align-items: center; border: 1px solid #cfd6e4; border-radius: 14px; background: #fff; overflow: hidden; }
.phoneInput:focus-within { border-color: #3569f5; box-shadow: 0 0 0 4px rgba(53,105,245,.12); }
.phoneInput span { padding: 0 0 0 14px; color: #536079; font-weight: 750; }
.phoneInput input { border: 0; box-shadow: none; }
.notice { padding: 14px 16px; border-radius: 14px; background: #fff8df; color: #62531f; font-size: 13px; line-height: 1.45; }
button {
  border: 0; border-radius: 15px; padding: 15px 20px; background: #1d5d3a; color: white;
  font: inherit; font-weight: 850; cursor: pointer; box-shadow: 0 10px 26px rgba(29,93,58,.24);
}
button:disabled { opacity: .55; cursor: wait; }
.formStatus { min-height: 20px; margin: -8px 0 0; color: #596176; font-size: 13px; }
.formStatus.error { color: #b42318; }
.progressHeader { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
h3 { margin: 28px 0 12px; font-size: 16px; }
.badge { padding: 7px 11px; border-radius: 999px; background: #eef2f8; color: #4b566d; font-size: 12px; font-weight: 850; text-transform: uppercase; }
.badge.live { background: #dcfce7; color: #166534; }
.badge.error { background: #fee2e2; color: #991b1b; }
.statusTrack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 24px; }
.statusTrack div { padding: 10px 4px; border-radius: 10px; background: #eef1f6; color: #8a93a5; font-size: 10px; font-weight: 800; text-align: center; }
.statusTrack div.active { background: #1d5d3a; color: #fff; }
.statusTrack div.done { background: #dff8e7; color: #1d5d3a; }
.partial { margin-top: 18px; padding: 12px 14px; border-left: 4px solid #8096f5; background: #f1f4ff; color: #415078; font-style: italic; }
.transcript { display: grid; gap: 10px; }
.turn { max-width: 88%; padding: 12px 14px; border-radius: 16px; line-height: 1.45; }
.turn.you { justify-self: end; background: #1d5d3a; color: white; border-bottom-right-radius: 5px; }
.turn.friend { justify-self: start; background: #eef2f8; color: #263149; border-bottom-left-radius: 5px; }
.turn span { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; opacity: .72; }
.events { margin: 0; padding-left: 21px; color: #657087; font-size: 13px; line-height: 1.65; }
.recording { margin-top: 24px; padding-top: 2px; border-top: 1px solid #e2e6ee; }
audio { width: 100%; }
.recording p { color: #737c91; font-size: 12px; }
@media (max-width: 520px) {
  .hero { align-items: flex-start; }
  .phone { width: 58px; height: 58px; border-radius: 18px; font-size: 30px; }
  .statusTrack { gap: 3px; }
  .statusTrack div { font-size: 8px; }
  .messageMeta { align-items: flex-start; flex-direction: column; }
  .aiButton { width: 100%; }
}
