/* ===== Vindhyaedu ===== */
:root {
  --brand: #0d6b52;
  --brand-dark: #08523e;
  --brand-soft: #e7f4ef;
  --accent: #f2a31b;
  --ink: #17201c;
  --ink-2: #44514b;
  --muted: #6b7871;
  --line: #e2e8e4;
  --bg: #ffffff;
  --bg-2: #f6f8f7;
  --code-bg: #0f1a16;
  --ok: #138a4f;
  --bad: #c0392b;
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hindi: "Noto Sans Devanagari", "Mangal", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --top: 60px;
  --surface: #ffffff;
  --editor-bg: #fbfcfb;
  --gutter-bg: #f2f5f3;
  --topbar-bg: rgba(255,255,255,.96);
  --hero-grad: radial-gradient(1200px 500px at 85% -10%, #dff3ea 0%, transparent 60%), linear-gradient(160deg, #f0f8f4 0%, #fff 60%);
  --shadow: 0 10px 30px rgba(13, 107, 82, .10);
}
[data-theme="dark"] {
  --brand: #2fbf8f;
  --brand-dark: #23a179;
  --brand-soft: #12352a;
  --ink: #e6eeea;
  --ink-2: #b7c5be;
  --muted: #8a9a92;
  --line: #24332c;
  --bg: #0c1411;
  --bg-2: #121d19;
  --surface: #111b17;
  --editor-bg: #0f1915;
  --gutter-bg: #0d1613;
  --topbar-bg: rgba(12, 20, 17, .94);
  --hero-grad: radial-gradient(1200px 500px at 85% -10%, #123a2c 0%, transparent 60%), linear-gradient(160deg, #0f1b17 0%, #0c1411 60%);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
[lang="hi"], .hindi { font-family: var(--hindi), var(--font); }
code, pre, kbd { font-family: var(--mono); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; padding: 8px 16px; font: 600 14px/1.2 var(--font); cursor: pointer; transition: background .15s, border-color .15s, color .15s; text-decoration: none !important; }
.btn-lg { padding: 12px 22px; font-size: 16px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-outline.done { background: var(--brand-soft); color: var(--ok); border-color: var(--ok); }
.btn-run { background: var(--brand); color: #fff; }
.btn-run:hover { background: var(--brand-dark); }
.btn-check { background: var(--accent); color: #3a2600; }
.btn-check:hover { background: #e09213; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font: 600 13px var(--hindi); cursor: pointer; color: var(--brand); white-space: nowrap; }
.pill .pill-state { font: 700 11px var(--font); margin-left: 4px; }
.pill.off { color: var(--muted); }

/* ---- Top bar ---- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--topbar-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); height: var(--top); }
.topbar-inner { max-width: 1440px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 20px; padding: 0 20px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -.3px; text-decoration: none !important; }
.logo b { color: var(--brand); }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 6px; }
.topnav a:hover { background: var(--bg-2); text-decoration: none; color: var(--ink); }
.search { position: relative; margin-left: auto; width: 280px; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--bg-2); border-radius: 8px; padding: 8px 12px; font: 14px var(--font); outline: none; }
.search input:focus { border-color: var(--brand); background: var(--surface); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.12); overflow: hidden; }
.search-results a { display: block; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.search-results a:hover { background: var(--brand-soft); }
.search-results a small { display: block; color: var(--muted); font-size: 12px; }
.sr-empty { padding: 12px 14px; color: var(--muted); font-size: 14px; }
.menu-btn { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); padding: 4px 6px; }

/* ---- Hero / home ---- */
.hero { background: var(--hero-grad); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1100px; margin: 0 auto; padding: 72px 24px 64px; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 14px; letter-spacing: .3px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: -1.2px; margin: 0 0 18px; max-width: 820px; }
.hero h1 span { color: var(--brand); }
.hero-sub { font-size: 18px; color: var(--ink-2); max-width: 680px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 28px; flex-wrap: wrap; color: var(--ink-2); font-size: 15px; }
.hero-points li::before { content: "\2713"; color: var(--brand); font-weight: 800; margin-right: 8px; }
.home { max-width: 1100px; margin: 0 auto; padding: 48px 24px 64px; }
.track { margin-bottom: 48px; }
.track-head h2 { margin: 0; font-size: 26px; letter-spacing: -.4px; }
.track-head p { margin: 4px 0 18px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface); color: var(--ink); border-top: 4px solid var(--card-color, var(--brand)); transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(13,107,82,.12); text-decoration: none; }
.card-icon { font-size: 30px; }
.card h3 { margin: 10px 0 6px; font-size: 19px; }
.card p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; }
.card-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.card-soon { background: var(--bg-2); border-top-color: #c9d3ce; }
.card-soon .soon { color: var(--accent); }

/* ---- Course page ---- */
.course-hero { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.course-hero-inner { max-width: 1000px; margin: 0 auto; padding: 52px 24px; display: flex; gap: 28px; align-items: flex-start; }
.course-icon { font-size: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: 96px; height: 96px; display: grid; place-items: center; flex: none; }
.course-hero h1 { margin: 0 0 10px; font-size: 38px; letter-spacing: -.8px; }
.course-stats { display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-2); font-size: 14.5px; margin: -8px 0 22px; }
.course-main { max-width: 1000px; margin: 0 auto; padding: 40px 24px 64px; }
.outcomes ul { columns: 2; column-gap: 32px; padding-left: 0; list-style: none; }
.outcomes li { break-inside: avoid; padding: 4px 0 4px 26px; position: relative; }
.outcomes li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.chapter { border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 14px; }
.chapter h3 { margin: 0 0 8px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.ch-no { background: var(--brand-soft); color: var(--brand); border-radius: 8px; width: 30px; height: 30px; display: inline-grid; place-items: center; font-size: 14px; }
.chapter ol { margin: 0; padding-left: 60px; columns: 2; column-gap: 28px; }
.chapter li { padding: 3px 0; break-inside: avoid; }
a.is-done::after { content: " \2713"; color: var(--ok); font-weight: 800; }

/* ---- Lesson layout ---- */
.lesson-wrap { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; }
.sidebar { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; border-right: 1px solid var(--line); padding: 18px 10px 40px 18px; background: var(--surface); }
.side-course { display: block; font-weight: 800; color: var(--ink); font-size: 16px; padding: 4px 8px 10px; }
.side-progress { padding: 0 8px 14px; }
.side-progress .bar { height: 6px; background: var(--bg-2); border-radius: 9px; overflow: hidden; }
.side-progress .bar span { display: block; height: 100%; background: var(--brand); width: 0; transition: width .3s; }
.side-progress small { color: var(--muted); font-size: 12px; }
.side-ch-title { width: 100%; text-align: left; border: 0; background: none; font: 700 12.5px var(--font); text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 12px 8px 6px; cursor: pointer; display: flex; justify-content: space-between; }
.side-ch-title::after { content: "+"; font-size: 14px; }
.side-chapter.open .side-ch-title::after { content: "\2013"; }
.side-chapter ul { list-style: none; margin: 0; padding: 0; display: none; }
.side-chapter.open ul { display: block; }
.side-chapter a, .side-chapter li > span { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); font-size: 14.5px; line-height: 1.35; }
.side-chapter a:hover { background: var(--bg-2); text-decoration: none; color: var(--ink); }
.side-chapter a.active { background: var(--brand); color: #fff; font-weight: 600; }
.side-chapter a.active.is-done::after { color: #fff; }

.lesson { padding: 28px 48px 80px; min-width: 0; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.lesson > h1 { font-size: 38px; letter-spacing: -.9px; line-height: 1.15; margin: 0 0 10px; }
.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 18px; }
.pager-top { display: flex; justify-content: space-between; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.content { max-width: 820px; }
.content h2 { font-size: 27px; letter-spacing: -.5px; margin: 44px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.content h2:first-child { border-top: 0; margin-top: 0; }
.content h3 { font-size: 20px; margin: 30px 0 8px; }
.content p, .content li { color: var(--ink); }
.content .headerlink { opacity: 0; margin-left: 8px; color: var(--muted); font-weight: 400; }
.content h2:hover .headerlink, .content h3:hover .headerlink { opacity: 1; }
.content :not(pre) > code { background: #eef3f0; color: #0b5a45; padding: 2px 6px; border-radius: 5px; font-size: .88em; }
.table-wrap { overflow-x: auto; margin: 18px 0; }
.content table { border-collapse: collapse; width: 100%; font-size: 15px; }
.content th, .content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.content th { background: var(--bg-2); font-weight: 700; }
.content tr:nth-child(even) td { background: var(--editor-bg); }
.content img { max-width: 100%; }
.content blockquote { margin: 18px 0; padding: 4px 18px; border-left: 4px solid var(--brand); color: var(--ink-2); background: var(--bg-2); border-radius: 0 8px 8px 0; }

/* code blocks */
.highlight { position: relative; margin: 16px 0; }
.highlight pre { background: var(--code-bg); color: #e6efe9; padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: 14.5px; line-height: 1.6; margin: 0; }
.copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.1); color: #cfe0d8; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 3px 9px; font: 600 12px var(--font); cursor: pointer; opacity: 0; transition: opacity .15s; }
.highlight:hover .copy-btn { opacity: 1; }

/* boxes */
.box { border-radius: var(--radius); padding: 14px 18px; margin: 20px 0; border: 1px solid; }
.box-title { font-weight: 700; font-size: 14px; letter-spacing: .2px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.box-body > :first-child { margin-top: 0; }
.box-body > :last-child { margin-bottom: 0; }
.box-note { background: #eef5fb; border-color: #cfe1f1; } .box-note .box-title { color: #1f5c8e; } .box-note .box-title::before { content: "i"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #1f5c8e; color: #fff; font-size: 12px; font-style: italic; font-family: Georgia, serif; }
.box-tip { background: #eaf6ef; border-color: #c7e6d4; } .box-tip .box-title { color: var(--ok); } .box-tip .box-title::before { content: "\2605"; }
.box-warning { background: #fdf3ec; border-color: #f3d3bd; } .box-warning .box-title { color: #b4501b; } .box-warning .box-title::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #b4501b; color: #fff; font-size: 12px; }
.box-info { background: #f5f1fb; border-color: #ddd1ef; } .box-info .box-title { color: #5b3e8e; } .box-info .box-title::before { content: "?"; font-weight: 800; }
.box-example { background: var(--surface); border-color: var(--line); border-left: 4px solid var(--brand); } .box-example .box-title { color: var(--brand); }
.box-hindi { background: #fff8ea; border-color: #f4dfaf; border-left: 4px solid var(--accent); font-family: var(--hindi), var(--font); font-size: 16.5px; line-height: 1.8; }
.box-hindi .box-title { color: #9a6200; font-size: 15px; }
.box-hindi .box-title::before { content: "\0905"; display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--accent); color: #fff; border-radius: 6px; font-size: 13px; }
.box-hindi code { font-family: var(--mono); }
html.no-hindi .box-hindi { display: none; }
.sample-out { margin: -8px 0 18px; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.sample-out-head { background: var(--bg-2); font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 5px 14px; border-bottom: 1px solid var(--line); }
.sample-out pre { margin: 0; padding: 12px 16px; font-size: 14px; background: var(--surface); overflow-x: auto; }
.highlight + .sample-out { margin-top: -16px; }

/* try it */
.tryit, .exercise { border: 1px solid var(--line); border-radius: 12px; margin: 22px 0; overflow: hidden; background: var(--surface); box-shadow: 0 2px 10px rgba(0,0,0,.03); }
.tryit-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
.tryit-lang { font-size: 12px; opacity: .8; font-weight: 600; }
.tryit textarea.tryit-code, .exercise textarea.ex-code { width: 100%; border: 0; font: 14.5px/1.6 var(--mono); padding: 12px 16px; resize: vertical; outline: none; background: var(--editor-bg); display: block; }
.tryit .CodeMirror, .exercise .CodeMirror { height: auto; font: 14.5px/1.6 var(--mono); background: var(--editor-bg); border-bottom: 1px solid var(--line); }
.exercise .CodeMirror { border-top: 1px solid var(--line); min-height: 90px; }
.CodeMirror-gutters { background: var(--gutter-bg); border-right: 1px solid var(--line); }
.CodeMirror-scroll { min-height: 60px; }
.tryit-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.tryit-stdin { width: calc(100% - 28px); margin: 0 14px 10px; border: 1px dashed #b8c7bf; border-radius: 8px; font: 14px var(--mono); padding: 8px 10px; min-height: 60px; outline: none; }
.tryit-out { margin: 0; padding: 12px 16px; background: var(--code-bg); color: #d7f5e5; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; }
.tryit-out::before { content: "OUTPUT"; display: block; font: 700 10.5px var(--font); letter-spacing: 1.2px; color: #7fa594; margin-bottom: 6px; }
.tryit-out.out-error { color: #ffb4a8; }
.tryit-out.out-info { color: #9fc1b2; font-style: italic; }
.tryit-frame { width: 100%; height: 260px; border: 0; border-top: 1px solid var(--line); background: var(--surface); display: block; }

/* exercises */
.exercises, .quiz { max-width: 820px; margin-top: 48px; }
.exercises h2, .quiz h2 { font-size: 27px; letter-spacing: -.5px; margin: 0 0 4px; }
.ex-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.ex-head h3 { margin: 0; font-size: 17px; flex: 1; }
.ex-no { background: var(--accent); color: #3a2600; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ex-status { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.exercise.passed { border-color: #a8d9bf; }
.exercise.passed .ex-no { background: var(--ok); color: #fff; }
.ex-task { padding: 4px 16px 4px; }
.ex-task p { margin: 6px 0; }
.ex-stdin, .ex-expected { margin: 0 16px 10px; font-size: 13.5px; }
.ex-stdin pre, .ex-expected pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 4px 0 0; font-size: 13.5px; }
.ex-hint { margin: 0 14px 12px; padding: 10px 14px; background: #fff8ea; border-radius: 8px; font-size: 14.5px; }
.ex-hint p { margin: 0; }
.ex-results { padding: 10px 16px 14px; font-size: 14px; }
.ex-verdict { font-weight: 800; margin-bottom: 6px; }
.ex-verdict.ok, .ex-test.ok { color: var(--ok); }
.ex-verdict.bad, .ex-test.bad { color: var(--bad); }
.ex-test { font-family: var(--mono); font-size: 13px; padding: 2px 0; word-break: break-word; }

/* quiz */
.q { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 14px 0; }
.q-text p { display: inline; margin: 0; }
.q-text { font-weight: 600; margin-bottom: 10px; }
.q-no { color: var(--brand); font-weight: 800; margin-right: 4px; }
.q-options { display: grid; gap: 8px; }
.q-opt { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 12px; font: 15px var(--font); cursor: pointer; display: flex; gap: 10px; align-items: baseline; color: var(--ink); }
.q-opt p { margin: 0; display: inline; }
.q-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.q-letter { font-weight: 800; color: var(--muted); font-size: 13px; }
.q.done .q-opt { cursor: default; }
.q.done .q-opt:hover { background: var(--surface); border-color: var(--line); }
.q-opt.right, .q.done .q-opt.right:hover { background: #e6f5ec; border-color: var(--ok); }
.q-opt.wrong, .q.done .q-opt.wrong:hover { background: #fbeceb; border-color: var(--bad); }
.q-explain { margin-top: 10px; padding: 10px 14px; background: var(--bg-2); border-radius: 8px; font-size: 14.5px; }
.q-explain p { margin: 0; }
.quiz-score { font-size: 18px; font-weight: 800; color: var(--brand); padding: 14px 18px; background: var(--brand-soft); border-radius: 12px; }

.complete-row { max-width: 820px; margin: 40px 0 10px; text-align: center; }
.pager { max-width: 820px; display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; }
.pager-card { flex: 1; max-width: 48%; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; color: var(--ink); }
.pager-card:hover { border-color: var(--brand); text-decoration: none; }
.pager-card small { display: block; color: var(--muted); font-weight: 600; }
.pager-card.next { text-align: right; margin-left: auto; }

.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 32px 18px; font-size: 13.5px; }
.toc-title { font-weight: 800; text-transform: uppercase; letter-spacing: .6px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 4px 12px; color: var(--ink-2); line-height: 1.4; }
.toc a:hover { color: var(--brand); text-decoration: none; }

/* footer */
.footer { background: #0f1a16; color: #b9c8c0; margin-top: 0; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 44px 24px 24px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; margin: 0 0 10px; font-size: 14px; }
.footer a, .footer span { display: block; color: #b9c8c0; font-size: 14px; padding: 2px 0; }
.logo-footer { color: #fff; } .logo-footer b { color: #5fd3a8; }
.footer-bottom { text-align: center; font-size: 13px; padding: 16px; border-top: 1px solid #22302a; }
.lesson-layout .footer { display: none; }
.notfound { text-align: center; padding: 100px 20px; } .notfound h1 { font-size: 72px; margin: 0; color: var(--brand); }

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .lesson-wrap { grid-template-columns: 250px minmax(0, 1fr); }
  .toc { display: none; }
  .lesson { padding: 24px 32px 70px; }
}
@media (max-width: 860px) {
  .topnav { gap: 0; }
  .topnav a { padding: 6px 6px; font-size: 13px; }
  .topnav a:nth-child(n+3) { display: none; }
  .lesson-layout .topnav { display: none; }
  .search { width: auto; flex: 1; }
  .lesson-wrap { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .sidebar { position: fixed; left: 0; top: var(--top); width: 290px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 8px 0 30px rgba(0,0,0,.12); }
  body.side-open .sidebar { transform: none; }
  .lesson { padding: 20px 18px 60px; }
  .lesson > h1 { font-size: 30px; }
  .content h2 { font-size: 23px; }
  .outcomes ul, .chapter ol { columns: 1; }
  .chapter ol { padding-left: 22px; }
  .course-hero-inner { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
  .logo span { display: none; }
  .pager-card { max-width: none; }
}

/* ---- Pygments (one-dark) ---- */
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #7F848E } /* Comment */
.highlight .err { color: #ABB2BF } /* Error */
.highlight .esc { color: #ABB2BF } /* Escape */
.highlight .g { color: #ABB2BF } /* Generic */
.highlight .k { color: #C678DD } /* Keyword */
.highlight .l { color: #ABB2BF } /* Literal */
.highlight .n { color: #E06C75 } /* Name */
.highlight .o { color: #56B6C2 } /* Operator */
.highlight .x { color: #ABB2BF } /* Other */
.highlight .p { color: #ABB2BF } /* Punctuation */
.highlight .ch { color: #7F848E } /* Comment.Hashbang */
.highlight .cm { color: #7F848E } /* Comment.Multiline */
.highlight .cp { color: #7F848E } /* Comment.Preproc */
.highlight .cpf { color: #7F848E } /* Comment.PreprocFile */
.highlight .c1 { color: #7F848E } /* Comment.Single */
.highlight .cs { color: #7F848E } /* Comment.Special */
.highlight .gd { color: #E06C75 } /* Generic.Deleted */
.highlight .ge { color: #ABB2BF; font-style: italic } /* Generic.Emph */
.highlight .ges { color: #ABB2BF } /* Generic.EmphStrong */
.highlight .gr { color: #E06C75 } /* Generic.Error */
.highlight .gh { color: #ABB2BF; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #98C379 } /* Generic.Inserted */
.highlight .go { color: #E06C75 } /* Generic.Output */
.highlight .gp { color: #ABB2BF } /* Generic.Prompt */
.highlight .gs { color: #ABB2BF; font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #ABB2BF; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #E06C75 } /* Generic.Traceback */
.highlight .kc { color: #E5C07B } /* Keyword.Constant */
.highlight .kd { color: #C678DD } /* Keyword.Declaration */
.highlight .kn { color: #C678DD } /* Keyword.Namespace */
.highlight .kp { color: #C678DD } /* Keyword.Pseudo */
.highlight .kr { color: #C678DD } /* Keyword.Reserved */
.highlight .kt { color: #E5C07B } /* Keyword.Type */
.highlight .ld { color: #ABB2BF } /* Literal.Date */
.highlight .m { color: #D19A66 } /* Literal.Number */
.highlight .s { color: #98C379 } /* Literal.String */
.highlight .na { color: #E06C75 } /* Name.Attribute */
.highlight .nb { color: #E5C07B } /* Name.Builtin */
.highlight .nc { color: #E5C07B } /* Name.Class */
.highlight .no { color: #E06C75 } /* Name.Constant */
.highlight .nd { color: #61AFEF } /* Name.Decorator */
.highlight .ni { color: #E06C75 } /* Name.Entity */
.highlight .ne { color: #E06C75 } /* Name.Exception */
.highlight .nf { color: #61AFEF; font-weight: bold } /* Name.Function */
.highlight .nl { color: #E06C75 } /* Name.Label */
.highlight .nn { color: #E06C75 } /* Name.Namespace */
.highlight .nx { color: #E06C75 } /* Name.Other */
.highlight .py { color: #E06C75 } /* Name.Property */
.highlight .nt { color: #E06C75 } /* Name.Tag */
.highlight .nv { color: #E06C75 } /* Name.Variable */
.highlight .ow { color: #56B6C2 } /* Operator.Word */
.highlight .pm { color: #ABB2BF } /* Punctuation.Marker */
.highlight .w { color: #ABB2BF } /* Text.Whitespace */
.highlight .mb { color: #D19A66 } /* Literal.Number.Bin */
.highlight .mf { color: #D19A66 } /* Literal.Number.Float */
.highlight .mh { color: #D19A66 } /* Literal.Number.Hex */
.highlight .mi { color: #D19A66 } /* Literal.Number.Integer */
.highlight .mo { color: #D19A66 } /* Literal.Number.Oct */
.highlight .sa { color: #98C379 } /* Literal.String.Affix */
.highlight .sb { color: #98C379 } /* Literal.String.Backtick */
.highlight .sc { color: #98C379 } /* Literal.String.Char */
.highlight .dl { color: #98C379 } /* Literal.String.Delimiter */
.highlight .sd { color: #98C379 } /* Literal.String.Doc */
.highlight .s2 { color: #98C379 } /* Literal.String.Double */
.highlight .se { color: #98C379 } /* Literal.String.Escape */
.highlight .sh { color: #98C379 } /* Literal.String.Heredoc */
.highlight .si { color: #98C379 } /* Literal.String.Interpol */
.highlight .sx { color: #98C379 } /* Literal.String.Other */
.highlight .sr { color: #98C379 } /* Literal.String.Regex */
.highlight .s1 { color: #98C379 } /* Literal.String.Single */
.highlight .ss { color: #98C379 } /* Literal.String.Symbol */
.highlight .bp { color: #E5C07B } /* Name.Builtin.Pseudo */
.highlight .fm { color: #56B6C2; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #E06C75 } /* Name.Variable.Class */
.highlight .vg { color: #E06C75 } /* Name.Variable.Global */
.highlight .vi { color: #E06C75 } /* Name.Variable.Instance */
.highlight .vm { color: #E06C75 } /* Name.Variable.Magic */
.highlight .il { color: #D19A66 } /* Literal.Number.Integer.Long */
.highlight pre, .highlight pre span { background: transparent; }
.highlight pre { background: var(--code-bg); }

/* ===================== Programs ===================== */
.track-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.track-head-row p { margin-bottom: 0; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid #e6e2d6; border-radius: 16px; overflow: hidden; color: var(--ink); transition: transform .15s, box-shadow .15s; text-decoration: none !important; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.10); }
.pcard-top { position: relative; height: 92px; background:
  radial-gradient(circle at 78% 30%, rgba(255,255,255,.35) 0 18px, transparent 19px),
  radial-gradient(circle at 70% 60%, transparent 0 46px, rgba(255,255,255,.18) 47px 48px, transparent 49px),
  radial-gradient(rgba(255,255,255,.28) 1px, transparent 1.4px) 0 0 / 14px 14px,
  linear-gradient(120deg, var(--g1), var(--g2)); }
.pcard-icon { position: absolute; left: 18px; bottom: -22px; width: 52px; height: 52px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-size: 28px; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.pbadge { position: absolute; top: 12px; right: 12px; font: 800 10.5px var(--font); letter-spacing: .6px; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: #111; color: #fff; }
.pbadge-bestseller { background: #e5484d; }
.pbadge-new { background: #e8890c; }
.pbadge-essential { background: var(--surface); color: #111; }
.pbadge-light { position: static; display: inline-block; background: rgba(255,255,255,.95); color: #111; margin-left: 10px; }
.pcard-body { padding: 32px 18px 14px; flex: 1; }
.pcard-body h3 { margin: 0 0 2px; font-size: 18px; letter-spacing: -.2px; }
.pcard-tag { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.pcard-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.pdepth { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pdepth small { color: var(--muted); font-size: 11.5px; }
.pdepth-bar { flex: 1; height: 5px; background: #eeebe3; border-radius: 9px; overflow: hidden; }
.pdepth-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--g1), var(--g2)); border-radius: 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; background: #f3f1ea; border: 1px solid #e6e2d6; color: #3d3a33; padding: 3px 9px; border-radius: 6px; }
.chip-role { background: var(--brand-soft); border-color: #cfe7dd; color: var(--brand-dark); }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px dashed #e6e2d6; }
.pcard-foot b { display: block; font-size: 14px; }
.pcard-foot small { color: var(--muted); font-size: 12px; }
.pcard-cta { background: #111a17; color: #fff; font: 700 12.5px var(--font); padding: 9px 14px; border-radius: 999px; white-space: nowrap; }

.page-hero { background: var(--hero-grad); border-bottom: 1px solid var(--line); }
.page-hero-inner { max-width: 1100px; margin: 0 auto; padding: 56px 24px 44px; }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -1px; margin: 0 0 12px; line-height: 1.12; }

.prog-hero { background:
  radial-gradient(rgba(255,255,255,.18) 1px, transparent 1.4px) 0 0 / 16px 16px,
  linear-gradient(90deg, rgba(10,20,16,.42), rgba(10,20,16,.08)),
  linear-gradient(120deg, var(--g1), var(--g2)); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.prog-hero .btn, .prog-hero .pbadge { text-shadow: none; }
.prog-hero-inner { max-width: 1180px; margin: 0 auto; padding: 40px 24px 48px; }
.crumb-light { color: rgba(255,255,255,.9); font-size: 14px; font-weight: 600; }
.prog-hero h1 { font-size: clamp(30px, 4.5vw, 46px); letter-spacing: -1px; margin: 14px 0 6px; display: flex; align-items: center; gap: 14px; }
.prog-icon { background: var(--surface); border-radius: 16px; width: 64px; height: 64px; display: inline-grid; place-items: center; font-size: 34px; flex: none; }
.prog-tag { font-size: 20px; font-weight: 600; margin: 0 0 10px; opacity: .95; }
.prog-desc { max-width: 760px; font-size: 16.5px; opacity: .95; margin: 0 0 22px; }
.prog-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.prog-stats div { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 12px; padding: 10px 16px; min-width: 120px; }
.prog-stats b { display: block; font-size: 20px; }
.prog-stats small { opacity: .9; }
.btn-light { background: var(--surface); color: #111; }
.btn-light:hover { background: #f1f1f1; }
.prog-main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 70px; }
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 34px; }
.how-step { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.how-step span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.how-step b { display: block; }
.how-step p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.prog-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.roadmap h2 { font-size: 26px; margin: 0 0 16px; }
.road { list-style: none; padding: 0; margin: 0; position: relative; }
.road::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.road-item { position: relative; display: flex; gap: 16px; margin-bottom: 16px; }
.road-no { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; z-index: 1; box-shadow: 0 0 0 5px #fff; }
.road-item.soon .road-no { background: #c9d3ce; }
.road-card { flex: 1; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: var(--surface); }
.road-item.ready .road-card { border-color: #bfe0d2; }
.road-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.road-head small { color: var(--muted); font-weight: 600; }
.road-head h3 { margin: 2px 0 4px; font-size: 18px; }
.road-head h3 a { color: var(--ink); }
.road-status { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.road-item.soon .road-status { background: #fdf3e2; color: #a86a00; }
.road-card > p { margin: 4px 0 10px; color: var(--ink-2); font-size: 15px; }
.road-syllabus { margin-top: 10px; }
.road-syllabus summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 14px; }
.road-ch { margin-top: 10px; font-size: 14.5px; }
.road-ch ul { margin: 4px 0 0; padding-left: 20px; columns: 2; column-gap: 20px; }
.road-ch li { break-inside: avoid; padding: 2px 0; }
.road-project { margin-top: 10px; font-size: 14px; background: #fff8ea; border-radius: 8px; padding: 8px 12px; }
.prog-side { position: sticky; top: calc(var(--top) + 16px); display: grid; gap: 14px; }
.side-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.side-card h3 { margin: 0 0 10px; font-size: 16px; }
.ticks { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.ticks li { padding: 4px 0 4px 24px; position: relative; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.ds-list { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.ds-list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.ds-list li:last-child { border-bottom: 0; }
.ds-list small { display: block; color: var(--muted); font-size: 12.5px; }
.side-cta { background: #0f1a16; color: #dce7e1; border-color: #0f1a16; }
.side-cta h3 { color: #fff; }
.side-cta p { margin: 0 0 6px; font-size: 14px; }
.side-cta .muted { color: #9bb1a7; font-size: 13px; }
.in-programs { margin: -6px 0 18px; font-size: 14px; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill-link { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-weight: 600; color: var(--ink); }
.pager-module { border-color: var(--brand); background: var(--brand-soft); }

/* ===================== SQL & charts & datasets ===================== */
.tryit-files { font-size: 11px; background: rgba(255,255,255,.18); border-radius: 5px; padding: 2px 7px; margin-right: 8px; font-weight: 600; }
.tryit-extra:empty { display: none; }
.tryit-extra { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.sql-table-wrap { overflow-x: auto; margin-bottom: 10px; }
.sql-table { border-collapse: collapse; font: 13.5px var(--mono); min-width: 40%; }
.sql-table th { background: #eef5f1; color: var(--brand-dark); text-align: left; padding: 6px 12px; border: 1px solid #d9e6df; font-weight: 700; }
.sql-table td { padding: 5px 12px; border: 1px solid var(--line); white-space: nowrap; }
.sql-table td.num { text-align: right; }
.sql-table tr:nth-child(even) td { background: #fafcfb; }
.sql-count { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sql-msg { font-size: 13.5px; color: var(--ink-2); padding: 4px 0; }
.sql-error { font: 13.5px var(--mono); color: var(--bad); background: #fdf0ef; border-radius: 8px; padding: 8px 12px; }
.plot-img { max-width: 100%; display: block; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.box-dataset { background: #f2f7ff; border-color: #cddcf3; border-left: 4px solid #2f6fd6; }
.box-dataset .box-title { color: #1d4f9c; }
.box-dataset .box-title::before { content: "\25A6"; font-size: 16px; }
.box-project { background: var(--surface); border: 2px solid var(--brand); }
.box-project .box-title { color: var(--brand); font-size: 15px; }
.box-project .box-title::before { content: "\2692"; font-size: 16px; }
details.answer { border: 1px dashed #b8c7bf; border-radius: 10px; margin: 10px 0 16px; background: #fbfdfc; }
details.answer summary { cursor: pointer; padding: 9px 14px; font-weight: 700; color: var(--brand); font-size: 14.5px; }
details.answer[open] summary { border-bottom: 1px dashed #d4e0da; }
.answer-body { padding: 8px 16px; }
.answer-body > :first-child { margin-top: 4px; }
.ex-stdin a { font-weight: 600; }

@media (max-width: 980px) {
  .prog-grid { grid-template-columns: 1fr; }
  .prog-side { position: static; }
  .how { grid-template-columns: 1fr 1fr; }
  .road-ch ul { columns: 1; }
}

/* ======================= v3: dark mode overrides ======================= */
[data-theme="dark"] .content :not(pre) > code { background: #1a2a24; color: #d6efe4; }
[data-theme="dark"] .box-note { background: #0f2131; border-color: #1d3a55; }
[data-theme="dark"] .box-tip { background: #0f261c; border-color: #1d4634; }
[data-theme="dark"] .box-warning { background: #2a1a10; border-color: #4a2d19; }
[data-theme="dark"] .box-info { background: #1d1730; border-color: #352a57; }
[data-theme="dark"] .box-hindi, [data-theme="dark"] .ex-hint, [data-theme="dark"] .road-project { background: #2a2312; border-color: #4a3d18; }
[data-theme="dark"] .q-opt.right, [data-theme="dark"] .q.done .q-opt.right:hover { background: #10301f; }
[data-theme="dark"] .q-opt.wrong, [data-theme="dark"] .q.done .q-opt.wrong:hover { background: #351615; }
[data-theme="dark"] .chip, [data-theme="dark"] .pdepth-bar { background: #1c2924; color: var(--ink-2); }
[data-theme="dark"] .road-item.soon .road-status { background: #2a2312; }
[data-theme="dark"] .sql-table th { background: #15241e; }
[data-theme="dark"] .sql-table tr:nth-child(even) td { background: #101a16; }
[data-theme="dark"] .sql-error { background: #351615; }
[data-theme="dark"] .box-dataset { background: #0f1d31; }
[data-theme="dark"] details.answer { background: #101a16; }
[data-theme="dark"] .card-soon { background: var(--bg-2); border-top-color: #2b3a33; }
[data-theme="dark"] .btn-outline { background: transparent; }
[data-theme="dark"] .CodeMirror { color: #dfe9e4; }
[data-theme="dark"] .CodeMirror-cursor { border-left-color: #e6eeea; }
[data-theme="dark"] .CodeMirror-linenumber { color: #5d6f66; }
[data-theme="dark"] .CodeMirror-selected, [data-theme="dark"] .CodeMirror-focused .CodeMirror-selected { background: #23453a; }
[data-theme="dark"] .cm-s-default .cm-keyword { color: #c792ea; }
[data-theme="dark"] .cm-s-default .cm-def, [data-theme="dark"] .cm-s-default .cm-variable-2 { color: #82aaff; }
[data-theme="dark"] .cm-s-default .cm-string { color: #c3e88d; }
[data-theme="dark"] .cm-s-default .cm-number { color: #f78c6c; }
[data-theme="dark"] .cm-s-default .cm-comment { color: #6f8a7e; }
[data-theme="dark"] .cm-s-default .cm-builtin, [data-theme="dark"] .cm-s-default .cm-type, [data-theme="dark"] .cm-s-default .cm-variable-3 { color: #ffcb6b; }
[data-theme="dark"] .cm-s-default .cm-meta, [data-theme="dark"] .cm-s-default .cm-tag { color: #f07178; }
[data-theme="dark"] .cm-s-default .cm-attribute, [data-theme="dark"] .cm-s-default .cm-property { color: #89ddff; }
[data-theme="dark"] .cm-s-default .cm-atom, [data-theme="dark"] .cm-s-default .cm-operator { color: #89ddff; }
[data-theme="dark"] .search input:focus { background: var(--surface); }
[data-theme="dark"] .pill { background: transparent; }
.logo-mark { flex: none; display: block; border-radius: 10px; box-shadow: 0 2px 6px rgba(9,74,56,.25); transition: transform .2s; }
.logo:hover .logo-mark { transform: rotate(-4deg) scale(1.05); }
.logo-footer .logo-mark { box-shadow: none; }
.footer .logo-footer span { display: inline; font-size: 21px; color: #fff; padding: 0; }
.footer .logo-footer { margin-bottom: 6px; }

/* ======================= v3: top bar extras ======================= */
.icon-btn { border: 1px solid var(--line); background: transparent; color: var(--ink); width: 34px; height: 34px; border-radius: 999px; cursor: pointer; font-size: 16px; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--bg-2); }
.xp-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; text-decoration: none !important; }
.xp-chip b { color: var(--ink); margin: 0 2px; }
.xp-chip .st { border-left: 1px solid var(--line); padding-left: 8px; }
.xp-chip:hover { border-color: var(--brand); }
.read-progress { position: fixed; top: var(--top); left: 0; right: 0; height: 3px; z-index: 49; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .1s linear; }

/* toasts + confetti */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 16px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: baseline; animation: toastIn .25s ease-out; transition: opacity .4s, transform .4s; }
.toast b { color: var(--accent); font-size: 16px; }
.toast span { font-size: 14px; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 190; }

/* ======================= v3: home ======================= */
.hero-split .hero-inner { max-width: 1180px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 40px; }
.hero-split h1 { font-size: clamp(32px, 4.4vw, 50px); }
.hero-code { background: #0f1a16; border-radius: 16px; box-shadow: 0 24px 60px rgba(8, 40, 30, .28); overflow: hidden; border: 1px solid #1f2f28; transform: perspective(1200px) rotateY(-4deg) rotateX(2deg); transition: transform .4s; }
.hero-code:hover { transform: none; }
.hc-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #15231e; border-bottom: 1px solid #22332c; }
.hc-bar > i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; display: inline-block; }
.hc-bar > i:nth-child(2) { background: #febc2e; } .hc-bar > i:nth-child(3) { background: #28c840; }
.hc-tabs { margin-left: 12px; display: flex; gap: 4px; flex-wrap: wrap; }
.hc-tabs b { font: 500 12px var(--mono); color: #8fa69b; padding: 3px 9px; border-radius: 6px; cursor: pointer; }
.hc-tabs b.on { background: #0f1a16; color: #e6f2ec; }
.hc-code { margin: 0; padding: 18px 20px; min-height: 190px; color: #d7e6df; font: 14px/1.65 var(--mono); white-space: pre-wrap; }
.hc-out { border-top: 1px dashed #2a3c34; padding: 10px 20px 16px; }
.hc-run { font: 600 12px var(--font); color: #2fbf8f; }
.hc-out pre { margin: 6px 0 0; color: #f2c46d; font: 13.5px/1.55 var(--mono); min-height: 66px; white-space: pre-wrap; }
.continue-box { margin-top: 22px; font-size: 15px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: inline-block; }
.continue-box a { font-weight: 700; }
.stats-strip { max-width: 1180px; margin: 0 auto; padding: 0 24px 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats-strip div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.stats-strip b { display: block; font-size: 28px; font-weight: 800; color: var(--brand); letter-spacing: -.5px; }
.stats-strip span { color: var(--muted); font-size: 14px; font-weight: 600; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 8px 0 56px; }
.feature { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--surface); }
.feature h3 { margin: 10px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.f-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 18px; font-weight: 800; }
.track-soon { opacity: .9; }

/* cards: lift, ring, filter */
.card { position: relative; overflow: hidden; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--card-color, var(--brand)); opacity: .07; transition: transform .3s; }
.card:hover::after { transform: scale(1.4); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--card-color, var(--brand)) calc(var(--p) * 1%), var(--line) 0); position: relative; z-index: 1; }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 11px; font-weight: 800; color: var(--ink); }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fchip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 14px; font: 600 13.5px var(--font); cursor: pointer; }
.fchip:hover { border-color: var(--brand); color: var(--brand); }
.fchip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-bar { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; align-items: center; }
.filter-input { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 8px 12px; font: 14px var(--font); min-width: 220px; }
.empty-msg { text-align: center; padding: 30px; }

/* ======================= v3: lesson ======================= */
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.lesson-meta span { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.lesson-meta .lm-pos { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.lang-badge { font: 700 11.5px var(--font); padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); letter-spacing: .3px; }
.lang-c { background: #e8eefc; color: #2f55c7; } .lang-cpp { background: #eae6fb; color: #5b3cc4; } .lang-java { background: #fdeee4; color: #b4520e; }
.lang-sql { background: #e6f4fb; color: #0b6e99; } .lang-html { background: #fdeceb; color: #c0392b; }
[data-theme="dark"] .lang-c { background: #18234a; color: #9db4ff; } [data-theme="dark"] .lang-cpp { background: #231c47; color: #b9a6ff; }
[data-theme="dark"] .lang-java { background: #3a2210; color: #ffb27a; } [data-theme="dark"] .lang-sql { background: #0f2a38; color: #7fd0f3; }
[data-theme="dark"] .lang-html { background: #3a1716; color: #ff9b91; }
.kbd-hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.tryit-stdin { width: calc(100% - 28px); margin: 0 14px 10px; }

/* ======================= v3: widgets ======================= */
.widget { border: 1px solid var(--line); border-radius: 14px; margin: 26px 0; background: var(--surface); overflow: hidden; }
.widget-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.widget-tag { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .6px; background: linear-gradient(90deg, #7c3aed, #0d6b52); color: #fff; padding: 3px 9px; border-radius: 999px; }
.widget-intro { padding: 4px 16px 0; font-size: 15px; color: var(--ink-2); }
.widget-intro p { margin: 8px 0; }
.widget-body { padding: 12px 16px 16px; }
.w-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.w-controls label { font-size: 13.5px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.w-controls select, .w-controls input[type=number], .w-controls input[type=text] { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 5px 8px; font: 14px var(--font); }
.w-stage { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; position: relative; }
.w-status { margin-top: 10px; font: 14px var(--mono); color: var(--ink-2); min-height: 22px; }
.w-bars { display: flex; align-items: flex-end; gap: 4px; height: 220px; padding: 12px; }
.w-bars i { flex: 1; background: #8fc9b3; border-radius: 4px 4px 0 0; position: relative; transition: height .15s; }
.w-bars i.cmp { background: var(--accent); } .w-bars i.swp { background: #e5484d; } .w-bars i.done { background: var(--brand); }
.w-bars i span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font: 11px var(--mono); color: var(--muted); }
.w-cells { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px; }
.w-cells b { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 8px; font: 600 15px var(--mono); background: var(--surface); position: relative; transition: all .2s; }
.w-cells b small { position: absolute; top: -16px; font: 10px var(--mono); color: var(--muted); }
.w-cells b.out { opacity: .25; } .w-cells b.mid { border-color: var(--accent); background: #fff3d6; color: #6b4500; } .w-cells b.hit { border-color: var(--brand); background: var(--brand); color: #fff; }
[data-theme="dark"] .w-cells b.mid { background: #3a2c0a; color: #ffd27a; }
.w-canvas { width: 100%; height: 320px; display: block; cursor: crosshair; border-radius: 10px; }
.w-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.w-slider { display: grid; grid-template-columns: 120px 1fr 56px; gap: 10px; align-items: center; font-size: 14px; margin: 6px 0; }
.w-slider output { font: 600 13px var(--mono); text-align: right; }
.w-grid { display: grid; gap: 2px; padding: 10px; user-select: none; }
.w-grid i { aspect-ratio: 1; background: var(--surface); border-radius: 3px; cursor: pointer; transition: background .1s; }
.w-grid i.wall { background: #3d4a44; } .w-grid i.seen { background: #bfe3d4; } .w-grid i.front { background: #ffd98a; }
.w-grid i.path { background: var(--accent); } .w-grid i.start { background: var(--brand); } .w-grid i.goal { background: #e5484d; }
[data-theme="dark"] .w-grid i.seen { background: #1d4a3a; } [data-theme="dark"] .w-grid i.wall { background: #6a7a72; }
.w-mem { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px; }
.w-mem .cell { border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 110px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.w-mem .cell small { display: block; font: 11px var(--mono); color: var(--muted); }
.w-mem .cell b { font: 700 18px var(--mono); }
.w-mem .cell em { font-style: normal; font-size: 12px; color: var(--ink-2); }
.w-mem .cell.hl { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242, 163, 27, .25); }
.w-mem .cell.ptr { border-style: dashed; }

/* ======================= v3: playground ======================= */
.playground { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }
.page-hero-sm .page-hero-inner { padding: 40px 24px 30px; }
.pg-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pg-tab { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 10px; padding: 9px 16px; font: 600 14px var(--font); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.pg-tab.on { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.lang-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); display: inline-block; }
.lang-dot.lang-c { background: #2f55c7; } .lang-dot.lang-cpp { background: #5b3cc4; } .lang-dot.lang-java { background: #d8691d; }
.lang-dot.lang-sql { background: #0b6e99; } .lang-dot.lang-html { background: #e34c26; } .lang-dot.lang-python { background: #3572a5; }
.pg-panel .tryit { margin-top: 0; }
.pg-panel .CodeMirror { min-height: 300px; }
.pg-note { margin-top: 14px; }

/* ======================= v3: dashboard ======================= */
.dash { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.dstat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.dstat b { display: block; font-size: 34px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.dstat small { color: var(--muted); font-size: 13px; }
.lvl-bar { height: 7px; background: var(--line); border-radius: 99px; margin: 6px 0; overflow: hidden; }
.lvl-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.dash-card h2 { margin: 0 0 14px; font-size: 19px; }
.heat { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; overflow-x: auto; }
.heat i { background: var(--line); border-radius: 3px; }
.heat i.on { background: var(--brand); }
.dash-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.dc { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-left: 4px solid var(--card-color); border-radius: 10px; padding: 10px 14px; color: var(--ink); text-decoration: none !important; }
.dc:hover { box-shadow: var(--shadow); }
.dc-ico { font-size: 24px; }
.dc-main { flex: 1; min-width: 0; }
.dc-main b { display: block; font-size: 15px; }
.dc-main small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-bar { display: block; height: 6px; background: var(--line); border-radius: 99px; margin: 5px 0; overflow: hidden; }
.dc-bar i { display: block; height: 100%; background: var(--card-color); }
.dc-pct { font-weight: 800; color: var(--ink-2); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.badge { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; text-align: center; opacity: .45; filter: grayscale(1); }
.badge.got { opacity: 1; filter: none; border-style: solid; border-color: var(--accent); background: linear-gradient(180deg, rgba(242,163,27,.10), transparent); }
.badge span { font-size: 28px; display: block; }
.badge b { display: block; font-size: 14px; }
.badge small { color: var(--muted); font-size: 12px; }
.dash-reset { text-align: center; }

@media (max-width: 980px) {
  .hero-split .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-code { transform: none; }
  .features, .stats-strip, .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .xp-chip .st { display: none; }
}
@media (max-width: 860px) {
  .xp-chip { display: none; }
}
@media (max-width: 560px) {
  .features, .stats-strip { grid-template-columns: 1fr 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .kbd-hint { display: none; }
}
[data-theme="dark"] .box-info .box-title { color: #c4b2f0; }
[data-theme="dark"] .box-hindi .box-title { color: #f2c46d; }
[data-theme="dark"] .box-dataset .box-title { color: #9cc2ff; }
[data-theme="dark"] .box-note .box-title { color: #8cc4f2; }
[data-theme="dark"] .box-warning .box-title { color: #ffb38a; }
[data-theme="dark"] .w-bars i { background: #2e6b55; }
[data-theme="dark"] .exercise.passed { border-color: #2e6b55; }

/* ======================= v3: mobile tab bar ======================= */
.mobile-tabs { display: none; }
@media (max-width: 760px) {
  .topnav { display: none !important; }
  .topbar-inner { gap: 10px; padding: 0 12px; }
  .search { flex: 1; min-width: 0; width: auto; }
  .pill { padding: 5px 9px; }
  .pill .pill-state { display: none; }
  .mobile-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--topbar-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 11px var(--font); color: var(--muted); text-decoration: none !important; padding: 2px 0; border-radius: 8px; }
  .mobile-tabs a span { font-size: 18px; line-height: 1.1; }
  .mobile-tabs a.on { color: var(--brand); }
  body { padding-bottom: 64px; }
  #toasts { bottom: 78px; right: 12px; left: 12px; align-items: center; }
  .hero-split .hero-inner { padding-top: 36px; }
  .hc-tabs b { padding: 3px 6px; }
}
@media (max-width: 420px) {
  .logo span { display: none; }
}

/* ===== Global sidebar (templates/base.html .appnav) - rail on desktop, pinned on demand, drawer on phones ===== */
:root { --sbw: 0px; --sb-rail: 64px; --sb-open: 240px; }
.nav-toggle { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-left: -6px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; }
.nav-toggle:hover { background: var(--bg-2); color: var(--ink); }
.nav-toggle .nt-arrow { transition: transform .2s; transform-origin: 14.75px 12px; }
html.nav-pinned .nav-toggle .nt-arrow { transform: scaleX(-1); }
.appnav { position: fixed; z-index: 45; left: 0; top: var(--top); bottom: 0; width: var(--sb-open); display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); transition: width .18s ease, transform .2s ease, box-shadow .18s ease; }
.an-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 8px 12px; scrollbar-width: thin; }
.an-sec { padding: 4px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.an-sec:last-child { border-bottom: 0; }
.an-head { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; padding: 8px 10px 4px;
  font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: .6px; color: var(--muted); text-align: left; white-space: nowrap; min-height: 26px; }
.an-gbtn { cursor: pointer; border-radius: 7px; }
.an-gbtn:hover { color: var(--ink); background: var(--bg-2); }
.an-caret::after { content: "+"; font-size: 14px; font-weight: 600; }
.an-group.open .an-caret::after { content: "\2013"; }
.an-list { display: none; }
.an-group.open .an-list { display: block; }
.an-item { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); font-size: 14px; font-weight: 600;
  line-height: 1.25; white-space: nowrap; text-decoration: none !important; position: relative; }
.an-item:hover { background: var(--bg-2); color: var(--ink); }
.an-item.on { background: var(--brand-soft); color: var(--brand); }
.an-item.on::before { content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.an-ico { flex: none; width: 26px; text-align: center; font-size: 17px; line-height: 1; }
.an-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.an-label small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.an-course { font-weight: 500; font-size: 13.5px; padding-top: 6px; padding-bottom: 6px; }
.an-ai .an-ico { color: var(--brand); }
.an-soon { font-style: normal; font: 700 10px var(--font); text-transform: uppercase; letter-spacing: .4px; background: #fff3d6; color: #9a6200; border-radius: 5px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
[data-theme="dark"] .an-soon { background: #3a2e10; color: #f2cf8a; }
.an-pin { display: flex; align-items: center; gap: 11px; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 10px 18px; font: 600 13px var(--font); cursor: pointer; white-space: nowrap; text-align: left; }
.an-pin:hover { color: var(--ink); background: var(--bg-2); }
.an-backdrop { position: fixed; inset: var(--top) 0 0 0; z-index: 44; background: rgba(6, 20, 15, .35); }

@media (min-width: 961px) {
  body.has-appnav { --sbw: var(--sb-rail); padding-left: var(--sbw); }
  html.nav-pinned body.has-appnav { --sbw: var(--sb-open); }
  body.has-appnav .topbar { margin-left: calc(-1 * var(--sbw)); }
  .an-backdrop { display: none !important; }
  /* rail: icons only; expands over the page on hover / keyboard focus */
  html:not(.nav-pinned) .appnav { width: var(--sb-rail); }
  html:not(.nav-pinned) .appnav:hover, html:not(.nav-pinned) .appnav:focus-within { width: var(--sb-open); box-shadow: 12px 0 34px rgba(0,0,0,.12); }
  html:not(.nav-pinned) .appnav:not(:hover):not(:focus-within) .an-label,
  html:not(.nav-pinned) .appnav:not(:hover):not(:focus-within) .an-caret { display: none; }
  html:not(.nav-pinned) .appnav:not(:hover):not(:focus-within) .an-head { min-height: 0; padding: 0; height: 1px; margin: 6px 10px; background: var(--line); }
  html:not(.nav-pinned) .appnav:not(:hover):not(:focus-within) .an-list { display: block; }
  html:not(.nav-pinned) .appnav:not(:hover):not(:focus-within) .an-item { justify-content: center; padding-left: 0; padding-right: 0; }
  html:not(.nav-pinned) .appnav:not(:hover):not(:focus-within) .an-sec { border-bottom: 0; padding: 0; margin: 0; }
  html:not(.nav-pinned) .an-pin .an-ico { transform: scaleX(-1); }
  .lesson-layout .sidebar { top: var(--top); }
  .footer { position: relative; }
}
@media (max-width: 960px) {
  .appnav { transform: translateX(-102%); box-shadow: 12px 0 34px rgba(0,0,0,.18); width: min(300px, 86vw); }
  body.nav-open .appnav { transform: none; }
  .an-pin { display: none; }
  .lesson-layout .sidebar { z-index: 42; }
}
@media (max-width: 760px) { .appnav { bottom: 58px; } .an-backdrop { bottom: 58px; } }
@media print { .appnav, .nav-toggle, .an-backdrop { display: none !important; } body.has-appnav { padding-left: 0 !important; } }

/* ===== School (NCERT Class 6-12) page ===== */
.card-soon-link { color: var(--ink); text-decoration: none !important; }
.card-soon-link:hover { border-top-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-soon-link .card-meta span:last-child { margin-left: auto; color: var(--brand); }
.soon-tag { background: #fff3d6; color: #9a6200; border-radius: 6px; padding: 1px 8px; }
[data-theme="dark"] .soon-tag { background: #3a2e10; color: #f2cf8a; }
.class-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.class-jump a { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; text-decoration: none; }
.class-jump a:hover { border-color: var(--brand); color: var(--brand); }
.school-features { margin-top: 0; margin-bottom: 40px; }
.school-class { scroll-margin-top: calc(var(--top) + 16px); margin-bottom: 36px; }
.sc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sc-head h2 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.sc-head p { margin: 0; color: var(--muted); font-size: 14px; }
.sc-badge { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font: 800 22px var(--font); color: #fff;
  background: linear-gradient(135deg, #14a078, #094a38); box-shadow: var(--shadow); }
.sc-status { margin-left: auto; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sc-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; background: var(--surface); display: flex; flex-direction: column; }
.sc-card-top { display: flex; justify-content: space-between; align-items: center; }
.sc-card-top .soon { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .4px; color: var(--accent); }
.sc-ico { font-size: 26px; }
.sc-card h3 { margin: 8px 0 4px; font-size: 17px; }
.sc-card p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; flex: 1; }
.sc-ask { font-size: 13px; font-weight: 700; }
.school-cta { border: 1px dashed var(--line); border-radius: 14px; padding: 22px 24px; background: var(--bg-2); }
.school-cta h2 { margin: 0 0 6px; font-size: 21px; }
.school-cta p { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .sc-head { flex-wrap: wrap; } .sc-status { margin-left: 0; } }
.lang-js { background: #fdf6d8; color: #8a6d00; } [data-theme="dark"] .lang-js { background: #33300f; color: #f5de6b; }
.lang-dot.lang-js { background: #e5c100; }

/* ===== School: live Class 12 courses ===== */
.class-jump a.cj-live { border-color: var(--brand); color: var(--brand); }
.class-jump a b { font: 700 10px var(--font); text-transform: uppercase; letter-spacing: .4px; background: var(--brand); color: #fff; border-radius: 5px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.sc-status.sc-live { background: var(--brand-soft); color: var(--brand); }
.sc-card.sc-ready { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: 0 2px 10px rgba(13,107,82,.06); }
.sc-card h3 a { color: var(--ink); text-decoration: none; }
.sc-card h3 a:hover { color: var(--brand); }
.sc-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sc-chip { font: 700 11px var(--font); background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.sc-chip-hi { font-family: var(--hindi), var(--font); background: #fff3d6; color: #9a6200; }
[data-theme="dark"] .sc-chip-hi { background: #3a2e10; color: #f2cf8a; }
.sc-start { align-self: flex-start; margin-bottom: 10px; font-size: 14px; }
.an-soon.an-new { background: var(--brand-soft); color: var(--brand); }

/* ===== Topbar on small laptops (961px - 1440px): keep everything on one line ===== */
.topbar-inner { min-width: 0; }
.logo, .nav-toggle, .xp-chip, #hindi-toggle, #theme-toggle { flex: none; }
.topnav { flex: none; min-width: 0; }
.topnav a { white-space: nowrap; }
.search { min-width: 0; flex: 0 1 280px; }
@media (max-width: 1440px) {
  .topbar-inner { gap: 14px; padding: 0 16px; }
  .topnav a { padding: 6px 8px; }
  .search { flex-basis: 220px; }
}
@media (max-width: 1280px) {
  .topbar-inner { gap: 10px; }
  .topnav { gap: 0; }
  .topnav a { font-size: 13.5px; padding: 6px 7px; }
  .xp-chip .st { display: none; }
  .search { flex: 1 1 140px; }
  .search input { padding: 7px 10px; }
}
@media (max-width: 1180px) {
  .topnav a[href$="/dashboard/"] { display: none; }          /* My Learning is in the sidebar and XP chip */
  .pill .pill-state { display: none; }
}
@media (max-width: 1060px) {
  .topnav a[href$="/playground/"] { display: none; }         /* Playground stays in the sidebar */
  .logo { font-size: 19px; }
}
@media (min-width: 761px) and (max-width: 960px) {
  .topnav a:nth-child(n+3) { display: none; }
  .topnav a.nav-ai { display: inline-block; }
}
