/* Exam-screen test engine: NTA-style computer-based test layout (light, plain, high contrast). */
:root {
  --ink: #1f2933;
  --muted: #5f6b7a;
  --line: #c9d1db;
  --bg: #eef1f5;
  --panel: #ffffff;
  --head: #1d3c6e;          /* header strip */
  --head-ink: #ffffff;
  --sec: #2f6db5;           /* section tabs */
  --nv: #e4e7eb;            /* not visited */
  --na: #d9342b;            /* not answered */
  --an: #2e9e47;            /* answered */
  --mr: #6b3fa0;            /* marked for review */
  --green: #5cb85c;
  --orange: #f0ad4e;
  --blue: #337ab7;
  --hi: "Noto Sans Devanagari", "Mangal", sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
button, select, input { font: inherit; }
button { cursor: pointer; }
[lang="hi"], .hi-note { font-family: var(--hi), var(--sans); }
.cbt-loading { padding: 40px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--sec); font-weight: 600; margin: 0 0 4px; }
sub, sup { line-height: 0; }

/* ---------- plain pages (list, instructions, resume, result) ---------- */
.cbt-page { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }
.cbt-page h1 { font-size: 1.6rem; margin: 0 0 6px; line-height: 1.25; }
.cbt-page h2 { font-size: 1.15rem; margin: 26px 0 10px; }
.test-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.test-list a { display: grid; gap: 2px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.test-list a:hover { border-color: var(--sec); }
.test-list span { color: var(--muted); font-size: .9rem; }
.instr-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--head); padding-bottom: 12px; }
.langpick { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.langpick select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; }
.facts div { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: grid; }
.facts b { font-size: 1.25rem; }
.facts b.small { font-size: .9rem; font-weight: 600; }
.facts span { color: var(--muted); font-size: .85rem; }
.instr-list { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px 14px 36px; }
.instr-list li { margin: 6px 0; }
.instr-list li.nolist { list-style: none; margin-left: -18px; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; padding: 12px; background: #fffbe6; border: 1px solid #f0d77a; border-radius: 6px; }
.agree input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.instr-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 18px; }
.btn-go { background: var(--an); color: #fff; border: 0; padding: 11px 22px; border-radius: 4px; font-weight: 700; }
.btn-go:disabled { background: #9aa5b1; cursor: not-allowed; }
.btn-plain { background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 10px 16px; border-radius: 4px; text-decoration: none; }
.warn, .ex-warn { background: #fdecea; border: 1px solid #f3b4ae; color: #8a1c13; padding: 10px 12px; border-radius: 6px; }
.ex-warn { border-radius: 0; padding: 6px 12px; font-size: .9rem; }
.hi-note { background: #fff4e0; border: 1px dashed #d98a00; color: #6b4300; padding: 8px 12px; border-radius: 6px; font-size: .9rem; margin: 8px 0 12px; }

/* legend + palette shapes (shared) */
.legend { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: .85rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li:last-child { grid-column: 1 / -1; }
.pal { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 4px; font-weight: 700; font-size: .85rem; border: 1px solid transparent; color: #fff; position: relative; flex: none; }
.pal.nv { background: var(--nv); color: #333; border-color: #b8bfc8; border-radius: 3px; }
.pal.na { background: var(--na); border-radius: 3px 3px 14px 14px; }
.pal.an { background: var(--an); border-radius: 14px 14px 3px 3px; }
.pal.mr { background: var(--mr); border-radius: 50%; width: 32px; min-width: 32px; height: 32px; }
.pal.am { background: var(--mr); border-radius: 50%; width: 32px; min-width: 32px; height: 32px; }
.pal.am::after { content: "✓"; position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%; background: var(--an); color: #fff; font-size: 10px; line-height: 15px; text-align: center; border: 1px solid #fff; }

/* ---------- exam screen ---------- */
.exam { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.ex-top { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: var(--head); color: var(--head-ink); flex: none; }
.ex-title { display: grid; flex: 1; min-width: 0; }
.ex-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-title span { font-size: .8rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-cand { display: flex; align-items: center; gap: 8px; }
.ex-cand .avatar { width: 34px; height: 34px; border-radius: 4px; background: #fff; color: #333; display: grid; place-items: center; }
.ex-cand div, .ex-time { display: grid; line-height: 1.2; }
.ex-cand small, .ex-time small { font-size: .72rem; opacity: .85; }
.ex-time { background: #fff; color: var(--ink); padding: 4px 10px; border-radius: 4px; text-align: center; }
.ex-time b { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.ex-time b.low { color: var(--na); }
.pal-toggle { display: none; background: #fff; color: var(--head); border: 0; padding: 7px 10px; border-radius: 4px; font-weight: 700; }
.ex-secs { display: flex; gap: 4px; padding: 6px 14px 0; background: #dfe5ee; border-bottom: 2px solid var(--sec); overflow-x: auto; flex: none; }
.ex-secs button { background: #fff; border: 1px solid var(--line); border-bottom: 0; padding: 6px 14px; border-radius: 4px 4px 0 0; white-space: nowrap; color: var(--ink); }
.ex-secs button.on { background: var(--sec); color: #fff; border-color: var(--sec); font-weight: 600; }
.ex-body { flex: 1; display: grid; grid-template-columns: 1fr 320px; min-height: 0; }
.ex-q { overflow-y: auto; padding: 14px 20px 24px; background: var(--panel); }
.qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.qhead h2 { font-size: 1.05rem; margin: 0; }
.qtype { font-size: .8rem; color: var(--muted); }
.viewin { margin-left: auto; font-size: .85rem; display: flex; gap: 6px; align-items: center; }
.viewin select { padding: 3px 6px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.qtext { font-size: 1.02rem; }
.qtext p:first-child { margin-top: 0; }
.qtext table { border-collapse: collapse; margin: 8px 0; }
.qtext td, .qtext th { border: 1px solid var(--line); padding: 4px 8px; }
.opts { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.opts label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.opts label:hover { background: #f4f7fb; }
.opts label.picked { border-color: var(--sec); background: #eaf2fc; }
.opts input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.opts .on, .ropts .on { font-weight: 700; flex: none; }
.numans { margin-top: 16px; max-width: 300px; }
.numans input { width: 100%; padding: 9px 10px; font-size: 1.1rem; border: 1px solid #8895a5; border-radius: 3px; background: #fff; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.keypad button { padding: 10px 0; background: #f2f4f7; border: 1px solid var(--line); border-radius: 3px; font-weight: 600; }
.keypad button:active { background: #dfe5ee; }
.keypad .wide { grid-column: span 3; }
.keypad .wide + .wide { grid-column: span 3; }

.ex-pal { background: #f7f9fb; border-left: 1px solid var(--line); overflow-y: auto; padding: 10px 12px 20px; }
.pal-head { display: flex; justify-content: space-between; align-items: center; background: var(--sec); color: #fff; margin: -10px -12px 8px; padding: 8px 12px; }
.pal-close { display: none; background: transparent; color: #fff; border: 0; font-size: 1.1rem; }
.pal-label { font-weight: 700; font-size: .85rem; margin: 10px 0 6px; background: #dfe5ee; padding: 4px 8px; }
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px; justify-items: center; }
.pal-grid .pal { min-width: 36px; height: 32px; }
.pal-grid .pal.mr, .pal-grid .pal.am { width: 34px; min-width: 34px; height: 34px; }
.pal-grid .pal.cur { outline: 3px solid #f5c400; outline-offset: 1px; }

.ex-foot { flex: none; background: #f2f4f7; border-top: 1px solid var(--line); padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.ex-foot .row1, .ex-foot .row2 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-foot .grow { flex: 1; }
.ex-foot button, .modal-actions button { border-radius: 3px; padding: 8px 12px; font-weight: 700; font-size: .85rem; border: 1px solid transparent; }
.b-green { background: var(--green); color: #fff; }
.b-white { background: #fff; border-color: #9aa5b1 !important; color: var(--ink); }
.b-orange { background: var(--orange); color: #fff; }
.b-blue { background: var(--blue); color: #fff; }
.b-submit { background: var(--an); color: #fff; padding: 8px 22px !important; }
.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%) translateY(20px); background: #222; color: #fff; padding: 8px 14px; border-radius: 6px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); z-index: 60; }
.toast.show { opacity: .95; transform: translateX(-50%); }

/* submit dialog */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-box { background: #fff; border-radius: 6px; padding: 18px; max-width: 760px; width: 100%; max-height: 90vh; overflow: auto; }
.modal-box h2 { margin: 0 0 10px; font-size: 1.15rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.tablewrap { overflow-x: auto; }
.sumtab { border-collapse: collapse; width: 100%; font-size: .88rem; background: #fff; }
.sumtab th, .sumtab td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.sumtab th { background: #dfe5ee; }
.sumtab td:first-child, .sumtab th:first-child { text-align: left; }

/* ---------- result ---------- */
.score-row, .chg { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0; }
.score, .kpi { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: grid; }
.score { background: var(--head); color: #fff; border-color: var(--head); }
.score b { font-size: 2rem; line-height: 1.1; }
.kpi b { font-size: 1.4rem; }
.kpi span, .score span { font-size: .82rem; opacity: .85; }
.kpi.good b { color: var(--an); }
.kpi.bad b { color: var(--na); }
.res-block { margin-top: 10px; }
.tbars { display: flex; align-items: flex-end; gap: 2px; height: 150px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 8px 22px; overflow-x: auto; }
.tbar { flex: 1 0 9px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; text-decoration: none; }
.tbar i { display: block; width: 100%; border-radius: 2px 2px 0 0; }
.tbar span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--muted); }
.tbar:nth-child(5n+1) span { visibility: visible; }
.tbar span { visibility: hidden; }
.tbar.good i, .k.good { background: var(--an); }
.tbar.bad i, .k.bad { background: var(--na); }
.tbar.none i, .k.none { background: #9aa5b1; }
.tbar-key { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.k { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filters button { background: #fff; border: 1px solid var(--line); padding: 5px 12px; border-radius: 16px; }
.filters button.on { background: var(--head); color: #fff; border-color: var(--head); }
.rcard { background: #fff; border: 1px solid var(--line); border-left: 4px solid #9aa5b1; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.rcard.f-good { border-left-color: var(--an); }
.rcard.f-bad { border-left-color: var(--na); }
.rcard header { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.rcard header select { margin-left: auto; padding: 2px 4px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.badge { padding: 1px 8px; border-radius: 10px; font-size: .8rem; font-weight: 700; background: #e4e7eb; }
.badge.good { background: #dff3e4; color: #1b6e31; }
.badge.bad { background: #fbe2e0; color: #8a1c13; }
.ropts { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.ropts li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; display: flex; gap: 8px; }
.ropts li.right { border-color: var(--an); background: #eef9f0; }
.ropts li.wrongpick { border-color: var(--na); background: #fdeeee; }
.yours { font-size: .92rem; }
.chgnote { color: #8a5a00; }
details { margin-top: 6px; }
summary { cursor: pointer; color: var(--sec); font-weight: 600; }
.sol { margin-top: 6px; }
.sol .errata, .qtext .errata { background: #fff4e0; border-left: 3px solid #d98a00; padding: 6px 10px; }
.trap { background: #fdf3f2; padding: 6px 10px; border-radius: 4px; }
.paras { font-size: .85rem; color: var(--muted); }
.excerpt { margin: 8px 0; padding: 8px; background: #fafbfc; border: 1px solid var(--line); border-radius: 4px; }
.excerpt img { max-width: 100%; height: auto; display: block; }
.excerpt figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---------- phone / small tablet ---------- */
@media (max-width: 820px) {
  .ex-body { grid-template-columns: 1fr; }
  .pal-toggle, .pal-close { display: inline-block; }
  .ex-cand { display: none; }
  .ex-top { gap: 8px; padding: 6px 10px; }
  .ex-title span { display: none; }
  .ex-pal { position: fixed; top: 0; right: 0; bottom: 0; width: min(330px, 88vw); z-index: 40; transform: translateX(100%); transition: transform .2s; box-shadow: -4px 0 18px rgba(0,0,0,.2); padding-top: 10px; }
  .ex-pal.open { transform: none; }
  .ex-q { padding: 12px 14px 20px; }
  .ex-foot { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .ex-foot .row1 { display: grid; grid-template-columns: 1fr 1fr; }
  .ex-foot button { font-size: .75rem; padding: 9px 6px; }
  .ex-foot .row2 button { flex: 1; }
  .ex-foot .row2 .grow { display: none; }
  .viewin { margin-left: 0; }
  .toast { bottom: 140px; }
}
.hi-draft { display: inline-block; margin: 0 0 8px; padding: 2px 8px; font-size: .78rem; color: #6b4300; background: #fff4e0; border: 1px solid #f0c674; border-radius: 10px; font-family: var(--hi), var(--sans); }
[lang="hi"] .qtext, [lang="hi"] .opts, [lang="hi"] .ropts, [lang="hi"] .sol { font-family: var(--hi), var(--sans); line-height: 1.7; }

/* Chapter tests from the CBT server (list page) */
.signin-box { border: 1px solid #cfe3e3; background: #f4f7f7; border-radius: 10px; padding: 12px 14px; margin: 12px 0 18px; }
.signin-box p { margin: 0 0 10px; }
.chap-h { margin: 22px 0 6px; font-size: 1.1rem; color: #0B4F57; }
.chap-h small { color: #5b6b6b; font-weight: 400; margin-left: 6px; }
.test-list li.locked a { opacity: .72; }
.test-list i.free { color: #0B4F57; font-style: normal; font-weight: 600; }
.test-list i.lock { color: #9a6200; font-style: normal; }

/* ===================================================================
   Final design layer (B + C, Nov 2026): Mukta, teal + saffron, Hindi first.
   Plain pages (test list, instructions, resume, result) use the site's look; the exam screen keeps the NTA
   layout and the NTA palette colours, with the site's teal for the header strip and section tabs.
   =================================================================== */
:root {
  --brand: #0B4F57; --brand-soft: #DDF0F1; --saffron: #F59E0B; --saffron-soft: #FFF4DB; --saffron-ink: #7A4A00;
  --paper: #F4F7F7; --line2: #DCE6E7; --good: #0E8A4F; --bad: #B91C1C;
  --head: #0B4F57; --sec: #0E6B75;
  --hi: "Mukta", "Noto Sans Devanagari", "Mangal", sans-serif;
  --sans: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { font-family: var(--sans); background: var(--paper); }
.cbt-page { font-size: 17px; }
.cbt-page h1, .cbt-page h2, .cbt-page h3 { font-weight: 800; letter-spacing: -.2px; color: #12262A; }
.cbt-page .kicker { color: var(--saffron-ink); }
.cbt-page a { color: var(--brand); }
.lead { color: #3F5558; max-width: 46em; }

/* site bar */
.cbt-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 22px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line2); position: sticky; top: 0; z-index: 20; }
.cbt-bar .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.cbt-bar .brand .word { color: #12262A; }
.cbt-bar .brand .word span { color: var(--saffron); margin: 0 1px; }
.cbt-bar .brand .mark { width: 28px; height: 28px; border-radius: 9px; background: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.cbt-bar .brand .mark i { width: 10px; height: 10px; border-radius: 3px; background: var(--saffron); display: block; }
.cbt-bar nav { display: flex; gap: 16px; }
.cbt-bar nav a { color: #12262A; text-decoration: none; font-weight: 500; }
.cbt-bar nav a:hover { color: var(--brand); }
.cbt-bar .grow { flex: 1; }
.cbt-bar .lang { display: inline-flex; background: #EEF4F4; border-radius: 10px; padding: 3px; }
.cbt-bar .lang button { border: 0; background: transparent; color: #12262A; border-radius: 8px; padding: 4px 12px; font-size: .9rem; }
.cbt-bar .lang button.on { background: var(--brand); color: #fff; font-weight: 600; }
@media (max-width: 520px) { .cbt-bar { gap: 10px; padding: 8px 12px; } .cbt-bar nav { gap: 10px; } }

/* test list */
.grp-h { margin: 30px 0 6px; font-size: 1.35rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 3px solid var(--brand-soft); padding-bottom: 4px; }
.grp-h small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.grp-h.subj-physics { border-color: #E8E7FB; } .grp-h.subj-biology { border-color: #E3F3E8; }
.chap-tests { margin: 6px 0 14px; }
.chap-h { margin: 16px 0 2px; font-size: 1.08rem; color: var(--brand); }
.chap-h small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: .85rem; }
.chap-links { margin: 0 0 8px; font-size: .92rem; display: flex; gap: 14px; flex-wrap: wrap; }
.test-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 6px 0; }
.test-list a { border-radius: 14px; border-color: var(--line2); padding: 12px 16px; }
.test-list a:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(11,79,87,.10); }
.test-list b { font-size: 1.05rem; }
.test-list small { color: var(--muted); font-size: .85rem; }
.test-list .chips i { font-style: normal; font-weight: 600; font-size: .85rem; padding: 1px 10px; border-radius: 99px; background: #EEF4F4; color: #3F5558; }
.test-list .chips i.free { background: var(--brand-soft); color: var(--brand); }
.test-list .chips i.lock { background: var(--saffron-soft); color: var(--saffron-ink); }
.test-list .chips i.done { background: #E3F3E8; color: var(--good); }
.test-list.mocks a { background: linear-gradient(135deg, #fff, #F2FAFA); border-color: #B9DADD; }
.signin-box { border-radius: 14px; border-color: #CFE3E3; background: #fff; }

/* instructions / resume */
.instr-head { border-bottom-color: var(--brand); }
.facts div, .instr-list, .agree { border-radius: 12px; }
.agree { background: var(--saffron-soft); border-color: #F3D38A; }
.btn-go { background: var(--brand); border-radius: 12px; padding: 11px 24px; }
.btn-go:hover:not(:disabled) { background: #08424A; }
.btn-plain { border-radius: 12px; border-color: #C3D3D5; color: var(--brand); }

/* result */
.score-row .score { background: var(--brand); border-color: var(--brand); border-radius: 16px; }
.kpi, .score { border-radius: 14px; border-color: var(--line2); }
.kpi.good b { color: var(--good); } .kpi.bad b { color: var(--bad); }
.res-block h2 { margin-top: 30px; }
.revise-first { background: var(--saffron-soft); border-left: 4px solid var(--saffron); padding: 10px 14px; border-radius: 10px; }
.sumtab { border-radius: 10px; overflow: hidden; }
.sumtab th { background: #EEF4F4; }
.chtab td:first-child { min-width: 180px; }
.chtab tr.weak-row td { background: #FFF8EC; }
.chtab .meter { display: inline-block; vertical-align: middle; width: 70px; height: 7px; background: #E6EEEF; border-radius: 99px; overflow: hidden; margin-left: 6px; }
.chtab .meter i { display: block; height: 100%; background: var(--good); }
.chtab tr.weak-row .meter i { background: var(--saffron); }
.weak-paras { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.weak-paras li { background: #fff; border: 1px solid var(--line2); border-left: 4px solid var(--saffron); border-radius: 12px; padding: 8px 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; justify-content: space-between; }
.weak-paras li > a { display: grid; text-decoration: none; min-width: 0; }
.weak-paras li > a b { color: #12262A; }
.weak-paras li > a small { color: var(--muted); }
.weak-paras .wp-n { font-size: .88rem; color: var(--muted); }
.weak-paras .wp-n i { font-style: normal; margin-right: 8px; } .weak-paras .wp-n i.bad { color: var(--bad); font-weight: 600; }
.filters button.on { background: var(--brand); border-color: var(--brand); }
.rcard { border-radius: 12px; border-color: var(--line2); }
.rcard.f-good { border-left-color: var(--good); } .rcard.f-bad { border-left-color: var(--bad); }
summary { color: var(--brand); }
.paras a { color: var(--brand); }

/* exam screen: NTA layout, site colours for the frame */
.ex-secs { background: #E4EEEF; border-bottom-color: var(--sec); }
.pal-label { background: #E4EEEF; }
.opts label.picked { border-color: var(--sec); background: #E6F3F4; }

/* redrawn figures under the stem / solution (media from the bank) */
.qfig { margin: 10px 0 12px; }
.qfig img { display: block; max-width: 100%; height: auto; max-height: 440px; border: 1px solid #d7dee2; border-radius: 10px; background: #fff; }

/* custom-test chooser (exam.html?make=1) */
.mk-card { display: grid; gap: 4px; margin: 14px 0 6px; padding: 16px 18px; border-radius: 10px; background: var(--saffron-soft); border: 1px solid #f3d491; color: var(--ink); text-decoration: none; }
.mk-card b { font-size: 1.15rem; color: var(--saffron-ink); }
.mk-card:hover { border-color: var(--saffron); }
.maker .mk-step { margin: 18px 0; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.maker .mk-step h3 { margin: 0 0 10px; font-size: 1.08rem; display: inline-flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.maker .mk-step h3 small, .maker h4 { font-weight: 500; color: var(--muted); font-size: .85rem; }
.maker h4 { margin: 8px 0 6px; display: flex; gap: 8px; align-items: center; }
.maker .mk-more > summary { cursor: pointer; list-style: revert; }
.mk-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-seg button, .mk-all { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
.mk-all { padding: 2px 10px; font-size: .8rem; }
.mk-seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; }
.mk-chk { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 0; margin-right: 10px; cursor: pointer; }
.mk-chk small { color: var(--muted); font-size: .78rem; }
.mk-chk.empty { opacity: .45; cursor: default; }
.mk-rad { display: inline-flex; gap: 4px; align-items: baseline; margin-right: 14px; cursor: pointer; }
.mk-row { margin: 8px 0; line-height: 1.9; }
.mk-topic { border-top: 1px dashed var(--line); padding: 4px 0; }
.mk-topic details { margin: 0 0 4px 24px; }
.mk-topic details summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.mk-topic details .mk-chk { display: flex; }
.mk-go { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--brand-soft); padding: 10px 0; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; z-index: 2; }
.mk-count { margin: 0; }
#mk-n { width: min(320px, 70vw); vertical-align: middle; }

/* ---------- test list: four boxes (Full length, Physics, Chemistry, Biology) → chapters (17 Nov 2026) ---------- */
.tgroups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 10px; }
.tgroup { --gc: var(--brand); position: relative; display: grid; gap: 4px; align-content: start; min-height: 132px; padding: 18px 18px 16px;
  background: #fff; border: 1px solid var(--line2); border-top: 6px solid var(--gc); border-radius: 16px; color: var(--ink); text-decoration: none; }
.tgroup:hover { border-color: var(--gc); box-shadow: 0 8px 22px rgba(11,79,87,.12); }
.tgroup b { font-size: 1.35rem; color: var(--gc); line-height: 1.2; }
.tgroup span { color: var(--muted); font-size: .95rem; }
.tgroup small { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .88rem; color: var(--ink); }
.tgroup.g-mock { background: linear-gradient(135deg, #fff, var(--saffron-soft)); }
.tgroups.compact { gap: 8px; margin: 8px 0 4px; }
.tgroups.compact .tgroup { min-height: 0; padding: 10px 14px; border-top-width: 4px; border-radius: 12px; }
.tgroups.compact .tgroup b { font-size: 1.05rem; }
.tgroups.compact .tgroup small { padding-top: 2px; font-weight: 500; color: var(--muted); }
.tgroups.compact .tgroup.on { background: var(--gc); border-color: var(--gc); }
.tgroups.compact .tgroup.on b, .tgroups.compact .tgroup.on small { color: #fff; }
.grp-title { margin: 22px 0 4px !important; color: var(--gc); }
.grp-title small { font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.back-row { margin: 0 0 4px; font-size: .95rem; }
.back-row:last-child { margin-top: 26px; }
.mk-card.slim { margin: 12px 0 4px; padding: 10px 16px; }
.mk-card.slim b { font-size: 1.02rem; }
.cls-h { margin: 24px 0 8px !important; font-size: 1.05rem !important; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.chap-rows { display: grid; gap: 8px; }
.chap-row { background: #fff; border: 1px solid var(--line2); border-radius: 12px; }
.chap-row[open] { border-color: var(--brand); box-shadow: 0 6px 18px rgba(11,79,87,.08); }
.chap-row summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; }
.chap-row summary::-webkit-details-marker { display: none; }
.chap-row summary .no { display: grid; place-items: center; height: 2.2rem; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .9rem; }
.chap-row summary .nm { display: grid; line-height: 1.3; }
.chap-row summary .nm b { font-size: 1.04rem; }
.chap-row summary .nm small { color: var(--muted); font-size: .84rem; }
.chap-row summary .ct { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.chap-row summary .ct::after { content: '▾'; margin-left: 8px; color: var(--brand); display: inline-block; transition: transform .15s; }
.chap-row[open] summary .ct::after { transform: rotate(180deg); }
.chap-body { padding: 0 14px 14px; }
.chap-body .chap-links { margin: 0 0 6px; }
@media (max-width: 760px) {
  .tgroups { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tgroup { min-height: 112px; padding: 14px; }
  .tgroup b { font-size: 1.15rem; }
  .tgroups.compact { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .tgroups.compact .tgroup { padding: 8px 6px; text-align: center; }
  .tgroups.compact .tgroup b { font-size: .9rem; }
  .tgroups.compact .tgroup small { display: none; }
  .chap-row summary { grid-template-columns: 2.2rem 1fr; }
  .chap-row summary .ct { grid-column: 2; }
}
