:root {
  --bg: #1e1e1e;
  --bg-pane: #252526;
  --bg-results: #1a1a1a;
  --text-default: #aeafad;
  --text-comment: #5a5a5a;
  --text-label: #c5a400;
  --text-var: #569cd6;
  --text-number: #b5cea8;
  --result-value: #4ec994;
  --result-error: #f44747;
  --result-empty: transparent;
  --border: #333;
  --font: 'Cascadia Code', 'Fira Code', 'Consolas', 'Monaco', monospace;
  --font-size: 14px;
  --line-height: 1.6;
  --line-px: calc(var(--font-size) * var(--line-height)); /* 22.4px */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text-default);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
}

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#editor-pane {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

#highlight-overlay,
#editor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: auto;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
}

#highlight-overlay {
  z-index: 1;
  color: var(--text-default);
  pointer-events: none;
  user-select: none;
  background: var(--bg-pane);
  overflow: hidden;
}

#editor {
  z-index: 2;
  color: transparent;
  caret-color: #fff;
  background: transparent;
}

#editor::placeholder {
  color: var(--text-comment);
}

#editor::-webkit-scrollbar {
  width: 8px;
}
#editor::-webkit-scrollbar-track {
  background: var(--bg-pane);
}
#editor::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

#results-pane {
  flex: 1;
  background: var(--bg-results);
  overflow: hidden;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
}

.result-line {
  height: var(--line-px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--result-value);
  opacity: 0.9;
}

.result-line.empty {
  color: transparent;
}

.result-line.error {
  color: var(--result-error);
  font-size: 12px;
  opacity: 0.8;
}

.result-line.comment {
  color: transparent;
}

.result-line.fetching {
  color: var(--text-comment);
  font-style: italic;
  font-size: 12px;
}
