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

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid #d9e1ee;
}

.topbar h1 {
  font-size: 20px;
  margin: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: #667085;
}

.health {
  border: 1px solid #ccd6e5;
  border-radius: 6px;
  padding: 6px 10px;
  background: #f9fbff;
}

.workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 0;
  flex: 1;
}

.controls {
  border-right: 1px solid #d9e1ee;
  background: #ffffff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

input,
select,
textarea {
  border: 1px solid #ccd6e5;
  border-radius: 6px;
  padding: 9px 10px;
  background: #ffffff;
  color: #172033;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  background: #1769aa;
  color: #ffffff;
  font-weight: 700;
}

button.secondary {
  background: #e9eef7;
  color: #172033;
}

.inspect {
  margin-top: 8px;
}

.inspect h2,
.pane h2 {
  font-size: 14px;
  margin: 0 0 8px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.output {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 16px;
  padding: 18px;
  min-width: 0;
}

.pane {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  padding: 14px;
  overflow: auto;
}

.rendered {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event {
  border: 1px solid #d9e1ee;
  border-radius: 6px;
  padding: 10px;
  background: #fbfcff;
}

.event strong {
  display: block;
  margin-bottom: 6px;
  color: #1769aa;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.product {
  border: 1px solid #d9e1ee;
  border-radius: 6px;
  padding: 8px;
}

.product img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f3f6fb;
}

.raw {
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .workspace,
  .output {
    grid-template-columns: 1fr;
  }

  .controls {
    border-right: 0;
    border-bottom: 1px solid #d9e1ee;
  }
}
