* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: #0d1117;
  min-height: 100vh;
}

body {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', Menlo, Monaco, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #c9d1d9;
  padding: 24px 18px;
}

.terminal {
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  background: #0d1117;
  max-width: 900px;
  margin: 0 auto;
}

.terminal-bar {
  background: #161b22;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #30363d;
  position: sticky;
  top: 0;
  z-index: 2;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: #8b949e;
  font-size: 12px;
}

.terminal-body {
  padding: 14px 18px 24px;
  min-height: 70vh;
}

/* Prompt line */
.prompt { color: #7ee787; }
.prompt::before { content: '$ '; color: #7ee787; }
.cmd { color: #79c0ff; }
.flag { color: #d2a8ff; }
.arg { color: #ffa657; }

.section { margin-bottom: 14px; }
.section-cmd { margin-bottom: 6px; }

/* Glow-style markdown rendering */
.glow {
  padding: 2px 0 10px;
  color: #c9d1d9;
}

.glow-h1 {
  font-weight: 700;
  color: #f0f6fc;
  font-size: 15px;
  padding: 3px 8px;
  margin: 6px 0;
  border-bottom: 1px solid #30363d;
  border-top: 1px solid #30363d;
}

.glow-h2 {
  font-weight: 700;
  color: #f0f6fc;
  font-size: 14px;
  margin-top: 12px;
  margin-bottom: 5px;
  border-bottom: 1px solid #30363d;
  border-top: 1px solid #30363d;
  padding: 3px 8px;
}
.glow-h2 .h-hash { color: #484f58; }

.glow-h3 {
  font-weight: 400;
  font-style: italic;
  color: #58a6ff;
  font-size: 13px;
  margin-top: 6px;
  margin-bottom: 2px;
}
.glow-h3 .h-hash { color: #58a6ff; }

.glow p {
  color: #c9d1d9;
  margin-bottom: 4px;
}

.glow strong { color: #f0f6fc; font-weight: 700; }
.glow em { color: #c9d1d9; font-style: italic; }

.glow-ul {
  list-style: none;
  padding: 0;
  margin: 3px 0 8px 0;
}
.glow-ul li {
  padding-left: 14px;
  margin-bottom: 2px;
  position: relative;
  color: #c9d1d9;
}
.glow-ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #c9d1d9;
}
.glow-ul li strong { color: #f0f6fc; }

.glow-hr {
  border: none;
  border-top: 1px solid #30363d;
  margin: 10px 0;
}

.glow-table {
  border-collapse: collapse;
  width: 100%;
  margin: 6px 0 10px 0;
}
.glow-table td {
  padding: 2px 12px 2px 0;
  color: #c9d1d9;
  vertical-align: top;
}
.glow-table td:first-child {
  color: #7ee787;
  width: 160px;
  padding-left: 0;
}

.glow a {
  color: #7ee787;
  text-decoration: none;
}
.glow a:hover { text-decoration: underline; }

.glow-quote {
  border-left: 2px solid #484f58;
  padding-left: 12px;
  color: #c9d1d9;
  margin: 4px 0;
}

.err { color: #ff7b72; }
.comment { color: #484f58; }
.comment::before { content: '# '; }

/* The interactive prompt input — mirror layered over a transparent input
   so the first token can light up blue in real time when recognized */
.input-line {
  display: flex;
  align-items: center;
}
.prompt-prefix {
  color: #7ee787;
  white-space: pre;
}
.input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: inline-block;
}
.cmd-mirror {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  pointer-events: none;
  white-space: pre;
  font: inherit;
  line-height: inherit;
  color: #c9d1d9;
  overflow: hidden;
}
.cmd-mirror .cmd { font-weight: inherit; }
.unknown-cmd { color: #c9d1d9; font-weight: 400; }
#cmd-input {
  background: transparent;
  border: none;
  outline: none;
  color: transparent;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  caret-color: #7ee787;
  padding: 0;
  margin: 0;
  width: 100%;
  position: relative;
  z-index: 1;
}
#cmd-input::selection { background: #1f6feb55; color: #c9d1d9; }

/* Bracketed file listing */
.file-tag {
  color: #7ee787;
  margin-right: 14px;
  display: inline-block;
}

@media (max-width: 640px) {
  body { padding: 10px 6px; font-size: 12px; }
  .terminal-body { padding: 10px 12px 20px; }
  .glow-table td:first-child { width: auto; padding-right: 10px; }
}
