:root {
  color-scheme: light;
  --page: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #657282;
  --border: #d7dde5;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --code: #111827;
  --warning: #fff7ed;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

.playground-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(20rem, 1.1fr);
  min-height: 100vh;
}

.pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.editor-pane {
  background: var(--code);
  color: #f9fafb;
}

.preview-pane {
  background: var(--panel);
  border-left: 1px solid var(--border);
}

.pane-header {
  align-items: center;
  border-bottom: 1px solid rgba(101, 114, 130, 0.25);
  display: flex;
  justify-content: space-between;
  min-height: 4.75rem;
  padding: 1rem 1.25rem;
}

.eyebrow,
.status {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.editor-pane .eyebrow {
  color: #9ca3af;
}

h1,
h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0.125rem 0 0;
}

.tool-button {
  background: var(--accent);
  border: 0;
  border-radius: 0.375rem;
  color: var(--accent-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
}

.tool-button:hover {
  background: #1d4ed8;
}

#orvi-source {
  background: transparent;
  border: 0;
  color: #e5e7eb;
  flex: 1;
  font: 0.95rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  min-height: 24rem;
  outline: 0;
  padding: 1.25rem;
  resize: none;
  tab-size: 2;
  width: 100%;
}

.preview-surface {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.preview-surface .orvi-document {
  margin: 0;
  max-width: none;
  min-height: 100%;
}

.diagnostics {
  background: var(--warning);
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
}

.diagnostics[hidden] {
  display: none;
}

.diagnostics ul {
  margin: 0;
  padding-left: 1.25rem;
}

@media (max-width: 760px) {
  .playground-shell {
    grid-template-columns: 1fr;
  }

  .editor-pane,
  .preview-pane {
    min-height: 50vh;
  }

  .preview-pane {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}
