:root{--brand:#1f3a68}.bg-brand{background:var(--brand)}body{background:#f6f8fb}
.hero{background:linear-gradient(135deg,#1f3a68,#3b6db3);color:#fff;border-radius:1rem}
.card{border:0;box-shadow:0 2px 10px rgba(0,0,0,.06);border-radius:.8rem}.feature-icon{font-size:2rem;color:var(--brand)}
.locked{filter:blur(4px);user-select:none;pointer-events:none}.note-body{font-size:1.05rem;line-height:1.7}
.badge-sub{background:#e8eefb;color:var(--brand)}.q-opt{cursor:pointer}.timer{font-size:1.4rem;font-weight:700}
@media print{.no-print{display:none!important}body{background:#fff}.card{box-shadow:none}}
.text-brand{color:var(--brand)}.box-revision,.box-tip,.box-example{border-radius:.6rem;padding:.9rem 1.1rem;margin:1rem 0}
.box-revision{background:#fff8e1;border-left:5px solid #f0ad4e}.box-tip{background:#e8f5e9;border-left:5px solid #28a745}.box-example{background:#e8eefb;border-left:5px solid #3b6db3}
.box-revision p,.box-tip p,.box-example p{margin-bottom:.3rem}.diagram{max-width:680px;background:#fff}.lesson-nav a{max-width:48%}
.progress-thin{height:8px}.lesson-list .list-group-item{padding:.55rem .9rem}

/* ---- v3: lesson figures, lightbox, motion, landing pages ---- */
.lesson-figure{margin:1.5rem auto;max-width:860px;text-align:center}
.lesson-figure a.lightbox{display:block;position:relative;border-radius:.6rem;overflow:hidden;background:#f6f7fb;box-shadow:0 1px 3px rgba(0,0,0,.08);transition:transform .25s ease,box-shadow .25s ease;cursor:zoom-in}
.lesson-figure a.lightbox:hover,.lesson-figure a.lightbox:focus-visible{transform:translateY(-4px);box-shadow:0 12px 28px rgba(0,0,0,.16)}
.lesson-figure img{width:100%;height:auto;display:block}
.lesson-figure .zoom-hint{position:absolute;right:.6rem;bottom:.6rem;background:rgba(0,0,0,.55);color:#fff;border-radius:50%;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s}
.lesson-figure a.lightbox:hover .zoom-hint,.lesson-figure a.lightbox:focus-visible .zoom-hint{opacity:1}
.lesson-figure figcaption{font-size:.85rem;color:#5c6370;margin-top:.5rem;line-height:1.4}
.figure-grid .lesson-figure{margin:0}.figure-grid figcaption{font-size:.78rem}
.js .reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s ease}
.js .reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.js .reveal{opacity:1;transform:none;transition:none}.lift,.lift-sm,.lesson-figure a.lightbox{transition:none}}
.lift,.lift-sm{transition:transform .2s ease,box-shadow .2s ease}
.lift:hover{transform:translateY(-4px);box-shadow:0 10px 24px rgba(0,0,0,.12)}
.lift-sm:hover{transform:translateY(-2px);box-shadow:0 6px 14px rgba(0,0,0,.08)}
.lb{position:fixed;inset:0;z-index:2000;background:rgba(10,12,20,.92);display:flex;align-items:center;justify-content:center}
.lb[hidden]{display:none}
.lb-stage{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:3rem 4rem 4.5rem}
.lb-stage img{max-width:100%;max-height:100%;transition:transform .15s ease;cursor:zoom-in;touch-action:none;user-select:none}
.lb.zoomed .lb-stage img{cursor:grab}
.lb button{background:none;border:0;color:#fff;font-size:2.2rem;line-height:1;position:absolute;opacity:.85;padding:.4rem .8rem}
.lb button:hover,.lb button:focus-visible{opacity:1;outline:2px solid #ffc107;border-radius:.3rem}
.lb-close{top:.5rem;right:.8rem}.lb-prev{left:.5rem;top:50%;transform:translateY(-50%)}.lb-next{right:.5rem;top:50%;transform:translateY(-50%)}
.lb-bar{position:absolute;left:0;right:0;bottom:0;padding:.7rem 1rem;color:#e9ecef;font-size:.9rem;display:flex;justify-content:space-between;gap:1rem;background:linear-gradient(transparent,rgba(0,0,0,.6))}
.lb-bar .lb-zoom{position:static;font-size:1.2rem;padding:0 .4rem}.lb-bar a{color:#ffc107}
.cta-box{background:linear-gradient(135deg,#1f3c88,#3a1c71);color:#fff;border-radius:1rem}
.toc a{text-decoration:none}.toc li{margin-bottom:.2rem}
.note-body h2[id]{scroll-margin-top:80px}
.revision-attached .note-body{font-size:.92rem}
.revision-card{margin:0}
.print-only{display:none}
@media print{
  .lb,.cta-box,aside,.breadcrumb,.zoom-hint{display:none!important}
  .reveal{opacity:1!important;transform:none!important}
  .print-only{display:block}
  .revision-sheet{border:0;font-size:11pt}.revision-sheet .card-body{padding:0!important}
  .lesson-figure{page-break-inside:avoid;max-width:16cm}
  .col-lg-9{width:100%!important;flex:0 0 100%!important;max-width:100%!important}
}

.box-formula,.box-trap,.box-solution,.box-answer{border-radius:.6rem;padding:.9rem 1.1rem;margin:1rem 0}
.box-formula{background:#f3eefc;border-left:5px solid #7b4fc9;font-variant-numeric:tabular-nums}.box-trap{background:#fdecea;border-left:5px solid #d9534f}
.box-solution{background:#f4f8f4;border-left:5px solid #5cb85c}.box-answer{background:#f7f7f7;border-left:5px solid #6c757d}
.box-formula p,.box-trap p,.box-solution p,.box-answer p{margin-bottom:.3rem}.opts{font-size:.95em;color:#334}
/* responsive content images (CA timeline/maps on phones) */
.ca-content img,article img,.card-body img,img.diagram{max-width:100%!important;height:auto!important}
.ca-content,article,.card-body{overflow-wrap:anywhere;min-width:0}
/* ---------- Student panel (dashboard.php) ---------- */
.sp-wrap{display:flex;gap:1.25rem;align-items:flex-start}
.sp-side{flex:0 0 240px;position:sticky;top:80px;background:#fff;border:1px solid #e6e9f0;border-radius:.9rem;padding:.75rem;box-shadow:0 1px 3px rgba(20,30,60,.05)}
.sp-user{align-items:center;gap:.6rem;padding:.4rem .4rem .8rem;border-bottom:1px solid #eef0f5;margin-bottom:.5rem}
.sp-avatar{width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#3b6db3,#6a4fc9);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.1rem;flex:0 0 42px}
.min-w-0{min-width:0}
.sp-nav a{display:flex;align-items:center;gap:.55rem;padding:.5rem .65rem;border-radius:.55rem;color:#3a4256;text-decoration:none;font-size:.92rem}
.sp-nav a:hover{background:#f2f5fb;color:#1f3f75}.sp-nav a.active{background:#3b6db3;color:#fff}.sp-nav a.active .badge{background:#fff!important}
.sp-main{flex:1;min-width:0}
.sp-hero{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;background:linear-gradient(120deg,#26467f,#3b6db3 60%,#5d6fd6);color:#fff;border-radius:.9rem;padding:1.1rem 1.3rem}
.sp-streak{background:rgba(255,255,255,.15);border-radius:.7rem;padding:.45rem .9rem;font-size:1.1rem;display:flex;align-items:center;gap:.35rem}.sp-streak .bi{color:#ffb347}.sp-streak small{opacity:.8;font-size:.75rem;margin-left:.3rem}
.sp-stat{background:#fff;border:1px solid #e6e9f0;border-radius:.9rem;padding:.9rem 1rem;height:100%;position:relative;box-shadow:0 1px 3px rgba(20,30,60,.05)}
.sp-stat>.bi{position:absolute;right:.9rem;top:.8rem;font-size:1.5rem;opacity:.85}.sp-stat .n{font-size:1.6rem;font-weight:700;line-height:1.2}.sp-stat .n small{font-size:.9rem;color:#8a93a6;font-weight:500}
.sp-card{border:1px solid #e6e9f0;border-radius:.9rem;box-shadow:0 1px 3px rgba(20,30,60,.05)}
.sp-progress{height:.5rem;border-radius:1rem;background:#eef1f6}
.sp-mod{border:1px solid #eef0f5;border-radius:.6rem;padding:.5rem .65rem}
.sp-chart{width:100%;height:auto;display:block}
.sp-empty .bi{font-size:2rem;color:#b5bccb;display:block;margin-bottom:.3rem}
.sp-table .sp-tt{max-width:360px}
.sp-plan-ico{width:52px;height:52px;border-radius:.8rem;background:#fff4dc;color:#c98a00;display:flex;align-items:center;justify-content:center;font-size:1.5rem}
@media (max-width:991.98px){
  .sp-wrap{flex-direction:column;gap:.75rem;align-items:stretch}.sp-main{width:100%}.sp-side{position:static;flex:none;width:100%;padding:.4rem}
  .sp-nav{display:flex;overflow-x:auto;gap:.25rem;scrollbar-width:none}.sp-nav::-webkit-scrollbar{display:none}
  .sp-nav a{white-space:nowrap;flex:0 0 auto;font-size:.85rem;padding:.45rem .7rem}
  .sp-table .sp-tt{max-width:170px}.sp-stat .n{font-size:1.3rem}
}
@media (max-width:575.98px){.sp-stat>.bi{display:none}.sp-stat{padding:.75rem .8rem}}

/* UPSCPrep.in branding */
.navbar .nav-link{white-space:nowrap}.navbar-brand img{height:40px;width:auto}@media (min-width:992px) and (max-width:1399.98px){.navbar-brand img{height:30px!important}.navbar .nav-link{padding-left:.45rem!important;padding-right:.45rem!important;font-size:.95rem}}
:root{--bs-link-color:#0a5cf0;--bs-link-color-rgb:10,92,240;--bs-primary:#0a5cf0;--bs-primary-rgb:10,92,240}.btn-primary{--bs-btn-bg:#0a5cf0;--bs-btn-border-color:#0a5cf0;--bs-btn-hover-bg:#084fd0;--bs-btn-hover-border-color:#084fd0}
/* v31 mobile audit fixes */
footer nav{display:flex;flex-wrap:wrap;min-width:0;max-width:100%;row-gap:.25rem}
@media (pointer:coarse){
 footer nav a{display:inline-flex;align-items:center;min-height:40px}
 .btn{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:.25rem}
 .btn-sm{min-height:40px}
 a.badge{display:inline-flex;align-items:center;min-height:40px;padding:0 .7rem;font-size:.8125rem}
 .gl-az a,.gl-az span{min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center}
 .sp-nav a{min-height:40px}
}
@media (pointer:coarse){
 html body .gl-az a,html body .gl-az span{min-width:40px}
 html body .hp-chips a{min-height:40px;display:inline-flex;align-items:center}
 html body .vm-ib{width:40px;height:40px}
 html body .vm-tabs button{min-height:40px;font-size:.875rem}
 html body .btn-close{width:40px;height:40px;padding:0;background-size:.9em}
 .form-control,.form-select{min-height:40px}
}
@media (pointer:coarse){html body a[data-bm]{display:inline-flex;align-items:center;gap:.25rem;min-height:40px;padding:0 .35rem}}
/* header dropdown (Maps): brand colours, hover-open on desktop */
.navbar .dropdown-menu{border:0;border-radius:10px;box-shadow:0 8px 24px rgba(11,31,75,.18);padding:6px}.navbar .dropdown-item{border-radius:6px;color:#0b1f4b;font-weight:600}.navbar .dropdown-item:hover,.navbar .dropdown-item:focus{background:#eaf1ff;color:#0a5cf0}.navbar .dropdown-item:active{background:#0a5cf0;color:#fff}
@media(min-width:992px){.navbar .dropdown:hover>.dropdown-menu,.navbar .dropdown:focus-within>.dropdown-menu{display:block;margin-top:0}}
@media(max-width:991.98px){.navbar .dropdown-menu{box-shadow:none;background:rgba(255,255,255,.06)}.navbar .dropdown-item{color:#e5ebfa}.navbar .dropdown-item:hover,.navbar .dropdown-item:focus{background:rgba(251,191,14,.15);color:#fbbf0e}}

/* v40: keep the top nav on one line for signed-in users (Dashboard/Admin/Logout) on 1200–1799px screens; below 1200px the menu collapses */
@media (min-width:1200px) and (max-width:1799.98px){
  .navbar-expand-xl .navbar-nav .nav-link{padding-left:.4rem;padding-right:.4rem;font-size:.9rem}
  .navbar-expand-xl .navbar-nav .nav-link > .bi{display:none}
}
/* v41 nav dropdowns: open on hover/keyboard focus on desktop (click and the mobile menu use Bootstrap's toggle) */
@media (min-width:1200px){.navbar .nav-item.dropdown:hover>.dropdown-menu,.navbar .nav-item.dropdown:focus-within>.dropdown-menu{display:block;margin-top:0}.navbar .dropdown-menu{min-width:11rem}}
.navbar .dropdown-menu .dropdown-item{padding:.45rem 1rem}
/* v40 access: guest wall + premium-locked teasers */
body.acc-walled main{filter:blur(6px);pointer-events:none;user-select:none;max-height:150vh;overflow:hidden}
body.acc-walled{overflow:hidden}
.acc-wall{position:fixed;inset:0;z-index:1080;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(11,31,75,.35)}
.acc-wall-card,.acc-lock-card{background:#fff;border-radius:16px;box-shadow:0 20px 50px rgba(11,31,75,.25);padding:28px 26px;max-width:460px;width:100%;text-align:center;border-top:5px solid #fbbf0e}
.acc-lock-ic{width:52px;height:52px;border-radius:50%;background:#0b1f4b;color:#fbbf0e;display:inline-flex;align-items:center;justify-content:center;font-size:1.4rem;margin-bottom:10px}
.acc-lock{position:relative;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,#0b1f4b,#0a5cf0);min-height:380px;display:flex;align-items:center;justify-content:center;padding:24px;margin:8px 0 24px}
.acc-lock .acc-lock-card{position:relative;z-index:2;background:rgba(255,255,255,.97)}
.acc-lock-teaser{position:absolute;inset:0;opacity:.35;filter:blur(3px);pointer-events:none;overflow:hidden}
.acc-lock-teaser img{width:100%;height:100%;object-fit:cover}
.acc-mini{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border:1px dashed #fbbf0e;background:#fffbea;border-radius:10px;padding:10px 14px;margin:10px 0}
/* v40 ad slots: space is reserved up front so ads never shift the page (no CLS) */
.cms-ad{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;max-width:100%;contain:layout}
.cms-ad[data-slot=header]{min-height:100px;margin:.5rem auto 0!important}.cms-ad[data-slot=footer]{min-height:100px}
.cms-ad[data-slot=in_content]{min-height:280px;clear:both}.cms-ad-sidebar{width:300px;min-height:250px}
.bl-side .cms-ad-sidebar{display:flex!important;margin:0 auto 1rem}
@media (max-width:575.98px){.cms-ad[data-slot=header],.cms-ad[data-slot=footer]{min-height:60px}.cms-ad[data-slot=in_content]{min-height:260px}}
.ad-dummy{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:repeating-linear-gradient(135deg,#f6f8fc,#f6f8fc 10px,#eef2f9 10px,#eef2f9 20px);border:1px dashed #b8c3d9;border-radius:8px;color:#5b6b8c;font:600 .8rem/1.3 system-ui,sans-serif;text-align:center}
.ad-dummy small{font-weight:400;opacity:.8}
.ad-dummy-728{max-width:728px;height:90px}.ad-dummy-300{width:300px;height:250px}.ad-dummy-336{max-width:336px;height:280px}
@media (max-width:575.98px){.ad-dummy-728{max-width:320px;height:50px}.ad-dummy-336{max-width:300px;height:250px}}
.pr-card{border:1px solid #dfe5f1;border-radius:16px;position:relative}.pr-best{border:2px solid #fbbf0e;box-shadow:0 12px 30px rgba(11,31,75,.12)}
.pr-badge{position:absolute;top:-12px;right:18px;background:#fbbf0e;color:#0b1f4b;font-weight:700;font-size:.78rem;border-radius:999px;padding:3px 12px}
.pr-amt{font-size:2.4rem;font-weight:800;color:#0b1f4b}.pr-amt small{font-size:1rem;font-weight:500;color:#5b6b8c}
.pr-feat li{padding:4px 0}.pr-feat .bi{color:#0a5cf0;margin-right:6px}.pr-table thead th{background:#0b1f4b;color:#fff}.pr-table thead th:last-child{color:#fbbf0e}
.cms-ad-sidebar{max-width:100%}.ad-side .cms-ad-sidebar{width:100%}.ad-dummy-300{max-width:100%}

/* Forum initials avatars (v47) – no generated images */
.forum-avatar{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:50%;color:#fff;font-size:.72rem;font-weight:600;letter-spacing:.02em;flex-shrink:0;line-height:1;text-transform:uppercase}
.forum-post-meta{display:flex;align-items:center;gap:.55rem}

/* Forum v48: profiles, badges, accepted answers, tags, leaderboard */
.forum-avatar-md{width:2.75rem;height:2.75rem;font-size:.85rem}
.forum-avatar-lg{width:4.25rem;height:4.25rem;font-size:1.15rem}
img.forum-avatar{object-fit:cover;background:#0b1f4b}
.forum-user-link{font-weight:700;color:#0b1f4b;text-decoration:none}
.forum-user-link:hover{color:#0a5cf0;text-decoration:underline}
.forum-chips{display:inline-flex;flex-wrap:wrap;align-items:center;gap:.35rem .4rem;margin:.15rem 0;vertical-align:middle}
.forum-chip{display:inline-flex;align-items:center;gap:.25rem;border-radius:999px;padding:.12rem .55rem;font-size:.72rem;font-weight:600;line-height:1.35;background:#eef3fb;color:#0b1f4b;border:1px solid #d5def0;margin:0;white-space:nowrap}
.forum-chip-self{background:#fff;border-color:#c9d4ea;color:#16325c}
.forum-chip-attempt{background:var(--forum-chip-attempt-bg,#e8edf6);color:var(--forum-chip-attempt-fg,#0b1f4b);border-color:var(--forum-chip-attempt-bd,#9aa8c7)}
.forum-chip-target{background:var(--forum-chip-target-bg,#e8f0ff);color:var(--forum-chip-target-fg,#0a5cf0);border-color:var(--forum-chip-target-bd,#b6ceff)}
.forum-chip-medium{background:var(--forum-chip-medium-bg,#e6f7f3);color:var(--forum-chip-medium-fg,#0f6b5c);border-color:var(--forum-chip-medium-bd,#b7e2d8)}
.forum-chip-optional{background:var(--forum-chip-optional-bg,#fff6d6);color:var(--forum-chip-optional-fg,#0b1f4b);border-color:var(--forum-chip-optional-bd,#fbbf0e)}
.forum-chip-state{background:var(--forum-chip-state-bg,#f1f3f6);color:var(--forum-chip-state-fg,#4b5563);border-color:var(--forum-chip-state-bd,#d5d9e0)}
.forum-chip-ver{background:var(--forum-chip-verified-bg,#0b1f4b);color:var(--forum-chip-verified-fg,#fff);border-color:var(--forum-chip-verified-bd,#0b1f4b);font-weight:700}
.forum-chip-ver .bi{color:var(--forum-chip-verified-fg,#fff)}
.forum-chip-earned{background:var(--forum-chip-earned-bg,#e8f0ff);color:var(--forum-chip-earned-fg,#0a5cf0);border-color:var(--forum-chip-earned-bd,#c5d8ff)}
.forum-chip-acc{background:var(--forum-chip-accepted-bg,#fff6d6);color:var(--forum-chip-accepted-fg,#0b1f4b);border-color:var(--forum-chip-accepted-bd,#fbbf0e);font-weight:700;flex-shrink:0}
.forum-tags{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem}
a.forum-tag,label.forum-tag{display:inline-flex;align-items:center;gap:.25rem;border-radius:999px;padding:.15rem .6rem;font-size:.78rem;background:#f4f7fc;color:#0b1f4b;text-decoration:none;border:1px solid #e0e6f2}
a.forum-tag:hover,a.forum-tag.is-on{background:#0a5cf0;color:#fff;border-color:#0a5cf0}
label.forum-tag{cursor:pointer;font-weight:500}
label.forum-tag input{margin:0 .2rem 0 0}
.forum-thread-row{display:block}
.forum-thread-heading{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .5rem}
.forum-thread-title{color:#0b1f4b;text-decoration:none;min-width:0}
.forum-thread-title:hover{color:#0a5cf0}
.forum-thread-row .forum-tags{display:inline-flex;flex-wrap:wrap;gap:.3rem;margin:0}
.forum-thread-row .forum-chip-acc{pointer-events:none}

.forum-post-accepted{border:1px solid #fbbf0e;box-shadow:0 0 0 2px rgba(251,191,14,.2)}
.forum-accepted-label{color:#0b1f4b;font-weight:700;font-size:.82rem}
.forum-accepted-label .bi{color:#c99a00}
.forum-quote{display:block;border-left:3px solid #0a5cf0;padding:.25rem .7rem;background:#f5f8fd;color:#16325c;text-decoration:none;border-radius:0 6px 6px 0}
.forum-quote:hover{background:#eaf0fb}
.forum-rep{font-size:.75rem;color:#5b6b8c;font-weight:600}
.forum-stats .forum-stat,.forum-stat{background:#fff;border:1px solid #e6e9f0;border-radius:.75rem;padding:.85rem;min-height:4.4rem;box-shadow:0 1px 2px rgba(11,31,75,.05)}
.forum-stat .n{font-size:1.25rem;font-weight:700;color:#0b1f4b;line-height:1.2}
.forum-profile-head{background:#fff;border:1px solid #e6e9f0;border-radius:1rem;padding:1rem 1.1rem}
.forum-bio{max-width:42rem}
.forum-rank{width:1.6rem;height:1.6rem;border-radius:50%;background:#0b1f4b;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;flex-shrink:0}
.forum-leaders li:first-child .forum-rank{background:#fbbf0e;color:#0b1f4b}
.forum-badge-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.75rem}
.forum-badge-card{display:flex;gap:.7rem;align-items:flex-start;border:1px solid #e6e9f0;border-radius:.75rem;padding:.75rem .85rem;background:#fff}
.forum-badge-card .bi{font-size:1.25rem;color:#0a5cf0}
.forum-vote-col{min-width:2.4rem}
.forum-filters .form-select{min-width:10rem}
@media (max-width:575.98px){
  .forum-thread-row .forum-tags{display:flex;margin-left:0;margin-top:.3rem}
  .forum-post .card-body{padding:.85rem}
  .forum-profile-head{padding:.85rem}
  .forum-filters .form-select{min-width:100%}
}

.forum-chip-more{background:#fff;color:var(--forum-chip-earned-fg,#0a5cf0);border-color:var(--forum-chip-earned-bd,#c5d8ff);text-decoration:none;font-weight:700}
.forum-chip-more:hover{background:var(--forum-chip-earned-fg,#0a5cf0);color:#fff;border-color:var(--forum-chip-earned-fg,#0a5cf0)}
