/* The install command as an object on the page: a real prompt line you can
   copy. It is the page's primary call to action, so it gets the accent seam
   rather than a filled button. */

/* The box hugs the command it holds rather than stretching to the column: a
   fixed cap made it narrower than everything around it, and a full-width box
   left a lake of empty space between the text and Copy. Whoever places it
   decides where that block sits. */
.command {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.85rem 0.85rem 0.85rem 1.05rem;
  border: 1px solid rgba(0, 200, 83, 0.42);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(0, 200, 83, 0.07), rgba(0, 200, 83, 0.02));
  font-family: var(--mono);
}

.command__prompt {
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1;
}

/* The command must never be clipped — a half-shown install line reads as a
   broken page. It fits one line at every width the box gets down to a phone,
   where it folds; the `<wbr>`s in the markup keep those folds on the URL's
   slashes instead of mid-token.

   Left, always: both blocks that hold this box are centred, and a centred
   shell command reads as a caption of itself. */
.command__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--cream);
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.command__copy {
  flex: none;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(232, 230, 220, 0.2);
  border-radius: 7px;
  background: transparent;
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.command__copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.command__copy[data-copied] {
  border-color: var(--accent);
  color: var(--accent);
}

/* On a phone the line folds, so Copy cannot share the row with it — it takes a
   row of its own, full width, which is a better tap target anyway. The prompt
   stays on the command's first line, where a prompt goes.

   A grid rather than a wrapping flex row: flex picks its line breaks from the
   items' own content widths, and this command's one-line width is wider than
   any phone, so it always claimed a row of its own and left `$` sitting beside
   the button with nothing to prompt. */
@media (max-width: 560px) {
  .command {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.8rem 0.5rem;
    width: 100%;
    padding: 0.9rem;
  }

  .command__prompt {
    line-height: 1.55;
  }

  .command__copy {
    grid-column: 1 / -1;
    padding: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .command__copy {
    transition: none;
  }
}
