:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --link: #24a7ff;
  --dim: #999;
  --line: #ffff00;
  --panel: #070707;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 13px/1.35 "DejaVu Sans Mono", "Noto Sans Mono", monospace;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--dim);
}

a.active {
  color: var(--line);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.controls {
  max-width: 640px;
}

.brand,
.control-pane {
  outline: 2px #000 solid;
  border: 2px var(--line) dashed;
  padding: 8px;
  margin-bottom: 10px;
  background: var(--panel);
}

.brand h1 {
  font-size: 16px;
  margin: 0 0 6px;
  letter-spacing: 0;
}

.brand p {
  margin: 0;
}

.control-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

details {
  border-top: 1px dashed #444;
  padding-top: 8px;
}

details:first-child {
  border-top: 0;
  padding-top: 0;
}

summary {
  cursor: pointer;
  color: var(--line);
  margin-bottom: 8px;
}

details > label,
details > .grid,
details > .dropzone,
details > .nudge {
  margin-bottom: 8px;
}

.hidden {
  display: none;
}

label {
  display: grid;
  gap: 3px;
  color: var(--fg);
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid #555;
  background: #000;
  color: var(--fg);
  font: 13px/1.25 monospace;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 0;
}

textarea {
  resize: vertical;
  min-height: 112px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 1px solid var(--line);
}

.grid,
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.actions {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkline input {
  width: auto;
  min-height: 0;
}

.nudge {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.nudge button {
  min-height: 30px;
  padding: 0;
}

button {
  cursor: pointer;
}

button:hover {
  border-color: var(--line);
}

.status {
  min-height: 1em;
  color: var(--dim);
}

.dropzone {
  min-height: 88px;
  border: 2px var(--line) dashed;
  display: grid;
  place-items: center;
  text-align: center;
}

.preview {
  min-width: 0;
  overflow: auto;
}

.ansi-pane {
  --ansi-cols: 100;
  display: inline-block;
  width: max-content;
  min-width: min(100%, calc((var(--ansi-cols) * 1ch) + 24px));
  min-height: calc(100vh - 24px);
  overflow: auto;
  outline: 2px #000 solid;
  border: 2px var(--line) dashed;
  padding: 10px;
  background: #000;
  color: #fff;
  font: 14px/1 "DejaVu Sans Mono", "Noto Sans Mono", "Courier New", monospace;
  font-variant-ligatures: none;
  letter-spacing: 0;
  word-spacing: 0;
  white-space: pre;
  tab-size: 8;
}

.ansi-pane textarea {
  display: block;
  min-width: 100%;
  width: max-content;
  min-height: calc(100vh - 56px);
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: pre;
  resize: none;
  outline: none;
}

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

  .grid,
  .actions {
    grid-template-columns: 1fr;
  }
}
