/* The app test sign-up (app-test.html). Stands alone: tokens and fonts from the site, nothing else. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* A soft light behind the hero, in the accent of the site. */
.glow {
  position: fixed;
  inset: -30vh -20vw auto;
  height: 80vh;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 30% 40%, color-mix(in oklab, var(--t-tour) 22%, transparent), transparent 70%),
    radial-gradient(35% 45% at 72% 30%, color-mix(in oklab, var(--t-flight) 20%, transparent), transparent 70%);
  filter: blur(40px);
  opacity: 0.55;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(40px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 28px 4px 28px;
  animation: rise 0.7s var(--ease-out-quint) both;
}

.mark {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.mark img {
  width: auto;
  height: clamp(40px, 11vw, 52px);
}

.logo-on-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-on-light {
    display: none;
  }
  .logo-on-dark {
    display: block;
  }
}


h1 {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h1 .soft {
  color: var(--text-muted);
}

.lede {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.lede.small {
  font-size: 0.9375rem;
  margin: 0 0 18px;
}

/* ── Cards ────────────────────────────────────────────────────────────── */

.card {
  position: relative;
  margin-top: 16px;
  padding: clamp(20px, 5vw, 32px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-faint);
  background: color-mix(in oklab, var(--bg-card) 88%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow:
    var(--shadow-card),
    0 30px 60px -40px rgba(0, 0, 0, 0.35);
  animation: rise 0.7s 0.08s var(--ease-out-quint) both;
}

.card + .card {
  animation-delay: 0.16s;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

/* ── Steps ────────────────────────────────────────────────────────────── */

.step {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
  min-width: 0;
  transition: opacity 0.3s ease;
}

.step:disabled {
  opacity: 0.45;
}

legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 14px;
  padding: 0;
  font-weight: 600;
  font-size: 1rem;
}

.num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 700;
}

.hint {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.8125rem;
}

/* Platform tiles */

.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.platform,
.chip {
  position: relative;
}

.platform input,
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  height: 100%;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-primary);
  background: var(--bg-input);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease-out-quint),
    box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tile svg {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  fill: currentColor;
}

.tile-name {
  font-weight: 700;
  font-size: 1.0625rem;
}

.tile-sub {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.platform:hover .tile {
  border-color: var(--border-secondary);
}

.platform input:checked + .tile {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 7%, var(--bg-input));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}

.platform input:focus-visible + .tile,
.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.platform:active .tile {
  transform: scale(0.98);
}

/* Device chips */

.devices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 44px;
}

.placeholder {
  margin: 0;
  align-self: center;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

.chip {
  position: relative;
  animation: pop 0.35s var(--ease-out-quint) both;
}

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border-primary);
  background: var(--bg-input);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--ease-out-quint);
}

.chip span::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--border-secondary);
  background: var(--bg-card) center / 11px no-repeat;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.chip input:checked + span::before {
  border-color: var(--accent-text);
  background-color: var(--accent-text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.chip:active span {
  transform: scale(0.96);
}

/* Fields */

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

.label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.label em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-faint);
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-primary);
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  /* 16px keeps iOS from zooming into the field. */
  font-size: 16px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-note {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 500;
}

.error.center {
  text-align: center;
}

/* Notice and submit */

.notice {
  display: flex;
  gap: 12px;
  margin: 4px 0 22px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--info-soft);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.notice svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: var(--info);
}

.notice p {
  margin: 0;
}

.notice.warn {
  margin-top: -10px;
  background: var(--warning-soft);
}

.notice.warn svg {
  fill: var(--warning);
}

.submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px color-mix(in oklab, var(--accent) 70%, transparent);
  transition:
    transform 0.2s var(--ease-out-quint),
    filter 0.2s ease,
    opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.submit:hover {
  filter: brightness(1.08);
}

.submit:active {
  transform: scale(0.985);
}

.submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  opacity: 0;
}

.submit[aria-busy="true"] {
  pointer-events: none;
}

.submit[aria-busy="true"] .submit-text {
  opacity: 0;
}

.submit[aria-busy="true"] .spinner {
  opacity: 1;
  animation: spin 0.7s linear infinite;
}

/* Done */

.done {
  text-align: center;
  padding: 18px 4px 6px;
  outline: none;
  animation: rise 0.6s var(--ease-out-quint) both;
}

.done p {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.check {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
}

.check svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.7s var(--ease-out-quint) forwards;
}

.check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.45s 0.45s var(--ease-out-quint) forwards;
}

/* ── Feedback guide ───────────────────────────────────────────────────── */

.tabs {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--bg-tertiary);
}

.tabs button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.tabs button[aria-selected="true"] {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.how {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
  animation: fade 0.35s ease both;
}

.how li {
  position: relative;
  padding: 0 0 16px 40px;
  color: var(--text-secondary);
  line-height: 1.55;
  counter-increment: how;
}

.how li:last-child {
  padding-bottom: 0;
}

.how li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.8125rem;
}

.how li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12.5px;
  top: 30px;
  bottom: 4px;
  width: 1px;
  background: var(--border-faint);
}

.how strong {
  color: var(--text-primary);
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.foot {
  margin-top: 26px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.foot p {
  margin: 0 auto 6px;
  max-width: 30rem;
}

.foot a {
  color: var(--text-muted);
}

/* ── Small screens ────────────────────────────────────────────────────── */

@media (max-width: 420px) {
  .fields {
    grid-template-columns: 1fr;
  }
  .tile {
    padding: 16px 14px;
  }
  .lede {
    font-size: 1rem;
  }
}

/* ── Motion ───────────────────────────────────────────────────────────── */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}


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