/* BUILD: 20260723-1659 */
/* =====================================================================
   edu.css — ExamGuru EduPanel frontend. Custom, no framework.
   Navy #0F2557 · Saffron #FF7A18 — matches the admin panel brand.
   Deploy: copy to /opt/examguru/static/edu.css (actix serves from there).
   ===================================================================== */
:root {
  --navy: #0F2557; --navy-2: #1a3a7d; --saffron: #FF7A18; --saffron-2: #e56a0f;
  --ink: #1e293b; --muted: #64748b; --line: #e2e8f0; --bg: #f6f8fb;
  --white: #fff; --green: #16a34a; --red: #dc2626; --gold: #fbbf24;
  --radius: 12px; --shadow: 0 2px 10px rgba(15, 37, 87, .07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); }
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--saffron); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 18px; }

/* ── Header ── */
.topbar { background: var(--navy); position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.topbar-in { display: flex; align-items: center; gap: 20px; min-height: 62px; flex-wrap: wrap; }
.logo { font-size: 24px; font-weight: 800; color: var(--white); letter-spacing: -.5px; }
.logo span { color: var(--saffron); }
.mainnav { display: flex; gap: 2px; align-items: center; flex: 1 1 auto;
  flex-wrap: wrap; min-width: 0; }
.mainnav a { color: #dbe4f5; padding: 8px 10px; border-radius: 8px; font-weight: 500;
  font-size: 14.5px; white-space: nowrap; }
.mainnav a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.nav-premium { color: var(--gold) !important; font-weight: 700 !important; }
.nav-login, .nav-user { background: var(--saffron); color: var(--white) !important; }
.nav-login:hover, .nav-user:hover { background: var(--saffron-2) !important; }
.topsearch { display: flex; }
.topsearch input { border: 0; border-radius: 8px 0 0 8px; padding: 9px 12px; width: 180px;
  max-width: 40vw; font-size: 14px; outline: none; }
.topsearch button { border: 0; background: var(--saffron); color: #fff;
  border-radius: 0 8px 8px 0; padding: 0 13px; cursor: pointer; }
.navtoggle, .hamburger { display: none; }

/* ── Buttons, chips ── */
.btn { display: inline-block; padding: 10px 22px; border-radius: 9px; font-weight: 700;
  border: 0; cursor: pointer; font-size: 15px; transition: all .15s; }
.btn-saffron { background: var(--saffron); color: #fff !important; }
.btn-saffron:hover { background: var(--saffron-2); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff !important; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy) !important; border: 2px solid var(--navy); }
/* Ghost button on a dark background (page headers, hero strips). */
.btn-ghost-light { background: transparent; color: #fff !important;
  border: 2px solid rgba(255,255,255,.65); }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); border-color: #fff;
  color: #fff !important; }
.btn-big { padding: 14px 34px; font-size: 17px; }
.chip { display: inline-block; background: #eef2ff; color: var(--navy-2); font-size: 11px;
  font-weight: 800; letter-spacing: .4px; padding: 3px 9px; border-radius: 20px; margin-bottom: 8px; }
.chip-live { background: var(--saffron); color: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.lock { color: var(--saffron-2); font-weight: 700; font-size: 13px; }
.free { color: var(--green); font-weight: 800; font-size: 12px; }
.meta { color: var(--muted); font-size: 13.5px; }
.empty { color: var(--muted); padding: 22px 0; }

/* ── Banner slider (CSS scroll-snap) ── */
.banners { margin-bottom: 8px; }
.slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; }
.slider::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slide img { width: 100%; max-height: 340px; object-fit: cover; }

/* ── Hero ── */
.hero { text-align: center; padding: 48px 18px 36px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); color: var(--navy); line-height: 1.15; }
.hero h1 em { color: var(--saffron); font-style: normal; }
.hero p { max-width: 620px; margin: 14px auto 22px; color: var(--muted); font-size: 17px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; margin-top: 34px; }
.statgrid > div { background: #fff; border-radius: var(--radius); padding: 16px 10px;
  box-shadow: var(--shadow); text-align: center; }
.statgrid b { display: block; font-size: 26px; color: var(--navy); }
.statgrid span { color: var(--muted); font-size: 13px; }
.statgrid span a { color: var(--saffron); font-weight: 700; }

/* ── Sections ── */
.sect { color: var(--navy); font-size: 22px; margin: 34px 0 14px; }
.card > .sect:first-child, .sidebox > .sect:first-child { margin-top: 0; }
.statgrid + .sect, .quicklinks + .sect { margin-top: 28px; }
.secthead { display: flex; justify-content: space-between; align-items: baseline; }
.secthead a { font-weight: 700; font-size: 14px; }

/* ── Daily quiz strip ── */
.dailyquiz { background: linear-gradient(100deg, var(--navy), var(--navy-2)); color: #fff;
  border-radius: var(--radius); padding: 24px 28px; display: flex; align-items: center;
  justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
.dailyquiz h2 { font-size: 22px; margin: 6px 0 2px; }
.dailyquiz p { color: #c6d2ec; font-size: 14px; }

/* ── Grids & cards ── */
.classgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.classcard { background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  text-align: center; padding: 18px 8px; font-size: 17px; color: var(--navy); transition: all .15s; }
.classcard:hover { border-color: var(--saffron); transform: translateY(-2px); box-shadow: var(--shadow); }
.examgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.examcard { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff;
  border-radius: var(--radius); padding: 22px; }
.examcard b { font-size: 21px; display: block; }
.examcard span { color: #c6d2ec; font-size: 13px; }
.examcard:hover { transform: translateY(-2px); color: #fff; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  transition: all .15s; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,37,87,.13); color: var(--ink); }
.card h3 { font-size: 16.5px; color: var(--navy); line-height: 1.35; }
.cardimg { border-radius: 8px; margin-bottom: 8px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.subjcard h3 { font-size: 19px; }
.listgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.listrow { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px;
  color: var(--ink); font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.listrow:hover { border-color: var(--saffron); color: var(--navy); }
.listrow .chip { margin: 0; }

/* ── Page head, crumbs ── */
.pagehead { background: linear-gradient(100deg, var(--navy), var(--navy-2)); color: #fff;
  padding: 34px 0 30px; }
.pagehead h1 { font-size: clamp(24px, 4vw, 34px); }
.pagehead p { color: #c6d2ec; margin-top: 6px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pagehead .crumbs, .pagehead .crumbs a { color: #9db1d8; }

/* ── Topic layout ── */
.topicgrid { display: grid; grid-template-columns: 1fr 300px; gap: 26px; padding-top: 8px; }
.sidebox { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  position: sticky; top: 80px; }
.sidebox h3 { color: var(--navy); margin-bottom: 10px; }
.quizrow { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; color: var(--ink); }
.quizrow:hover { border-color: var(--saffron); }
.quizrow span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; margin-bottom: 9px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.faq-a { padding-top: 10px; color: var(--ink); }
.doubtform textarea, .doubtform input { width: 100%; border: 2px solid var(--line);
  border-radius: 9px; padding: 11px 13px; font: inherit; margin-bottom: 10px; }
.doubtform textarea { min-height: 90px; }
.doubtform textarea:focus, .doubtform input:focus { border-color: var(--saffron); outline: none; }
.formmsg { color: var(--green); font-weight: 600; margin-top: 8px; }
.formerr { background: #fef2f2; color: var(--red); border: 1px solid #fecaca;
  border-radius: 9px; padding: 10px 14px; margin-bottom: 14px; }

/* ── Article ── */
.article { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px clamp(18px, 4vw, 44px); margin: 26px auto; max-width: 860px; }
.article h1 { color: var(--navy); font-size: clamp(24px, 4vw, 32px); line-height: 1.25; margin-bottom: 6px; }
.featimg { border-radius: 10px; margin: 16px 0; }
.body { margin: 18px 0; font-size: 16.5px; }
.body h2, .body h3 { color: var(--navy); margin: 22px 0 10px; }
.body p { margin-bottom: 14px; }
.body ul, .body ol { padding-left: 24px; margin-bottom: 14px; }
.body img { border-radius: 8px; margin: 12px 0; }
.body blockquote { border-left: 4px solid var(--saffron); background: #fff8f2;
  padding: 10px 16px; border-radius: 6px; margin: 14px 0; }
.body table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.body td, .body th { border: 1px solid var(--line); padding: 8px 10px; }
.body th { background: var(--bg); }
.reportbtn { background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; margin-top: 18px; text-decoration: underline; }
.reportbtn:hover { color: var(--red); }

/* ── Filters ── */
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.filterbar select { border: 2px solid var(--line); border-radius: 9px; padding: 9px 12px;
  font: inherit; background: #fff; }

/* ── Player ── */
.player { padding-top: 20px; }
.playerhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.playerhead h1 { color: var(--navy); font-size: clamp(20px, 3.5vw, 28px); }
.timer { background: var(--navy); color: #fff; font-size: 24px; font-weight: 800;
  border-radius: 10px; padding: 10px 18px; font-variant-numeric: tabular-nums; }
.timer.danger { background: var(--red); animation: pulse 1s infinite; }
.startpanel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px; margin: 22px 0; text-align: center; }
.rules { text-align: left; max-width: 520px; margin: 14px auto 22px; color: var(--muted);
  padding-left: 22px; }
.palette { display: flex; gap: 7px; flex-wrap: wrap; margin: 18px 0;
  position: sticky; top: 66px; background: var(--bg); padding: 8px 0; z-index: 5; }
.palette button { width: 34px; height: 34px; border-radius: 8px; border: 2px solid var(--line);
  background: #fff; font-weight: 700; cursor: pointer; }
.palette button.answered { background: var(--navy); color: #fff; border-color: var(--navy); }
.qcard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; margin-bottom: 14px; }
.qtext { font-size: 16.5px; margin-bottom: 12px; }
.qimg { max-width: 420px; border-radius: 8px; margin-bottom: 12px; }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line);
  border-radius: 9px; padding: 10px 13px; margin-bottom: 8px; cursor: pointer; transition: all .12s; }
.opt:hover { border-color: var(--navy-2); }
.opt input { margin-top: 4px; accent-color: var(--saffron); }
.opt-correct { border-color: var(--green); background: #f0fdf4; }
.opt-wrong { border-color: var(--red); background: #fef2f2; }
.explain { background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px;
  padding: 10px 14px; margin-top: 10px; font-size: 14.5px; }
.resultpanel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; margin: 20px 0; }
.resultpanel h2 { color: var(--navy); margin-bottom: 12px; }
.resultnote { color: var(--muted); font-size: 14px; margin-top: 14px; }
.signupnudge { background: #eef2ff; border-radius: 9px; padding: 10px 14px; margin-top: 12px; }
.lockbox { text-align: center; padding: 50px 18px; }
.lockbox h1 { color: var(--navy); margin-bottom: 10px; }
.lockbox-inline { background: #fff8f2; border: 2px dashed var(--saffron); border-radius: var(--radius);
  padding: 18px; margin: 16px 0; }

/* ── Plans ── */
.plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plancard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--saffron); }
.plancard h3 { color: var(--navy); font-size: 19px; }
.price { font-size: 32px; font-weight: 800; color: var(--navy); }
.price span { font-size: 14px; color: var(--muted); font-weight: 500; }
.plancard ul { padding-left: 20px; color: var(--ink); flex: 1; }
.plancard li { margin-bottom: 5px; }

/* ── Auth / dashboard ── */
.authbox { max-width: 440px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 32px; margin: 40px auto; }
.authbox h1 { color: var(--navy); font-size: 25px; margin-bottom: 14px; }
.authbox label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 5px; }
.authbox input, .authbox select { width: 100%; border: 2px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font: inherit; }
.authbox input:focus, .authbox select:focus { border-color: var(--saffron); outline: none; }
.authbox .btn { width: 100%; margin-top: 18px; }
.authbox p { margin-top: 14px; font-size: 14.5px; }
.dashtable { width: 100%; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  border-collapse: collapse; overflow: hidden; }
.dashtable th { background: var(--navy); color: #fff; text-align: left; padding: 11px 14px; font-size: 14px; }
.dashtable td { padding: 11px 14px; border-top: 1px solid var(--line); }

/* ── Footer ── */
.footer { background: var(--navy); color: #c6d2ec; margin-top: 60px; padding: 40px 0 0; }
.footgrid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; padding-bottom: 28px; }
.footgrid h4 { color: #fff; margin-bottom: 10px; }
.footgrid a { display: block; color: #c6d2ec; padding: 3px 0; font-size: 14.5px; }
.footgrid a:hover { color: var(--saffron); }
.footgrid p { font-size: 14px; }
.logo-foot { font-size: 22px; margin-bottom: 8px; }
.copyline { border-top: 1px solid rgba(255,255,255,.12); text-align: center;
  padding: 16px; font-size: 13.5px; }

/* ── Responsive ── */
@media (max-width: 880px) {
  .topicgrid { grid-template-columns: 1fr; }
  .sidebox { position: static; }
  .footgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) {
  .hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer;
    padding: 8px; margin-left: auto; order: 2; }
  .hamburger span { width: 24px; height: 3px; background: #fff; border-radius: 2px; transition: all .2s; }
  .mainnav { display: none; flex-direction: column; align-items: stretch; width: 100%; order: 4;
    padding-bottom: 10px; }
  .navtoggle:checked ~ .mainnav { display: flex; }
  .navtoggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .navtoggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .navtoggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .topsearch { order: 3; width: 100%; margin: 0 0 10px; }
  .topsearch input { flex: 1; width: auto; }
  .playerhead { flex-direction: column; }
  .timer { align-self: flex-end; position: sticky; top: 70px; z-index: 6; }
}

/* ── Google login ── */
.ordivider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px;
  color: var(--muted); font-size: 13px; }
.ordivider::before, .ordivider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.googlebtn { display: flex !important; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border: 2px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink) !important; font-weight: 600; font-size: 15px;
  text-decoration: none; transition: all .15s; }
.googlebtn:hover { border-color: var(--navy-2); color: var(--ink) !important;
  box-shadow: var(--shadow); }
.googlebtn svg { flex: 0 0 18px; }

/* ── Ad slots ── */
.adslot:empty { display: none; }
.adunit { display: flex; justify-content: center; margin: 14px auto; max-width: 1140px;
  padding: 0 18px; overflow: hidden; }
.adunit img { border-radius: 8px; max-width: 100%; height: auto; }

/* ── Popup ad ── */
.edu-popup { position: fixed; inset: 0; background: rgba(15, 37, 87, .55); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.edu-popup-box { background: #fff; border-radius: 14px; max-width: 480px; width: 100%;
  position: relative; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3);
  animation: popIn .25s ease; }
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.edu-popup-x { position: absolute; top: -12px; right: -12px; width: 32px; height: 32px;
  border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-size: 15px;
  cursor: pointer; z-index: 1; }
.edu-popup-box img { border-radius: 8px; width: 100%; height: auto; }

/* ── Push opt-in ── */
.pushoptin { position: fixed !important; bottom: 0; left: 50%; transform: translateX(-50%);
  width: calc(100% - 26px); max-width: 430px; background: #fff; border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 30px rgba(0,0,0,.18); padding: 16px; z-index: 9998;
  animation: slideUp .5s ease; }
@keyframes slideUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.pushoptin-row { display: flex; gap: 12px; align-items: flex-start; }
.pushoptin-bell { font-size: 30px; }
.pushoptin b { color: var(--navy); }
.pushoptin p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.pushoptin-ctas { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.pushoptin-ctas button { font: inherit; line-height: 1.2; }
.pushbtn-later { background: #fff; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); cursor: pointer; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.pushbtn-later:hover { border-color: var(--muted); }
.pushbtn-yes { background: var(--saffron); border: 0; color: #fff !important; font-weight: 700;
  border-radius: 8px; padding: 10px 20px; cursor: pointer; font-size: 14px; }
.pushbtn-yes:hover { background: var(--saffron-2); }

/* ── Doubts ── */
.doubtrow { display: flex; justify-content: space-between; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 15px 17px;
  margin-bottom: 10px; color: var(--ink); }
.doubtrow:hover { border-color: var(--saffron); color: var(--ink); }
.doubtq { font-weight: 600; color: var(--navy); }
.doubtrow .chip { margin: 4px 4px 0 0; }
.dstatus { white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--muted);
  background: var(--bg); border-radius: 20px; padding: 5px 12px; }
.dstatus-ok { color: var(--green); background: #f0fdf4; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 22px 0; }
.pager span { color: var(--muted); font-size: 14px; }
.answerbox { background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 4px solid var(--green);
  border-radius: 10px; padding: 16px 20px; margin: 18px 0; }

/* ── Countdown ── */
.countdownbar { background: linear-gradient(90deg, var(--saffron), #ff9a4d); color: #fff;
  text-align: center; padding: 9px 14px; font-size: 15px; }
.countdownbar a { color: #fff; text-decoration: underline; }
.countdown { background: rgba(255,255,255,.12); border-radius: 12px; padding: 12px 22px;
  text-align: center; color: #fff; }
.countdown b { display: block; font-size: 34px; }
.countdown span { font-size: 13px; color: #c6d2ec; }

/* ── Progress bars & calendar ── */
.pbar { background: var(--line); border-radius: 20px; height: 8px; overflow: hidden; margin: 8px 0 4px; }
.pbar-fill { background: linear-gradient(90deg, var(--saffron), #ff9a4d); height: 100%;
  border-radius: 20px; transition: width .4s; }
.calgrid { display: grid !important; grid-template-columns: repeat(14, 36px); gap: 6px; }
.calday { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 11px;
  color: var(--muted); }
.calday-on { background: var(--saffron); border-color: var(--saffron); color: #fff; font-weight: 700; }
.quicklinks { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.quicklinks a { background: #fff; border: 2px solid var(--line); border-radius: 10px;
  padding: 10px 16px; font-weight: 600; color: var(--navy); }
.quicklinks a:hover { border-color: var(--saffron); }

/* ── Badges ── */
.badgegrid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.badge-t { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 16px 12px;
  text-align: center; display: flex; flex-direction: column; gap: 4px; }
.badge-t b { color: var(--navy); font-size: 14.5px; }
.badge-t .meta { font-size: 11.5px; }
.badge-icon { font-size: 32px; }
.badge-locked { opacity: .38; filter: grayscale(1); }

/* ── Share / scorecard ── */
.rankline { font-weight: 800; color: var(--navy); font-size: 18px; margin: 12px 0; }
.sharebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px;
  background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.sharebtn { border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: 13.5px;
  cursor: pointer; color: #fff !important; background: var(--navy); }
.sh-wa { background: #25d366; } .sh-x { background: #111; } .sh-fb { background: #1877f2; }
.sh-tg { background: #229ed9; } .sh-card { background: var(--saffron); }

/* ── Forum ── */
.votebar { display: flex; align-items: center; gap: 10px; margin: 14px 0;
  background: var(--bg); border-radius: 10px; padding: 10px 14px; flex-wrap: wrap; }
.votebtn { background: #fff; border: 2px solid var(--navy); color: var(--navy); font-weight: 800;
  border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.votebtn.voted, .likebtn.voted { background: var(--navy); color: #fff; }
#votecount { font-weight: 800; color: var(--navy); }
.replycard { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; margin-bottom: 10px; }
.replybody { margin: 6px 0; white-space: pre-wrap; }
.likebtn { background: none; border: 1px solid var(--line); border-radius: 20px;
  padding: 4px 12px; cursor: pointer; font-size: 13px; }
.likebtn:hover { border-color: var(--red); }
.doubtstats { display: flex; gap: 10px; align-items: center; white-space: nowrap;
  color: var(--muted); font-size: 13px; font-weight: 700; }

/* ── Planner ── */
.taskform { display: block; }
.taskform input[type=text], .taskform input[type=date], .taskform select,
.taskform textarea {
  display: block; width: 100%; max-width: 100%; border: 2px solid var(--line);
  border-radius: 9px; padding: 11px 13px; font: inherit; margin-bottom: 10px;
  background: #fff; color: var(--ink); }
.taskform input:focus, .taskform select:focus { border-color: var(--saffron); outline: none; }
.taskform .btn { width: 100%; margin-top: 4px; }
.taskrow { display: grid !important; grid-template-columns: 2fr 1fr 1fr; gap: 10px;
  align-items: start; }
.taskrow > * { margin-bottom: 0 !important; min-width: 0; }
.taskcard { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 10px; padding: 12px 15px; margin-bottom: 9px;
  display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.task-high { border-left-color: var(--red); }
.task-done { opacity: .6; }
.taskbtns { display: flex; gap: 6px; }
.taskbtns button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 15px; }
.taskbtns button:hover { border-color: var(--saffron); }
.syllsub { border-bottom: 1px solid var(--line); padding: 10px 0; }
.syllsub:last-child { border-bottom: 0; }
.syllsub summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer;
  font-weight: 700; color: var(--navy); list-style: none; align-items: center; }
.syllsub summary::-webkit-details-marker { display: none; }
.syllsub summary::before { content: "▸"; color: var(--saffron); font-size: 13px; }
.syllsub[open] summary::before { content: "▾"; }
.syllsub summary > span:first-of-type { flex: 1; }
.syllrow { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; }
.syllrow input { accent-color: var(--saffron); width: 16px; height: 16px; }

/* ── Flashcards ── */
.fcwrap { perspective: 1200px; }
.flashcard { position: relative; height: 320px; cursor: pointer;
  transform-style: preserve-3d; transition: transform .5s; }
.flashcard.flipped { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; background: #fff;
  border-radius: 16px; box-shadow: var(--shadow); padding: 26px; display: flex;
  flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; }
.fc-face p { font-size: 19px; font-weight: 600; color: var(--navy); }
.fc-back { transform: rotateY(180deg); border: 2px solid var(--saffron); }
.fcnav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }

/* ── Video embed ── */
.videowrap { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden;
  margin: 16px 0; }
.videowrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.btn-sm-p { padding: 8px 16px; font-size: 14px; }

@media (max-width: 640px) {
  .taskrow { grid-template-columns: 1fr; }
  .calgrid { grid-template-columns: repeat(7, 1fr); }
}

/* ── Games arcade ── */
.gamegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.gamecard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; color: var(--ink); display: flex; flex-direction: column; transition: all .15s; }
.gamecard:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(15,37,87,.16); color: var(--ink); }
.gamecard-thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--navy), var(--navy-2));
  display: flex; align-items: center; justify-content: center; font-size: 44px; }
.gamecard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gamecard-body { padding: 12px 14px; }
.gamecard-body h3 { color: var(--navy); font-size: 16px; }
.gameframe-wrap { background: #0b1c42; border-radius: var(--radius); padding: 10px;
  box-shadow: var(--shadow); }
.gameframe { width: 100%; border: 0; border-radius: 8px; background: #fff; display: block;
  min-height: 480px; }
.gamebar { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  flex-wrap: wrap; margin: 10px 0; }
@media (max-width: 640px) { .gameframe { min-height: 70vh; } }

/* ── Games ── */
.gamegrid { display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gamecard { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
  color: var(--ink); transition: all .15s; display: block; }
.gamecard:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,37,87,.14);
  color: var(--ink); }
.gamecard-thumb { height: 128px; background: linear-gradient(135deg, var(--navy), var(--navy-2));
  display: flex; align-items: center; justify-content: center; font-size: 46px; }
.gamecard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gamecard-body { padding: 14px; }
.gamecard-body h3 { color: var(--navy); font-size: 16px; margin: 2px 0 4px; }
.gameframe-wrap { background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden; margin: 10px 0 20px; }
.gameframe { width: 100%; border: 0; display: block; background: #fff; }
.gamestrip { display: flex; justify-content: space-between; align-items: center; gap: 18px;
  flex-wrap: wrap; background: linear-gradient(100deg, #1a3a7d, #0F2557); color: #fff;
  border-radius: var(--radius); padding: 24px 28px; margin-top: 10px; }
.gamestrip h2 { font-size: 23px; margin: 6px 0 2px; }
.gamestrip p { color: #c6d2ec; font-size: 14.5px; }
.gamestrip:hover { color: #fff; transform: translateY(-2px); }

/* ── Avatars ── */
.avatar-xs { width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  display: inline-block; vertical-align: middle; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  display: inline-block; vertical-align: middle; }
.avatar-lg { width: 78px; height: 78px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.35); display: block; }
.avatar-ph { display: inline-flex !important; align-items: center; justify-content: center;
  background: var(--saffron); color: #fff; font-weight: 800; text-transform: uppercase; }
.avatar-lg.avatar-ph { font-size: 30px; }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.avatar-edit { position: absolute; bottom: -2px; right: -2px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--saffron); color: #fff; display: flex;
  align-items: center; justify-content: center; cursor: pointer; font-size: 13px;
  border: 2px solid var(--navy); }
.avatar-edit:hover { background: var(--saffron-2); }

/* ── Activity wall ── */
.actgrid { display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.actcard { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
  color: var(--ink); display: block; transition: all .15s; }
.actcard:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,37,87,.14);
  color: var(--ink); }
.actcard-feat { border: 2px solid var(--saffron); }
.actphoto { position: relative; height: 168px; background: var(--bg); }
.actphoto img { width: 100%; height: 100%; object-fit: cover; }
.actcount { position: absolute; right: 8px; bottom: 8px; background: rgba(15,37,87,.8);
  color: #fff; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.actbody { padding: 13px 15px; }
.actbody h3 { color: var(--navy); font-size: 16px; margin-bottom: 4px; }
.actcap { font-size: 14.5px; color: var(--ink); }
.actby { display: flex; align-items: center; gap: 7px; color: var(--muted);
  font-size: 13px; margin-top: 8px; }
.actgallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px; margin: 14px 0; }
.actgallery img { width: 100%; border-radius: 10px; }
.previewrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.previewrow img { width: 84px; height: 62px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); }
.linkbox { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
  padding: 14px 18px; margin: 16px 0; }
.linkbox a { display: block; word-break: break-all; margin-top: 5px; font-size: 14px; }

/* ── Interlinking bar ── */
.interlink { display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; margin: 26px 0; }
.interlink b { color: var(--navy); margin-right: 4px; }
.interlink a { background: var(--bg); border-radius: 20px; padding: 7px 14px;
  font-size: 14px; font-weight: 600; color: var(--navy); }
.interlink a:hover { background: var(--saffron); color: #fff; }

/* ── Class chips with counts (games) ── */
.classcard span.meta { display: block; font-size: 11.5px; font-weight: 500; margin-top: 2px; }
.classcard-on { border-color: var(--saffron); background: #fff8f2; }
.actstrip { background: linear-gradient(100deg, #b45309, #FF7A18) !important; }

/* SEO intro block on listing pages */
.seointro { background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin: 18px 0 4px; color: var(--ink); }
.seointro p { margin-bottom: 10px; }
.seointro p:last-child { margin-bottom: 0; }

/* Avatar edit / remove controls */
.avatar-del { position: absolute; top: -4px; right: -6px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--red); color: #fff; border: 2px solid var(--navy);
  cursor: pointer; font-size: 11px; line-height: 1; display: flex;
  align-items: center; justify-content: center; padding: 0; }
.avatar-del:hover { background: #b91c1c; }
.avatar-lg { aspect-ratio: 1 / 1; }
.avatar-xs, .avatar-sm { aspect-ratio: 1 / 1; flex: 0 0 auto; }

/* Admin-authored raw HTML block on note pages */
.customblock { margin: 18px 0; }
.customblock table { border-collapse: collapse; width: 100%; }
.customblock td, .customblock th { border: 1px solid var(--line); padding: 8px 10px; }
.customblock th { background: var(--bg); }
.customblock img, .customblock svg { max-width: 100%; height: auto; }
.customblock pre { overflow-x: auto; background: #0f172a; color: #e2e8f0;
  padding: 12px 14px; border-radius: 8px; font-size: 13.5px; }

/* ── Article (news) section ── */
.artcard h3 { font-size: 16px; line-height: 1.4; }
.byline { display: flex; align-items: center; gap: 10px; margin: 10px 0 16px;
  color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.byline .chip { margin: 0; }
.lead { font-size: 18px; color: var(--ink); font-weight: 500; margin-bottom: 16px;
  padding-left: 14px; border-left: 4px solid var(--saffron); }
.tagrow { display: flex; gap: 7px; flex-wrap: wrap; margin: 18px 0; }
.chip-link { cursor: pointer; }
.chip-link:hover { background: var(--saffron); color: #fff; }
.tagcloud { display: flex; gap: 9px; flex-wrap: wrap; }
.tagcloud .chip { font-size: 13.5px; padding: 7px 14px; margin: 0; }

/* Comments */
.cmt { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; margin-bottom: 10px; }
.cmt-reply { border-left: 3px solid var(--saffron); }
.cmt-pin { border-color: var(--saffron); background: #fff8f2; }
.cmt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmt-head b { color: var(--navy); }
.cmt-head .chip { margin: 0; font-size: 10px; }
.cmt-body { margin: 8px 0; white-space: pre-wrap; }
.cmt-acts { display: flex; gap: 7px; flex-wrap: wrap; }
.cmt-acts button { background: none; border: 1px solid var(--line); border-radius: 20px;
  padding: 4px 12px; cursor: pointer; font-size: 13px; color: var(--ink); }
.cmt-acts button:hover { border-color: var(--saffron); }
.cmt-acts button.voted { background: var(--navy); color: #fff; border-color: var(--navy); }
.cmtform { background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; margin-top: 16px; }
.cmtform input[type=text] { width: 100%; border: 2px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font: inherit; margin-bottom: 10px; }

/* Recruitment landing news ticker */
.newsbox { background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin: 18px 0; }
.newsbox-head { margin-bottom: 8px; }
.newsrow { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px solid var(--line); }
.newsrow:last-child { border-bottom: 0; }
.newsrow b { color: var(--navy); }

/* ── Mega-menu & class switcher ── */
.megawrap { position: relative; }
.megabtn { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 8px;
  padding: 8px 14px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.megabtn:hover { background: rgba(255,255,255,.24); }
.mega { display: none; position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(15,37,87,.22);
  padding: 20px; min-width: 640px; gap: 26px; }
.mega.on { display: flex; }
.mega-col { min-width: 180px; }
.mega-col h4 { color: var(--navy); font-size: 13px; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 9px; }
.mega-col a { display: block; padding: 5px 0; color: var(--ink); font-size: 14.5px; }
.mega-col a:hover { color: var(--saffron); }
.mega-all { font-weight: 700; color: var(--navy) !important; margin-top: 6px; }
.mega-classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mega-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 6px; font: inherit; font-size: 13px; cursor: pointer; color: var(--navy); }
.mega-chip:hover { border-color: var(--saffron); }
.mega-chip.on { background: var(--saffron); color: #fff; border-color: var(--saffron); }

/* ── Search autocomplete ── */
.topsearch { position: relative; }
.suggest { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border-radius: 10px; box-shadow: 0 10px 34px rgba(15,37,87,.2);
  overflow: hidden; z-index: 60; min-width: 320px; }
.suggest.on { display: block; }
.suggest a { display: flex; gap: 10px; align-items: center; padding: 10px 14px;
  color: var(--ink); border-bottom: 1px solid var(--line); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover { background: var(--bg); }
.suggest .si { font-size: 17px; }
.suggest b { display: block; font-size: 14px; font-weight: 600; }
.suggest em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }

/* ── Resume card ── */
.resumecard { background: linear-gradient(100deg, var(--navy), var(--navy-2)); color: #fff;
  border-radius: var(--radius); padding: 22px 26px; display: flex; gap: 18px;
  justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.resumecard h2 { font-size: 21px; margin: 8px 0 3px; }
.resumecard p { color: #c6d2ec; font-size: 14px; }
.resumeacts { display: flex; gap: 9px; flex-wrap: wrap; }

/* ── Study tool cards ── */
.toolcard { text-align: center; align-items: center; }
.toolicon { font-size: 30px; }

/* ── Chapter prev/next ── */
.chapnav { display: flex; justify-content: space-between; gap: 14px; margin: 26px 0;
  flex-wrap: wrap; }
.chapnav a { background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 14px 18px; flex: 1 1 240px; color: var(--ink); display: block; }
.chapnav a:hover { border-color: var(--saffron); }
.chapnav b { display: block; color: var(--navy); margin-top: 3px; }
.chapnext { text-align: right; }

/* ── Revision blocks ── */
.revblock { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px; margin-bottom: 14px; }
.revblock h3 { color: var(--navy); margin-bottom: 8px; }

/* ── Draft preview banner ── */
.preview-banner { background: #fef3c7; border-bottom: 2px solid #fbbf24; color: #92400e;
  text-align: center; padding: 10px 16px; font-size: 14.5px; }

/* ── Test builder ── */
.bigselect { width: 100%; border: 2px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font: inherit; background: #fff; margin-bottom: 4px; }
.chkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 7px; }
.chkbox { display: flex !important; align-items: center; gap: 7px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; cursor: pointer;
  font-size: 14px; }
.chkbox:hover { border-color: var(--saffron); }
.chkbox input { width: auto; accent-color: var(--saffron); }

@media (max-width: 900px) {
  .mega { min-width: auto; width: calc(100vw - 36px); flex-direction: column; gap: 16px; }
  .suggest { min-width: auto; }
}

/* ═══ Article page: two-column layout with sidebar ═══════════════════ */
.postshell { display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px; align-items: start; margin-top: 22px; }
.postmain { min-width: 0; }
.article-flush { margin: 0 0 20px; max-width: none; }
.postside { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 16px; }

.swidget { background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; }
.swidget-title { color: var(--navy); font-size: 18px; font-weight: 800;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px solid var(--line);
  position: relative; }
.swidget-title span { color: var(--saffron); }
.swidget-title::after { content: ""; position: absolute; left: 0; bottom: -2px;
  width: 74px; height: 2px; background: var(--saffron); }

/* Numbered latest-posts list, matching the old theme's counter badges.
   !important guards against list styles inherited from CMS article CSS. */
.postside ol.latestlist, ol.latestlist {
  list-style: none !important; counter-reset: lp; margin: 0 !important; padding: 0 !important; }
.postside ol.latestlist li, ol.latestlist li {
  counter-increment: lp; position: relative; list-style: none !important;
  padding: 9px 0 9px 40px !important; margin: 0 !important;
  border-bottom: 1px dashed var(--line); }
ol.latestlist li:last-child { border-bottom: 0; }
ol.latestlist li::before, ol.latestlist li::marker { }
ol.latestlist li::before { content: counter(lp); position: absolute; left: 0; top: 8px;
  width: 27px; height: 27px; border-radius: 50%; background: var(--saffron); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; }
ol.latestlist li::marker { content: none; }
ol.latestlist a { color: var(--ink); font-size: 14.5px; line-height: 1.45; display: block; }
ol.latestlist a:hover { color: var(--saffron); }

ul.sidelist { list-style: none !important; margin: 0 !important; padding: 0 !important; }
ul.sidelist li { padding: 8px 0 !important; margin: 0 !important;
  list-style: none !important; border-bottom: 1px dashed var(--line); }
ul.sidelist li::marker { content: none; }
.sidelist li:last-child { border-bottom: 0; }
.sidelist a { color: var(--ink); font-size: 14.5px; }
.sidelist a:hover { color: var(--saffron); }

.stool { display: flex; gap: 11px; align-items: center; padding: 10px 0;
  border-bottom: 1px dashed var(--line); color: var(--ink); }
.stool:last-child { border-bottom: 0; }
.stool span { font-size: 21px; flex: 0 0 auto; }
.stool b { display: block; color: var(--navy); font-size: 14.5px; }
.stool em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.stool:hover b { color: var(--saffron); }

.swidget-cta { background: linear-gradient(135deg, var(--navy), var(--navy-2));
  border-color: transparent; color: #fff; text-align: center; }
.swidget-cta h3 { font-size: 17px; margin-bottom: 8px; }
.swidget-cta p { color: #c6d2ec; font-size: 14px; margin-bottom: 14px; }

/* ═══ Table of Contents ══════════════════════════════════════════════
   The ToC markup ships inside the article body from the CMS
   (#ez-toc-container), so it only needs styling here. */
#ez-toc-container { background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin: 28px 0; box-shadow: var(--shadow); overflow: hidden; }
.ez-toc-title-container { padding: 15px 22px; border-bottom: 1px solid var(--line);
  background: var(--bg); }
#ez-toc-container p.ez-toc-title, .ez-toc-title { font-weight: 800; font-size: 18px;
  color: var(--navy); margin: 0; }
#ez-toc-container nav > ul, #ez-toc-container > ul, #ez-toc-container ul {
  display: flex !important; flex-wrap: wrap; gap: 6px 34px;
  margin: 0 !important; padding: 14px 22px 18px !important;
  list-style: none !important; counter-reset: ezitem; }
#ez-toc-container ul li, .body #ez-toc-container ul li {
  list-style: none !important; width: 46%; padding: 3px 0 !important;
  margin: 0 !important; }
#ez-toc-container ul li::marker { content: none; }
#ez-toc-container ul ul { padding: 4px 0 0 8px !important; width: 100%; }
#ez-toc-container a { color: var(--ink); display: inline-flex; align-items: center;
  gap: 10px; line-height: 1.4; font-size: 15.5px; }
#ez-toc-container a:hover { color: var(--saffron); }
.ez-toc-counter nav ul li a::before,
#ez-toc-container.ez-toc-counter ul li a::before {
  counter-increment: ezitem; content: counter(ezitem);
  flex-shrink: 0; width: 25px; height: 25px; border-radius: 50%;
  background: var(--saffron); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; }
.ez-toc-toggle, #ez-toc-container .ez-toc-toggle { background: none; border: 0;
  cursor: pointer; color: var(--muted); }

@media (max-width: 1000px) {
  .postshell { grid-template-columns: 1fr; }
  .postside { position: static; }
}
@media (max-width: 768px) {
  #ez-toc-container ul li { width: 100%; }
  .ez-toc-title-container { text-align: left; }
}

/* Checkout */
.cochk { background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin: 16px 0; }
.cochk-row { display: flex; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px solid var(--line); }
.cochk-row:last-child { border-bottom: 0; }
.cochk-row span { color: var(--muted); }
.cochk-total b { font-size: 24px; color: var(--navy); }
.cofeat { list-style: none; padding: 0; margin: 0 0 18px; }
.cofeat li { padding: 6px 0; color: var(--green); font-weight: 600; font-size: 14.5px; }

/* ── Star ratings ── */
.stars { display: inline-flex; gap: 1px; }
.stars i { font-style: normal; color: #cbd5e1; font-size: 14px; }
.stars i.on { color: #fbbf24; }
.ratebar { display: grid; grid-template-columns: 180px 1fr; gap: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; margin-bottom: 16px; }
.ratebig { text-align: center; border-right: 1px solid var(--line); padding-right: 16px; }
.ratebig b { display: block; font-size: 40px; color: var(--navy); line-height: 1.1; }
.ratebig .stars i { font-size: 17px; }
.rateform b { display: block; color: var(--navy); margin-bottom: 8px; }
.rateform textarea { width: 100%; border: 2px solid var(--line); border-radius: 9px;
  padding: 10px 12px; font: inherit; min-height: 66px; margin: 8px 0; }
.starpick { display: flex; gap: 4px; }
.starpick button { background: none; border: 0; font-size: 30px; line-height: 1;
  color: #cbd5e1; cursor: pointer; padding: 0 2px; transition: color .12s, transform .12s; }
.starpick button:hover, .starpick button.on { color: #fbbf24; }
.starpick button:hover { transform: scale(1.15); }
.revlist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.revitem { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; }
.revhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.revhead b { color: var(--navy); }
.fbblock { margin-top: 26px; }

/* ── IQ ── */
.iqcard { text-align: center; align-items: center; }
.iqstrip { background: linear-gradient(100deg, #5b21b6, #7c3aed) !important; }
.iqstart { display: flex; gap: 10px; flex-wrap: wrap; }
.grid-2-t { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 820px) {
  .grid-2-t { grid-template-columns: 1fr; }
  .ratebar { grid-template-columns: 1fr; }
  .ratebig { border-right: 0; border-bottom: 1px solid var(--line);
    padding: 0 0 14px; margin-bottom: 6px; }
}

/* ── Scan & Solve ── */
.quotabar { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px;
  padding: 11px 16px; margin-bottom: 14px; font-size: 14.5px; color: var(--navy); }
.quotabar b { font-size: 17px; }
.quotabar-out { background: #fff8f2; border-color: #fed7aa; }
.scanbox { border: 2px dashed var(--line); border-radius: 12px; padding: 26px 18px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  background: var(--bg); }
.scanbox:hover { border-color: var(--saffron); background: #fff8f2; }
.scanicon { font-size: 38px; display: block; margin-bottom: 8px; }
.scanbox b { display: block; color: var(--navy); margin-bottom: 3px; }
#scanprev { max-width: 100%; max-height: 320px; border-radius: 9px; margin: 0 auto; }
.airesult { margin-top: 20px; }
.aihint { background: #fff8f2; border: 1px solid #fed7aa; border-radius: 9px;
  padding: 10px 14px; margin: 12px 0; font-size: 14.5px; }
.aihint a { font-weight: 700; }

/* ── AI tutor chat ── */
.chatshell { display: grid; grid-template-columns: 260px minmax(0,1fr);
  gap: 18px; align-items: start; padding-top: 18px; }
.chatside { position: sticky; top: 78px; }
.threadlist { display: flex; flex-direction: column; gap: 5px; margin-top: 12px;
  max-height: 340px; overflow-y: auto; }
.threaditem { background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; color: var(--ink); display: block; }
.threaditem:hover { border-color: var(--saffron); color: var(--ink); }
.threaditem.on { border-color: var(--saffron); background: #fff8f2; }
.threaditem b { display: block; font-size: 13.5px; font-weight: 600; }
.threaditem .meta { font-size: 11.5px; }

.chatmain { background: #fff; border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; min-height: 68vh; overflow: hidden; }
.chathead { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chathead h1 { font-size: 20px; color: var(--navy); }
.quotachip { background: #eef2ff; color: var(--navy-2); border-radius: 20px;
  padding: 5px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.quotachip.out { background: #fff8f2; color: var(--saffron-2); }

.chatlog { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex;
  flex-direction: column; gap: 12px; max-height: 60vh; }
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.msg-body { max-width: 78%; padding: 11px 15px; border-radius: 14px; font-size: 15px;
  line-height: 1.6; }
.msg-user .msg-body { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg-assistant .msg-body { background: var(--bg); color: var(--ink);
  border-bottom-left-radius: 4px; border: 1px solid var(--line); }
.msg-warn .msg-body { background: #fff8f2; border-color: #fed7aa; color: var(--saffron-2); }
.msg-body p { margin-bottom: 9px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol { margin: 6px 0 9px 20px; }
.msg-body li { margin-bottom: 4px; }

.dots i { display: inline-block; width: 7px; height: 7px; margin-right: 4px;
  background: var(--muted); border-radius: 50%; animation: dotp 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
@keyframes dotp { 0%,60%,100% { opacity:.3; transform:translateY(0);} 30% { opacity:1; transform:translateY(-3px);} }

.chatempty { text-align: center; padding: 34px 16px; }
.chatempty h2 { color: var(--navy); font-size: 20px; margin: 8px 0 6px; }
.chatprompts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.promptchip { background: var(--bg); border: 1px solid var(--line); border-radius: 20px;
  padding: 8px 15px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--navy); }
.promptchip:hover { border-color: var(--saffron); background: #fff8f2; }

.chatbar { border-top: 1px solid var(--line); padding: 12px 16px; }
.chatbar-row { display: flex; gap: 9px; align-items: flex-end; }
.chatbar textarea { flex: 1; border: 2px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font: inherit; font-size: 15px; resize: none; max-height: 160px; }
.chatbar textarea:focus { border-color: var(--saffron); outline: none; }
.chatbar .btn { margin: 0; padding: 11px 18px; font-size: 17px; }
.chatclip { display: flex; align-items: center; justify-content: center; width: 42px;
  height: 42px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
  font-size: 18px; flex: 0 0 auto; }
.chatclip:hover { border-color: var(--saffron); }
#chatimgwrap { position: relative; display: inline-block; margin-bottom: 8px; }
#chatimg { max-height: 110px; border-radius: 9px; border: 1px solid var(--line); display: block; }
#chatimgx { position: absolute; top: -7px; right: -7px; width: 23px; height: 23px;
  border-radius: 50%; background: var(--red); color: #fff; border: 0; cursor: pointer;
  font-size: 11px; line-height: 1; }
.chatlock { border-top: 1px solid var(--line); padding: 20px; text-align: center; }
.chatlock p { margin-bottom: 12px; }

@media (max-width: 900px) {
  .chatshell { grid-template-columns: 1fr; }
  .chatside { position: static; }
  .threadlist { max-height: 160px; }
  .msg-body { max-width: 88%; }
  .chatlog { max-height: none; }
}
.tutorstrip { background: linear-gradient(100deg, #0f766e, #14b8a6) !important; }

/* ── Attempt review ── */
.scorecard { display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: linear-gradient(100deg, var(--navy), var(--navy-2)); color: #fff;
  border-radius: var(--radius); padding: 24px 28px; margin: 14px 0 18px; flex-wrap: wrap; }
.scorecard h1 { font-size: 23px; margin: 6px 0 3px; }
.scorecard .meta { color: #c6d2ec; }
.scorebig { text-align: right; }
.scorebig b { font-size: 44px; line-height: 1; display: block; }
.scorebig b span { font-size: 22px; color: #c6d2ec; }
.actionrow { display: flex; gap: 9px; flex-wrap: wrap; margin: 16px 0; }
.qcard-wrong { border-left: 4px solid var(--red); }

/* ── Spaced repetition ── */
.srsdeck { max-width: 620px; margin: 18px auto 0; }
.srsprog { height: 6px; background: var(--line); border-radius: 20px; overflow: hidden; }
.srsprog-fill { height: 100%; background: var(--saffron); width: 0; transition: width .3s; }
.srscard { background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 26px; margin-top: 10px; }
.srsq { font-size: 19px; font-weight: 600; color: var(--navy); line-height: 1.5;
  margin-bottom: 18px; }
.srsa { background: var(--bg); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.srsgrades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.srsgrades button { border: 0; border-radius: 9px; padding: 12px 6px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14px; color: #fff; }
.srsgrades span { display: block; font-size: 11px; font-weight: 500; opacity: .85; }
.g-again { background: #dc2626; } .g-hard { background: #f59e0b; }
.g-good  { background: #16a34a; } .g-easy { background: #2563eb; }
.srsgrades button:hover { filter: brightness(1.08); }

/* ── Profile ── */
.profhead { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profhead h1 { margin: 0; }

/* ── Groups ── */
.codecard { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: #fff8f2; border: 2px dashed var(--saffron); border-radius: 12px;
  padding: 18px 22px; margin: 14px 0; flex-wrap: wrap; }
.bigcode { display: block; font-size: 32px; letter-spacing: 5px; color: var(--navy);
  font-weight: 800; }

/* ── Notifications ── */
.notifrow { display: flex; gap: 14px; align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; padding: 14px 17px;
  margin-bottom: 9px; color: var(--ink); }
.notifrow:hover { border-color: var(--saffron); color: var(--ink); }
.notificon { font-size: 21px; flex: 0 0 auto; }
.notifbody { flex: 1; min-width: 0; }
.notifbody b { display: block; color: var(--navy); font-size: 15px; }
.notifbody .meta { display: block; margin-top: 2px; }
.notifwhen { white-space: nowrap; flex: 0 0 auto; font-size: 12.5px; }
.nav-bell { position: relative; }
.navdot { position: absolute; top: 0; right: -2px; background: var(--red); color: #fff;
  border-radius: 20px; font-size: 10px; font-weight: 700; padding: 1px 5px; line-height: 1.4; }

/* ── Reading progress ── */
.readbar { position: sticky; top: 0; height: 3px; background: transparent; z-index: 55; }
.readbar-fill { height: 100%; width: 0; background: var(--saffron); transition: width .1s linear; }
.readmeta { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }

/* ── Exam hub, formulas, daily ── */
.examsyll { background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 14px 18px; margin-bottom: 10px; }
.dailystrip { background: linear-gradient(100deg, #b45309, #f59e0b) !important; }

@media (max-width: 640px) {
  .srsgrades { grid-template-columns: repeat(2, 1fr); }
  .scorebig { text-align: left; }
}

/* Quiz listing rows */
.quizlist { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quizlist b { display: block; }
.quizlist .meta { display: block; font-size: 12.5px; }
.quizmeta { white-space: nowrap; flex: 0 0 auto; font-weight: 600; }

/* ═══ Quiz UI — lettered options, palette, exam-style navigation ═══ */
.opt { display: flex; align-items: flex-start; gap: 12px; border: 2px solid var(--line);
  border-radius: 11px; padding: 13px 16px; margin-bottom: 9px; cursor: pointer;
  background: #fff; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--saffron); background: #fffaf6; }
.opt input { margin-top: 3px; accent-color: var(--saffron); flex: 0 0 auto; }
.optl { flex: 0 0 auto; width: 27px; height: 27px; border-radius: 7px;
  background: var(--bg); color: var(--navy); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; }
.optt { flex: 1; min-width: 0; line-height: 1.55; }
.optt p { margin: 0; }
.optt p + p { margin-top: 6px; }
.opt:has(input:checked) { border-color: var(--saffron); background: #fff5ed; }
.opt:has(input:checked) .optl { background: var(--saffron); color: #fff; }
.opt-correct { border-color: var(--green) !important; background: #f0fdf4 !important; }
.opt-correct .optl { background: var(--green); color: #fff; }
.opt-wrong { border-color: var(--red) !important; background: #fef2f2 !important; }
.opt-wrong .optl { background: var(--red); color: #fff; }

/* Question text may contain authored HTML */
.qtext { font-size: 17px; line-height: 1.6; margin-bottom: 14px; color: var(--ink); }
.qtext p { margin: 0 0 8px; }
.qtext p:last-child { margin-bottom: 0; }
.qtext sub, .qtext sup { font-size: .75em; }
.qtext table, .optt table { border-collapse: collapse; margin: 8px 0; }
.qtext td, .qtext th, .optt td, .optt th { border: 1px solid var(--line); padding: 5px 9px; }
.qtext img, .optt img, .explain img { max-width: 100%; height: auto; border-radius: 6px; }
math { font-size: 1.05em; }

.explain { background: #fffbeb; border-left: 4px solid #fbbf24; border-radius: 8px;
  padding: 12px 16px; margin-top: 12px; font-size: 15px; line-height: 1.65; }
.explain p { margin: 0 0 8px; }
.explain p:last-child { margin-bottom: 0; }

/* Exam-style navigation */
.qnavbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; margin-top: 14px; position: sticky; bottom: 12px;
  box-shadow: 0 4px 18px rgba(15,37,87,.09); }
.qnavbar .btn { margin: 0; }
.qnavbar #submitbtn { margin-left: auto; }
.palette { display: flex; gap: 7px; flex-wrap: wrap; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.palette button { width: 38px; height: 38px; border-radius: 9px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.palette button.answered { background: var(--green); border-color: var(--green); color: #fff; }
.palette button.marked { background: #a855f7; border-color: #a855f7; color: #fff; }
.palette button.current { border-color: var(--saffron); border-width: 2.5px; color: var(--navy); }
.palette button.answered.current { color: #fff; }

/* ═══ Individual question page ═══ */
.qapage { padding-top: 18px; }
.qacard { background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 26px 30px; margin: 14px 0 20px; }
.qahead { display: flex; gap: 8px; margin-bottom: 12px; }
.qatitle { font-size: 23px; line-height: 1.45; color: var(--navy); margin-bottom: 18px; }
.qatitle p { margin: 0; }
.qaopts { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.qaopt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line);
  border-radius: 11px; padding: 13px 16px; }
.qaopt-correct { border-color: var(--green); background: #f0fdf4; }
.qaopt-correct .optl { background: var(--green); color: #fff; }
.qaanswer { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
  padding: 14px 18px; margin-top: 16px; }
.qacorrect { display: block; color: var(--green); font-weight: 800; margin-bottom: 5px; }
.qaexpl { background: #fffbeb; border-left: 4px solid #fbbf24; border-radius: 8px;
  padding: 15px 18px; margin-top: 12px; }
.qaexpl b { display: block; font-size: 11.5px; letter-spacing: .8px; color: #92400e;
  margin-bottom: 7px; }
.qaquiz { display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.qaquiz b { color: var(--navy); }
.qablock { background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 20px 24px; margin-bottom: 18px; }
.qbullet { display: inline-flex; width: 24px; height: 24px; border-radius: 6px;
  background: var(--bg); color: var(--navy); font-size: 12px; font-weight: 700;
  align-items: center; justify-content: center; margin-right: 9px; flex: 0 0 auto; }

@media (max-width: 640px) {
  .qacard { padding: 20px 18px; }
  .qatitle { font-size: 19px; }
  .qnavbar { position: static; }
  .qnavbar #submitbtn { margin-left: 0; width: 100%; }
  .palette button { width: 34px; height: 34px; font-size: 13px; }
}

/* ── Login prompt modal ── */
.lmodal { position: fixed; inset: 0; background: rgba(15,37,87,.55); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.lmodal-box { background: #fff; border-radius: 16px; max-width: 420px; width: 100%;
  padding: 32px 28px 24px; text-align: center; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: popIn .22s ease; }
.lmodal-x { position: absolute; top: 12px; right: 14px; background: none; border: 0;
  font-size: 17px; color: var(--muted); cursor: pointer; }
.lmodal-icon { font-size: 42px; display: block; margin-bottom: 8px; }
.lmodal-box h2 { color: var(--navy); font-size: 22px; margin-bottom: 8px; }
.lmodal-box .meta { line-height: 1.6; }
.lmodal-acts { display: flex; flex-direction: column; gap: 9px; margin: 20px 0 12px; }
.lmodal-acts .btn { width: 100%; margin: 0; }
.lmodal-skip { background: none; border: 0; color: var(--muted); font-size: 13.5px;
  cursor: pointer; text-decoration: underline; }
.lmodal-skip:hover { color: var(--ink); }

/* Guest-friendly messaging */
.guestok { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 9px;
  padding: 10px 14px; color: #15803d; font-size: 14.5px; margin-top: 10px; }
.savebox { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: #fff8f2; border: 2px dashed var(--saffron); border-radius: 12px;
  padding: 16px 20px; margin-top: 16px; flex-wrap: wrap; }
.savebox b { display: block; color: var(--navy); margin-bottom: 3px; }
.savebox .meta { display: block; max-width: 460px; }
.savebox .btn { margin: 0; }

/* Flashcards render authored HTML */
.fc-face p { margin: 0 0 8px; }
.fc-face p:last-child { margin-bottom: 0; }
.srsq p, .srsa p { margin: 0 0 8px; }
.srsq p:last-child, .srsa p:last-child { margin-bottom: 0; }

/* Empty-state box — tells the visitor what to do next rather than
   leaving them on a dead page */
.emptybox { background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 26px; text-align: center; margin: 8px 0 18px; }
.emptyicon { font-size: 44px; display: block; margin-bottom: 10px; }
.emptybox h3 { color: var(--navy); font-size: 19px; margin-bottom: 6px; }
.emptybox .meta { max-width: 460px; margin: 0 auto; line-height: 1.6; }
.emptybox .btn { margin: 4px 3px 0; }


/* Logo image variant */
.logo img { display: block; }

/* Inline sign-in inside the prompt modal */
.lmodal-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.lmodal-form input { border: 2px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font: inherit; font-size: 15px; }
.lmodal-form input:focus { border-color: var(--saffron); outline: none; }
.lmodal-form .btn { margin: 2px 0 0; width: 100%; }
.lmodal-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px;
  color: var(--muted); font-size: 13px; }
.lmodal-or::before, .lmodal-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
