:root {
  --pilot-ink: #142234;
  --pilot-muted: #5d6875;
  --pilot-line: #d9e1e7;
  --pilot-teal: #0b6973;
  --pilot-teal-dark: #07525b;
  --pilot-warm: #b95f4a;
  --pilot-surface: #ffffff;
  --pilot-bg: #eef4f6;
}

body.pilot-auth-pending > :not(#pilot-access-root),
body.pilot-auth-required > :not(#pilot-access-root) {
  display: none !important;
}

.pilot-account-identity {
  align-items: center;
  color: #385568;
  display: flex;
  font-size: 0.78rem;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0;
  margin: -4px auto 12px;
  min-height: 24px;
  padding: 0 16px;
  text-align: center;
}

.pilot-account-identity strong {
  color: #162b3a;
  font-size: 0.84rem;
  font-weight: 700;
}

.pilot-account-identity span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  white-space: nowrap;
}

.pilot-account-identity span::before {
  background: #18835f;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

#pilot-access-root[hidden] {
  display: none !important;
}

#pilot-access-root {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--pilot-ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(238, 244, 246, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(11, 105, 115, 0.055) 59px 60px),
    repeating-linear-gradient(0deg, transparent 0 59px, rgba(11, 105, 115, 0.055) 59px 60px),
    var(--pilot-bg);
  font-family: Inter, "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pilot-access-panel {
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid var(--pilot-line);
  border-radius: 8px;
  background: var(--pilot-surface);
  box-shadow: 0 22px 55px rgba(20, 34, 52, 0.14);
}

.pilot-access-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
}

.pilot-access-brand img {
  width: 52px;
  height: 52px;
}

.pilot-access-brand p,
.pilot-access-brand strong,
.pilot-access-copy,
.pilot-access-notice,
.pilot-access-status {
  margin: 0;
}

.pilot-access-brand p {
  color: var(--pilot-teal-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pilot-access-brand strong {
  display: block;
  margin-top: 2px;
  font-size: 1.2rem;
}

.pilot-access-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.pilot-access-copy {
  color: var(--pilot-muted);
  line-height: 1.55;
}

.pilot-access-notice {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--pilot-warm);
  background: #fff6f1;
  color: #63372d;
  font-size: 0.9rem;
  line-height: 1.45;
}

.pilot-access-form {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.pilot-access-form[hidden] {
  display: none;
}

.pilot-membership {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.pilot-membership[hidden] {
  display: none;
}

.pilot-membership-eyebrow,
.pilot-membership h2,
.pilot-membership p {
  margin: 0;
}

.pilot-membership-eyebrow {
  color: var(--pilot-teal-dark);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pilot-membership h2 {
  font-size: 1.2rem;
  line-height: 1.25;
}

.pilot-membership-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-block: 1px solid var(--pilot-line);
}

.pilot-membership-price strong {
  font-size: 1.35rem;
}

.pilot-membership-price span,
.pilot-membership > p,
.pilot-membership small {
  color: var(--pilot-muted);
  line-height: 1.45;
}

.pilot-membership-price span,
.pilot-membership small {
  font-size: 0.8rem;
}

.pilot-access-form label {
  font-size: 0.86rem;
  font-weight: 750;
}

.pilot-access-form input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #bcc8d0;
  border-radius: 6px;
  color: var(--pilot-ink);
  background: #fff;
  font: inherit;
}

.pilot-access-form input:focus-visible,
.pilot-access-form button:focus-visible,
.pilot-membership button:focus-visible,
.pilot-access-links a:focus-visible,
.pilot-access-footer a:focus-visible {
  outline: 3px solid rgba(11, 105, 115, 0.28);
  outline-offset: 2px;
}

.pilot-access-primary,
.pilot-access-secondary,
.pilot-access-danger {
  min-height: 46px;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.pilot-access-primary {
  margin-top: 5px;
  border: 1px solid var(--pilot-teal);
  color: #fff;
  background: var(--pilot-teal);
}

.pilot-access-primary:hover {
  background: var(--pilot-teal-dark);
}

.pilot-access-secondary {
  border: 1px solid transparent;
  color: var(--pilot-teal-dark);
  background: transparent;
}

.pilot-access-danger {
  border: 1px solid #caa39a;
  color: #7c352b;
  background: #fff;
}

.pilot-access-danger:hover {
  background: #fff4f1;
}

.pilot-access-primary:disabled,
.pilot-access-secondary:disabled,
.pilot-access-danger:disabled {
  cursor: wait;
  opacity: 0.58;
}

.pilot-access-help {
  color: var(--pilot-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.pilot-access-status {
  min-height: 22px;
  margin-top: 14px;
  color: #82412f;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.4;
}

.pilot-access-status[data-state="ok"] {
  color: #166340;
}

.pilot-access-captcha {
  min-height: 65px;
  margin-top: 4px;
}

.pilot-access-captcha[hidden] {
  display: none;
}

.pilot-access-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--pilot-line);
  color: var(--pilot-muted);
  font-size: 0.78rem;
}

.pilot-access-footer a {
  color: var(--pilot-teal-dark);
  font-weight: 750;
}

.pilot-access-links {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  text-align: right;
}

@media (max-width: 520px) {
  .pilot-account-identity {
    flex-wrap: wrap;
    margin-bottom: 9px;
    row-gap: 2px;
  }

  #pilot-access-root {
    place-items: stretch;
    padding: 0;
    background: var(--pilot-surface);
  }

  .pilot-access-panel {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    padding: 24px 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .pilot-access-footer {
    flex-direction: column;
  }

  .pilot-access-links {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  #pilot-access-root *,
  #pilot-access-root *::before,
  #pilot-access-root *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
