* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f1efff;
  background: #0a1021;
  --accent: #8acbff;
  --gutter: clamp(1.5rem, 7vw, 6rem);
}

body {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: radial-gradient(ellipse at 83% 48%, #2d3b5f, transparent 59%), #0a1021;
}

.site-header,
main {
  position: relative;
  z-index: 1;
  width: min(100%, 78rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  padding-top: clamp(1.25rem, 5vh, 3.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  color: inherit;
  font-weight: 600;
  letter-spacing: .025em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #4c6b90;
  border-radius: .5rem;
  color: var(--accent);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 1.15rem;
  height: .55rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: rotate(-43deg);
  content: "";
}

.brand-mark::after {
  transform: rotate(43deg);
}

.brand-mark span {
  width: .24rem;
  height: .24rem;
  border-radius: 50%;
  background: currentColor;
}

.orbit-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orbit-scene span {
  position: absolute;
  top: 48%;
  left: 76%;
  width: min(var(--diameter), var(--max-width));
  aspect-ratio: 1.69;
  border: 1px solid #8acbff6e;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-22deg);
}

.orbit-scene span:nth-child(1) { --diameter: 46vw; --max-width: 52rem; }
.orbit-scene span:nth-child(2) { --diameter: 36vw; --max-width: 40rem; }
.orbit-scene span:nth-child(3) { --diameter: 25vw; --max-width: 28rem; }
.orbit-scene span:nth-child(4) {
  --diameter: 14vw;
  --max-width: 16rem;
  background: radial-gradient(circle, #8acbff99, transparent 74%);
}

.orbit-scene span:nth-child(2)::before {
  position: absolute;
  top: 10%;
  left: 17%;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 1.25rem var(--accent);
  content: "";
}

main {
  align-self: center;
  padding-block: 2.5rem 5rem;
}

h1 {
  max-width: 12ch;
  margin: 0 0 clamp(1.45rem, 5vw, 2rem);
  font-size: clamp(3rem, 8.4vw, 6.25rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.075em;
}

p {
  margin: 0 0 1rem;
  color: #bdcce6;
  line-height: 1.6;
}

nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  width: min(100%, 30.625rem);
}

nav a,
.back-link,
button {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.5rem;
  padding: .85rem 1rem;
  border: 1px solid #394766;
  border-radius: .7rem;
  background: #131e35;
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.back-link {
  display: inline-flex;
}

nav a:hover,
.back-link:hover,
button:hover {
  border-color: var(--accent);
  background: #1c2d4a;
}

.arrow {
  margin-left: auto;
  color: var(--accent);
}

.choice-icon {
  position: relative;
  flex: 0 0 1rem;
  height: 1rem;
  color: var(--accent);
}

.person::before,
.person::after {
  position: absolute;
  border: 1px solid currentColor;
  content: "";
}

.person::before {
  inset: 0 .29rem auto;
  height: .42rem;
  border-radius: 50%;
}

.person::after {
  inset: auto .1rem 0;
  height: .43rem;
  border-radius: .45rem .45rem .12rem .12rem;
}

.door {
  border-bottom: 1px solid currentColor;
}

.door::before {
  position: absolute;
  inset: 0 .2rem 0 .18rem;
  border: 1px solid currentColor;
  border-radius: .08rem .08rem 0 0;
  content: "";
}

.door::after {
  position: absolute;
  top: .47rem;
  right: .35rem;
  width: .13rem;
  height: .13rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.sign-in-title {
  max-width: none;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
}

.sign-in {
  display: grid;
  gap: .65rem;
  width: min(100%, 24rem);
  padding: 1.35rem;
  border: 1px solid #394766;
  border-radius: .85rem;
  background: #131e35;
}

.sign-in input {
  width: 100%;
  min-height: 2.8rem;
  margin-bottom: .4rem;
  padding: .55rem .7rem;
  border: 1px solid #4c6b90;
  border-radius: .45rem;
  background: #0a1021;
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.sign-in button {
  justify-content: space-between;
  background: #1c3555;
}

.sign-in button span {
  color: var(--accent);
}

.sign-in-error {
  margin-bottom: .25rem;
  color: #ffc5cf;
}

.sign-in-back,
form + .back-link {
  margin-top: 1rem;
}

.library {
  padding-block: clamp(2rem, 8vh, 5rem);
}

.library-role {
  margin-bottom: .65rem;
  color: var(--accent);
  font-weight: 650;
}

.library-empty {
  margin: 0;
  padding: 1.25rem;
  border: 1px dashed #4c6b90;
  border-radius: .7rem;
  background: #131e35;
  width: min(100%, 32rem);
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: .75rem;
  width: min(100%, 52rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .7rem;
  height: 100%;
  padding: 1rem;
  border: 1px solid #394766;
  border-radius: .7rem;
  background: #131e35;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.app-list a:hover {
  border-color: var(--accent);
  background: #1c2d4a;
}

.app-visibility,
.app-description {
  color: #bdcce6;
}

.app-description {
  grid-column: 1 / -1;
}

@media (max-width: 38rem) {
  .orbit-scene {
    opacity: .72;
  }

  .orbit-scene span {
    top: 34%;
    left: 77%;
    scale: 1.5;
  }

  main {
    padding-block: 6rem 3.5rem;
  }

  nav a {
    gap: .45rem;
    padding-inline: .75rem;
  }
}
