*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: #000;
  font-family: "Roboto Mono", "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.terminal {
  flex: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 32px 24px 24px;
}

.terminal__header {
  text-align: center;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.call-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.call-controls button {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border: 1px solid #000;
  background: #fff;
  cursor: pointer;
}

.call-controls button:hover:not(:disabled) {
  background: #000;
  color: #fff;
}

.call-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.consent-gate {
  border: 1px solid #000;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 11px;
  line-height: 1.55;
}

.consent-gate__title {
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: 0.06em;
  font-size: 11px;
}

.consent-gate__label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 10px;
  cursor: pointer;
}

.consent-gate__label:last-child {
  margin-bottom: 0;
}

.consent-gate__label input {
  margin-top: 3px;
  flex-shrink: 0;
}

.consent-gate a {
  color: inherit;
}

.call-error {
  min-height: 18px;
  margin: 0 0 12px;
  text-align: center;
  font-size: 11px;
  color: #000;
}

.agent-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  margin: 0 auto 16px;
  padding: 14px 16px;
  border: 1px solid #000;
  text-align: center;
}

.agent-connect--hidden {
  display: none;
}

.agent-connect__label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.agent-connect__spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #000;
  border-top-color: transparent;
  border-radius: 50%;
  animation: agent-connect-spin 0.85s linear infinite;
}

.agent-connect__online-dot {
  display: none;
  width: 12px;
  height: 12px;
  background: #000;
  border-radius: 50%;
}

.agent-connect--online .agent-connect__spinner {
  display: none;
}

.agent-connect--online .agent-connect__online-dot {
  display: block;
}

.agent-connect__bar {
  width: 100%;
  height: 6px;
  border: 1px solid #000;
  background: #fff;
  overflow: hidden;
}

.agent-connect__bar-fill {
  height: 100%;
  width: 38%;
  background: #000;
  animation: agent-connect-load 1.35s ease-in-out infinite;
}

.agent-connect--online .agent-connect__bar-fill {
  width: 100%;
  animation: none;
}

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

@keyframes agent-connect-load {
  0% {
    transform: translateX(-105%);
  }

  100% {
    transform: translateX(320%);
  }
}

.terminal__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.avatar {
  display: block;
  width: 480px;
  max-width: 92vw;
  height: 480px;
  max-height: 92vw;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  user-select: none;
}

.waveform {
  display: block;
  width: min(520px, 100%);
  height: 48px;
}

.terminal__divider {
  border: none;
  border-top: 2px solid #000;
  margin: 0 0 20px;
}

.terminal__transcript {
  max-height: 260px;
  overflow-y: auto;
  padding: 14px 16px;
  margin-bottom: 0;
  scrollbar-color: #000 #fff;
  scrollbar-width: thin;
}

.transcript-box {
  border: 1px solid #000;
  margin-bottom: 28px;
}

.transcript-box:focus-within {
  outline: 1px solid #000;
  outline-offset: 2px;
}

.terminal__transcript::-webkit-scrollbar {
  width: 6px;
}

.terminal__transcript::-webkit-scrollbar-track {
  background: #fff;
}

.terminal__transcript::-webkit-scrollbar-thumb {
  background: #000;
}

.transcript-line {
  margin: 0 0 10px;
}

.transcript-line--live {
  opacity: 0.72;
}

.transcript-line .highlight {
  background: #000;
  color: #fff;
  padding: 0 2px;
}

.terminal__meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
}

.terminal__meta-col--right {
  text-align: right;
}

.system-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid #000;
  font-size: 11px;
}

.system-bar__icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.system-bar__icon {
  font-size: 12px;
  line-height: 1;
}

.system-bar__icon--python {
  font-weight: 500;
  font-size: 10px;
  border: 1px solid #000;
  padding: 1px 3px;
}

@media (max-width: 520px) {
  .terminal {
    padding: 20px 12px 16px;
  }
}
