"use client"; /* Signing in, in the app's own chrome. * * This screen used to be a centred web page dropped between two app screens: light ground where * the welcome and the app are ink, no app bar, a different type scale, and — worst — it asked the * same question the bundled welcome had just asked. Tapping "Sign in" there appeared to do * nothing, because you arrived at two buttons saying "Sign in" and "I have a code" again. * * So: one decision, made once. The welcome sends you here already in a mode, and the other way in * is a quiet line of text rather than a second pair of buttons. Everything else is the app's own * vocabulary — ink bar, accent rule, 64px flush-left action — so the seam disappears. */ import { PRIVACY_URL, TERMS_URL } from "@/lib/links"; import { Suspense, useId, useState } from "react"; import { useSearchParams } from "next/navigation"; import { MBar, MBody, MError, MExternalLink, MRule, MTop, inputStyle } from "@/components/m"; import { ACCENT_700, INK, N600, N700 } from "@/components/staffui"; import Turnstile, { awaitTurnstile, resetTurnstile, turnstileOn } from "@/components/Turnstile"; import { track } from "@/lib/analytics"; type Mode = "signin" | "activate"; const label: React.CSSProperties = { display: "block", fontSize: 11, fontWeight: 800, letterSpacing: "0.12em", textTransform: "uppercase", color: N600, marginBottom: 8, }; function SignInForm() { // ?code=1 arrives from the app's "I have a code" button, and from the printed slip's link. const sp = useSearchParams(); /* Real htmlFor/id pairs, the way components/MAuth.tsx does it for the counter app. * * These three boxes were wrapped in their