.access-page {
  isolation: isolate;
}

.access-estuary {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.access-page .site-name {
  width: 129px;
  margin-inline: auto;
}

.access-page .name-mark {
  width: 129px;
}

.access-main {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100svh;
  width: min(var(--content-desktop), calc(100% - 24px));
  margin: 0 auto;
  padding: 100px 0;
  place-items: center;
  text-align: center;
}

.access-panel {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 52px;
}

.access-form {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.password-control {
  position: relative;
  width: 244px;
  height: 52px;
}

.password-slots {
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.password-slot {
  position: relative;
  display: flex;
  width: 44px;
  height: 52px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--tag-bg);
  font-size: 24px;
  line-height: 24px;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.password-slot.is-active {
  border-color: var(--text);
}

.password-digit {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(0, 0, 0, 0.22);
  line-height: 1;
  text-box-trim: none;
  text-box: normal;
}

.password-slot.is-filled .password-digit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  transform: translate(-50%, -50%);
}

.password-slot.is-entering .password-digit {
  animation: digit-in 180ms cubic-bezier(0.22, 1.3, 0.36, 1);
}

.password-input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  -webkit-text-fill-color: transparent;
  font: inherit;
  font-size: 24px;
  letter-spacing: 36px;
  text-indent: 15px;
  cursor: text;
}

.password-input::selection {
  background: transparent;
}

.password-input:focus-visible {
  outline: none;
}

.access-form.is-verifying .password-slot {
  animation: verifying 600ms ease-in-out infinite;
  animation-delay: calc(var(--slot) * 100ms);
}

.access-form.is-error .password-control {
  animation: password-shake 450ms ease;
}

.access-form.is-error .password-slot {
  border-color: #b12d27;
  background: #fff0ef;
}

.access-form.is-error .password-digit {
  color: #b12d27;
}

.access-form.is-error .password-slot.is-filled .password-digit::before {
  background: #b12d27;
}

.access-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.access-contact {
  justify-content: center;
}

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

@keyframes digit-in {
  from { opacity: 0.25; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes password-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-2.5px); }
  80% { transform: translateX(2.5px); }
}

@keyframes verifying {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 760px) {
  .access-main {
    width: min(var(--content-mobile), calc(100% - 24px));
  }
}

/* A normal password field remains usable when JavaScript is unavailable. */
html:not(.js) .password-input {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 12px;
  background: var(--tag-bg);
  color: var(--text);
  caret-color: var(--text);
  -webkit-text-fill-color: var(--text);
  text-indent: 0;
  letter-spacing: 4px;
}

html:not(.js) .password-slots { visibility: hidden; }
