/* StudyCore shared auth shell — presentation only; every app keeps its own controller. */
html:has(body[data-sc-auth]),body[data-sc-auth]{min-height:100%;margin:0}
body[data-sc-auth]{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:20px;background:#101521;color:#F7F5F0;font-family:var(--sc-font-body,"Inter",sans-serif);-webkit-font-smoothing:antialiased;background-image:radial-gradient(circle at 78% 105%,rgba(46,91,255,.3),rgba(46,91,255,0) 43%)}
body[data-sc-auth] *{box-sizing:border-box}
body[data-sc-auth] .auth-shell{position:relative;isolation:isolate;width:min(100%,1040px);min-height:min(680px,calc(100dvh - 40px));display:grid;grid-template-columns:minmax(330px,.9fr) minmax(390px,1.1fr);margin:auto;border:1px solid rgba(174,187,255,.12);border-radius:28px;background:#182137;box-shadow:0 34px 86px -48px rgba(2,6,16,.92);overflow:hidden}
body[data-sc-auth] .auth-shell::after{content:"";position:absolute;z-index:0;width:76%;height:86%;right:-21%;bottom:-49%;border-radius:50%;background:radial-gradient(circle,rgba(66,104,255,.42),rgba(66,104,255,.11) 42%,rgba(66,104,255,0) 71%);pointer-events:none}
body[data-sc-auth] .auth-story{position:relative;z-index:1;overflow:hidden;display:flex;flex-direction:column;padding:clamp(36px,5vw,58px);background:#111620;color:#F7F5F0}
body[data-sc-auth] .auth-story::before{content:"";position:absolute;width:340px;height:220px;right:-170px;top:-100px;border:1px solid rgba(174,187,255,.18);border-radius:50%;transform:rotate(-14deg);box-shadow:0 0 0 50px rgba(46,91,255,.035),0 0 0 100px rgba(46,91,255,.018)}
body[data-sc-auth] .auth-brand{position:relative;z-index:1;display:flex;align-items:center;gap:12px;color:#fff;font:700 1rem/1 var(--sc-font-display,"Bricolage Grotesque",sans-serif);letter-spacing:-.02em}
body[data-sc-auth] .auth-page-core{width:46px;height:30px;overflow:visible;filter:drop-shadow(0 8px 12px rgba(46,91,255,.25))}
body[data-sc-auth] .auth-page-core .back{fill:rgba(46,91,255,.2)}
body[data-sc-auth] .auth-page-core .layer{fill:#8AA1FF}
body[data-sc-auth] .auth-page-core .core{fill:var(--sc-accent,#2E5BFF)}
body[data-sc-auth] .auth-story-copy{position:relative;z-index:1;margin:auto 0}
body[data-sc-auth] .auth-kicker{margin:0 0 16px;color:#AEBBFF;font:750 .7rem/1.2 var(--sc-font-body,"Inter",sans-serif);letter-spacing:.08em;text-transform:uppercase}
body[data-sc-auth] .auth-story h1{max-width:11ch;margin:0;color:#fff;font:650 clamp(2.3rem,4.6vw,3.8rem)/.96 var(--sc-font-display,"Bricolage Grotesque",sans-serif);letter-spacing:-.045em;text-wrap:balance}
body[data-sc-auth] .auth-story-copy>p:not(.auth-kicker){max-width:36ch;margin:22px 0 0;color:#B9BDC5;font-size:.87rem;line-height:1.65}
body[data-sc-auth] .auth-route{display:grid;gap:11px;margin:30px 0 0;padding:0;list-style:none}
body[data-sc-auth] .auth-route li{display:grid;grid-template-columns:30px 1fr;gap:11px;align-items:center;color:#D5D7DC;font-size:.73rem;font-weight:650}
body[data-sc-auth] .auth-route span{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:rgba(46,91,255,.18);color:#C9D2FF;font-size:.68rem}
body[data-sc-auth] .auth-story[data-story-mode="login"] .auth-route,body[data-sc-auth] .auth-story[data-story-mode="forgot"] .auth-route,body[data-sc-auth] .auth-story[data-story-mode="reset"] .auth-route{display:none}
body[data-sc-auth] .auth-story-foot{position:relative;z-index:1;margin:34px 0 0;color:#7F848E;font-size:.65rem;line-height:1.5}
body[data-sc-auth] .auth-card{position:relative;z-index:1;width:100%;max-width:490px;align-self:center;justify-self:center;padding:clamp(36px,6vw,68px);color:#F7F5F0}
body[data-sc-auth] .auth-logo{display:none;align-items:center;gap:10px;margin-bottom:28px}
body[data-sc-auth] .auth-logo .auth-page-core{width:42px;height:28px}
body[data-sc-auth] .auth-title{margin:0;color:#fff;font:650 clamp(2rem,4vw,2.75rem)/1 var(--sc-font-display,"Bricolage Grotesque",sans-serif);letter-spacing:-.04em}
body[data-sc-auth] .auth-sub{max-width:42ch;margin:10px 0 28px;color:#B7C0D2;font-size:.82rem;line-height:1.55}
body[data-sc-auth] .auth-logo .sc-logo-name{color:#fff}
body[data-sc-auth] .auth-logo .sc-logo-sub{color:#97A2B8}
body[data-sc-auth] .auth-step-progress{display:none;align-items:center;gap:8px;margin:0 0 22px;color:#8E99AE;font-size:.68rem;font-weight:750}
body[data-sc-auth] .mode-register .auth-step-progress{display:flex}
body[data-sc-auth] .auth-step-progress span{display:flex;align-items:center;gap:7px}
body[data-sc-auth] .auth-step-progress i{width:28px;height:4px;border-radius:999px;background:rgba(255,255,255,.14);transition:background-color .2s,transform .2s}
body[data-sc-auth] .auth-step-progress span.is-active{color:#CCD5FF}
body[data-sc-auth] .auth-step-progress span.is-active i,body[data-sc-auth] .auth-step-progress span.is-complete i{background:#6685FF}
body[data-sc-auth] .auth-step-progress span.is-active i{transform:scaleX(1.08)}
body[data-sc-auth] .field{margin-bottom:15px}
body[data-sc-auth] .field label{display:block;margin-bottom:7px;color:#DCE1EB;font-size:.72rem;font-weight:700}
body[data-sc-auth] .field input{width:100%;min-height:52px;padding:13px 14px;border:1.5px solid rgba(198,207,230,.19);border-radius:14px;background:rgba(246,244,239,.07);color:#fff;caret-color:#AEBBFF;font:500 16px/1.4 var(--sc-font-body,"Inter",sans-serif);outline:none;transition:border-color .16s,box-shadow .18s,background-color .16s}
body[data-sc-auth] .field input::placeholder{color:#7F8AA0}
body[data-sc-auth] .field input:focus{border-color:#718BFA;background:rgba(246,244,239,.105);box-shadow:0 0 0 4px rgba(96,128,255,.14)}
body[data-sc-auth] .field input:-webkit-autofill,body[data-sc-auth] .field input:-webkit-autofill:hover,body[data-sc-auth] .field input:-webkit-autofill:focus{-webkit-text-fill-color:#fff;caret-color:#fff;-webkit-box-shadow:0 0 0 1000px #202A44 inset;border-color:#718BFA}
body[data-sc-auth] .field-hint{margin-top:6px;color:#97A2B8;font-size:.68rem;line-height:1.45}
body[data-sc-auth] .auth-btn{width:100%;min-height:52px;justify-content:center;margin-top:6px;border:0;border-radius:15px;background:var(--sc-accent,#2E5BFF);color:#fff;font:700 .8rem/1 var(--sc-font-body,"Inter",sans-serif);box-shadow:0 16px 30px -20px rgba(0,0,0,.82),inset 0 1px 0 rgba(255,255,255,.16);cursor:pointer;transition:background-color .16s,transform .1s,opacity .16s}
body[data-sc-auth] .auth-btn:hover{background:var(--sc-accent-deep,#1F44CC)}
body[data-sc-auth] .auth-btn:active{transform:scale(.98)}
body[data-sc-auth] .auth-btn:disabled{opacity:.48;cursor:wait;box-shadow:none}
body[data-sc-auth] .auth-account-back{display:none;min-height:44px;margin:0 0 8px;padding:6px 0;border:0;background:transparent;color:#A8B1C4;font:700 .73rem/1 var(--sc-font-body,"Inter",sans-serif);cursor:pointer}
body[data-sc-auth] .mode-register[data-register-step="account"] .auth-account-back{display:inline-flex;align-items:center;gap:7px}
body[data-sc-auth] .auth-account-back:hover{color:#fff}
body[data-sc-auth] .auth-switch{text-align:center;color:#929DB2;font-size:.76rem;margin-top:18px}
body[data-sc-auth] .auth-switch a,body[data-sc-auth] .auth-switch button{padding:0;border:0;background:none;color:#B7C4FF;cursor:pointer;text-decoration:none;font:700 inherit}
body[data-sc-auth] .auth-switch a:hover,body[data-sc-auth] .auth-switch button:hover{text-decoration:underline}
body[data-sc-auth] .forgot-link{display:block;text-align:right;margin:-5px 0 14px;padding:0;border:0;background:none;color:#B7C4FF;font-size:.7rem;font-weight:650;cursor:pointer;text-decoration:none}
body[data-sc-auth] .auth-err,body[data-sc-auth] .auth-notice{display:none;margin-bottom:16px;padding:11px 13px;border-radius:13px;font-size:.75rem;line-height:1.45}
body[data-sc-auth] .auth-err{background:#FCEAE8;color:#B8453A}
body[data-sc-auth] .auth-notice{background:#E4F4EC;color:#216F4E}
body[data-sc-auth] .reg-only{display:none}
body[data-sc-auth] .mode-register .reg-only{display:block}
body[data-sc-auth] .mode-register[data-register-step="name"] .register-account-only{display:none!important}
body[data-sc-auth] .mode-register[data-register-step="account"] .register-name-only{display:none!important}
body[data-sc-auth] .forgot-only,body[data-sc-auth] .reset-only{display:none}
body[data-sc-auth] .mode-forgot .password-field,body[data-sc-auth] .mode-forgot .reg-only,body[data-sc-auth] .mode-reset .login-field,body[data-sc-auth] .mode-reset .reg-only{display:none}
body[data-sc-auth] .mode-reset .reset-only{display:block}
body[data-sc-auth] .mode-register .forgot-link{display:none}
body[data-sc-auth] .auth-card :where(button,a,input,summary):focus-visible{outline:3px solid rgba(46,91,255,.3);outline-offset:3px}
@media (max-width:760px){
  body[data-sc-auth]{padding:0;background:#151B2A;background-image:radial-gradient(circle at 82% 108%,rgba(46,91,255,.34),rgba(46,91,255,0) 46%)}
  body[data-sc-auth] .auth-shell{min-height:100dvh;display:block;border:0;border-radius:0;background:transparent;box-shadow:none}
  body[data-sc-auth] .auth-shell::after{width:130%;height:68%;right:-58%;bottom:-34%}
  body[data-sc-auth] .auth-story{display:none}
  body[data-sc-auth] .auth-card{max-width:520px;min-height:100dvh;display:flex;flex-direction:column;justify-content:center;padding:32px 24px calc(36px + env(safe-area-inset-bottom))}
  body[data-sc-auth] .auth-logo{display:flex}
  body[data-sc-auth] .auth-title{font-size:2.25rem}
}
@media (prefers-reduced-motion:reduce){body[data-sc-auth] .field input,body[data-sc-auth] .auth-btn,body[data-sc-auth] .auth-step-progress i{transition:none}}
