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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
select,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: 720;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 6px;
  color: #64748b;
}

.status {
  min-width: 150px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 14px;
  text-align: center;
  font-weight: 650;
}

.status.error {
  border-color: #dc2626;
  color: #b91c1c;
}

.controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
}

label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

select,
button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #111827;
  padding: 0 12px;
}

select {
  min-width: 240px;
}

button {
  cursor: pointer;
  font-weight: 700;
}

button:first-of-type {
  border-color: #166534;
  background: #166534;
  color: #ffffff;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
}

.check input {
  width: 18px;
  height: 18px;
}

.transcripts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.panel,
.events {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
}

.panel {
  min-height: 250px;
  padding: 18px;
}

.panelHead {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
}

h2 {
  font-size: 16px;
  font-weight: 720;
}

.metrics {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.transcript {
  margin-top: 18px;
  min-height: 150px;
  color: #111827;
  font-size: 28px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.events {
  margin-top: 18px;
  padding: 18px;
}

.events ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: #475569;
}

.events li {
  margin: 8px 0;
}

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

.loginPanel {
  width: min(100%, 380px);
  display: grid;
  gap: 16px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.loginPanel h1 {
  font-size: 22px;
}

.loginPanel input {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
}

.loginPanel button {
  border-color: #166534;
  background: #166534;
  color: #ffffff;
}

.loginError {
  min-height: 20px;
  color: #b91c1c;
  font-size: 14px;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 16px;
  }

  .topbar {
    display: grid;
  }

  .status,
  select,
  button,
  label {
    width: 100%;
  }

  .metrics {
    white-space: normal;
  }
}
