:root {
  --fondo: #000000;
  --finestra: #0e0f11;
  --barra: #15171a;
  --filo: rgba(255, 255, 255, 0.08);
  --testo: #e8e6e1;
  --tenue: #8b8d93;
  --spento: #4a4d54;
  --accento: #8fe3b0;
  --errore: #ff9b8a;
  --mono: "JetBrains Mono Variable", ui-monospace, Menlo, monospace;
  --sans: "Mona Sans Variable", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100%;
  height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: min(2.2vh, 14px);
  padding: min(4vw, 24px);
  /* every size follows both the width and the height of the window */
  font-size: clamp(9.5px, min(2.55vw, 2.9vh), 15px);
}

.term {
  position: relative;
  width: min(42em, 100%);
  height: min(25em, 76vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.045), transparent 60%),
    var(--finestra);
  border: 1px solid var(--filo);
  border-radius: 0.95em;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 40px 90px -30px rgba(143, 227, 176, 0.08);
  overflow: hidden;
  outline: none;
  transition: border-color 0.3s ease;
}
.term:focus-visible { border-color: rgba(143, 227, 176, 0.35); }

.term__bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 2.6em;
  padding: 0 0.95em;
  background: linear-gradient(var(--barra), #121417);
  border-bottom: 1px solid var(--filo);
}
.lights { display: flex; gap: 0.45em; align-items: center; }
.lights i {
  display: block;
  width: 0.72em;
  height: 0.72em;
  border-radius: 50%;
  background: #2b2e33;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.term__title {
  font-family: var(--sans);
  font-size: 0.86em;
  font-weight: 560;
  letter-spacing: 0.005em;
  color: #c9c8c4;
  white-space: nowrap;
}
.term__title .dim { color: var(--spento); font-weight: 450; }

/* the small state pill on the right: its text is the only thing in it, centred */
.term__badge {
  justify-self: end;
  display: grid;
  place-items: center;
  height: 1.55em;
  padding: 0 0.6em;
  border-radius: 99em;
  border: 1px solid var(--filo);
  overflow: hidden;
}
.term__badge-in { display: flex; align-items: center; justify-content: center; gap: 0.32em; height: 100%; }
.term__badge-i { display: none; width: 0.78em; height: 0.78em; color: var(--accento); }
.term__badge { transition: border-color 0.3s ease, background-color 0.3s ease; }
.term__badge.is-copied { border-color: rgba(143, 227, 176, 0.32); background: rgba(143, 227, 176, 0.1); }
.term__badge.is-copied .term__badge-i { display: block; }
.term__badge.is-copied .term__badge-t { color: var(--accento); }
.term__badge-t {
  font-family: var(--mono);
  font-size: 0.68em;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--tenue);
}

.term__screen {
  position: relative;
  overflow: hidden;
  padding: 0.95em 1.15em 1.1em;
  font-family: var(--mono);
  font-size: 0.92em;
  line-height: 1.62;
}
.term__out { display: block; }

.line {
  display: block;
  min-height: 1.62em;
  white-space: pre-wrap;
  word-break: break-word;
}
.line--prompt { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 0.6ch; }
.prompt { white-space: nowrap; }
.who { color: var(--accento); }
.path { color: #9fb4ff; color: var(--tenue); }
.sign { color: var(--testo); transition: color 0.35s ease; }
.prompt.is-error .sign { color: var(--errore); }
.typed { color: var(--testo); white-space: pre; }

.caret {
  display: inline-block;
  width: 0.62em;
  height: 1.12em;
  margin-left: 0.08ch;
  transform: translateY(0.2em);
  background: var(--testo);
  border-radius: 1px;
  vertical-align: baseline;
}

.out-dim { color: var(--tenue); }
.out-acc { color: var(--accento); }
.out-err { color: var(--errore); }
.out-strong { color: #f4f2ec; font-weight: 600; }

/* ls projects: three columns that line up */
.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  column-gap: 3ch;
  row-gap: 0;
}
.cols span { white-space: nowrap; }
.cols .d { color: #9fb4ff; }

/* cat stack.txt: the languages light up one by one */
.stack { display: flex; flex-wrap: wrap; column-gap: 1.2ch; }
.chip { color: var(--spento); white-space: nowrap; }

.hint {
  font-family: var(--sans);
  font-size: 0.78em;
  color: var(--spento);
  letter-spacing: 0.01em;
}
.hint kbd {
  font-family: var(--mono);
  font-size: 0.95em;
  color: var(--tenue);
  padding: 0.1em 0.45em;
  border: 1px solid var(--filo);
  border-radius: 0.35em;
}
