:root {
  --bg: #000;
  --fg: #cfd8cf;
  --dim: #5f6b5f;
  --accent: #3ddc84;
  --stale: #ffb020;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body { min-height: 100vh; }

.term {
  max-width: 34rem;
  padding: 1.25rem 1rem 2rem;
}

p { margin: 0; white-space: pre; }

.accent { color: var(--accent); }
.dim { color: var(--dim); }

.head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.icon {
  flex: none;
  shape-rendering: crispEdges;
  color: var(--accent);
  animation: pulse 3s ease-in-out infinite;
}
.icon .px { fill: currentColor; }
.icon .px-dim { fill: currentColor; opacity: 0.45; }
.icon .eye { fill: currentColor; animation: blink 6s steps(1) infinite; }

.rule { overflow: hidden; margin: 0.6rem 0; }

.stats { margin: 0; }
.row { display: flex; gap: 0.75rem; }
.row dt { width: 4ch; flex: none; color: var(--dim); }
.row dd { margin: 0; display: flex; gap: 0.75rem; min-width: 0; }
.bar { color: var(--accent); white-space: pre; }
.bar .empty { color: #1d2a1f; }
.val { min-width: 6ch; text-align: right; font-variant-numeric: tabular-nums; }
.val.left { text-align: left; }

.status { margin-top: 0.1rem; }
.dot { color: var(--dim); }
.live .dot { color: var(--accent); animation: dotpulse 2s ease-in-out infinite; }
.live #state { color: var(--accent); }

.prompt { margin-top: 0.9rem; }
.cursor { color: var(--accent); animation: blink-cursor 1.1s steps(1) infinite; }

/* Stale: data older than 30 s. Never pretend to be alive. */
.stale { --accent: var(--stale); }
.stale .dot, .stale #state { color: var(--stale); }
.stale .icon, .stale .cursor { animation: none; }
.stale .icon { opacity: 0.6; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes dotpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes blink-cursor { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes blink { 0%, 96% { opacity: 1; } 97%, 99% { opacity: 0; } }

@media (max-width: 380px) {
  html, body { font-size: 13px; }
  .term { padding: 1rem 0.75rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
