/* Shared sign-in and registration layout. Loaded only by the public auth pages. */
* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --auth-motion: 780ms;
  --auth-ease: cubic-bezier(0.76, 0, 0.24, 1);
  --bg: #17151c;
  --surface: #201d26;
  --raised: #282330;
  --border: #3b3345;
  --text: #eee9f5;
  --muted: #b3a7c2;
  --dim: #92849f;
  --accent: #cfb1f2;
  --accent-ink: #302039;
  --error: #f0aaa9;
  --success: #a6d5b4;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Both panels share the header, content and footer rows. The taller view
     sets the content height, so their headings keep the same starting line. */
  grid-template-rows: minmax(112px, 1fr) auto minmax(80px, 1fr);
}
.story {
  grid-area: 1 / 1 / -1 / 2;
  z-index: 2;
  transition: transform var(--auth-motion) var(--auth-ease);
  isolation: isolate;
  min-width: 0;
  padding: 42px clamp(36px, 5vw, 84px);
  display: grid;
  grid-template-rows: subgrid;
  background:
    radial-gradient(ellipse at 15% 60%, #35253e80, transparent 68%), #1d1923;
  border-right: 1px solid #332b3d;
  position: relative;
}
.story > .brand {
  grid-row: 1;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
  align-self: flex-start;
}
.brand:hover {
  text-decoration: none;
}
.mark {
  width: 34px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid #bba0d9;
  border-radius: 9px;
  font-size: 24px;
  font-weight: 400;
  color: #d7bff0;
}
.story-body {
  grid-row: 2;
  align-self: start;
  max-width: 470px;
  width: 100%;
  margin: 0 auto;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #b29cc5;
  font-weight: 600;
  text-transform: uppercase;
}
.story h2 {
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 550;
  line-height: 1.18;
  letter-spacing: -1.5px;
  margin: 18px 0;
}
.story-intro {
  font-size: 15px;
  line-height: 1.8;
  max-width: 390px;
  color: var(--muted);
  margin: 0;
}
.work-preview {
  margin-top: 32px;
  border: 1px solid #45364f;
  border-radius: 16px;
  background: #26202dcc;
  box-shadow: 0 20px 70px #110c1926;
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px;
  border-bottom: 1px solid #44334e;
}
.preview-label {
  font-size: 10px;
  color: #b9a6c8;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}
.preview-path {
  font-size: 17px;
  color: #c7a9e4;
}
.work-steps {
  list-style: none;
  margin: 0;
  padding: 8px 22px;
}
.work-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 17px 0;
}
.work-step:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 26px;
  top: calc(50% + 18px);
  left: 17px;
  background: #56405f;
}
.step-number {
  display: grid;
  place-items: center;
  flex: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid #60476b;
  color: #bda7ce;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  background: #292130;
}
.work-step--focus .step-number {
  color: #eddaff;
  border-color: #a779c3;
  background: #4c355e;
  box-shadow: 0 0 0 5px #51336033;
}
.work-step h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 550;
  color: #e3d8ec;
}
.work-step p {
  margin: 0;
  font-size: 12px;
  color: #b4a2c2;
  line-height: 1.6;
}
.preview-footer {
  border-top: 1px solid #44334e;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  font-size: 11px;
  color: #b8a5c7;
}
.context-mark {
  color: #cdb0e4;
  font-size: 16px;
}
.story-footer {
  grid-row: 3;
  align-self: end;
  font-size: 11px;
  line-height: 18px;
  color: #9989a6;
  display: flex;
  gap: 10px;
  align-items: center;
}
.story-footer .line {
  height: 1px;
  width: 24px;
  background: #675472;
}
.auth-main {
  grid-area: 1 / 2 / -1 / 3;
  position: relative;
  z-index: 1;
  transition: transform var(--auth-motion) var(--auth-ease);
  background: var(--bg);
  display: grid;
  grid-template-rows: subgrid;
  padding: 42px 40px;
  min-width: 0;
}
.auth-shell--register .story {
  transform: translateX(100%);
  border-right: 0;
  border-left: 1px solid #332b3d;
}
.auth-shell--register .auth-main {
  transform: translateX(-100%);
}
.mobile-brand {
  display: none;
}
.auth-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 7px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.auth-switch a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
}
.auth-switch a:hover {
  color: #e8d6f7;
}
.auth-switching .story-body,
.auth-switching .auth-form,
.auth-switching .story-footer,
.auth-switching .auth-footer {
  will-change: opacity, filter;
}
.auth-form {
  grid-row: 2;
  align-self: start;
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
}
.auth-form h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.9px;
  font-weight: 570;
  margin: 18px 0 12px;
}
.lead {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 27px;
  max-width: 390px;
}
.google,
.primary,
.secondary {
  min-height: 44px;
  border-radius: 8px;
  padding: 11px 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 550;
  width: 100%;
  border: 1px solid transparent;
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
  margin-top: 24px;
}
.primary:hover {
  background: #dcbeff;
}
.google,
.secondary {
  border-color: #4b3f58;
  background: #25212c;
  color: #eee8f7;
}
.google:hover,
.secondary:hover {
  background: #302837;
  border-color: #79608c;
}
.google .g {
  font-size: 18px;
  line-height: 18px;
  font-weight: 650;
  font-family: Arial, sans-serif;
}
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #9e90ac;
  font-size: 11px;
  margin: 24px 0;
}
.divider:before,
.divider:after {
  content: "";
  height: 1px;
  background: #39313f;
  flex: 1;
}
.field {
  margin-top: 18px;
}
.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 8px;
  color: #d1c7dc;
}
.field label span {
  font-weight: 400;
  font-size: 11px;
  color: #a494b3;
}
.field input {
  background: #211d28;
  border: 1px solid #4b3f58;
  color: var(--text);
  padding: 11px 13px;
  width: 100%;
  height: 44px;
  border-radius: 8px;
  font-size: 13px;
  outline-offset: 2px;
  transition: border-color 0.15s;
}
.field input::placeholder {
  color: #9f90ae;
}
.field input:focus {
  border-color: #b99ad8;
}
.field input[aria-invalid="true"] {
  border-color: #bb747f;
}
.password {
  position: relative;
}
.password input {
  padding-right: 48px;
}
.eye {
  position: absolute;
  right: 5px;
  top: 3px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 6px;
  color: #b8a6c8;
}
.eye:hover {
  background: #342a40;
  color: #e5d2f8;
}
.eye svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hint {
  font-size: 11px;
  line-height: 1.6;
  color: #a89ab6;
  margin: 7px 0 0;
}
.field-error {
  font-size: 11px;
  color: var(--error);
  margin: 7px 0 0;
  line-height: 1.5;
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  background: #39262f;
  border: 1px solid #64404d;
  border-radius: 9px;
  margin: 0 0 22px;
  font-size: 12px;
  line-height: 1.6;
  color: #f0c3c9;
}
.alert > span {
  flex: none;
  font-size: 14px;
  line-height: 20px;
}
.alert strong {
  font-size: 12px;
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
}
.alert p {
  margin: 0;
}
.alert.info {
  background: #2b2436;
  border-color: #51415f;
  color: #d4c1e7;
}
.alert.success {
  background: #23342b;
  border-color: #435f4d;
  color: #bbddc8;
}
.help-link {
  display: block;
  text-align: center;
  margin: 17px auto 0;
  color: #c2add5;
  background: none;
  border: 0;
  font-size: 12px;
  padding: 3px;
}
.help-link:hover {
  color: #e8d6f7;
  text-decoration: underline;
}
.invite-note {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid #39313f;
  font-size: 11px;
  line-height: 1.7;
  color: #a89ab6;
}
.invite-note strong {
  font-weight: 500;
  color: #d2c2df;
}
.form-note {
  font-size: 11px;
  line-height: 1.65;
  color: #a89ab6;
  margin-top: 16px;
}
.form-note b {
  color: #cabbda;
  font-weight: 500;
}
.auth-footer {
  grid-row: 3;
  align-self: end;
  text-align: center;
  font-size: 10px;
  line-height: 18px;
  color: #9989a6;
}
.status-icon {
  width: 46px;
  height: 46px;
  background: #352841;
  border: 1px solid #5f4770;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #d9b9f8;
  font-size: 22px;
  margin-bottom: 23px;
}
.status-icon.success {
  color: #b8e0c6;
  background: #263a2e;
  border-color: #4b6755;
}
.next-card {
  margin: 23px 0 6px;
  background: #251f2d;
  border: 1px solid #43364f;
  border-radius: 10px;
  padding: 17px;
  font-size: 12px;
  color: #bcaaca;
  line-height: 1.7;
}
.next-card strong {
  display: block;
  color: #e1d4ec;
  font-weight: 550;
  margin-bottom: 5px;
}
.status-actions .secondary {
  margin-top: 12px;
}
@keyframes move {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(185%);
  }
}
dialog {
  background: #251f2d;
  color: var(--text);
  border: 1px solid #5d466e;
  border-radius: 14px;
  padding: 26px;
  width: min(460px, calc(100vw - 32px));
  box-shadow: 0 30px 100px #0009;
}
dialog::backdrop {
  background: #100c17b3;
}
dialog h2 {
  font-size: 20px;
  font-weight: 550;
  margin: 0 32px 16px 0;
}
dialog p {
  font-size: 13px;
  line-height: 1.8;
  color: #bfafcd;
}
dialog b {
  color: #e4d9ee;
  font-weight: 550;
}
.dialog-close {
  position: absolute;
  right: 15px;
  top: 13px;
  background: none;
  border: 0;
  color: #b9a4ca;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 21px;
}
@media (min-width: 1600px) {
  .story {
    padding-left: 64px;
    padding-right: 64px;
  }
  .auth-form {
    max-width: 420px;
  }
}
@media (min-width: 941px) and (max-height: 1050px) {
  .auth-shell {
    grid-template-rows: minmax(88px, 1fr) auto minmax(64px, 1fr);
  }
  .story,
  .auth-main {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}
@media (min-width: 941px) and (max-height: 850px) {
  .work-preview {
    margin-top: 24px;
  }
  .work-step {
    padding: 12px 0;
  }
}
@media (max-width: 940px) {
  .auth-shell {
    display: block;
    min-height: 100dvh;
  }
  .story {
    display: none;
  }
  .auth-main {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 24px;
  }
  .mobile-brand {
    display: inline-flex;
    font-size: 20px;
    margin-bottom: 24px;
  }
  .auth-shell--register .auth-main {
    transform: none;
  }
  .auth-form {
    margin: auto;
    padding: 36px 0;
    max-width: 410px;
  }
  .auth-footer {
    align-self: auto;
    padding: 0 0 12px;
  }
  .auth-form h1 {
    margin-top: 10px;
  }
}
@media (max-width: 450px) {
  .auth-main {
    padding: 24px 22px 18px;
  }
  .auth-form h1 {
    font-size: 28px;
  }
  .auth-form {
    padding: 32px 0;
  }
  .field {
    margin-top: 16px;
  }
  .lead {
    margin-bottom: 24px;
  }
}

/* Keep the native forms usable before scripts load or when scripts are disabled. */
.eye,
.help-link {
  display: none;
}
.auth-enhanced .eye {
  display: grid;
}
.auth-enhanced .help-link {
  display: block;
}
[hidden] {
  display: none !important;
}
a.google:hover,
a.primary:hover {
  text-decoration: none;
}
.alert p {
  overflow-wrap: anywhere;
}

/* Both forms are present from the first render. Panel motion does not depend
   on document navigation, network timing or View Transition support. */
@media (max-width: 940px) {
  :root {
    --auth-motion: 260ms;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story,
  .auth-main {
    transition: none;
  }
}
