/* Placeholder page. Dark only, on purpose: #24292E and #F05133 are the same two
   colors the icon set and bimi.svg are built from, and site.webmanifest declares
   both theme_color and background_color as #24292E. */

:root {
  --bg: #24292E;
  --text: #E6EDF3;
  --dim: #8B949E;
  --accent: #F05133;
  /* Git prints untracked paths in red; the mark's own color stands in for it. */
  --untracked: #F05133;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1.5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}

/* main is the flex item, not pre. Without these two, pre's max-width:100% resolves
   against main - which is itself sized to the text - so the cap does nothing and the
   whole page scrolls sideways on a phone. min-width:0 undoes the flex default of
   min-width:auto, which otherwise refuses to shrink below the content width. */
main {
  max-width: 100%;
  min-width: 0;
}

pre {
  margin: 0;
  /* Scales down on a narrow phone rather than forcing the page to scroll
     sideways; overflow-x is the backstop for anything clamp cannot save, and
     a terminal transcript scrolling horizontally is idiomatic anyway. */
  font-size: clamp(0.66rem, 2.85vw, 1rem);
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 30rem) {
  body {
    padding: 1rem;
  }
}

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

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

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

.untracked {
  color: var(--untracked);
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  margin-left: 0.15em;
  vertical-align: text-bottom;
  background-color: var(--accent);
  animation: blink 1.1s step-end infinite;
}

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

/* The one bit of motion on the page, so it is also the one bit to turn off. */
@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}
