.project-access-shell {
  --project-accent: #25292b;
  --project-accent-soft: rgba(37, 41, 43, 0.12);
  --project-line: rgba(70, 75, 78, 0.24);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(17rem, 0.82fr) minmax(22rem, 1.18fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  width: min(72rem, calc(100% - 3rem));
  min-height: calc(100svh - 8.5rem);
  margin: 0 auto;
  padding: clamp(7rem, 13vh, 10rem) 0 4rem;
}

.theme-mai {
  --project-accent: #25292b;
  --project-accent-soft: rgba(37, 41, 43, 0.12);
  --project-line: rgba(70, 75, 78, 0.24);
}

.theme-ai-core {
  --project-accent: #285a61;
  --project-accent-soft: rgba(40, 90, 97, 0.13);
  --project-line: rgba(48, 102, 109, 0.24);
}

.theme-keystone {
  --project-accent: #76583a;
  --project-accent-soft: rgba(118, 88, 58, 0.12);
  --project-line: rgba(118, 88, 58, 0.24);
}

.theme-skillforge {
  --project-accent: #7d4139;
  --project-accent-soft: rgba(125, 65, 57, 0.12);
  --project-line: rgba(125, 65, 57, 0.24);
}

.theme-mate {
  --project-accent: #294a38;
  --project-accent-soft: rgba(41, 74, 56, 0.13);
  --project-line: rgba(41, 74, 56, 0.24);
}

.project-access-identity {
  position: relative;
  min-width: 0;
}

.project-access-back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: 2.5rem;
  color: rgba(26, 30, 31, 0.68);
  font-size: 0.82rem;
  text-decoration: none;
}

.project-access-back::before {
  width: 1.75rem;
  height: 1px;
  margin-right: 0.65rem;
  background: currentColor;
  content: "";
  transition: width 180ms ease;
}

.project-access-back:hover::before,
.project-access-back:focus-visible::before {
  width: 2.25rem;
}

.project-access-identity > p {
  margin: 0 0 0.65rem;
  color: var(--project-accent);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-access-identity > h1 {
  max-width: 10ch;
  margin: 0;
  color: #1d2021;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 500;
  line-height: 0.92;
}

.project-access-rule {
  position: relative;
  width: min(16rem, 80%);
  height: 1px;
  margin: 2.2rem 0;
  background: linear-gradient(90deg, var(--project-accent), transparent);
}

.project-access-rule span {
  position: absolute;
  top: -0.2rem;
  left: 30%;
  width: 0.4rem;
  height: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: var(--project-accent);
  box-shadow: 0 0 0 0.25rem var(--project-accent-soft);
}

.project-access-track {
  position: relative;
  display: grid;
  gap: 0;
  width: min(19rem, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-access-track::before {
  position: absolute;
  top: 1.15rem;
  bottom: 1.15rem;
  left: 1.1rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--project-line) 12%, var(--project-line) 88%, transparent);
  content: "";
}

.project-access-track li {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  align-items: center;
  min-height: 2.5rem;
  color: rgba(30, 34, 35, 0.42);
  font-size: 0.76rem;
}

.project-access-track li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(238, 238, 236, 0.72);
  box-shadow: inset 0 0 0 1px rgba(63, 69, 71, 0.08);
  font-size: 0.56rem;
}

.project-access-track li strong {
  font-weight: 600;
}

.project-access-track li.is-current {
  color: var(--project-accent);
}

.project-access-track li.is-current > span {
  border-color: rgba(255, 255, 255, 0.92);
  background: var(--project-accent);
  color: #fff;
  box-shadow: 0 0.4rem 1.2rem var(--project-accent-soft), inset 0 1px rgba(255, 255, 255, 0.3);
}

.project-access-aperture,
.project-access-confirmed,
.project-access-status {
  position: relative;
  min-width: 0;
}

.project-access-form-frame,
.project-access-confirmed {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(232, 232, 229, 0.22)),
    rgba(242, 242, 239, 0.28);
  box-shadow:
    0 1.7rem 4.5rem rgba(64, 60, 55, 0.14),
    inset 0 1px rgba(255, 255, 255, 0.88),
    inset 0 -1px rgba(72, 70, 67, 0.12);
  -webkit-backdrop-filter: blur(28px) saturate(1.24);
  backdrop-filter: blur(28px) saturate(1.24);
}

.project-access-form-frame::before,
.project-access-confirmed::before {
  position: absolute;
  inset: 0.45rem 0.45rem auto;
  height: 34%;
  border-top: 1px solid rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
  content: "";
}

.project-access-form-frame::after {
  position: absolute;
  top: 0;
  right: 2.6rem;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--project-line), transparent);
  pointer-events: none;
  content: "";
}

.project-access-form-heading,
.project-access-form,
.project-access-boundary {
  position: relative;
  z-index: 1;
}

.project-access-form-heading {
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.35rem, 4vw, 2.8rem) 1.5rem;
}

.project-access-form-heading > span {
  color: var(--project-accent);
  font-size: 0.7rem;
  font-weight: 700;
}

.project-access-form-heading h2 {
  max-width: 18ch;
  margin: 1rem 0 0.75rem;
  color: #1e2223;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.05;
}

.project-access-form-heading p {
  max-width: 42rem;
  margin: 0;
  color: rgba(31, 35, 36, 0.66);
  font-size: 0.94rem;
  line-height: 1.65;
}

.project-access-form {
  display: grid;
  gap: 0.75rem;
  padding: 0 clamp(1.35rem, 4vw, 2.8rem) clamp(1.4rem, 4vw, 2.5rem);
}

.project-access-form label {
  color: rgba(30, 34, 35, 0.72);
  font-size: 0.76rem;
  font-weight: 650;
}

.project-access-input {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72), inset 0 -1px rgba(56, 61, 62, 0.08);
}

.project-access-input:focus-within {
  border-color: color-mix(in srgb, var(--project-accent) 58%, white);
  box-shadow: 0 0 0 3px var(--project-accent-soft), inset 0 1px rgba(255, 255, 255, 0.8);
}

.project-access-input input {
  width: 100%;
  min-height: 3.4rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1c2021;
  font: inherit;
  padding: 0 1rem;
}

.project-access-input input::placeholder {
  color: rgba(38, 43, 44, 0.4);
}

.project-access-error {
  min-height: 1.25rem;
  margin: 0;
  color: #7b332d;
  font-size: 0.78rem;
}

.project-access-form button,
.project-access-confirmed button {
  min-height: 3.25rem;
  border: 1px solid rgba(228, 232, 231, 0.34);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent 48%),
    color-mix(in srgb, var(--project-accent) 90%, #111);
  box-shadow: 0 0.85rem 1.8rem var(--project-accent-soft), inset 0 1px rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.project-access-form button:hover,
.project-access-form button:focus-visible,
.project-access-confirmed button:hover,
.project-access-confirmed button:focus-visible {
  filter: brightness(1.08);
}

.project-access-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.project-access-form .project-access-retry {
  border-color: var(--project-line);
  background: rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
  color: var(--project-accent);
}

.project-access-boundary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  padding: 1rem clamp(1.35rem, 4vw, 2.8rem);
  color: rgba(33, 37, 38, 0.48);
  font-size: 0.66rem;
}

.project-access-status,
.project-access-confirmed {
  padding: 2rem;
}

.project-access-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(30, 34, 35, 0.66);
}

.project-access-status > span {
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--project-line);
  border-top-color: var(--project-accent);
  border-radius: 50%;
  animation: project-access-spin 1.1s linear infinite;
}

.project-access-confirmed > span {
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-bottom: 1.5rem;
  background: var(--project-accent);
  box-shadow: 0 0.35rem 1.4rem var(--project-accent-soft);
}

.project-access-confirmed h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
}

.project-access-confirmed p {
  margin: 0 0 1.5rem;
  color: rgba(30, 34, 35, 0.64);
}

.project-access-confirmed button {
  width: 100%;
}

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

@media (max-width: 720px) {
  .project-access-shell {
    grid-template-columns: 1fr;
    gap: 1.7rem;
    width: min(100% - 1.25rem, 35rem);
    min-height: auto;
    padding: 6.8rem 0 2.5rem;
  }

  .project-access-back {
    margin-bottom: 1.3rem;
  }

  .project-access-identity > h1 {
    max-width: none;
    font-size: clamp(2.65rem, 15vw, 4.5rem);
  }

  .project-access-rule {
    margin: 1.35rem 0;
  }

  .project-access-track {
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
  }

  .project-access-track::before {
    inset: 0.66rem 8% auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--project-line) 12%, var(--project-line) 88%, transparent);
  }

  .project-access-track li {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 3.3rem;
    text-align: center;
  }

  .project-access-track li strong {
    max-width: 9ch;
    font-size: 0.58rem;
  }

  .project-access-boundary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-access-back::before,
  .project-access-form button,
  .project-access-confirmed button {
    transition: none;
  }

  .project-access-status > span {
    animation: none;
  }
}
