/* The Homebrew Terminal profile: bright green on black, one monospace face. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --green: #28fe14;
  --dim: #1a9e0f;
  --chrome: #2b2b2b;
  --chrome-text: #9a9a9a;
  --rule: rgba(40, 254, 20, 0.35);
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, "Andale Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--bg);
  color: var(--green);
  font: 400 clamp(0.875rem, 0.82rem + 0.25vw, 1rem)/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}

.term {
  width: min(100%, 44rem);
  border: 1px solid var(--chrome);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  background: var(--chrome);
  color: var(--chrome-text);
  font: 500 0.75rem/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.lights {
  position: absolute;
  left: 10px;
  display: flex;
  gap: 8px;
}

.lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.screen { padding: 1.1rem 1.25rem 1.4rem; }

.screen p, .screen h1 { margin: 0; overflow-wrap: anywhere; }

.screen h1 { font: inherit; font-weight: 700; }

.screen .cmd { margin-top: 1rem; }
.screen .cmd:first-child { margin-top: 0; }

.out p + p { margin-top: 0.9em; }

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

.dim { color: var(--dim); font-weight: 400; }

/* Each focus term stays on one line, so a narrow screen wraps only at the separators. */
.focus span { white-space: nowrap; }

nav { display: flex; flex-wrap: wrap; gap: 0 2ch; }

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.25em;
}

@media (hover: hover) {
  nav a:hover { background: var(--green); color: var(--bg); text-decoration: none; }
}

nav a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* The cursor blinks the way a terminal's does, for as long as the page is open. It is an opacity
   step the compositor runs on its own, and a hidden tab stops it. */
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--green);
  animation: blink 1.05s steps(1) infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}
