:root {
  color-scheme: light;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #f5f6f8;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d7dce2;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 16px;
}

nav {
  display: flex;
  gap: 8px;
}

button {
  background: #22324a;
  border: 1px solid #22324a;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  min-height: 36px;
  padding: 7px 12px;
}

button.secondary,
.tab {
  background: #ffffff;
  color: #22324a;
}

button.danger {
  border-color: #b42318;
  color: #b42318;
}

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

.tab.active {
  background: #22324a;
  color: #ffffff;
}

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

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  background: #ffffff;
  border: 1px solid #d7dce2;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 16px;
}

.row {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

label {
  display: grid;
  flex: 1 1 280px;
  font-size: 13px;
  gap: 6px;
}

input,
textarea,
select {
  border: 1px solid #c4ccd6;
  border-radius: 6px;
  font: inherit;
  min-height: 36px;
  padding: 7px 10px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

progress {
  flex: 1 1 220px;
  height: 14px;
}

.hidden {
  display: none;
}

.dropzone {
  align-items: center;
  border: 1px dashed #95a3b3;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px;
}

.dropzone.dragging {
  background: #eef7f5;
  border-color: #14866d;
}

.dropzone input {
  flex: 0 0 auto;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.file-row,
.snippet,
.cluster-select {
  align-items: center;
  display: flex;
  gap: 8px;
}

.file-row {
  justify-content: space-between;
}

.snippet {
  align-items: stretch;
}

.snippet input {
  align-self: center;
  min-height: auto;
}

.snippet-main {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
}

.cluster-select {
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 700;
}

.cluster-select input {
  min-height: auto;
}

.status {
  color: #52606d;
  font-size: 13px;
}

.grid,
.review-list,
.events {
  display: grid;
  gap: 12px;
}

.live-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.live-actions {
  margin-top: 10px;
}

.vu-panel {
  margin: 12px 0;
}

.vu-meter {
  align-items: stretch;
  background: #111827;
  border: 1px solid #c4ccd6;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  height: 34px;
  padding: 5px;
  position: relative;
}

.vu-segment {
  background: #263241;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.vu-segment.active {
  background: #13795b;
  box-shadow: 0 0 10px rgba(19, 121, 91, 0.55);
}

.vu-segment.warn {
  background: #d97706;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.55);
}

.vu-segment.hot {
  background: #b42318;
  box-shadow: 0 0 10px rgba(180, 35, 24, 0.6);
}

.vu-level {
  display: none;
}

.vu-peak {
  background: #f8fafc;
  bottom: 4px;
  position: absolute;
  top: 4px;
  transform: translateX(0);
  transition: transform 120ms linear;
  width: 2px;
}

.vu-scale {
  color: #52606d;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  margin-top: 4px;
}

.example-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  margin-top: 12px;
}

.code-block {
  background: #182230;
  border-radius: 6px;
  color: #f8fafc;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  margin-top: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.cluster,
.review-item,
.delivery-item,
.event,
.speaker {
  background: #ffffff;
  border: 1px solid #d7dce2;
  border-radius: 8px;
  padding: 14px;
}

.speaker {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.cluster header,
.review-item header,
.delivery-item header,
.event header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.snippets {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.predictions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.prediction {
  min-height: 30px;
}

.prediction.likely {
  border-color: #13795b;
  color: #13795b;
}

.prediction.possible {
  border-color: #9a6700;
  color: #9a6700;
}

.suggestion {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
}

.suggestion.warning {
  background: #fff3cd;
  color: #7a5200;
}

.suggestion.info {
  background: #e8f1fb;
  color: #1f4d7a;
}

audio {
  width: 100%;
}

.badge {
  background: #eef2f6;
  border-radius: 999px;
  color: #334e68;
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
}

.accepted {
  color: #13795b;
}

.sent {
  color: #13795b;
}

.rejected,
.denied,
.send_failed {
  color: #b42318;
}

.pending,
.needs_approval {
  color: #9a6700;
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  nav,
  .row,
  .example-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
}
