:root {
  --bg: #14161a;
  --panel: #1b1f25;
  --line: #2a2f38;
  --ink: #c9d1dc;
  --dim: #7c8794;
  --accent: #3f7fd0;
  --grid: #21252d;
  --trail: #3d4653;
  --agent: #f2f4f8;
  --muted: #6b7280;
  --green: #3fa85a;
  --red: #e0473c;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.demo {
  display: grid;
  grid-template-rows: auto auto auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  min-width: 0;
  background: var(--line);
}

.plane {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg);
}

.deck {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  min-width: 0;
  background: var(--line);
}

canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.readouts {
  position: relative;
  flex: 1 1 374px;
  height: 132px;
  background: var(--bg);
}

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 12px;
  min-width: 0;
  background: var(--bg);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--dim);
}

.status b {
  color: var(--ink);
  font-weight: 500;
}

.panel {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  flex: 999 1 420px;
  gap: 12px 18px;
  padding: 12px 14px;
  min-width: 0;
  background: var(--panel);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 128px;
  min-width: 0;
}

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.field label {
  font-size: 11px;
  color: var(--dim);
  text-transform: lowercase;
}

.field-head output {
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
}

select,
button {
  width: 100%;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #232830;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

button {
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  border-color: #3c434e;
  background: #2a303a;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.row {
  display: flex;
  align-self: flex-end;
  gap: 6px;
  flex: 1 1 218px;
  min-width: 0;
}
