:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #030303;
  color: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.12), transparent 30rem),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.06), transparent 22rem),
    #030303;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  isolation: isolate;
}

.gate {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  text-align: center;
}

.gate-message {
  text-align: center;
}

.gate-app {
  width: min(100%, 1120px);
  padding: 72px 0;
}

.bloom {
  position: absolute;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  filter: blur(70px);
  opacity: 0.32;
}

.bloom-a {
  top: 18%;
  left: 19%;
}

.bloom-b {
  right: 18%;
  bottom: 20%;
  opacity: 0.24;
}

h1 {
  margin: 0 0 32px;
  color: #fff;
  font-size: clamp(3rem, 13vw, 5.6rem);
  font-weight: 740;
  line-height: 0.9;
  text-align: center;
  letter-spacing: 0;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.74),
    0 0 34px rgba(255, 255, 255, 0.36),
    0 0 72px rgba(255, 255, 255, 0.22);
}

form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(100%, 480px);
  margin: 0 auto;
}

input,
form button {
  height: 46px;
  border-radius: 3px;
  font: inherit;
}

input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 0 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 22px rgba(255, 255, 255, 0.06);
}

input:focus {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 0 28px rgba(255, 255, 255, 0.22);
}

form button {
  border: 1px solid rgba(255, 255, 255, 0.84);
  background: #fff;
  color: #050505;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.24);
}

form button:hover {
  background: #e8e8e8;
}

.error,
.status {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
  text-align: center;
}

.error {
  color: #ffffff;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.hub {
  width: 100%;
  margin-top: 34px;
  text-align: left;
}

.project-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 0 0 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.project-tab {
  display: grid;
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  cursor: pointer;
  font: inherit;
  padding: 11px 12px;
  text-align: left;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 22px rgba(255, 255, 255, 0.05);
}

.project-tab:hover,
.project-tab.is-active {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 30px rgba(255, 255, 255, 0.15);
}

.project-tab span {
  font-weight: 720;
  overflow-wrap: anywhere;
}

.project-tab small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
}

.project-stage,
.loading-panel {
  min-width: 0;
}

.project-panel {
  min-width: 0;
  padding: 16px 0 0;
}

.loading-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.5);
  padding: 24px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 30px rgba(255, 255, 255, 0.07);
}

.project-kicker {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-panel h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.85rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.42),
    0 0 32px rgba(255, 255, 255, 0.18);
}

.project-panel > p {
  width: min(100%, 760px);
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.project-details {
  display: grid;
  gap: 0;
  width: min(100%, 680px);
  margin: 24px 0 0;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.project-actions a {
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 4px;
  background: #fff;
  color: #050505;
  padding: 11px 14px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.18);
}

.shared-plate-strip {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  overflow-x: auto;
  padding: 2px 0 16px;
  scroll-snap-type: x mandatory;
}

.shared-plate-card {
  flex: 0 0 min(82vw, 290px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.52);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 30px rgba(255, 255, 255, 0.07);
  scroll-snap-align: start;
}

.shared-plate-card img,
.shared-plate-empty {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.08);
}

.shared-plate-card img {
  object-fit: cover;
}

.shared-plate-empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.86rem;
  font-weight: 700;
}

.shared-plate-body {
  padding: 14px;
}

.shared-plate-number {
  display: inline-block;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 4px;
  background: #fff;
  color: #080808;
  padding: 5px 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.shared-plate-card h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.shared-plate-card p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  line-height: 1.4;
}

.shared-plate-card small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.78rem;
}

.empty-shared-library {
  width: min(100%, 680px);
  margin-top: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 18px;
}

.empty-shared-library p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
}

.intel-heading {
  width: min(100%, 720px);
  margin: 0 auto 24px;
  text-align: center;
}

.intel-heading h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.42),
    0 0 32px rgba(255, 255, 255, 0.18);
}

.intel-heading p,
.intel-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.intel-panel {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.5);
  padding: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 30px rgba(255, 255, 255, 0.07);
}

.intel-panel h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.intel-panel dl {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
}

.intel-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.intel-row dt {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.84rem;
}

.intel-row dd {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.45;
}

.intel-row span {
  display: block;
  overflow-wrap: anywhere;
}

.intel-row small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .shell {
    padding: 18px;
  }

  form {
    grid-template-columns: 1fr;
  }

  form button {
    width: 100%;
  }

  .gate-app {
    padding: 42px 0;
  }

  .intel-grid {
    grid-template-columns: 1fr;
  }

  .project-tabs {
    margin-right: -18px;
    margin-left: -18px;
    padding: 0 18px 6px;
  }

  .project-tab {
    min-width: 136px;
  }

  .loading-panel {
    padding: 18px;
  }

  .intel-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
