/* AccountsDost — design tokens */
:root {
  --bg: #f4f9f9;
  --paper: #ffffff;
  --ink: #1d1a3a;
  --ink2: #4a4668;
  --muted: #736f92;
  --line: #d9eaec;
  --pri: #0b7285;
  --pri2: #095c6b;
  --pri-soft: #e3f6f8;
  --acc: #f76707;
  --acc-soft: #fff1e6;
  --good: #2b8a3e;
  --good-soft: #e6f7ea;
  --bad: #c92a2a;
  --bad-soft: #ffeaea;
  --warn-soft: #fff8db;
  --warn: #9c6b00;
  --info-soft: #e7f5ff;
  --info: #1864ab;
  --fillA: rgba(247, 103, 7, .16);
  --fillB: rgba(75, 55, 214, .14);
  --fillC: rgba(43, 138, 62, .16);
  --shadow: 0 6px 24px rgba(40, 30, 110, .08);
  --radius: 16px;
  --c: #4b37d6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121026; --paper: #1c1936; --ink: #efedff; --ink2: #c9c5e8; --muted: #9a96c0; --line: #2f2b52;
    --pri: #3bc9db; --pri2: #66d9e8; --pri-soft: #11303a; --acc: #ff9a4d; --acc-soft: #3a2616;
    --good: #69db7c; --good-soft: #17301d; --bad: #ff8787; --bad-soft: #3b1a1d; --warn-soft: #332b10; --warn: #ffd43b;
    --info-soft: #132a3d; --info: #74c0fc; --fillA: rgba(255, 154, 77, .22); --fillB: rgba(157, 140, 255, .22); --fillC: rgba(105, 219, 124, .2);
    --shadow: 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121026; --paper: #1c1936; --ink: #efedff; --ink2: #c9c5e8; --muted: #9a96c0; --line: #2f2b52;
  --pri: #3bc9db; --pri2: #66d9e8; --pri-soft: #11303a; --acc: #ff9a4d; --acc-soft: #3a2616;
  --good: #69db7c; --good-soft: #17301d; --bad: #ff8787; --bad-soft: #3b1a1d; --warn-soft: #332b10; --warn: #ffd43b;
  --info-soft: #132a3d; --info: #74c0fc; --fillA: rgba(255, 154, 77, .22); --fillB: rgba(157, 140, 255, .22); --fillC: rgba(105, 219, 124, .2);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.7 'Nunito', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Baloo 2', 'Nunito', 'Noto Sans Devanagari', sans-serif; line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; }
h2 { font-size: clamp(22px, 3.4vw, 29px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 700; }
h4 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--pri); }
img, svg { max-width: 100%; }
b, strong { font-weight: 800; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--pri); color: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 6px; }


/* Language-specific box labels */
html[lang="en"] { --l-jtry: "🧾 Pass the entry yourself"; --l-story: "📖 Real-life story"; --l-rule: "⭐ Rule / formula to remember"; --l-trap: "⚠️ Don't make this mistake"; --l-yaad: "💡 Trick / Shortcut"; --l-note: "ℹ️ Note"; --l-ex: "✏️ Solved Example"; --l-try: "🙋 Try it yourself"; --l-hint: "Hint: "; --l-sol: "Solution: "; --l-mcq: "🤔 Think and choose"; --l-why: "Why: "; --l-widget: "🧪 Interactive: change it and see"; }
html[lang="hi"] { --l-jtry: "🧾 प्रविष्टि खुद करो"; --l-story: "📖 रोज़मर्रा की कहानी"; --l-rule: "⭐ याद रखने वाला नियम / सूत्र"; --l-trap: "⚠️ यहाँ गलती मत करना"; --l-yaad: "💡 ट्रिक / शॉर्टकट"; --l-note: "ℹ️ ध्यान दो"; --l-ex: "✏️ हल किया गया उदाहरण"; --l-try: "🙋 खुद करो"; --l-hint: "संकेत: "; --l-sol: "हल: "; --l-mcq: "🤔 सोचो और चुनो"; --l-why: "समझो: "; --l-widget: "🧪 इंटरैक्टिव: खुद बदलकर देखो"; }
html[lang="hi"] body { font-family: 'Nunito', 'Noto Sans Devanagari', 'Baloo 2', system-ui, sans-serif; line-height: 1.8; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] h4 { line-height: 1.35; }
html[lang="hi"] .kicker, html[lang="hi"] .story::before, html[lang="hi"] .rule::before { letter-spacing: 0; }

/* Language switch */
.lang-switch { display: inline-flex; border: 2px solid var(--pri); border-radius: 999px; overflow: hidden; margin-left: auto; flex: none; }
.lang-switch a { text-decoration: none; font-weight: 800; font-size: 14px; padding: 5px 12px; color: var(--pri); line-height: 1.4; }
.lang-switch a.on { background: var(--pri); color: #fff; }
.lang-switch a:not(.on):hover { background: var(--pri-soft); }
@media (max-width: 760px) { .lang-switch a { padding: 4px 9px; font-size: 13px; } .brand-text small { display: none; } }
@media (max-width: 380px) { .brand-text { font-size: 19px; } .brand-mark { width: 34px; height: 34px; font-size: 20px; } }

/* Header */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .topbar { background: var(--paper); } }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--pri), var(--acc)); color: #fff; font: 800 24px 'Baloo 2', sans-serif; }
.brand-text { font: 800 22px/1 'Baloo 2', sans-serif; }
.brand-text b { color: var(--acc); }
.brand-text small { display: block; font: 600 11px 'Nunito', sans-serif; color: var(--muted); letter-spacing: .03em; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink2); font-weight: 700; padding: 8px 12px; border-radius: 10px; font-size: 15px; }
.nav a:hover { background: var(--pri-soft); color: var(--pri); }
.nav a.on { background: var(--pri); color: #fff; }
.theme-btn, .menu-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.menu-btn { display: none; }
@media (max-width: 1000px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .theme-btn { width: 100%; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--pri); color: #fff; border: 2px solid var(--pri); border-radius: 12px; padding: 11px 20px; font: 800 16px 'Nunito', sans-serif; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(75, 55, 214, .25); }
.btn.ghost { background: transparent; color: var(--pri); }
.btn.small { padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn.acc { background: var(--acc); border-color: var(--acc); }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* Home */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 40px 0 24px; }
.kicker { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--acc); margin-bottom: 8px; }
.hl-x { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 3px; }
.hl2 { color: var(--pri); }
.lead { font-size: 19px; color: var(--ink2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sir-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); display: flex; gap: 14px; }
.sir-face { font-size: 44px; line-height: 1; }
.sir-card p { margin: 0; color: var(--ink2); }
.hero-progress { display: flex; align-items: center; gap: 16px; margin-top: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 16px 20px; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ring span { width: 58px; height: 58px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font: 800 17px 'Baloo 2', sans-serif; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 24px; } }

.sec-title { margin-top: 8px; }
.sec-title small { font: 700 15px 'Nunito', sans-serif; color: var(--good); margin-left: 8px; }
.sec-head p { color: var(--muted); }
section { margin-bottom: 36px; }
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.how-steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.how-steps li span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); font-weight: 800; margin-bottom: 6px; }
.how-steps b { display: block; font-size: 18px; }
.how-steps p { margin: 4px 0 0; font-size: 15px; color: var(--ink2); }
@media (max-width: 900px) { .how-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how-steps { grid-template-columns: 1fr; } }

.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ch-card { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.ch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ch-card.neev { background: linear-gradient(135deg, var(--pri-soft), var(--paper)); }
.ch-num { font-size: 13px; font-weight: 800; color: var(--c); text-transform: uppercase; letter-spacing: .05em; }
.ch-icon { position: absolute; right: 16px; top: 14px; font-size: 30px; }
.ch-card h3 { margin: 6px 40px 2px 0; font-size: 20px; }
.ch-hi { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.ch-card p { font-size: 15px; color: var(--ink2); flex: 1; }
.ch-foot { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ch-bar { flex: 1; height: 7px; background: var(--line); border-radius: 9px; overflow: hidden; }
.ch-bar i { display: block; height: 100%; width: 0; background: var(--good); border-radius: 9px; transition: width .4s; }

.blueprint { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.bp-row { display: grid; grid-template-columns: 260px 1fr 36px; align-items: center; gap: 12px; margin: 8px 0; font-weight: 700; }
.bp-bar { height: 14px; background: var(--pri-soft); border-radius: 9px; overflow: hidden; }
.bp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pri), var(--acc)); border-radius: 9px; }
@media (max-width: 600px) { .bp-row { grid-template-columns: 1fr 34px; } .bp-bar { grid-column: 1 / -1; grid-row: 2; } }
.promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.promo { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); }
.promo span { font-size: 32px; }
.promo b { display: block; font: 700 21px 'Baloo 2', sans-serif; margin: 4px 0; }
.promo p { font-size: 15px; color: var(--ink2); margin: 0; }
.promo:hover { border-color: var(--pri); }
@media (max-width: 760px) { .promo-grid { grid-template-columns: 1fr; } }

/* Chapter page */
.crumbs { font-size: 14px; color: var(--muted); padding: 16px 0 4px; }
.crumbs a { color: var(--muted); }
.ch-hero, .page-head { display: flex; gap: 20px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 20px; padding: 24px; margin: 12px 0 20px; }
.page-head { display: block; border-left-color: var(--pri); }
.page-head p:last-child, .ch-hero p:last-child { margin-bottom: 0; }
.ch-hero-icon { font-size: 54px; line-height: 1; }
.ch-hero-hi { color: var(--muted); margin-top: -6px; }
.marks-pill { display: inline-block; background: var(--acc-soft); color: var(--acc); font-weight: 800; font-size: 14px; padding: 5px 12px; border-radius: 30px; }
@media (max-width: 560px) { .ch-hero { flex-direction: column; gap: 8px; padding: 18px; } .ch-hero-icon { font-size: 40px; } }
.ch-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .ch-layout { grid-template-columns: 1fr; } }
.lesson-list { list-style: none; padding: 0; margin: 0 0 20px; }
.lesson-item { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: var(--ink); }
.lesson-item:hover { border-color: var(--pri); }
.li-num { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--pri-soft); color: var(--pri); font-weight: 800; }
.li-body { flex: 1; min-width: 0; }
.li-body b { display: block; font-size: 17px; }
.li-goals { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; }
.li-time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.li-done { display: none; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--good); color: #fff; place-items: center; font-weight: 800; }
.lesson-item.done .li-done { display: grid; }
.lesson-item.done .li-num { background: var(--good-soft); color: var(--good); }
@media (max-width: 560px) { .li-time { display: none; } }
.test-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--acc-soft), var(--paper)); border: 2px dashed var(--acc); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.tc-icon { font-size: 30px; }
.tc-score { margin-left: auto; font-weight: 800; color: var(--good); }
.side-box { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.side-box.soft { background: var(--pri-soft); }
.side-box h3 { font-size: 18px; }
.side-box p { font-size: 15px; }
.side-tool { display: block; text-decoration: none; color: var(--ink); padding: 10px 0; border-top: 1px solid var(--line); }
.side-tool b { display: block; color: var(--pri); }
.side-tool small { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
.nav-ch { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }

/* Lesson */
.lesson { max-width: 820px; margin: 0 auto; }
.lesson-head { margin: 8px 0 18px; }
.read-bar { position: fixed; left: 0; top: 64px; right: 0; height: 4px; z-index: 40; }
.read-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c), var(--acc)); }
.goals { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-bottom: 24px; }
.goals ul { margin: 6px 0 0; padding-left: 22px; }
.lesson-body > h2 { margin-top: 1.6em; padding-top: 8px; border-top: 2px solid var(--line); }
.lesson-body > h2:first-child { margin-top: 0; border-top: 0; }
.lesson-body > h3 { margin-top: 1.3em; }
.lesson-body ul, .lesson-body ol { padding-left: 24px; }
.lesson-body li { margin-bottom: 4px; }
.big { font-size: 22px; font-weight: 800; text-align: center; margin: 14px 0; letter-spacing: .02em; }
.c1 { color: var(--acc); } .c2 { color: var(--pri); } .c3 { color: var(--good); } .c4 { color: var(--bad); }
.hi-term { font-size: .92em; color: var(--muted); }
mark { background: var(--warn-soft); color: inherit; padding: 0 3px; border-radius: 4px; }

/* Teaching boxes */
.sir, .story, .rule, .trap, .yaad, .deep, .note { border-radius: 16px; padding: 16px 18px; margin: 18px 0; position: relative; }
.sir { background: var(--pri-soft); border: 1px solid var(--line); padding-left: 64px; }
.sir::before { content: "👨‍🏫"; position: absolute; left: 16px; top: 12px; font-size: 32px; }
.story { background: var(--acc-soft); border-left: 5px solid var(--acc); }
.story::before { content: var(--l-story); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--acc); margin-bottom: 4px; }
.rule { background: var(--paper); border: 2px solid var(--pri); box-shadow: 0 4px 0 var(--pri-soft); }
.rule::before { content: var(--l-rule); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--pri); margin-bottom: 6px; }
.trap { background: var(--bad-soft); border-left: 5px solid var(--bad); }
.trap::before { content: var(--l-trap); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--bad); margin-bottom: 4px; }
.yaad { background: var(--good-soft); border-left: 5px solid var(--good); }
.yaad::before { content: var(--l-yaad); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--good); margin-bottom: 4px; }
.note { background: var(--info-soft); border-left: 5px solid var(--info); }
.note::before { content: var(--l-note); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--info); margin-bottom: 4px; }
.sir > :last-child, .story > :last-child, .rule > :last-child, .trap > :last-child, .yaad > :last-child, .note > :last-child { margin-bottom: 0; }
details.deep { background: var(--paper); border: 1px dashed var(--line); }
details.deep summary { cursor: pointer; font-weight: 800; color: var(--pri); }
details.deep[open] summary { margin-bottom: 8px; }

/* Solved example with step reveal */
.ex { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; margin: 20px 0; overflow: hidden; box-shadow: var(--shadow); }
.ex > .q { background: var(--pri-soft); padding: 14px 18px; font-weight: 700; }
.ex > .q::before { content: var(--l-ex); display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pri); margin-bottom: 2px; }
.ex .steps { margin: 0; padding: 14px 18px 4px 46px; }
.ex .steps li { margin-bottom: 10px; padding-left: 4px; }
.ex .steps li.hidden-step { display: none; }
.ex .steps li.fresh { animation: pop .35s ease; }
.ex .ans { margin: 0 18px 14px; padding: 10px 14px; border-radius: 12px; background: var(--good-soft); color: var(--good); font-weight: 800; }
.ex .ans.hidden-step { display: none; }
.ex .ex-ctrl { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 18px 16px; align-items: center; }
.ex .ex-ctrl small { color: var(--muted); }
.ex .think { color: var(--muted); font-style: italic; font-size: 15px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Try yourself */
.try, .jtry { background: var(--paper); border: 2px dashed var(--good); border-radius: 16px; padding: 16px 18px; margin: 20px 0; }
.try::before, .jtry::before { content: var(--l-try); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--good); margin-bottom: 6px; }
.try > p, .jtry > p { font-weight: 700; }
.try .hint, .try .sol, .jtry .hint, .jtry .sol { display: none; margin-top: 10px; padding: 10px 14px; border-radius: 12px; }
.try .hint, .jtry .hint { background: var(--warn-soft); }
.try .hint::before, .jtry .hint::before { content: var(--l-hint); font-weight: 800; }
.try .sol, .jtry .sol { background: var(--info-soft); }
.try .sol::before, .jtry .sol::before { content: var(--l-sol); font-weight: 800; }
.try .hint.show, .try .sol.show, .jtry .hint.show, .jtry .sol.show { display: block; animation: pop .3s; }
.try-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.try-row input { font: 700 17px 'Nunito', sans-serif; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; width: 170px; background: var(--bg); color: var(--ink); }
.try-row input:focus { border-color: var(--pri); outline: none; }
.try-msg { font-weight: 800; margin-top: 8px; min-height: 1em; }
.try-msg.ok { color: var(--good); }
.try-msg.no { color: var(--bad); }

/* MCQ */
.mcq { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 18px 0; }
.lesson-body .mcq::before { content: var(--l-mcq); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--pri); margin-bottom: 6px; }
.mcq .mq { font-weight: 700; margin-bottom: 10px; }
.mcq .qn { color: var(--pri); font-weight: 800; margin-right: 4px; }
.mcq .tag, .bq .tag { display: inline-block; background: var(--acc-soft); color: var(--acc); font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 20px; }
.mcq ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mcq li { border: 2px solid var(--line); border-radius: 12px; padding: 9px 14px 9px 44px; cursor: pointer; position: relative; transition: border-color .15s, background .15s; }
.mcq li::before { content: attr(data-l); position: absolute; left: 12px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--pri-soft); color: var(--pri); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.mcq li:hover { border-color: var(--pri); }
.mcq li.right { border-color: var(--good); background: var(--good-soft); }
.mcq li.right::before { content: "✓"; background: var(--good); color: #fff; }
.mcq li.wrong { border-color: var(--bad); background: var(--bad-soft); }
.mcq li.wrong::before { content: "✗"; background: var(--bad); color: #fff; }
.mcq.locked li { cursor: default; }
.mcq .why { display: none; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--info-soft); font-size: 16px; }
.mcq .why::before { content: var(--l-why); font-weight: 800; }
.mcq.answered .why { display: block; animation: pop .3s; }

/* Tables */
.tbl-wrap { overflow-x: auto; margin: 14px 0; -webkit-overflow-scrolling: touch; }
table.t { border-collapse: collapse; width: 100%; background: var(--paper); border-radius: 12px; overflow: hidden; font-size: 16px; }
table.t th, table.t td { border: 1px solid var(--line); padding: 8px 12px; text-align: center; }
table.t th { background: var(--pri-soft); color: var(--ink); font-weight: 800; }
table.t td.l, table.t th.l { text-align: left; }
table.t tr.hl td { background: var(--warn-soft); font-weight: 800; }

/* Maths typesetting */
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 2px; line-height: 1.2; font-size: .95em; }
.fr .nu { border-bottom: 1.6px solid currentColor; padding: 0 3px 1px; }
.fr .de { padding: 1px 3px 0; }
.sq { display: inline-flex; align-items: flex-start; white-space: nowrap; }
.sq .sqs { font-size: 1.05em; margin-right: -1px; }
.sq .sqi { border-top: 1.6px solid currentColor; padding: 0 2px; margin-top: .18em; line-height: 1.25; }
.m { font-family: 'Nunito', sans-serif; font-weight: 700; white-space: nowrap; }
.eq { display: block; text-align: center; font-size: 19px; font-weight: 700; margin: 12px 0; line-height: 2; }

/* SVG diagrams */
svg.dg { display: block; margin: 16px auto; max-width: 100%; height: auto; }
.dg .s { stroke: var(--ink); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dg .p { stroke: var(--pri); stroke-width: 2.6; fill: none; }
.dg .o { stroke: var(--acc); stroke-width: 2.6; fill: none; }
.dg .g { stroke: var(--good); stroke-width: 2.6; fill: none; }
.dg .thin { stroke-width: 1.2; }
.dg .dash { stroke-dasharray: 6 5; }
.dg .grid { stroke: var(--line); stroke-width: 1; }
.dg .fa { fill: var(--fillA); }
.dg .fb { fill: var(--fillB); }
.dg .fc { fill: var(--fillC); }
.dg .dot { fill: var(--ink); }
.dg .dotp { fill: var(--pri); }
.dg .doto { fill: var(--acc); }
.dg text { fill: var(--ink); font: 700 15px 'Nunito', sans-serif; }
.dg text.sm { font-size: 12px; font-weight: 600; fill: var(--ink2); }
.dg text.tp { fill: var(--pri); }
.dg text.to { fill: var(--acc); }
.dg text.tg { fill: var(--good); }
.fig { margin: 16px 0; text-align: center; }
.fig figcaption { font-size: 14px; color: var(--muted); }

/* Summary / done */
.summary { background: linear-gradient(135deg, var(--good-soft), var(--paper)); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; margin-top: 30px; }
.summary ul { margin: 0; padding-left: 22px; }
.summary li { margin-bottom: 6px; }
.done-box { text-align: center; margin: 26px 0; }
.done-btn.is-done { background: var(--good); border-color: var(--good); }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px auto 30px; max-width: 820px; }
.ln { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.ln small { display: block; color: var(--muted); font-weight: 700; }
.ln.next { text-align: right; grid-column: 2; }
.ln:hover { border-color: var(--pri); }
@media (max-width: 560px) { .lesson-nav { grid-template-columns: 1fr; } .ln.next { grid-column: 1; } }

/* Test & board */
.scorebar { position: sticky; top: 72px; z-index: 30; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.scorebar .btn { margin-left: auto; }
.result-box { background: var(--paper); border: 2px solid var(--good); border-radius: 18px; padding: 20px; margin: 20px 0; text-align: center; }
.result-box:empty { display: none; }
.result-box h3 { font-size: 26px; }
.bq { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 16px 0; }
.bq.case { border: 2px solid var(--c, var(--pri)); }
.bq-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bq-head .qn { color: var(--pri); font-weight: 800; font-size: 18px; }
.bq .marks { background: var(--acc-soft); color: var(--acc); font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.bq-q > :last-child { margin-bottom: 0; }
.bq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.self { font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer; }
.bq-sol { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); }
.bq-sol > :last-child { margin-bottom: 0; }
.sol-tag { font-weight: 800; color: var(--info); margin-bottom: 6px; }
.paper-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.paper-id { margin-left: auto; color: var(--muted); }
.timer { font: 800 22px 'Baloo 2', sans-serif; color: var(--acc); background: var(--acc-soft); padding: 4px 14px; border-radius: 12px; }
.paper-sec { margin-top: 30px; }
.paper-sec h2 { background: var(--pri); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 21px; }
.paper-sec h2 small { font: 600 14px 'Nunito', sans-serif; opacity: .9; margin-left: 8px; }
.from-ch { font-size: 13px; color: var(--muted); font-weight: 700; }

/* Lab & widgets */
.lab-index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.lab-index a { text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 6px 12px; font-size: 14px; font-weight: 700; color: var(--ink); }
.lab-item { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 20px; padding: 20px; scroll-margin-top: 80px; }
.lab-head p { color: var(--ink2); }
.widget { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 18px 0; }
.lesson-body .widget::before { content: var(--l-widget); display: block; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--acc); margin-bottom: 8px; }
.w-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin-bottom: 12px; }
.w-controls label { display: flex; flex-direction: column; font-size: 14px; font-weight: 800; color: var(--ink2); gap: 4px; }
.w-controls input[type=number], .w-controls input[type=text], .w-controls select { font: 700 16px 'Nunito', sans-serif; padding: 7px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); width: 110px; }
.w-controls select { width: auto; }
.w-controls input[type=range] { width: 170px; accent-color: var(--pri); }
.w-controls .val { color: var(--pri); }
.w-out { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-top: 12px; font-size: 16px; }
.w-out p { margin: 0 0 6px; }
.w-out p:last-child { margin: 0; }
.w-big { font: 800 20px 'Baloo 2', sans-serif; color: var(--pri); }
.w-svg { display: block; width: 100%; margin: 0 auto; height: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; touch-action: none; }
.w-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .w-row { grid-template-columns: 1fr; } }
.w-note { font-size: 14px; color: var(--muted); margin-top: 8px; }
.w-steps { margin: 6px 0 0; padding-left: 20px; }
.w-steps li { margin-bottom: 4px; }
.pgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; max-width: 460px; }
.pgrid button { aspect-ratio: 1; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 8px; font: 800 14px 'Nunito', sans-serif; cursor: pointer; padding: 0; }
.pgrid button.cut { background: var(--bad-soft); color: var(--muted); text-decoration: line-through; }
.pgrid button.prime { background: var(--good); color: #fff; border-color: var(--good); }
.pgrid button.one { background: var(--line); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { background: var(--pri-soft); color: var(--pri); border-radius: 20px; padding: 3px 12px; font-weight: 800; font-size: 14px; }
.chip.o { background: var(--acc-soft); color: var(--acc); }
.chip.g { background: var(--good-soft); color: var(--good); }
.tab-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tab-btns button { border: 2px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 6px 12px; font: 800 14px 'Nunito', sans-serif; cursor: pointer; }
.tab-btns button.on { border-color: var(--pri); background: var(--pri); color: #fff; }
.dgrid { display: grid; grid-template-columns: 34px repeat(6, 1fr); gap: 3px; max-width: 480px; font-size: 13px; }
.dgrid div { text-align: center; padding: 6px 0; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); font-weight: 700; }
.dgrid div.h { background: var(--pri-soft); color: var(--pri); border: 0; }
.dgrid div.on { background: var(--good); color: #fff; border-color: var(--good); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.bars .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bars .bexp { width: 60%; background: var(--pri); border-radius: 6px 6px 0 0; transition: height .3s; }
.bars .bth { position: absolute; left: 10%; right: 10%; border-top: 3px dashed var(--acc); }
.bars small { font-size: 12px; font-weight: 800; margin-top: 4px; }
.stat-table input { width: 64px; font: 700 15px 'Nunito', sans-serif; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); text-align: center; }

/* Formula sheet */
.formula-sheet { columns: 2; column-gap: 20px; }
.fsec { break-inside: avoid; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--pri); border-radius: 16px; padding: 16px 20px; margin-bottom: 20px; display: inline-block; width: 100%; scroll-margin-top: 80px; }
.fsec h2 { font-size: 22px; }
.fsec ul { margin: 0; padding-left: 20px; }
.fsec li { margin-bottom: 8px; }
.fsec li small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
@media (max-width: 800px) { .formula-sheet { columns: 1; } }

.empty { text-align: center; padding: 60px 0; }
.foot { border-top: 1px solid var(--line); background: var(--paper); margin-top: 40px; padding: 24px 0; font-size: 14px; color: var(--muted); }
.foot-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot a { color: var(--ink2); font-weight: 700; }

/* ---------- v4.1: gamification, challenge zone, adaptive hints ---------- */
.xp-chip { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; text-decoration: none; color: var(--ink); background: var(--acc-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 14px; flex: none; }
.xp-chip:hover { border-color: var(--acc); }
.xp-chip + .lang-switch { margin-left: 0; }
@media (max-width: 420px) { .xc-xp { display: none; } .xp-chip { padding: 4px 9px; } }

.me-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 8px 0 16px; box-shadow: var(--shadow); }
.ms-level { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.ms-level small, .ms-stat small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.ms-level b { font: 700 18px 'Baloo 2', 'Noto Sans Devanagari', sans-serif; }
.ms-badge { font-size: 30px; width: 48px; height: 48px; display: grid; place-items: center; background: var(--pri-soft); border-radius: 14px; }
.ms-bar { flex: 1; min-width: 180px; }
.ms-bar-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 4px; }
.ms-track { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ms-track.big { height: 14px; }
.ms-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--pri)); border-radius: 999px; transition: width .6s; }
.ms-stat { display: flex; align-items: center; gap: 8px; }
.ms-stat > span { font-size: 24px; }
.ms-stat b { font: 800 20px 'Baloo 2', sans-serif; line-height: 1; }

.daily { display: flex; align-items: center; gap: 16px; text-decoration: none; color: #fff; background: linear-gradient(120deg, var(--c), #f76707); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.daily-tag { background: rgba(255,255,255,.2); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.daily-body b { display: block; font: 700 20px 'Baloo 2', 'Noto Sans Devanagari', sans-serif; }
.daily-body small { opacity: .92; font-size: 14px; }
.daily-go { margin-left: auto; font-size: 28px; font-weight: 800; }
@media (max-width: 560px) { .daily { flex-wrap: wrap; } .daily-go { display: none; } }

.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq details p { margin: 8px 0 0; color: var(--ink2); }

.chal-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; background: linear-gradient(135deg, var(--pri-soft), var(--paper)); border: 2px solid var(--pri); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.chal-card:hover { box-shadow: var(--shadow); }
.cc-stars, .cm-stars { margin-left: auto; color: #f59f00; font-size: 20px; letter-spacing: 2px; white-space: nowrap; }
.chal-head .kicker { color: var(--pri); }
.chal-meter { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin: 6px 0 8px; }
.chal-meter .cm-stars { margin-left: 0; font-size: 24px; }
.chal-meter .cm-text { font-weight: 800; }
.challenge .lesson-body > h2 small { font-size: 14px; color: var(--muted); font-weight: 700; }

.try.solved, .jtry.solved { border-color: var(--good) !important; }
.try.solved::after, .jtry.solved::after { content: '✓'; position: absolute; top: 10px; right: 14px; color: var(--good); font-weight: 800; font-size: 20px; }
.try, .jtry { position: relative; }
.try .sol.peek, .jtry .sol.peek { display: block; max-height: 6.2em; overflow: hidden; position: relative; cursor: pointer; }
.try .sol.peek::after, .jtry .sol.peek::after { content: attr(data-more); position: absolute; left: 0; right: 0; bottom: 0; height: 3.2em; background: linear-gradient(transparent, var(--paper)); }
.try .sol.peek::before, .jtry .sol.peek::before { content: var(--l-more, '▼'); position: absolute; right: 10px; bottom: 6px; z-index: 1; font-weight: 800; font-size: 13px; color: var(--pri); background: var(--paper); border: 1px solid var(--pri); border-radius: 999px; padding: 2px 10px; }
html[lang="en"] { --l-more: '▼ Tap to see the full solution'; }
html[lang="hi"] { --l-more: '▼ पूरा हल देखने के लिए दबाओ'; }

.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .3s, transform .3s; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 8px 16px; font-weight: 800; box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: none; }
.toast.xp { background: #f59f00; color: #1d1a3a; }
.toast.big { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 12px 18px; background: linear-gradient(120deg, #4b37d6, #f76707); color: #fff; }
.toast.big .t-ic { font-size: 32px; }
.toast.big small { display: block; font-size: 12px; opacity: .9; }
.toast.big b { font-size: 17px; }

.lvl-card { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 24px; box-shadow: var(--shadow); }
.lvl-icon { font-size: 56px; width: 88px; height: 88px; display: grid; place-items: center; background: var(--pri-soft); border-radius: 24px; }
.lvl-main h2 { margin: 2px 0 10px; }
.lvl-main p { margin: 8px 0 0; }
.lvl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.lvl-stats b { display: block; font: 800 26px 'Baloo 2', sans-serif; line-height: 1.1; }
.lvl-stats small { color: var(--muted); font-weight: 700; font-size: 12px; }
@media (max-width: 760px) { .lvl-card { grid-template-columns: 1fr; text-align: center; } .lvl-icon { margin: 0 auto; } }
.days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; margin-bottom: 24px; }
.day { aspect-ratio: 1; border-radius: 8px; background: var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--muted); }
.day.l1 { background: #b2f2bb; color: #1b5e20; } .day.l2 { background: #69db7c; color: #0b3d12; } .day.l3 { background: #2b8a3e; color: #fff; }
.day.today { outline: 2px solid var(--pri); }
@media (max-width: 520px) { .days { grid-template-columns: repeat(7, 1fr); } }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.bdg { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; text-align: center; }
.bdg .bi { font-size: 36px; display: block; }
.bdg b { display: block; font-size: 15px; margin: 4px 0 2px; }
.bdg small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; }
.bdg.locked .bi { filter: grayscale(1); opacity: .35; }
.bdg.locked b { color: var(--muted); }
.bdg.got { border-color: #f59f00; background: linear-gradient(180deg, var(--acc-soft), var(--paper)); }
.data-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.bk-box { width: 100%; margin-top: 10px; font: 13px monospace; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--paper); color: var(--ink); }
.pr-title { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
@media (max-width: 560px) { .pr-title { display: none; } .prog-t td, .prog-t th { padding: 8px 6px; font-size: 14px; } }
.prog-t td:nth-child(n+2), .prog-t th:nth-child(n+2) { text-align: center; white-space: nowrap; }

/* ---------- AccountsDost: journal, ledger, journal-entry practice, tools ---------- */
.jtry::before { content: var(--l-jtry) !important; }
.jt-box { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.jt-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jt-line.cr { padding-left: 28px; }
.jt-lab { font-weight: 800; font-size: 14px; min-width: 96px; }
.jt-lab.dr, b.dr { color: var(--pri); } .jt-lab.cr, b.cr { color: var(--acc); }
.jt-sel, .w-controls select, .ta-add input, .ta-add select { font: 700 15px 'Nunito', 'Noto Sans Devanagari', sans-serif; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); max-width: 100%; }
.jt-sel:focus { border-color: var(--pri); outline: none; }
@media (max-width: 520px) { .jt-line.cr { padding-left: 12px; } .jt-sel { width: 100%; } }
table.jr, table.lg { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; margin: 10px 0; }
table.jr th, table.lg th { background: var(--pri-soft); color: var(--ink); font-weight: 800; font-size: 13px; padding: 7px 8px; border: 1px solid var(--line); text-align: left; }
table.jr td, table.lg td { padding: 6px 8px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; }
table.jr td:nth-last-child(-n+2), table.jr th:nth-last-child(-n+2) { text-align: right; white-space: nowrap; width: 1%; }
table.jr td:first-child { white-space: nowrap; }
table.jr .drs { float: right; font-weight: 800; color: var(--pri); padding-left: 10px; }
table.jr td.to { padding-left: 34px; }
table.jr tr.narr td { font-style: italic; color: var(--ink2); font-size: 14px; border-bottom: 1px solid var(--line); }
table.jr tbody tr:last-child td, table.lg tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.jr tr.tot td, table.lg tr.tot td, table.t tr.tot td { font-weight: 800; border-top: 2px solid var(--ink2); border-bottom: 3px double var(--ink2); }
.ledger { margin: 14px 0; }
.lg-title { display: flex; justify-content: space-between; align-items: center; background: var(--pri); color: #fff; padding: 6px 12px; border-radius: 10px 10px 0 0; font-weight: 800; }
.lg-title b { font-family: 'Baloo 2', 'Noto Sans Devanagari', sans-serif; font-size: 17px; }
.ledger table.lg { margin-top: 0; }
table.lg td:nth-child(4), table.lg th:nth-child(4) { border-right: 3px solid var(--pri); text-align: right; white-space: nowrap; }
table.lg td:nth-child(8), table.lg th:nth-child(8) { text-align: right; white-space: nowrap; }
table.lg.lg4 td:nth-child(2), table.lg.lg4 th:nth-child(2) { border-right: 3px solid var(--pri); text-align: right; white-space: nowrap; }
table.lg.lg4 td:nth-child(4), table.lg.lg4 th:nth-child(4) { border-right: 1px solid var(--line); }
table.lg tr.bal td { color: var(--acc); font-weight: 700; }
.ta-del { border: 0; background: var(--bad-soft); color: var(--bad); border-radius: 6px; cursor: pointer; font-weight: 800; padding: 0 6px; margin-left: 4px; }
.w-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.w-score { font-weight: 800; color: var(--pri); }
.w-scene { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--acc); border-radius: 12px; padding: 12px 14px; font-weight: 700; }
.w-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.opt { font: 700 15px 'Nunito', 'Noto Sans Devanagari', sans-serif; border: 2px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 12px; padding: 9px 14px; cursor: pointer; }
.opt:hover { border-color: var(--pri); }
.opt.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.w-out .ok, .w-out p.ok { color: var(--good); font-weight: 800; }
.w-out .no, .w-out p.no { color: var(--bad); font-weight: 800; }
.w-quiz { margin-top: 14px; border-top: 2px dashed var(--line); padding-top: 12px; }
.eq-t td.up { color: var(--good); font-weight: 800; } .eq-t td.down { color: var(--bad); font-weight: 800; }
.eq-t td:not(:first-child), .eq-t th:not(:first-child) { text-align: right; white-space: nowrap; }
.eq-t th.grpA { background: var(--good-soft); text-align: center !important; } .eq-t th.grpL { background: var(--bad-soft); } .eq-t th.grpC { background: var(--acc-soft); }
.brs-items { display: grid; gap: 6px; margin-bottom: 8px; }
.brs-it { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 15px; }
.brs-it span { flex: 1; }
.brs-it input[type=number] { font: 700 15px 'Nunito', sans-serif; padding: 6px 8px; border: 2px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.brs-t td:not(:first-child) { text-align: right; white-space: nowrap; }
.brs-t tr.sub td { background: var(--bg); }
.tb-t td:nth-child(2) { text-align: right; }
.tb-b { border: 2px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 8px; padding: 4px 12px; font-weight: 800; cursor: pointer; }
.tb-b.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.tb-t tr.tb-ok td { background: var(--good-soft); } .tb-t tr.tb-no td { background: var(--bad-soft); }
.dep-svg .bar-s { fill: var(--pri); } .dep-svg .bar-w { fill: var(--acc); }
.dep-svg text { fill: var(--ink2); font: 600 11px 'Nunito', sans-serif; text-anchor: middle; }
.dep-svg .s { stroke: var(--ink2); } .dep-svg .thin { stroke-width: 1; }
@media print { .jt-box, .jtry .try-row { display: none !important; } .jtry .sol, .jtry .hint { display: block !important; } .lg-title { background: #eee !important; color: #000 !important; } }

@media print {
  .topbar, .foot, .paper-tools, .sir, .bq-actions, .scorebar, .lesson-nav, .done-box, .read-bar, .crumbs, .toasts, .me-strip, .daily, .try-row, .try-msg, .chal-meter, .widget, .ex-ctrl, .data-btns { display: none !important; }
  .try .sol, .try .hint, .ex ol.steps li, .ex .ans, .mcq .why, .jtry .sol, .jtry .hint { display: block !important; opacity: 1 !important; max-height: none !important; }
  .ex ol.steps li { display: list-item !important; }
  .try .sol.peek::after, .try .sol.peek::before, .jtry .sol.peek::after, .jtry .sol.peek::before { display: none !important; }
  a { color: #000; text-decoration: none; }
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) { --bg: #fff; --paper: #fff; --ink: #000; --ink2: #222; --muted: #444; --line: #bbb; --pri-soft: #f1f1f1; --good-soft: #eef8ee; --warn-soft: #fff8e0; --info-soft: #eef5fb; --acc-soft: #fff3e8; color-scheme: light; }
  h1, h2, h3 { break-after: avoid; }
  .ex, .try, .mcq, .rule, .trap, .story, table { break-inside: avoid; }
  body { background: #fff; color: #000; font-size: 13px; }
  .bq, .fsec, .page-head { box-shadow: none; border-color: #999; break-inside: avoid; }
  .bq-sol[hidden] { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 480px) { .topbar-in { gap: 8px; } .brand-text { font-size: 18px; } .brand-mark { width: 34px; height: 34px; font-size: 20px; } .xp-chip { padding: 4px 8px; gap: 6px; font-size: 13px; } .lang-switch a { padding: 4px 7px; } }
table.jr { min-width: 520px; }
table.lg { min-width: 640px; }
table.lg.lg4 { min-width: 420px; }
.ex .ans table, .sol table, .bq-sol table { color: var(--ink); font-weight: 400; }
.ex .ans table th, .sol table th { font-weight: 800; }
.tbl-wrap > table.jr, .tbl-wrap > table.lg { margin: 0; }
.brs-t td:not(:first-child), .brs-t th:not(:first-child), .tb-t td:not(:first-child), .tb-t th:not(:first-child) { width: 1%; white-space: nowrap; }
.brs-it { font-size: 14px; }
.dep-svg text.lgd { text-anchor: start; }
.eq-t td:first-child { min-width: 190px; }
.eq-t { min-width: 640px; }
