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

body.layout {
  margin: 0;
  font-family: Arial, sans-serif;
  padding: 24px;
  color: #333;
}
body.layout--narrow {
  max-width: 720px;
}
body.layout--status {
  max-width: 1100px;
}
body.layout--logs {
  max-width: 1200px;
}

.flash-success {
  padding: 10px;
  background: #d8f5d0;
  border: 1px solid #7cc36f;
}

textarea.input-lines {
  width: 360px;
}

.input-text-wide {
  width: 360px;
}

.feedback-line {
  min-height: 1.2em;
  color: #333;
}

.stack-sm {
  margin-top: 12px;
}

.form-tools {
  margin-top: 18px;
}

.table-data {
  border-collapse: collapse;
  width: 100%;
}
.table-data td,
.table-data th {
  vertical-align: top;
}

.tts-panel {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #d7dce2;
  border-radius: 8px;
  background: #f8fafc;
}

.tts-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.tts-panel__header h2 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.status-pill--ok {
  color: #14532d;
  background: #dcfce7;
}

.status-pill--error {
  color: #7f1d1d;
  background: #fee2e2;
}

.tts-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.tts-summary__label {
  display: block;
  margin-bottom: 3px;
  color: #5d6978;
  font-size: 13px;
}

.tts-problems {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-left: 4px solid #dc2626;
  background: #fff1f2;
}
.tts-problems ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.tts-voice-picker {
  margin-bottom: 14px;
}
.tts-voice-picker select {
  min-width: 220px;
  margin-top: 4px;
}

.tts-help {
  margin: 10px 0 0;
  color: #5d6978;
}

.tts-diagnostics {
  border-top: 1px solid #d7dce2;
  padding-top: 10px;
}
.tts-diagnostics summary {
  cursor: pointer;
  font-weight: 700;
}
.tts-diagnostics dl {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 12px 0;
}
.tts-diagnostics dt {
  color: #5d6978;
}
.tts-diagnostics dd {
  min-width: 0;
  margin: 0;
}
.tts-diagnostics code {
  overflow-wrap: anywhere;
}
