/* ═══════════════════════════════════════════
   FONTS — Self-hosted
   Primary:   DM Sans  (body text, UI)
   Secondary: Inter    (math, code, numbers)
═══════════════════════════════════════════ */

/* DM Sans — Variable Font (all weights in one file) */

/* Inter — Individual weights */

/* QuizMaster Pro — v11 | Hostinger-inspired Clean Design */

/* ═══════════════════════════════════════════
   DESIGN TOKENS — Hostinger-style
═══════════════════════════════════════════ */
:root {
  /* Headings */
  --h-color:   #18181a;
  /* Body text */
  --t-color:   #58585e;
  /* Muted / caption */
  --t-muted:   #8e8e99;
  /* Ultra-faint */
  --t-faint:   #adadb8;
  /* Borders */
  --bd:        #e8e8ed;
  --bd-hover:  #c8c8d4;
  /* Backgrounds */
  --bg-page:   #f5f5f7;
  --bg-card:   #ffffff;
  --bg-sub:    #fafafb;
  /* Brand */
  --blue:      #2563eb;
  --blue-dk:   #1d4ed8;
  --blue-lt:   #eff6ff;
  --blue-bd:   #dbeafe;
  --green:     #12b76a;
  --green-lt:  #ecfdf5;
  --green-bd:  #a7f3d0;
  --green-dk:  #059669;
  --saffron:   #f59e0b;
  --saffron-lt:#fffbeb;
  --red:       #f04438;
  --red-lt:    #fef2f2;
  --navy:      #101828;
  /* Radius */
  --r-xs:  4px;
  --r-sm:  8px;
  --r:     10px;
  --r-md:  12px;
  --r-lg:  14px;
  --r-xl:  18px;
  /* Shadows — very subtle like Hostinger */
  --sh-xs: 0 1px 2px rgba(16,24,40,.05);
  --sh-sm: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --sh:    0 4px 8px rgba(16,24,40,.06), 0 2px 4px rgba(16,24,40,.04);
  --sh-lg: 0 12px 24px rgba(16,24,40,.08), 0 4px 8px rgba(16,24,40,.04);
}

/* ── Reset ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;overflow-x:hidden;-webkit-tap-highlight-color:transparent}
body{
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;
  background:var(--bg-page);
  color:var(--t-color);
  font-size:16.5px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
  font-feature-settings:'kern' 1,'liga' 1;
}
h1,h2,h3,h4,h5,h6{
  color:var(--h-color);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;
  font-weight:700;
  line-height:1.3;
  letter-spacing:-.02em;
}
p{color:var(--t-color);line-height:1.65}
a{color:var(--blue);text-decoration:none;transition:color .15s}
a:hover{color:var(--blue-dk)}
img{max-width:100%;height:auto;display:block}
svg{display:inline-block;vertical-align:middle;overflow:hidden;flex-shrink:0}
button{font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;cursor:pointer}
input,select,textarea{font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;max-width:100%;margin:0 auto;padding:0 16px}
.container{width:100%;margin-left:auto;margin-right:auto;padding:0 16px;overflow-x:hidden}
@media(min-width:640px){.container{padding:0 24px}}
@media(min-width:1024px){.container{max-width:100%;padding:0 40px}}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.site-header{
  background:var(--bg-card);
  border-bottom:1px solid var(--bd);
  position:sticky;top:0;z-index:1000;
  /* box-shadow:var(--sh-xs); */
}
.hdr-row{height:75px;display:flex;align-items:center;gap:12px}
@media(min-width:768px){.hdr-row{height:75px}}

/* Logo */
.logo-link{display:flex;align-items:center;gap:10px;text-decoration:none;flex-shrink:0}
.logo-box{
  width:36px;height:36px;min-width:36px;
  background:linear-gradient(120deg,#0620a1,#5e00ff);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
  overflow:hidden;
}
.logo-box svg{width:18px;height:22px;fill:white;stroke:none;display:block}
.logo-box img{width:24px;height:24px;object-fit:contain;display:block;flex-shrink:0}
.logo-text{display:flex;flex-direction:column}
.logo-name{font-size:18px;font-weight:800;color:var(--h-color);letter-spacing:-.03em;line-height:1}
.logo-tag{font-size:12px;color:var(--t-faint);font-weight:500;line-height:1;margin-top:2px}
@media(min-width:768px){
  .logo-box{width:38px;height:38px;border-radius:9px}
  .logo-box svg{width:20px;height:20px}
  .logo-name{font-size:19px}
}

/* Search — inside hdr-actions, flat style */
.hdr-search{flex:0 0 auto;min-width:0;width:190px;display:none}
@media(min-width:640px){.hdr-search{display:block}}
@media(min-width:1024px){.hdr-search{width:220px}}
.srch-wrap{
  display:flex;align-items:center;
  background:transparent;
  border:none;
  border-bottom:1.5px solid var(--bd);
  border-radius:0;
  padding:0 4px 0 2px;gap:7px;
  transition:all .15s;
}
.srch-wrap:focus-within{border-bottom-color:var(--blue);background:transparent;box-shadow:none}
.srch-wrap svg{width:15px;height:15px;stroke:var(--t-faint);fill:none;display:block;flex-shrink:0}
.srch-wrap input{
  flex:1;min-width:0;border:none;background:none;
  font-family:'DM Sans','Inter','Roboto',sans-serif;font-size:14.5px;color:var(--h-color);
  padding:7px 0;outline:none;
}
.srch-wrap input::placeholder{color:var(--t-faint);font-weight:400}
.srch-btn{display:none}

/* Header actions — margin-left:auto pushes everything to right */
.hdr-actions{display:flex;align-items:center;gap:10px;margin-left:auto;flex-shrink:0}

.hbtn{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;border-radius:var(--r);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;font-size:15px;font-weight:600;
  cursor:pointer;white-space:nowrap;text-decoration:none;
  border:1px solid transparent;line-height:1;transition:all .15s;
}
.hbtn svg{width:14px;height:14px;stroke:currentColor;fill:none;display:block;flex-shrink:0}
.hbtn-govt{background:var(--red-lt);color:#b42318;border-color:#fecdc9}
.hbtn-govt:hover{background:#b42318;color:#fff;border-color:#b42318}
.hbtn-test{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 1px 3px rgba(37,99,235,.2)}
.hbtn-test:hover{background:var(--blue-dk);border-color:var(--blue-dk);color:#fff}
.hbtn-pyq{background:linear-gradient(135deg,#7a00ff,#a7009a);color:#fff !important;border-color:transparent;position:relative;box-shadow:0 2px 10px rgba(122,0,255,.3)}
.hbtn-pyq:hover{background:linear-gradient(135deg,#6600e0,#8f0082);color:#fff !important;border-color:transparent;box-shadow:0 4px 14px rgba(122,0,255,.4)}
.hbtn-login{background:var(--bg-card);color:var(--h-color);border-color:var(--bd)}
.hbtn-login:hover{border-color:var(--bd-hover);color:var(--blue)}
.hbtn-user{background:var(--bg-sub);color:var(--h-color);border-color:var(--bd)}
.hbtn-user:hover{border-color:var(--bd-hover)}
.hbtn-govt-hide{display:none}
@media(min-width:768px){.hbtn-govt-hide{display:inline-flex}}

/* Hamburger */
.mob-btn{
  display:flex;align-items:center;justify-content:center;
  background:none;border:1px solid var(--bd);padding:6px;
  border-radius:var(--r-sm);transition:all .15s;
}
.mob-btn:hover{background:var(--bg-sub);border-color:var(--bd-hover)}
.mob-btn svg{width:18px;height:18px;stroke:var(--h-color);fill:none;display:block}
@media(min-width:1024px){.mob-btn{display:none}}

/* User dropdown */
.usr-drop-wrap{position:relative;z-index:9999}
.usr-drop{
  display:none;position:fixed;
  background:var(--bg-card);
  border:1px solid var(--bd);
  border-radius:var(--r-lg);
  box-shadow:var(--sh-lg);
  width:220px;z-index:99999;overflow:hidden;
}
.usr-drop-info{padding:12px 16px;border-bottom:1px solid var(--bd);background:var(--bg-sub)}
.usr-drop-name{font-weight:700;color:var(--h-color);font-size:15.5px}
.usr-drop-email{font-size:13.5px;color:var(--t-muted);margin-top:2px}
.usr-drop a,.usr-drop button{
  display:flex;align-items:center;gap:9px;
  padding:10px 16px;font-size:15px;font-weight:500;
  color:var(--t-color);text-decoration:none;
  width:100%;background:none;border:none;cursor:pointer;
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;transition:background .1s;
}
.usr-drop a svg,.usr-drop button svg{width:14px;height:14px;stroke:currentColor;fill:none;display:block;flex-shrink:0;color:var(--t-muted)}
.usr-drop a:hover,.usr-drop button:hover{background:var(--bg-sub);color:var(--h-color)}
.usr-drop .logout-btn{color:var(--red);border-top:1px solid var(--bd)}
.usr-drop .logout-btn svg{color:var(--red)}

/* ═══════════════════════════════════════════
   MAIN NAV
═══════════════════════════════════════════ */
.main-nav{
  background:var(--bg-card);
  border-bottom:1px solid var(--bd);
  position:sticky;top:60px;z-index:299;
  display:none;
}
@media(min-width:1024px){.main-nav{display:block;top:64px;position:sticky}}
/* Parent for absolute dropdown positioning */
.main-nav-row{position:relative}
.main-nav-row{
  display:flex;align-items:center;
  overflow-x:auto;overflow-y:visible;
  scrollbar-width:none;-ms-overflow-style:none;gap:0;
}
.main-nav-row::-webkit-scrollbar{display:none}
.mnav-link{
  display:inline-flex;align-items:center;gap:6px;
  padding:0 14px;height:42px;
  font-size:15.5px;font-weight:600;color:var(--t-muted);
  white-space:nowrap;border-bottom:2px solid transparent;
  text-decoration:none;flex-shrink:0;transition:all .15s;
}
.mnav-link svg{width:14px;height:14px;stroke:currentColor;fill:none;display:block;flex-shrink:0;position:relative;top:-1px}
.mnav-link:hover{color:#18181a;border-bottom-color:var(--bd)}
.mnav-link.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:700}
.mnav-link.c-red{color:#b42318}
.mnav-link.c-red:hover{border-bottom-color:#b42318}
.mnav-link.c-green{color:var(--green-dk)}

/* Pop button */
.pop-btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:0 14px;height:42px;
  font-size:15.5px;font-weight:700;color:var(--blue);
  white-space:nowrap;border-bottom:2px solid var(--blue);
  background:none;border-top:none;border-left:none;border-right:none;
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;cursor:pointer;flex-shrink:0;
}
.pop-btn svg{width:13px;height:13px;stroke:currentColor;fill:none;display:block;flex-shrink:0}
.pop-chev{transition:transform .2s}
.pop-btn.open .pop-chev{transform:rotate(180deg)}

/* ═══════════════════════════════════════════
   DROPDOWN PANELS
═══════════════════════════════════════════ */
.mega-overlay{display:none;position:fixed;inset:0;background:rgba(16,24,40,.25);z-index:298;backdrop-filter:blur(1px)}
.mega-overlay.open{display:block}
.mega-panel{
  display:none;position:absolute;
  left:50%;transform:translateX(-50%);
  width:min(80vw,1360px);
  background:var(--bg-card);
  border:1px solid var(--bd);
  border-top:none;
  border-radius:0 0 var(--r-lg) var(--r-lg);
  box-shadow:0 8px 24px rgba(16,24,40,.12);
  z-index:299;overflow-y:auto;max-height:75vh;
}
.mega-panel.open{display:block}
.mega-panel.open::before,.sub-panel.open::before{
  content:'';display:block;height:2px;
  background:linear-gradient(90deg,var(--blue),var(--green));
}
.mega-inner{max-width:min(80vw,1360px);margin:0 auto;padding:20px 32px 24px}
.mega-top{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid var(--bd);
}
.mega-top h3{font-size:15px;font-weight:700;color:var(--h-color)}
.mega-top a{font-size:14.5px;font-weight:600;color:var(--blue)}
.mega-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px 24px}
@media(max-width:900px){.mega-grid{grid-template-columns:repeat(2,1fr)}}
.mega-col-title{
  font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--t-faint);margin-bottom:6px;padding-bottom:6px;
  border-bottom:1px solid var(--bd);
}
.mega-row{
  display:flex;align-items:center;gap:8px;
  padding:6px 8px;border-radius:var(--r-sm);
  font-size:15px;font-weight:500;color:var(--t-color);
  text-decoration:none;transition:all .12s;
}
.mega-row:hover{background:var(--blue-lt);color:var(--blue)}
.mega-ico{
  width:26px;height:26px;min-width:26px;border-radius:6px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.mega-ico svg{width:13px;height:13px;stroke:currentColor;fill:none;display:block}
.mega-cnt{
  margin-left:auto;font-size:12px;color:var(--t-faint);
  background:var(--bg-sub);padding:1px 6px;border-radius:20px;font-weight:600;flex-shrink:0;
}
.mega-row:hover .mega-cnt{background:var(--blue-bd);color:var(--blue-dk)}

/* Sub panel */
.sub-panel{
  display:none;position:absolute;
  left:50%;transform:translateX(-50%);
  width:min(80vw,1360px);
  background:var(--bg-card);
  border:1px solid var(--bd);
  border-top:none;
  border-radius:0 0 var(--r-lg) var(--r-lg);
  box-shadow:0 8px 24px rgba(16,24,40,.12);
  z-index:299;overflow-y:auto;max-height:70vh;
}
.sub-panel.open{display:block}
.sub-inner{max-width:min(80vw,1360px);margin:0 auto;padding:20px 32px 22px}
.sp-link{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:var(--r);
  font-size:15px;font-weight:500;color:var(--t-color);
  text-decoration:none;transition:all .12s;
}
.sp-link:hover{background:var(--blue-lt);color:var(--blue)}
.sp-link svg{width:14px;height:14px;stroke:currentColor;fill:none;display:block;flex-shrink:0}

/* ═══════════════════════════════════════════
   MOBILE NAV DRAWER
═══════════════════════════════════════════ */
#mobileNav{display:none;position:fixed;inset:0;z-index:999}
#mobileNav.open{display:block}
.mob-nav-backdrop{position:absolute;inset:0;background:rgba(16,24,40,.4)}
.mob-nav-drawer{
  position:absolute;left:0;top:0;bottom:0;
  width:min(300px,82vw);
  background:var(--bg-card);
  box-shadow:var(--sh-lg);
  overflow-y:auto;
  transform:translateX(-100%);
  transition:transform .28s cubic-bezier(.4,0,.2,1);
  display:flex;flex-direction:column;
}
#mobileNav.open .mob-nav-drawer{transform:translateX(0)}
.mob-nav-hdr{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 18px;border-bottom:1px solid var(--bd);
  background:var(--navy);
}
.mob-nav-hdr .logo-name{color:#fff}
.mob-nav-hdr .logo-tag{color:rgba(255,255,255,.4)}
.mob-close{
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);
  width:30px;height:30px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.mob-close svg{width:14px;height:14px;stroke:white;fill:none;display:block}
.mob-nav-body{padding:10px 14px;flex:1}
.mob-section-title{
  font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--t-faint);padding:10px 4px 6px;margin-top:4px;
}
.mob-link{
  display:flex;align-items:center;gap:10px;
  padding:9px 10px;border-radius:var(--r);
  font-size:18px;font-weight:600;color:var(--t-color);
  text-decoration:none;transition:all .1s;margin-bottom:1px;
}
.mob-link svg{width:17px;height:17px;stroke:currentColor;fill:none;display:block;flex-shrink:0}
.mob-link:hover{background:var(--bg-sub);color:var(--h-color)}
.mob-link.c-red{color:#b42318}
.mob-link.c-green{color:var(--green-dk)}
.mob-link.c-purple{color:#6941c6}
.mob-cats-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px 0}
.mob-cat-link{
  display:flex;align-items:center;gap:7px;
  padding:7px 9px;border-radius:var(--r-sm);
  font-size:14px;font-weight:600;color:var(--t-color);
  text-decoration:none;background:var(--bg-sub);
  border:1px solid var(--bd);transition:all .12s;
}
.mob-cat-link:hover{background:var(--blue-lt);color:var(--blue);border-color:var(--blue-bd)}
.mob-cat-ico{width:22px;height:22px;min-width:22px;border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.mob-cat-ico svg{width:11px;height:11px;stroke:currentColor;fill:none;display:block}
.mob-cat-cnt{margin-left:auto;font-size:12px;color:var(--t-faint);font-weight:600}
.mob-nav-foot{padding:14px;border-top:1px solid var(--bd);display:flex;flex-direction:column;gap:7px;background:var(--bg-sub)}

/* ═══════════════════════════════════════════
   BOTTOM NAV (mobile)
═══════════════════════════════════════════ */
.bottom-nav{
  display:flex;position:fixed;bottom:0;left:0;right:0;z-index:900;
  background:var(--bg-card);border-top:1px solid var(--bd);
  box-shadow:0 -2px 12px rgba(16,24,40,.06);
  padding-bottom:env(safe-area-inset-bottom);
}
@media(min-width:1024px){.bottom-nav{display:none}}
.bn-item{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:8px 4px 10px;gap:3px;text-decoration:none;
  font-size:11px;font-weight:600;color:var(--t-faint);
  transition:color .15s;position:relative;
}
.bn-item::before{
  content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:0;height:3px;background:var(--blue);border-radius:0 0 4px 4px;
  transition:width .2s;
}
.bn-item.active::before{width:32px;}
.bn-item.active{color:var(--blue)}
.bn-item.active svg{stroke:var(--blue)}
.bn-item.active .bn-icon{background:var(--blue-lt);}
.bn-icon{
  width:36px;height:28px;display:flex;align-items:center;justify-content:center;
  border-radius:16px;transition:background .15s;
}
.bn-item svg{width:20px;height:20px;stroke:var(--t-faint);fill:none;display:block;transition:stroke .15s}


/* ═══════════════════════════════════════════
   HERO CARD
═══════════════════════════════════════════ */
.hero-card{
  background:linear-gradient(125deg,#0d1b35 0%,#101828 60%,#0d2137 100%);
  border-radius:var(--r-xl);overflow:hidden;position:relative;min-height:220px;
  display:grid;grid-template-columns:1fr;
}
@media(min-width:600px){.hero-card{grid-template-columns:1fr auto}}
.hero-content{padding:24px 30px 20px;position:relative;z-index:2}
@media(max-width:599px){.hero-content{padding:18px 18px 18px}}
.hero-img-col{display:none;position:relative;overflow:visible;min-width:200px;max-width:320px;z-index:3}
@media(min-width:600px){.hero-img-col{display:block}}
.hero-img-col img{position:absolute;bottom:0;right:0;height:108%;width:auto;max-width:none;object-fit:contain;object-position:bottom right;display:block;z-index:3}
.hero-img-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px;opacity:.25;gap:8px}
.hero-img-empty svg{width:40px;height:40px;stroke:#fff;fill:none}
.hero-img-empty span{color:#fff;font-size:11px;font-weight:600;text-align:center}

/* ═══════════════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════════════ */
.page-wrap{padding:0 0 52px;overflow-x:hidden}
@media(min-width:768px){.page-wrap{padding:0px 0 52px}}
@media(max-width:1023px){.page-wrap{padding-bottom:80px !important}}

.main-grid{display:grid;grid-template-columns:1fr;gap:20px;align-items:start}
@media(min-width:1024px){.main-grid{grid-template-columns:1fr 276px;gap:24px}}
.main-grid>*{min-width:0}

/* ═══════════════════════════════════════════
   CARD — Hostinger style
═══════════════════════════════════════════ */
.card{
  background:var(--bg-card);
  border:1px solid var(--bd);
  border-radius:var(--r-md);overflow:hidden;
  box-shadow:var(--sh-xs);
}
.card-body{padding:18px 20px}
.card-hdr{
  padding:12px 18px;
  border-bottom:1px solid var(--bd);
  display:flex;align-items:center;justify-content:space-between;
  background:var(--bg-sub);
}
.card-hdr h3{
  font-size:15px;font-weight:700;color:var(--h-color);
  display:flex;align-items:center;gap:7px;
}
.card-hdr h3 svg{width:14px;height:14px;stroke:var(--blue);fill:none;display:block}
.card-hdr a{font-size:14.5px;font-weight:600;color:var(--blue)}

/* Sidebar card */
.sidebar-box{background:var(--bg-card);border:1px solid var(--bd);border-radius:var(--r-lg);overflow:hidden;margin-bottom:14px}
.sidebar-box-hdr{
  padding:11px 15px;border-bottom:1px solid var(--bd);
  display:flex;align-items:center;justify-content:space-between;
  background:var(--bg-sub);
}
.sidebar-box-hdr h3{font-size:15px;font-weight:700;color:var(--h-color);display:flex;align-items:center;gap:6px}
.sidebar-box-hdr h3 svg{width:13px;height:13px;stroke:var(--blue);fill:none;display:block}
.sidebar-box-hdr a{font-size:14px;font-weight:600;color:var(--blue)}
.sidebar-box-body{padding:10px}

/* Sidebar list item */
.s-list-item{
  display:flex;align-items:center;gap:9px;
  padding:7px 9px;border-radius:var(--r-sm);
  font-size:14.5px;font-weight:500;color:var(--t-color);
  text-decoration:none;transition:all .1s;
}
.s-list-item:hover{background:var(--bg-sub);color:var(--h-color)}
.s-list-ico{width:28px;height:28px;min-width:28px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.s-list-ico svg{width:13px;height:13px;stroke:currentColor;fill:none;display:block}
.s-cnt{margin-left:auto;font-size:12.5px;font-weight:600;color:var(--t-faint);background:var(--bg-sub);padding:1px 7px;border-radius:20px;border:1px solid var(--bd)}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero{
  background:var(--navy);
  border-radius:var(--r-xl);
  padding:28px 24px;
  margin-bottom:20px;
  overflow:hidden;position:relative;
}
@media(min-width:640px){.hero{padding:36px 32px}}
.hero::before{
  content:'';position:absolute;right:-60px;top:-60px;
  width:200px;height:200px;
  background:rgba(37,99,235,.2);border-radius:50%;
  pointer-events:none;
}
.hero::after{
  content:'';position:absolute;left:-30px;bottom:-40px;
  width:140px;height:140px;
  background:rgba(18,183,106,.08);border-radius:50%;
  pointer-events:none;
}
.hero-inner{position:relative;z-index:1}
.hero-badge{
  display:inline-flex;align-items:center;gap:6px;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);
  color:rgba(255,255,255,.65);font-size:13px;font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;padding:4px 11px;
  border-radius:20px;margin-bottom:14px;
}
.hero-badge-dot{width:5px;height:5px;border-radius:50%;background:var(--green);flex-shrink:0}
.hero h1{
  font-size:clamp(22px,3.5vw,34px);font-weight:800;color:#fff;
  line-height:1.15;letter-spacing:-.04em;margin-bottom:10px;
}
.hero h1 em{font-style:normal;color:#f59e0b}
.hero p{font-size:15.5px;color:rgba(255,255,255,.5);line-height:1.7;margin-bottom:18px;max-width:500px}
@media(min-width:640px){.hero p{font-size:16.5px}}
.hero-stats{display:flex;gap:20px;margin-bottom:18px;flex-wrap:wrap}
@media(min-width:640px){.hero-stats{gap:28px}}
.hero-stat .val{font-size:22px;font-weight:800;font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;color:#93c5fd;display:block;line-height:1}
@media(min-width:640px){.hero-stat .val{font-size:26px}}
.hero-stat .lbl{font-size:12px;color:rgba(255,255,255,.38);margin-top:3px;text-transform:uppercase;letter-spacing:.05em}
.hero-btns{display:flex;gap:8px;flex-wrap:wrap}
.btn-hero-primary{
  display:inline-flex;align-items:center;gap:7px;
  padding:9px 18px;background:#fff;color:var(--navy);
  border-radius:var(--r);font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;font-size:15.5px;font-weight:700;
  text-decoration:none;transition:all .15s;border:none;
}
.btn-hero-primary svg{width:14px;height:14px;stroke:currentColor;fill:none;display:block}
.btn-hero-primary:hover{background:#f0f9ff;color:var(--blue-dk)}
.btn-hero-ghost{
  display:inline-flex;align-items:center;gap:7px;
  padding:9px 16px;background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.15);color:#fff;
  border-radius:var(--r);font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;font-size:15.5px;font-weight:600;
  text-decoration:none;transition:all .15s;
}
.btn-hero-ghost:hover{background:rgba(255,255,255,.15);color:#fff}

/* ═══════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════ */
.sec-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-wrap:wrap;gap:8px}
.sec-hdr h2{font-size:17px;font-weight:700;color:var(--h-color);display:flex;align-items:center;gap:7px}
.sec-hdr h2 svg{width:15px;height:15px;stroke:currentColor;fill:none;display:block;flex-shrink:0}
.sec-hdr a{font-size:14.5px;font-weight:600;color:var(--blue);display:flex;align-items:center;gap:3px}
.sec-hdr a svg{width:12px;height:12px;stroke:currentColor;fill:none;display:block}

/* ═══════════════════════════════════════════
   QUESTION BOX
═══════════════════════════════════════════ */
.q-box{
  background:var(--bg-card);
  border:1px solid var(--bd);
  border-radius:var(--r-lg);padding:20px 22px;margin-bottom:12px;
  box-shadow:var(--sh-xs);
  transition:box-shadow .15s, border-color .15s;
}
.q-box:hover{ border-color:var(--bd-hover); box-shadow:var(--sh-sm); }
.q-box-top{display:flex;align-items:center;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.q-num{
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;font-size:13px;font-weight:700;
  background:var(--navy);color:#fff;
  padding:3px 9px;border-radius:20px;flex-shrink:0;
}
.q-diff{font-size:12.5px;font-weight:700;padding:3px 10px;border-radius:20px;flex-shrink:0;display:inline-flex;align-items:center;gap:5px}
.q-diff::before{content:'';display:inline-block;width:14px;height:14px;flex-shrink:0;background-size:contain;background-repeat:no-repeat;background-position:center}
.q-diff.easy{background:#dcfce7;color:#15803d}
.q-diff.easy::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E")}
.q-diff.medium{background:#fef9c3;color:#a16207}
.q-diff.medium::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a16207' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E")}
.q-diff.hard{background:#fee2e2;color:#b91c1c}
.q-diff.hard::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b91c1c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E")}
.q-tag{
  display:inline-flex;align-items:center;gap:4px;
  font-size:13px;color:var(--t-muted);
  background:var(--bg-sub);padding:3px 8px;border-radius:20px;
  border:1px solid var(--bd);
}
.q-tag svg{width:10px;height:10px;stroke:var(--t-faint);fill:none;display:block}
.q-text{font-size:17px;font-weight:600;color:var(--h-color);line-height:1.65;margin-bottom:14px}
.options{display:flex;flex-direction:column;gap:8px}
.opt{
  display:flex;align-items:flex-start;gap:11px;
  padding:11px 14px;border:1px solid var(--bd);
  border-radius:var(--r);cursor:pointer;transition:all .13s;
  background:var(--bg-card);
}
.opt:hover{border-color:var(--blue);background:var(--blue-lt)}
.opt.correct{border-color:#17b26a !important;background:var(--green-lt) !important;pointer-events:none}
.opt.wrong{border-color:var(--red) !important;background:var(--red-lt) !important;pointer-events:none}
.opt.locked{pointer-events:none}
.opt-lbl{
  width:27px;height:27px;min-width:27px;flex-shrink:0;
  background:var(--bg-sub);border-radius:6px;border:1px solid var(--bd);
  display:flex;align-items:center;justify-content:center;
  font-size:13.5px;font-weight:700;font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;
  color:var(--t-muted);transition:all .13s;
}
.opt:hover .opt-lbl{background:var(--blue);color:#fff;border-color:var(--blue)}
.opt.correct .opt-lbl{background:#17b26a;color:#fff;border-color:#17b26a}
.opt.wrong .opt-lbl{background:var(--red);color:#fff;border-color:var(--red)}
.opt-text{font-size:18px;color:var(--t-color);line-height:1.55;padding-top:2px;flex:1;min-width:0}
.ans-reveal{margin-top:12px;padding:12px 15px;background:var(--green-lt);border:1px solid var(--green-bd);border-radius:var(--r);display:none}
.ans-reveal.show{display:block}
.ans-label{display:flex;align-items:center;gap:6px;font-size:13.5px;font-weight:700;color:#027a48;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}
.ans-label svg{width:13px;height:13px;stroke:var(--green);fill:none;display:block;flex-shrink:0}
.ans-correct{font-weight:800;color:#027a48}
.ans-exp{font-size:15.5px;color:var(--t-color);line-height:1.65}

/* ── Rich Explanation Box ── */




/* ── Concept intro line ── */


/* ── Step blocks ── */


.exp-step strong{ font-size:15px;font-weight:700;color:#111827; }
.exp-step p{ margin:6px 0 0;color:#374151;font-size:14.5px;line-height:1.8; }

/* ── Formula box ── */


/* ── Paragraph lines (sentence-split) ── */

.exp-line:last-child{ margin-bottom:0; }

/* ── Final Answer box ── */

.exp-final>span{
  display:block;font-size:13px;font-weight:800;color:#166534;margin-bottom:8px;
}
.exp-final ul{ margin:0;padding-left:20px; }
.exp-final li{ font-size:14.5px;font-weight:600;color:#14532d;margin-bottom:5px;line-height:1.6; }

/* ── Why wrong box ── */

.exp-wrong>span{
  display:block;font-size:13px;font-weight:800;color:#9a3412;margin-bottom:7px;
}
.exp-wrong ul{ margin:0;padding-left:20px; }
.exp-wrong li{ font-size:14px;color:#7c2d12;margin-bottom:4px;line-height:1.6; }

/* Tip highlight */
.exp-tip{ color:#2563eb;font-weight:700; }

/* Concept intro */


/* Step blocks */


.exp-step strong{font-size:14.5px;font-weight:700;color:#1e293b}
.exp-step p{margin:5px 0 0 0;color:#374151;font-size:14px;line-height:1.7}

/* Formula box */


/* Inline highlight */
.exp-hi{background:#FEF9C3;color:#713F12;font-weight:700;padding:1px 5px;border-radius:4px}

/* Why wrong */

.exp-wrong>span{font-size:12.5px;font-weight:700;color:#9A3412;display:block;margin-bottom:6px}
.exp-wrong ul{margin:0;padding-left:18px}
.exp-wrong li{font-size:13.5px;color:#7C2D12;margin-bottom:4px;line-height:1.5}

/* Final answer */

.exp-final>span{font-size:13px;font-weight:800;color:#166534;display:block;margin-bottom:7px}
.exp-final ul{margin:0;padding-left:18px}
.exp-final li{font-size:14px;font-weight:600;color:#14532D;margin-bottom:4px;line-height:1.5}

/* Plain text fallback */
.exp-plain{font-size:14.5px;color:#374151;line-height:1.75}
.exp-plain-step{color:#0369a1;font-size:14px;display:block;margin-top:10px;margin-bottom:4px}

/* Paragraph line (sentence-split plain text) */

.exp-line:last-child { margin-bottom: 0; }

/* Tip line */
.exp-tip { color: #0369a1; font-weight: 700; margin-right: 3px; }
.q-actions{display:flex;align-items:center;gap:7px;margin-top:12px;padding-top:12px;border-top:1px solid var(--bd);flex-wrap:wrap}

/* ═══════════════════════════════════════════
   BUTTONS — Complete System
═══════════════════════════════════════════ */

/* Base button */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif; font-size: 14.5px; font-weight: 700;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all .15s ease;
  text-decoration: none !important; white-space: nowrap; line-height: 1;
  outline: none; -webkit-appearance: none;
}
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; display: block; flex-shrink: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Primary — Blue fill */
.btn-primary {
  background: var(--blue); color: #fff !important; border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dk); border-color: var(--blue-dk); box-shadow: 0 3px 8px rgba(37,99,235,.3); }

/* Secondary — White/grey */
.btn-secondary {
  background: #fff; color: var(--t-color); border-color: var(--bd);
}
.btn-secondary:hover { border-color: var(--bd-hover); color: var(--h-color); background: var(--bg-sub); }

/* Success — Green */
.btn-success { background: var(--green); color: #fff !important; border-color: var(--green); }
.btn-success:hover { background: var(--green-dk); border-color: var(--green-dk); }

/* Ghost */
.btn-ghost { background: transparent; color: var(--t-muted); border-color: var(--bd); }
.btn-ghost:hover { background: var(--bg-sub); color: var(--h-color); }

/* Sizes */
.btn-sm  { padding: 6px 13px; font-size: 13.5px; }
.btn-lg  { padding: 11px 22px; font-size: 16px; }
.btn-xs  { padding: 4px 10px; font-size: 12.5px; border-radius: var(--r-sm); }

/* ── Show Answer button ── */
.btn-show {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif; font-size: 14.5px; font-weight: 700;
  cursor: pointer; border: 1.5px solid var(--blue);
  background: var(--blue-lt); color: var(--blue) !important;
  transition: all .15s; text-decoration: none !important; white-space: nowrap; line-height: 1;
  outline: none; -webkit-appearance: none;
}
.btn-show svg { width: 14px; height: 14px; stroke: currentColor; fill: none; display: block; flex-shrink: 0; }
.btn-show:hover { background: var(--blue); color: #fff !important; }
.btn-show:hover svg { stroke: #fff; }

/* ── Take Test / Online link button ── */
.btn-ol {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif; font-size: 14.5px; font-weight: 700;
  cursor: pointer; border: 1.5px solid var(--blue);
  background: var(--blue); color: #fff !important;
  transition: all .15s; text-decoration: none !important; white-space: nowrap; line-height: 1;
  box-shadow: 0 1px 4px rgba(37,99,235,.2);
}
.btn-ol svg { width: 13px; height: 13px; stroke: #fff !important; fill: none; display: block; flex-shrink: 0; }
.btn-ol:hover { background: var(--blue-dk); border-color: var(--blue-dk); box-shadow: 0 3px 10px rgba(37,99,235,.35); color: #fff !important; }

/* ── Go / Blue / Outline buttons ── */
.btn-go, .btn-blue {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--r);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif; font-size: 14.5px; font-weight: 700;
  cursor: pointer; border: 1.5px solid var(--blue);
  background: var(--blue); color: #fff !important;
  transition: all .15s; text-decoration: none !important; white-space: nowrap; line-height: 1;
}
.btn-go:hover, .btn-blue:hover { background: var(--blue-dk); border-color: var(--blue-dk); color: #fff !important; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--r);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif; font-size: 14.5px; font-weight: 700;
  cursor: pointer; border: 1.5px solid var(--blue);
  background: transparent; color: var(--blue) !important;
  transition: all .15s; text-decoration: none !important; white-space: nowrap; line-height: 1;
}
.btn-outline:hover { background: var(--blue); color: #fff !important; }
/* Bookmark button */
.bm-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:8px;
  border:1.5px solid #e4e4e7;background:#fff;
  color:#a1a1aa;cursor:pointer;
  transition:all .15s;flex-shrink:0;
}
.bm-btn:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}
.bm-btn.bm-saved{border-color:#16a34a;background:#f0fdf4;color:#16a34a}
.bm-btn svg{display:block}

/* ═══════════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════════ */
.breadcrumb{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:15px;color:var(--t-faint);margin-bottom:16px}
.breadcrumb a{color:var(--t-muted);font-weight:500;transition:color .12s;display:flex;align-items:center}
.breadcrumb a:hover{color:var(--blue)}
.bc-sep{color:var(--bd);font-size:18px}
.bc-cur{color:var(--h-color);font-weight:600}

/* ═══════════════════════════════════════════
   CATEGORY PAGE
═══════════════════════════════════════════ */
.topic-tabs-wrap{background:var(--bg-card);border:1px solid var(--bd);border-radius:var(--r-lg);overflow:hidden;margin-bottom:12px}
.topic-tabs-hdr{padding:10px 16px;background:var(--bg-sub);border-bottom:1px solid var(--bd);display:flex;align-items:center;gap:6px;font-size:15px;font-weight:700;color:var(--h-color)}
.topic-tabs-hdr svg{width:13px;height:13px;stroke:var(--blue);fill:none;display:block}
.topic-tabs{display:flex;flex-wrap:wrap;gap:5px;padding:10px 12px}
.topic-tab{
  display:inline-flex;align-items:center;gap:5px;
  padding:6px 12px;border-radius:20px;
  font-size:14.5px;font-weight:600;color:var(--t-muted);
  text-decoration:none;background:var(--bg-sub);
  border:1px solid var(--bd);transition:all .13s;
}
.topic-tab:hover{background:var(--blue-lt);color:var(--blue);border-color:var(--blue-bd)}
.topic-tab.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.tt-count{font-size:12px;font-weight:700;background:rgba(0,0,0,.07);color:inherit;padding:1px 5px;border-radius:20px}
.topic-tab.active .tt-count{background:rgba(255,255,255,.2)}
.filter-bar{background:var(--bg-card);border:1px solid var(--bd);border-radius:var(--r-lg);padding:10px 14px;margin-bottom:12px}
.filter-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.filter-label{font-size:13px;font-weight:700;color:var(--t-faint);text-transform:uppercase;letter-spacing:.06em;margin-right:4px;flex-shrink:0}
.filter-chip{
  display:inline-flex;align-items:center;padding:5px 11px;border-radius:20px;
  font-size:14px;font-weight:600;color:var(--t-muted);
  background:var(--bg-sub);border:1px solid var(--bd);
  text-decoration:none;transition:all .13s;cursor:pointer;
}
.filter-chip:hover,.filter-chip.active{background:var(--blue);color:#fff;border-color:var(--blue)}

.cat-page-hdr{background:var(--bg-card);border:1px solid var(--bd);border-radius:var(--r-lg);padding:18px;margin-bottom:12px}
.cat-page-hdr-inner{display:flex;align-items:flex-start;gap:13px}
.cat-page-icon{width:48px;height:48px;min-width:48px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.cat-page-icon svg{width:24px;height:24px;stroke:currentColor;fill:none;display:block}
.cat-page-name{font-size:21px;font-weight:700;color:var(--h-color);letter-spacing:-.02em;margin-bottom:3px}
.cat-page-desc{font-size:15px;color:var(--t-muted);line-height:1.55;margin-bottom:8px}
.cat-page-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap}

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
.pagination{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;margin-top:20px;padding-top:18px;border-top:1px solid var(--bd)}
.page-btn{
  display:flex;align-items:center;justify-content:center;
  min-width:34px;height:34px;padding:0 8px;
  border:1px solid var(--bd);border-radius:var(--r-sm);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;font-size:14.5px;font-weight:600;
  color:var(--t-muted);text-decoration:none;background:var(--bg-card);
  transition:all .13s;
}
.page-btn:hover{border-color:var(--bd-hover);color:var(--h-color);background:var(--bg-sub)}
.page-btn.current{background:var(--blue);border-color:var(--blue);color:#fff}
.page-btn.disabled{opacity:.4;pointer-events:none}
.page-btn svg{width:13px;height:13px;stroke:currentColor;fill:none;display:block}

/* ═══════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════ */
.empty-state{
  background:var(--bg-card);border:1px dashed var(--bd);
  border-radius:var(--r-xl);padding:48px 24px;text-align:center;
}
.empty-state svg{width:44px;height:44px;stroke:var(--t-faint);fill:none;margin:0 auto 14px}
.empty-state h3{font-size:18px;font-weight:700;color:var(--h-color);margin-bottom:7px}
.empty-state p{font-size:15.5px;color:var(--t-muted);margin-bottom:18px;line-height:1.6}

/* ═══════════════════════════════════════════
   PROFILE / DASHBOARD
═══════════════════════════════════════════ */
.dash{display:grid;grid-template-columns:1fr;gap:18px;align-items:start}
@media(min-width:900px){.dash{grid-template-columns:220px 1fr}}
.dash-sidebar{background:var(--bg-card);border:1px solid var(--bd);border-radius:var(--r-xl);overflow:hidden;position:sticky;top:110px}
@media(max-width:899px){.dash-sidebar{position:static}}
.dash-avatar{background:linear-gradient(135deg,var(--navy),#1e3a8a);padding:20px;text-align:center}
.dash-av-circle{width:56px;height:56px;border-radius:50%;background:rgba(255,255,255,.12);border:2px solid rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;margin:0 auto 10px;font-size:22px;font-weight:800;color:#fff}
.dash-name{font-size:18px;font-weight:700;color:#fff;letter-spacing:-.01em}
.dash-email{font-size:13.5px;color:rgba(255,255,255,.45);margin-top:2px}
.dash-joined{font-size:13px;color:rgba(255,255,255,.3);margin-top:3px}
.dash-nav{display:flex;flex-direction:column;padding:6px}
@media(max-width:899px){.dash-nav{flex-direction:row;overflow-x:auto;padding:6px 6px}}
.dash-navlink{
  display:flex;align-items:center;gap:9px;
  padding:9px 12px;border-radius:var(--r);
  font-size:15px;font-weight:600;color:var(--t-muted);
  text-decoration:none;border:none;background:none;cursor:pointer;
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;width:100%;text-align:left;
  transition:all .1s;white-space:nowrap;
}
.dash-navlink svg{width:14px;height:14px;stroke:currentColor;fill:none;display:block;flex-shrink:0}
.dash-navlink:hover{background:var(--bg-sub);color:var(--h-color)}
.dash-navlink.active{background:var(--blue-lt);color:var(--blue)}
.dash-navlink.active svg{stroke:var(--blue)}
.nav-badge{margin-left:auto;font-size:12px;font-weight:700;background:var(--blue);color:#fff;padding:2px 7px;border-radius:20px;flex-shrink:0}
.dash-section{display:none}
.dash-section.active{display:block}

/* Form fields */
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
.field label{font-size:14.5px;font-weight:600;color:var(--h-color)}
.field input,.field select{
  padding:9px 12px;border:1px solid var(--bd);border-radius:var(--r);
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;font-size:15.5px;color:var(--h-color);background:var(--bg-card);
  outline:none;transition:border-color .15s,box-shadow .15s;
}
.field input:focus,.field select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.form-grid{display:grid;gap:12px}
@media(min-width:640px){.form-grid{grid-template-columns:1fr 1fr}}
.pw-bar-wrap{height:3px;background:var(--bd);border-radius:4px;margin-top:5px;overflow:hidden}
#pwBar{height:100%;border-radius:4px;width:0;transition:all .3s}

/* Info grid */
.info-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:640px){.info-grid{grid-template-columns:repeat(4,1fr)}}
.info-card{background:var(--bg-sub);border-radius:var(--r);padding:11px 13px;border:1px solid var(--bd)}
.info-card-label{font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--t-faint);margin-bottom:4px}
.info-card-value{font-size:18px;font-weight:700;color:var(--h-color);line-height:1.2}

/* Bookmark card */
.bm-card{background:var(--bg-card);border:1px solid var(--bd);border-radius:var(--r-lg);overflow:hidden}
.bm-cat-hdr{padding:9px 13px;background:var(--bg-sub);border-bottom:1px solid var(--bd);display:flex;align-items:center;gap:7px}
.bm-cat-hdr span{font-size:15px;font-weight:700;color:var(--h-color);flex:1}
.bm-q-item{padding:11px 13px;border-bottom:1px solid var(--bd);display:flex;gap:9px;align-items:flex-start}
.bm-q-item:last-child{border-bottom:none}
.bm-q-text{font-size:15px;color:var(--t-color);line-height:1.55;flex:1;font-weight:500}
.bm-q-remove{background:none;border:none;cursor:pointer;color:var(--t-faint);padding:3px;border-radius:5px;transition:all .1s;flex-shrink:0}
.bm-q-remove:hover{color:var(--red);background:var(--red-lt)}
.bm-q-remove svg{width:13px;height:13px;stroke:currentColor;fill:none;display:block}

/* Test result row */
.test-result-row{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--bd);transition:background .1s}
.test-result-row:last-child{border-bottom:none}
.test-result-row:hover{background:var(--bg-sub)}
.tr-score{width:38px;height:38px;min-width:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13.5px;font-weight:800;font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;flex-shrink:0}

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.toast{
  position:fixed;bottom:76px;left:50%;transform:translateX(-50%) translateY(10px);
  background:var(--navy);color:#fff;
  padding:9px 18px;border-radius:20px;
  font-size:15px;font-weight:600;
  box-shadow:var(--sh-lg);
  opacity:0;transition:all .25s;
  pointer-events:none;z-index:9999;white-space:nowrap;
}
@media(min-width:1024px){.toast{bottom:24px}}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast.ok{border-left:3px solid var(--green)}
.toast.er{border-left:3px solid var(--red)}

/* ═══════════════════════════════════════════
   AD PLACEHOLDERS
═══════════════════════════════════════════ */
.ad-ph{
  background:var(--bg-card);border:1px dashed var(--bd);
  border-radius:var(--r-md);display:flex;align-items:center;justify-content:center;
  color:var(--t-faint);font-size:14px;font-weight:500;gap:5px;
  overflow:hidden;
}
.ad-ph svg{width:13px;height:13px;stroke:currentColor;fill:none;display:block}
.ad-ph-banner{height:90px;margin-bottom:16px}
.ad-ph-rect{height:250px}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer{background:var(--navy);color:rgba(255,255,255,.45);padding:36px 0 20px;margin-top:auto}
.footer-grid{display:grid;grid-template-columns:1fr;gap:28px;margin-bottom:28px}
@media(min-width:640px){.footer-grid{grid-template-columns:1fr 1fr}}
@media(min-width:1024px){.footer-grid{grid-template-columns:2fr 1fr 1fr 1fr}}
.footer-brand .logo-name{color:#fff;font-size:18px}
.footer-brand .logo-tag{color:rgba(255,255,255,.3)}
.footer-desc{font-size:15px;line-height:1.7;margin-top:10px;color:rgba(255,255,255,.38);max-width:260px}
.footer-col h4{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.3);margin-bottom:12px}
.footer-col a{display:block;font-size:15px;font-weight:500;color:rgba(255,255,255,.45);text-decoration:none;margin-bottom:8px;transition:color .12s}
.footer-col a:hover{color:#fff}
.footer-bottom{border-top:1px solid rgba(255,255,255,.07);padding-top:18px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.footer-bottom-left{font-size:14px;color:rgba(255,255,255,.25)}
.footer-bottom-right{display:flex;gap:14px}
.footer-bottom-right a{font-size:14px;color:rgba(255,255,255,.25);text-decoration:none;transition:color .12s}
.footer-bottom-right a:hover{color:var(--green)}

/* ═══════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════ */
.text-muted{color:var(--t-muted)}
.text-faint{color:var(--t-faint)}
.text-green{color:var(--green-dk)}
.text-blue{color:var(--blue)}
.text-saffron{color:var(--saffron)}
.fw-700{font-weight:700}.fw-800{font-weight:800}
.hidden{display:none !important}
.gap-8{gap:8px}.gap-10{gap:10px}.gap-12{gap:12px}
.rounded{border-radius:var(--r)}.rounded-lg{border-radius:var(--r-lg)}.rounded-full{border-radius:9999px}

/* ═══════════════════════════════════════════
   CHAT WIDGET
═══════════════════════════════════════════ */
#chatBtn{
  position:fixed;bottom:20px;right:20px;
  width:48px;height:48px;
  background:var(--blue);
  border:none;border-radius:50%;cursor:pointer;
  box-shadow:0 4px 16px rgba(37,99,235,.35);z-index:800;
  display:flex;align-items:center;justify-content:center;
  transition:all .22s;
}
@media(max-width:1023px){#chatBtn{bottom:55px}}
@media(min-width:1024px){#chatBtn{bottom:20px;right:24px;width:52px;height:52px}}
#chatBtn:hover{transform:scale(1.08);box-shadow:0 6px 24px rgba(37,99,235,.45)}
#chatBubble{
  position:fixed;bottom:76px;right:16px;
  width:calc(100vw - 24px);max-width:330px;
  background:var(--bg-card);border-radius:16px;
  box-shadow:var(--sh-lg);z-index:799;
  display:none;flex-direction:column;overflow:hidden;
  border:1px solid var(--bd);max-height:500px;
}
@media(min-width:1024px){#chatBubble{bottom:84px;right:24px}}
#chatBubble.open{display:flex}

/* ═══════════════════════════════════════════
   BADGES & PILLS
═══════════════════════════════════════════ */
.badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:20px;font-size:13px;font-weight:600;gap:4px}
.badge-green{background:var(--green-lt);color:#027a48;border:1px solid var(--green-bd)}
.badge-blue{background:var(--blue-lt);color:var(--blue-dk);border:1px solid var(--blue-bd)}
.badge-amber{background:var(--saffron-lt);color:#b54708;border:1px solid #fde68a}
.badge-red{background:var(--red-lt);color:#b42318;border:1px solid #fecdc9}
.badge-gray{background:var(--bg-sub);color:var(--t-muted);border:1px solid var(--bd)}
.free-badge{display:inline-flex;align-items:center;background:var(--green-lt);color:var(--green-dk);font-size:11.5px;font-weight:700;padding:1px 5px;border-radius:20px;letter-spacing:.03em;flex-shrink:0;border:1px solid var(--green-bd)}

/* PYQ NEW badge animation */
@keyframes pyqPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.12);opacity:.85}}
@media(max-width:400px){.logo-text{display:none}}
@media(max-width:480px){.exc-grid{grid-template-columns:1fr !important}}


.math-inline .katex { font-size: 1em; }
.math-display  { display: block; text-align: center; margin: 8px 0; }
.math-display .katex-display { margin: 0; }

/* KaTeX font size fix */
.qexp-body .katex { font-size: 1em !important; }

/* ═══════════════════════════════════════════
   EXPLANATION — Paper / Textbook Style
   Pure white, clean spacing, IndiaBix feel
═══════════════════════════════════════════ */

.qexp-box {
  margin-top: 14px;
  padding: 20px 22px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.qexp-label {
  font-size: 14px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 16px;
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.qexp-body {
  font-size: 15px;
  color: #1e293b;
  line-height: 1.9;
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;
}

/* Intro line */
.exp-rendered .exp-intro {
  margin: 0 0 16px;
  font-size: 15px;
  color: #475569;
  line-height: 1.8;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

/* Step heading */
.exp-rendered .exp-step-head {
  margin: 16px 0 4px;
  font-size: 15px;
  color: #0f172a;
  line-height: 1.6;
}
.exp-rendered .exp-step-head strong {
  font-weight: 700;
  color: #0f172a;
}

/* Plain line under step */
.exp-rendered .exp-para {
  margin: 2px 0 0 0;
  font-size: 15px;
  color: #334155;
  line-height: 1.85;
  padding-left: 14px;
}

/* Display math block */
.exp-rendered .exp-math-display {
  text-align: center;
  margin: 10px auto;
  padding: 10px 0;
  font-size: 16px;
  color: #0f172a;
  overflow-x: auto;
  border-top: 1px dashed #e2e8f0;
  border-bottom: 1px dashed #e2e8f0;
}

/* Final answer */
.exp-rendered .exp-final-line {
  margin: 18px 0 0;
  padding: 10px 14px;
  font-size: 15px;
  color: #0f172a;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  border-radius: 0 6px 6px 0;
}
.exp-rendered .exp-final-line strong {
  font-weight: 700;
}

/* KaTeX */
.qexp-body .katex { font-size: 1.05em; }
.exp-math-display .katex-display { margin: 0; }

/* Step inline formula */
.exp-rendered .exp-step-formula {
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;
  color: #1e3a8a;
  font-size: 15px;
}

/* Step spacing divider */
.exp-rendered .exp-step-head + .exp-step-head {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

/* Inter — Secondary font for numbers, math, code */
code, pre, .math-display, .exp-formula, .exp-rendered .exp-formula-line,
.q-num, .stat-card-val, .pagination .pg-link {
  font-family: 'DM Sans', 'Inter', 'Roboto', 'Urbanist', sans-serif;
}

/* ══════════════════════════════════════════
   CATEGORY PAGE — 2-Column Layout
   Left: Sidebar (Topics + Difficulty)
   Right: Questions
══════════════════════════════════════════ */
.cat-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 16px;
  min-width: 0;
  overflow: hidden;
}
@media(min-width: 900px) {
  .cat-2col {
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }
}

/* ── Sidebar ── */
.cat-sidebar {
  position: sticky;
  top: 0;
}
@media(max-width: 899px) {
  .cat-sidebar { position: static; }
}

/* Topic tabs in sidebar — vertical */
.cat-sidebar .topic-tabs-wrap {
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.cat-sidebar .topic-tabs-hdr {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--bd);
  font-size: 13px;
  font-weight: 700;
  color: var(--h-color);
}
.cat-sidebar .topic-tabs-hdr h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--h-color);
  margin: 0;
  padding: 0;
  line-height: 1;
  display: inline;
}
.cat-sidebar .topic-tabs {
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 2px;
}
.cat-sidebar .topic-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--t-color);
  text-decoration: none;
  transition: all .12s;
  border: 1px solid transparent;
}
.cat-sidebar .topic-tab:hover {
  background: var(--bg-sub);
  color: var(--h-color);
}
.cat-sidebar .topic-tab.active {
  background: var(--blue);
  color: #fff !important;
  font-weight: 700;
  border-color: var(--blue);
}
.cat-sidebar .tt-count {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--bg-sub);
  border: 1px solid var(--bd);
  padding: 1px 7px;
  border-radius: 20px;
  color: var(--t-muted);
  flex-shrink: 0;
}
.cat-sidebar .topic-tab.active .tt-count {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}

/* Difficulty filter in sidebar — vertical */
.cat-sidebar .filter-bar {
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 0;
}
.cat-sidebar .filter-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
}
.cat-sidebar .filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--h-color);
  padding: 8px 10px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-sidebar .filter-chip {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .12s;
  color: var(--t-color);
}
.cat-sidebar .filter-chip:hover {
  background: var(--bg-sub);
}
.cat-sidebar .filter-chip.active {
  background: var(--blue-lt);
  color: var(--blue);
  border-color: var(--blue-bd);
}

/* Difficulty dot indicator */
.diff-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}

/* Easy active */
.cat-sidebar .topic-tab.diff-easy-active {
  background: #f0fdf4; color: #16a34a;
  border-color: #bbf7d0;
}
/* Medium active */
.cat-sidebar .topic-tab.diff-medium-active {
  background: #fefce8; color: #b45309;
  border-color: #fde68a;
}
/* Hard active */
.cat-sidebar .topic-tab.diff-hard-active {
  background: #fef2f2; color: #dc2626;
  border-color: #fecaca;
}
/* Hover colors for diff tabs */
.cat-sidebar .topic-tab.diff-easy:hover   { background:#f0fdf4; color:#16a34a; }
.cat-sidebar .topic-tab.diff-medium:hover { background:#fefce8; color:#b45309; }
.cat-sidebar .topic-tab.diff-hard:hover   { background:#fef2f2; color:#dc2626; }

/* ════════════════════════════════════
   3-COLUMN LAYOUT — shared across pages
════════════════════════════════════ */
.home-3col{display:grid;grid-template-columns:1fr;gap:16px;margin-top:16px}
@media(min-width:1100px){.home-3col{grid-template-columns:300px 1fr 300px;gap:35px;align-items:start}}
.home-leftnav{display:none}
@media(min-width:1100px){.home-leftnav{display:block;position:sticky;top:0;background:var(--bg-card);overflow:hidden;margin-left:-40px;margin-top:-62px;border-right:1px solid #e8e8ed}}
.home-rightnav{display:none}
@media(min-width:1100px){.home-rightnav{display:block;position:sticky;top:0}}
.home-center{min-width:0}
.leftnav-section{background:none;border:none;border-bottom:1px solid var(--bd);border-radius:0;overflow:hidden;margin:0;padding-top:30px}
.leftnav-section:last-child{border-bottom:none}
.leftnav-hdr{padding:25px 25px 12px;background:none;display:flex;align-items:center;gap:10px;margin-top:0}
.leftnav-hdr h2,.leftnav-hdr h3{font-size:22px;font-weight:800;color:#0f172a;margin:0;letter-spacing:-.02em;flex:1;line-height:1.2}
.leftnav-hdr svg{width:20px;height:20px;flex-shrink:0}
.leftnav-link{display:flex;align-items:center;gap:10px;padding:10px 16px;font-size:14.5px;font-weight:500;color:var(--t-color);text-decoration:none;border-bottom:1px solid #f9f9f9c7;transition:background .1s}
.leftnav-link:last-child{border:none}
.leftnav-link:hover{background:var(--bg-sub);color:var(--blue)}
.leftnav-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.leftnav-count{margin-left:auto;font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:10px;background:var(--bg-sub);color:var(--t-faint);border:1px solid var(--bd)}
