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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button {
  border: 1px solid #b9c2d0;
  border-radius: 6px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  min-width: 88px;
  padding: 10px 14px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.panel {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgb(30 45 75 / 10%);
  max-width: 860px;
  padding: 24px;
  width: min(100%, 860px);
}

header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

h1 {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.05;
  margin: 0;
}

p {
  color: #5d6a7d;
  margin: 8px 0 0;
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meter {
  background: #e6ebf2;
  border-radius: 999px;
  height: 10px;
  margin: 24px 0;
  overflow: hidden;
}

.meter span {
  background: #1d7f72;
  display: block;
  height: 100%;
  transition: width 120ms ease;
  width: 0;
}

.workspace {
  background: #f8fafc;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  min-height: 320px;
  padding: 18px;
}

#transcript {
  background: transparent;
  border: 0;
  color: inherit;
  display: block;
  font: inherit;
  line-height: 1.45;
  min-height: 250px;
  outline: 0;
  resize: vertical;
  white-space: pre-wrap;
  width: 100%;
}

#partial {
  color: #64748b;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .shell {
    padding: 12px;
    place-items: stretch;
  }

  .panel {
    min-height: calc(100vh - 24px);
    padding: 18px;
  }

  header {
    align-items: stretch;
    flex-direction: column;
  }

  .controls {
    width: 100%;
  }

  button {
    flex: 1 1 calc(50% - 8px);
  }
}
