/* Spark entry and sign-in experience. Visual changes only: authentication lives in auth-gateway.js. */
*{box-sizing:border-box}
html,body{min-height:100%}
body.spark-auth-gateway{
  margin:0;
  color:#f1f7fb;
  background:#071321;
  background-image:
    radial-gradient(ellipse 44rem 36rem at 0% 0%,rgba(67,164,150,.13),transparent 74%),
    radial-gradient(ellipse 43rem 30rem at 96% 95%,rgba(99,89,202,.13),transparent 75%);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:16px;
}
body.spark-auth-gateway::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.24;
  background-image:radial-gradient(#638397 .7px,transparent .7px);background-size:26px 26px;
  mask-image:linear-gradient(115deg,transparent 5%,black 52%,transparent 92%);
}
.gateway-shell{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:clamp(16px,3vw,46px)}
.gateway-layout{width:min(1240px,100%);min-height:min(770px,calc(100dvh - 80px));display:grid;grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr);align-items:stretch;isolation:isolate;border:1px solid #34475a;border-radius:30px;overflow:hidden;background:#112335;box-shadow:0 32px 110px #01070fc7,0 1px 0 #b4ead31a inset}
.gateway-card{display:flex;flex-direction:column;min-width:0;padding:clamp(25px,3.6vw,58px);background:linear-gradient(150deg,#142637 0%,#101e2e 55%,#0e1c2b 100%)}
.gateway-card-top{display:flex;justify-content:space-between;align-items:center;gap:20px}
.gateway-brand{display:inline-flex;color:#f0f8fc;text-decoration:none}
.gateway-brand .revision-wordmark{font-size:1.65rem}
.gateway-top-caption{display:inline-flex;align-items:center;gap:9px;color:#9fbcc0;font-size:.76rem;font-weight:650;white-space:nowrap}
.gateway-top-dot{width:8px;height:8px;border-radius:50%;background:#8ae5cb;box-shadow:0 0 15px #70dfc7}
.gateway-copy{margin:clamp(35px,4.3vw,70px) 0 0;max-width:500px}
.gateway-eyebrow{display:inline-flex;align-items:center;gap:10px;color:#8ee5d1;letter-spacing:.15em;font-size:.71rem;font-weight:850}
.gateway-eyebrow-line{width:23px;height:1px;background:currentColor}
.gateway-copy h1{margin:18px 0 17px;font-size:clamp(2.6rem,4.2vw,4.4rem);line-height:1.045;letter-spacing:-.065em;font-weight:820}
.gateway-copy h1 span{color:#91e7d5}
.gateway-copy p{margin:0;color:#b5c4d3;font-size:1.02rem;line-height:1.7;max-width:440px}
.gateway-notice{margin-top:25px;border:1px solid #486d69;background:#1a3d3a;color:#e2fcf5;padding:13px 16px;border-radius:12px;line-height:1.5;overflow-wrap:anywhere}
.gateway-notice[data-kind="error"]{border-color:#824c5a;background:#42222d;color:#ffe8ed}
.gateway-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.gateway-step{color:#7c91a4;font-size:.73rem;font-weight:750;letter-spacing:.15em;white-space:nowrap}
.role-choice{margin-top:35px}
.role-choice h2{margin:0;font-size:1.1rem;letter-spacing:-.025em;color:#f3f8fc}
.role-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:17px}
.role-card{min-width:0;display:flex;flex-direction:column;position:relative;overflow:hidden;align-items:flex-start;gap:15px;padding:22px 19px 19px;min-height:205px;border:1px solid #385367;border-radius:19px;background:linear-gradient(150deg,#193044,#14283a);text-decoration:none;color:#f1f8fc;box-shadow:inset 0 1px 0 #e9f8ff0b;transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease}
.role-card::after{content:"";position:absolute;width:170px;height:170px;right:-90px;bottom:-120px;border-radius:50%;background:#8ee5d1;filter:blur(58px);opacity:0;transition:opacity .2s}
.role-card:hover{transform:translateY(-4px);border-color:#83e0ce;background:#1a3548;box-shadow:0 18px 28px #020f1c40}
.role-card:hover::after{opacity:.11}
.role-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:#264c49;color:#9cebd8}
.role-icon svg{width:29px;height:29px}
.role-icon-teacher{background:#36375c;color:#c8c0ff}
.role-detail{display:flex;flex-direction:column;min-width:0;gap:7px}
.role-detail strong{font-size:1.09rem;letter-spacing:-.025em;font-weight:800}
.role-detail small{font-size:.8rem;line-height:1.5;color:#b5c8d8}
.role-detail em{font-size:.76rem;font-style:normal;font-weight:800;color:#97e7d4;margin-top:2px}
.role-arrow{position:absolute;top:22px;right:18px;font-size:1.5rem;color:#8be3ce;transition:transform .2s}
.role-card:hover .role-arrow{transform:translate(3px,-3px)}
.session-hint{padding:15px 17px;border:1px solid #315b59;border-radius:13px;color:#c0e5dc;background:#163537;font-size:.87rem;line-height:1.5;margin:17px 0 0}
.session-hint .gateway-switch-account{display:inline-block;margin-top:7px;color:#99edda;text-decoration:underline;text-underline-offset:3px}
.sign-in-panel{margin-top:29px;animation:gateway-slide-in .25s ease both}
.back-button{border:0;background:none;padding:5px 0;color:#a6c0d1;display:inline-flex;gap:8px;align-items:center;font:inherit;font-size:.83rem;font-weight:750;text-align:left;cursor:pointer}
.back-button:hover{color:#98efdb}
.back-button:disabled{cursor:wait;opacity:.7}
.sign-in-heading{margin:25px 0 24px}
.sign-in-heading h2{margin:16px 0 7px;letter-spacing:-.05em;font-size:clamp(1.7rem,3vw,2.3rem);line-height:1.12}
.sign-in-heading p{margin:0;color:#b2c2d0;line-height:1.55;font-size:.92rem}
.role-badge{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border:1px solid #416a64;background:#21433e;border-radius:999px;color:#aaf4df;font-size:.68rem;letter-spacing:.11em;font-weight:850;text-transform:uppercase}
body[data-role="teacher"] .role-badge{background:#2d3156;border-color:#565c86;color:#d3cfff}
.gateway-form{display:grid;grid-template-columns:1fr;gap:8px}
.gateway-form label{font-size:.85rem;font-weight:800;color:#e4edf4;margin:0 0 2px}
.gateway-form input{width:100%;min-width:0;border:1px solid #40556b;border-radius:12px;background:#0b1b2c;color:#f7fafc;font:inherit;padding:14px 16px;min-height:51px;transition:border-color .15s,box-shadow .15s}
.gateway-form input::placeholder{color:#8ca0b2}
.gateway-form input:hover{border-color:#74889a}
.gateway-form input:focus-visible{outline:2px solid #85e2cc;outline-offset:2px;border-color:#85e2cc}
.gateway-form label:not(:first-child){margin-top:9px}
.gateway-password-wrap{position:relative;display:flex;align-items:center}
.gateway-password-wrap input{padding-right:80px}
.gateway-password-toggle{position:absolute;right:9px;top:50%;transform:translateY(-50%);background:#1a3348;border:1px solid #405d72;color:#d3e8f3;border-radius:8px;padding:6px 10px;min-width:60px;font:inherit;font-size:.76rem;font-weight:800;cursor:pointer}
.gateway-password-toggle:hover{border-color:#8ee5d1;color:#98ebd8}
.gateway-primary{margin-top:18px;display:flex;justify-content:space-between;align-items:center;gap:15px;border:1px solid #9bf0da;border-radius:12px;padding:14px 17px;min-height:52px;background:linear-gradient(105deg,#97ecd8,#76dac8);color:#0a2430;font:inherit;font-weight:850;cursor:pointer;box-shadow:0 12px 30px #3ad3b01a;transition:filter .2s,transform .2s}
.gateway-primary:hover:not(:disabled){filter:brightness(1.07);transform:translateY(-1px)}
.gateway-primary:disabled{opacity:.72;cursor:wait}
.gateway-submit-arrow{font-size:1.3rem;line-height:1}
.gateway-primary[data-busy="true"] .gateway-submit-arrow{width:18px;height:18px;border:2px solid #0e283c50;border-top-color:#0b2834;border-radius:50%;animation:gateway-spin .7s linear infinite;font-size:0}
.gateway-help{margin-top:20px;display:grid;gap:12px}
.gateway-help p{margin:0;color:#a9bacb;font-size:.79rem;line-height:1.55}
.gateway-help a{color:#99eddb;text-underline-offset:3px;font-weight:800;font-size:.87rem;text-decoration:none}
.gateway-help a:hover{text-decoration:underline}
.gateway-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-top:auto;padding-top:28px;color:#8da4b4;font-size:.73rem;line-height:1.4}
.gateway-essential-links{display:flex;gap:14px;flex-wrap:wrap}
.gateway-footer a{color:#b4cddb;font-weight:650;text-decoration:none}
.gateway-footer a:hover{text-decoration:underline;color:#9af0dc}
.gateway-more-links{position:relative;margin:0}
.gateway-more-links summary{cursor:pointer;color:#b4cddb;font-weight:700}
.gateway-more-links[open]{z-index:3}
.gateway-more-menu{position:absolute;left:0;bottom:calc(100% + 8px);width:min(290px,80vw);background:#1a3145;border:1px solid #476078;border-radius:12px;padding:12px;box-shadow:0 20px 35px #040c16b3;display:grid;gap:9px}
.gateway-more-menu a{display:block;white-space:normal}
.gateway-showcase{min-width:0;display:flex;position:relative;overflow:hidden;border-left:1px solid #4a647039;background:
radial-gradient(circle at 40% 36%,#366b6a8c,transparent 53%),
linear-gradient(143deg,#193d45 0%,#0c2634 56%,#11223d 100%)}
.gateway-showcase::before{content:"";position:absolute;inset:0;opacity:.4;background-image:linear-gradient(#a5ddd010 1px,transparent 1px),linear-gradient(90deg,#a5ddd010 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(#000,transparent 95%)}
.showcase-orbit{position:absolute;pointer-events:none;border:1px solid #8de9d52c;border-radius:50%;width:640px;height:640px;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-26deg)}
.showcase-orbit-two{width:460px;height:460px;border-color:#8be1c83d;transform:translate(-50%,-50%) rotate(26deg)}
.showcase-inner{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;margin:auto;width:100%;padding:40px clamp(30px,4.4vw,70px)}
.showcase-eyebrow{font-size:.72rem;letter-spacing:.16em;font-weight:850;color:#9becd6}
.showcase-sparkle{font-size:1.1rem;margin-right:7px}
.showcase-inner h2{margin:17px 0 13px;line-height:1.05;letter-spacing:-.055em;font-size:clamp(2rem,3vw,3.15rem)}
.showcase-inner>p{max-width:390px;margin:0 0 34px;color:#b7ced7;font-size:.97rem;line-height:1.7}
.showcase-preview{width:100%;background:#102538;border:1px solid #466476;border-radius:21px;box-shadow:0 30px 55px #030b17aa;transform:rotate(-1.2deg);padding:clamp(17px,2vw,24px);position:relative}
.showcase-preview::after{content:"";position:absolute;z-index:-1;inset:-9px -7px 12px 7px;border:1px solid #83e3d31b;border-radius:21px;transform:rotate(3deg)}
.preview-top{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#d7e7f0;font-size:.7rem;font-weight:800}
.preview-mini-bolt{color:#9cead6;font-size:1.18rem;margin-right:4px}
.preview-example{font-size:.57rem;color:#8ba8ba;letter-spacing:.11em;white-space:nowrap}
.preview-topic{margin-top:21px;background:linear-gradient(110deg,#22565a,#1b454e);border:1px solid #3c7773;border-radius:14px;padding:17px;display:flex;justify-content:space-between;align-items:center}
.preview-topic>div{display:flex;flex-direction:column;gap:3px}
.preview-topic small{font-size:.6rem;letter-spacing:.12em;font-weight:800;color:#a8e7da}
.preview-topic strong{font-size:1.3rem;letter-spacing:-.04em}
.preview-topic div span{font-size:.67rem;color:#bdd9df}
.preview-topic-icon{display:grid;place-items:center;width:35px;height:35px;background:#a3eedc;color:#123c42;border-radius:10px;font-size:1.5rem}
.preview-progress-head{display:flex;justify-content:space-between;margin-top:22px;font-size:.74rem;color:#bacfda}
.preview-progress-head strong{color:#a8f2df;font-size:.91rem}
.preview-progress{height:7px;border-radius:999px;overflow:hidden;background:#304b5d;margin-top:10px}
.preview-progress span{display:block;width:68%;height:100%;border-radius:999px;background:linear-gradient(90deg,#51bea9,#c4f9e6)}
.preview-small-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}
.preview-small-card{display:grid;gap:4px;padding:13px 12px;border:1px solid #344e61;border-radius:12px;background:#182f42}
.preview-small-card strong{font-size:.76rem}
.preview-small-card small{font-size:.65rem;color:#a6c1d2}
.preview-card-icon{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#255a50;color:#9bedcf;font-weight:900;margin-bottom:4px}
.preview-card-icon-violet{background:#343961;color:#c4c7ff}
.preview-chart-card{border:1px solid #304b5e;border-radius:11px;background:#122b3c;padding:11px 12px 4px;margin-top:12px}
.preview-chart-heading{display:flex;justify-content:space-between;gap:10px;color:#ccdfe9;font-size:.68rem;font-weight:750}
.preview-chart-heading span:last-child{font-size:.62rem;color:#8ba9ba}
.preview-chart-card svg{width:100%;height:auto;display:block;margin-top:7px}
.showcase-foot{display:flex;gap:23px;align-items:center;flex-wrap:wrap;margin-top:30px;color:#c6e3df;font-size:.76rem;font-weight:800}
.showcase-foot span span{color:#91ead6;margin-right:6px;font-size:.64rem}
.gateway-skip{position:absolute;top:-200px;left:15px;z-index:9;background:#9aeeda;color:#0b202e;padding:12px;border-radius:10px;text-decoration:none}
.gateway-skip:focus{top:12px}
.spark-auth-gateway :focus-visible{outline:3px solid #98edda;outline-offset:3px}
[hidden]{display:none!important}
@keyframes gateway-slide-in{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@keyframes gateway-spin{to{transform:rotate(360deg)}}
@media(max-width:1090px){
 .gateway-layout{grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr)}
 .gateway-card{padding:32px}
 .showcase-inner{padding:30px}
 .role-grid{gap:10px}
 .role-card{padding:16px;min-height:205px}
}
@media(max-width:860px){
 .gateway-shell{padding:14px}
 .gateway-layout{max-width:640px;min-height:calc(100dvh - 28px);grid-template-columns:1fr}
 .gateway-card{padding:clamp(22px,5vw,36px);min-height:calc(100dvh - 28px)}
 .gateway-showcase{display:none}
 .gateway-copy{margin-top:clamp(38px,9vh,86px)}
 .gateway-copy h1{font-size:clamp(2.7rem,8vw,4rem)}
 .gateway-footer{margin-top:auto}
}
@media(max-width:520px){
 .gateway-shell{padding:8px}
 .gateway-layout{min-height:calc(100dvh - 16px);border-radius:22px}
 .gateway-card{padding:23px 19px;min-height:calc(100dvh - 16px)}
 .gateway-brand .revision-wordmark{font-size:1.5rem}
 .gateway-top-caption{font-size:.65rem}
 .gateway-copy{margin-top:45px}
 .gateway-copy h1{font-size:clamp(2.75rem,11vw,3.65rem)}
 .gateway-copy p{font-size:.94rem}
 .role-choice{margin-top:28px}
 .role-grid{grid-template-columns:1fr;gap:11px}
 .role-card{min-height:105px;padding:15px 16px;display:grid;grid-template-columns:45px minmax(0,1fr) 15px;gap:12px;align-items:center}
 .role-icon{width:43px;height:43px}
 .role-detail{gap:3px}
 .role-detail strong{font-size:1rem}
 .role-detail small{font-size:.74rem}
 .role-detail em{display:none}
 .role-arrow{position:static;font-size:1.2rem}
 .gateway-footer{padding-top:23px;gap:10px 13px}
 .sign-in-heading{margin:20px 0}
 .sign-in-panel{margin-top:25px}
}
@media(max-width:370px){.gateway-top-caption{display:none}.role-card{grid-template-columns:40px minmax(0,1fr) 12px;gap:9px}.role-icon{width:39px;height:39px}}
@media(prefers-reduced-motion:reduce){.spark-auth-gateway *,.spark-auth-gateway *::before,.spark-auth-gateway *::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
