:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #172033;
  background: #eef2f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0, #eef2f6 100%);
}

button, textarea {
  font: inherit;
}

button {
  border: 1px solid #d9e1ec;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 34, 48, .06);
}

button:hover {
  background: #f3f6fa;
}

.app {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d9e1ec;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(29, 41, 57, .08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 2px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: #0f766e;
  font-weight: 900;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  transform: translateX(-3px);
}

.hero p {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.primary {
  border-color: rgba(15, 118, 110, .25);
  background: #0f766e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .16);
}

.primary:hover {
  background: #0b5f59;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel {
  min-width: 0;
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 41, 57, .075);
  overflow: hidden;
}

.panel-head {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf1f6;
}

.panel-head h2 {
  font-size: 15px;
}

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

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-actions .home-link {
  align-self: auto;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.manual-source-hidden {
  display: none;
}

.source-btn {
  border-color: #d9e1ec;
  background: #fff;
  color: #344054;
  box-shadow: 0 6px 14px rgba(15, 34, 48, .06);
}

.source-btn:hover {
  border-color: rgba(15, 118, 110, .24);
  background: #f3f6fa;
  color: #243147;
}

.source-btn.active {
  border-color: rgba(15, 118, 110, .34);
  background: #0f766e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .16);
}

.auto-btn {
  border-color: #d9e1ec;
  background: #fff;
  color: #344054;
  box-shadow: 0 6px 14px rgba(15, 34, 48, .06);
}

.auto-btn:hover {
  border-color: rgba(109, 40, 217, .24);
  background: #f3f6fa;
  color: #243147;
}

.auto-btn.active {
  border-color: rgba(109, 40, 217, .38);
  background: #6d28d9;
  color: #fff;
  box-shadow: 0 8px 18px rgba(124, 58, 237, .16);
}

.detected-source {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(109, 40, 217, .14);
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 800;
}

.jundiai-btn {
  border-color: #d9e1ec;
  background: #fff;
  color: #344054;
  box-shadow: 0 6px 14px rgba(15, 34, 48, .06);
}

.jundiai-btn:hover {
  border-color: rgba(37, 99, 235, .24);
  background: #f3f6fa;
  color: #243147;
}

.jundiai-btn.active {
  border-color: rgba(29, 78, 216, .38);
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 8px 18px rgba(59, 130, 246, .16);
}

textarea, pre {
  width: 100%;
  min-height: 360px;
  margin: 0;
  border: 0;
  outline: none;
  padding: 14px;
  color: #243147;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

textarea {
  resize: vertical;
}

pre {
  background: #fbfcfe;
  overflow: auto;
}

@media (max-width: 860px) {
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  textarea, pre {
    min-height: 280px;
  }

}
