/* Public account screens share the ABDM landing page's editorial design. */
.marketing-shell .marketing-auth {
  padding: 48px clamp(20px, 4vw, 40px) 64px;
  color: #1c2333;
  background: #f4f6fa;
  font-family: var(--marketing-font-sans, "Public Sans", sans-serif);
}

.marketing-shell .marketing-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 4.5vw, 64px);
  max-width: 1160px;
  margin: 0 auto;
}

.marketing-shell .marketing-auth-story {
  position: sticky;
  top: 28px;
  min-width: 0;
  overflow: hidden;
  padding: clamp(32px, 4vw, 48px);
  border-bottom: 3px solid #e8791f;
  background: #112044;
  color: #fff;
}

/* Use the same chakra artwork as the landing page hero. */
.marketing-shell .marketing-auth-story::before {
  content: "";
  position: absolute;
  top: -132px;
  right: -132px;
  width: 300px;
  height: 300px;
  background: url("../images/marketing/chakra.d0a5db0d8d8e.svg") center / contain no-repeat;
  pointer-events: none;
}

.marketing-shell .marketing-auth-story > * {
  position: relative;
}

.marketing-shell .marketing-auth-eyebrow,
.marketing-shell .marketing-auth-panel-eyebrow,
.marketing-shell .marketing-auth-context-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--marketing-font-mono, "JetBrains Mono", monospace);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marketing-shell .marketing-auth-eyebrow {
  color: #c9d4ee;
}

.marketing-shell .marketing-auth-eyebrow > span {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #7fcfa0;
}

.marketing-shell .marketing-auth-story-title {
  max-width: 15ch;
  margin: 30px 0 0;
  color: #fff;
  font-family: var(--marketing-font-display, "Newsreader", serif);
  font-size: clamp(2.5rem, calc(1rem + 2.7vw), 3.5625rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.marketing-shell .marketing-auth-story-title > span {
  color: #e8791f;
}

.marketing-shell .marketing-auth-story-lede {
  max-width: 41ch;
  margin: 26px 0 0;
  color: #c9d4ee;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.marketing-shell .marketing-auth-context {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid rgba(201, 212, 238, 0.25);
}

.marketing-shell .marketing-auth-context-label {
  color: #e9cf7a;
  font-size: 0.625rem;
}

.marketing-shell .marketing-auth-context p {
  margin: 13px 0 0;
  color: #c9d4ee;
  font-size: 0.875rem;
  line-height: 1.7;
}

.marketing-shell .marketing-auth-context a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 212, 238, 0.5);
  text-underline-offset: 5px;
}

.marketing-shell .marketing-auth-context a:hover {
  color: #e8791f;
  text-decoration-color: currentColor;
}

.marketing-shell .marketing-auth-form-column {
  width: 100%;
  max-width: 540px;
  min-width: 0;
  margin-left: auto;
}

.marketing-shell .marketing-auth-panel,
.marketing-shell .marketing-auth-feedback {
  --background: #fff;
  --foreground: #1c2333;
  --card: #fff;
  --card-foreground: #1c2333;
  --muted-background: #f4f6fa;
  --muted-foreground: #596579;
  --soft-foreground: #596579;
  --soft-border: #dde2ee;
  --input: #7382a0;
  --primary: #264488;
  --primary-foreground: #fff;
  --ring: #e8791f;
  --destructive: #b42318;
  color: #1c2333;
}

.marketing-shell .marketing-auth-panel {
  padding: clamp(28px, 3.2vw, 40px);
  border: 1px solid #dde2ee;
  border-radius: 2px;
  background: #fff;
  box-shadow: none;
}

.marketing-shell .marketing-auth-panel-heading {
  margin-bottom: 28px;
}

.marketing-shell .marketing-auth-panel .marketing-auth-panel-eyebrow {
  margin: 0 0 14px;
  color: #b4530f;
  font-size: 0.625rem;
}

.marketing-shell .marketing-auth-panel-heading h1 {
  margin: 0;
  color: #112044;
  font-family: var(--marketing-font-display, "Newsreader", serif);
  font-size: clamp(2.125rem, calc(1rem + 1.9vw), 2.625rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.marketing-shell
  .marketing-auth-panel-heading
  > p:not(.marketing-auth-panel-eyebrow) {
  margin: 13px 0 0;
  color: #596579;
  font-size: 0.875rem;
  line-height: 1.65;
}

.marketing-shell .marketing-auth-panel-heading > p:empty {
  display: none;
}

.marketing-shell .marketing-auth-panel-body,
.marketing-shell .marketing-auth-form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 22px;
}

.marketing-shell .marketing-auth-panel .ui-label {
  margin-bottom: 8px;
  color: #1c2333;
  font-family: var(--marketing-font-sans, "Public Sans", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
}

.marketing-shell
  .marketing-auth-panel
  :is(.ui-input, .ui-select, .ui-textarea) {
  min-height: 48px;
  border: 1px solid #7382a0;
  border-radius: 2px;
  background: #fff;
  color: #1c2333;
  padding-right: 13px;
  padding-left: 13px;
  font-family: var(--marketing-font-sans, "Public Sans", sans-serif);
  font-size: 1rem;
  box-shadow: none;
}

.marketing-shell .marketing-auth-panel .ui-select {
  padding-right: 32px;
}

.marketing-shell .marketing-auth-panel .ui-password-field .ui-input {
  padding-right: 44px;
}

.marketing-shell
  .marketing-auth-panel
  :is(.ui-input, .ui-select, .ui-textarea):focus-visible {
  outline: 2px solid #e8791f;
  outline-offset: 3px;
  border-color: #264488;
  box-shadow: none;
}

.marketing-shell
  .marketing-auth-panel
  :is(.ui-input, .ui-select, .ui-textarea)[aria-invalid="true"] {
  border-color: #b42318;
}

.marketing-shell .marketing-auth-panel .ui-hint {
  color: #596579;
  font-size: 0.75rem;
  line-height: 1.65;
}

.marketing-shell .marketing-auth-panel a:not(.ui-btn) {
  color: #264488;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #7382a0;
  text-underline-offset: 3px;
}

.marketing-shell .marketing-auth-panel a:not(.ui-btn):hover {
  color: #b4530f;
  text-decoration-color: currentColor;
}

.marketing-shell .marketing-auth-panel [data-error-summary] a:not(.ui-btn) {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.marketing-shell .marketing-auth-panel .ui-hint a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
}

.marketing-shell .marketing-auth-panel .ui-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  accent-color: #264488;
}

.marketing-shell .marketing-auth-panel .ui-btn {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 2px;
  font-family: var(--marketing-font-sans, "Public Sans", sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.marketing-shell .marketing-auth-panel .ui-btn--default {
  gap: 12px;
  border: 1px solid #264488;
  color: #fff;
  background: #264488;
}

.marketing-shell .marketing-auth-panel .ui-btn--default:hover {
  background: #112044;
  border-color: #112044;
}

.marketing-shell .marketing-auth-panel .ui-btn--outline {
  color: #264488;
  border: 1px solid #7382a0;
  background: #fff;
}

.marketing-shell .marketing-auth-panel .ui-btn--outline:hover {
  background: #f4f6fa;
  border-color: #264488;
}

.marketing-shell .marketing-auth-panel .ui-btn:focus-visible,
.marketing-shell .marketing-auth a:focus-visible {
  outline: 2px solid #e8791f;
  outline-offset: 4px;
}

.marketing-shell .marketing-auth-alternatives {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #dde2ee;
  padding-top: 20px;
}

.marketing-shell .marketing-auth-after {
  padding-top: 16px;
  text-align: center;
  color: #596579;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.marketing-shell .marketing-auth-after p {
  margin: 0;
  color: #596579;
}

.marketing-shell .marketing-auth-after a:not(.ui-btn) {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #264488;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #7382a0;
  text-underline-offset: 4px;
}

.marketing-shell .marketing-auth-after a:hover {
  color: #b4530f;
}

.marketing-shell .marketing-auth--signup .marketing-auth-layout {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.marketing-shell .marketing-auth--signup .marketing-auth-form-column {
  max-width: 600px;
}

.marketing-shell .marketing-auth-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.marketing-shell .marketing-auth-steps li {
  display: flex;
  min-width: 0;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0;
  border-top: 1px solid rgba(201, 212, 238, 0.25);
}

.marketing-shell .marketing-auth-steps li:last-child {
  padding-bottom: 0;
}

.marketing-shell .marketing-auth-step-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid rgba(201, 212, 238, 0.4);
  border-radius: 2px;
  background: transparent;
  color: #c9d4ee;
  font: 0.6875rem var(--marketing-font-mono, "JetBrains Mono", monospace);
}

.marketing-shell
  .marketing-auth-steps
  [aria-current="step"]
  .marketing-auth-step-number {
  border-color: #e8791f;
  background: #e8791f;
  color: #112044;
}

.marketing-shell .marketing-auth-steps strong {
  display: block;
  margin: 2px 0 5px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

.marketing-shell .marketing-auth-steps li div > span {
  display: block;
  color: #c9d4ee;
  font-size: 0.8125rem;
  line-height: 1.65;
}

.marketing-shell .marketing-auth-invitation {
  padding: 14px 16px;
  border: 1px solid #dde2ee;
  border-left: 3px solid #e8791f;
  border-radius: 2px;
  background: #f4f6fa;
  color: #1c2333;
  font-size: 0.875rem;
  line-height: 1.65;
}

.marketing-shell .marketing-auth-fieldset {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid #dde2ee;
}

.marketing-shell .marketing-auth-fieldset legend {
  margin: 0 0 18px;
  padding: 0;
  color: #264488;
  font-family: var(--marketing-font-mono, "JetBrains Mono", monospace);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketing-shell .marketing-auth-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.marketing-shell .marketing-auth-field-grid > * {
  min-width: 0;
}

.marketing-shell .marketing-auth-submit p {
  margin: 14px 0 0;
  color: #596579;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.65;
}

.marketing-shell .marketing-auth-headerhint {
  color: #596579;
  font-size: 0.8125rem;
}

@media (max-width: 900px) {
  .marketing-shell .marketing-auth {
    padding-top: 32px;
    padding-bottom: 40px;
  }

  .marketing-shell .marketing-auth-layout,
  .marketing-shell .marketing-auth--signup .marketing-auth-layout {
    max-width: 620px;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .marketing-shell .marketing-auth-story {
    position: relative;
    top: auto;
    padding: 30px;
  }

  .marketing-shell .marketing-auth-story-title {
    max-width: 24ch;
    margin-top: 20px;
    font-size: 2.5rem;
  }

  .marketing-shell .marketing-auth-story-lede {
    max-width: none;
    margin-top: 16px;
    font-size: 0.875rem;
  }

  .marketing-shell .marketing-auth-context {
    display: none;
  }

  .marketing-shell .marketing-auth-form-column,
  .marketing-shell .marketing-auth--signup .marketing-auth-form-column {
    max-width: none;
  }

  .marketing-shell .marketing-auth-steps {
    flex-direction: row;
    gap: 16px;
    margin-top: 24px;
  }

  .marketing-shell .marketing-auth-steps li {
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 15px 0 0;
  }

  .marketing-shell .marketing-auth-steps li:nth-child(2) {
    flex-grow: 1.5;
  }

  .marketing-shell .marketing-auth-steps strong {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.6;
  }

  .marketing-shell .marketing-auth-steps li div > span {
    display: none;
  }
}

@media (max-width: 540px) {
  .marketing-shell .marketing-auth {
    padding: 20px 16px 32px;
  }

  .marketing-shell .marketing-auth-story {
    padding: 26px 22px;
  }

  .marketing-shell .marketing-auth-story-title {
    margin-top: 16px;
    font-size: 2rem;
  }

  .marketing-shell .marketing-auth-story-lede {
    display: none;
  }

  .marketing-shell .marketing-auth-panel {
    padding: 28px 22px;
  }

  .marketing-shell .marketing-auth-panel-heading h1 {
    font-size: 2.125rem;
  }

  .marketing-shell .marketing-auth-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketing-shell .marketing-auth-headerhint {
    display: none;
  }

  .marketing-shell .marketing-auth-steps {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-shell .marketing-auth-panel .ui-btn {
    transition: none;
  }
}
