:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --panel: #151821;
  --panel-2: #1d2230;
  --text: #e6e8ee;
  --muted: #8b93a7;
  --accent: #7aa2ff;
  --accent-soft: #2a3a66;
  --good: #4ade80;
  --bad: #f87171;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

h1 {
  font-size: 28px;
  margin: 0 0 8px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

button {
  background: var(--accent);
  color: #0b0d12;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

button.secondary {
  background: var(--panel-2);
  color: var(--text);
}

label {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-2);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}

.landing {
  padding-top: 80px;
}

#links {
  margin-top: 28px;
  padding: 20px;
  background: var(--panel);
  border-radius: var(--radius);
}

#links a {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.call header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.call header p {
  margin: 0;
  font-size: 13px;
}

.call .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 6px;
  vertical-align: middle;
}

.call .status-dot.live {
  background: var(--good);
}

.call .audio-mount {
  margin: 24px 0;
  padding: 24px;
  background: var(--panel);
  border-radius: var(--radius);
  min-height: 80px;
  color: var(--muted);
  font-size: 13px;
}

.call .audio-mount:empty::before {
  content: "Waiting for the other side to join…";
}

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

.call--ic {
  max-width: 1100px;
}

.ic-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 720px) {
  .ic-grid {
    grid-template-columns: 1fr;
  }
}

.context-panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.context-panel h2 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.context-panel dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.context-panel dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px;
}

.context-panel dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.call-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.call-controls {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audio-mount--inline {
  margin: 0;
  padding: 0;
  background: transparent;
  min-height: 0;
}

.audio-mount--inline:empty::before {
  content: "Waiting for the other side to join…";
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.transcript-panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.transcript-panel h2 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.transcript {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transcript-line {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.transcript-line .speaker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.transcript-line--ic {
  background: rgba(122, 162, 255, 0.08);
}

.transcript-line--ic .speaker {
  color: var(--accent);
}

.transcript-line--customer {
  background: var(--panel-2);
}

.transcript-line--interim {
  opacity: 0.6;
  font-style: italic;
}

.transcript-empty,
.coach-empty {
  margin: 0;
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.coach-panel {
  background: linear-gradient(180deg, rgba(122, 162, 255, 0.10), rgba(122, 162, 255, 0.02));
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.coach-panel h2 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.coach {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 40vh;
  overflow-y: auto;
}

.coach-cue {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 12px;
  background: var(--panel);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  border-left: 3px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.coach-cue--live {
  border-left-color: var(--accent);
  background: rgba(122, 162, 255, 0.10);
}

.coach-ts {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.coach-text div {
  margin-bottom: 2px;
}

.coach-text div:last-child {
  margin-bottom: 0;
}
