/* KopLabs login, design A "Orbit" (picked 2026-10-18): centered like the landing hero, planet limb on top,
   glass card form. Loaded after styles.css / portal-kl.css, so every rule is scoped to #authView.kl-login.
   Never style #authView.hidden: the portal hides the login with .hidden after sign-in. */
@font-face{font-family:"Aeonik";src:url("/assets/fonts/aeonik-400.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Aeonik";src:url("/assets/fonts/aeonik-500.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Aeonik";src:url("/assets/fonts/aeonik-700.woff2") format("woff2");font-weight:700;font-display:swap}

html body #authView.kl-login{
  --ao-bg:#060510;--ao-line:rgba(209,216,255,.10);--ao-line-2:rgba(209,216,255,.18);--ao-ink:#f4f5ff;--ao-lav:#d1d8ff;
  --ao-muted:rgba(209,216,255,.66);--ao-dim:rgba(209,216,255,.42);--ao-peri:#606af7;--ao-sky:#9df7ff;--ao-good:#54e1b6;
}
html body #authView.kl-login:not(.hidden){
  position:fixed!important;inset:0!important;z-index:40;display:block!important;
  min-height:100%!important;height:auto!important;max-height:none!important;width:auto!important;
  padding:0!important;margin:0!important;overflow-x:hidden!important;overflow-y:auto!important;
  background:var(--ao-bg)!important;background-image:none!important;
  color:var(--ao-ink)!important;font-family:"Aeonik",system-ui,-apple-system,"Segoe UI",sans-serif!important;
  -webkit-font-smoothing:antialiased;
}
html body #authView.kl-login *{box-sizing:border-box}
html body #authView.kl-login a{text-decoration:none}

/* sky: stars, planet limb, glow (fixed, so the form scrolls over it on short screens) */
html body #authView.kl-login .ao-sky{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
html body #authView.kl-login .ao-stars{position:absolute;inset:0;background-image:radial-gradient(1px 1px at 8% 12%,#fff9,transparent 2px),radial-gradient(1px 1px at 22% 68%,#fff7,transparent 2px),radial-gradient(1.5px 1.5px at 37% 24%,#fffa,transparent 2px),radial-gradient(1px 1px at 51% 82%,#fff6,transparent 2px),radial-gradient(1px 1px at 63% 44%,#fff8,transparent 2px),radial-gradient(1.5px 1.5px at 74% 74%,#fff9,transparent 2px),radial-gradient(1px 1px at 86% 18%,#fff7,transparent 2px),radial-gradient(1px 1px at 93% 58%,#fff6,transparent 2px),radial-gradient(1px 1px at 14% 88%,#fff5,transparent 2px),radial-gradient(1px 1px at 44% 6%,#fff8,transparent 2px),radial-gradient(1px 1px at 69% 92%,#fff6,transparent 2px),radial-gradient(1px 1px at 31% 46%,#fff5,transparent 2px);animation:ao-twinkle 7s ease-in-out infinite alternate}
@keyframes ao-twinkle{to{opacity:.55}}
html body #authView.kl-login .ao-planet{position:absolute;top:-120px;right:-260px;width:1500px;max-width:none;height:auto;opacity:.95;animation:ao-drift 24s ease-in-out infinite alternate}
@keyframes ao-drift{to{transform:translate(-18px,8px)}}
html body #authView.kl-login .ao-glow{position:absolute;left:50%;top:60%;width:1100px;height:640px;transform:translateX(-50%);background:radial-gradient(closest-side,rgba(96,106,247,.32),transparent)}

/* top pill */
html body #authView.kl-login .ao-top{position:absolute;top:22px;left:50%;transform:translateX(-50%);z-index:3;display:flex;align-items:center;gap:22px;padding:7px 7px 7px 16px;border-radius:999px;background:rgba(14,13,31,.72);border:1px solid var(--ao-line-2);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);white-space:nowrap}
html body #authView.kl-login .ao-brand{display:inline-flex;align-items:center;gap:10px;color:var(--ao-ink);font-weight:700;font-size:18px;letter-spacing:-.01em}
html body #authView.kl-login .ao-brand img{width:28px;height:28px}
html body #authView.kl-login .ao-back{font-size:14px;color:var(--ao-muted);padding:9px 16px;border-radius:999px;border:1px solid var(--ao-line-2);transition:color .15s,border-color .15s}
html body #authView.kl-login .ao-back:hover{color:var(--ao-ink);border-color:rgba(209,216,255,.36)}

/* layout */
html body #authView.kl-login .ao-wrap{position:relative;z-index:2;min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:100px 20px 34px}
html body #authView.kl-login .ao-inner{width:min(440px,100%);display:grid;gap:22px;justify-items:center;text-align:center}

/* hero: one per mode, picked by data-auth-mode (set by setAuthTab in app.js) */
html body #authView.kl-login .ao-hero{display:none;gap:14px;justify-items:center}
html body #authView.kl-login[data-auth-mode="login"] .ao-hero[data-auth-hero="login"],
html body #authView.kl-login[data-auth-mode="register"] .ao-hero[data-auth-hero="register"],
html body #authView.kl-login[data-auth-mode="reset"] .ao-hero[data-auth-hero="reset"],
html body #authView.kl-login[data-auth-mode="resetComplete"] .ao-hero[data-auth-hero="resetComplete"]{display:grid;animation:ao-rise .5s cubic-bezier(.2,.7,.2,1) both}
@keyframes ao-rise{from{opacity:0;transform:translateY(10px)}}
html body #authView.kl-login .ao-kicker{display:inline-flex;align-items:center;gap:10px;font-size:11.5px;font-weight:500;letter-spacing:.38em;text-transform:uppercase;color:var(--ao-lav);padding:8px 15px;border-radius:999px;border:1px solid var(--ao-line);background:rgba(14,13,31,.55);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
html body #authView.kl-login .ao-kicker i{width:7px;height:7px;border-radius:50%;background:var(--ao-good);box-shadow:0 0 10px var(--ao-good)}
html body #authView.kl-login .ao-title{margin:0!important;font-size:62px!important;line-height:.95!important;letter-spacing:-.055em!important;font-weight:500!important;color:#eaedff!important;font-family:inherit!important;text-transform:none!important}
html body #authView.kl-login .ao-flow{display:inline-block;background:linear-gradient(90deg,#f7fbff 0%,#9df7ff 24%,#6d8dff 54%,#f7fbff 82%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;padding-bottom:.12em;animation:ao-flow 9s linear infinite alternate}
@keyframes ao-flow{to{background-position:100% 0}}
html body #authView.kl-login .ao-sub{margin:-4px 0 0!important;color:var(--ao-muted)!important;font-size:16px!important;line-height:1.45!important;max-width:380px}

/* glass card */
html body #authView.kl-login .auth-card{position:relative;width:100%!important;max-width:none!important;margin:0!important;padding:26px!important;display:grid!important;gap:0!important;text-align:left;background:linear-gradient(180deg,rgba(20,19,39,.78),rgba(10,9,24,.82))!important;border:1px solid var(--ao-line-2)!important;border-radius:26px!important;box-shadow:0 40px 120px -40px rgba(96,106,247,.55),inset 0 1px 0 rgba(255,255,255,.06)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
html body #authView.kl-login .auth-form{display:grid!important;gap:14px!important;width:100%!important;margin:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
html body #authView.kl-login .auth-form.hidden{display:none!important}
html body #authView.kl-login .auth-form label{display:grid!important;gap:7px!important;margin:0!important;font-size:12.5px!important;font-weight:500!important;color:var(--ao-muted)!important;letter-spacing:0!important;text-transform:none!important}
html body #authView.kl-login .auth-form input:not([type="checkbox"]):not([type="hidden"]){width:100%!important;height:50px!important;margin:0!important;padding:0 16px!important;border-radius:14px!important;border:1px solid var(--ao-line-2)!important;background:rgba(6,5,16,.7)!important;color:var(--ao-ink)!important;font-family:inherit!important;font-size:15px!important;box-shadow:none!important;outline:0;transition:border-color .15s,box-shadow .15s}
html body #authView.kl-login .auth-form input::placeholder{color:var(--ao-dim)!important}
html body #authView.kl-login .auth-form input:not([type="checkbox"]):focus{border-color:rgba(139,147,255,.7)!important;box-shadow:0 0 0 4px rgba(96,106,247,.18)!important}

/* buttons */
html body #authView.kl-login .google-auth-button{display:flex!important;align-items:center;justify-content:center;gap:10px;width:100%!important;height:50px!important;margin:0!important;padding:0 18px!important;border-radius:999px!important;background:rgba(20,19,39,.8)!important;border:1px solid var(--ao-line-2)!important;color:#fff!important;font-weight:700!important;font-size:15px!important;box-shadow:none!important;transition:border-color .15s,background .15s}
html body #authView.kl-login .google-auth-button:hover{border-color:rgba(209,216,255,.36)!important;background:rgba(28,27,54,.9)!important}
html body #authView.kl-login .google-auth-button svg{width:18px!important;height:18px!important}
html body #authView.kl-login .auth-form button.primary,
html body #authView.kl-login .auth-form button.ghost{display:flex!important;align-items:center;justify-content:center;width:100%!important;height:50px!important;margin:4px 0 0!important;padding:0 18px!important;border:0!important;border-radius:999px!important;background:linear-gradient(100deg,#7d86ff 0%,#606af7 45%,#5a8cff 100%)!important;color:#fff!important;font-family:inherit!important;font-weight:700!important;font-size:15.5px!important;letter-spacing:0!important;text-transform:none!important;box-shadow:0 0 0 1px rgba(157,247,255,.25) inset,0 18px 50px -14px rgba(96,106,247,.95)!important;cursor:pointer;transition:filter .15s,transform .15s}
html body #authView.kl-login .auth-form button.primary:hover{filter:brightness(1.08);transform:translateY(-1px)}
html body #authView.kl-login .auth-form button:disabled{opacity:.6;cursor:default;transform:none}

/* small parts */
html body #authView.kl-login .auth-divider{display:flex!important;align-items:center;gap:12px;margin:2px 0!important;font-size:11px!important;letter-spacing:.24em!important;text-transform:uppercase;color:var(--ao-dim)!important;background:none!important}
html body #authView.kl-login .auth-divider::before,html body #authView.kl-login .auth-divider::after{content:"";flex:1;height:1px;background:var(--ao-line)}
html body #authView.kl-login .auth-divider span{padding:0!important;background:none!important}
html body #authView.kl-login .auth-help-link{justify-self:end;margin:-4px 0 0!important;font-size:13px!important;font-weight:500!important;color:var(--ao-sky)!important}
html body #authView.kl-login .auth-account-link{margin:2px 0 0!important;text-align:center;font-size:13.5px!important;color:var(--ao-muted)!important}
html body #authView.kl-login .auth-account-link a{color:var(--ao-sky)!important;font-weight:500}
html body #authView.kl-login .auth-form label.auth-marketing-consent{display:flex!important;align-items:flex-start!important;gap:10px!important;font-size:12.5px!important;line-height:1.45;color:var(--ao-muted)!important}
html body #authView.kl-login .auth-form label.auth-marketing-consent input{margin:2px 0 0!important;accent-color:var(--ao-peri);width:16px;height:16px;flex:0 0 16px}
html body #authView.kl-login .hint{margin:0!important;font-size:12.5px!important;line-height:1.45;color:var(--ao-dim)!important;text-align:center}
html body #authView.kl-login #authError{margin:0!important;font-size:13px!important;line-height:1.4;color:#ff8a96!important;text-align:center}
html body #authView.kl-login #authError:not(:empty){margin-top:14px!important}
html body #authView.kl-login .auth-loading-status:not(.hidden){margin-top:14px;font-size:13px;color:var(--ao-lav);text-align:center}

/* legal line */
html body #authView.kl-login .ao-fine{display:grid;gap:8px;justify-items:center;max-width:420px}
html body #authView.kl-login .ao-fine p{margin:0!important;font-size:11.5px!important;line-height:1.5!important;color:var(--ao-dim)!important}
html body #authView.kl-login .ao-fine nav{display:flex;gap:8px;font-size:11.5px;color:var(--ao-dim)}
html body #authView.kl-login .ao-fine a{color:var(--ao-muted)!important}
html body #authView.kl-login .ao-fine a:hover{color:var(--ao-ink)!important}

@media (max-width:600px){
  html body #authView.kl-login .ao-title{font-size:44px!important}
  html body #authView.kl-login .ao-top{gap:10px;top:14px}
  html body #authView.kl-login .ao-planet{width:900px;right:-360px;top:-60px}
  html body #authView.kl-login .ao-wrap{padding:88px 16px 26px}
  html body #authView.kl-login .auth-card{padding:20px!important;border-radius:22px!important}
  html body #authView.kl-login .ao-kicker{letter-spacing:.3em}
}
@media (prefers-reduced-motion:reduce){
  html body #authView.kl-login .ao-stars,html body #authView.kl-login .ao-planet,html body #authView.kl-login .ao-flow,html body #authView.kl-login .ao-hero{animation:none!important}
}

/* trial sign-up (2026-10-24): visitors from a free-trial link see the trial hero instead of the generic one */
html body #authView.kl-login[data-auth-mode="register"][data-auth-intent="trial"] .ao-hero[data-auth-hero="register"]{display:none}
html body #authView.kl-login[data-auth-mode="register"][data-auth-intent="trial"] .ao-hero[data-auth-hero="trial"]{display:grid;animation:ao-rise .5s cubic-bezier(.2,.7,.2,1) both}

/* Continue with Discord (2026-11-06, option C): the lead sign-in button, filled with the theme's periwinkle; Google sits under it */
html body #authView.kl-login .discord-auth-button{display:flex!important;align-items:center;justify-content:center;gap:10px;width:100%!important;height:54px!important;margin:0!important;padding:0 18px!important;border:0!important;border-radius:999px!important;background:linear-gradient(100deg,#7d86ff 0%,#606af7 45%,#5a8cff 100%)!important;color:#fff!important;font-weight:700!important;font-size:15.5px!important;box-shadow:0 0 0 1px rgba(157,247,255,.25) inset,0 18px 50px -14px rgba(96,106,247,.95)!important;transition:filter .15s,transform .15s}
html body #authView.kl-login .discord-auth-button:hover{filter:brightness(1.08);transform:translateY(-1px)}
html body #authView.kl-login .discord-auth-button:focus-visible{outline:3px solid rgba(157,247,255,.45);outline-offset:3px}
html body #authView.kl-login .discord-auth-button svg{width:21px!important;height:21px!important;flex:0 0 auto;color:#fff}
html body #authView.kl-login .auth-oauth-note{margin:-6px 0 0!important;font-size:12px!important;line-height:1.4!important;color:var(--ao-dim)!important;text-align:center}
html body #authView.kl-login .auth-card.is-loading .discord-auth-button,html body #authView.kl-login .auth-card.is-loading .google-auth-button{pointer-events:none;opacity:.6}
