@import url('editorial-animation.css');
*{box-sizing:border-box}[hidden]{display:none!important}
html body.editorial-login{margin:0;background:var(--bg);font:14px/1.5 var(--font);color:var(--text)}
.login-shell{display:grid;grid-template-columns:62.5% 37.5%;min-height:100svh}
.login-story{position:relative;overflow:hidden;background:#111;min-height:max(100svh,62.5vw)}
.scene-frame{position:absolute;inset:0}.login-scene{transform:scale(var(--scene-scale,1));transform-origin:top left}
.login-scene>img{filter:grayscale(1)}
.login-story .card{border-radius:var(--radius-card,14px)}
.login-scene h2,.login-scene h3{color:#fff!important}
.login-quote{display:flex;gap:8px;padding:0 22px;border-right:1px solid #ffffff2e}.login-quote em{font-style:normal;color:#e8665d;font-weight:600}
.login-sample{position:absolute;left:18px;bottom:50px;font-size:9px;letter-spacing:.05em;color:#ccc;background:#1119;padding:2px 5px}
.motion-toggle{position:absolute;right:16px;bottom:50px;border:1px solid #ffffff50;background:#1119;color:#ddd;font-size:10px;padding:3px 7px;cursor:pointer}
.motion-paused *{animation-play-state:paused!important}
.login-form-panel{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;justify-content:center;padding:90px clamp(28px,5vw,88px);background:var(--bg)}
.login-pattern{position:absolute;inset:-20px -60px;z-index:-1;overflow:hidden;pointer-events:none;opacity:.045;transform:rotate(-8deg);color:var(--text)}
.login-pattern>div{display:flex;width:max-content;white-space:nowrap;font-size:34px;font-weight:700;line-height:1.4}.login-pattern>div:nth-child(3n){font-size:46px}.login-pattern span{padding-right:44px}
.login-form-panel #theme-toggle{position:absolute;right:24px;top:24px;padding:8px 12px;border:1px solid var(--line);background:var(--bg);color:var(--text);cursor:pointer;font-size:12px}
.auth{width:100%;max-width:390px;position:relative}.form-wrap{width:100%}.greeting{font-size:10px;letter-spacing:.17em;color:var(--muted);margin-bottom:15px}
html body .auth h2{font:44px/1.1 var(--serif);margin:0 0 8px}.subtitle{margin:0 0 26px;color:var(--muted);font-size:13px}
.tabs{display:none}form label{display:block;margin:18px 0 7px;font-size:10px;letter-spacing:.13em;text-transform:uppercase;font-weight:600}
.auth input{display:block;width:100%;padding:13px 14px;border:1px solid var(--line);background:transparent;color:var(--text);font-size:14px;min-height:46px}
.field{position:relative}.field input{padding-right:46px}.show{position:absolute;right:10px;top:12px;padding:0;width:24px;height:24px;background:none;border:0;color:var(--muted);cursor:pointer}.show svg{width:22px;height:22px}
.options{text-align:right;margin:9px 0 0;font-size:12px}.options a{color:var(--muted);text-decoration:underline}
.submit{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:49px;margin-top:24px;font-size:14px;cursor:pointer}.submit span{display:none}.submit b{font-weight:600}
.privacy{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:10px;margin-top:18px}.privacy svg{width:14px;height:14px}.switch{font-size:12px;color:var(--muted);margin:20px 0 0}.switch button{background:none;border:0;padding:0 0 0 4px;color:var(--text);text-decoration:underline;cursor:pointer;font-size:12px}
.notice{font-size:13px;line-height:1.6;color:var(--red);overflow-wrap:anywhere}.notice:empty{display:none}
.auth :focus-visible,.motion-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(min-width:1600px){.login-form-panel{padding-left:7vw;padding-right:7vw}}
@media(max-width:1000px){.login-shell{grid-template-columns:55% 45%}.login-story{min-height:max(100svh,55vw)}.login-form-panel{padding:85px 32px}.auth h2{font-size:38px}}
@media(max-width:700px){.login-shell{display:flex;flex-direction:column}.login-story{min-height:100vw;height:100vw;max-height:650px}.login-form-panel{padding:76px 24px 42px;min-height:600px}.auth{max-width:420px}.login-sample,.motion-toggle{bottom:24px;font-size:8px}.login-sample{left:8px}.motion-toggle{right:8px}.login-form-panel #theme-toggle{top:18px;right:24px}}
@media(prefers-reduced-motion:reduce){.a-line{stroke-dashoffset:0}.a-pulse{display:none}.motion-toggle{display:none}}

/* Match the Midnight Glow login artboards without changing the animated story. */
html[data-theme] body.editorial-login{background:var(--glow-page)}
html[data-theme] .login-form-panel{background:var(--glow-page)}
html[data-theme] .login-form-panel #theme-toggle{background:var(--glow-panel)}

/* Fit the complete square story, including its tape, inside desktop windows. */
@media(min-width:701px){
 .login-shell{height:100dvh;min-height:0;grid-template-columns:min(62.5vw,100dvh) minmax(0,1fr)}
 .login-story{height:100%;min-height:0}
 .login-form-panel{min-height:0;padding:64px clamp(28px,4vw,72px) 24px;overflow:hidden}
 .auth{margin-block:auto;max-height:100%;overflow-y:auto;scrollbar-width:thin}
}
@media(min-width:701px) and (max-height:800px){
 html body .auth h2{font-size:36px}
 .greeting{margin-bottom:8px}.subtitle{margin-bottom:14px}
 .auth form label{margin:12px 0 5px}
 .auth input{padding:10px 12px;min-height:40px}
 .show{top:9px}.submit{margin-top:16px;min-height:42px}
 .privacy{margin-top:12px}.switch{margin-top:12px}
 #identity-options{margin:14px 0}
}
@media(max-width:700px){
 html body.editorial-login .login-shell{display:flex;flex-direction:column;min-height:100dvh;height:auto}
 html body.editorial-login .login-form-panel{order:-1;width:100%;box-sizing:border-box;padding:70px 22px 28px;min-height:0}
 html body.editorial-login .auth{width:100%;max-width:420px;margin:auto}
 html body.editorial-login .auth h2{font-size:36px}
 html body.editorial-login .auth input{font-size:16px;min-height:44px}
 html body.editorial-login .login-story{width:100%;min-height:0;height:320px}
}
/* On phones, the animated introduction and login are separate screens. */
.mobile-intro-skip{display:none}
@media(max-width:700px){
 html body.editorial-login:not(.mobile-login-ready) .login-form-panel{display:none}
 html body.editorial-login .login-story{height:100dvh;min-height:100svh;max-height:none;background:#111}
 html body.editorial-login .scene-frame{top:50%;bottom:auto;height:100vw;transform:translateY(-50%)}
 html body.editorial-login .login-sample{bottom:24px}
 html body.editorial-login .motion-toggle{bottom:24px;min-height:36px}
 html body.editorial-login .mobile-intro-skip{display:block;position:absolute;right:20px;top:max(20px,env(safe-area-inset-top));min-height:44px;padding:10px 16px;border:1px solid #ffffff80;background:#17181a;color:#fff;z-index:3;font:14px var(--font)}
 html body.editorial-login .login-story{transition:opacity .35s ease}
 html body.editorial-login.mobile-intro-leaving .login-story{opacity:0}
 html body.editorial-login.mobile-login-ready .login-story{display:none}
 html body.editorial-login.mobile-login-ready .login-form-panel{display:flex;min-height:100dvh;animation:mobile-login-enter .35s ease both}
 @keyframes mobile-login-enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
}
@media(prefers-reduced-motion:reduce){html body.editorial-login .login-story{transition:none}html body.editorial-login.mobile-login-ready .login-form-panel{animation:none}}
@media(max-width:700px){
 html body.editorial-login .login-story{background:linear-gradient(180deg,#0008,#000b),url('assets/wall-street.jpg') 58% center/cover}
 html body.editorial-login .login-scene{background:transparent!important}
 html body.editorial-login .login-scene>img,html body.editorial-login .login-scene>div:first-of-type{display:none}
}

/* Mobile goes directly to authentication. */
@media(max-width:700px){html body.editorial-login .login-story{display:none!important}html body.editorial-login .login-form-panel{display:flex!important;min-height:100dvh;animation:none!important}}

.login-welcome-cover{position:fixed;inset:0;z-index:20000;background:var(--glow-page);pointer-events:all}

/* Explore palette; keep the sign-in composition and animation unchanged. */
html[data-theme] body.editorial-login{
 --bg:#090d12;--panel:#10161f;--card:#10161f;--surface:#18212d;
 --line:#26303e;--muted:#a0adbf;--text:#edf1f7;--accent:#8bb7ff;
 --on-accent:#0b1525;--chip:#1b283b;--green:#32d89a;--red:#ff777b;
 --glow-page:var(--bg);--glow-panel:linear-gradient(135deg,#142031,#10161f 65%);
 --glow-button:var(--chip);--glow-button-text:var(--text);--glow-button-border:#354d70;
}
html[data-theme=light] body.editorial-login{
 --bg:#f3f6fa;--panel:#fff;--card:#fff;--surface:#eaf0f8;
 --line:#cbd6e4;--muted:#56667c;--text:#172333;--accent:#245fc0;
 --on-accent:#fff;--chip:#e3ecfa;--green:#087b55;--red:#bf3547;
 --glow-panel:linear-gradient(135deg,#f0f5ff,#fff 65%);--glow-button-border:#a8bfdf;
}
html[data-theme] body.editorial-login .auth input{background:var(--panel);border-color:var(--line)}
html[data-theme] body.editorial-login .auth input:focus{outline-color:var(--accent);border-color:var(--accent)}
html[data-theme] body.editorial-login .auth :is(.options a,.switch button){color:var(--accent)}
html[data-theme] body.editorial-login :is(.greeting,.show){color:var(--muted)}
html[data-theme] body.editorial-login #identity-options button{background:var(--panel);border-color:var(--line)}
html[data-theme] body.editorial-login #identity-options button:hover{background:var(--chip)}
html[data-theme] body.editorial-login .login-form-panel #theme-toggle{background:var(--panel)}
/* The photograph remains dark in both modes, so its overlays keep light text. */
html[data-theme] body.editorial-login .login-story .card{
 background:linear-gradient(145deg,rgba(20,32,49,.94),rgba(13,17,23,.9) 68%);
 border-color:#304563;border-top-color:#477dc4;color:#edf1f7!important;
}
html[data-theme] body.editorial-login .login-scene>div:first-of-type{
 background:linear-gradient(rgba(45,90,150,.12),rgba(45,90,150,.12)),linear-gradient(180deg,rgba(9,13,18,.55),rgba(9,13,18,.5) 45%,rgba(9,13,18,.94))!important;
}
html[data-theme] body.editorial-login .login-scene .a-line{stroke:#32dda0}
html[data-theme] body.editorial-login .login-scene :is(.a-end,.a-pulse){fill:#32dda0}
html[data-theme] body.editorial-login .login-scene .a-dot[r="6"]{fill:#8bb7ff}
html[data-theme] body.editorial-login .login-scene>div:has(>.tt-tape){background:rgba(13,18,25,.94)!important;border-color:#26303e!important;color:#edf1f7!important}
html[data-theme] body.editorial-login .login-quote{border-color:#26303e}
html[data-theme] body.editorial-login .login-quote em{color:#ff777b}
html[data-theme] body.editorial-login :is(.login-sample,.motion-toggle){background:#0d1219cc;color:#a0adbf;border-color:#354d70}
