/* Paath — calm, chunky, readable. Pressable controls with a solid base on a quiet sage-grey ground. */
:root {
  --bg: #EEF1EC;
  --surface: #FFFFFF;
  --surface-2: #F6F8F5;
  --line: #D8DFD9;
  --line-soft: #E6EBE6;
  --text: #1A211E;
  --muted: #5B6862;

  --primary: #1F6F57;        /* deep forest teal */
  --primary-dark: #154C3C;
  --primary-soft: #DCEEE5;

  --accent: #D9922B;         /* marigold: XP, streak, the current lesson */
  --accent-dark: #A86B18;
  --accent-soft: #FBEFD9;

  --select: #2D5BA3;
  --select-soft: #E3EBF8;
  --select-dark: #1F4278;

  --right: #23885A;
  --right-soft: #DDF2E6;
  --right-dark: #186240;
  --wrong: #C4433B;
  --wrong-soft: #FAE4E1;
  --wrong-dark: #92302A;
  --heart: #D8484A;

  --locked: #CBD3CE;
  --locked-dark: #A7B2AC;

  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hindi: "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
  --radius: 14px;
  --radius-lg: 20px;
  --press: 4px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--select); outline-offset: 3px; }
svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; }
small { font-size: inherit; }
[lang="hi"] { font-family: var(--hindi); }

.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hint { color: var(--muted); font-size: 15px; }
.row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.row.center { justify-content: center; }
.stack { display: grid; gap: 12px; }
.stack.narrow { width: min(320px, 100%); margin: 0 auto; }

/* ------------------------------------------------ Buttons (pressable, with a solid base) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border: 0; border-radius: var(--radius);
  background: var(--primary); color: #fff;
  font-weight: 800; padding: 12px 22px;
  box-shadow: 0 var(--press) 0 var(--primary-dark);
  transform: translateY(0); transition: transform .08s, box-shadow .08s, background .15s;
}
.btn svg { width: 22px; height: 22px; }
.btn:hover:not(:disabled) { background: #237D62; }
.btn:active:not(:disabled) { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--primary-dark); }
.btn:disabled { background: var(--locked); box-shadow: 0 var(--press) 0 var(--locked-dark); color: #F4F6F4; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--primary-dark); box-shadow: 0 var(--press) 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--primary-soft); }
.btn.ghost:active:not(:disabled) { box-shadow: 0 0 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.big { padding: 14px 28px; font-size: 18px; min-height: 54px; min-width: 180px; }
.btn.wide { width: 100%; }
.text-btn, .text-link {
  background: none; border: 0; padding: 6px 2px; min-height: 44px; display: inline-flex; align-items: center;
  color: var(--primary-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
  font-size: 16px; border-radius: 8px;
}
.text-btn:hover, .text-link:hover { color: var(--primary); }
.icon-btn { background: none; border: 0; padding: 0; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); border-radius: 12px; }
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn:hover { color: var(--text); background: rgba(0,0,0,.06); }

/* ------------------------------------------------ Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px; padding: 10px var(--gutter);
  background: rgba(238, 241, 236, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.brand { display: inline-grid; gap: 0; text-decoration: none; color: var(--primary); line-height: 1.1; border-radius: 10px; }
.brand-line { display: inline-flex; align-items: baseline; gap: 8px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 27px; letter-spacing: -0.02em; }
.brand-dot { color: var(--accent); font-weight: 800; font-size: 22px; }
.brand-hindi { font-family: var(--hindi); font-weight: 700; font-size: 24px; color: var(--primary-dark); }
.brand-sub { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 4px; border-radius: 12px; text-decoration: none; font-weight: 800; color: var(--primary-dark); }
.back-link svg { width: 24px; height: 24px; }
.back-link:hover { background: rgba(0,0,0,.05); }
.stats { display: flex; gap: 16px; flex: none; }
.stat { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 17px; }
.stat svg { width: 24px; height: 24px; }
.stat.streak { color: var(--locked-dark); }
.stat.streak.lit { color: var(--accent); }
.stat.streak b { color: var(--text); }
.stat.xp { color: var(--accent); }
.stat.xp b { color: var(--text); }

/* ------------------------------------------------ Home layout */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px;
  max-width: 1120px; margin: 0 auto; padding: 32px var(--gutter) 40px;
  align-items: start;
}
.course { display: grid; gap: 36px; min-width: 0; }
.side { position: sticky; top: 92px; display: grid; gap: 16px; }
.card {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 20px;
}
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card > p { color: var(--muted); margin-bottom: 14px; }
.card.goal { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.card.goal p { margin-bottom: 8px; }
.ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--accent-soft); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.goal-select { font-size: 14px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.goal-select select { min-height: 36px; border: 2px solid var(--line); border-radius: 10px; padding: 4px 8px; background: var(--surface); font-weight: 700; }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 10px 0 16px; }
.figures dt { font-size: 13px; color: var(--muted); font-weight: 700; }
.figures dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.figures dd small { font-size: 15px; color: var(--muted); font-weight: 700; }
.card.progress .text-btn { color: var(--muted); font-size: 14px; min-height: 36px; }

/* "Up next" card */
.card.next { border-color: var(--primary); box-shadow: 0 6px 0 var(--primary-soft); padding: 24px; }
.card.next h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 6px 0 6px; }
.card.next > p:not(.eyebrow) { color: var(--muted); margin-bottom: 18px; }
.card.next .eyebrow { color: var(--primary); }

/* Chapters list */
.chapters { scroll-margin-top: 90px; }
.section-head { margin-bottom: 16px; }
.section-head h2 { font-size: 24px; margin-bottom: 4px; }
.section-head p { color: var(--muted); }
.chapter-list { display: grid; gap: 12px; }
.chapter-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 28px; gap: 16px; align-items: center;
  width: 100%; text-align: left; padding: 16px 18px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 var(--press) 0 var(--line);
  transition: transform .08s, box-shadow .08s, background .12s;
}
.chapter-card:hover { background: var(--surface-2); }
.chapter-card:active { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--line); }
.chapter-num {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-dark);
  font-family: var(--display); font-weight: 800; font-size: 20px;
}
.chapter-num svg { width: 26px; height: 26px; }
.chapter-card.complete .chapter-num { background: var(--primary); color: #fff; }
.chapter-main { display: grid; gap: 4px; min-width: 0; }
.chapter-name { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.2; }
.chapter-name small { font-weight: 700; font-size: 17px; color: var(--muted); font-family: var(--body); }
.chapter-meta { color: var(--muted); font-size: 14px; }
.chapter-status { font-size: 14px; font-weight: 700; color: var(--primary-dark); display: inline-flex; align-items: center; gap: 4px; }
.chapter-status svg { width: 16px; height: 16px; }
.chapter-go { color: var(--locked-dark); }
.chapter-go svg { width: 26px; height: 26px; }
.chapter-card:hover .chapter-go { color: var(--primary); }
.meter { display: block; height: 10px; margin: 4px 0; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease; }
.meter.big { height: 14px; margin: 14px 0 8px; }

/* Practice tiles */
.practice-tile {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center;
  width: 100%; text-align: left; padding: 12px 14px; min-height: 64px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 var(--press) 0 var(--line);
  transition: transform .08s, box-shadow .08s, background .12s;
}
.practice-tile:hover:not(:disabled) { background: var(--surface-2); }
.practice-tile:active:not(:disabled) { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--line); }
.practice-tile:disabled { cursor: default; opacity: .6; }
.practice-tile.featured { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 var(--press) 0 var(--accent); }
.practice-tile.featured:hover { background: #F8E7C6; }
.practice-tile.featured:active { box-shadow: 0 0 0 var(--accent); }
.pt-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); }
.pt-icon svg { width: 24px; height: 24px; }
.featured .pt-icon { background: var(--accent); color: #fff; }
.pt-text { display: grid; gap: 2px; min-width: 0; }
.pt-text b { font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.2; }
.pt-text small { font-size: 14px; color: var(--muted); line-height: 1.4; }
.featured .pt-text small { color: var(--accent-dark); }
.card.mock .best { color: var(--text); font-size: 15px; }
.card.mock .best b { color: var(--primary-dark); }

.foot { max-width: 1120px; margin: 0 auto; padding: 8px var(--gutter) 60px; color: var(--muted); font-size: 15px; }
.foot [lang="hi"] { font-weight: 700; color: var(--primary-dark); }

/* ------------------------------------------------ Chapter page */
.chapter-page { max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) 80px; }
.chapter-head { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.chapter-head h1 { font-size: clamp(28px, 3.4vw, 36px); margin: 6px 0 8px; }
.chapter-head h1 small { display: block; font-family: var(--body); font-weight: 700; font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin-top: 4px; }
.chapter-desc { color: var(--muted); }
.chapter-figures { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.chapter-figures b { color: var(--accent-dark); }
.done-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; }
.done-chip svg { width: 22px; height: 22px; }

.path-wrap { margin-top: 12px; }
.path { display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 56px 0 6px; }
.node-wrap { position: relative; transform: translateX(var(--x)); display: grid; justify-items: center; gap: 8px; }
.node {
  width: 76px; height: 72px; border-radius: 50%; border: 0;
  display: grid; place-items: center; color: #fff;
  transition: transform .08s, box-shadow .08s;
}
.node svg { width: 34px; height: 34px; }
.node.done { background: var(--primary); box-shadow: 0 7px 0 var(--primary-dark); }
.node.current, .node.open { background: var(--accent); box-shadow: 0 7px 0 var(--accent-dark); }
.node.open { background: #E5AE55; }
.node.current { outline: 6px solid var(--accent-soft); outline-offset: 4px; }
.node.current:focus-visible { outline: 3px solid var(--select); }
.node.locked { background: var(--locked); box-shadow: 0 7px 0 var(--locked-dark); color: #F2F5F3; cursor: not-allowed; }
.node:not(.locked):active { transform: translateY(7px); box-shadow: 0 0 0 transparent; }
.node.test { border-radius: 22px; width: 84px; }
.node-label { font-size: 13px; font-weight: 800; color: var(--muted); }
.node-tip {
  position: absolute; left: calc(100% + 14px); top: 36px; transform: translateY(-50%);
  background: var(--surface); color: var(--accent-dark); border: 2px solid var(--line);
  font-weight: 800; font-size: 15px; padding: 5px 12px; border-radius: 12px; white-space: nowrap;
  animation: bob 1.6s ease-in-out infinite;
}
.node-tip::after {
  content: ""; position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
  border: 8px solid transparent; border-right-color: var(--line);
}
@keyframes bob { 50% { transform: translate(4px, -50%); } }

/* ------------------------------------------------ Lesson shell */
.lesson { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.lesson-top {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  max-width: 1000px; width: 100%; margin: 0 auto; padding: 16px var(--gutter) 0;
}
.bar { height: 16px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill {
  height: 100%; background: var(--primary); border-radius: 99px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12);
  transition: width .45s cubic-bezier(.3,.9,.4,1);
}
.bar.study .bar-fill { background: var(--select); }
.hearts { display: inline-flex; align-items: center; gap: 6px; color: var(--heart); font-weight: 800; font-size: 18px; min-width: 56px; justify-content: flex-end; }
.hearts svg { width: 26px; height: 26px; }
.hearts b { color: var(--text); }
.hearts.hit svg { animation: thump .45s ease; }
@keyframes thump { 30% { transform: scale(.7); } 60% { transform: scale(1.15); } }
.stage { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--select-dark); font-size: 16px; }
.stage svg { width: 22px; height: 22px; }
.stage.small { font-size: 14px; color: var(--muted); }
.stage.small svg { width: 18px; height: 18px; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.timer svg { width: 24px; height: 24px; color: var(--muted); }
.timer.low { color: var(--wrong-dark); }
.timer.low svg { color: var(--wrong); }

.lesson-body { flex: 1; width: 100%; max-width: 700px; margin: 0 auto; padding: 32px var(--gutter) 240px; }
.lesson-kicker { display: flex; gap: 8px 10px; align-items: center; margin: 0 0 16px; flex-wrap: wrap; }
.chip { background: var(--select-soft); color: var(--select-dark); font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.chip.repeat { background: var(--accent-soft); color: var(--accent-dark); }
.retry { display: inline-flex; gap: 6px; align-items: center; color: var(--accent-dark); font-weight: 800; font-size: 14px; }
.retry svg { width: 18px; height: 18px; }

/* Question text: single-line questions and multi-statement ones (paragraphs plus a list of points) */
.prompt { margin-bottom: 26px; }
.prompt p { font-family: var(--display); font-size: clamp(21px, 2.6vw, 27px); line-height: 1.3; font-weight: 700; }
.prompt.multi p { font-size: clamp(20px, 2.3vw, 24px); }
.prompt.multi > * + * { margin-top: 12px; }
.q-list { list-style: none; margin: 0; padding: 14px 16px; display: grid; gap: 10px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); }
.q-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: clamp(18px, 2vw, 20px); line-height: 1.45; font-weight: 600; }
.q-marker { font-weight: 800; color: var(--primary-dark); white-space: nowrap; }

.tiles { display: grid; gap: 12px; }
.tile {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: center;
  width: 100%; min-height: 60px; text-align: left; padding: 14px 16px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 var(--press) 0 var(--line);
  font-weight: 600; font-size: 18px; line-height: 1.4;
  transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
.tile:hover:not(:disabled) { background: var(--surface-2); }
.tile:active:not(:disabled) { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--line); }
.key {
  width: 32px; height: 32px; border-radius: 9px; border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: var(--muted);
}
.tile.selected { border-color: var(--select); background: var(--select-soft); box-shadow: 0 var(--press) 0 var(--select); }
.tile.selected .key { border-color: var(--select); color: var(--select); }
.tile:disabled { cursor: default; }
.tile.right { border-color: var(--right); background: var(--right-soft); box-shadow: 0 var(--press) 0 var(--right); }
.tile.right .key { border-color: var(--right); color: var(--right); }
.tile.wrong { border-color: var(--wrong); background: var(--wrong-soft); box-shadow: 0 var(--press) 0 var(--wrong); }
.tile.wrong .key { border-color: var(--wrong); color: var(--wrong); }
.tile.dim { opacity: .5; }

/* Bottom check bar: turns green or red after checking */
.checkbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--bg); border-top: 2px solid var(--line);
  transition: background .2s;
  max-height: 70vh; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.checkbar-inner {
  max-width: 1000px; margin: 0 auto; padding: 18px var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 96px;
}
.verdict { display: flex; gap: 14px; align-items: flex-start; max-width: 660px; }
.verdict:empty { display: none; }
.verdict-icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center;
}
.verdict-icon svg { width: 28px; height: 28px; }
.verdict h2 { font-size: 22px; margin-bottom: 4px; }
.verdict p { margin: 0; font-size: 16px; }
.verdict p + p { margin-top: 4px; }
.verdict .answer { font-size: 17px; }
.combo { font-family: var(--body); font-size: 14px; font-weight: 800; background: var(--accent); color: #fff; padding: 2px 9px; border-radius: 99px; margin-left: 6px; vertical-align: 3px; }
.checkbar .btn.big { margin-left: auto; flex: none; }

.checkbar.is-right { background: var(--right-soft); border-top-color: transparent; }
.checkbar.is-right .verdict-icon, .checkbar.is-right .verdict h2, .checkbar.is-right .verdict p { color: var(--right-dark); }
.checkbar.is-right .btn { background: var(--right); box-shadow: 0 var(--press) 0 var(--right-dark); }
.checkbar.is-wrong { background: var(--wrong-soft); border-top-color: transparent; }
.checkbar.is-wrong .verdict-icon, .checkbar.is-wrong .verdict h2, .checkbar.is-wrong .verdict p { color: var(--wrong-dark); }
.checkbar.is-wrong .btn { background: var(--wrong); box-shadow: 0 var(--press) 0 var(--wrong-dark); }

/* Mock test bar */
.mock-bar .checkbar-inner { min-height: 88px; }
.mock-note { color: var(--muted); font-size: 15px; }
.mock-bar .row { margin-left: auto; }

/* ------------------------------------------------ Study cards */
.study-body { flex: 1; width: 100%; max-width: 700px; margin: 0 auto; padding: 32px var(--gutter) 60px; display: grid; gap: 20px; align-content: start; }
.study-card {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 36px); box-shadow: 0 6px 0 var(--line);
  min-height: 220px; display: grid; align-content: start; gap: 14px;
  animation: rise .25s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.study-card .lesson-kicker { margin: 0; }
.fact { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); line-height: 1.35; }
.study-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }

/* ------------------------------------------------ Results */
.result {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px var(--gutter); gap: 6px;
}
.result-badge {
  width: 112px; height: 112px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 0 var(--accent-dark); margin-bottom: 22px;
  animation: pop .5s cubic-bezier(.3,1.6,.5,1);
}
.result-badge svg { width: 56px; height: 56px; }
.result-badge.empty { background: var(--locked); box-shadow: 0 8px 0 var(--locked-dark); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.result h1 { font-size: clamp(32px, 6vw, 44px); color: var(--primary); }
.result-sub { color: var(--muted); margin: 0 0 24px; max-width: 48ch; }
.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 14px; margin-bottom: 22px; }
.tally-item { border-radius: 16px; border: 2px solid; overflow: hidden; background: var(--surface); }
.tally-item span { display: block; color: #fff; font-weight: 800; font-size: 13px; padding: 5px; }
.tally-item b { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px; font-family: var(--display); font-size: 22px; }
.tally-item b svg { width: 22px; height: 22px; }
.tally-item.xp { border-color: var(--accent); } .tally-item.xp span { background: var(--accent); } .tally-item.xp b { color: var(--accent-dark); }
.tally-item.acc { border-color: var(--right); } .tally-item.acc span { background: var(--right); } .tally-item.acc b { color: var(--right-dark); }
.tally-item.time { border-color: var(--select); } .tally-item.time span { background: var(--select); } .tally-item.time b { color: var(--select-dark); }
.tally-item.wrong { border-color: var(--wrong); } .tally-item.wrong span { background: var(--wrong); } .tally-item.wrong b { color: var(--wrong-dark); }
.streak-line { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.streak-line svg { width: 20px; height: 20px; color: var(--accent); }
.next-line { color: var(--muted); margin-bottom: 8px; }
.result .btn.big { margin-top: 16px; }

/* ------------------------------------------------ Asked in the exam */
a.btn { text-decoration: none; }
.card.exam { border-color: var(--accent); }
.card.exam .eyebrow { color: var(--accent-dark); }
.card.exam h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 6px 0 8px; }
.card.exam > p:not(.eyebrow) { color: var(--muted); margin-bottom: 16px; }
.exam-count { font-family: var(--display); font-weight: 800; font-size: 1.25em; color: var(--text); }

.exam-page { max-width: 820px; margin: 0 auto; padding: 28px var(--gutter) 80px; }
.exam-head { margin-bottom: 18px; }
.exam-head h1 { font-size: clamp(28px, 3.4vw, 36px); margin: 6px 0 8px; }
.exam-intro { color: var(--muted); max-width: 64ch; }
.filters { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips[hidden] { display: none; }
.chips.shifts { padding-top: 12px; border-top: 2px solid var(--line-soft); }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border-radius: 99px; border: 2px solid var(--line); background: var(--surface);
  font-weight: 800; font-size: 15px; color: var(--text);
  transition: background .12s, border-color .12s;
}
.fchip small { font-size: 13px; font-weight: 700; color: var(--muted); }
.fchip:hover { background: var(--surface-2); }
.fchip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.fchip[aria-pressed="true"] small { color: #CDE6DA; }
.search-wrap { display: block; }
.search {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--text);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
}
.search:focus { border-color: var(--select); outline: none; box-shadow: 0 0 0 3px var(--select-soft); }
.exam-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 20px 0 14px; }
.exam-result { color: var(--muted); }
.exam-result b { color: var(--text); font-family: var(--display); font-size: 20px; }
.btn.ghost[aria-pressed="true"] { background: var(--primary-soft); box-shadow: 0 var(--press) 0 var(--primary), inset 0 0 0 2px var(--primary); }
.exam-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.exam-item { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: grid; gap: 12px; justify-items: start; }
.exam-item > * { width: 100%; }
.exam-item > .exam-toggle { width: auto; }
.exam-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip.ch { background: var(--line-soft); color: var(--muted); }
.exam-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.exam-opts li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; font-size: 17px; line-height: 1.4; font-weight: 600; padding: 6px 10px; border-radius: 10px; border: 2px solid transparent; }
.exam-opts .key { width: 28px; height: 28px; font-size: 13px; }
.exam-item.revealed .exam-opts li.is-correct { border-color: var(--right); background: var(--right-soft); }
.exam-item.revealed .exam-opts li.is-correct .key { border-color: var(--right); color: var(--right); }
.exam-answer { display: none; }
.exam-item.revealed .exam-answer { display: grid; gap: 4px; padding-top: 10px; border-top: 2px solid var(--line-soft); }
.exam-empty { color: var(--muted); padding: 24px; text-align: center; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius-lg); }
.exam-more { display: flex; justify-content: center; margin-top: 18px; }

/* ------------------------------------------------ Mock review */
.review { max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) 80px; }
.review-head { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 12px 0 28px; }
.review-head h1 { font-size: clamp(34px, 6vw, 48px); color: var(--primary); }
.review-head h1 b { font-size: 1.4em; }
.review-head .result-sub { margin-bottom: 12px; }
.review-head .tally { margin-bottom: 10px; }
.review-title { font-size: 24px; margin: 8px 0 14px; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.review-item { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: grid; gap: 10px; }
.review-item.right { border-color: var(--right); }
.review-item.wrong { border-color: var(--wrong); }
.review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-num { font-family: var(--display); font-weight: 800; color: var(--muted); font-size: 15px; }
.rv-status { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; padding: 3px 10px 3px 6px; border-radius: 99px; background: var(--line-soft); color: var(--muted); }
.rv-status svg { width: 16px; height: 16px; }
.right .rv-status { background: var(--right-soft); color: var(--right-dark); }
.wrong .rv-status { background: var(--wrong-soft); color: var(--wrong-dark); }
.rv-q { margin: 0; }
.rv-q p { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.3; }
.rv-q.multi > * + * { margin-top: 8px; }
.rv-q .q-list { padding: 10px 12px; gap: 6px; }
.rv-q .q-list li { font-size: 17px; }
.rv-ans { font-size: 17px; }
.rv-ans b { color: var(--right-dark); }
.rv-ans.yours b { color: var(--wrong-dark); text-decoration: line-through; text-decoration-thickness: 2px; }
.rv-explain { color: var(--muted); font-size: 16px; }

/* ------------------------------------------------ Responsive */
@media (max-width: 900px) {
  .layout { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
  .course, .side { display: contents; }
  .card.next { order: 1; }
  .card.exam { order: 2; }
  .card.goal { order: 3; }
  .card.practice { order: 4; }
  .card.mock { order: 5; }
  .chapters { order: 6; margin-top: 16px; }
  .card.progress { order: 7; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .topbar { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .brand-name { font-size: 23px; }
  .brand-hindi { font-size: 20px; }
  .brand-dot { font-size: 18px; }
  .stats { gap: 12px; }
  .stat { font-size: 16px; }
  .stat svg { width: 22px; height: 22px; }
  .card { padding: 16px; }
  .card.next { padding: 20px; }
  .card.next .row { gap: 6px 18px; }
  .btn.big { width: 100%; min-width: 0; }
  .card.next .btn.big, .chapter-head .btn.big { width: 100%; }
  .chapter-card { grid-template-columns: 40px minmax(0, 1fr) 22px; gap: 12px; padding: 14px; }
  .chapter-num { width: 40px; height: 40px; font-size: 17px; }
  .chapter-name { font-size: 18px; }
  .chapter-name small { font-size: 15px; }
  .chapter-head { padding: 20px; }
  .path { gap: 26px; padding-top: 52px; }
  .node-wrap { transform: translateX(calc(var(--x) * .7)); }
  .node { width: 66px; height: 62px; }
  .node.test { width: 74px; }
  .lesson-top { gap: 12px; padding-top: 12px; }
  .lesson-body { padding-top: 22px; padding-bottom: 300px; }
  .checkbar-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px var(--gutter); }
  .checkbar .btn.big { width: 100%; margin-left: 0; }
  .verdict h2 { font-size: 20px; }
  .verdict p { font-size: 15px; }
  .verdict-icon { width: 44px; height: 44px; }
  .mock-bar .row { margin-left: 0; justify-content: space-between; }
  .mock-bar .row .btn.big { width: auto; flex: 1; }
  .tile { font-size: 17px; padding: 12px 14px; gap: 12px; }
  .tally { grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
  .tally-item b { font-size: 19px; padding: 12px 6px; }
  .figures { grid-template-columns: 1fr 1fr; }
  .study-actions { flex-direction: column; align-items: stretch; }
  .study-actions .text-btn { justify-content: center; }
  .review-item { padding: 16px; }
  .card.exam .btn { width: 100%; }
  .exam-meta { flex-direction: column; align-items: stretch; }
  .exam-meta .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .exam-meta .row .btn { width: 100%; padding-left: 10px; padding-right: 10px; font-size: 16px; }
  .exam-item { padding: 16px; }
  .exam-opts li { font-size: 16px; padding: 6px 8px; }
  .filters { padding: 14px; }
  .fchip { min-height: 40px; padding: 6px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
