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

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.shell {
  display: grid;
  min-height: 100vh;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 28px;
  place-items: center;
}

.panel {
  width: 100%;
  padding: 32px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgb(15 23 42 / 12%);
}

.auth-panel {
  max-width: 480px;
}

.app-panel {
  min-height: calc(100vh - 56px);
}

header {
  margin-bottom: 28px;
}

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

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

p {
  margin: 0;
}

header p {
  max-width: 58ch;
  margin-top: 12px;
  color: #516071;
  font-size: 1.05rem;
}

.login-form,
.controls,
.actions,
.results {
  display: grid;
  gap: 16px;
}

.controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #c8d3df;
  border-radius: 8px;
  background: #ffffff;
  color: #182230;
}

.actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

button {
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

button:hover:not(:disabled) {
  filter: brightness(0.96);
}

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

.secondary-button {
  min-width: 132px;
  background: #475467;
}

.actions button:nth-child(2) {
  background: #dc2626;
}

.actions button:nth-child(3) {
  background: #0f766e;
}

.status {
  min-height: 24px;
  margin-top: 16px;
  color: #516071;
  font-weight: 700;
}

.results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

article {
  min-height: 150px;
  padding: 18px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
}

article h2 {
  margin: 0 0 12px;
  color: #516071;
  font-size: 0.95rem;
}

article p {
  line-height: 1.55;
  white-space: pre-wrap;
}

audio {
  width: 100%;
  margin-top: 18px;
}

@media (max-width: 680px) {
  .shell {
    padding: 16px;
  }

  .panel {
    padding: 22px;
  }

  .app-panel {
    min-height: calc(100vh - 32px);
  }

  .app-header,
  .controls,
  .actions,
  .results {
    grid-template-columns: 1fr;
  }

  .app-header {
    display: grid;
  }

  h1 {
    font-size: 2.4rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #111827;
    color: #f8fafc;
  }

  .panel,
  input,
  select,
  article {
    border-color: #334155;
    background: #1f2937;
    color: #f8fafc;
  }

  header p,
  label,
  .status,
  article h2 {
    color: #cbd5e1;
  }
}
