/* ══════════════════════════════════════════════════════════════════════════
   auth-v3.css — sign-in (login.html) and sign-up (signup.html).

   Load order: plenum.css (Airflow tokens + base) → theme-auth.css (the colour
   tokens this page adds, and the .au-inverse panel palette) → this file.
   Colours come from tokens only; spacing shorthands use --sp-* (plenum) or the
   --au-* steps below, so this sheet adds nothing to the lint:css ratchet.

   The old layer, auth.css, stays for portal.html, which still uses it.

   Composition: an INSET showcase panel on the left, always the inverse of the
   page ground, with a quiet airflow field behind it and the customer record in
   front; the task sits on the page ground on the right, with no card around it.

   Motion: everything user-triggered animates; the only ambient motion is the
   airflow and the record loop on sign-in, both gated on html.motion (set before
   paint unless prefers-reduced-motion), and the loop pauses while you type.

   NAMESPACE: plenum ships .stat, .stage, .pop, .av, .bar, .n and scoped .ic /
   .amt / .dot / .sub / .d. The names here avoid the unscoped ones (.rstat,
   .panels, .node-pop, .who-av, .seg-bar, .seg-n) — check a new class against
   plenum before using it; .foot and .empty have both bitten this page before.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --num: 'Inter', system-ui, sans-serif;   /* Sora has no tabular numerals */
  --xo: cubic-bezier(.16, 1, .3, 1);       /* the one expo-out used for motion */
  --gut: clamp(24px, 4vw, 56px);
  --au-0h: 2px;
  --au-1h: 6px;
  --au-2h: 10px;
  --au-3h: 14px;
  --au-4h: 18px;
  --au-7: 28px;
  --au-9: 36px;
  --au-12: 48px;
  --au-22: 88px;
  --au-node: -22.5px;
  --au-rail-top: 22px;
  --au-peek: 7px;
  --au-neg1: -1px;
  --au-show-y: clamp(28px, 4.4vh, 52px);
  --au-show-x: clamp(26px, 4vw, 56px);
}

html { scrollbar-color: var(--hair-2) transparent; }
body { min-height: 100vh; caret-color: var(--accent); overflow-x: hidden; font-size: 14px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--ink); }
a { text-underline-offset: 3px; }
h1, h2, h3, p { text-wrap: pretty; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: var(--au-neg1);
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* plenum rings focus with a box-shadow at :where() specificity; an outline
   cannot lose to a component's own box-shadow the way that ring can */
.au-page :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.au-page :where(a, button, [tabindex]):focus-visible { box-shadow: none; }
.au-page input:focus-visible { outline: none; }

/* the drawn tick used by every "done" state */
.tk { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tk path { stroke-dasharray: 24; stroke-dashoffset: 24; }

/* ══ frame ══════════════════════════════════════════════════════════════ */
.au-page {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(400px, .95fr);
  min-height: 100vh; padding: var(--sp-3);
}

/* ══ LEFT — the showcase ════════════════════════════════════════════════ */
.show {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 22px;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--au-7);
  padding: var(--au-show-y) var(--au-show-x);
}

/* airflow: hairline ducts with air moving along them as flat dashes. No glow,
   no gradient — the mask only thins it where the reading happens. */
.flow {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask: linear-gradient(180deg, black 0, rgba(0, 0, 0, .28) 22%, rgba(0, 0, 0, .28) 62%, black 100%);
          mask: linear-gradient(180deg, black 0, rgba(0, 0, 0, .28) 22%, rgba(0, 0, 0, .28) 62%, black 100%);
}
.flow .duct { fill: none; stroke: var(--hair); stroke-width: 1.25; }
.flow .air { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .9 6.1; opacity: .5; }
.motion .flow .air { animation: au-air var(--t, 18s) linear infinite; }
@keyframes au-air { to { stroke-dashoffset: -100; } }

.mark {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: 16px; font-weight: 600; letter-spacing: -.02em; align-self: flex-start; color: var(--ink);
}
.mark img { width: 26px; height: 26px; object-fit: contain; display: block; }
.pitch-t { font-size: clamp(32px, 3.9vw, 56px); font-weight: 600; letter-spacing: -.04em; line-height: 1; max-width: 13ch; text-wrap: balance; color: var(--ink); }
.pitch-p { margin-top: 16px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }

/* ── the record card ── */
.tray { position: relative; max-width: 560px; width: 100%; }
.divs { display: flex; align-items: flex-end; gap: var(--sp-1); padding: 0 var(--au-3h); height: 31px; overflow: hidden; }
.div-t {
  flex: 0 1 auto; min-width: 0; height: 25px; padding: 0 var(--au-2h);
  border-radius: 8px 8px 0 0; background: var(--panel-2); border: 1px solid var(--hair); border-bottom: 0;
  font-size: 11.5px; line-height: 23px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: height .45s var(--xo), line-height .45s var(--xo), background .3s, color .3s;
}
.div-t.on {
  flex: none; height: 31px; line-height: 29px; max-width: 70%;
  background: var(--panel); border-color: var(--hair-2); color: var(--ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: var(--au-1h);
}
.div-t.on i { color: var(--accent); font-size: 14px; }
.div-t.on span { overflow: hidden; text-overflow: ellipsis; }
.div-t.more { margin-left: auto; flex: none; font-size: 11px; }

.rec { position: relative; border: 1px solid var(--hair-2); border-radius: 14px; background: var(--panel); box-shadow: var(--sh-2); padding: var(--sp-4) var(--au-4h) var(--au-3h); color: var(--ink); }
.motion .rec.enter { animation: au-rec-in .7s var(--xo) both; }
.motion .rec.exit { animation: au-rec-out .45s cubic-bezier(.7, 0, .84, 0) both; }
@keyframes au-rec-in { from { opacity: 0; transform: translateY(16px) rotate(-.8deg); } }
@keyframes au-rec-out { to { opacity: 0; transform: translateY(-10px) scale(.985); } }

.rec-top { display: flex; align-items: center; gap: var(--au-2h); }
.rec-ref { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-2); border: 1px solid var(--hair-2); border-radius: 99px; padding: var(--au-0h) var(--sp-2); }
/* the live status — the one word that changes as the job moves */
.rstat {
  margin-left: auto; display: inline-flex; align-items: center; gap: var(--au-1h); height: 24px; padding: 0 var(--au-2h);
  border-radius: 99px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--hair);
  transition: background .35s, color .35s, border-color .35s;
}
.rstat .blip { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.motion .rstat .blip { animation: au-blink 1.6s ease-in-out infinite; }
@keyframes au-blink { 50% { opacity: .25; } }
.rstat .tk { display: none; font-size: 13px; }
.rstat.ok { background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent-2); }
.rstat.ok .blip { display: none; }
.rstat.ok .tk { display: inline-block; }
.rstat.ok .tk path { transition: stroke-dashoffset .5s var(--xo) .1s; stroke-dashoffset: 0; }
.swap { animation: au-word .38s var(--xo); }
@keyframes au-word { from { opacity: 0; transform: translateY(5px); } }

.rec-name { font-size: 20px; font-weight: 600; letter-spacing: -.028em; margin-top: 12px; line-height: 1.2; min-height: 24px; overflow-wrap: anywhere; }
.rec-name.blank { color: var(--ink-3); }
.rec-name .caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -3px; margin-left: 2px; opacity: 0; }
.motion .rec-name.typing .caret { opacity: 1; animation: au-caret 1s steps(1) infinite; }
@keyframes au-caret { 50% { opacity: 0; } }

.rec-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--au-2h) var(--sp-4); margin-top: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.rec-meta dt { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.rec-meta dd { font-size: 12.5px; margin-top: 2px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .3s; }
.rec-meta dd small { display: block; color: var(--ink-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.rec-meta dd.blank, .rec-meta dd.blank small { color: var(--ink-3); }

.att { padding-top: 12px; }
.att-h { font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 6px; }
.att-l { list-style: none; position: relative; margin: 0; margin-left: 5px; padding: 0 0 0 var(--au-4h); }
/* the spine: one hairline, and an accent fill that grows down it */
.att-l .rail { position: absolute; left: 0; top: var(--au-rail-top); bottom: var(--au-rail-top); width: 1px; background: var(--hair-2); }
/* on the live loop the spine only exists as far as the rows that have landed */
.rec[data-live] .att-l .rail { background: transparent; }
.att-l .rail i { position: absolute; left: 0; top: 0; width: 1px; height: var(--fill, 0px); background: var(--accent); transition: height .6s var(--xo); }
.att-i {
  position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 0 var(--sp-3);
  align-items: center; padding: var(--au-1h) 0; min-height: 44px; color: var(--ink-3); transition: color .4s;
}
.att-i::before {
  content: ""; position: absolute; left: var(--au-node); top: 50%; margin-top: -5px; width: 10px; height: 10px; border-radius: 50%;
  box-sizing: border-box; background: var(--panel); border: 1.5px solid var(--hair-2);
  transition: border-color .3s, background .3s, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
/* raised or sent is hollow; money landed is filled. The row's own words carry
   the state too, so it never rests on the drawing alone. */
.att-i.lit { color: var(--ink); }
.att-i.lit::before { border-color: var(--accent); }
.att-i.settled::before { background: var(--accent); border-color: var(--accent); }
.motion .att-i.node-pop::before { animation: au-node .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes au-node { 40% { transform: scale(1.6); } }
.motion .att-i.pend { opacity: 0; transform: translateY(5px); }
.motion .att-i { transition: opacity .45s var(--xo), transform .45s var(--xo), color .4s; }
.att-i .ref { font-family: var(--mono); font-size: 10.5px; white-space: nowrap; opacity: .85; }
.att-i .what b { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.att-i .what span { display: block; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.att-i:not(.lit) .what span { color: var(--ink-3); }
.att-i .amt { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; line-height: 1.3; }
.att-i .amt small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-2); }

.show-foot { display: flex; flex-wrap: wrap; gap: var(--au-1h) var(--au-4h); font-size: 12.5px; color: var(--ink-2); }
.show-foot span { display: inline-flex; align-items: center; gap: var(--au-1h); }
.show-foot i { font-size: 15px; color: var(--ink-3); }
.build-cap { display: flex; align-items: center; gap: var(--sp-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.build-cap i { color: var(--accent); font-size: 15px; flex: none; }
.build-cap b { color: var(--ink); font-weight: 600; }

/* ══ RIGHT — the task ═══════════════════════════════════════════════════ */
.authside { display: flex; flex-direction: column; padding: var(--au-1h) var(--gut) var(--au-7); min-width: 0; }
.auth-top { display: flex; align-items: center; gap: var(--au-3h); min-height: 48px; }
.mobile-brand { display: none; }
.auth-top .aside-link { margin-left: auto; font-size: 13px; color: var(--ink-2); }
.auth-top .aside-link a { color: var(--au-link); font-weight: 600; margin-left: 4px; }
.auth-top .aside-link a:hover { text-decoration: underline; }
.theme-fab {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hair-2); background: var(--panel);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer; font-size: 17px; flex: none;
  transition: color var(--dur), border-color var(--dur);
}
.theme-fab:hover { color: var(--ink); border-color: var(--ink-3); }

.auth-mid { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--sp-6) 0; }
.auth { width: 100%; max-width: 384px; }
.auth.wide { max-width: 410px; }

/* panels (sign-in / forgot / sent / reset / 2FA) and signup steps share one
   swap: the leaving one goes, the arriving one slides in from the side you
   travelled, and the box eases between the two heights (auth-ui.js) */
.pnl, .step { display: none; }
.pnl.on, .step.in { display: block; }
.motion .pnl.on.fwd, .motion .step.in.fwd { animation: au-in-f .46s var(--xo) both; }
.motion .pnl.on.back, .motion .step.in.back { animation: au-in-b .46s var(--xo) both; }
@keyframes au-in-f { from { opacity: 0; transform: translateX(18px); } }
@keyframes au-in-b { from { opacity: 0; transform: translateX(-18px); } }
.au-sizing { transition: height .44s var(--xo); overflow: hidden; }

.lead { margin-bottom: 22px; }
.lead h1, .step h1, .notice h1 { font-size: 28px; font-weight: 600; letter-spacing: -.035em; line-height: 1.12; }
.lead p, .step .sub { margin-top: 8px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.step .sub { margin-bottom: 22px; }

/* returning visitor */
.who {
  display: none; align-items: center; gap: var(--sp-3); padding: var(--au-2h) var(--au-2h) var(--au-2h) var(--sp-3);
  border: 1px solid var(--hair-2); border-radius: 14px; background: var(--panel); box-shadow: var(--sh-1); margin-bottom: 18px;
}
.returning .who { display: flex; }
.returning .email-group { display: none; }
.who-av {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-wash); color: var(--accent-2); font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.who-nm { min-width: 0; flex: 1; }
.who-nm b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-nm span { display: block; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who button { border: 0; background: none; color: var(--au-link); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: var(--au-1h) var(--sp-2); border-radius: 8px; flex: none; }
.who button:hover { background: var(--panel-2); }

/* secondary sign-in: Google and passkey share one row */
.alt { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.alt:has(#passkeySection[style*="none"]), .alt:has(#btnGoogle[style*="none"]) { grid-template-columns: 1fr; }
#passkeySection { display: contents; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2); width: 100%; height: 46px; border-radius: 12px;
  border: 1px solid var(--hair-2); background: var(--panel); cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
  box-shadow: var(--sh-1); transition: border-color var(--dur) var(--out), background var(--dur), transform var(--dur);
}
.oauth-btn:hover { border-color: var(--ink-3); background: var(--panel-2); }
.oauth-btn:active { transform: scale(.985); }
.oauth-btn:disabled { opacity: .6; cursor: default; }
.oauth-btn svg { width: 17px; height: 17px; }
.oauth-btn i { font-size: 19px; color: var(--ink-2); }
.oauth-btn.tall { height: 48px; font-size: 14px; }

.divider { display: flex; align-items: center; gap: var(--sp-3); margin: var(--au-4h) 0; color: var(--ink-2); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.divider .d-ret, .returning .divider .d-new { display: none; }
.returning .divider .d-ret { display: inline; }

/* ── fields ── */
.form-group { margin-bottom: 14px; }
.form-group > label, .glabel { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.lbl-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.lbl-row label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.optional { font-weight: 400; color: var(--ink-2); }
.inp { position: relative; }
.inp > i { position: absolute; left: var(--sp-3); top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 18px; pointer-events: none; transition: color var(--dur); }
.inp input {
  width: 100%; height: 48px; padding: 0 var(--sp-3); padding-left: 42px; border-radius: 12px; border: 1px solid var(--hair-2);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px;
  transition: border-color var(--dur) var(--out), box-shadow var(--dur);
}
.inp input.has-peek { padding-right: 48px; }
/* iOS Safari zooms the page into any field under 16px on focus, and leaves it zoomed */
@media (pointer: coarse) { .inp input { font-size: 16px; } }
.inp input::placeholder { color: var(--ink-3); opacity: 1; }
.inp input:hover { border-color: color-mix(in srgb, var(--ink-3) 60%, var(--hair-2)); }
.inp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.inp:focus-within > i { color: var(--accent); }
.inp input[aria-invalid="true"] { border-color: var(--hot); }
.inp input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--hot) 22%, transparent); }
.inp input[readonly] { color: var(--ink-2); background: var(--panel-2); }
.motion .inp.shake { animation: au-shake .38s cubic-bezier(.36, .07, .19, .97); }
@keyframes au-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.peek {
  position: absolute; right: var(--au-peek); top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0;
  border-radius: 9px; background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; font-size: 18px;
}
.peek:hover { color: var(--ink); background: var(--panel-2); }

/* help that appears under a field only when it has something to say */
.caps, .say, .field-err { display: none; align-items: flex-start; gap: var(--au-1h); margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.caps.on, .say.on, .field-err.on { display: flex; }
.caps i, .say i { color: var(--accent-2); font-size: 15px; margin-top: 1px; }
.field-err { color: var(--au-neg-ink); }
.field-err i { font-size: 15px; margin-top: 1px; }
.motion .say.on, .motion .field-err.on { animation: au-word .3s var(--xo); }
.fix { border: 0; background: var(--accent-wash); color: var(--accent-2); font: inherit; font-weight: 600; font-size: 12.5px; border-radius: 7px; padding: 0 var(--sp-2); cursor: pointer; }
.fix:hover { text-decoration: underline; }

.btn-link { background: none; border: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--au-link); cursor: pointer; padding: 0; border-radius: 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-link[disabled] { color: var(--ink-3); cursor: default; text-decoration: none; }

.cf-turnstile { margin-bottom: 14px; }
.cf-turnstile:empty { display: none; }

/* password rules that tick themselves (reset panel + signup) */
.rules { display: flex; flex-wrap: wrap; gap: var(--au-1h); margin-top: 9px; }
.rules.stack { display: grid; gap: var(--au-1h); margin-bottom: 14px; }
.rule {
  display: inline-flex; align-items: center; gap: var(--au-1h); min-height: 26px; padding: 0 var(--au-2h) 0 var(--au-1h);
  border-radius: 99px; border: 1px solid var(--hair-2); font-size: 12px; color: var(--ink-2);
  transition: background .3s, border-color .3s, color .3s;
}
.rules.stack .rule { border: 0; padding: 0; min-height: 20px; font-size: 12.5px; }
.rule .bx { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--hair-2); display: grid; place-items: center; flex: none; font-size: 10px; color: var(--au-btn-ink); transition: background .3s, border-color .3s; }
.rule .tk { stroke-width: 3.2; }
.rule .tk path { transition: stroke-dashoffset .35s var(--xo); }
.rule.met { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 40%, var(--hair-2)); background: var(--accent-wash); }
.rules.stack .rule.met { background: none; }
.rule.met .bx { background: var(--au-btn); border-color: var(--au-btn); }
.rule.met .tk path { stroke-dashoffset: 0; }

/* ── primary action: idle → busy → done in one button that never resizes ── */
.btn-primary {
  position: relative; width: 100%; height: 50px; border: 0; border-radius: 12px; background: var(--au-btn); color: var(--au-btn-ink);
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; display: grid; place-items: center; text-decoration: none;
  box-shadow: var(--sh-1); transition: background var(--dur) var(--out), box-shadow var(--dur), transform var(--dur), opacity var(--dur);
}
.btn-primary:hover { background: var(--au-btn-hover); box-shadow: var(--sh-2); }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn-primary.busy:disabled, .btn-primary.done:disabled { opacity: 1; }
.btn-primary > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: var(--sp-2); transition: opacity .22s, transform .3s var(--xo); }
.btn-primary > span i { font-size: 17px; }
.btn-primary .b-busy, .btn-primary .b-done { opacity: 0; transform: translateY(6px); }
.btn-primary.busy .b-idle, .btn-primary.done .b-idle { opacity: 0; transform: translateY(-6px); }
.btn-primary.busy .b-busy, .btn-primary.done .b-done { opacity: 1; transform: none; }
.btn-primary.busy, .btn-primary.done { pointer-events: none; }
.btn-primary .b-done .tk { font-size: 18px; }
.btn-primary.done .b-done .tk path { transition: stroke-dashoffset .5s var(--xo) .12s; stroke-dashoffset: 0; }
.spin, .spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor;
  animation: au-spin .7s linear infinite; vertical-align: -3px;
}
@keyframes au-spin { to { transform: rotate(360deg); } }

.btn-ghost {
  height: 50px; padding: 0 var(--sp-4); border-radius: 12px; border: 1px solid var(--hair-2); background: var(--panel); color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  text-decoration: none; transition: border-color var(--dur), background var(--dur);
}
.btn-ghost:hover { border-color: var(--ink-3); background: var(--panel-2); color: var(--ink); }
.btn-ghost i { font-size: 17px; }
.btn-ghost.full { width: 100%; }
.nav { display: flex; gap: var(--au-2h); margin-top: 20px; }
.nav .btn-primary { flex: 1; }

/* login.js / signup.js write className "alert error|success" / "alert err" */
.alert { display: none; gap: var(--sp-2); align-items: flex-start; padding: var(--au-2h) var(--sp-3); border-radius: 12px; font-size: 12.5px; line-height: 1.5; margin-top: 14px; }
.alert i { font-size: 16px; flex: none; margin-top: 1px; }
.alert.error, .alert.err {
  display: flex; color: var(--au-neg-ink);
  background: color-mix(in srgb, var(--hot) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--hot) 28%, var(--panel));
}
.alert.success { display: flex; color: var(--accent-2); background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--panel)); }

.back-link {
  display: inline-flex; align-items: center; gap: var(--au-1h); background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 600; color: var(--ink-2); padding: var(--au-1h) var(--sp-2) var(--au-1h) var(--au-0h);
  margin: 0 0 var(--au-4h) calc(var(--au-0h) * -1); border-radius: 8px;
}
.back-link:hover { color: var(--ink); }
.back-link i { transition: transform var(--dur) var(--xo); }
.back-link:hover i { transform: translateX(-3px); }

/* guest: an option, not an alarm */
.guest { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.guest-btn { display: inline; background: none; border: 0; padding: 0; font: inherit; color: var(--au-link); font-weight: 600; cursor: pointer; }
.guest-btn:hover { text-decoration: underline; }
#guestWarning { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.legal { margin-top: 16px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.legal a { color: var(--ink-2); text-decoration: underline; }
.legal a:hover { color: var(--ink); }
.mob-new { display: none; margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--ink-2); }
.mob-new a { color: var(--au-link); font-weight: 600; }

/* invite-only / registration-off */
.invite-only-notice { display: none; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); }
.notice { display: none; }
.beta-badge {
  display: inline-flex; align-items: center; gap: var(--au-1h); min-height: 28px; padding: 0 var(--sp-3); border-radius: 99px; margin-bottom: 14px;
  background: var(--accent-wash); color: var(--accent-2); font-size: 12px; font-weight: 600;
}
.beta-badge i { font-size: 14px; }
.invite-only-notice p, .notice p { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-bottom: 18px; }
.notice h1 { margin-bottom: 10px; }

/* "check your inbox" (login sent + signup done) */
.sent, .ready { text-align: center; }
.env { width: 96px; height: 80px; margin: 0 auto var(--au-4h); display: block; }
.env .body { fill: var(--panel); stroke: var(--hair-2); stroke-width: 1.5; }
.env .flap { fill: none; stroke: var(--hair-2); stroke-width: 1.5; stroke-linejoin: round; }
.env .sheet { fill: var(--panel); stroke: var(--accent); stroke-width: 1.5; }
.env .lines { stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; opacity: .55; }
.motion .on .env .letter, .motion .in .env .letter { animation: au-letter 1s var(--xo) .15s both; }
@keyframes au-letter { from { transform: translateY(-30px); opacity: 0; } }
.sent .lead p b, .ready .sub b { color: var(--ink); font-weight: 600; word-break: break-all; }
.acts { display: grid; gap: var(--sp-2); }
.small-print { margin-top: 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }

/* six-box code */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-2); margin-bottom: 8px; }
.otp input {
  width: 100%; height: 58px; border-radius: 12px; border: 1px solid var(--hair-2); background: var(--panel); color: var(--ink); text-align: center;
  font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600;
  transition: border-color var(--dur), box-shadow var(--dur), transform .2s var(--xo);
}
.otp input:nth-child(3) { margin-right: 6px; }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.otp input.fill { border-color: var(--ink-3); }
.otp.bad input { border-color: var(--hot); }
.motion .otp.bad { animation: au-shake .38s cubic-bezier(.36, .07, .19, .97); }
.motion .otp input.bump { animation: au-bump .22s var(--xo); }
@keyframes au-bump { 50% { transform: scale(1.06); } }
.otp-note { font-size: 12.5px; color: var(--ink-2); margin-bottom: 14px; }
.center { text-align: center; margin-top: 14px; }

/* ══ signup ═════════════════════════════════════════════════════════════ */
/* labelled progress — two named steps, not a row of blank pips */
.progress { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-bottom: 26px; }
.progress.gone { visibility: hidden; height: 0; margin: 0; overflow: hidden; }
.seg { font-size: 12px; font-weight: 600; color: var(--ink-3); transition: color .3s; }
.seg-bar { display: block; height: 4px; border-radius: 99px; background: var(--hair-2); overflow: hidden; margin-bottom: 8px; }
.seg-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--xo); }
.seg.active { color: var(--ink); }
.seg.active .seg-bar i { transform: scaleX(.5); }
.seg.done { color: var(--ink-2); }
.seg.done .seg-bar i { transform: scaleX(1); }
.seg-n { font-family: var(--num); font-weight: 500; color: var(--ink-3); margin-right: 5px; }

.fieldset { border: 0; margin: 0 0 var(--sp-4); padding: 0; min-width: 0; }
.cards, .pills { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.opt, .pill {
  position: relative; text-align: left; cursor: pointer; background: var(--panel); border: 1px solid var(--hair-2); border-radius: 12px;
  font: inherit; color: var(--ink); transition: border-color var(--dur) var(--out), background var(--dur), transform .25s var(--xo);
}
.opt { padding: var(--sp-3) var(--au-3h); }
.opt:hover, .pill:hover { border-color: var(--ink-3); }
.opt .oi { display: block; font-size: 21px; color: var(--ink-2); margin-bottom: 8px; line-height: 1; }
.opt .t { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; padding-right: 22px; }
.opt .d { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.35; }
.opt.sel, .pill.sel { border-color: var(--accent); background: var(--accent-wash); box-shadow: 0 0 0 1px var(--accent) inset; }
.opt.sel .oi { color: var(--accent-2); }
.motion .opt.pulse, .motion .pill.pulse { animation: au-pulse .32s var(--xo); }
@keyframes au-pulse { 50% { transform: scale(.975); } }
.chk {
  position: absolute; top: var(--au-2h); right: var(--au-2h); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--hair-2); background: var(--panel); font-size: 12px; color: var(--au-btn-ink); transition: background .25s, border-color .25s;
}
.chk .tk { stroke-width: 3; }
.chk .tk path { transition: stroke-dashoffset .35s var(--xo) .05s; }
.sel .chk { background: var(--au-btn); border-color: var(--au-btn); }
.sel .chk .tk path { stroke-dashoffset: 0; }
.aibadge { display: none; margin-top: 8px; font-size: 11px; font-weight: 600; color: var(--accent-2); align-items: center; gap: var(--sp-1); }
.opt.aiguess .aibadge { display: inline-flex; }
.pill { display: block; padding: var(--au-2h) var(--au-9) var(--au-2h) var(--sp-3); font-size: 13.5px; }
.pill b { display: block; font-weight: 600; line-height: 1.3; }
.pill .pl { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.pill .chk { top: 50%; margin-top: -10px; }
.pill .det { display: none; font-size: 11px; font-weight: 600; color: var(--accent-2); margin-top: 4px; }
.pill.detected .det { display: block; }
.aihint { display: flex; align-items: flex-start; gap: var(--au-1h); font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.aihint:empty { display: none; }
.aihint i { color: var(--accent-2); font-size: 15px; margin-top: 1px; }
.aihint b { color: var(--ink); font-weight: 600; }
.motion .aihint:not(:empty) { animation: au-word .3s var(--xo); }
.one-trade #tradeGroup { display: none; }

.next-h { margin-top: 26px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.checklist { text-align: left; margin-top: 8px; border-top: 1px solid var(--hair); }
.cl { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--au-2h) 0; border-bottom: 1px solid var(--hair); }
.cl .b {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px;
  border: 1.5px solid var(--hair-2); font-family: var(--num); font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.cl .x { font-size: 13px; font-weight: 600; line-height: 1.4; }
.cl .y { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; margin-top: 1px; }
.motion .step.in .cl { animation: au-word .5s var(--xo) both; }

/* ══ responsive ═════════════════════════════════════════════════════════ */
@media (max-width: 1180px) and (min-width: 901px) {
  .rec-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-meta > div:nth-child(3) { display: none; }
}
/* short laptop screens: stand the paragraph down and tighten the rows rather
   than let the record fall below the fold */
@media (min-width: 901px) and (max-height: 860px) {
  .pitch-p { display: none; }
  .pitch-t { font-size: clamp(30px, 3.2vw, 44px); }
  .rec-meta dd small { display: none; }
  .att-i { min-height: 38px; padding: var(--sp-1) 0; }
}
/* On a phone the task leads and the record FOLLOWS it — demoted, not deleted */
@media (max-width: 900px) {
  .au-page { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .show, .authside { min-width: 0; }
  .authside { order: 1; padding: var(--sp-2) var(--sp-5) var(--au-9); }
  .mobile-brand { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: 15px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
  .mobile-brand img { width: 24px; height: 24px; object-fit: contain; display: block; }
  .auth-top .aside-link.hide-sm { display: none; }
  .auth-top .aside-link { font-size: 12.5px; }
  .theme-fab { margin-left: auto; }
  .auth-top .aside-link + .theme-fab { margin-left: 0; }
  .auth-top .aside-link.hide-sm + .theme-fab { margin-left: auto; }
  .auth-mid { padding: var(--au-4h) 0 0; align-items: flex-start; }
  .auth, .auth.wide { max-width: 440px; margin: 0 auto; }
  .mob-new { display: block; }
  .show { order: 2; margin: 0 var(--sp-3) var(--sp-3); border-radius: 20px; gap: var(--au-4h); padding: var(--au-7) var(--au-4h) var(--sp-6); }
  .show .mark, .pitch-p, .show-foot .opt-sm { display: none; }
  .pitch-t { font-size: 27px; max-width: 18ch; }
  .divs { padding: 0 var(--sp-2); }
  .div-t:not(.on):not(.more) { display: none; }
  .rec { padding: var(--au-3h) var(--au-3h) var(--au-2h); }
  .rec-meta { grid-template-columns: 1fr 1fr; }
  .rec-meta > div:nth-child(3) { display: none; }
  .att-i { grid-template-columns: minmax(0, 1fr) auto; }
  .att-i .ref { display: none; }
}
@media (max-width: 380px) { .cards, .pills { grid-template-columns: 1fr; } }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* reduced motion: html.motion is never set, so every entrance above is already
   off; this also stops the plain transitions. The spinner keeps turning — it is
   the only thing that says "working". */
:root:not(.motion) .au-page *, :root:not(.motion) .au-page *::before { transition: none; }
