/* The pages before access (welcome, sign up, sign in, reset, waiting, terms):
   one dark world over a moving sky. Black and white; red and green only where
   they mean something. Prefixed (--sp-*, .sp-*) so the site-wide injected
   styles (.brand, .topbar, .dock, :root vars) never collide. */

:root {
  --sp-bg: #020203;
  --sp-text: #F4F6FA;
  --sp-dim: #A3A8B3;
  --sp-mute: #6B7079;
  --sp-line: rgba(255, 255, 255, .09);
  --sp-line-2: rgba(255, 255, 255, .16);
  --sp-panel: rgba(12, 12, 16, .62);
  --sp-field: rgba(255, 255, 255, .04);
  --sp-red: #FF5A47;
  --sp-green: #3DDC84;
  --sp-ease: cubic-bezier(.16, 1, .3, 1);
  --sp-soft: cubic-bezier(.22, .61, .36, 1);
  /* The site's own fonts: system text, Inter for the wordmark, JetBrains Mono for figures. */
  --sp-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sp-brand: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sp-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--sp-bg); }
body.sp {
  margin: 0; min-height: 100vh; background: var(--sp-bg); color: var(--sp-text);
  font: 15px/1.6 var(--sp-display); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-synthesis: none; overflow-x: hidden;
}
.sp a { color: inherit; }
.sp ::selection { background: rgba(255, 255, 255, .22); }

/* ── sky ── */
#sp-sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.sp-vignette { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(0, 0, 0, .75) 100%); }

/* ── header ── */
.sp-head { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; height: 72px; padding: 0 clamp(16px, 4vw, 40px); }
.sp-head.solid { background: linear-gradient(180deg, rgba(2, 2, 3, .85), rgba(2, 2, 3, 0)); }
.sp-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-decoration: none; color: var(--sp-text);
  font: 800 22px/1 var(--sp-brand); letter-spacing: .4em; margin-right: -.4em; white-space: nowrap; transition: opacity .8s var(--sp-soft); }
.sp-nav { display: flex; gap: 8px; align-items: center; }

/* ── buttons ── */
.sp-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--sp-line-2); background: transparent; color: var(--sp-text); cursor: pointer;
  font: 600 14px/1 var(--sp-display); text-decoration: none; white-space: nowrap; overflow: hidden;
  transition: transform .7s var(--sp-ease), background .6s var(--sp-soft), border-color .6s var(--sp-soft), color .6s, opacity .6s; }
.sp-btn:hover { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .05); }
.sp-btn:active { transform: scale(.98); }
.sp-btn.solid { background: var(--sp-text); color: #050507; border-color: var(--sp-text); }
.sp-btn.solid:hover { background: #fff; }
.sp-btn.solid::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 60%; opacity: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .0) 20%, rgba(180, 186, 200, .55) 50%, rgba(255, 255, 255, 0) 80%, transparent);
  transform: translateX(0); transition: transform 0s 1.8s, opacity .6s var(--sp-soft); }
.sp-btn.solid:hover::after { opacity: 1; transform: translateX(270%); transition: transform 1.8s var(--sp-soft), opacity .4s var(--sp-soft); }
.sp-btn.small { height: 36px; padding: 0 16px; font-size: 13px; }
.sp-btn.wide { width: 100%; }
.sp-btn[disabled] { opacity: .45; cursor: default; }
.sp-btn svg { width: 16px; height: 16px; flex: none; }
.sp :focus-visible { outline: 2px solid var(--sp-text); outline-offset: 3px; }

/* ── centred card pages ── */
.sp-main { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 96px 16px 72px; }
.sp-card { position: relative; width: 100%; max-width: 420px; padding: 40px 36px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 15, 20, .9), rgba(9, 9, 12, .9)); border: 1px solid var(--sp-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  display: flex; flex-direction: column; gap: 18px; animation: sp-rise 1.6s var(--sp-ease) .1s both; }
.sp-card.wide { max-width: 720px; }
.sp-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .28), transparent 35%, transparent 65%, rgba(255, 255, 255, .12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(18px) scale(.99); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.sp-eyebrow { font: 500 11px/1 var(--sp-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--sp-mute); }
.sp-title { margin: 0; font: 700 clamp(26px, 5vw, 34px)/1.12 var(--sp-display); letter-spacing: -.022em; text-wrap: balance; }
.sp-lead { margin: 0; color: var(--sp-dim); font-size: 15px; text-wrap: pretty; }
.sp-lead b { color: var(--sp-text); font-weight: 600; }
.sp-note { font-size: 13px; color: var(--sp-mute); text-align: center; }
.sp-note a, .sp-link { color: var(--sp-dim); text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.sp-note a:hover, .sp-link:hover { color: var(--sp-text); border-color: rgba(255, 255, 255, .35); }
.sp-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sp-foot { position: relative; z-index: 1; text-align: center; padding: 0 16px 28px; font-size: 12px; color: var(--sp-mute); margin-top: -56px; }
.sp-foot a { color: var(--sp-mute); text-decoration: none; }
.sp-foot a:hover { color: var(--sp-text); }

/* ── alerts ── */
.sp-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45;
  border: 1px solid var(--sp-line-2); background: rgba(255, 255, 255, .04); animation: sp-rise 1.2s var(--sp-ease) .3s both; }
.sp-alert::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; background: var(--sp-dim); }
.sp-alert.error { border-color: rgba(255, 90, 71, .35); background: rgba(255, 90, 71, .07); }
.sp-alert.error::before { background: var(--sp-red); box-shadow: 0 0 10px var(--sp-red); }
.sp-alert.success::before { background: var(--sp-green); box-shadow: 0 0 10px var(--sp-green); }

/* ── fields: floating labels ── */
.sp-field { position: relative; }
.sp-field input { width: 100%; height: 56px; padding: 22px 16px 8px; border-radius: 14px; border: 1px solid var(--sp-line-2);
  background: var(--sp-field); color: var(--sp-text); font: 500 16px/1.2 var(--sp-display); outline: none;
  transition: border-color .5s var(--sp-soft), background .5s var(--sp-soft), box-shadow .7s var(--sp-ease); }
.sp-field input::placeholder { color: transparent; }
.sp-field label { position: absolute; left: 17px; top: 18px; color: var(--sp-mute); font-size: 15px; pointer-events: none;
  transform-origin: left top; transition: transform .6s var(--sp-ease), color .5s var(--sp-soft); }
.sp-field input:focus, .sp-field input:not(:placeholder-shown) { background: rgba(255, 255, 255, .06); }
.sp-field input:focus { border-color: rgba(255, 255, 255, .55); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.sp-field input:focus + label, .sp-field input:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.76); color: var(--sp-dim); }
.sp-field input:-webkit-autofill { -webkit-text-fill-color: var(--sp-text); -webkit-box-shadow: 0 0 0 100px #121216 inset; caret-color: var(--sp-text); }
.sp-field input:-webkit-autofill + label { transform: translateY(-11px) scale(.76); }
.sp-field.bad input { border-color: rgba(255, 90, 71, .6); }
.sp-eye { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent;
  color: var(--sp-mute); cursor: pointer; display: grid; place-items: center; }
.sp-eye:hover { color: var(--sp-text); }
.sp-eye svg { width: 18px; height: 18px; }
.sp-form { display: flex; flex-direction: column; gap: 12px; }

/* ── waiting page steps ── */
.sp-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.sp-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--sp-dim); }
.sp-steps .mark { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 1px solid var(--sp-line-2); display: grid; place-items: center;
  font: 500 11px/1 var(--sp-mono); color: var(--sp-mute); transition: all .5s var(--sp-ease); }
.sp-steps .done { color: var(--sp-text); }
.sp-steps .done .mark { background: var(--sp-text); border-color: var(--sp-text); color: #050507; }
.sp-steps .live .mark { border-color: rgba(255, 255, 255, .5); animation: sp-ping 2.4s ease-out infinite; }
@keyframes sp-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } }
.sp-muted { color: var(--sp-mute); font-size: 13px; min-height: 1em; }

/* ── terms ── */
.sp-doc h2 { font: 700 16px/1.3 var(--sp-display); margin: 22px 0 6px; }
.sp-doc p, .sp-doc li { font-size: 14px; color: var(--sp-dim); margin: 0 0 8px; max-width: 68ch; }
.sp-doc ul { padding-left: 18px; margin: 0; }

@media (max-width: 520px) {
  .sp-card { padding: 30px 22px; border-radius: 20px; }
  .sp-logo { font-size: 16px; letter-spacing: .32em; margin-right: -.32em; }
  .sp-head { height: 60px; padding: 0 16px; }
  .sp-nav .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sp *, .sp *::before, .sp *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── beta request form (join.js) ── */
.j-top { display: flex; align-items: center; justify-content: space-between; }
.j-count { font: 500 11px/1 var(--sp-mono); color: var(--sp-mute); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.j-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.j-progress i { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); position: relative; overflow: hidden; }
.j-progress i::after { content: ''; position: absolute; inset: 0; background: var(--sp-text); transform: scaleX(0); transform-origin: left;
  transition: transform 1.4s var(--sp-ease); }
.j-progress i.on::after { transform: scaleX(1); }
.j-viewport { display: grid; }
.j-step { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; opacity: 0; pointer-events: none;
  transform: translateX(28px); filter: blur(8px); transition: opacity .8s var(--sp-soft), transform 1.1s var(--sp-ease), filter .9s var(--sp-soft); }
.j-step.out-left { transform: translateX(-28px); }
.j-step.in { opacity: 1; transform: none; filter: none; pointer-events: auto; transition-delay: .28s; }
.j-step.shake { animation: j-shake .7s var(--sp-soft); }
@keyframes j-shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-2px); } }
.j-q { margin: 0; font: 700 clamp(24px, 4.6vw, 30px)/1.15 var(--sp-display); letter-spacing: -.022em; text-wrap: balance; }
.j-hint { margin: -6px 0 2px; color: var(--sp-dim); font-size: 14px; }
.j-err { min-height: 18px; color: var(--sp-red); font-size: 13px; }
.j-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.j-meter i { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); transition: background .8s var(--sp-soft); }
.j-meter i.on.s1 { background: var(--sp-red); }
.j-meter i.on.s2 { background: rgba(255, 255, 255, .45); }
.j-meter i.on.s3 { background: rgba(255, 255, 255, .85); }
.j-meter i.on.s4 { background: var(--sp-green); }
.j-meter-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--sp-mute); margin-top: -4px; }
.j-sum { display: flex; flex-direction: column; border: 1px solid var(--sp-line-2); border-radius: 14px; overflow: hidden; }
.j-sum div { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; font-size: 14px; }
.j-sum div + div { border-top: 1px solid var(--sp-line); }
.j-sum dt, .j-sum .k { color: var(--sp-mute); font-size: 12px; }
.j-sum .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.j-sum button { border: 0; background: transparent; color: var(--sp-dim); font: 500 12px/1 var(--sp-display); cursor: pointer; padding: 6px; }
.j-sum button:hover { color: var(--sp-text); }
.j-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--sp-dim); cursor: pointer; line-height: 1.45; }
.j-check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .35); background: transparent; cursor: pointer; display: grid; place-items: center;
  transition: background .25s, border-color .25s; }
.j-check input::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #050507; border-bottom: 2px solid #050507;
  transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .6s var(--sp-ease); }
.j-check input:checked { background: var(--sp-text); border-color: var(--sp-text); }
.j-check input:checked::after { transform: rotate(-45deg) scale(1); }
.j-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.j-actions .sp-btn { flex: 0 0 auto; }
.j-actions #j-next { min-width: 168px; padding-left: 26px; padding-right: 26px; }
.sp-eye .shut { display: none; }
.sp-eye.open .shut { display: block; }
.sp-eye.open .opened { display: none; }
.j-check .sp-link { color: var(--sp-text); border-bottom-color: rgba(255, 255, 255, .35); }

@media (max-width: 760px) { .sp-head.has-logo .sp-nav { display: none; } }
@media (max-width: 980px) { .sp-land .sp-logo { display: none; } }

/* ── the request page: a column beside the card on wide screens ── */
.sp-main.split { gap: clamp(40px, 6vw, 96px); }
.j-aside { display: none; }
@media (min-width: 980px) {
  .sp-main.split { display: grid; grid-template-columns: minmax(0, 460px) 420px; justify-content: center; align-items: center; }
  .j-aside { display: flex; flex-direction: column; gap: 18px; }
}
.j-aside > * { animation: sp-rise 1.6s var(--sp-ease) both; }
.j-aside > :nth-child(2) { animation-delay: .1s; }
.j-aside > :nth-child(3) { animation-delay: .2s; }
.j-aside > :nth-child(4) { animation-delay: .3s; }
.j-aside > :nth-child(5) { animation-delay: .5s; }
.j-big { margin: 0; font: 700 clamp(40px, 4.4vw, 60px)/1.02 var(--sp-display); letter-spacing: -.035em; text-wrap: balance; }
.j-lead { margin: 0; color: var(--sp-dim); font-size: 16px; line-height: 1.6; max-width: 40ch; }
.j-props { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.j-props li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.j-props svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; border: 1px solid var(--sp-line-2); background: rgba(255, 255, 255, .03);
  fill: none; stroke: var(--sp-text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.j-props b { display: block; font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.j-props span { color: var(--sp-dim); font-size: 13.5px; line-height: 1.5; }
.j-live { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--sp-mono); color: var(--sp-dim); margin-top: 6px; }
.j-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--sp-green); box-shadow: 0 0 10px var(--sp-green); }

/* progress as a constellation: a star lights for every answered question */
.j-stars { display: block; width: 100%; height: auto; overflow: visible; }
.jc-base { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1; stroke-dasharray: 2 4; }
.jc-link { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 1.2; stroke-dasharray: 120; stroke-dashoffset: 120;
  transition: stroke-dashoffset 1.4s var(--sp-ease); }
.jc-link.on { stroke-dashoffset: 0; }
.jc-node circle { fill: rgba(255, 255, 255, .22); transition: fill .8s var(--sp-soft); }
.jc-node .halo { fill: rgba(255, 255, 255, 0); transform-box: fill-box; transform-origin: center; transform: scale(.4);
  transition: fill 1s var(--sp-soft), transform 1.2s var(--sp-ease); }
.jc-node.on circle { fill: #fff; }
.jc-node.on .halo { fill: rgba(255, 255, 255, .12); transform: scale(1); }
.jc-node.now .halo { animation: jc-pulse 2.4s ease-out infinite; }
@keyframes jc-pulse { 0% { transform: scale(.8); fill: rgba(255, 255, 255, .22); } 100% { transform: scale(1.8); fill: rgba(255, 255, 255, 0); } }

/* the card leans a little under the pointer (fx.js) and fades into a warp when sent */
.sp-main { perspective: 1600px; }
.sp-card { transition: rotate 1.2s var(--sp-ease), opacity .7s var(--sp-soft), scale .9s var(--sp-ease), filter .7s var(--sp-soft); }
.sp-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--glow, 0);
  transition: opacity .8s var(--sp-soft); background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .06), transparent 60%); }
.sp-card.leaving { opacity: 0; scale: .96; filter: blur(8px); }
.sp-btn { transition: transform .7s var(--sp-ease), translate .6s var(--sp-ease), background .6s var(--sp-soft), border-color .6s var(--sp-soft), color .6s, opacity .6s; }
.j-aside { position: relative; }
.j-aside::before { content: ''; position: absolute; inset: -14% -18%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(2, 2, 3, .85), rgba(2, 2, 3, .55) 60%, rgba(2, 2, 3, 0)); }
