:root {
  color-scheme: dark;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: #e9e9df;
  background: #101211;
  --muted: #a8aca0;
  --line: #3b4037;
  --accent: #d4e4a7;
  --paper: #171a17;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.frame {
  width: min(100% - 4rem, 1100px);
  min-height: 100svh;
  margin: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(ellipse at 77% 46%, #20251c 0%, transparent 49%);
}
.rail, .panel-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .72rem;
}
.rail { min-height: 4.5rem; border-bottom: 1px solid var(--line); }
footer.rail { border-top: 1px solid var(--line); border-bottom: 0; }
.state::before {
  content: "";
  display: inline-block;
  vertical-align: .1em;
  width: .43rem;
  height: .43rem;
  margin-right: .65rem;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 30rem) 1fr;
  align-items: center;
  padding: clamp(2rem, 8vw, 6rem) clamp(0rem, 5vw, 4rem);
}
.login-panel, .shell {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 1rem 3rem #0004;
}
.panel-rail { padding: .9rem 1.4rem; border-bottom: 1px solid var(--line); }
.panel-content { padding: clamp(1.4rem, 4vw, 2.75rem); }
h1 {
  margin: 0;
  font: 400 clamp(2.7rem, 7vw, 5.4rem)/.92 Georgia, serif;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
}
h1 span, code, a, .echo { color: var(--accent); }
p { color: var(--muted); line-height: 1.55; font-size: .9rem; }
form { margin-top: 2rem; }
label { display: block; margin-bottom: .5rem; font-size: .83rem; }
input, button { font: inherit; border-radius: 0; min-height: 44px; }
input {
  background: #101310;
  color: inherit;
  border: 1px solid #606858;
  padding: .65rem .8rem;
  width: 100%;
  font-size: 1rem;
}
#login input { margin-bottom: 1rem; }
button {
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #171b12;
  padding: .6rem .85rem;
  font-size: .83rem;
}
button:hover:not(:disabled) { filter: brightness(1.13); }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid #f3f8df; outline-offset: 3px; }
#authorise { width: 100%; display: flex; justify-content: space-between; align-items: center; }
#failure { color: #ffbeb0; margin-bottom: 0; }
#boot { min-height: 12rem; padding-top: 1.5rem; }
#boot-status { color: var(--accent); }
.progress { height: 3px; background: var(--line); }
.progress::before {
  display: block;
  content: "";
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: boot 180ms ease-out both;
}
@keyframes boot { from { transform: scaleX(.04); } to { transform: scaleX(1); } }
.apparatus { display: grid; place-items: center; }
.orbit {
  width: min(26vw, 18rem);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid #3b4434;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 30px, #353e2e 31px, transparent 32px);
}
.orbit i, .orbit b { position: absolute; background: #3b4434; }
.orbit i { width: 116%; height: 1px; }
.orbit b { width: 1px; height: 116%; }
.mirror {
  z-index: 1;
  width: 3.05rem;
  height: 4.25rem;
  border: 3px double #9d9c7e;
  border-radius: 48% 48% 42% 42%;
  transform: rotate(-13deg);
  background: linear-gradient(140deg, #353d38 12%, #7d9586 32%, #aebbad 41%, #56695c 44%, #222b25 80%);
  box-shadow: 0 .4rem 1rem #0009, inset 0 0 .55rem #18251c;
}
.shell { align-self: center; width: min(100%, 48rem); margin: 2rem auto; }
.shell h1 { font-size: clamp(2.5rem, 6vw, 4.7rem); }
.quiet, .shortcuts button { background: transparent; border-color: var(--line); color: var(--accent); }
#output { max-height: 32vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
#output p { margin: .4rem 0; }
.prompt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; }
.prompt label { font-size: 1.6rem; color: var(--accent); margin: 0; }
.shortcuts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 640px) {
  .frame { width: calc(100% - 2rem); }
  .rail { min-height: 3.6rem; }
  .login-layout { grid-template-columns: 1fr; gap: 1.4rem; }
  .orbit { width: 5rem; }
  .mirror { width: 1.6rem; height: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .progress::before { animation: none; }
}
