.cli-help {
  --terminal-bg: #f4f7fb;
  --terminal-bg-alt: #ecf0f6;
  --terminal-border: #cfd7e3;
  --terminal-text: #1e2a36;
  --terminal-muted: #516272;
  --terminal-header: rgba(30, 42, 54, 0.05);
}

body.theme-dark .cli-help {
  --terminal-bg: #07181d;
  --terminal-bg-alt: #0a1418;
  --terminal-border: #0f2c33;
  --terminal-text: #d6f4ff;
  --terminal-muted: #7aa1ad;
  --terminal-header: rgba(255, 255, 255, 0.04);
}

@media (prefers-color-scheme: dark) {
  body.theme-system .cli-help {
    --terminal-bg: #07181d;
    --terminal-bg-alt: #0a1418;
    --terminal-border: #0f2c33;
    --terminal-text: #d6f4ff;
    --terminal-muted: #7aa1ad;
    --terminal-header: rgba(255, 255, 255, 0.04);
  }
}

.cli-help {
  margin: 1.5rem 0 2rem;
}

.cli-help-details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.35rem;
}

.cli-help-details summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  list-style: none;
}

.cli-help-details summary::-webkit-details-marker {
  display: none;
}

.cli-help-details summary::before {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.cli-help-details[open] summary::before {
  content: "-";
}

.cli-help-details summary code {
  font-family: "JetBrains Mono", "Fira Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.cli-help-details[open] summary {
  margin-bottom: 0.85rem;
}

.cli-help-body {
  display: grid;
  gap: 0.9rem;
  color: var(--muted);
}

.cli-help-body p {
  margin: 0;
}

.terminal-sim {
  border-radius: 14px;
  border: 1px solid var(--terminal-border);
  background: linear-gradient(160deg, var(--terminal-bg), var(--terminal-bg-alt));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  font-family: "JetBrains Mono", "Fira Code", "Source Code Pro", Menlo, Consolas, monospace;
  color: var(--terminal-text);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: var(--terminal-header);
  border-bottom: 1px solid var(--terminal-border);
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.terminal-dot.red {
  background: #ff6b6b;
}

.terminal-dot.yellow {
  background: #f7c948;
}

.terminal-dot.green {
  background: #4fd27a;
}

.terminal-title {
  color: var(--terminal-muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.terminal-content {
  margin: 0;
  padding: 1rem 1.2rem 1.5rem;
  min-height: 190px;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 0.9rem;
}

.terminal-sim.is-typing .terminal-content::after {
  content: "|";
  display: inline-block;
  margin-left: 2px;
  color: var(--terminal-muted);
  animation: cwget-blink 1s steps(2, start) infinite;
}

@keyframes cwget-blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .cli-help-details {
    padding: 1rem 1.1rem;
  }

  .terminal-content {
    padding: 0.85rem 1rem 1.2rem;
    min-height: 170px;
    font-size: 0.85rem;
  }
}
