/* Parent page: one reading column on a warm paper ground; the school's navy band on top; bars are the only chart. */
:root {
  --ground: #f4f3ef; --card: #ffffff; --sunk: #f7f6f2; --line: #e6e5e1; --track: #ebe9e3;
  --ink: #16181d; --muted: #55534e; --faint: #85837d;
  --navy: #1F3D6B; --navy-ink: #1F3D6B; --band: #1F3D6B; --band-ink: #ffffff; --band-soft: rgba(255,255,255,.14);
  --kept: #2a6fc9; --thin: #b4b8bf; --class: #c9541f;
  --fix-bg: #FBE0E6; --fix-ink: #9b2c47; --good-bg: #DCEFE6; --good-ink: #22694a; --habit-bg: #e9e6dc; --habit-ink: #5b5136;
  --lost-blank: #c6ccd6; --lost-easy: #d68a2c; --lost-other: #7d8698;
  --note-bg: #f1efe8; --focus: #2a6fc9; --scrim: rgba(18, 20, 24, .45);
  --shadow: 0 18px 48px rgba(22, 24, 29, .20);
  --paper: #ffffff; --on-navy: #ffffff;
  --red: #B4233F; --green: #2F8A57; --head-bg: #F9D5DD; --head-line: #e7aab8; --head-sub: #6f2236;
  --pill-bg: #e7eef9; --pill-ink: #1f4f99; --chip-bg: #f1efe8; --hl-bg: #FBE0E6; --topper-bg: #e6f3eb; --dl-line: #c9d3e3; --class-ink: #a6441a;
  --sans: "IBM Plex Sans", "IBM Plex Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "IBM Plex Serif", "IBM Plex Sans Devanagari", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111317; --card: #1a1d22; --sunk: #15181c; --line: #2c3038; --track: #2a2e35;
    --ink: #e9eaed; --muted: #a6aab2; --faint: #7d828b;
    --navy: #9dbbe8; --navy-ink: #a9c4ec; --band: #13284a; --band-ink: #eef2f8; --band-soft: rgba(255,255,255,.10);
    --kept: #5b9be6; --thin: #555b66; --class: #f08a52;
    --fix-bg: #41222b; --fix-ink: #f4a9bb; --good-bg: #183a2b; --good-ink: #8fd3b0; --habit-bg: #2c2a22; --habit-ink: #d9cfae;
    --lost-blank: #4a505c; --lost-easy: #c98a3a; --lost-other: #6b7385;
    --note-bg: #1f2227; --focus: #7fb0ee; --scrim: rgba(0, 0, 0, .6);
    --shadow: 0 18px 48px rgba(0, 0, 0, .55);
    --paper: #f4f4f2; --on-navy: #0d1420;
    --red: #e0607a; --green: #5cbf8a; --head-bg: #3a1f27; --head-line: #5a2c39; --head-sub: #f0b3c2;
    --pill-bg: #1f2c44; --pill-ink: #a9c4ec; --chip-bg: #24272d; --hl-bg: #41222b; --topper-bg: #183a2b; --dl-line: #34405a; --class-ink: #f08a52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #111317; --card: #1a1d22; --sunk: #15181c; --line: #2c3038; --track: #2a2e35;
  --ink: #e9eaed; --muted: #a6aab2; --faint: #7d828b;
  --navy: #9dbbe8; --navy-ink: #a9c4ec; --band: #13284a; --band-ink: #eef2f8; --band-soft: rgba(255,255,255,.10);
  --kept: #5b9be6; --thin: #555b66; --class: #f08a52;
  --fix-bg: #41222b; --fix-ink: #f4a9bb; --good-bg: #183a2b; --good-ink: #8fd3b0; --habit-bg: #2c2a22; --habit-ink: #d9cfae;
  --lost-blank: #4a505c; --lost-easy: #c98a3a; --lost-other: #6b7385;
  --note-bg: #1f2227; --focus: #7fb0ee; --scrim: rgba(0, 0, 0, .6);
  --shadow: 0 18px 48px rgba(0, 0, 0, .55);
  --paper: #f4f4f2; --on-navy: #0d1420;
  --red: #e0607a; --green: #5cbf8a; --head-bg: #3a1f27; --head-line: #5a2c39; --head-sub: #f0b3c2;
  --pill-bg: #1f2c44; --pill-ink: #a9c4ec; --chip-bg: #24272d; --hl-bg: #41222b; --topper-bg: #183a2b; --dl-line: #34405a; --class-ink: #f08a52;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
html[lang="hi"] body { line-height: 1.62; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--band); }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--navy-ink); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
html[lang="hi"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 12.5px; }

.wrap { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* header band */
.band { background: var(--band); color: var(--band-ink); }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crest { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--band-ink); color: var(--band); display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.brand b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.brand span { display: block; font-size: 12px; opacity: .8; line-height: 1.3; }
.lang { flex: none; background: var(--band-soft); border: 1px solid rgba(255,255,255,.35); color: var(--band-ink); border-radius: 999px; padding: 7px 14px; min-height: 40px; font-weight: 600; font-size: 14px; cursor: pointer; }
.lang:hover { background: rgba(255,255,255,.24); }

/* student card */
.who { padding-block: 16px 4px; display: flex; flex-direction: column; gap: 2px; }
.who h1 { font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.who .meta { color: var(--muted); font-size: 13.5px; }

/* tabs */
.tabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--ground); padding-block: 10px 8px; }
.tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tab { border: 0; background: none; border-radius: 9px; padding: 8px 4px; min-height: 44px; font-weight: 500; font-size: 14px; color: var(--muted); cursor: pointer; line-height: 1.2; }
.tab[aria-selected="true"] { background: var(--navy); color: var(--on-navy); font-weight: 600; }

.page { display: flex; flex-direction: column; gap: 16px; padding-block: 8px 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h2 { font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.card h3 { font-size: 15.5px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }

/* bars: one number, one bar, one class marker */
.bar { position: relative; height: 12px; background: var(--track); border-radius: 6px; }
.bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--kept); border-radius: 6px; min-width: 2px; }
.bar .fill.green { background: var(--green); } .bar .fill.blue { background: var(--kept); } .bar .fill.red { background: var(--red); }
.bar .mk { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--class); border-radius: 2px; box-shadow: 0 0 0 1.5px var(--card); }
.bar.big { height: 16px; border-radius: 8px; }
.bar.big .fill { border-radius: 8px; }
.mk-label { position: relative; height: 16px; font-size: 11.5px; color: var(--class); font-weight: 600; }
.mk-label span { position: absolute; transform: translateX(-50%); white-space: nowrap; top: 2px; }
.mk-label span.edge-r { transform: translateX(-100%); }
.mk-label span.edge-l { transform: none; }

/* total + tiles */
.total { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.big-num { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.big-num small { font-size: 16px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.standing { font-size: 14px; color: var(--ink); font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; min-width: 0; }
.tile:hover { border-color: var(--kept); }
.tile .nm { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile .score { font-size: 23px; font-weight: 700; line-height: 1.1; }
.tile .score small { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tile.status { cursor: default; }
.tile.status .score { font-size: 16px; color: var(--muted); }
.key { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.key i { flex: none; width: 3px; height: 14px; border-radius: 2px; background: var(--class); margin-top: 3px; }

/* subject chips */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; min-height: 38px; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }

/* subject section */
.subj-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 600; }
.block { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.block > .eyebrow { margin-bottom: -2px; }

.rows { display: flex; flex-direction: column; gap: 12px; }
.crow { display: flex; flex-direction: column; gap: 5px; }
.crow .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.crow .nm { font-size: 14px; min-width: 0; }
.crow .val { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.crow .val .cls { color: var(--class-ink); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.tag.fix { background: var(--red); color: var(--card); }
.tag.good { background: var(--green); color: var(--card); }

/* lost-marks bar */
.lostbar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--track); gap: 2px; }
.lostbar span { display: block; min-width: 3px; }
.lostbar .blank { background: var(--lost-blank); }
.lostbar .easy { background: var(--lost-easy); }
.lostbar .other { background: var(--lost-other); }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.legend div { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.legend i { width: 12px; height: 12px; border-radius: 3px; transform: translateY(1px); }
.legend i.blank { background: var(--lost-blank); } .legend i.easy { background: var(--lost-easy); } .legend i.other { background: var(--lost-other); }
.legend .m { font-variant-numeric: tabular-nums; font-weight: 600; }
.nw { white-space: nowrap; }

/* links */
.qlink { border: 0; background: none; padding: 0; color: var(--navy-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-variant-numeric: tabular-nums; }
.plink { border: 0; background: none; padding: 0; color: var(--navy-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; font-size: 13.5px; }
.say { display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.say > i { border-radius: 3px; }
.say.good > i { background: var(--good-ink); opacity: .5; }
.say.habit > i { background: var(--habit-ink); opacity: .45; }
.say b { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.nofix { font-size: 13.5px; color: var(--muted); background: var(--note-bg); border-radius: 8px; padding: 10px 12px; }

/* question list */
.more { align-self: flex-start; border: 1px solid var(--line); background: var(--sunk); border-radius: 999px; padding: 8px 14px; min-height: 40px; font-weight: 500; font-size: 14px; cursor: pointer; }
.qtable { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qrow { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 12px; border: 0; border-top: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; min-height: 44px; }
.qrow:first-child { border-top: 0; }
.qrow:hover { background: var(--sunk); }
.qrow .qn { font-weight: 600; font-variant-numeric: tabular-nums; }
.qrow .qc { font-size: 12.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .qm { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.qrow .qm small { display: block; color: var(--faint); font-size: 11.5px; }
.qrow.lost { box-shadow: inset 4px 0 0 var(--red); } .qrow.full { box-shadow: inset 4px 0 0 var(--green); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.full { background: var(--kept); } .dot.partial { background: linear-gradient(90deg, var(--kept) 50%, var(--track) 50%); box-shadow: inset 0 0 0 1px var(--kept); }
.dot.zero, .dot.na { background: var(--track); box-shadow: inset 0 0 0 1px var(--faint); } .dot.excluded { background: var(--thin); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); gap: 2px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 12px; min-height: 34px; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); font-weight: 600; }
.seg button.lostbtn[aria-pressed="true"] { background: var(--red); color: var(--card); }

/* notes + parent note */
.notes { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.notes p { padding-left: 12px; border-left: 2px solid var(--line); }
.pnote { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pnote p { font-size: 15px; max-width: 62ch; }
.seen { align-self: flex-start; border: 0; background: var(--navy); color: var(--on-navy); border-radius: 10px; padding: 11px 16px; min-height: 44px; font-weight: 600; cursor: pointer; }
.seen[disabled] { background: var(--good-bg); color: var(--good-ink); cursor: default; }

/* progress */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .band-area { fill: var(--kept); opacity: .13; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--faint); font-size: 11px; font-family: var(--sans); }
.chart .xl { fill: var(--muted); font-size: 11.5px; font-family: var(--sans); }
.chart .ln { fill: none; stroke: var(--navy-ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--card); stroke: var(--navy-ink); stroke-width: 2.5; }
.chart .pl { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans); }
.trend { font-size: 13.5px; font-weight: 500; }
.trend.up { color: var(--good-ink); } .trend.down { color: var(--fix-ink); } .trend.flat, .trend.na { color: var(--muted); }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ptable th, .ptable td { text-align: right; padding: 6px 8px; border-top: 1px solid var(--line); }
.ptable th:first-child, .ptable td:first-child { text-align: left; }
.ptable thead th { color: var(--muted); font-weight: 600; border-top: 0; }
.scroll-x { overflow-x: auto; }
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bandkey { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); align-items: center; }
.bandkey span { display: inline-flex; gap: 6px; align-items: center; }
.bandkey .sw { width: 18px; height: 10px; border-radius: 3px; background: var(--kept); opacity: .2; }
.bandkey .k-ln { stroke: var(--navy-ink); stroke-width: 2.5; } .bandkey .k-pt { fill: var(--card); stroke: var(--navy-ink); stroke-width: 2; }
.bandkey .k-cl { stroke: var(--class); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.1 5.5; } .bandkey .k-sq { fill: var(--class); stroke: var(--card); stroke-width: 1.5; }
.chart .cl { fill: none; stroke: var(--class); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.1 5.5; }
.chart .csq { fill: var(--class); stroke: var(--card); stroke-width: 1.5; }

/* Q&A card */
.qcard { display: flex; flex-direction: column; gap: 12px; }
.qhead { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.crumb { font-size: 13px; color: var(--muted); }
.qtext { white-space: pre-line; font-size: 15px; }
.stem { white-space: pre-line; font-size: 14px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 340px; overflow: auto; }
.opts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.opts li { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: 6px; font-size: 14.5px; }
.opts li b { color: var(--muted); font-weight: 600; }
.fig { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px; align-self: flex-start; max-width: 100%; }
.fig img { display: block; max-width: 100%; height: auto; }
.scheme { white-space: pre-line; font-size: 14px; background: var(--pill-bg); color: var(--ink); border-radius: 10px; padding: 12px; }
.scheme-h { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-ink); }
html[lang="hi"] .scheme-h { letter-spacing: 0; text-transform: none; font-size: 13px; }
.pnotes { font-size: 12.5px; color: var(--faint); }
.qa-item { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.qa-item > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; min-height: 48px; }
.qa-item > summary::-webkit-details-marker { display: none; }
.qa-item > summary .s1 { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.qa-item > summary .s2 { font-size: 12.5px; color: var(--muted); grid-column: 1; min-width: 0; }
.qa-item > summary .chev { grid-row: 1 / span 2; grid-column: 2; color: var(--faint); transition: transform .15s; }
.qa-item[open] > summary .chev { transform: rotate(90deg); }
.qa-item .body { padding: 0 14px 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.qa-list { display: flex; flex-direction: column; gap: 8px; }
.qa-item.lost { border-left: 4px solid var(--red); } .qa-item.full { border-left: 4px solid var(--green); }
.lostm { color: var(--red); } .fullm { color: var(--green); }
.qsubj { color: var(--navy-ink); font-weight: 700; }

/* worksheet */
.wsitem { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.wstag { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lvl { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); color: var(--ink); }
.lvl.up { background: var(--good-bg); color: var(--good-ink); border-color: transparent; }
.wsn { font-weight: 700; color: var(--ink); }
.wsitem .qtext { font-size: 14.5px; }

/* bottom sheet */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; background: var(--card); border-radius: 18px 18px 0 0; box-shadow: var(--shadow);
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }
.sheet .close { position: sticky; top: 0; float: right; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; font-size: 13px; z-index: 1; }
@media (min-width: 760px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 48px)); max-height: 86vh; border-radius: 16px; padding: 18px 22px; }
  .sheet .grab { display: none; }
}
body.locked { overflow: hidden; }

/* notice line */
.notice { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* this exam in short */
.inshort h2 { font-size: 19px; }
.strong-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 14px; }
.strong-row .tag { margin-left: 0; }
.wf { border-top: 1px solid var(--line); padding-top: 12px; }
.acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acts li + li { border-top: 1px solid var(--line); }
.act { width: 100%; border: 0; background: none; padding: 10px 0; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; text-align: left; cursor: pointer; }
div.act { cursor: default; }
.acts li:first-child .act { padding-top: 2px; }
.act .rk { font-family: var(--serif); font-weight: 600; color: var(--red); font-size: 16px; line-height: 1.3; }
.act .ab { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act .ab b { font-weight: 600; font-size: 14.5px; }
.act .sub { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.act .do { font-size: 13.5px; }
.gain { flex: none; font-size: 14px; font-weight: 700; color: var(--pill-ink); background: var(--pill-bg); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.topper { font-size: 14px; background: var(--topper-bg); border-radius: 8px; padding: 10px 12px; }
.habit-box { background: var(--habit-bg); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.habit-box b { font-size: 12.5px; color: var(--habit-ink); font-weight: 600; }

/* tiles: before mid-term */
.tile-top { display: flex; justify-content: space-between; gap: 6px; }
.tile .pc { font-size: 13px; color: var(--muted); }
.tile .bm { border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.4; }
.tile .bm b { font-size: 13.5px; }
.tile-note { margin-top: -6px; }

/* type of question */
.trow { display: flex; flex-direction: column; gap: 5px; }
.trow .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.trow .val { white-space: nowrap; color: var(--muted); }
.trow .val b { color: var(--ink); }
.trow.hl { background: var(--hl-bg); border-radius: 8px; padding: 8px 10px; margin: 0 -10px; }
.trow.hl .bar { background: var(--card); }
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tgrid.nc { grid-template-columns: minmax(0, 1fr) auto; }
.tgrid .th { font-size: 12px; color: var(--muted); }
.tgrid .r { text-align: right; white-space: nowrap; }
.tgrid .b { font-weight: 600; }
.tgrid .tl.hl { font-weight: 600; background: var(--hl-bg); border-radius: 6px; padding: 3px 8px; margin-left: -8px; justify-self: start; }

/* chapter legend */
.cleg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); align-items: center; }
.cleg span { display: inline-flex; gap: 5px; align-items: center; }
.cleg i { width: 10px; height: 10px; border-radius: 2px; }
.cleg i.green { background: var(--green); } .cleg i.blue { background: var(--kept); } .cleg i.red { background: var(--red); }
.cleg i.mkr { width: 3px; height: 12px; border-radius: 1px; background: var(--class); }

/* what to work on */
.acard { border: 1px solid var(--head-line); border-radius: 10px; overflow: hidden; background: var(--card); }
.acard .ah { background: var(--head-bg); padding: 10px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.acard .ah > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.acard h3 { font-size: 15px; font-weight: 600; }
.acard .ahs { font-size: 13px; color: var(--head-sub); font-variant-numeric: tabular-nums; }
.acard .ah .gain { background: var(--card); font-size: 13px; }
.arows { padding: 10px 12px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; font-size: 13.5px; align-items: start; }
.arows .rl { color: var(--muted); font-size: 12px; padding-top: 2px; }
.qchips { display: flex; flex-wrap: wrap; gap: 4px; }
.qchip { border: 0; font-size: 12.5px; background: var(--chip-bg); border-radius: 5px; padding: 3px 8px; min-height: 28px; cursor: pointer; font-variant-numeric: tabular-nums; }
.qchip b { color: var(--navy-ink); }
.arows .plink { font-size: 13.5px; }

/* Q&A bar and downloads */
.qa-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.qa-bar .seg button { padding: 5px 9px; font-size: 12.5px; }
.dl { border: 1px solid var(--dl-line); background: var(--card); color: var(--navy-ink); border-radius: 999px; padding: 6px 10px; min-height: 36px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.dl .dl-short { display: none; }
.qa-bar.tight .dl .dl-long { display: none; } .qa-bar.tight .dl .dl-short { display: inline; }
.dl[disabled] { opacity: .7; cursor: progress; }
.ws-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.err { color: var(--red); }

/* PDF pages (drawn off-screen, always light) */
.pdfdoc { background: #fff; color: #16181d; font-family: "IBM Plex Sans", "IBM Plex Sans Devanagari", system-ui, sans-serif; font-size: 13px; line-height: 1.5; }
.pdfdoc[lang="hi"] { line-height: 1.62; }
.pdfpage, .pdfsrc { display: flex; flex-direction: column; gap: 12px; background: #fff; }
.pdfdoc .pb { break-inside: avoid; }
.pdfdoc .pcut { overflow: hidden; flex: none; }
.pdfdoc .ph { border-bottom: 2px solid #1F3D6B; padding-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.pdfdoc .ph-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.pdfdoc .ph-brand { display: flex; gap: 10px; align-items: center; }
.pdfdoc .ph-brand b { display: block; font-size: 14px; color: #1F3D6B; }
.pdfdoc .ph-brand small { display: block; font-size: 11.5px; color: #55534e; }
.pdfdoc .ph-crest { width: 34px; height: 34px; border-radius: 8px; background: #1F3D6B; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.pdfdoc .ph-who { text-align: right; font-size: 12px; color: #55534e; line-height: 1.45; }
.pdfdoc .ph-who b { color: #16181d; font-size: 13px; }
.pdfdoc h1 { font-family: "IBM Plex Serif", Georgia, serif; font-size: 20px; margin: 6px 0 0; font-weight: 600; }
.pdfdoc .ph-meta { font-size: 12.5px; color: #33312d; }
.pdfdoc .ph-intro { font-size: 12px; color: #55534e; }
.pdfdoc .psubj { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid #1F3D6B; padding: 6px 0 6px; }
.pdfdoc .psubj h2 { font-family: "IBM Plex Serif", Georgia, serif; font-size: 19px; font-weight: 600; color: #1F3D6B; margin: 0; }
.pdfdoc .psubj span { font-size: 12px; color: #55534e; }
.pdfdoc .psec { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #55534e; border-bottom: 1px solid #e6e5e1; padding: 6px 0 4px; }
.pdfdoc .pq, .pdfdoc .pw { border: 1px solid #e6e5e1; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.pdfdoc .pq-h { font-weight: 600; font-size: 13px; }
.pdfdoc .pq-h .lostm { color: #B4233F; } .pdfdoc .pq-h .fullm { color: #2F8A57; }
.pdfdoc .pq-c { font-size: 11.5px; color: #55534e; }
.pdfdoc .pq-stem { white-space: pre-line; font-size: 12px; color: #33312d; border-left: 3px solid #e6e5e1; padding-left: 10px; }
.pdfdoc .pq-t { white-space: pre-line; font-size: 13px; }
.pdfdoc .pq-o { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 16px; font-size: 12.5px; }
.pdfdoc .pq-ms { background: #f4f6fa; border: 1px solid #dde4ef; border-radius: 6px; padding: 8px 10px; font-size: 12px; white-space: pre-line; display: flex; flex-direction: column; gap: 3px; }
.pdfdoc .pq-ms > b { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #1F3D6B; }
.pdfdoc[lang="hi"] .pq-ms > b, .pdfdoc[lang="hi"] .psec { letter-spacing: 0; text-transform: none; }
.pdfdoc .fig { border: 1px solid #e6e5e1; border-radius: 6px; padding: 6px; align-self: flex-start; max-width: 100%; background: #fff; }
.pdfdoc .fig img { display: block; max-width: 100%; max-height: 360px; height: auto; width: auto; }
.pdfdoc .pw-h { font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pdfdoc .pw-src { color: #55534e; font-size: 11.5px; }
.pdfdoc .lvl { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #f1efe8; color: #16181d; }
.pdfdoc .lvl.up { background: #DCEFE6; color: #22694a; }
.pdfdoc .pw-lines { display: flex; flex-direction: column; margin-top: 4px; }
.pdfdoc .pw-lines i { display: block; height: 26px; border-bottom: 1px solid #c9c6bd; }

@media print {
  body::before, .tabs, .lang, .more, .seen, .chips, .scrim, .sheet { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .pnote { break-inside: avoid; border-color: #ccc; }
  .band { background: #fff; color: #000; border-bottom: 2px solid #1F3D6B; }
  .crest { background: #1F3D6B; color: #fff; }
}
