/* झारबुक — site styles
   Palette: शाल हरा (sal green) for structure, हल्दी (turmeric) for the one highlight —
   the joined part of a grammar formula — and पलाश (palash red) only for "exam traps". */
:root {
  --sal: #1E5B45;        /* primary: links, header */
  --sal-deep: #123A2C;   /* headings */
  --leaf: #EEF4EF;       /* soft surface */
  --haldi: #F2B52E;      /* highlight */
  --haldi-soft: #FFF3D1;
  --palash: #B8321A;     /* warnings / common mistakes */
  --ink: #1C2620;
  --muted: #5B6A61;
  --line: #D5E0D8;
  --bg: #FFFFFF;
  --radius: 10px;
  --body: "Hind", "Noto Sans Devanagari", "Nirmala UI", system-ui, sans-serif;
  --display: "Tiro Devanagari Hindi", "Noto Serif Devanagari", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.75 var(--body); }
img, svg { max-width: 100%; }
a { color: var(--sal); text-underline-offset: 3px; }
a:hover { color: var(--sal-deep); }
:focus-visible { outline: 3px solid var(--haldi); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--haldi); color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.topbar { background: var(--sal); color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 28px; height: 28px; color: var(--haldi); }
.brand-name { font: 400 1.6rem/1 var(--display); letter-spacing: .01em; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { display: block; padding: 6px 12px; color: #E3EEE7; text-decoration: none; border-radius: 999px; font-weight: 500; }
.mainnav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.mainnav a[aria-current="page"] { background: var(--haldi); color: var(--sal-deep); }
@media (max-width: 560px) {
  .topbar-inner { padding-top: 8px; padding-bottom: 8px; }
  .mainnav { width: 100%; overflow-x: auto; }
  .mainnav ul { flex-wrap: nowrap; }
  .mainnav a { white-space: nowrap; padding: 4px 10px; }
}

/* ---------- breadcrumbs ---------- */
.crumbs ol { list-style: none; margin: 14px auto 0; padding: 0; display: flex; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--line); }
.crumbs a { color: var(--muted); }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--sal-deep); line-height: 1.35; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: .4em 0 .3em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 1.85rem); margin: 2em 0 .5em; padding-top: .4em; border-top: 2px solid var(--leaf); }
h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--muted); }
.kicker { margin: 1.5em 0 0; color: var(--sal); font-weight: 600; font-size: .95rem; }
.updated { font-size: .9rem; color: var(--muted); }
main { padding-bottom: 56px; }

/* ---------- notes body ---------- */
.notes ul, .notes ol { padding-left: 1.4em; }
.notes li { margin: .25em 0; }
.toc { background: var(--leaf); border-radius: var(--radius); padding: 14px 18px; margin: 1.5em 0; }
.toc summary { cursor: pointer; font-weight: 600; color: var(--sal-deep); }
.toc ol { margin: .6em 0 0; }
.def { border-left: 4px solid var(--sal); padding: 4px 0 4px 16px; margin: 1.2em 0; font-size: 1.1rem; }

/* The signature element: a संधि/समास formula. Parts joined by +, the result highlighted in haldi. */
.sutra-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 1em 0 1.4em; }
.sutra { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 1.08rem; }
.sutra .op { color: var(--muted); }
.sutra .res { background: var(--haldi-soft); box-shadow: inset 0 -3px 0 var(--haldi); padding: 0 4px; border-radius: 3px; font-weight: 600; }
.rule { background: var(--leaf); border-radius: var(--radius); padding: 14px 18px; margin: 1em 0; }
.rule strong:first-child { color: var(--sal-deep); }

table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 1rem; }
.table-wrap { overflow-x: auto; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--leaf); color: var(--sal-deep); font-weight: 600; }

.trap { border: 1px solid #F1C8BE; background: #FDF3F0; border-radius: var(--radius); padding: 12px 16px; margin: 1.2em 0; }
.trap > strong:first-child { color: var(--palash); display: block; margin-bottom: 4px; }
.tip { border: 1px solid #F3DE9F; background: var(--haldi-soft); border-radius: var(--radius); padding: 12px 16px; margin: 1.2em 0; }
.tip > strong:first-child { color: #7A5300; display: block; margin-bottom: 4px; }

/* sample questions — answers are in the HTML (good for search), revealed with <details>, no JS */
.qa { list-style: none; padding: 0 !important; counter-reset: q; }
.qa > li { counter-increment: q; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; }
.qa .q { font-weight: 600; margin: 0 0 6px; }
.qa .q::before { content: "प्रश्न " counter(q) ". "; color: var(--sal); }
.qa .opts { list-style: none; padding: 0 !important; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px 16px; }
.qa details summary { cursor: pointer; color: var(--sal); font-weight: 600; }
.qa details[open] summary { margin-bottom: 4px; }
.qa .ans { background: var(--leaf); border-radius: 6px; padding: 8px 12px; margin: 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.pager a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--sal); }
.pager small { display: block; font-weight: 400; color: var(--muted); }
.pager .next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* ---------- listings ---------- */
.subject-list, .chapter-list { list-style: none; padding: 0; margin: 1.5em 0; }
.subject-row a { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.subject-row a:hover .subject-title { color: var(--sal); }
.subject-paper { font-size: .9rem; color: var(--sal); font-weight: 600; }
.subject-title { font: 400 1.5rem/1.3 var(--display); color: var(--sal-deep); }
.subject-count { font-size: .9rem; color: var(--muted); }
.chapter-list li { border-bottom: 1px solid var(--line); }
.chapter-list a, .chapter-list .pending { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; text-decoration: none; }
.chapter-list .pending { color: var(--muted); }
.ch-no { min-width: 2ch; color: var(--muted); font-variant-numeric: tabular-nums; }
.soon { margin-left: auto; font-size: .85rem; white-space: nowrap; }

/* ---------- home ---------- */
.hero { background: var(--leaf); padding: 40px 0 44px; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 16ch; font-size: clamp(2.1rem, 6.4vw, 3.4rem); line-height: 1.25; margin-top: 0; }
.hero .lede { max-width: 52ch; }
.paper-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 28px; }
.paper { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.paper h2 { border: 0; margin: 0 0 4px; padding: 0; font-size: 1.3rem; }
.paper p { margin: 0 0 .6em; color: var(--muted); font-size: .98rem; }
.paper .status { font-size: .9rem; font-weight: 600; color: var(--sal); }
.paper.later .status { color: var(--muted); }
.home-section { padding: 8px 0; }
.exam-links { list-style: none; padding: 0; margin: 0; }
.exam-links li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.exam-links a { font: 400 1.35rem/1.3 var(--display); text-decoration: none; }
.exam-links p { margin: 2px 0 0; color: var(--muted); }
.btn { display: inline-block; background: var(--sal); color: #fff; text-decoration: none; padding: 10px 18px; border-radius: 999px; font-weight: 600; }
.btn:hover { background: var(--sal-deep); color: #fff; }
.btn.alt { background: transparent; color: var(--sal); border: 2px solid var(--sal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- exam page ---------- */
.factbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.2em 0; }
.factbar div { background: #fff; padding: 10px 14px; }
.factbar dt { font-size: .85rem; color: var(--muted); }
.factbar dd { margin: 0; font-weight: 600; }

/* ---------- footer ---------- */
.footer { background: var(--sal-deep); color: #C9D8CE; padding: 28px 0 32px; font-size: .95rem; }
.footer a { color: #fff; }
.footer-brand strong { font: 400 1.2rem var(--display); color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.disclaimer { font-size: .88rem; max-width: 72ch; color: #A9BDB0; }
.copy { margin: 0; color: #A9BDB0; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .topbar, .footer, .crumbs, .pager, .skip { display: none; } .qa details { display: block; } }

/* alternate spellings of a language (e.g. कुरमाली · कुड़माली · Kurmali · Kudmali) — visible text helps search */
.alt-names { margin: -.2em 0 .8em; color: var(--muted); font-size: .95rem; }

/* references at the end of a chapter */
.sources { margin-top: 40px; font-size: .95rem; color: var(--muted); }
.sources h2 { font-size: 1.2rem; }
.sources ul { padding-left: 1.2em; }

/* ---------- English grammar: example lists and structure formulas ---------- */
.ex { list-style: none; padding: 0 !important; margin: .6em 0 1.2em; border-left: 3px solid var(--line); }
.ex li { padding: 4px 0 4px 14px; margin: 0; }
.ex .hi { color: var(--muted); font-size: .95rem; }
.ex b, .ex strong { background: var(--haldi-soft); box-shadow: inset 0 -2px 0 var(--haldi); padding: 0 2px; border-radius: 2px; font-weight: 600; }
.formula { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0; background: #fff; }
.formula .flabel { font-weight: 600; color: var(--sal-deep); min-width: 13ch; }
.formula .fbody b { background: var(--haldi-soft); box-shadow: inset 0 -2px 0 var(--haldi); padding: 0 3px; border-radius: 3px; }
.formula .feg { flex-basis: 100%; color: var(--muted); font-size: .95rem; font-style: italic; }
.qa .opts[lang="en"] li { font-weight: 400; }
.sutra-list.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.sutra-list.compact .sutra { padding: 4px 10px; font-size: 1rem; }
/* word tables (synonyms/antonyms): stack into cards on phones so the antonym column is never hidden */
@media (max-width: 560px) {
  table.words thead { display: none; }
  table.words tr { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.words td { border: 0; padding: 1px 0; }
  table.words td[data-k] { grid-column: 1 / -1; }
  table.words td[data-k]::before { content: attr(data-k) ": "; color: var(--muted); font-size: .9rem; }
}

/* =====================================================================
   App layer: account link, auth, practice, mock, dashboard, landing
   ===================================================================== */
.acct-link { order: 3; color: var(--sal-deep); background: var(--haldi); text-decoration: none; font-weight: 600; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.acct-link:hover { color: var(--sal-deep); background: #FFD36B; }
.mainnav { order: 2; }
@media (max-width: 560px) { .acct-link { order: 2; padding: 4px 12px; } .mainnav { order: 3; } }
.signed-in [data-guest] { display: none; }
.center { text-align: center; }
.muted { color: var(--muted); }
.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.4; }
.btn.small { padding: 6px 14px; font-size: .95rem; }
.btn.block { display: block; width: 100%; }
.btn.danger { background: var(--palash); }
.btn.danger:hover { background: #8F2613; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.notice { border: 1px solid var(--line); background: var(--leaf); border-radius: var(--radius); padding: 10px 14px; margin: 1em 0; }
.notice.warn { background: var(--haldi-soft); border-color: #F3DE9F; }
.notice.err { background: #FDF3F0; border-color: #F1C8BE; color: #7B1F0E; }
.loading { color: var(--muted); padding: 40px 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; background: #fff; }
.card h2 { margin-top: 0; padding-top: 0; border: 0; font-size: 1.3rem; }
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 28px; position: relative; margin: .4em 0; }
.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--sal); font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--sal-deep); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 50; max-width: calc(100% - 32px); }
.toast a { color: var(--haldi); }

/* forms */
.auth-form label, .form-grid label, label.field { display: block; font-weight: 600; margin: 0 0 14px; }
.auth-form input, .form-grid input, .form-grid select, label.field select {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #B9C9BE; border-radius: 8px; background: #fff; color: var(--ink); }
.auth-form input:focus, .form-grid input:focus, .form-grid select:focus { outline: 3px solid var(--haldi); outline-offset: 0; border-color: var(--sal); }
input[disabled] { background: var(--leaf); color: var(--muted); }
label small { font-weight: 400; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
label.check input { width: auto; margin: 0; }
.pw { display: flex; gap: 0; }
.pw input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pw-toggle { margin-top: 4px; border: 1px solid #B9C9BE; border-left: 0; background: var(--leaf); padding: 0 12px; border-radius: 0 8px 8px 0; font: inherit; font-size: .9rem; cursor: pointer; color: var(--sal); }
.form-msg { min-height: 1.2em; margin: 0 0 10px; font-size: .95rem; }
.form-msg.err { color: var(--palash); }
.form-msg.ok { color: var(--sal); font-weight: 600; }
.fine { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.linklike { background: none; border: 0; color: var(--sal); font: inherit; cursor: pointer; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.form-h { border: 0; margin: 0 0 6px; padding: 0; font-size: 1.3rem; }

/* auth */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 32px; }
.auth-wrap.single { grid-template-columns: minmax(0, 440px); justify-content: center; }
.auth-card { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: #fff; box-shadow: 0 6px 24px rgba(18,58,44,.06); }
.auth-card h1 { margin-top: 0; font-size: 2rem; }
.auth-sub { color: var(--muted); font-size: .98rem; }
.auth-side { padding-top: 20px; }
.auth-side h2 { border: 0; margin-top: 0; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px; border: 1px solid #B9C9BE; background: #fff; border-radius: 999px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.btn-google:hover { background: var(--leaf); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; margin: 18px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--leaf); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 8px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--sal-deep); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
@media (max-width: 760px) { .auth-wrap { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 16px; } .auth-card { padding: 18px; } }

/* practice runner */
.app h1 { margin-top: .6em; }
.pick h2 small { font: 400 .95rem var(--body); color: var(--muted); }
.pl-title { flex: 1; }
.pl-links { display: flex; gap: 14px; white-space: nowrap; font-size: .95rem; }
.chapter-list li:has(.pl-links) { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; flex-wrap: wrap; }
@media (max-width: 560px) { .pl-links { width: 100%; padding-left: calc(2ch + 12px); } }
.run-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 20px; }
.run-head .kicker { margin: 0; }
.run-meta { margin: 0; color: var(--muted); font-size: .95rem; }
.bm { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .9rem; cursor: pointer; color: var(--muted); white-space: nowrap; }
.bm.on { color: #7A5300; background: var(--haldi-soft); border-color: #F3DE9F; }
.progress { height: 6px; background: var(--leaf); border-radius: 99px; margin: 12px 0 18px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--sal); transition: width .2s; }
.qcard { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; }
.qtext { font-size: 1.15rem; font-weight: 600; margin: 0 0 14px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.choice b { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--leaf); color: var(--sal-deep); font-size: .95rem; }
.choice:hover:not([disabled]) { border-color: var(--sal); }
.choice.picked { border-color: var(--sal); background: var(--leaf); }
.choice.picked b { background: var(--sal); color: #fff; }
.choice.right { border-color: #2F8A5B; background: #EAF6EF; }
.choice.right b { background: #2F8A5B; color: #fff; }
.choice.wrong { border-color: var(--palash); background: #FDF3F0; }
.choice.wrong b { background: var(--palash); color: #fff; }
.choice.dim { opacity: .6; }
.choice[disabled] { cursor: default; }
.explain { border-radius: 10px; padding: 12px 16px; margin: 14px 0 0; }
.explain.ok { background: #EAF6EF; border: 1px solid #BFE0CC; }
.explain.no { background: #FDF3F0; border: 1px solid #F1C8BE; }
.explain strong { display: block; margin-bottom: 4px; }
.explain .src { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.explain p { margin: 0; }
.run-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.hint { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 10px; }
@media (hover: none) { .hint { display: none; } }

/* results */
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.result-hero .factbar { margin: 0; }
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--sal) calc(var(--p) * 1%), var(--leaf) 0); }
.ring span { width: 104px; height: 104px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 400 1.9rem/1 var(--display); color: var(--sal-deep); text-align: center; }
.ring small { display: block; font: 400 .9rem var(--body); color: var(--muted); }
@media (max-width: 560px) { .result-hero { grid-template-columns: 1fr; justify-items: center; } }
.save-note { font-size: .95rem; color: var(--muted); margin-top: 14px; }
.verdict { border-radius: 10px; padding: 12px 16px; margin: 14px 0; }
.verdict.ok { background: #EAF6EF; border: 1px solid #BFE0CC; }
.verdict.no { background: #FDF3F0; border: 1px solid #F1C8BE; }
.review { padding-left: 1.4em; }
.review li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.review .q { font-weight: 600; margin: 0 0 4px; }
.review .yours { color: var(--palash); margin: 0; }
.review .correct { color: #2F8A5B; margin: 0; font-weight: 600; }
.review .why { color: var(--muted); font-size: .95rem; margin: 4px 0 0; }
.bars { list-style: none; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 2fr) auto; gap: 12px; align-items: center; padding: 6px 0; }
.bar { height: 10px; background: var(--leaf); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--sal); }
.bars .num { font-variant-numeric: tabular-nums; font-size: .92rem; color: var(--muted); min-width: 4ch; text-align: right; }
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .92rem; cursor: pointer; }
.chip-btn.on { background: var(--sal); color: #fff; border-color: var(--sal); }

/* mock exam */
body.in-exam .topbar, body.in-exam .footer, body.in-exam .crumbs { display: none; }
body.in-exam main { padding-bottom: 0; }
.exam-mode { max-width: none; padding: 0; }
.exam-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--sal-deep); color: #fff; }
.exam-title { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer { font: 600 1.15rem/1 var(--body); font-variant-numeric: tabular-nums; background: rgba(255,255,255,.12); padding: 6px 10px; border-radius: 6px; }
.timer.low { background: var(--palash); }
.exam-bar .btn { background: var(--haldi); color: var(--sal-deep); }
.exam-bar .btn.danger { background: var(--palash); color: #fff; }
#pal-toggle { display: none; }
.sec-tabs { display: flex; gap: 6px; padding: 8px 16px; background: var(--leaf); border-bottom: 1px solid var(--line); overflow-x: auto; }
.sec-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 14px; font: inherit; cursor: pointer; white-space: nowrap; }
.sec-tabs button[aria-selected="true"] { background: var(--sal); color: #fff; border-color: var(--sal); }
.exam-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; max-width: 1200px; margin: 0 auto; padding: 16px; }
.qno { color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.exam-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.exam-actions #b-next { margin-left: auto; }
.btn.mark { border-color: #8A5CC2; color: #5E3A8F; }
.palette { border: 1px solid var(--line); border-radius: 12px; padding: 12px; align-self: start; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; background: #fff; }
.pal-legend { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; margin-bottom: 8px; }
.lg { display: inline-flex; align-items: center; gap: 4px; }
.lg::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.lg-na::before { background: #fff; }
.lg-skip::before { background: #FDE3DC; border-color: #E9A28F; }
.lg-ans::before { background: #2F8A5B; border-color: #2F8A5B; }
.lg-mark::before { background: #8A5CC2; border-color: #8A5CC2; border-radius: 50%; }
.pal-sec { font-weight: 600; font-size: .9rem; margin: 10px 0 4px; color: var(--sal-deep); }
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.pq { height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font: inherit; font-size: .88rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.pq.st-skip { background: #FDE3DC; border-color: #E9A28F; }
.pq.st-ans { background: #2F8A5B; border-color: #2F8A5B; color: #fff; }
.pq.st-mark { background: #8A5CC2; border-color: #8A5CC2; color: #fff; border-radius: 50%; }
.pq.st-ansmark { background: #8A5CC2; border-color: #8A5CC2; color: #fff; border-radius: 50%; box-shadow: inset 0 -4px 0 #2F8A5B; }
.pq.cur { outline: 3px solid var(--haldi); outline-offset: 1px; }
@media (max-width: 860px) {
  .exam-body { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  #pal-toggle { display: inline-block; }
  .palette { position: fixed; inset: auto 0 0 0; top: auto; max-height: 70vh; border-radius: 14px 14px 0 0; transform: translateY(105%); transition: transform .2s; z-index: 30; box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
  .palette.open { transform: none; }
  .exam-title { display: none; }
  .exam-actions .btn { flex: 1 1 45%; padding: 10px 8px; font-size: .95rem; }
  .exam-actions #b-next { margin-left: 0; }
}
.modal { position: fixed; inset: 0; background: rgba(18,58,44,.45); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 14px; padding: 20px; max-width: 480px; width: 100%; }
.modal-box h2 { margin-top: 0; padding: 0; border: 0; }
.mock-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mock-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.mock-card .kicker { margin: 0; }
.mock-card h3 { margin: .2em 0 .4em; }
.mock-card p { margin: 0 0 .6em; }
.mock-card .muted { font-size: .92rem; flex: 1; }
.mock-card .btn { align-self: flex-start; }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { margin-bottom: 0; }
.dash-head .btn-row { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.stat-grid div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--leaf); }
.stat-grid dt { font-size: .88rem; color: var(--muted); }
.stat-grid dd { margin: 0; font: 400 1.8rem/1.2 var(--display); color: var(--sal-deep); }
.profile-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--haldi-soft); border-color: #F3DE9F; }
.profile-card p { margin: 4px 0 0; font-size: .95rem; }
.weak, .mock-mini { list-style: none; padding: 0; margin: 0; }
.weak li, .mock-mini li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.weak li:last-child, .mock-mini li:last-child { border-bottom: 0; }
.weak small, .mock-mini small { display: block; color: var(--muted); }
.attempts td, .attempts th { white-space: nowrap; }
.attempts td:nth-child(3) { white-space: normal; min-width: 180px; }
.form-grid { max-width: 560px; }

/* landing */
.hero-home { padding: 48px 0 52px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero-home .kicker { margin-top: 0; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.hero-stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.hero-stats dt { color: var(--muted); font-size: .9rem; }
.hero-stats dd { margin: 0; font: 400 2.2rem/1.1 var(--display); color: var(--sal-deep); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.home-section { padding: 28px 0; }
.home-section.band { background: var(--leaf); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-section h2:first-child { border-top: 0; margin-top: .4em; }
.pillars { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pillars li { border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: relative; }
.pill-no { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--haldi); color: var(--sal-deep); font-weight: 700; }
.pillars h3 { margin: .6em 0 .3em; }
.pillars h3 a { text-decoration: none; }
.pillars p { margin: 0; color: var(--muted); }
.paper h3 { margin: 0 0 4px; font-size: 1.3rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.two-col h2 { border-top: 0; margin-top: .4em; }
@media (max-width: 760px) { .two-col { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--sal-deep); }
.faq details p { margin: 8px 0 0; }
.practice-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 40px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--haldi-soft); border: 1px solid #F3DE9F; }
.practice-cta strong { display: block; color: var(--sal-deep); }
.practice-cta span { font-size: .95rem; color: var(--muted); }
@media print { .practice-cta, .acct-link { display: none; } }
