/* =====================================================================
   STYKE — login, register, reset
   ===================================================================== */
.auth { min-height: 100vh; min-height: 100svh; display: grid; }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(420px, 46%) 1fr; } }

/* left: brand panel (desktop only) */
.auth__art { display: none; position: relative; overflow: hidden; isolation: isolate; background: #020403; border-right: 1px solid var(--line); }
@media (min-width: 1024px) { .auth__art { display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; } }
.auth__art picture {
  position: absolute; z-index: -1; left: -14%; right: -14%; top: 44%; transform: translateY(-50%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 56%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 56%, transparent 100%);
}
.auth__img { width: 100%; height: auto; animation: auth-drift 18s var(--ease-in-out) infinite alternate; }
@keyframes auth-drift { from { transform: scale(1) translateY(0); } to { transform: scale(1.04) translateY(-1.5%); } }
.auth__art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(2, 4, 3, .2) 0%, rgba(2, 4, 3, 0) 35%, rgba(2, 4, 3, .75) 72%, #020403 100%); }
.auth__quote .h3 { font-size: clamp(1.8rem, 1.2rem + 1.4vw, 2.6rem); }
.auth__quote p + p { margin-top: 10px; color: var(--text-2); max-width: 28em; }
.auth__points { margin-top: 28px; display: grid; gap: 10px; color: var(--text-2); font-size: .92rem; }
.auth__points li { display: flex; align-items: center; gap: .6rem; }
.auth__points .i { color: var(--accent); stroke-width: 2.4; width: 1.1em; height: 1.1em; }

/* right: form column */
.auth__main { display: flex; flex-direction: column; min-width: 0; padding: 20px var(--gutter) calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .auth__main { padding: 28px 48px 32px; } }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 44px; }
.auth__top .logo { height: 24px; }
.auth__top .logo img { height: 24px; width: auto; }
.auth__back { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--text-3); transition: color .2s; }
.auth__back:hover { color: var(--text); }
.auth__body { flex: 1; display: grid; align-items: center; padding: 40px 0; }
.auth__panel { width: 100%; max-width: 420px; margin-inline: auto; }
.auth__panel--wide { max-width: 520px; }
.auth__title { font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.5rem); line-height: 1.05; }
.auth__sub { margin-top: 12px; color: var(--text-2); }
.auth__form { margin-top: 32px; display: grid; gap: 18px; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: -6px; font-size: .88rem; }
.auth__alert { display: flex; gap: .6rem; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); background: var(--danger-soft); color: #ffb3b3; font-size: .9rem; line-height: 1.45; border: 1px solid rgba(255, 93, 93, .25); }
.auth__alert .i { margin-top: 1px; flex: none; color: var(--danger); }
.auth__alert--ok { background: var(--accent-soft); color: #bff5cd; border-color: var(--accent-line); }
.auth__alert--ok .i { color: var(--accent); }
.auth__alert--warn { background: var(--warning-soft); color: #ffe0a8; border-color: rgba(243, 182, 74, .3); }
.auth__alert--warn .i { color: var(--warning); }
.auth__alert .btn { margin-top: 8px; }
.auth__divider { display: flex; align-items: center; gap: 14px; margin: 28px 0 18px; color: var(--text-4); font-size: .82rem; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: .78rem; color: var(--text-4); }
.auth__foot a:hover { color: var(--text-2); }
.auth__demo { margin-top: 24px; padding: 14px; border-radius: var(--r); border: 1px dashed rgba(243, 182, 74, .35); background: rgba(243, 182, 74, .05); font-size: .82rem; color: var(--text-2); line-height: 1.55; }
.auth__demo strong { color: var(--warning); }
.auth__demo code { font-family: var(--mono); font-size: .8rem; color: var(--text); }
.captcha:empty { display: none; }
.captcha { min-height: 78px; }

/* one-time code boxes */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 360px; }
.otp input {
  width: 100%; aspect-ratio: 5 / 6; min-width: 0; text-align: center; padding: 0;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.7rem); font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s); color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.otp input.is-filled { border-color: var(--line-3); }
.otp.is-error input { border-color: rgba(255, 93, 93, .7); animation: shake .35s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* password strength */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.pw-meter span { height: 4px; border-radius: 2px; background: var(--surface-4); transition: background .3s var(--ease); }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: #9fe34d; }
.pw-meter[data-score="4"] span { background: var(--accent); }
.pw-rules { display: grid; gap: 6px; margin-top: 4px; font-size: .82rem; color: var(--text-3); }
@media (min-width: 480px) { .pw-rules { grid-template-columns: 1fr 1fr; } }
.pw-rules li { display: flex; align-items: center; gap: .45rem; transition: color .2s; }
.pw-rules li .i { width: 14px; height: 14px; stroke-width: 2.6; opacity: .35; transition: opacity .2s, color .2s; }
.pw-rules li.ok { color: var(--text-2); }
.pw-rules li.ok .i { opacity: 1; color: var(--accent); }
.pw-rules li.bad { color: #ff8080; }
.pw-rules li.bad .i { opacity: 1; color: var(--danger); }

/* ---------------- register wizard ---------------- */
.wiz__progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-bottom: 28px; }
.wiz__progress span { height: 4px; border-radius: 2px; background: var(--surface-4); overflow: hidden; position: relative; }
.wiz__progress span::after { content: ""; position: absolute; inset: 0; background: var(--grad-h); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.wiz__progress span.is-done::after, .wiz__progress span.is-current::after { transform: scaleX(1); }
.wiz__progress span.is-current::after { opacity: .55; }
.wiz__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .8rem; color: var(--text-3); margin-bottom: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-stretch: 112%; }
.wiz__stage { position: relative; }
.wiz__step { display: grid; gap: 22px; }
.wiz__step.is-enter { animation: step-in .5s var(--ease-out) both; }
.wiz__step.is-enter-back { animation: step-in-back .5s var(--ease-out) both; }
@keyframes step-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-28px); } }
.wiz__q { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); line-height: 1.1; }
.wiz__hint { color: var(--text-2); margin-top: -10px; }
.wiz__nav { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.wiz__nav .btn--primary { margin-left: auto; min-width: 150px; }
.wiz__legal { font-size: .78rem; color: var(--text-4); margin-top: 22px; line-height: 1.55; }
.wiz__legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.nick-state { font-size: .82rem; display: flex; align-items: center; gap: .4rem; min-height: 20px; color: var(--text-3); }
.nick-state.ok { color: var(--accent); }
.nick-state.bad { color: #ff8080; }
.nick-state .i { width: 15px; height: 15px; stroke-width: 2.6; }

.phone { display: grid; grid-template-columns: 124px 1fr; gap: 8px; }
.phone__cc { position: relative; }
.phone__cc-view { display: flex; align-items: center; gap: 8px; pointer-events: none; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.phone__cc-view b { font-weight: 600; font-size: .8rem; color: var(--text-3); letter-spacing: .04em; }
.phone__cc-view::after { content: ""; margin-left: auto; width: 14px; height: 14px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7b1ac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain; }
.phone__cc-select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.phone__cc:focus-within .phone__cc-view { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.phone__cc:hover .phone__cc-view { border-color: var(--line-3); }

.choices { display: grid; gap: 10px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.choice:hover { border-color: var(--line-3); background: var(--surface-2); }
.choice:active { transform: scale(.995); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); color: var(--text-2); transition: background .2s, color .2s; }
.choice__text { display: grid; gap: 2px; min-width: 0; }
.choice__title { font-weight: 600; }
.choice__desc { font-size: .84rem; color: var(--text-3); }
.choice__tick { margin-left: auto; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; transition: all .2s var(--ease-out); }
.choice__tick .i { width: 13px; height: 13px; stroke-width: 3; color: var(--accent-ink); opacity: 0; transform: scale(.5); transition: all .25s var(--ease-out); }
.choice:has(input:checked) { border-color: var(--accent); background: rgba(45, 227, 93, .06); }
.choice:has(input:checked) .choice__icon { background: var(--accent); color: var(--accent-ink); }
.choice:has(input:checked) .choice__tick { background: var(--accent); border-color: var(--accent); }
.choice:has(input:checked) .choice__tick .i { opacity: 1; transform: none; }
.choice.is-checked { border-color: var(--accent); background: rgba(45, 227, 93, .06); }
.choice.is-checked .choice__icon { background: var(--accent); color: var(--accent-ink); }
.choice.is-checked .choice__tick { background: var(--accent); border-color: var(--accent); }
.choice.is-checked .choice__tick .i { opacity: 1; transform: none; }
/* keyboard focus only: after a tap, the first option must not look picked */
.choice:has(input:focus-visible) { outline: 2px solid var(--accent-line); outline-offset: 2px; }

/* "how much" icon (reach, time): 0-3 bars lit */
.lvl { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.lvl i { width: 5px; border-radius: 2px; background: currentColor; opacity: .28; }
.lvl i:nth-child(1) { height: 8px; }
.lvl i:nth-child(2) { height: 13px; }
.lvl i:nth-child(3) { height: 18px; }
.lvl[data-n="1"] i:nth-child(-n+1), .lvl[data-n="2"] i:nth-child(-n+2), .lvl[data-n="3"] i { opacity: 1; }

/* follow-up question that opens under the answers when it applies */
.wiz__more { display: grid; gap: 10px; padding-top: 4px; animation: more-in .4s var(--ease-out) both; }
.wiz__more[hidden] { display: none; }
.wiz__more .field__hint { margin-top: 2px; }
@keyframes more-in { from { opacity: 0; transform: translateY(-6px); } }
.field__opt { font-weight: 500; color: var(--text-4); }

/* short answers side by side */
.pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pill { position: relative; display: grid; place-items: center; min-height: 46px; padding: 8px 6px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .9rem; text-align: center; cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color .2s, background .2s, color .2s; }
.pill:hover { border-color: var(--line-3); background: var(--surface-2); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) { border-color: var(--accent); background: rgba(45, 227, 93, .06); color: var(--accent); }
.pill:has(input:focus-visible) { outline: 2px solid var(--accent-line); outline-offset: 2px; }

.review { display: grid; border-top: 1px solid var(--line); }
.review__row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.review__row dt { color: var(--text-3); }
.review__row dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review__row button { font-size: .82rem; color: var(--accent); font-weight: 600; }
@media (max-width: 400px) { .review__row { grid-template-columns: 1fr auto; } .review__row dt { grid-column: 1 / -1; font-size: .78rem; margin-bottom: -8px; } }

/* done / status screens */
.done { text-align: center; display: grid; justify-items: center; gap: 16px; }
.done__icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; position: relative; }
.done__icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* every path here has pathLength="1", so the line always draws to the end, whatever the icon */
.done__icon path { stroke-dasharray: 1 2; stroke-dashoffset: 1; animation: draw .6s var(--ease-out) .25s forwards; }
.done__icon::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1.5px solid var(--accent-line); animation: pulse-ring 2.4s var(--ease-out) infinite; }
.done__icon--amber { background: var(--warning-soft); color: var(--warning); }
.done__icon--amber::after { border-color: rgba(243, 182, 74, .35); }
.done__icon--red { background: var(--danger-soft); color: var(--danger); }
.done__icon--red::after { display: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse-ring { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.done p { color: var(--text-2); max-width: 30em; }
.tg-card { width: 100%; margin-top: 10px; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line-2); text-align: left; }
.tg-card__icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #1b2a33; color: #5ec2ff; }
.tg-card__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tg-card__label { font-size: .78rem; color: var(--text-3); }
.tg-card__handle { font-weight: 700; font-size: 1.05rem; }
.tg-card__handle.is-unset { color: var(--text-3); }
.tg-card .btn { flex: none; }
@media (max-width: 420px) { .tg-card { flex-wrap: wrap; } .tg-card .btn { width: 100%; } }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* 2FA enrolment */
.mfa { display: grid; gap: 16px; }
.mfa__steps { display: grid; gap: 20px; counter-reset: m; }
.mfa__steps > li { position: relative; padding-left: 40px; display: grid; gap: 4px; counter-increment: m; }
.mfa__steps > li::before { content: counter(m); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: .78rem; font-weight: 700; color: var(--text-2); }
.mfa__steps > li > span { color: var(--text-3); font-size: .88rem; }
.mfa__code { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 10px; }
.mfa__qr { width: 184px; height: 184px; border-radius: 12px; background: #fff; padding: 8px; }
.mfa__key { display: grid; gap: 6px; min-width: 0; flex: 1 1 180px; }
.mfa__secret { font-family: var(--mono); font-size: .85rem; letter-spacing: .06em; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); word-break: break-all; }
.mfa__key .btn { justify-self: start; }
.mfa__steps form { margin-top: 10px; }
