/* Setup link page: header without sidebar, one centered column in the entry screens' style */
body.setup-page {
  grid-template: auto 1fr / minmax(0, 1fr);
  min-height: 100vh;
}

.setup-preview-label {
  grid-column: 3;
  justify-self: end;
  color: var(--muted);
  font-size: .75rem;
  white-space: nowrap;
}

.setup-main {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 9vh, 5.5rem) 1.5rem 3rem;
}

.setup-client-brand {
  width: fit-content;
  margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
  padding: clamp(.875rem, 3vw, 1.5rem) clamp(1.25rem, 4vw, 2.25rem);
  border-radius: .625rem;
}

.setup-client-brand img {
  display: block;
  width: clamp(10rem, 55vw, 18rem);
  height: clamp(4.5rem, 23vw, 7rem);
  object-fit: contain;
}

.setup-loop-name {
  display: none;
}

.setup-page.password-sign-in {
  background-color: var(--paper);
}

.password-sign-in .setup-main {
  padding-top: clamp(2rem, 7vh, 4rem);
}

.password-sign-in .setup-client-brand {
  margin: 0 0 1.5rem;
  padding: .5rem .75rem;
}

.password-sign-in .setup-client-brand img {
  width: 9rem;
  height: 3rem;
}

.password-sign-in .setup-title {
  margin-bottom: 1.5rem;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 750;
  text-align: left;
}

.password-sign-in .setup-lead {
  margin-top: -.75rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.password-sign-in .setup-form {
  gap: 1rem;
}

.password-sign-in .setup-actions-after {
  justify-items: start;
}

.password-sign-in[data-trial-brand="true"] .setup-client-brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: 0;
}

.password-sign-in[data-trial-brand="true"] .setup-client-brand img {
  width: 2rem;
  height: 2rem;
}

.password-sign-in[data-trial-brand="true"] .setup-loop-name {
  display: block;
  color: var(--navy);
  font-family: Sora, Inter, sans-serif;
  font-size: 1rem;
  font-weight: 750;
}

.password-sign-in[data-trial-brand="true"][data-auth-enabled="true"] > .workspace-header {
  display: none;
}

.password-sign-in[data-trial-brand="true"][data-auth-enabled="true"] {
  grid-template-rows: 1fr;
}

.password-sign-in[data-trial-brand="true"][data-auth-enabled="true"] .setup-main {
  padding-top: clamp(3rem, 15vh, 8rem);
}

.setup-title {
  margin: 0;
  color: var(--navy);
  font-family: Sora, Inter, sans-serif;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.setup-title:focus { outline: none; }

.setup-lead {
  margin: .75rem 0 2rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
  text-wrap: pretty;
}

.setup-choice-label {
  margin: 0 0 .75rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 400;
  text-align: center;
}

.setup-form {
  display: grid;
  gap: 1.25rem;
}

.setup-form label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

.setup-form input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #09111b35;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.setup-form input[aria-invalid="true"] { border-color: #b8401c; }

.setup-form small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
}

.setup-password-field {
  position: relative;
  display: block;
  margin-top: 7px;
}

.setup-form .setup-password-field input { margin-top: 0; padding-right: 4.25rem; }

.setup-show {
  position: absolute;
  top: 50%;
  right: .375rem;
  translate: 0 -50%;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--navy);
  font-size: 12px;
  font-weight: 650;
}

.setup-show:hover { background: var(--peach); }

.password-sign-in .setup-field {
  padding: .625rem .875rem;
  border: 1px solid #d8cfc0;
  border-radius: .5rem;
  background: #fffdf9;
}

.password-sign-in .setup-field label {
  color: var(--navy);
  font-size: .75rem;
  line-height: 1.4;
  cursor: text;
}

.password-sign-in .setup-field input {
  min-height: 1.75rem;
  margin: 0;
  padding: .1875rem 0 0;
  border: 0;
  background: transparent;
  line-height: 1.4;
}

.password-sign-in .setup-field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.password-sign-in .setup-field input:focus-visible {
  outline: none;
}

.password-sign-in .setup-field:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 22%, transparent);
}

.password-sign-in .setup-field:has(input[aria-invalid="true"]) {
  border-color: #b8401c;
}

.password-sign-in .setup-password-field {
  margin-top: 0;
}

.password-sign-in .setup-password-field input {
  padding-right: 4.25rem;
}

.password-sign-in .setup-show {
  top: calc(50% - .375rem);
  right: 0;
  min-height: 2rem;
  padding-inline: .625rem;
  background: var(--peach);
}

.password-sign-in .setup-show:hover {
  background: #f5ebe0;
}

.setup-form .entry-primary,
.setup-actions .entry-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--orange);
  border-radius: 5px;
  background: var(--orange);
  padding: 11px 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
}

.setup-form .entry-primary { margin-top: .5rem; }

.setup-form .entry-primary:hover,
.setup-actions .entry-primary:hover { background: #e94a20; }

.setup-actions .entry-primary[aria-busy="true"] { opacity: .7; cursor: progress; }

.setup-actions {
  display: grid;
  justify-items: center;
  gap: .875rem;
}

.setup-text-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 13px;
}

.setup-text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.field-error {
  display: block;
  margin-top: 4px;
  color: #a13617;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
}

.setup-center { margin-top: 1rem; text-align: center; }

@media (max-width: 600px) {
  .setup-form input { font-size: 16px; }
}

/* Sign-in choice: Home's method cards, side by side */
.setup-main:has(#setup-choose:not([hidden])) { max-width: 36rem; }

.setup-choices .launch-action {
  font: inherit;
  cursor: pointer;
}

.setup-choices .launch-action[aria-busy="true"] { cursor: progress; background: var(--peach); }

.setup-symbol-passkey { color: var(--orange); background: var(--peach); }
.setup-symbol-password { color: var(--navy); background: #edf1f5; }

.setup-lead strong {
  color: var(--navy);
  font-weight: 650;
}

.setup-muted { color: var(--muted); font-size: 13px; }

.setup-actions-after { margin-top: 1rem; }

@media (max-width: 600px) {
  .setup-choices { grid-template-columns: minmax(0, 1fr); }
}
