.ui-entry-page {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  color: var(--maj-ink);
}

.ui-entry-page::before,
.ui-entry-page::after {
  position: absolute;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--maj-mint-strong) 18%, transparent);
  background: color-mix(in srgb, var(--maj-mint) 34%, transparent);
  box-shadow: var(--maj-shadow-raised), var(--maj-shadow-inset);
  content: "";
  pointer-events: none;
}

.ui-entry-page::before {
  top: clamp(90px, 13vh, 170px);
  left: max(-180px, -12vw);
  width: min(460px, 58vw);
  aspect-ratio: 1;
  border-radius: 44% 56% 52% 48% / 54% 43% 57% 46%;
  transform: rotate(-7deg);
  animation: entry-atmosphere-left 14s var(--maj-ease-standard) -5s infinite alternate;
}

.ui-entry-page::after {
  right: max(-160px, -10vw);
  bottom: clamp(220px, 28vh, 360px);
  width: min(330px, 45vw);
  aspect-ratio: 1;
  border-radius: 58% 42% 45% 55% / 48% 61% 39% 52%;
  background: color-mix(in srgb, var(--maj-terracotta-soft) 38%, transparent);
  transform: rotate(9deg);
  animation: entry-atmosphere-right 16s var(--maj-ease-standard) -8s infinite alternate;
}

.ui-entry-main {
  display: grid;
  width: min(calc(100% - 32px), var(--maj-content));
  flex: 1;
  margin-inline: auto;
  padding-block: clamp(var(--maj-space-7), 8vw, calc(var(--maj-space-8) * 2));
  place-items: center;
}

.ui-entry-card {
  position: relative;
  width: min(100%, 560px);
  padding: clamp(var(--maj-space-5), 5vw, var(--maj-space-7));
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--maj-forest) 14%, var(--maj-line));
  border-radius: var(--maj-radius-panel);
  background: color-mix(in srgb, var(--maj-surface) 94%, transparent);
  box-shadow: var(--maj-shadow-modal);
  backdrop-filter: blur(18px) saturate(1.04);
}

.ui-entry-card--wide { width: min(100%, 680px); }

.ui-entry-main:has(.login-entry-card) { min-height: 100svh; padding-block: 20px; }
.login-entry-card { padding: clamp(20px, 3vw, 32px); }
.login-entry-card .ui-entry-header { margin-bottom: 24px; }
.login-entry-card .ui-entry-copy { grid-template-columns: minmax(0, 1fr) 104px; column-gap: 16px; margin-bottom: 24px; }
.login-entry-card .ui-entry-copy h1 { grid-column: 1; margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.12; }
.login-entry-card .ui-entry-intro { grid-column: 1; margin: 0; font-size: 1rem; line-height: 1.5; }
.login-entry-card .ui-entry-copy > .ui-editorial-picture { display: block; grid-column: 2; grid-row: 1 / 3; align-self: center; }
.login-illustration { width: 100%; height: auto; margin: 0; }
.login-entry-card .entry-feedback:empty { display: none; }
@media (max-width: 430px) {
  .login-entry-card .ui-entry-copy { grid-template-columns: minmax(0, 1fr) 64px; column-gap: 10px; margin-bottom: 18px; }
  .login-entry-card .ui-entry-header { margin-bottom: 18px; }
}
@media (max-height: 600px) {
  .ui-entry-main:has(.login-entry-card) { padding-block: 12px; }
}

.ui-entry-header {
  display: flex;
  gap: var(--maj-space-4);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--maj-space-7);
}

.ui-entry-copy { display: grid; gap: var(--maj-space-3); }

.ui-entry-eyebrow {
  width: fit-content;
  margin: 0;
  padding: 7px 11px;
  border-radius: var(--maj-radius-pill);
  color: var(--maj-sage-ink);
  background: var(--maj-sage-soft);
  box-shadow: var(--maj-shadow-inset);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ui-entry-copy h1 { max-width: 540px; }

.ui-entry-intro {
  max-width: 560px;
  margin: 0 0 var(--maj-space-6);
  color: var(--maj-muted);
}

.entry-editorial-illustration {
  width: min(180px, 42%);
  max-height: 150px;
  margin: calc(var(--maj-space-4) * -1) 0 var(--maj-space-4) auto;
}

.entry-session {
  margin-bottom: var(--maj-space-5);
  padding: var(--maj-space-4);
  border: 1px solid color-mix(in srgb, var(--maj-sage) 30%, var(--maj-line));
  border-radius: var(--maj-radius-medium);
  background: color-mix(in srgb, var(--maj-mint) 72%, var(--maj-surface));
  box-shadow: var(--maj-shadow-raised);
}

.entry-session > span {
  display: block;
  margin-bottom: var(--maj-space-2);
  color: var(--maj-sage-ink);
  font-size: var(--maj-text-caption);
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.entry-session-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--maj-space-3);
  justify-content: stretch;
  border-radius: var(--maj-radius-control);
  text-align: left;
}

.entry-session-action small { font-size: var(--maj-text-caption); font-weight: 700; }
.entry-session-action strong { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-session-action .ui-action__icon { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 1.2rem; }

.entry-session p {
  margin: var(--maj-space-3) var(--maj-space-1) 0;
  color: var(--maj-muted);
  font-size: var(--maj-text-caption);
  line-height: 1.5;
}

.entry-session-signout { margin-top: var(--maj-space-2); }

.entry-separator {
  display: grid;
  grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
  gap: var(--maj-space-3);
  align-items: center;
  margin: 0 0 var(--maj-space-5);
  color: var(--maj-muted);
  font-size: var(--maj-text-caption);
  font-weight: 750;
  text-align: center;
}

.entry-separator::before,
.entry-separator::after {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--maj-line));
  content: "";
}

.entry-separator::after { background: linear-gradient(90deg, var(--maj-line), transparent); }

.entry-form { display: grid; gap: var(--maj-space-2); }
.entry-form label { margin-left: 2px; font-size: var(--maj-text-label); font-weight: 800; }
.entry-form .entry-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 8px 2px 4px;
  color: var(--maj-muted);
  font-size: .72rem;
  font-weight: 520;
  line-height: 1.5;
  cursor: pointer;
}
.entry-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--maj-forest);
}
.entry-consent strong { color: var(--maj-forest); font-weight: 800; }

.entry-field {
  width: 100%;
  min-height: var(--maj-field-height);
  padding: var(--maj-space-3) var(--maj-space-4);
  border: 1px solid var(--maj-line);
  border-radius: var(--maj-radius-control);
  color: var(--maj-ink);
  background: color-mix(in srgb, var(--maj-paper-deep) 70%, var(--maj-surface));
  box-shadow: var(--maj-shadow-inset);
  font: inherit;
  transition: border-color var(--maj-motion-fast) ease, box-shadow var(--maj-motion-base) ease, background-color var(--maj-motion-fast) ease;
}

.entry-field::placeholder { color: color-mix(in srgb, var(--maj-muted) 78%, transparent); }
.entry-field:hover { border-color: var(--maj-border-hover); }
.entry-field:focus { border-color: var(--maj-terracotta); outline: 3px solid var(--maj-focus-outline); outline-offset: 2px; box-shadow: var(--maj-shadow-inset), var(--maj-focus-ring); }

.entry-submit { margin-top: var(--maj-space-2); }
.entry-submit-arrow { display: inline-block; font-size: 1.15rem; font-weight: 900; transition: transform var(--maj-motion-base) var(--maj-ease-standard); }
.entry-submit:hover .entry-submit-arrow { transform: translateX(4px); }

.entry-feedback {
  min-height: var(--maj-space-5);
  margin: var(--maj-space-1) 0 0;
  color: var(--maj-sage-ink);
  font-size: var(--maj-text-label);
  font-weight: 720;
}

.entry-feedback:not(:empty),
.entry-notice {
  padding: var(--maj-space-3) var(--maj-space-4);
  border: 1px solid color-mix(in srgb, var(--maj-sage) 30%, var(--maj-line));
  border-radius: var(--maj-radius-control);
  background: var(--maj-sage-soft);
  box-shadow: var(--maj-shadow-inset);
}

.entry-feedback.entry-feedback--error,
.entry-notice.entry-notice--warning {
  border-color: color-mix(in srgb, var(--maj-terracotta) 38%, var(--maj-line));
  color: var(--maj-terracotta-ink);
  background: var(--maj-terracotta-soft);
}

.entry-note {
  margin: var(--maj-space-5) 0 0;
  padding: var(--maj-space-4) var(--maj-space-1) 0;
  border-top: 1px solid var(--maj-line);
  color: var(--maj-muted);
}

.entry-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--maj-space-2);
  margin: 0 0 var(--maj-space-5);
  padding: 0;
  list-style: none;
}

.entry-benefits li {
  position: relative;
  padding: var(--maj-space-3) var(--maj-space-3) var(--maj-space-3) 34px;
  border: 1px solid var(--maj-line);
  border-radius: var(--maj-radius-control);
  background: color-mix(in srgb, var(--maj-mint-light) 62%, var(--maj-surface));
  box-shadow: var(--maj-shadow-raised);
  font-size: var(--maj-text-caption);
  font-weight: 720;
  line-height: 1.45;
}

.entry-benefits li::before {
  position: absolute;
  top: var(--maj-space-3);
  left: var(--maj-space-3);
  color: var(--maj-sage-ink);
  content: "✓";
  font-weight: 900;
}

.entry-notice { margin: 0 0 var(--maj-space-4); color: var(--maj-sage-ink); line-height: var(--maj-leading-body); }
.entry-next-step { display: grid; gap: var(--maj-space-3); }
.entry-next-step .entry-notice { margin: 0; }
.entry-spam-advice h2 { padding-right: 32px; }
.entry-spam-advice p { color: var(--maj-muted); line-height: var(--maj-leading-body); overflow-wrap: anywhere; }
.entry-spam-advice__actions { display: flex; flex-wrap: wrap; gap: var(--maj-space-3); margin-top: var(--maj-space-5); }
.entry-spam-advice__actions > .ui-action { flex: 1 1 170px; }

@keyframes entry-atmosphere-left {
  to { transform: translate(16px, -10px) rotate(-3deg) scale(1.025); }
}

@keyframes entry-atmosphere-right {
  to { transform: translate(-12px, 8px) rotate(5deg) scale(1.02); }
}

@media (max-width: 640px) {
  .ui-entry-main { width: min(calc(100% - 20px), var(--maj-content)); padding-block: var(--maj-space-6) var(--maj-space-7); }
  .ui-entry-card { padding: var(--maj-space-5); border-radius: var(--maj-radius-card); }
  .ui-entry-header { margin-bottom: var(--maj-space-6); }
  .ui-entry-header .ui-brand__name { display: none; }
  .entry-benefits { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ui-entry-page::before,
  .ui-entry-page::after { animation: none; }
  .entry-field,
  .entry-submit-arrow { transition: none; }
}
