:root {
  --bg: #030605;
  --fg: #cfe9d6;
  --dim: #6f9a7d;
  --acc: #57d97b;
  --acc2: #e8c15a;
  --line: #1c3325;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
#top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  letter-spacing: .14em;
}
.brand { color: var(--acc2); font-weight: 600; font-size: 13px; }
.brand em { color: var(--dim); font-style: normal; }
.chip {
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55vw;
}
.chip.on { color: var(--acc); border-color: #2b5c3b; }
#termwrap {
  flex: 1;
  min-height: 0;
  padding: 10px 6px 6px 10px;
  position: relative;
}
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 5, .85);
  z-index: 5;
  text-align: center;
  padding: 0 20px;
}
#overlay.hidden { display: none; }
#overlayText {
  color: var(--acc);
  letter-spacing: .18em;
  font-size: 13px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
#term { height: 100%; }
#term .xterm-viewport { scrollbar-width: thin; scrollbar-color: #1c3325 #0a1410; }
#term .xterm-viewport::-webkit-scrollbar { width: 10px; }
#term .xterm-viewport::-webkit-scrollbar-track { background: #0a1410; }
#term .xterm-viewport::-webkit-scrollbar-thumb { background: #1c3325; border-radius: 5px; }
#term .xterm-viewport::-webkit-scrollbar-thumb:hover { background: #2b5c3b; }
#bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12.5px;
  letter-spacing: .06em;
}
#bottom .hint { text-align: right; }
.stat.ok { color: var(--acc); }
.stat.bad { color: #e06c6c; }
