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

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(90, 150, 122, .16), transparent 34rem),
    #f2f5f3;
}

button, select { font: inherit; }

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 64px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #32705a;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 1.1rem; }
.intro { color: #526059; font-size: 1.1rem; }

.conversation-card,
.settings-card,
.panel {
  border: 1px solid #d8e0db;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 48px rgba(43, 66, 55, .08);
}

.conversation-card { padding: clamp(22px, 4vw, 36px); }
.settings-card { margin-top: 20px; padding: clamp(22px, 4vw, 32px); }
.card-heading, .panel-heading, .controls { display: flex; align-items: center; }
.card-heading { justify-content: space-between; gap: 20px; }
.card-heading p { margin: 7px 0 0; color: #657069; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
  padding: 11px 15px;
  border-radius: 999px;
  background: #edf0ee;
  font-weight: 750;
}

.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #7b8580; }
.status-connecting { background: #fff4d8; color: #755300; }
.status-connecting .status-dot { background: #e0a413; animation: pulse 1.2s infinite; }
.status-listening { background: #dff6e9; color: #17623f; }
.status-listening .status-dot { background: #2a9b65; animation: pulse 1.2s infinite; }
.status-speaking { background: #e4edff; color: #2859a5; }
.status-speaking .status-dot { background: #3974d4; animation: pulse .8s infinite; }
.status-error { background: #ffe4e1; color: #982c23; }
.status-error .status-dot { background: #c33d32; }

@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

.controls { gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.button { border: 0; border-radius: 14px; padding: 14px 20px; cursor: pointer; font-weight: 800; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: #176b4b; color: white; }
.button-primary:hover:not(:disabled) { background: #11563c; }
.button-danger { background: #f6e6e3; color: #922e25; }
.privacy-note { margin: 18px 0 0; color: #707b75; font-size: .9rem; }

.settings-heading { align-items: flex-start; }
.settings-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button-small { padding: 10px 14px; border-radius: 11px; font-size: .88rem; }
.section-kicker {
  margin: 0 0 7px;
  color: #32705a;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
}
.settings-help { margin: 7px 0 0; color: #657069; }
.settings-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.settings-fieldset:disabled { opacity: .58; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.setting-control {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dfe6e2;
  border-radius: 15px;
  background: #f8faf9;
}
.setting-control > span { color: #263a31; font-size: .88rem; font-weight: 800; }
.setting-control small { color: #748078; line-height: 1.35; }
.setting-control select {
  width: 100%;
  min-width: 0;
  padding: 10px 34px 10px 11px;
  border: 1px solid #cbd7d0;
  border-radius: 10px;
  background: white;
  color: #18211d;
  cursor: pointer;
}
.setting-control select:focus-visible {
  outline: 3px solid rgba(23, 107, 75, .2);
  border-color: #176b4b;
}
.setting-featured { border-color: #a9cdbd; background: #f0f8f4; }
.setting-model { border-color: #7fb79e; background: #e8f5ef; }
.model-details {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.5fr);
  gap: 22px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #cfe0d7;
  border-radius: 15px;
  background: #f4f8f6;
}
.model-details h3 { margin: 0 0 7px; color: #1f4938; }
.model-details p { margin-bottom: 0; color: #627069; line-height: 1.45; }
.model-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.model-facts div { min-width: 0; }
.model-facts dt { color: #627069; font-size: .74rem; font-weight: 800; text-transform: uppercase; }
.model-facts dd { margin: 3px 0 0; color: #263a31; line-height: 1.35; overflow-wrap: anywhere; }
.settings-summary {
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 11px;
  background: #edf5f1;
  color: #315b49;
  font-size: .88rem;
  line-height: 1.45;
}

.monitor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.panel { min-width: 0; padding: 22px; }
.panel-heading { justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-tag { color: #627069; font-size: .78rem; }
.text-button { border: 0; background: transparent; color: #176b4b; cursor: pointer; font-weight: 750; }

.transcript, .event-log {
  height: 330px;
  margin: 0;
  overflow: auto;
  border-radius: 14px;
  background: #f6f8f7;
}

.transcript { padding: 16px; }
.empty { color: #7b8580; }
.utterance { margin: 0 0 12px; line-height: 1.5; }
.utterance strong { display: block; color: #32705a; font-size: .78rem; text-transform: uppercase; }

.event-log { padding: 12px; list-style: none; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; }
.event-log li { padding: 8px 6px; border-bottom: 1px solid #e4e9e6; overflow-wrap: anywhere; }
.event-time { color: #7b8580; margin-right: 8px; }
.event-type { color: #176b4b; font-weight: 800; }

.button-secondary { background: #e3f1ea; color: #176b4b; }
.button-secondary:hover:not(:disabled) { background: #d2e9dd; }
.button-onboarding-active { outline: 3px solid #2a9b65; outline-offset: 2px; }

.profile-card { margin-top: 20px; }
.profile-summary { margin: 6px 0 0; color: #657069; font-size: .9rem; }
.text-button-danger { color: #922e25; }
.profile-data {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}
.profile-data div { padding: 10px 12px; border-radius: 12px; background: #f6f8f7; min-width: 0; }
.profile-data dt { color: #627069; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.profile-data dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.profile-data .profile-missing dd { color: #a0a8a4; font-style: italic; }

@media (max-width: 760px) {
  .shell { padding-top: 28px; }
  .card-heading { align-items: flex-start; flex-direction: column; }
  .monitor-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .model-details, .model-facts { grid-template-columns: 1fr; }
  .status { min-width: 0; }
}

@media (min-width: 761px) and (max-width: 980px) {
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.setting-warning { color: #8a5a00 !important; font-weight: 700; }
