:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  background: #0d1117;
  color: #c9d1d9;
  font: 14px/1.4 "DejaVu Sans Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #21262d;
  flex-wrap: wrap;
}
header strong { color: #56d4dd; font-weight: 700; }
header .hint { color: #8b949e; margin-left: auto; }
#panes { flex: 1; min-height: 0; display: flex; }
aside {
  width: 320px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid #21262d;
  font-size: 12px;
}
aside h2 {
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #8b949e;
  border-bottom: 1px solid #21262d;
}
#log { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 4px 10px; list-style: none; }
#log li { display: flex; gap: 8px; white-space: nowrap; }
#log .kind { color: #56d4dd; font-weight: 700; flex: none; }
#log .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#log .size { color: #8b949e; flex: none; font-variant-numeric: tabular-nums; }
#log .idle { color: #8b949e; }
#totals { margin: 0; padding: 8px 10px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; border-top: 1px solid #21262d; }
#totals dt { color: #8b949e; }
#totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#queries { color: #56d4dd; font-weight: 700; }
#serial-label { cursor: help; }
#serial { color: #e3b341; font-weight: 700; }
#serial.tick { color: #ffffff; text-shadow: 0 0 8px #e3b341; }
@media (prefers-reduced-motion: no-preference) { #serial { transition: color 0.8s, text-shadow 0.8s; } }
@media (max-width: 760px) {
  #panes { flex-direction: column; }
  aside { width: auto; height: 34%; border-left: 0; border-top: 1px solid #21262d; }
  header .hint { display: none; }
}
#state { color: #8b949e; }
#state.running { color: #7ee787; }
#stage { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; }
/* The call to action sits over the lower part of the terminal until pressed. */
#start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 18%;
  background: linear-gradient(#0d111700 35%, #0d1117cc 70%);
  text-align: center;
}
#start[hidden] { display: none; }
#start p { margin: 0; color: #8b949e; }
button {
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  color: #0d1117;
  background: #ff4fa3;
  border: 0;
  border-radius: 8px;
  padding: 16px 34px;
  box-shadow: 0 0 0 3px #ff4fa355, 0 0 32px #ff4fa3aa;
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  button:not(:disabled) { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px #ff4fa333, 0 0 48px #ff4fa3; } }
}
button:hover:not(:disabled) { background: #ff7dbb; }
button:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
button:disabled { background: #30363d; color: #8b949e; cursor: default; box-shadow: none; }
#terminal { flex: 1; min-width: 0; min-height: 0; padding: 8px 4px 4px 10px; }
footer { padding: 6px 12px; border-top: 1px solid #21262d; color: #8b949e; font-size: 12px; }
footer a { color: #79c0ff; }
