:root{
  --bg:#0b0a0a;
  --red:#e0202e;
  --red2:#ff3b47;
  --text:#f4f1f1;
  --muted:#b9b1b1;
  --line:#2a2424;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font-family:'Sora',system-ui,-apple-system,'Segoe UI',sans-serif}
a{color:inherit;text-decoration:none}

.hero{position:relative;min-height:100vh;overflow:hidden;background:radial-gradient(ellipse at 75% 45%,#2a0c10 0%,var(--bg) 60%)}

/* Header */
header{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:18px 5vw;border-bottom:1px solid var(--line);background:rgba(11,10,10,.7);backdrop-filter:blur(8px)}
.logo{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.04em;line-height:1}
.logo small{display:block;font-size:.62rem;color:var(--muted);letter-spacing:.3em;margin-top:3px;font-weight:500}
nav{display:flex;gap:2.2rem;font-size:.88rem}
nav a{opacity:.85;transition:color .2s}
nav a:hover,nav a.on{color:var(--red2);opacity:1}

/* Buttons */
.btn{display:inline-block;padding:.75rem 1.4rem;border-radius:8px;font-weight:600;font-size:.88rem;border:1px solid transparent;color:#fff;transition:transform .2s,background .2s,border-color .2s}
.btn.red{background:var(--red);box-shadow:0 8px 28px -8px var(--red)}
.btn.red:hover{background:var(--red2);transform:translateY(-2px)}
.btn.ghost{background:rgba(255,255,255,.03);border-color:#4a4242}
.btn.ghost:hover{border-color:var(--red2)}
.btn:focus-visible,a:focus-visible{outline:2px solid var(--red2);outline-offset:3px}

/* Hero copy */
.wrap{position:relative;display:grid;grid-template-columns:1fr 1.05fr;align-items:center;min-height:calc(100vh - 70px);padding:0 5vw}
.copy{position:relative;z-index:3;max-width:560px}
.tag{display:flex;align-items:center;gap:14px;font-size:.78rem;font-weight:600;letter-spacing:.14em;margin-bottom:1.4rem}
.tag::before{content:"";width:46px;height:2px;background:var(--red)}
h1{font-size:clamp(2.8rem,6vw,4.9rem);line-height:1.02;margin:0 0 1.4rem;font-weight:800;letter-spacing:-.02em}
h1 span{display:block}
h1 .r{color:var(--red)}
p.lead{color:var(--muted);line-height:1.7;font-size:1rem;max-width:480px;margin:0 0 2rem}
.cta{display:flex;gap:14px;flex-wrap:wrap}

/* 3D stage */
#stage{position:absolute;top:0;right:0;bottom:0;width:62%;z-index:1}
#stage canvas{display:block;width:100%;height:100%}
.fade{position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(90deg,var(--bg) 28%,rgba(11,10,10,0) 60%)}
.motto{position:absolute;z-index:2;right:6vw;top:16%;font-weight:800;font-size:clamp(1rem,2.2vw,1.9rem);line-height:1.15;letter-spacing:.06em;color:rgba(255,255,255,.07);pointer-events:none}

/* Mobile */
@media(max-width:860px){
  .wrap{grid-template-columns:1fr;align-items:start;padding-top:40px}
  #stage{width:100%;top:auto;height:52%}
  .fade{background:linear-gradient(180deg,var(--bg) 40%,rgba(11,10,10,0) 70%)}
  .copy{padding-bottom:45vh}
  nav{gap:1rem;font-size:.78rem}
  .logo span{font-size:.85rem}
}
@media(prefers-reduced-motion:reduce){.btn{transition:none}}

:root{
  --bg:#0b0a0a;
  --red:#e0202e;
  --muted:#b9b1b1;
  --line:#2a2424;
}

.features{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  background:#0d0b0b;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  font-family:'Sora',system-ui,-apple-system,'Segoe UI',sans-serif;
  color:#f4f1f1;
}
.feature{padding:38px 3vw 40px;border-left:1px solid var(--line)}
.feature:first-child{border-left:0;padding-left:5vw}
.feature:last-child{padding-right:5vw}

.feature svg{
  width:34px;height:34px;
  fill:none;stroke:var(--red);stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
  margin-bottom:16px;
}
.feature h3{margin:0 0 10px;font-size:1rem;font-weight:700}
.feature p{margin:0;color:var(--muted);font-size:.84rem;line-height:1.65;max-width:270px}

/* Tablet: 2 columns */
@media(max-width:860px){
  .features{grid-template-columns:1fr 1fr}
  .feature,.feature:first-child,.feature:last-child{padding:28px 5vw;border-left:0;border-top:1px solid var(--line)}
  .feature:nth-child(-n+2){border-top:0}
  .feature:nth-child(even){border-left:1px solid var(--line)}
}

/* Phone: 1 column */
@media(max-width:520px){
  .features{grid-template-columns:1fr}
  .feature,.feature:nth-child(even){border-left:0;border-top:1px solid var(--line)}
  .feature:first-child{border-top:0}
}
:root{
  --bg:#0b0a0a;
  --panel:#141111;
  --red:#e0202e;
  --red2:#ff3b47;
  --text:#f4f1f1;
  --muted:#b9b1b1;
  --line:#2a2424;
}

.courses{
  display:grid;
  grid-template-columns:1fr 330px;
  gap:28px;
  padding:56px 5vw;
  background:var(--bg);
  color:var(--text);
  font-family:'Sora',system-ui,-apple-system,'Segoe UI',sans-serif;
}
.courses *,.courses *::before,.courses *::after{box-sizing:border-box}

/* Heading */
.eyebrow{display:flex;align-items:center;gap:12px;color:var(--red);font-size:.72rem;font-weight:600;letter-spacing:.14em;margin-bottom:12px}
.eyebrow::before{content:"";width:34px;height:2px;background:var(--red)}
.courses h2{margin:0 0 8px;font-size:clamp(1.7rem,3vw,2.2rem);font-weight:700;letter-spacing:-.01em}
.sub{margin:0 0 28px;color:var(--muted);font-size:.95rem}

/* Cards */
.course-cards{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.course{
  position:relative;overflow:hidden;
  padding:26px 26px 24px;
  background:linear-gradient(135deg,#191515,#0f0d0d);
  border:1px solid var(--line);border-radius:14px;
  transition:border-color .25s,transform .25s;
}
.course:hover{border-color:var(--red);transform:translateY(-3px)}
.course>*:not(.art){position:relative;z-index:2}
.course p{margin:16px 0 22px;max-width:270px;color:var(--muted);font-size:.85rem;line-height:1.65}

.c-head{display:flex;align-items:center;gap:14px}
.c-icon{width:32px;height:32px;fill:none;stroke:var(--red);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.c-head h3{margin:0;font-size:1.35rem;font-weight:700}
.c-head span{display:block;margin-top:2px;color:var(--muted);font-size:.72rem}

.details{display:inline-flex;align-items:center;gap:8px;color:var(--text);font-size:.82rem;font-weight:600;transition:color .2s}
.details b{color:var(--red);transition:transform .2s}
.details:hover{color:var(--red2)}
.details:hover b{transform:translateX(4px)}
.details:focus-visible{outline:2px solid var(--red2);outline-offset:4px;border-radius:4px}

/* Card artwork (pure SVG / CSS) */
.art{position:absolute;inset:0 0 0 auto;width:62%;z-index:0;pointer-events:none;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 55%);
          mask-image:linear-gradient(90deg,transparent 0,#000 55%)}
.art-building{color:#3a3131;opacity:.85}
.art-building svg{width:100%;height:100%}
.art-sheet{
  background:
    radial-gradient(circle,transparent 0 4px,rgba(255,255,255,.28) 4.5px 5.5px,transparent 6px) 0 0/22px 20px,
    linear-gradient(160deg,rgba(255,255,255,.05),transparent);
  transform:rotate(-6deg) scale(1.2);transform-origin:right center;
}

/* Promo panel */
.promo{position:relative;overflow:hidden;min-height:340px;border-radius:14px;border:1px solid var(--line);display:flex;align-items:center}
.peaks{position:absolute;inset:0;width:100%;height:100%}
.promo::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(11,10,10,.85),rgba(11,10,10,0) 70%)}
.promo-text{position:relative;z-index:2;padding:32px 28px}
.promo-text p{margin:0}
.l1{font-size:1.7rem;font-weight:300;line-height:1.2}
.l2{margin-top:6px!important;font-size:1.7rem;font-weight:800;line-height:1.2;color:var(--red)}
.tests{display:flex;align-items:center;gap:14px;margin-top:26px;font-size:.78rem;letter-spacing:.08em;color:var(--muted)}
.tests i{width:1px;height:14px;background:#5a5050}

/* Responsive */
@media(max-width:1000px){
  .courses{grid-template-columns:1fr}
  .promo{min-height:260px}
}
@media(max-width:620px){
  .course-cards{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.course,.details b{transition:none}}
.nav-login{padding:.6rem 1.1rem;font-size:.82rem}
.nav-login{padding:.6rem 1.1rem;font-size:.82rem}/* About page – builds on style.css */
.hero.about-hero{min-height:74vh}
.hero.about-hero .wrap{min-height:calc(74vh - 70px)}
.about-hero h1{font-size:clamp(2.4rem,4.8vw,3.9rem)}
.about-hero .lead{max-width:520px;margin-bottom:0}

/* Why SAT Knights */
.story{display:grid;grid-template-columns:1.05fr 1fr;gap:64px;padding:80px 5vw;background:var(--bg);border-top:1px solid var(--line)}
.story-copy h2{margin:0 0 22px;font-size:clamp(1.8rem,3vw,2.4rem);font-weight:700}
.story-copy p{margin:0 0 18px;max-width:520px;color:var(--muted);line-height:1.75;font-size:.95rem}

.pillars{list-style:none;margin:0;padding:0}
.pillars li{display:grid;grid-template-columns:60px 1fr;gap:18px;align-items:center;padding:20px 0;border-bottom:1px solid var(--line)}
.pillars li:first-child{padding-top:0}
.pillars li:last-child{border-bottom:0;padding-bottom:0}
.ico{display:grid;place-items:center;width:52px;height:52px;border:1px solid var(--red);border-radius:50%}
.ico svg{width:26px;height:26px;fill:none;stroke:var(--red);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pillars h3{margin:0 0 6px;font-size:1.02rem;font-weight:700}
.pillars p{margin:0;color:var(--muted);font-size:.85rem;line-height:1.6;max-width:340px}

/* Vision */
.vision{position:relative;overflow:hidden;min-height:440px;display:flex;align-items:center;justify-content:flex-end;padding:60px 6vw;border-top:1px solid var(--line)}
.scene{position:absolute;inset:0;width:100%;height:100%}
.vision::after{content:"";position:absolute;inset:0;background:linear-gradient(270deg,rgba(11,10,10,.85) 10%,rgba(11,10,10,0) 65%)}
.vision-text{position:relative;z-index:2;max-width:400px}
.vision-text h2{margin:0;font-size:clamp(1.5rem,2.6vw,2.1rem);line-height:1.3;font-weight:700}
.vision-text h2 span{color:var(--red)}

/* Footer */
.site-foot{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px 5vw;background:#080707;border-top:1px solid var(--line)}
.site-foot .logo{font-size:.9rem}
.site-foot .tests{display:flex;align-items:center;gap:14px;font-size:.78rem;letter-spacing:.1em;color:var(--muted)}
.site-foot .tests i{width:1px;height:14px;background:#5a5050}
.socials{display:flex;gap:18px}
.socials a{display:grid;place-items:center;width:28px;height:28px;transition:transform .2s}
.socials a:hover{transform:translateY(-2px)}
.socials svg{width:22px;height:22px;fill:none;stroke:var(--text);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.socials a:hover svg{stroke:var(--red2)}

@media(max-width:860px){
  .hero.about-hero{min-height:auto}
  .hero.about-hero .wrap{min-height:0;padding-top:40px}
  .about-hero .copy{padding-bottom:48vh}
  .story{grid-template-columns:1fr;gap:44px;padding:56px 5vw}
  .vision{justify-content:flex-start;min-height:380px}
  .vision::after{background:linear-gradient(0deg,rgba(11,10,10,.85) 10%,rgba(11,10,10,.1) 90%)}
  .vision{align-items:flex-end}
  .site-foot{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.socials a{transition:none}}
/* Contact page – builds on style.css + about.css */
.contact{display:grid;grid-template-columns:.85fr 1.15fr;gap:40px;padding:64px 5vw;background:var(--bg);border-top:1px solid var(--line)}

/* Info column */
.info-card{display:grid;grid-template-columns:56px 1fr;gap:18px;align-items:center;padding:20px 22px;margin-bottom:16px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:12px}
.info-card h3{margin:0 0 4px;font-size:1rem;font-weight:700}
.info-card a,.info-card .plain{display:block;color:var(--text);font-size:.9rem}
.info-card a:hover{color:var(--red2)}
.info-card p{margin:4px 0 0;color:var(--muted);font-size:.78rem}

.follow{margin-top:28px}
.follow h3{margin:0 0 14px;font-size:1rem}
.follow .socials{margin-bottom:14px}
.follow .socials a{width:40px;height:40px;border:1px solid var(--line);border-radius:8px}
.follow .socials a:hover{border-color:var(--red)}
.follow p{margin:0;max-width:300px;color:var(--muted);font-size:.82rem;line-height:1.6}

/* Form card */
.form-card{padding:34px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:14px}
.form-card h2{margin:0 0 8px;font-size:1.5rem;font-weight:700}
.form-card .sub{margin:0 0 26px;color:var(--muted);font-size:.88rem}
.form-card label{display:block;margin-bottom:18px;font-size:.8rem;font-weight:600}
.row{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.form-card input,.form-card select,.form-card textarea{
  display:block;width:100%;margin-top:8px;padding:13px 14px;
  background:#0b0909;color:var(--text);font:inherit;font-weight:400;font-size:.88rem;
  border:1px solid var(--line);border-radius:8px;transition:border-color .2s}
.form-card textarea{resize:vertical;min-height:130px}
.form-card ::placeholder{color:#6f6666}
.form-card input:focus,.form-card select:focus,.form-card textarea:focus{outline:none;border-color:var(--red)}
.form-card input:user-invalid,.form-card select:user-invalid,.form-card textarea:user-invalid{border-color:var(--red2)}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

.send{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:.95rem;border:0;font-size:.95rem}
.send svg{width:18px;height:18px;fill:none;stroke:#fff;stroke-width:2;stroke-linejoin:round}
.send:disabled{opacity:.6;cursor:wait;transform:none}
.status{min-height:1.4em;margin:14px 0 0;font-size:.85rem;text-align:center}
.status.ok{color:#5fd38d}
.status.err{color:var(--red2)}

@media(max-width:900px){
  .contact{grid-template-columns:1fr;padding:48px 5vw}
}
@media(max-width:560px){
  .row{grid-template-columns:1fr;gap:0}
  .form-card{padding:24px 20px}
}
/* Login / sign up page – builds on style.css */
body{background:radial-gradient(ellipse at 70% 30%,#2a0c10 0%,var(--bg) 60%) fixed}

.auth{display:grid;place-items:center;min-height:calc(100vh - 71px);padding:48px 5vw}
.auth-card{width:100%;max-width:480px;padding:36px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:14px;box-shadow:0 30px 80px -30px rgba(224,32,46,.35)}
.auth-card h1{margin:0 0 8px;font-size:1.9rem;line-height:1.15}
.auth-card .sub{margin:0 0 24px;color:var(--muted);font-size:.9rem}

/* Tabs */
.tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:24px;padding:5px;background:#0b0909;border:1px solid var(--line);border-radius:10px}
.tabs button{padding:.7rem;border:0;border-radius:7px;background:none;color:var(--muted);font-family:inherit;font-weight:600;font-size:.88rem;cursor:pointer;transition:background .2s,color .2s}
.tabs button[aria-selected="true"]{background:var(--red);color:#fff}
.tabs button:focus-visible{outline:2px solid var(--red2);outline-offset:2px}

/* Form */
.form[hidden]{display:none}
.form label{display:block;margin-bottom:18px;font-size:.8rem;font-weight:600}
.form input,.form select{display:block;width:100%;margin-top:8px;padding:13px 14px;background:#0b0909;color:var(--text);font:inherit;font-weight:400;font-size:.88rem;border:1px solid var(--line);border-radius:8px;transition:border-color .2s}
.form ::placeholder{color:#6f6666}
.form input:focus,.form select:focus{outline:none;border-color:var(--red)}
.form input:user-invalid,.form select:user-invalid{border-color:var(--red2)}
.row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.submit{width:100%;padding:.95rem;border:0;font-family:inherit;font-weight:600;font-size:.95rem;cursor:pointer}
.submit:disabled{opacity:.6;cursor:wait;transform:none}
.switch{margin:18px 0 0;text-align:center;color:var(--muted);font-size:.84rem}
.switch a{color:var(--red2);font-weight:600}
.switch a:hover{text-decoration:underline}
.status{min-height:1.4em;margin:14px 0 0;font-size:.85rem;text-align:center}
.status.ok{color:#5fd38d}
.status.err{color:var(--red2)}

/* Header button (also paste this into style.css for the other pages) */
.nav-login{padding:.6rem 1.1rem;font-size:.82rem}
.nav-login.on{box-shadow:0 0 0 2px rgba(255,59,71,.35)}

@media(max-width:560px){
  .auth-card{padding:26px 20px}
  .row{grid-template-columns:1fr;gap:0}
}

/* Forgot link, Google button, divider */
.forgot{margin:-6px 0 18px;text-align:right;font-size:.8rem}
.forgot a{color:var(--muted)}
.forgot a:hover{color:var(--red2)}
.google-wrap{margin-bottom:20px}
.google-wrap[hidden]{display:none}
#googleBtn{display:flex;justify-content:center;min-height:44px}
.or{display:flex;align-items:center;gap:14px;margin-top:20px;color:var(--muted);font-size:.78rem}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.tabs[hidden]{display:none}
/* Dashboard – builds on style.css + login.css */
.dash{padding:56px 5vw 80px;max-width:1100px;margin:0 auto}
.dash[hidden]{display:none}
.dash h1{margin:0 0 8px;font-size:clamp(2rem,4vw,3rem)}
.dash h1 .r{color:var(--red)}
.dash .sub{margin:0 0 36px;color:var(--muted)}

.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:28px}
.stat{padding:22px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:12px;min-width:0}
.stat small{display:block;margin-bottom:8px;color:var(--muted);font-size:.74rem;letter-spacing:.08em;text-transform:uppercase}
.stat strong{display:block;font-size:1.05rem;overflow-wrap:anywhere}

.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.tile{position:relative;padding:26px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:14px;transition:border-color .25s,transform .25s}
.tile:hover{border-color:var(--red);transform:translateY(-3px)}
.tile svg{width:32px;height:32px;margin-bottom:14px;fill:none;stroke:var(--red);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tile h3{margin:0 0 6px;font-size:1.05rem}
.tile p{margin:0 0 16px;color:var(--muted);font-size:.85rem}
.tile span{font-size:.72rem;font-weight:600;letter-spacing:.08em;color:var(--red2)}

@media(max-width:800px){
  .stats,.tiles{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.tile{transition:none}}
/* Coming soon page – builds on style.css + about.css */
.hero.cs{min-height:calc(100vh - 92px)}
.hero.cs .wrap{min-height:calc(100vh - 92px - 70px)}
.cs h1{font-size:clamp(2.6rem,5.4vw,4.4rem)}
.cs .lead{max-width:480px}

@media(max-width:860px){
  .hero.cs,.hero.cs .wrap{min-height:0}
  .hero.cs{min-height:100vh}
}


/* =====================================================================
   SAT Knights – site layer (header, footer, sections, loader, motion)
   ===================================================================== */
:root{--hh:72px;--maxw:1320px;scroll-behavior:smooth}
html{-webkit-text-size-adjust:100%}
html,body{overflow-x:clip}
@supports not (overflow:clip){body{overflow-x:hidden}}
body{line-height:1.5}
body.no-scroll{overflow:hidden}
img,svg{max-width:100%}
:focus-visible{outline:2px solid var(--red2);outline-offset:3px}
#main:focus{outline:none}
.skip{position:absolute;left:12px;top:-60px;z-index:200;padding:.7rem 1rem;background:var(--red);color:#fff;border-radius:8px;font-weight:600;transition:top .2s}
.skip:focus{top:12px}
.r{color:var(--red)}

/* ---------- Loader ---------- */
#loader{position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px;background:var(--bg);transition:opacity .55s ease,visibility .55s}
#loader.done{opacity:0;visibility:hidden;pointer-events:none}
.ld-shield{stroke-dasharray:130;stroke-dashoffset:130;animation:ldDraw 1.2s ease-in-out infinite alternate}
.ld-bar{position:relative;width:120px;height:3px;border-radius:3px;background:#2a2424;overflow:hidden}
.ld-bar::after{content:"";position:absolute;inset:0;width:40%;background:var(--red);border-radius:3px;animation:ldSlide 1s ease-in-out infinite}
@keyframes ldDraw{to{stroke-dashoffset:0}}
@keyframes ldSlide{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:24px;min-height:var(--hh);padding:12px max(5vw,calc((100vw - 1320px)/2));background:rgba(11,10,10,.82);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--line);transition:box-shadow .3s}
.site-header.scrolled{box-shadow:0 10px 30px -18px #000}
.nav{display:flex;align-items:center;gap:2.1rem;margin-left:auto;font-size:.88rem}
.nav a,.dd-btn{position:relative;color:var(--text);opacity:.85;transition:color .2s,opacity .2s}
.nav a:hover,.nav a.on,.dd-btn:hover,.dd-btn.on,.dd.open .dd-btn{color:var(--red2);opacity:1}
.nav a.on::after,.dd-btn.on::after{content:"";position:absolute;left:0;right:0;bottom:-8px;height:2px;background:var(--red);border-radius:2px}
.dd{position:relative}
.dd-btn{display:inline-flex;align-items:center;gap:6px;padding:0;background:none;border:0;font:inherit;cursor:pointer}
.dd-btn svg{transition:transform .25s}
.dd.open .dd-btn svg{transform:rotate(180deg)}
.dd-menu{position:absolute;top:calc(100% + 16px);left:50%;min-width:190px;padding:8px;background:#141111;border:1px solid var(--line);border-radius:12px;box-shadow:0 24px 50px -20px #000;opacity:0;visibility:hidden;transform:translate(-50%,8px);transition:opacity .22s,transform .22s,visibility .22s}
.dd-menu::before{content:"";position:absolute;top:-17px;left:0;right:0;height:17px}
.dd-menu a{display:block;padding:.65rem .9rem;border-radius:8px;opacity:1}
.dd-menu a:hover{background:rgba(224,32,46,.12)}
.dd.open .dd-menu{opacity:1;visibility:visible;transform:translate(-50%,0)}
@media(hover:hover){.dd:hover .dd-menu{opacity:1;visibility:visible;transform:translate(-50%,0)}.dd:hover .dd-btn{color:var(--red2);opacity:1}}
.head-actions{display:flex;align-items:center;gap:12px}
.nav-login{white-space:nowrap}
.burger{display:none;width:42px;height:42px;padding:0;background:none;border:1px solid var(--line);border-radius:10px;cursor:pointer;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.burger span{display:block;width:20px;height:2px;background:var(--text);border-radius:2px;transition:transform .25s,opacity .2s}
.burger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.burger[aria-expanded="true"] span:nth-child(2){opacity:0}
.burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.nav-scrim{position:fixed;inset:0;z-index:55;background:rgba(0,0,0,.6)}
.nav-scrim[hidden]{display:none}

/* ---------- Hero sizing (header now sits above the hero) ---------- */
.hero{min-height:calc(100svh - var(--hh))}
.hero .wrap{min-height:calc(100svh - var(--hh))}
.hero.about-hero{min-height:min(72svh,680px)}
.hero.about-hero .wrap{min-height:min(72svh,680px)}
.hero.about-hero.cs{min-height:calc(100svh - var(--hh))}
.hero.about-hero.cs .wrap{min-height:calc(100svh - var(--hh))}
.hero-in{animation:fadeUp .9s cubic-bezier(.2,.7,.2,1) .45s both}
@keyframes fadeUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
@media(min-width:1700px){.wrap{padding-inline:calc((100vw - 1500px)/2)}}

/* ---------- Sections ---------- */
.container{max-width:var(--maxw);margin-inline:auto}
.container.narrow{max-width:820px}
.section{padding:clamp(56px,8vw,96px) 5vw}
.section.alt{background:#0d0b0b;border-block:1px solid var(--line)}
.sec-head{margin-bottom:clamp(26px,4vw,44px);max-width:640px}
.sec-head h2{margin:10px 0 8px;font-size:clamp(1.7rem,3.2vw,2.4rem);line-height:1.15;letter-spacing:-.01em}
.sec-head .sub{margin:0}
.card{padding:26px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:14px;transition:border-color .25s,transform .25s}
.card:hover{border-color:var(--red);transform:translateY(-3px)}
.card h3{margin:0 0 8px;font-size:1.1rem}
.card p{margin:0;color:var(--muted);font-size:.9rem;line-height:1.7}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}

.steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:28px}
.steps li{position:relative;padding-top:22px;border-top:1px solid var(--line)}
.steps li::before{content:"";position:absolute;left:0;top:-1px;width:44px;height:2px;background:var(--red)}
.num{display:inline-grid;place-items:center;width:38px;height:38px;margin-bottom:14px;border:1px solid var(--red);border-radius:50%;color:var(--red2);font-weight:700;font-size:.9rem}
.steps h3{margin:0 0 8px;font-size:1.05rem}
.steps p{margin:0;color:var(--muted);font-size:.88rem;line-height:1.7;max-width:280px}

.check-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:26px 32px}
.check-grid li{display:flex;gap:14px;align-items:flex-start}
.check-grid svg{flex:none;width:26px;height:26px;margin-top:2px;padding:5px;border:1px solid var(--red);border-radius:50%;fill:none;stroke:var(--red2);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.check-grid h3{margin:0 0 4px;font-size:1rem}
.check-grid p{margin:0;color:var(--muted);font-size:.86rem;line-height:1.65}

.faq details{border-bottom:1px solid var(--line)}
.faq summary{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 0;font-weight:600;cursor:pointer;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";flex:none;width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;color:var(--red2);font-size:1.1rem;transition:transform .25s,background .2s}
.faq details[open] summary::after{content:"\2212";background:rgba(224,32,46,.14)}
.faq details p{margin:0 0 20px;color:var(--muted);line-height:1.75;font-size:.92rem;animation:fadeUp .35s ease both}

.cta-band{padding:clamp(56px,8vw,90px) 5vw;text-align:center;background:radial-gradient(ellipse at 50% 120%,rgba(224,32,46,.28),transparent 60%),#0d0b0b;border-top:1px solid var(--line)}
.cta-band h2{margin:0 0 10px;font-size:clamp(1.7rem,3.4vw,2.5rem);line-height:1.15}
.cta-band p{margin:0 auto 26px;max-width:520px;color:var(--muted);line-height:1.7}
.cta-band .cta{justify-content:center}

/* ---------- Page hero (courses, course pages) ---------- */
.page-hero{padding:clamp(48px,8vw,96px) 5vw clamp(40px,6vw,72px);background:radial-gradient(ellipse at 80% 0%,#2a0c10 0%,var(--bg) 62%);border-bottom:1px solid var(--line)}
.page-hero h1{margin:14px 0 14px;font-size:clamp(2.2rem,5vw,3.8rem);max-width:820px}
.page-hero .lead{margin-bottom:26px;max-width:640px}
.sub-name{margin:0 0 14px;color:var(--red2);font-weight:600}
.crumbs{display:flex;flex-wrap:wrap;gap:.5rem;font-size:.8rem;color:var(--muted)}
.crumbs a{opacity:1;color:var(--muted)}
.crumbs a::after{content:"/";margin-left:.5rem;color:#5a5050}
.crumbs span{color:var(--text)}

/* ---------- Course list / details ---------- */
.course-list{display:grid;grid-template-columns:repeat(2,1fr);gap:24px}
.course-big{display:flex;flex-direction:column;padding:clamp(22px,3vw,34px);background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:16px;transition:border-color .25s}
.course-big:hover{border-color:var(--red)}
.cb-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.cb-head h2{margin:0;font-size:1.7rem}
.cb-head span{display:block;color:var(--muted);font-size:.8rem}
.course-big>p{margin:0 0 18px;color:var(--muted);line-height:1.75;font-size:.92rem}
.course-big h3{margin:0 0 10px;font-size:.95rem}
.dots{margin:0 0 26px;padding:0;list-style:none;display:grid;gap:10px;flex:1}
.dots li{position:relative;padding-left:20px;color:var(--muted);font-size:.88rem;line-height:1.65}
.dots li::before{content:"";position:absolute;left:0;top:.65em;width:7px;height:7px;border-radius:50%;background:var(--red)}
.dots b{color:var(--text)}
.course-big .btn{align-self:flex-start}
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;-webkit-overflow-scrolling:touch}
.cmp{width:100%;min-width:560px;border-collapse:collapse;font-size:.9rem}
.cmp th,.cmp td{padding:16px 20px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
.cmp thead th{background:#141111;font-size:.85rem}
.cmp tbody th{color:var(--muted);font-weight:600;width:22%}
.cmp td{color:var(--text)}
.cmp tr:last-child th,.cmp tr:last-child td{border-bottom:0}
.cmp a{color:var(--red2);font-weight:600}
.cmp a:hover{text-decoration:underline}
.facts{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:22px}
.facts div{padding-left:18px;border-left:2px solid var(--red)}
.facts dt{margin-bottom:6px;color:var(--muted);font-size:.78rem;letter-spacing:.06em}
.facts dd{margin:0;line-height:1.6;font-size:.95rem}

/* ---------- Footer ---------- */
.site-footer{padding:clamp(48px,6vw,72px) max(5vw,calc((100vw - 1320px)/2)) 28px;background:#080707;border-top:1px solid var(--line)}
.foot-grid{display:grid;grid-template-columns:1.5fr repeat(4,1fr);gap:36px}
.foot-brand p{margin:16px 0 18px;max-width:320px;color:var(--muted);font-size:.88rem;line-height:1.7}
.foot-col{display:flex;flex-direction:column;align-items:flex-start;gap:.7rem;font-size:.88rem;color:var(--muted)}
.foot-col h3{margin:0 0 6px;color:var(--text);font-size:.92rem}
.foot-col a{opacity:1;color:var(--muted);transition:color .2s,transform .2s}
.foot-col a:hover{color:var(--red2);transform:translateX(3px)}
.foot-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:14px;margin-top:44px;padding-top:22px;border-top:1px solid var(--line);color:var(--muted);font-size:.8rem}
.site-footer .socials a{width:38px;height:38px;border:1px solid var(--line);border-radius:8px}
.site-footer .socials a:hover{border-color:var(--red)}

/* ---------- 404 ---------- */
.nf{display:grid;place-items:center;min-height:68svh;padding:60px 5vw;text-align:center;background:radial-gradient(ellipse at 50% 30%,#2a0c10 0%,var(--bg) 62%)}
.nf-inner{max-width:620px}
.nf-shield{width:92px;height:92px;margin-bottom:10px;animation:float 4s ease-in-out infinite}
.nf-code{margin:0;font-size:clamp(5rem,20vw,10rem);font-weight:800;line-height:1;color:transparent;-webkit-text-stroke:2px var(--red);letter-spacing:-.02em}
.nf h1{margin:6px 0 14px;font-size:clamp(1.8rem,4.5vw,2.8rem)}
.nf .lead{margin:0 auto 26px}
.nf .cta{justify-content:center}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}

/* ---------- Scroll reveal ---------- */
.js [data-reveal]{opacity:0;transform:translateY(20px);transition:opacity .65s ease var(--d,0s),transform .65s cubic-bezier(.2,.7,.2,1) var(--d,0s)}
.js [data-reveal].in{opacity:1;transform:none}

/* ---------- Responsive ---------- */
@media(max-width:1100px){
  .foot-grid{grid-template-columns:1.4fr 1fr 1fr}
  .foot-brand{grid-column:1/-1}
}
@media(max-width:900px){
  /* backdrop-filter would make the fixed drawer size itself to the header, so it is off on mobile */
  .site-header{gap:12px;background:rgba(11,10,10,.97);backdrop-filter:none;-webkit-backdrop-filter:none}
  .head-actions{margin-left:auto;position:relative;z-index:80}  /* keeps the menu/close button above the open drawer */
  .burger{display:inline-flex}
  .nav{position:fixed;top:0;right:0;bottom:0;z-index:70;width:min(86vw,340px);flex-direction:column;align-items:stretch;gap:0;margin:0;padding:84px 22px 28px;overflow-y:auto;background:#100d0d;border-left:1px solid var(--line);font-size:1rem;transform:translateX(100%);visibility:hidden;transition:transform .3s ease,visibility .3s}
  .nav.open{transform:none;visibility:visible}
  .nav>a,.dd-btn{display:flex;width:100%;justify-content:space-between;padding:15px 4px;border-bottom:1px solid var(--line)}
  .nav a.on::after,.dd-btn.on::after{display:none}
  .dd-menu{position:static;display:none;min-width:0;padding:4px 0 8px 14px;border:0;border-radius:0;background:none;box-shadow:none;opacity:1;visibility:visible;transform:none}
  .dd-menu::before{display:none}
  .dd.open .dd-menu{display:block;transform:none}
  .dd:hover .dd-menu{transform:none}
  .course-list,.grid-2{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  /* hero: copy on top, 3D scene underneath */
  .hero,.hero .wrap,.hero.about-hero,.hero.about-hero .wrap{min-height:0}
  .hero{min-height:calc(100svh - var(--hh))}
  .hero.about-hero.cs{min-height:calc(100svh - var(--hh))}
}
@media(max-width:700px){
  .foot-grid{grid-template-columns:1fr 1fr}
  .foot-brand,.foot-col:last-child{grid-column:1/-1}
}
@media(max-width:480px){
  .site-header{padding-inline:4vw}
  .logo span{font-size:.8rem}
  .logo small{display:none}
  .nav-login{padding:.5rem .8rem;font-size:.74rem}
  .cta .btn{flex:1 1 100%;text-align:center}
  .foot-grid{grid-template-columns:1fr}
  .cmp th,.cmp td{padding:13px 14px}
}
@media(max-width:340px){.nav-login{display:none}}

/* ---------- Reduced motion ---------- */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .js [data-reveal]{opacity:1;transform:none}
  .hero-in{animation:none}
}


/* ---------- Fallback when WebGL / three.js is unavailable ---------- */
#stage.no-webgl{display:grid;place-items:center}
#stage.no-webgl::before{content:"";width:min(380px,62%);aspect-ratio:1;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2 36 9v12c0 9-7 15-16 18C11 36 4 30 4 21V9z' fill='none' stroke='%23e0202e' stroke-width='1.2'/%3E%3Cpath d='M13 14h14M13 20h9M13 26h14' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;filter:drop-shadow(0 0 40px rgba(224,32,46,.45));animation:float 4s ease-in-out infinite}
@media(max-width:900px){#stage.no-webgl::before{width:min(260px,60%)}}

/* ---------- Richer animated fallback (no WebGL needed) ---------- */
#stage.no-webgl{position:absolute;overflow:hidden;background:
  radial-gradient(circle,rgba(255,74,85,.9) 0 1.2px,transparent 1.6px) 0 0/90px 90px,
  radial-gradient(circle,rgba(255,255,255,.55) 0 1px,transparent 1.4px) 40px 55px/130px 130px;
  animation:drift 40s linear infinite}
#stage.no-webgl::after{content:"";position:absolute;left:50%;top:50%;width:min(560px,88%);aspect-ratio:1;margin:calc(min(560px,88%) / -2) 0 0 calc(min(560px,88%) / -2);border:3px solid rgba(255,42,58,.85);border-radius:50%;box-shadow:0 0 28px rgba(255,42,58,.45);animation:ringSpin 9s linear infinite;pointer-events:none}
@keyframes ringSpin{from{transform:perspective(900px) rotateX(72deg) rotateZ(0)}to{transform:perspective(900px) rotateX(72deg) rotateZ(360deg)}}
@keyframes drift{to{background-position:90px 180px,-90px 185px}}
@media(prefers-reduced-motion:reduce){#stage.no-webgl,#stage.no-webgl::after{animation:none}}

/* =====================================================================
   Vocabulary page
   ===================================================================== */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.vcard[hidden],.vgrid[hidden],.vflash[hidden],.vempty[hidden],.vcount[hidden]{display:none!important}

.vprogress{display:flex;align-items:center;gap:14px;max-width:420px;color:var(--muted);font-size:.85rem}
.vbar{flex:1;height:6px;background:#2a2424;border-radius:6px;overflow:hidden}
.vbar span{display:block;width:0;height:100%;background:var(--red);border-radius:6px;transition:width .4s ease}

.vtools{display:flex;flex-wrap:wrap;gap:14px 18px;align-items:center;justify-content:space-between;margin-bottom:18px}
.vsearch{position:relative;flex:1 1 300px;max-width:460px}
.vsearch svg{position:absolute;left:14px;top:50%;width:18px;height:18px;margin-top:-9px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round}
.vsearch input{width:100%;padding:13px 14px 13px 42px;background:#0b0909;color:var(--text);font:inherit;font-size:.92rem;border:1px solid var(--line);border-radius:10px;transition:border-color .2s}
.vsearch input:focus{outline:none;border-color:var(--red)}
.vopts{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.vsel{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.8rem}
.vsel select{padding:10px 12px;background:#0b0909;color:var(--text);font:inherit;font-size:.85rem;border:1px solid var(--line);border-radius:8px}
.vsel select:focus{outline:none;border-color:var(--red)}
.vtoggle{display:flex;align-items:center;gap:8px;padding:9px 14px;border:1px solid var(--line);border-radius:8px;font-size:.85rem;cursor:pointer;user-select:none}
.vtoggle input{accent-color:var(--red);width:16px;height:16px}
.vmode{padding:.6rem 1.1rem;font-size:.85rem;cursor:pointer;font-family:inherit}

.vletters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.vletters button{min-width:36px;height:36px;padding:0 10px;background:#0f0d0d;color:var(--muted);font:600 .82rem/1 inherit;font-family:inherit;border:1px solid var(--line);border-radius:8px;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.vletters button:hover{border-color:var(--red);color:var(--text)}
.vletters button.on{background:var(--red);border-color:var(--red);color:#fff}
.vcount{margin:0 0 18px;color:var(--muted);font-size:.85rem}

.vgrid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px}
.vcard{padding:20px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:12px;animation:vIn .35s ease both;transition:border-color .25s,transform .25s}
.vcard:hover{border-color:#4a3a3a;transform:translateY(-2px)}
.vcard.done{border-color:rgba(95,211,141,.45)}
.vtop{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.vcard h2{margin:0;font-size:1.15rem;line-height:1.3;overflow-wrap:anywhere}
.ve{margin:8px 0 0;color:var(--text);font-size:.92rem;line-height:1.55}
.vu{margin:8px 0 0;padding-left:12px;border-left:2px solid var(--red);color:var(--muted);font-size:.86rem;line-height:1.55;font-style:italic}
.no-urdu .vu{display:none}
.vlearn{flex:none;width:30px;height:30px;padding:0;display:grid;place-items:center;background:none;border:1px solid var(--line);border-radius:50%;cursor:pointer;transition:background .2s,border-color .2s}
.vlearn svg{width:16px;height:16px;fill:none;stroke:#6f6666;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.vlearn:hover{border-color:var(--red)}
.vlearn[aria-pressed="true"]{background:rgba(95,211,141,.18);border-color:#5fd38d}
.vlearn[aria-pressed="true"] svg{stroke:#5fd38d}
.vempty{padding:40px 0;text-align:center;color:var(--muted)}
.vnote{margin:34px 0 0;color:var(--muted);font-size:.82rem;text-align:center}
@keyframes vIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* Flashcards */
.vflash{display:flex;flex-direction:column;align-items:center;gap:18px;padding:10px 0 4px}
.vflash-count{margin:0;color:var(--muted);font-size:.88rem}
.vflip{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;width:100%;max-width:640px;min-height:300px;padding:34px 26px;text-align:center;color:var(--text);font-family:inherit;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:18px;cursor:pointer;transition:border-color .25s,box-shadow .25s}
.vflip:hover{border-color:var(--red)}
.vflip.flipped{border-color:var(--red);box-shadow:0 20px 60px -30px rgba(224,32,46,.6)}
.vflip:disabled{cursor:default;opacity:.6}
.vflip-word{font-size:clamp(1.8rem,5vw,2.8rem);font-weight:800;overflow-wrap:anywhere}
.vflip-hint{color:var(--muted);font-size:.85rem}
.vflip-back{display:flex;flex-direction:column;gap:10px;animation:vIn .3s ease both}
.vflip-back[hidden]{display:none}
.vflip-back b{font-size:1.1rem;font-weight:600}
.vflip-back i{color:var(--red2);font-size:1rem}
.vflash-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.vflash-actions .btn{cursor:pointer;font-family:inherit}
.vkeys{margin:0;color:#6f6666;font-size:.78rem;text-align:center}

@media(max-width:700px){
  .vopts{width:100%}
  .vsearch{max-width:none;flex-basis:100%}
  .vgrid{grid-template-columns:1fr}
  .vflip{min-height:260px}
  .vkeys{display:none}
}
@media(prefers-reduced-motion:reduce){.vcard,.vflip-back{animation:none}}

/* =====================================================================
   Practice tests: list, exam screen, results
   ===================================================================== */
/* ---- list ---- */
.tgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:20px}
.tcard{display:flex;flex-direction:column;padding:24px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:16px;transition:border-color .25s,transform .25s}
.tcard:hover{border-color:var(--red);transform:translateY(-3px)}
.tmeta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px;font-size:.76rem}
.tdate{color:var(--red2);font-weight:700;letter-spacing:.04em}
.tpill{padding:3px 10px;border:1px solid var(--line);border-radius:20px;color:var(--muted)}
.tcard h2{margin:0 0 14px;font-size:1.12rem;line-height:1.35}
.tfacts{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px;color:var(--muted);font-size:.84rem}
.tfacts b{color:var(--text)}
.tbest{margin:0 0 14px;padding:8px 12px;background:rgba(95,211,141,.08);border:1px solid rgba(95,211,141,.3);border-radius:8px;font-size:.84rem;color:#8fe3b0}
.tact{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:auto}
.tact .btn{cursor:pointer;font-family:inherit}
.tlink{color:var(--muted);font-size:.84rem;text-decoration:underline}
.tlink:hover{color:var(--red2)}
.tnote{margin-top:48px;padding:26px;border:1px solid var(--line);border-radius:14px;background:#0d0b0b}
.tnote h2{margin:0 0 14px;font-size:1.2rem}
.tnote .dots{margin:0}
dialog{max-width:min(520px,92vw);padding:0;color:var(--text);background:#141111;border:1px solid var(--line);border-radius:16px}
dialog::backdrop{background:rgba(0,0,0,.7)}
.tdlg-in{padding:26px}
.tdlg-in h2{margin:0 0 4px;font-size:1.3rem}
.tdlg-sub{margin:0 0 18px;color:var(--muted);font-size:.88rem}
.tdlg-in fieldset{margin:0 0 16px;padding:0;border:0}
.tdlg-in legend{margin-bottom:10px;font-weight:600;font-size:.9rem}
.topt{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;margin-bottom:8px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.topt:has(input:checked){border-color:var(--red);background:rgba(224,32,46,.08)}
.topt[hidden]{display:none}
.topt input{accent-color:var(--red);margin-top:4px}
.topt b{display:block;font-size:.92rem}
.topt small{color:var(--muted);font-size:.78rem}
.topt select{margin-top:6px;max-width:100%;padding:7px;background:#0b0909;color:var(--text);border:1px solid var(--line);border-radius:6px;font-family:inherit}
.tchk{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;font-size:.86rem;color:var(--muted)}
.tchk input{accent-color:var(--red);margin-top:3px}
.tdlg-err{min-height:1.2em;margin:0 0 10px;color:var(--red2);font-size:.85rem}
.tdlg-act{display:flex;justify-content:flex-end;gap:10px}
.tdlg-act .btn{cursor:pointer;font-family:inherit}

/* ---- exam screen ---- */
body.take{background:#0a0909;overflow:hidden}
.app-load{padding:40px;text-align:center;color:var(--muted)}
.exam{height:100svh;display:grid;grid-template-rows:auto 1fr auto;position:relative}
.ex-top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:10px 20px;background:#100d0d;border-bottom:1px solid var(--line)}
.ex-title{display:flex;flex-direction:column;min-width:0}
.ex-title b{font-size:.98rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ex-title span{color:var(--muted);font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ex-timer{display:flex;align-items:center;gap:10px;font-variant-numeric:tabular-nums;font-size:1.35rem;font-weight:700}
.ex-timer.low{color:var(--red2)}
.ex-timer button,.ex-tools button,.ex-tools a{padding:6px 12px;background:none;color:var(--text);font-family:inherit;font-weight:600;font-size:.76rem;border:1px solid var(--line);border-radius:8px;cursor:pointer}
.ex-timer button:hover,.ex-tools button:hover,.ex-tools a:hover{border-color:var(--red)}
.ex-tools{display:flex;justify-content:flex-end;gap:8px}
.ex-main{display:grid;grid-template-columns:minmax(0,1fr) 340px;min-height:0}
.ex-q{overflow:auto;padding:22px;background:#fff;border-right:1px solid var(--line)}
.qimg{max-width:980px;margin:0 auto}
.qimg img{display:block;width:100%;height:auto}
.qload{padding:50px 0;text-align:center;color:#555}
.qimg.loading{opacity:.4}
.ex-a{overflow:auto;padding:22px;background:#0d0b0b}
.qhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}
.qbadge{display:grid;place-items:center;min-width:38px;height:38px;padding:0 10px;background:#fff;color:#111;font-weight:800;border-radius:8px}
.flag{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;background:none;color:var(--muted);font-family:inherit;font-weight:600;font-size:.8rem;border:1px solid var(--line);border-radius:8px;cursor:pointer}
.flag svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.flag[aria-pressed="true"]{color:#ffc857;border-color:#ffc857;background:rgba(255,200,87,.1)}
.flag[aria-pressed="true"] svg{fill:#ffc857}
.choices{display:grid;gap:10px}
.choice{display:flex;gap:6px}
.pick{flex:1;display:flex;align-items:center;gap:14px;padding:12px 14px;background:#141111;color:var(--text);font-family:inherit;font-size:.95rem;border:2px solid var(--line);border-radius:12px;cursor:pointer;text-align:left;transition:border-color .15s,background .15s}
.pick:hover{border-color:#6a4a4a}
.ltr{display:grid;place-items:center;width:30px;height:30px;border:2px solid #7a6a6a;border-radius:50%;font-weight:700;font-size:.85rem;flex:none}
.choice.sel .pick{border-color:#3b82f6;background:rgba(59,130,246,.14)}
.choice.sel .ltr{background:#3b82f6;border-color:#3b82f6;color:#fff}
.choice.cut .pick{opacity:.45;text-decoration:line-through}
.xout{width:40px;background:none;color:var(--muted);border:1px solid var(--line);border-radius:10px;cursor:pointer;font-size:.9rem}
.xout:hover{border-color:var(--red);color:var(--red2)}
.hint{margin:16px 0 0;color:var(--muted);font-size:.8rem;line-height:1.6}
.gridin{display:block}
.gridin span{display:block;margin-bottom:8px;font-weight:600;font-size:.9rem}
.gridin input{width:100%;padding:14px;background:#0b0909;color:var(--text);font-family:inherit;font-weight:600;font-size:1.3rem;border:2px solid var(--line);border-radius:10px;letter-spacing:.06em}
.gridin input:focus{outline:none;border-color:#3b82f6}
.preview{margin:16px 0 0;padding:12px 14px;border:1px dashed var(--line);border-radius:10px;color:var(--muted);font-size:.85rem}
.preview b{color:var(--text);font-size:1.15rem;margin-left:6px}
.ex-foot{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:10px 20px;background:#100d0d;border-top:1px solid var(--line)}
.save{color:var(--muted);font-size:.76rem}
.save.bad{color:#ffc857}
.qnav{justify-self:center;padding:10px 18px;background:#1b1616;color:var(--text);font-family:inherit;font-weight:700;font-size:.88rem;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.qnav:hover{border-color:var(--red)}
.ex-btns{display:flex;justify-content:flex-end;gap:10px}
.ex-btns .btn{cursor:pointer;font-family:inherit}
.ex-btns .btn:disabled{opacity:.4;cursor:default;transform:none}
.ex-panel{position:fixed;inset:0;z-index:40;display:grid;place-items:center;padding:16px;background:rgba(0,0,0,.72)}
.ex-panel[hidden]{display:none}
.panel-in{width:min(640px,100%);max-height:100%;overflow:auto;padding:26px;background:#141111;border:1px solid var(--line);border-radius:16px}
.panel-in h2{margin:0 0 12px;font-size:1.15rem;text-align:center}
.legend{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 14px;margin:0 0 18px;color:var(--muted);font-size:.78rem;align-items:center}
.k{display:inline-block;width:14px;height:14px;margin-right:-6px;border-radius:4px;border:2px solid var(--line)}
.k.cur{border-color:#3b82f6}.k.done{background:#3b82f6;border-color:#3b82f6}.k.todo{border:2px dashed #7a6a6a}.k.flag{border-color:#ffc857;background:rgba(255,200,87,.3)}
.qgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:8px}
.qb{position:relative;height:44px;background:#1b1616;color:var(--text);font-family:inherit;font-weight:700;font-size:.9rem;border:2px dashed #6a5a5a;border-radius:8px;cursor:pointer}
.qb.done{background:#3b82f6;border:2px solid #3b82f6;color:#fff}
.qb.cur{outline:3px solid #fff;outline-offset:2px}
.qb.flag::after{content:"";position:absolute;top:-5px;right:-5px;width:14px;height:14px;background:#ffc857;border-radius:50%}
.sum{margin:18px 0;text-align:center;color:var(--muted);font-size:.9rem}
.panel-act{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.panel-act .btn{cursor:pointer;font-family:inherit}
.ex-busy{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:rgba(0,0,0,.8);font-weight:600}
.break{min-height:100svh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at 50% 30%,#2a0c10,#0a0909 62%)}
.break-in{max-width:460px;text-align:center}
.break-in h1{margin:0 0 10px;font-size:2.4rem}
.break-in p{color:var(--muted);line-height:1.7}
.bt{margin:18px 0 !important;color:var(--text) !important;font-size:3rem;font-weight:800;font-variant-numeric:tabular-nums}
.bnext{margin-bottom:24px !important}
.break-in .btn{cursor:pointer;font-family:inherit;margin-right:10px}
@media(max-width:900px){
  body.take{overflow:auto}
  .exam{height:auto;min-height:100svh;grid-template-rows:auto 1fr auto}
  .ex-top{grid-template-columns:1fr auto}
  .ex-tools{grid-column:1/-1;justify-content:flex-start}
  .ex-main{grid-template-columns:1fr;grid-template-rows:auto auto}
  .ex-q{border-right:0;border-bottom:1px solid var(--line);max-height:62svh}
  .ex-foot{position:sticky;bottom:0;grid-template-columns:auto 1fr auto}
  .save{display:none}
  .qnav{justify-self:start}
}

/* ---- results ---- */
.rcards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:14px}
.rcard{padding:20px;background:linear-gradient(135deg,#191515,#0f0d0d);border:1px solid var(--line);border-radius:14px}
.rcard small{display:block;margin-bottom:8px;color:var(--muted);font-size:.74rem;letter-spacing:.08em;text-transform:uppercase}
.rcard strong{display:block;font-size:2rem;line-height:1.1}
.rcard strong i{font-style:normal;font-size:1.05rem;color:var(--muted);font-weight:600}
.rcard span{display:block;margin-top:6px;color:var(--muted);font-size:.8rem}
.rcard.main{border-color:var(--red)}
.rcard.est strong{color:var(--red2)}
.rnote{margin:0 0 26px;color:var(--muted);font-size:.82rem;line-height:1.7;max-width:760px}
.rbar{width:120px;height:8px;margin-bottom:4px;background:#2a2424;border-radius:8px;overflow:hidden}
.rbar span{display:block;height:100%;background:var(--red);border-radius:8px}
.rtable td small{color:var(--muted)}
.rfilter{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.rfilter button{padding:8px 14px;background:#0f0d0d;color:var(--muted);font-family:inherit;font-weight:600;font-size:.82rem;border:1px solid var(--line);border-radius:20px;cursor:pointer}
.rfilter button.on{background:var(--red);border-color:var(--red);color:#fff}
.rmod{margin:26px 0 12px;font-size:1rem}
.rgrid{display:flex;flex-wrap:wrap;gap:8px}
.rt{position:relative;width:44px;height:44px;display:inline-grid;place-items:center;font-family:inherit;font-weight:700;font-size:.88rem;color:#fff;border:2px solid transparent;border-radius:8px;cursor:pointer}
.rt[hidden]{display:none}
.rt.ok{background:#1f8a4c}.rt.bad{background:#c0283a}.rt.omit{background:#3a3333;color:#cfc6c6}
.rt.flag::after{content:"";position:absolute;top:-5px;right:-5px;width:12px;height:12px;background:#ffc857;border-radius:50%}
.rlegend{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:24px 0 0;color:var(--muted);font-size:.8rem}
.rlegend .rt{width:28px;height:28px;font-size:.7rem;cursor:default}
#rdlg{width:min(980px,96vw);max-width:none}
.rd-in{padding:20px}
.rd-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.rd-head h2{margin:0;font-size:1.05rem}
.rd-x{width:36px;height:36px;background:none;color:var(--text);font-size:1.6rem;border:1px solid var(--line);border-radius:8px;cursor:pointer;line-height:1}
.rd-status{margin:12px 0;padding:10px 14px;border-radius:10px;font-size:.88rem;line-height:1.6;background:#1b1616}
.rd-status.ok{border:1px solid #1f8a4c}.rd-status.bad{border:1px solid #c0283a}.rd-status.omit{border:1px solid #6a5a5a}
.rd-img{max-height:62svh;overflow:auto;padding:16px;background:#fff;border-radius:10px}
.rd-img img{display:block;width:100%;max-width:920px;margin:0 auto;height:auto}
.rd-act{display:flex;justify-content:space-between;margin-top:14px}
.rd-act .btn{cursor:pointer;font-family:inherit}
.rd-act .btn:disabled{opacity:.4;cursor:default}
@media print{.site-header,.site-footer,.cta-band,.rfilter,#rdlg,.cta,.nav-scrim{display:none!important}body{background:#fff;color:#000}}

/* dashboard results */
.dres{margin-top:44px}
.dres h2{margin:0 0 16px;font-size:1.4rem}
.dempty{color:var(--muted)}
.dempty a{color:var(--red2);text-decoration:underline}
