/* Dark Horse HSC Board Guide chapter pages (hsc-<chapter>.html). Loaded AFTER style.css + study.css: the page is laid out
   exactly like the MHT CET Pro Notes (study-*.html); this file only adds the parts the HSC book has and Pro Notes don't,
   in the same book tokens (--b-purple, --b-lav …), so light and dark follow the site switch. */

.hb-sub { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.st-stats a { color: inherit; text-decoration: none; } .st-stats a b { color: var(--accent); }

/* top of a topic: "In this topic" box + the textbook figure */
.hb-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 16px; align-items: start; }
.hb-top .one { margin: 0; max-width: none; }
.theory .hb-top > .hfig { float: none; width: 100% !important; margin: 0; }
.hb-cov { margin: 6px 0 0; padding-left: 20px; } .hb-cov li { margin: 2px 0; font-weight: 600; } .hb-cov li::marker { color: var(--b-yel-ink); }
.hfig { margin: 0; } .hfig img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }
.hfig .cap { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.35; }
.hb-top > .hfig { padding: 8px; border: 1px solid var(--b-line); border-radius: 14px; background: #fff; }
.hb-top > .hfig .cap { color: #636369; }
@media (max-width: 700px) { .hb-top { grid-template-columns: 1fr; } .hb-top > .hfig { justify-self: center; } }

/* key words table: word column bold, meaning normal */
.theory .clock.hb-kw td:first-child { font-weight: 700; color: var(--b-deep); width: 38%; }

/* board questions: one per row (solutions are long) */
.sx-list.hb-list { grid-template-columns: 1fr; }
.hb-cet { border-top-color: var(--b-yelb); } .hb-cet h3 { color: var(--b-yel-ink); }
.pq.hq { background: var(--surface); scroll-margin-top: 70px; }
.pq.hq .pqt { font-weight: 600; font-size: 16px; line-height: 1.55; }
.pq.hq .pqtag { font-weight: 600; }
.pq.hq .qopts span { padding: 2px 0; }
.pq.hq .qnote { margin-top: 6px; color: var(--muted); font-size: 14px; }

/* line-by-line solution (book layout): arrow, one step per line, faint dashed line between steps */
.hsol { padding: 8px 14px 10px; border-left: 2px solid var(--b-lavb); border-radius: 4px 12px 12px 4px; background: var(--b-lav2); font-size: 15.5px; line-height: 1.75; }
.hsol::after { content: ""; display: block; clear: both; }
.hsol .ln { display: flex; gap: 7px; align-items: baseline; }
.hsol .ln .ar { flex: none; min-width: 1em; color: var(--b-purple); font-weight: 700; }
.hsol .ln:not(.cont):not(.f) ~ .ln:not(.cont):not(.f) { border-top: 1px dashed var(--b-line); padding-top: 2px; margin-top: 2px; }
.hsol .ln.ans { border-top: 0 !important; }
.hsol .ln.f { display: block; margin-left: 20px; padding: 2px 0; }
.hsol .ln.ans > span:last-child { padding: 0 8px; border-radius: 6px; background: var(--b-yel); font-weight: 600; }
.hsol .fbox { display: inline-block; font-weight: 700; }
.hsol .qfig { float: left; width: min(46%, 260px) !important; margin: 4px 14px 6px 0; padding: 6px; border: 1px solid var(--b-line); border-radius: 12px; background: #fff; }
.hsol .qfig .cap { color: #636369; }
@media (max-width: 600px) { .hsol { padding: 8px 10px 10px; font-size: 15px; } .hsol .qfig { float: none; width: min(100%, 300px) !important; margin: 6px 0; } }
.nw { white-space: nowrap; }

/* square root drawn as one shape (book maths) */
.rt { position: relative; display: inline-flex; vertical-align: middle; margin: 0 1px 0 2px; padding-left: .62em; }
.rsv { position: absolute; left: 0; top: 0; width: .62em; height: 100%; overflow: visible; } .rsv path { fill: none; stroke: currentColor; stroke-width: 1.25px; stroke-linejoin: round; }
.rad { display: inline-flex; align-items: center; border-top: 1.25px solid currentColor; padding: 2px 3px 0 1px; line-height: 1.15; }

/* chapter at a glance */
.gcards .row5 { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 8px; }
.row5 > div { padding: 10px 12px; border-radius: 14px; background: var(--b-lav2); border: 1px solid var(--b-line); }
.row5 .tk { display: block; font-size: 12px; font-weight: 700; color: var(--b-purple); }
.row5 b { display: block; font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; color: var(--ink); }
.row5 em { display: block; font-style: normal; font-size: 13px; color: var(--muted); }
.row5 .hero { background: var(--b-deep-bg); border-color: var(--b-deep-bg); }
.row5 .hero span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #e4dcff; }
.row5 .hero b { color: #fff; } .row5 .hero em { color: #e4dcff; }
@media (max-width: 640px) { .gcards .row5 { grid-template-columns: repeat(2, 1fr); } .row5 .hero { grid-column: 1 / -1; } }
.tscroll { overflow-x: auto; border: 1.5px solid var(--b-lavb); border-radius: 12px; }
table.wt { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 15px; }
table.wt th { padding: 7px 10px; background: var(--b-lav); text-align: left; font-size: 13px; font-weight: 800; white-space: nowrap; }
table.wt th small { font-weight: 500; color: var(--muted); font-size: 11px; }
table.wt th.tl { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--b-purple); }
table.wt td { padding: 7px 10px; border-top: 1px dashed var(--b-line); vertical-align: middle; }
table.wt td + td, table.wt th + th { border-left: 1px solid var(--b-line); }
table.wt td.tl { font-weight: 600; white-space: nowrap; } table.wt td.tl a { color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--b-purple); }
table.wt .tn { display: inline-block; min-width: 28px; font-style: normal; font-weight: 800; font-size: 12.5px; color: var(--b-purple); }
.cb { display: grid; grid-template-columns: 1fr 42px; gap: 8px; align-items: center; } .cb b { text-align: right; }
.cb .bt { height: 8px; border-radius: 6px; overflow: hidden; background: var(--b-lav); } .cb .bt i { display: block; height: 100%; border-radius: 6px; }
/* one colour per exam: the site's own exam colours */
table.wt .x-hsc, .cb.x-hsc b { color: var(--ex-hsc); } .cb.x-hsc .bt i { background: var(--ex-hsc); }
table.wt .x-cet, .cb.x-cet b { color: var(--ex-cet); } .cb.x-cet .bt i { background: var(--ex-cet); }
table.wt .x-jee, .cb.x-jee b { color: var(--ex-jee); } .cb.x-jee .bt i { background: var(--ex-jee); }
tr.srcrow td { font-size: 12px; font-weight: 600; } tr.srcrow td.tl { color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
table.wt.most td.mq { font-weight: 600; } table.wt.most td.mm, table.wt.most td.ma { color: var(--muted); font-size: 14px; white-space: nowrap; }
table.wt.most .mx { text-align: center; } table.wt.most td.mx b { color: var(--b-purple); }

/* dark: textbook line drawings become light lines; the exam colours get lighter */
:root[data-theme="dark"] .hb .hfig, :root[data-theme="dark"] .hb .hb-top > .hfig { background: transparent; }
:root[data-theme="dark"] .hb .hfig img { filter: invert(.9) hue-rotate(180deg); background: transparent; }
:root[data-theme="dark"] .hb .hfig .cap { color: var(--muted); }
:root[data-theme="dark"] .hb { --ex-hsc: #f07ab5; --ex-cet: #79a6e6; --ex-jee: #f0a36b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hb .hfig, :root:not([data-theme="light"]) .hb .hb-top > .hfig { background: transparent; }
  :root:not([data-theme="light"]) .hb .hfig img { filter: invert(.9) hue-rotate(180deg); background: transparent; }
  :root:not([data-theme="light"]) .hb { --ex-hsc: #f07ab5; --ex-cet: #79a6e6; --ex-jee: #f0a36b; }
}
@media print { .sol > summary { display: none; } .sol > :not(summary) { display: block !important; } }
/* style.css inverts every .qfig box in dark mode; our figures invert only the image, so cancel the box one */
.hb .hfig.qfig { filter: none !important; }
/* Ch 3: mean value with a bar (v̄²) and a full-size ∝ (Inter has no ∝ glyph) */
.ov{ text-decoration:overline; text-decoration-thickness:1.2px }
.prop{ font-family:'STIX Two Math','Cambria Math','Times New Roman',serif; font-size:1.12em; font-weight:400; line-height:1 }
