/* Auth v3: log in, sign up and every onboarding step.
   One viewport, no page scroll on desktop. Form side follows light/dark; photo side is always dark. */
.au { --au-r: 14px; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg); color: var(--fg); }
.au-f { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); }
.au-hd { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: max(28px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.au-hd .wm { color: var(--fg); }
.au-m { display: grid; align-items: center; padding: 8px max(28px, env(safe-area-inset-right, 0px)) 8px max(28px, env(safe-area-inset-left, 0px)); min-height: 0; }
.au-in { width: 100%; max-width: 408px; margin: 0 auto; display: grid; gap: 22px; align-content: center; }
.au-ft { display: flex; align-items: center; gap: 18px; padding: 16px max(28px, env(safe-area-inset-left, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; color: var(--mute); }
.au-ft a { color: var(--mute); text-decoration: none; } .au-ft a:hover { color: var(--fg); }
.au-ft span { margin-right: auto; }

/* Log in / Sign up switch: a segmented control with a sliding thumb */
.au-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
.au-tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--au-thumb, var(--surface));
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 4px 14px -4px rgb(0 0 0 / .14), inset 0 0 0 1px var(--line); transition: translate .45s var(--ease); }
.au-tabs[data-on="signup"]::before { translate: 100% 0; }
.au-tabs a { position: relative; z-index: 1; height: 40px; display: grid; place-items: center; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--mute); text-decoration: none; transition: color .2s; }
.au-tabs a[aria-current="page"] { color: var(--fg); font-weight: 600; }
.au-tabs a:hover { color: var(--fg); }

.au-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; font: 500 12.5px var(--mono); color: var(--mute); letter-spacing: -.01em; }
.au-back { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 10px; margin-left: -10px; border-radius: 999px; font: 500 14px var(--body); color: var(--fg); text-decoration: none; transition: background .2s; }
.au-back:hover { background: var(--sunk); } .au-back i { font-size: 16px; }

.au h1 { font-size: clamp(26px, 2.3vw, 32px); font-weight: 650; letter-spacing: -.035em; line-height: 1.1; color: var(--fg); }
.au h1 .r1 { font-weight: 300; } .au h1 .r2 { font-weight: 700; }
.au .lede { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--mute); text-wrap: pretty; }
.au .lede a { color: var(--fg); font-weight: 500; }
.au .progress { gap: 6px; margin-top: -8px; }
.au .progress span { height: 3px; border-radius: 99px; background: var(--line); position: relative; overflow: hidden; }
.au .progress span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--fg); }
.au .progress span.on::after { width: 100%; }
.au .progress span.now::after { width: 100%; background: var(--signal); }
@media (prefers-reduced-motion: no-preference) { .au .progress span.now::after { animation: obfill .8s var(--ease) both .1s; } }

/* Fields */
.au .formcol { gap: 16px; max-width: none; }
.au .field { gap: 7px; }
.au .field > label, .au .field > .lbl { font-size: 13.5px; font-weight: 500; color: var(--fg); letter-spacing: 0; text-transform: none; }
.au .input, .au .select { height: 50px; border-radius: var(--au-r); border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); padding: 0 16px; font-size: 15.5px; transition: border-color .2s, box-shadow .2s; }
.au .input:hover, .au .select:hover { border-color: color-mix(in srgb, var(--fg) 40%, var(--line-2)); }
.au .input:focus, .au .select:focus, .au .prefix:focus-within { outline: none; border-color: var(--fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fg) 10%, transparent); }
.au .prefix { border-radius: var(--au-r); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.au .prefix .input { box-shadow: none !important; height: 48px; }
.au .prefix span { background: var(--sunk); color: var(--fg-2); }
.au .field.err .input, .au .field.err .prefix, .au .otp.err input { border-color: var(--bad); }
.au .errtext { align-items: center; }
.au .hint a { color: var(--fg); }
.au .otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.au .otp input { height: 56px; width: 100%; border-radius: var(--au-r); border: 1px solid var(--line-2); background: var(--surface); text-align: center; font: 500 22px var(--mono); color: var(--fg); }
.au .otp input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fg) 10%, transparent); }
.au .check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--au-r); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--fg-2); cursor: pointer; }
.au .check:has(input:checked) { border-color: var(--fg); background: var(--sunk); }
.au .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fg); }

/* Buttons */
.au .btn { border-radius: var(--au-r); }
.au .btn.solid, .au .btn.primary { height: 52px; background: var(--fg); color: var(--surface); border: 0; font-size: 15.5px; font-weight: 600; }
.au .btn.solid:active, .au .btn.primary:active { transform: scale(.98); }
.au .btn.ghost { color: var(--fg-2); }
.au .actions { margin-top: 0; }

/* Choice tiles: role and category */
.au .rolepick { gap: 10px; }
.au .rolepick button { grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, background .2s, transform .15s; }
.au .rolepick button:hover { border-color: var(--fg); background: var(--sunk); }
.au .rolepick button:active { transform: scale(.985); }
.au .rolepick button i.lead { width: 48px; height: 48px; font-size: 24px; border-radius: 13px; background: var(--sunk); color: var(--fg); }
.au .rolepick button:first-child i.lead { background: var(--signal); color: #fff; }
.au .rolepick b { font-size: 16px; font-weight: 600; } .au .rolepick small { font-size: 13.5px; line-height: 1.4; display: block; margin-top: 2px; }
.au .rolepick .ph-arrow-right { color: var(--mute); transition: translate .2s var(--ease); } .au .rolepick button:hover .ph-arrow-right { translate: 3px 0; color: var(--fg); }
.au .cattiles { gap: 8px; }
.au .cattiles .tile { min-height: 0; padding: 14px 12px 12px; gap: 3px; border-radius: 16px; background: var(--surface); }
.au .cattiles .ti { width: 36px; height: 36px; font-size: 19px; border-radius: 11px; margin-bottom: 6px; }
.au .cattiles b { font-size: 14.5px; } .au .cattiles small { font-size: 12px; }
.au .cattiles .tck { right: 10px; top: 10px; font-size: 19px; }
.au .soc { gap: 8px; }
.au .sc { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; border-radius: 16px; }
.au .sc .lg { width: 42px; height: 42px; font-size: 21px; border-radius: 12px; }
.au .sc b { font-size: 15px; } .au .sc .sub { font-size: 12.5px; }
.au .checklist a, .au .checklist div.it { border-radius: 14px; }
.au .notice { padding: 12px 14px; font-size: 13.5px; }

/* Demo shortcuts on log in */
.au-demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.au-demo a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; color: var(--fg); min-width: 0; transition: border-color .2s, background .2s; }
.au-demo a:hover { border-color: var(--fg); background: var(--sunk); }
.au-demo i { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--sunk); }
.au-demo span { min-width: 0; } .au-demo b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .au-demo small { display: block; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-legal { text-align: center; } .au-legal a { color: var(--fg-2); }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .au { --au-thumb: #2C2C31; } }
:root[data-theme="dark"] .au { --au-thumb: #2C2C31; }

/* Photo side */
.au-v { display: none; }
@media (min-width: 960px) {
  .au { height: 100dvh; min-height: 600px; grid-template-columns: minmax(440px, 1fr) minmax(0, 1.08fr); overflow: hidden; }
  .au-f { min-height: 0; }
  .au-m { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .au-v { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 24px; margin: 12px 12px 12px 0; padding: clamp(28px, 4vw, 56px); border-radius: 28px; overflow: hidden; background: #0E0E10; color: #fff; }
  .au-v video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
  .au-v::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(14 14 16 / .05) 30%, rgb(14 14 16 / .55) 62%, rgb(14 14 16 / .92)); }
  .au-q { max-width: 15em; font: 300 clamp(28px, 2.9vw, 44px)/1.08 var(--display); letter-spacing: -.04em; color: #fff; text-wrap: balance; }
  .au-q b { font-weight: 700; }
  .au-card { width: min(340px, 100%); padding: 6px; border-radius: 24px; background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); }
  .au-card .ob-tip { display: none; }
  .au-card .ob-prof { max-width: none; aspect-ratio: auto; margin: 0; padding: 18px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 14px; border-radius: 19px; background: rgb(255 255 255 / .94); color: #111113; text-align: left; box-shadow: 0 20px 50px -20px rgb(0 0 0 / .6); }
  .au-card .ob-ph, .au-card .ob-brand img { width: 48px; height: 48px; margin: 0; border-radius: 14px; flex: none; }
  .au-card .ob-ph { background: #F2F2F4; color: #111113; font-size: 22px; }
  .au-card .ob-nm { flex: 1 1 0; min-width: 0; } .au-card .ob-nm b { font-size: 15px; color: #111113; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .au-card .ob-nm i { color: var(--signal); flex: none; }
  .au-card .ob-prof > small { flex-basis: 100%; margin: 0 0 0 62px; color: #6E6E73; text-align: left; }
  .au-card .ob-lines { margin: 10px 0 0; } .au-card .ob-lines i { background: #ECECEF; }
  .au-card .ob-brand > img + .ob-nm { flex: 1 1 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .au-in > * { animation: au-in .55s var(--ease) both; }
  .au-in > :nth-child(2) { animation-delay: .04s; } .au-in > :nth-child(3) { animation-delay: .08s; } .au-in > :nth-child(4) { animation-delay: .12s; } .au-in > :nth-child(n+5) { animation-delay: .16s; }
  .au-card { animation: au-in .7s var(--ease) both .15s; }
}
@keyframes au-in { from { opacity: 0; translate: 0 10px; } }
@keyframes obfill { from { width: 0; } }

/* Short screens: tighten so every step still fits without scrolling */
@media (max-height: 860px) {
  .au-hd { height: 64px; } .au-ft { padding-block: 12px; }
  .au-in { gap: 18px; } .au .formcol { gap: 14px; }
  .au .input, .au .select { height: 46px; } .au .prefix .input { height: 44px; } .au .otp input { height: 50px; }
  .au .btn.solid, .au .btn.primary { height: 48px; }
  .au h1 { font-size: 26px; } .au .lede { font-size: 14.5px; margin-top: 6px; }
  .au .rolepick button { padding: 13px 14px; }
}
@media (max-height: 720px) {
  .au-in { gap: 14px; } .au .formcol { gap: 12px; } .au .cattiles small, .au .au-demo small { display: none; }
  .au .lede { font-size: 14px; }
}
/* Phones: form only, still one screen for log in and the role pick */
@media (max-width: 959px) {
  .au-hd { height: 56px; padding-inline: 20px 12px; }
  .au-m { align-items: start; padding: 12px 20px 8px; }
  .au-in { max-width: 440px; padding-top: clamp(0px, 3vh, 32px); gap: 18px; }
  .au .formcol { gap: 14px; }
  .au-ft { padding-inline: 20px; }
}
@media (max-width: 420px) {
  .au .cattiles small { display: none; } .au .cattiles .tile { padding: 12px 10px 10px; }
  .au .field .hint { font-size: 12.5px; }
  .au-demo { grid-template-columns: 1fr; } .au-demo small { display: block !important; }
  .au .otp { gap: 6px; } .au-ft a:nth-of-type(3) { display: none; }
}
