:root {
  color: #f6f8ff;
  background: #05070d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #070a10 0%, #05070d 48%, #03050a 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: clamp(56px, 10vh, 104px) 24px 24px;
  isolation: isolate;
}

.shell::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.28;
}

.shell::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: linear-gradient(to bottom, rgba(5, 7, 13, 0.02), rgba(5, 7, 13, 0.56));
}

.snow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.snow span {
  position: absolute;
  inset: -12vh 0 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 1.2px, transparent 1.9px),
    radial-gradient(circle, rgba(255, 255, 255, 0.44) 0 1px, transparent 1.8px);
  background-position: 0 0, 38px 44px;
  background-size: 118px 118px, 166px 166px;
  opacity: 0.58;
  animation: snowfall 18s linear infinite;
}

.snow span:nth-child(1) {
  animation-duration: 16s;
}

.snow span:nth-child(2) {
  background-size: 154px 154px, 214px 214px;
  background-position: 50px 10px, 8px 80px;
  opacity: 0.28;
  animation-duration: 24s;
  animation-delay: -8s;
}

.snow span:nth-child(3) {
  background-size: 220px 220px, 280px 280px;
  background-position: 120px 30px, 40px 120px;
  opacity: 0.24;
  animation-duration: 34s;
  animation-delay: -14s;
}

.access-panel,
.space-page {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(9, 12, 20, 0.82);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.access-panel {
  display: grid;
  gap: 24px;
  max-width: 520px;
  padding: 30px;
}

.panel-top,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-top {
  justify-content: flex-start;
}

h1,
h2,
p {
  margin: 0;
}

.brand-copy p,
.topbar-copy p,
label {
  color: #9eacbf;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-top: 0;
  font-size: clamp(2.35rem, 4vw, 3.25rem);
  line-height: 0.92;
  font-weight: 950;
  letter-spacing: 0;
}

.access-copy {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.access-copy h2 {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 850;
}

.access-copy p,
.approval-box p,
.status {
  color: #b8c3d4;
  line-height: 1.55;
}

.key-form,
.search-wrap {
  display: grid;
  gap: 10px;
}

.key-form.is-muted {
  opacity: 0.62;
}

.input-row,
.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f6f8ff;
  padding: 0 15px;
}

input::placeholder {
  color: rgba(246, 248, 255, 0.42);
}

input:focus {
  border-color: #58a6ff;
  box-shadow: none;
}

button,
.quick-links a {
  min-height: 52px;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

button {
  border: 0;
  background: #f6f8ff;
  color: #070a10;
  padding: 0 20px;
}

button:hover,
.quick-links a:hover {
  transform: translateY(-1px);
}

.secondary-button {
  min-width: 84px;
  background: rgba(255, 255, 255, 0.08);
  color: #f6f8ff;
}

.approval-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(245, 196, 81, 0.28);
  border-radius: 8px;
  background: rgba(245, 196, 81, 0.08);
  padding: 14px;
}

.approval-box strong {
  color: #ffe29a;
}

.loader {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(245, 196, 81, 0.25);
  border-top-color: #f5c451;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.status {
  min-height: 24px;
  font-size: 0.95rem;
}

.status[data-tone="success"] {
  color: #46d39a;
}

.status[data-tone="error"] {
  color: #ff8585;
}

.space-page {
  display: grid;
  gap: 30px;
  padding: 28px;
}

.search-box input,
.search-box button {
  min-height: 64px;
}

.search-box input {
  font-size: 1.12rem;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-links a {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  color: #d7deea;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes snowfall {
  to {
    transform: translate3d(-42px, 118vh, 0);
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 48px 16px 16px;
  }

  .access-panel,
  .space-page {
    padding: 20px;
  }

  .panel-top,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .input-row,
  .search-box,
  .quick-links {
    grid-template-columns: 1fr;
  }

  button,
  .secondary-button,
  .quick-links a {
    width: 100%;
  }
}
