@font-face {
  font-display: swap;
  font-family: "Lexend Deca";
  font-style: normal;
  font-weight: 100 900;
  src: url("/assets/fonts/LexendDeca-VariableFont_wght.ttf") format("truetype");
}

:root {
  --sm-navy: #07285a;
  --sm-navy-deep: #041a3d;
  --sm-pink: #d83483;
  --sm-teal: #09ae9a;
  --sm-yellow: #f6c705;
  --sm-ink: #191715;
  --sm-paper: #fdfdfd;
  --sm-muted: #667085;
  --sm-border: rgba(7, 40, 90, 0.13);
  --sm-shadow: 0 24px 80px rgba(7, 40, 90, 0.13);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--sm-paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--sm-ink);
  font-family:
    "Lexend Deca",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.setup-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 50% -12%, rgba(216, 52, 131, 0.11), transparent 22rem),
    radial-gradient(circle at 102% 18%, rgba(9, 174, 154, 0.09), transparent 24rem),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.setup-shell {
  width: min(100%, 520px);
  display: grid;
  gap: 34px;
  justify-items: center;
}

.setup-logo {
  width: min(230px, 68vw);
  height: auto;
  display: block;
}

.setup-logo-link {
  display: block;
  border-radius: 8px;
  transition:
    opacity 160ms var(--ease-out),
    transform 140ms var(--ease-out);
}

.setup-logo-link:hover {
  opacity: 0.88;
}

.setup-logo-link:active {
  transform: scale(0.98);
}

.setup-card {
  width: 100%;
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--sm-border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 54px rgba(7, 40, 90, 0.1);
}

.setup-card-accent {
  display: none;
}

.setup-card-head {
  display: grid;
  gap: 0;
  margin-bottom: 8px;
}

.setup-eyebrow {
  margin: 0 0 8px;
  color: var(--sm-teal);
  font-size: 11.5px;
  font-weight: 680;
  line-height: 1.2;
}

.setup-card h1 {
  margin: 0;
  color: var(--sm-navy);
  font-size: clamp(24px, 5.8vw, 29px);
  font-weight: 760;
  line-height: 1.14;
  letter-spacing: 0;
}

.setup-intro {
  max-width: 36ch;
  margin: 10px 0 0;
  color: #475467;
  font-size: 13.5px;
  font-weight: 470;
  line-height: 1.55;
}

.setup-field {
  display: grid;
  gap: 8px;
}

.setup-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.setup-label-row label {
  color: #061f49;
  font-size: 13px;
  font-weight: 700;
}

.setup-ghost-button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sm-navy);
  font-size: 12px;
  font-weight: 700;
  transition:
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    transform 140ms var(--ease-out);
}

.setup-ghost-button:hover {
  background: rgba(7, 40, 90, 0.07);
}

.setup-submit:active,
.manual-copy:active {
  transform: scale(0.97);
}

.setup-ghost-button:active {
  transform: translateY(-50%) scale(0.97);
}

.setup-input-wrap {
  position: relative;
}

.setup-input-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.setup-input-wrap input {
  width: 100%;
  min-height: 48px;
  padding: 0 66px 0 14px;
  border: 1px solid rgba(7, 40, 90, 0.18);
  border-radius: 10px;
  outline: none;
  background: #ffffff;
  color: var(--sm-navy-deep);
  font-size: 14px;
  font-weight: 520;
  letter-spacing: 0;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    background-color 160ms var(--ease-out);
}

.setup-input-wrap .setup-ghost-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

.setup-input-wrap input::placeholder {
  color: #667085;
  font-weight: 520;
}

.setup-input-wrap input:focus {
  border-color: var(--sm-teal);
  box-shadow: 0 0 0 4px rgba(9, 174, 154, 0.14);
}

.setup-input-wrap input:disabled {
  background: #f7f8fb;
  color: #667085;
}

.setup-status {
  min-height: 0;
}

.setup-help {
  min-height: 0;
  color: #7b8798;
  font-size: 11.5px;
  font-weight: 430;
  line-height: 1.5;
}

.setup-help summary {
  width: fit-content;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: #52627a;
  font-size: 11.5px;
  font-weight: 570;
  list-style: none;
  transition:
    color 160ms var(--ease-out),
    opacity 160ms var(--ease-out);
}

.setup-help summary::-webkit-details-marker {
  display: none;
}

.setup-help summary::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: -1px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms var(--ease-out);
}

.setup-help summary:hover {
  color: var(--sm-navy);
}

.setup-help[open] summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.setup-help p {
  position: absolute;
  z-index: 2;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 48px));
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(7, 40, 90, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(7, 40, 90, 0.12);
  color: #52627a;
  font-size: 11.5px;
  font-weight: 470;
  line-height: 1.5;
}

.setup-status {
  margin: 0;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.setup-trust {
  position: relative;
  margin: -2px 0 0;
  padding-left: 20px;
  color: #667085;
  font-size: 12px;
  font-weight: 470;
  line-height: 1.45;
}

.setup-trust::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 11px;
  height: 11px;
  border: 2px solid var(--sm-teal);
  border-radius: 50%;
  background: rgba(9, 174, 154, 0.08);
}

.setup-submit {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 52, 131, 0.2);
  border-radius: 10px;
  background: var(--sm-pink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    transform 140ms var(--ease-out),
    opacity 160ms var(--ease-out);
}

.setup-submit:hover:not(:disabled) {
  background: #c42a75;
}

.setup-submit:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.setup-submit.is-loading .button-label {
  opacity: 0.72;
}

.setup-success {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 28px;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
}

.setup-success[hidden] {
  display: none;
}

.success-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(9, 174, 154, 0.12);
  color: var(--sm-teal);
}

.success-mark svg {
  width: 26px;
  height: 26px;
}

.success-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.success-label {
  margin: 0;
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.setup-success h2 {
  margin: 6px 0 0;
  color: var(--sm-navy-deep);
  font-size: 24px;
  line-height: 1.15;
}

.success-copy {
  max-width: 28ch;
  margin: 9px auto 0;
  color: #475467;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.5;
}

.success-progress {
  width: min(100%, 280px);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(7, 40, 90, 0.09);
}

.success-progress span {
  width: 42%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sm-teal), var(--sm-pink));
  animation: success-progress 1.15s var(--ease-out) infinite;
}

.success-fallback {
  max-width: 280px;
  margin-top: 2px;
}

.setup-success:not(.has-fallback) .success-fallback {
  display: none;
}

@keyframes success-progress {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(250%);
  }
}

.manual-panel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.manual-panel h2 {
  margin: 0;
  color: var(--sm-navy);
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 760;
}

.manual-panel p {
  max-width: 27ch;
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: 470;
  line-height: 1.45;
}

.manual-copy {
  flex: 0 0 auto;
  min-height: 38px;
  min-width: 124px;
  padding: 0 12px;
  border: 1px solid rgba(7, 40, 90, 0.15);
  border-radius: 10px;
  background: #ffffff;
  color: var(--sm-navy);
  font-size: 12px;
  font-weight: 720;
  transition:
    border-color 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    color 160ms var(--ease-out),
    transform 140ms var(--ease-out);
}

.manual-copy:hover {
  border-color: rgba(216, 52, 131, 0.34);
  background: rgba(216, 52, 131, 0.06);
}

.manual-copy.is-copying {
  border-color: rgba(7, 40, 90, 0.26);
  background: rgba(7, 40, 90, 0.08);
  color: var(--sm-navy);
}

.manual-copy.is-copied {
  border-color: rgba(9, 174, 154, 0.42);
  background: var(--sm-teal);
  box-shadow: 0 10px 24px rgba(9, 174, 154, 0.22);
  color: #ffffff;
}

.manual-copy.is-copy-failed {
  border-color: rgba(217, 45, 32, 0.36);
  background: rgba(217, 45, 32, 0.08);
  color: #b42318;
}

.manual-copy.is-copied:hover {
  border-color: rgba(9, 174, 154, 0.42);
  background: var(--sm-teal);
}

:focus-visible {
  outline: 3px solid rgba(216, 52, 131, 0.4);
  outline-offset: 3px;
}

.is-invalid .setup-input-wrap input {
  border-color: #d92d20;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.1);
}

.is-validating .setup-input-wrap input {
  border-color: rgba(9, 174, 154, 0.48);
  box-shadow: 0 0 0 4px rgba(9, 174, 154, 0.1);
}

body[data-variant="b"] .setup-page {
  background:
    linear-gradient(90deg, rgba(246, 199, 5, 0.34), transparent 16rem) top left / 100% 3px no-repeat,
    radial-gradient(circle at 52% -8%, rgba(9, 174, 154, 0.11), transparent 23rem),
    linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

body[data-variant="b"] .setup-shell {
  width: min(100%, 500px);
  gap: 28px;
}

body[data-variant="b"] .setup-logo {
  width: min(210px, 64vw);
}

body[data-variant="b"] .setup-card {
  gap: 18px;
  padding: 30px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(7, 40, 90, 0.12);
}

body[data-variant="b"] .setup-card-accent {
  display: block;
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--sm-teal), var(--sm-pink));
}

body[data-variant="b"] .setup-eyebrow {
  color: #667085;
}

body[data-variant="b"] .setup-submit {
  border-color: rgba(7, 40, 90, 0.22);
  background: var(--sm-navy);
}

body[data-variant="b"] .setup-submit:hover:not(:disabled) {
  background: var(--sm-navy-deep);
}

body[data-variant="b"] .setup-trust {
  padding: 12px 12px 12px 34px;
  border: 1px solid rgba(9, 174, 154, 0.16);
  border-radius: 8px;
  background: rgba(9, 174, 154, 0.055);
  color: #475467;
}

body[data-variant="b"] .setup-trust::before {
  left: 13px;
  top: 15px;
}

body[data-variant="b"] .manual-panel {
  padding: 12px 14px;
  border: 1px solid rgba(7, 40, 90, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

body[data-variant="c"] .setup-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 52, 131, 0.24), transparent 19rem),
    radial-gradient(circle at 100% 20%, rgba(9, 174, 154, 0.15), transparent 22rem),
    linear-gradient(180deg, #061d43 0%, #07285a 100%);
}

body[data-variant="c"] .setup-shell {
  width: min(100%, 480px);
  gap: 24px;
}

body[data-variant="c"] .setup-logo {
  width: min(210px, 66vw);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

body[data-variant="c"] .setup-card {
  gap: 18px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

body[data-variant="c"] .setup-card-accent {
  display: block;
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--sm-pink), var(--sm-teal));
}

body[data-variant="c"] .setup-eyebrow {
  color: var(--sm-pink);
}

body[data-variant="c"] .setup-card h1 {
  font-size: clamp(26px, 6vw, 32px);
}

body[data-variant="c"] .manual-panel {
  padding: 0;
  color: rgba(255, 255, 255, 0.82);
}

body[data-variant="c"] .manual-panel h2,
body[data-variant="c"] .manual-panel p {
  color: rgba(255, 255, 255, 0.82);
}

body[data-variant="c"] .manual-copy {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body[data-variant="c"] .manual-copy:hover {
  border-color: rgba(9, 174, 154, 0.5);
  background: rgba(9, 174, 154, 0.14);
}

@media (max-width: 560px) {
  .setup-page {
    align-items: start;
    padding-top: 28px;
  }

  .setup-shell {
    gap: 30px;
  }

  .setup-card {
    padding: 20px;
  }

  body[data-variant="b"] .setup-card,
  body[data-variant="c"] .setup-card {
    padding: 22px 20px;
  }

  .manual-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-copy {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
