/* The playground: the scene's JSON on the left, the figure and its checks on the right; light and dark. */
:root {
  --bg: #fbfaf7;
  --fg: #1d1a1e;
  --muted: #6b6670;
  --line: rgba(29, 26, 30, 0.14);
  --panel: #f2efe8;
  --code: #fffdf8;
  --ok: #2e7d42;
  --warn: #b8352b;
  --link: #2f5fb3;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171b;
    --fg: #e9e7e3;
    --muted: #a29fa8;
    --line: rgba(255, 255, 255, 0.14);
    --panel: #1d2025;
    --code: #111317;
    --ok: #6cc788;
    --warn: #ff8a7a;
    --link: #8db4ff;
    --lk3d-ink: #e9e7e3;
    --lk3d-paper: #22252b;
    --lk3d-muted: #a29fa8;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font:
    15px/1.5 system-ui,
    sans-serif;
}
a {
  color: var(--link);
}
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
header h1 {
  font-size: 18px;
  margin: 0;
}
header h1 span {
  font-weight: 400;
  color: var(--muted);
}
header nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
  font-size: 14px;
}
.tools {
  display: inline-flex;
  gap: 6px;
}
button,
select {
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 9px;
}
button {
  cursor: pointer;
}
button:hover {
  filter: brightness(0.96);
}
main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
}
.code {
  display: flex;
  min-height: 0;
  background: var(--code);
  border-right: 1px solid var(--line);
}
.gutter,
#editor {
  margin: 0;
  padding: 10px 8px;
  font:
    13px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  tab-size: 2;
}
.gutter {
  min-width: 3.2em;
  text-align: right;
  color: var(--muted);
  overflow: hidden;
  user-select: none;
}
#editor {
  flex: 1;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--fg);
  white-space: pre;
  overflow: auto;
}
.view {
  overflow: auto;
  padding: 10px 16px 24px;
}
.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 14px;
}
.summary {
  color: var(--muted);
  margin-left: auto;
}
#figure .lk3d {
  margin-top: 10px;
}
h2 {
  font-size: 15px;
  margin: 18px 0 6px;
}
.problems {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.problems li {
  padding: 5px 8px;
  border-left: 3px solid var(--warn);
  background: var(--panel);
  margin-bottom: 4px;
  cursor: pointer;
}
.problems li.ok {
  border-color: var(--ok);
  cursor: default;
}
.problems code {
  font-size: 12.5px;
  color: var(--muted);
}
@media (max-width: 820px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 45vh auto;
  }
  .code {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  header nav {
    margin-left: 0;
  }
}
