body {
  background: #0f1117;
  color: #e6edf3;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

.demo-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.demo-header {
  align-items: end;
  border-bottom: 1px solid #30363d;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.demo-header h1,
.demo-grid h2,
.demo-log h2 {
  margin: 0;
}

.demo-header h1 {
  font-size: 1.35rem;
}

#backend-state {
  color: #7ee787;
  font-size: .95rem;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.demo-actions button {
  background: #21262d;
  border: 1px solid #3d444d;
  border-radius: 6px;
  color: #e6edf3;
  cursor: pointer;
  font: inherit;
  min-height: 34px;
  padding: 6px 11px;
}

.demo-actions button:hover {
  background: #30363d;
}

.demo-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.demo-grid h2,
.demo-log h2 {
  font-size: 1rem;
}

.demo-log {
  border-top: 1px solid #30363d;
  padding-top: 12px;
}

.demo-log ol {
  color: #9da7b3;
  display: grid;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .85rem;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 24px;
}

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

  .demo-header {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .demo-actions {
    justify-content: flex-start;
  }
}
