/* Onboarding after sign-up / sign-in (assets/onboarding.js). Same grammar as the auth pages: Inter, black on white,
   hairlines, Apple blue as the only accent. --spring / --pop are set by the script as CSS linear() springs. */
.auth__body.is-onb { place-items: start center; padding-top: clamp(24px, 7vh, 80px); }
html.onb-on .auth__top p { visibility: hidden; }

.onb { width: 100%; max-width: 452px; }
.onb__bar { position: relative; display: flex; align-items: center; height: 36px; margin: 0 0 40px; }
.onb__bar .onb__back { position: absolute; left: -52px; top: 0; }
.onb__back { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s, opacity .25s; }
.onb__back:hover { background: var(--soft); color: var(--ink); }
.onb__back svg { width: 18px; height: 18px; }
.onb__back.is-off { opacity: 0; pointer-events: none; }
.onb__track { flex: 1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.onb__fill { width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .7s var(--spring, cubic-bezier(.16, 1, .3, 1)); }
.onb__mini { display: none; }
.onb__bar, .onb__mini { transition: opacity .3s; }
.onb.is-wait .onb__bar, .onb.is-wait .onb__mini { opacity: 0; }

.onb__step { outline: none; }
.onb h1 { font-size: 38px; line-height: 1.06; letter-spacing: -.042em; text-wrap: balance; outline: none; }
.onb__lead { margin-top: 12px; color: var(--ink-2); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.onb__set { margin: 30px 0 0; padding: 0; border: 0; min-width: 0; }
.onb__err { margin-top: 12px; font-size: 14px; color: #c4321f; }
.onb__err:empty { display: none; }
[data-theme="dark"] .onb__err { color: #ff8a7a; }

/* inputs */
.onb input.onb__in { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.onb__o { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.onb__face { transition: background .18s, box-shadow .18s, color .18s, transform .22s var(--spring, ease); }
.onb__o:active .onb__face { transform: scale(.975); }
.onb__in:focus-visible + .onb__face, .onb__in:focus-visible + .onb__swt { outline: 2px solid var(--blue); outline-offset: 3px; }

/* name */
.onb__names { margin-top: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.onb__names input, .onb__other input { width: 100%; min-width: 0; }
.onb .f input[type=text] { height: 52px; font-size: 16px; padding: 0 16px; border-radius: 14px; }
.onb__other .f { margin-top: 14px; }
.is-shake { animation: onb-shake .36s cubic-bezier(.36, .07, .19, .97); }
@keyframes onb-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* cards: role */
.onb__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.onb__cards .onb__face { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; height: 100%; padding: 10px 14px 10px 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; font-weight: 500; line-height: 1.25; }
.onb__ind { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background .18s, box-shadow .18s; }
.onb__ind svg { width: 12px; height: 12px; color: #fff; transform: scale(0); transition: transform .5s var(--pop, cubic-bezier(.34, 1.56, .64, 1)); }

/* chips: what you'll make, where you heard */
.onb__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onb__chips .onb__face { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; font-weight: 500; white-space: nowrap; }
.onb__chips--multi .onb__face { padding-left: 14px; }
.onb__pi { position: relative; width: 14px; height: 14px; flex: none; }
.onb__pi svg { position: absolute; inset: 0; width: 14px; height: 14px; transition: transform .45s var(--pop, cubic-bezier(.34, 1.56, .64, 1)), opacity .2s; }
.onb__pi .p { color: var(--ink-3); }
.onb__pi .c { color: var(--blue); opacity: 0; transform: scale(.3) rotate(-30deg); }
.onb__in:checked + .onb__face .onb__pi .p { opacity: 0; transform: rotate(90deg) scale(.3); }
.onb__in:checked + .onb__face .onb__pi .c { opacity: 1; transform: none; }

/* team size */
.onb__team { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.onb__team .onb__face { display: grid; place-items: center; height: 64px; padding: 0 4px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 17px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }

/* shared states */
@media (hover: hover) { .onb__o:hover .onb__face, .onb__sw:hover { background: var(--soft); } }
.onb__in:checked + .onb__face, .onb__o:hover .onb__in:checked + .onb__face { background: var(--blue-tint); box-shadow: inset 0 0 0 1.5px var(--blue); }
.onb__in:checked + .onb__face .onb__ind { background: var(--blue); box-shadow: none; }
.onb__in:checked + .onb__face .onb__ind svg { transform: none; }

/* "somewhere else" field opens under the chips */
.onb__other { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--spring, cubic-bezier(.16, 1, .3, 1)); }
.onb__other.is-open { grid-template-rows: 1fr; }
.onb__other > div { overflow: hidden; padding: 0 4px 4px; margin: 0 -4px; }

/* updates switch */
.onb__sw { display: flex; align-items: center; gap: 18px; padding: 18px 18px 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: box-shadow .2s, background .2s; }
.onb__sw:has(.onb__in:checked) { box-shadow: inset 0 0 0 1.5px var(--blue); }
.onb__swc { flex: 1; min-width: 0; }
.onb__swc b { display: block; font-size: 15px; font-weight: 500; line-height: 1.35; }
.onb__swc span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.onb__swt { position: relative; flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); transition: background .25s; }
.onb__swt::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .1); transition: transform .55s var(--pop, cubic-bezier(.34, 1.56, .64, 1)); }
.onb__in:checked + .onb__swt { background: var(--blue); }
.onb__in:checked + .onb__swt::after { transform: translateX(18px); }
.onb__fine { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* actions */
.onb__actions { display: flex; align-items: center; gap: 6px; margin-top: 32px; }
.onb__actions .pill { height: 48px; padding: 0 28px; }
.onb .pill:focus-visible, .onb__skip:focus-visible, .onb__back:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.onb__skip { height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 500 15px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
@media (hover: hover) { .onb__skip:hover { background: var(--soft); color: var(--ink); } }
.onb__kbd { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.onb__kbd kbd { font: 500 12px/1 var(--sans); padding: 4px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }

/* finish */
.onb__fin { display: grid; gap: 10px; margin-top: 32px; }
.onb__fin .pill { width: 100%; height: 50px; }
.onb__fin .pill svg { width: 17px; height: 17px; }

/* the scene on the right: two more stickers, popped in when their question comes up */
.auth__s--rec { left: 9%; bottom: 11%; }
.auth__s--zoom { right: 9%; top: 47%; }
.onb-stk { opacity: 0; }
.onb-stk.is-on { animation: stk-pop .6s cubic-bezier(.34, 1.56, .64, 1) both; }

@media (max-width: 900px) {
  .auth__body.is-onb { padding-top: 12px; padding-bottom: 32px; }
  .onb__bar { margin: 0 0 18px; }
  .onb__bar .onb__back { left: -8px; }
  .onb__track { transition: margin-left .5s var(--spring, ease); }
  .onb__bar:has(.onb__back:not(.is-off)) .onb__track { margin-left: 40px; }
  .onb__mini .stk { filter: drop-shadow(0 1px 1px rgba(13, 13, 13, .1)) drop-shadow(0 4px 6px rgba(13, 13, 13, .1)); }
  .onb__mini { display: flex; align-items: flex-end; gap: 14px; height: 70px; margin-bottom: 22px; }
  .onb__mini .stk svg { width: auto; height: 62px; }
  .onb__mini .stk[data-s="klap"] svg { height: 66px; }
  .onb__mini .stk[data-s="cur"] svg { height: 44px; }
  .onb__mini .stk[data-s="zoom"] svg { height: 54px; }
  .onb__mini .stk[data-s="rec"] svg { height: 34px; }
  .onb__mini .stk[data-s="rec"] { margin-bottom: 8px; }
  .onb h1 { font-size: 31px; }
  .onb__lead { font-size: 15px; margin-top: 10px; }
  .onb__set, .onb__names { margin-top: 24px; }
  .onb__cards .onb__face { min-height: 54px; padding: 9px 12px 9px 14px; font-size: 14.5px; gap: 8px; }
  .onb__ind { width: 18px; height: 18px; }
  .onb__chips .onb__face { height: 42px; padding: 0 15px; font-size: 14.5px; }
  .onb__chips--multi .onb__face { padding-left: 12px; }
  .onb__team { gap: 6px; }
  .onb__team .onb__face { height: 56px; font-size: 15px; border-radius: 12px; }
  .onb__actions { margin-top: 28px; }
  .onb__actions .pill { flex: 1; }
  .onb__kbd { display: none; }
}
@media (max-width: 380px) { .onb__names { grid-template-columns: 1fr; } }
@media (hover: none) { .onb__kbd { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .onb__fill, .onb__face, .onb__ind svg, .onb__pi svg, .onb__swt::after, .onb__other { transition-duration: .01s !important; }
  .is-shake { animation: none; }
  .onb-stk.is-on { animation: none; opacity: 1; }
}
/* laptops with a short window: everything on one screen, no scroll on the longest question */
@media (min-width: 901px) and (max-height: 860px) {
  .auth__body.is-onb { padding-top: 16px; padding-bottom: 24px; }
  .onb__bar { margin-bottom: 28px; }
  .onb h1 { font-size: 35px; }
  .onb__set, .onb__names { margin-top: 24px; }
  .onb__cards .onb__face { min-height: 50px; }
  .onb__actions { margin-top: 24px; }
}
.onb .f input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #c4321f, 0 0 0 4px rgba(196, 50, 31, .1); }
[data-theme="dark"] .onb .f input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #ff8a7a, 0 0 0 4px rgba(255, 138, 122, .12); }
