/* "unzip" loader: shown only on someone's first ever visit (decided in the <head> script) */
#unzip-loader { display: none; }
html.show-loader #unzip-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .25s ease;
}
html.is-loading { overflow: hidden; }
#unzip-loader.is-done { opacity: 0; } /* keeps catching taps until removed, so a skip-tap never lands on a link underneath */

#unzip-loader .term {
  width: min(78vw, 820px);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(13px, 2.2vw, 18px);
  line-height: 1.55;
  white-space: pre;
  color: var(--muted);
}
#unzip-loader .cmd { color: var(--ink); display: inline-block; }
#unzip-loader .ok  { color: var(--loader-accent); }
#unzip-loader .cur {
  display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em;
  background: var(--loader-accent);
  animation: unzip-blink 1s steps(1) infinite;
}
@keyframes unzip-blink { 50% { opacity: 0; } }
#unzip-loader .term > div { animation: unzip-in .12s ease both; }
@keyframes unzip-in { from { opacity: 0; } }
/* scroll-away exit */
#unzip-loader .term.away > * { animation: unzip-away .3s cubic-bezier(.6, 0, .4, 1) both; }
@keyframes unzip-away { to { opacity: 0; transform: translateY(-140%); } }

:root { --loader-accent: #3a54f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --loader-accent: #7b8cff; } }
:root[data-theme="dark"] { --loader-accent: #7b8cff; }

@media (prefers-reduced-motion: reduce) {
  #unzip-loader *, #unzip-loader { animation: none !important; transition: none !important; }
}
