@font-face {
  font-family: "Geist";
  src: url("./fonts/geist/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/geist/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --canvas: #f7f7f8;
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --ink: #171717;
  --muted: #666666;
  --quiet: #8a8a8a;
  --border: #e5e5e5;
  --border-strong: #cfcfcf;
  --red: #ef534f;
  --red-hover: #dc4945;
  --success: #16803c;
  --success-soft: #ecfdf3;
  --error: #c62f2b;
  --disabled: #ededed;
  --font: "Geist", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.page { min-height: 100dvh; border-top: 3px solid var(--red); }
.topbar { height: 64px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { width: min(1160px, calc(100% - 40px)); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand img { display: block; width: 126px; height: auto; }
.brand-name { padding-left: 18px; border-left: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 550; white-space: nowrap; }
.header-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.header-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-weight: 550; }

.auth-shell { width: min(1040px, calc(100% - 40px)); min-height: calc(100dvh - 67px); display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: clamp(48px, 7vw, 88px); margin: 0 auto; padding: 58px 0 72px; }
.context { align-self: center; }
.context-kicker { margin-bottom: 12px; color: var(--red); font-size: 13px; font-weight: 650; }
h1 { max-width: 550px; margin: 0; font-size: clamp(36px, 4vw, 52px); font-weight: 600; line-height: 1.06; letter-spacing: -.04em; text-wrap: balance; }
.context-copy { max-width: 530px; margin: 18px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

.progress { display: grid; gap: 0; max-width: 440px; margin-top: 42px; }
.progress-item { position: relative; min-height: 62px; display: grid; grid-template-columns: 30px 1fr; gap: 13px; color: var(--quiet); }
.progress-item:not(:last-child)::after { content: ""; position: absolute; top: 29px; bottom: 0; left: 14px; width: 1px; background: var(--border-strong); }
.progress-marker { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); font: 600 11px/1 var(--mono); }
.progress-copy strong { display: block; margin-top: 3px; color: inherit; font-size: 14px; font-weight: 600; }
.progress-copy span { display: block; margin-top: 2px; color: var(--quiet); font-size: 12px; }
.progress-item.active { color: var(--ink); }
.progress-item.active .progress-marker { border-color: var(--red); background: var(--red); color: var(--surface); }
.progress-item.complete { color: var(--ink); }
.progress-item.complete .progress-marker { border-color: var(--success); background: var(--success-soft); color: var(--success); }

.auth-card { width: 100%; padding: 32px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(23, 23, 23, .07); }
.card-label { margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 550; }
h2 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
.card-intro { margin: 8px 0 25px; color: var(--muted); }
.field { display: grid; gap: 7px; }
.field label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #333; font-size: 13px; font-weight: 550; }
.field label span { color: var(--quiet); font-size: 11px; font-weight: 450; }
.field input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--ink); outline: none; }
.field input::placeholder { color: var(--quiet); }
.field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239, 83, 79, .13); }
#codeInput { font-family: var(--mono); font-size: 17px; letter-spacing: .16em; }

.primary-button { width: 100%; min-height: 44px; margin-top: 18px; border: 1px solid var(--red); border-radius: 8px; background: var(--red); color: #fff; font-weight: 650; transition: background-color .16s ease, transform .12s ease; }
.primary-button:hover { background: var(--red-hover); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; border-color: var(--border); background: var(--disabled); color: var(--quiet); }
.secondary-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 15px; }
.text-button { min-height: 34px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.text-button:hover { color: var(--ink); }
.message { min-height: 22px; margin: 15px 0 0; color: var(--muted); font-size: 12px; }
.message[data-state="error"] { color: var(--error); }
.message[data-state="success"] { color: var(--success); }

.email-summary { margin-bottom: 20px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-subtle); }
.email-summary span { display: block; color: var(--quiet); font-size: 11px; }
.email-summary strong { display: block; margin-top: 2px; font-weight: 550; overflow-wrap: anywhere; }
.legal-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--quiet); font-size: 11px; }

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

@media (max-width: 800px) {
  .topbar-inner { width: min(100% - 28px, 640px); }
  .brand img { width: 112px; }
  .brand-name, .header-meta > span { display: none; }
  .auth-shell { width: min(100% - 28px, 560px); display: block; padding: 42px 0 56px; }
  .context { margin-bottom: 34px; }
  h1 { font-size: 36px; }
  .context-copy { font-size: 14px; }
  .progress { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 28px; }
  .progress-item { min-height: auto; display: block; }
  .progress-item:not(:last-child)::after { top: 14px; bottom: auto; left: 29px; right: -9px; width: auto; height: 1px; }
  .progress-marker { margin-bottom: 8px; }
  .progress-copy span { display: none; }
  .progress-copy strong { font-size: 12px; }
  .auth-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
