/* ============================================================
   PYQ Decoder · Oct 2026 redesign
   Loaded after qb.css (which still drives marks, weightage tables
   and the phone hint) and home.css (grid paper, h- buttons).
   pq- classes are the new frame: hero, chapter sidebar, topic rail.
   ============================================================ */
.pq-page { --pq-k7w: 0; --pq-side: 268px; --pq-rail: 264px; --pq-gap: 40px; --pq-top: 132px; }
.pq-wrap { max-width: 1400px; margin: 0 auto; padding: 0 32px; }
.pq-page .h-eb .qb-beta { margin-left: 6px; font-size: .62rem; padding: 2px 8px; letter-spacing: .06em; }

/* breadcrumb */
.pq-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 .85rem var(--sans); color: rgb(var(--c-ink-3)); }
.pq-crumb a { color: rgb(var(--c-ink-2)); text-decoration: none; }
.pq-crumb a:hover { color: rgb(var(--c-ink)); text-decoration: underline; text-underline-offset: 3px; }
.pq-crumb b { color: rgb(var(--c-ink)); font-weight: 600; }

/* ---------- hero (shared) ---------- */
.pq-hero { padding: 36px 0 36px; }
.pq-hero h1 { margin: 12px 0 0; font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 3.8vw, 3.3rem); line-height: 1.06; letter-spacing: -.02em; color: rgb(var(--c-ink)); max-width: 18em; }
body.h-page .pq-hero h1 { margin-bottom: 0; }
.pq-hero .h-eb { margin-top: 26px; }
.pq-sub { margin: 18px 0 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; color: rgb(var(--c-ink-2)); max-width: 40em; }

/* ---------- chapter hero ---------- */
.pq-ch__grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 48px; margin-top: 8px; }
.pq-ch__copy { flex: 999 1 560px; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.pq-ch__n { margin-top: 18px; font: 600 clamp(4.4rem, 7.5vw, 7rem)/.82 var(--serif); letter-spacing: -.05em; color: rgb(var(--c-amber)); font-variant-numeric: tabular-nums; }
.pq-ch__t .h-eb { margin-top: 20px; }
.pq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0 !important; }
.pq-chip { display: inline-flex; align-items: center; gap: 5px; font: 600 .8rem/1.2 var(--sans); padding: 6px 12px; border-radius: 999px; border: 1px solid rgb(var(--c-line)); background: rgb(var(--c-surface)); color: rgb(var(--c-ink-2)); white-space: nowrap; }
.pq-chip b { color: rgb(var(--c-ink)); }
.pq-chip--law { color: rgb(var(--c-red-ink)); background: rgb(var(--c-red-soft)); border-color: rgb(var(--c-red-line)); }
.pq-order { font-size: .8rem; color: rgb(var(--c-ink-3)); margin-left: 4px; }
.pq-ch__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.pq-wl, .pq-pn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgb(var(--c-line)); background: rgb(var(--c-surface)); color: rgb(var(--c-ink)); font: 600 .86rem var(--sans); text-decoration: none; transition: border-color .2s ease, transform .2s ease, background-color .2s ease; }
.pq-wl:hover, .pq-pn:hover { color: rgb(var(--c-ink)); border-color: rgb(var(--c-ink)); transform: translateY(-1px); }
.pq-wl svg, .pq-pn svg { width: 16px; height: 16px; flex: none; }
.pq-wl { background: rgb(var(--c-ink)); color: rgb(var(--c-bg)); border-color: rgb(var(--c-ink)); }
.pq-wl:hover { color: rgb(var(--c-bg)); }
.pq-pns { display: inline-flex; gap: 8px; }
.pq-jump { display: none; }

/* questions per attempt: real counts, one bar per attempt, oldest on the left */
.pq-spark { flex: 1 1 340px; max-width: 470px; margin: 0; padding: 18px 20px 14px; background: rgb(var(--h-paper)); border: 1px solid rgb(var(--c-line)); border-radius: 18px; box-shadow: 0 24px 48px -36px rgb(16 20 30 / .35); }
.pq-spark figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 700 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--c-ink-2)); }
.pq-spark__hint { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: .75rem; color: rgb(var(--c-ink-3)); }
.pq-bars { display: flex; align-items: stretch; gap: 5px; height: 116px; margin-top: 14px; }
.pq-bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: 600 .62rem/1 var(--sans); color: rgb(var(--c-ink-3)); white-space: nowrap; letter-spacing: -.01em; }
button.pq-bar { cursor: pointer; }
.pq-bar i { display: block; width: 100%; max-width: 26px; height: calc(var(--h, 0%) * .8); min-height: 3px; border-radius: 5px 5px 2px 2px; background: rgb(var(--h-bar)); transform-origin: bottom; transition: background-color .2s ease, transform .2s ease; }
.pq-bar.is-zero i { height: 3px; background: rgb(var(--c-line)); }
button.pq-bar:hover i { background: rgb(var(--c-amber)); }
.pq-bar.is-on i { background: rgb(var(--c-amber)); }
.pq-bar.is-on { color: rgb(var(--c-ink)); }
button.pq-bar:focus-visible { outline: 2px solid rgb(var(--c-amber)); outline-offset: 2px; border-radius: 4px; }
@keyframes pq-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
html.h-motion .pq-bar i { animation: pq-grow .9s cubic-bezier(.22,.61,.36,1) .25s backwards; }

/* ---------- toolbar aligned with the reading column ---------- */
.pq-page .qb-toolbar { margin-bottom: 0; background: rgb(var(--c-bg) / .92); border-top: 1px solid rgb(var(--c-line)); }
.pq-tbwrap { max-width: 1400px; margin: 0 auto; padding: 10px 32px; }
.pq-page .qb-sel, .pq-page .qb-tb__btn { padding-top: 8px; padding-bottom: 8px; }

/* ---------- three-column frame ---------- */
.pq-layout { max-width: 1400px; margin: 0 auto; padding: 28px 32px 96px; display: grid; grid-template-columns: var(--pq-side) minmax(0, 1fr) var(--pq-rail); gap: var(--pq-gap); align-items: start; }
.pq-main { min-width: 0; }
.pq-side, .pq-rail { position: sticky; top: var(--pq-top); max-height: calc(100vh - var(--pq-top) - 16px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pq-side__in, .pq-rail__in { padding: 2px 4px 24px 2px; }

/* chapter sidebar */
.pq-side__home { display: block; padding: 4px 10px 16px; text-decoration: none; border-bottom: 1px solid rgb(var(--c-line)); }
.pq-side__home b { display: block; margin-top: 6px; font: 600 1.15rem/1.25 var(--serif); color: rgb(var(--c-ink)); }
.pq-side__home:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pq-side__part { margin: 18px 10px 6px; font: 700 .68rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--c-ink-3)); }
.pq-side__ch { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 10px; text-decoration: none; font: 500 .86rem/1.35 var(--sans); color: rgb(var(--c-ink-2)); transition: background-color .15s ease, color .15s ease; }
.pq-side__ch:hover { background: rgb(var(--c-surface)); color: rgb(var(--c-ink)); }
.pq-side__ch .n { font-weight: 700; font-size: .75rem; color: rgb(var(--c-ink-3)); font-variant-numeric: tabular-nums; }
.pq-side__ch .c { font-size: .75rem; color: rgb(var(--c-ink-3)); font-variant-numeric: tabular-nums; }
.pq-side__ch[aria-current="page"] { background: rgb(var(--c-amber-soft)); color: rgb(var(--c-ink)); font-weight: 600; box-shadow: inset 3px 0 0 rgb(var(--c-amber)); }
.pq-side__ch[aria-current="page"] .n { color: rgb(var(--c-amber)); }
.pq-side__w, .pq-rail__w { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 14px; border-radius: 14px; border: 1px dashed rgb(var(--c-line)); text-decoration: none; color: rgb(var(--c-ink)); font: 600 .86rem var(--sans); }
.pq-side__w { align-items: center; }
.pq-side__w svg, .pq-rail__w svg { width: 18px; height: 18px; flex: none; color: rgb(var(--c-amber)); }
.pq-side__w:hover, .pq-rail__w:hover { color: rgb(var(--c-ink)); border-style: solid; border-color: rgb(var(--c-amber-line)); background: rgb(var(--c-amber-soft)); }
.pq-rail__w span { font-weight: 400; font-size: .8rem; line-height: 1.45; color: rgb(var(--c-ink-2)); }
.pq-rail__w b { display: block; font-weight: 600; font-size: .86rem; color: rgb(var(--c-ink)); margin-bottom: 2px; }

/* topic rail */
.pq-rail__p { margin: 8px 0 14px; font-size: .82rem; line-height: 1.5; color: rgb(var(--c-ink-3)); max-width: none; }
.pq-topics { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pq-topics li { margin: 0; padding: 0; }
.pq-topic { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: rgb(var(--c-ink-2)); font: 500 .86rem/1.35 var(--sans); text-align: left; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.pq-topic b { flex: none; font-size: .74rem; font-weight: 700; color: rgb(var(--c-ink-3)); background: rgb(var(--c-line-2)); border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.pq-topic:hover { background: rgb(var(--c-surface)); border-color: rgb(var(--c-line)); color: rgb(var(--c-ink)); }
.pq-topic.is-on { background: rgb(var(--c-amber-soft)); border-color: rgb(var(--c-amber-line)); color: rgb(var(--c-ink)); font-weight: 600; }
.pq-topic.is-on b { background: rgb(var(--c-amber)); color: rgb(var(--c-bg)); }

/* ---------- question cards ---------- */
.pq-page .qb-list { gap: 20px; }
.pq-page .qb-entry { border-radius: 18px; padding: 26px 30px 22px; scroll-margin-top: calc(var(--pq-top) + 8px); transition: border-color .2s ease, box-shadow .2s ease; }
.pq-page .qb-entry:hover { border-color: rgb(var(--c-ink-3) / .6); }
.pq-page .qb-entry:target { border-color: rgb(var(--c-amber)); box-shadow: 0 0 0 3px rgb(var(--c-amber) / .18); }
.pq-page .qb-tags { gap: 6px; margin-bottom: 16px; }
.pq-page .qb-tag { padding: 4px 10px; font-size: .74rem; }
.pq-page .qb-tag--att { background: rgb(var(--c-ink)); color: rgb(var(--c-bg)); border-color: rgb(var(--c-ink)); }
.pq-page .qb-law { border-radius: 12px; padding: 12px 16px; }
.pq-page .qb-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgb(var(--c-line-2)); }
.pq-page .qb-toggle { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px; border: 1.5px solid rgb(var(--c-ink)); background: rgb(var(--c-ink)); color: rgb(var(--c-bg)); transition: transform .15s ease, background-color .2s ease, color .2s ease; }
.pq-page .qb-toggle:hover { transform: translateY(-1px); border-color: rgb(var(--c-ink)); }
.pq-page .qb-toggle[aria-expanded="true"] { background: transparent; color: rgb(var(--c-ink)); border-color: rgb(var(--c-ink) / .35); }
.pq-page .qb-copy { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid rgb(var(--c-line)); background: transparent; color: rgb(var(--c-ink-2)); font: 600 .82rem var(--sans); cursor: pointer; }
.pq-page .qb-copy:hover { color: rgb(var(--c-ink)); border-color: rgb(var(--c-ink-3)); }
.pq-page .qb-copy.is-done { color: rgb(var(--c-green-ink)); border-color: rgb(var(--c-green-line)); background: rgb(var(--c-green-soft)); }
.pq-page .qb-links { margin-left: auto; font-size: .82rem; }
.pq-page .qb-answer { margin-top: 18px; padding: 20px 22px 14px; border-top: 0; border-left: 3px solid rgb(var(--c-amber)); border-radius: 0 14px 14px 0; background: rgb(var(--h-paper)); }
.pq-page .qb-answer::before { content: "ICSI suggested answer"; display: block; margin-bottom: 12px; font: 700 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--c-amber)); }
html.h-motion .pq-page .qb-answer:not([hidden]) { animation: pq-open .35s cubic-bezier(.22,.61,.36,1); }
@keyframes pq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pq-page .qb-nomatch { border-radius: 18px; }
.pq-page .qb-xref { margin-top: 48px; }
.pq-page .qb-xref h2 { margin: 0 0 14px; font: 600 1.4rem var(--serif); }
.pq-page .qb-xref li { border-radius: 12px; }
.pq-page .qb-pager { margin-top: 40px; }
.pq-page .qb-pager a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1.5px solid rgb(var(--c-line)); background: rgb(var(--c-surface)); text-decoration: none; font-weight: 600; color: rgb(var(--c-ink)); }
.pq-page .qb-pager a:hover { border-color: rgb(var(--c-ink)); }

/* ---------- subject index ---------- */
.pq-idx__grid { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; }
.pq-idx__copy { flex: 999 1 560px; min-width: 0; }
.pq-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 28px; }
.pq-stats > div { padding: 0 28px; border-left: 1px solid rgb(var(--c-line)); }
.pq-stats > div:first-child { padding-left: 0; border-left: 0; }
.pq-stats b { display: block; font: 600 2.6rem/1 var(--serif); letter-spacing: -.02em; color: rgb(var(--c-ink)); font-variant-numeric: tabular-nums; }
.pq-stats span { display: block; margin-top: 6px; font-size: .85rem; color: rgb(var(--c-ink-2)); }
.pq-idx__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.pq-att { flex: 1 1 340px; max-width: 460px; margin: 26px 0 0; padding: 22px; background: rgb(var(--h-paper)); border: 1px solid rgb(var(--c-line)); border-radius: 20px; box-shadow: 0 24px 48px -36px rgb(16 20 30 / .35); }
.pq-att figcaption { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: .84rem; color: rgb(var(--c-ink-2)); }
.pq-att .qb-attempts { gap: 6px; margin: 0; }
.pq-att .qb-tag { font-size: .74rem; padding: 4px 10px; }
.pq-att__w { display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 12px; align-items: center; margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: rgb(var(--c-surface)); border: 1px solid rgb(var(--c-line)); text-decoration: none; color: rgb(var(--c-ink)); transition: border-color .2s ease, transform .2s ease; }
.pq-att__w b { font: 600 1rem var(--serif); }
.pq-att__w span { grid-column: 1; font-size: .8rem; line-height: 1.45; color: rgb(var(--c-ink-2)); }
.pq-att__w svg { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; }
.pq-att__w:hover { color: rgb(var(--c-ink)); border-color: rgb(var(--c-amber-line)); transform: translateY(-2px); }
body.h-page .pq-idx { padding: 8px 0 104px; }
.pq-how { margin: 0 0 8px; border: 1px solid rgb(var(--c-amber-line)); background: rgb(var(--c-amber-soft)); border-radius: 16px; }
.pq-how summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 0 20px; cursor: pointer; font: 600 .95rem var(--sans); color: rgb(var(--c-ink)); }
.pq-how summary::-webkit-details-marker { display: none; }
.pq-how summary i { position: relative; width: 14px; height: 14px; flex: none; }
.pq-how summary i::before, .pq-how summary i::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; border-radius: 2px; background: rgb(var(--c-amber)); transition: transform .25s ease; }
.pq-how summary i::after { transform: rotate(90deg); }
.pq-how[open] summary i::after { transform: rotate(0); }
/* How to use this: three numbered steps beside a scannable fact list. */
.pq-how__b { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 44px; padding: 4px 20px 22px; font-size: .95rem; line-height: 1.55; color: rgb(var(--c-ink-2)); }
.pq-how__h { margin: 0 0 12px; font: 700 .72rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--c-amber)); }
.pq-how__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: pqstep; }
.pq-how__steps li { counter-increment: pqstep; position: relative; padding-left: 34px; color: rgb(var(--c-ink-2)); }
.pq-how__steps li::before { content: counter(pqstep, decimal-leading-zero); position: absolute; left: 0; top: .1em; font: 700 1rem/1.4 var(--serif); color: rgb(var(--c-amber)); }
.pq-how__steps b, .pq-how__facts b { color: rgb(var(--c-ink)); font-weight: 600; }
.pq-how__facts { list-style: none; margin: 0; padding: 0; }
.pq-how__facts li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 2px 16px; padding: 10px 0; border-top: 1px solid rgb(var(--c-amber-line)); }
.pq-how__facts li:first-child { border-top: 0; padding-top: 0; }
.pq-how__facts li:last-child { padding-bottom: 0; }
.pq-how__facts b { font-size: .88rem; }
.pq-how em { font-style: normal; font-weight: 600; color: rgb(var(--c-ink)); }
@media (max-width: 760px) {
  .pq-how__b { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 0 18px 20px; }
  .pq-how__facts li { grid-template-columns: minmax(0, 1fr); }
}
/* Weightage: how the numbers are counted, as a short list. */
.qw-how__h { margin: 0 0 10px; font: 600 .95rem/1.3 var(--sans); color: rgb(var(--c-ink)); }
.qw-how__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 80ch; }
.qw-how__list li { position: relative; padding-left: 18px; line-height: 1.55; }
.qw-how__list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: rgb(var(--c-amber)); }
.qw-how__list b { color: rgb(var(--c-ink)); font-weight: 600; }
.pq-part { display: flex; align-items: center; gap: 16px; margin: 44px 0 16px; font: 700 .75rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--c-ink-2)); }
.pq-part::after { content: ""; flex: 1; height: 1px; background: rgb(var(--c-line)); }
.pq-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.pq-card { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) 40px; grid-template-rows: auto auto; gap: 6px 14px; align-items: center; height: 100%; box-sizing: border-box; padding: 20px 20px 18px; background: rgb(var(--c-surface)); border: 1px solid rgb(var(--c-line)); border-radius: 18px; text-decoration: none; color: rgb(var(--c-ink)); transition: transform .25s cubic-bezier(.22,.61,.36,1), border-color .25s ease, box-shadow .25s ease, opacity .55s ease calc(var(--reveal-i, 0) * 60ms) !important; }
.pq-card:hover { color: rgb(var(--c-ink)); transform: translateY(-4px); border-color: rgb(var(--c-amber-line)); box-shadow: 0 24px 46px -32px rgb(16 20 30 / .45); }
.pq-card__n { grid-row: 1 / span 2; font: 600 2.4rem/1 var(--serif); letter-spacing: -.03em; color: rgb(var(--c-amber)); font-variant-numeric: tabular-nums; }
.pq-card__t { font: 600 1.08rem/1.3 var(--serif); }
.pq-card__m { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: rgb(var(--c-ink-3)); }
.pq-card__m b { color: rgb(var(--c-ink)); font-weight: 700; }
.pq-law { color: rgb(var(--c-red-ink)); font-weight: 600; }
.pq-card__go { grid-column: 3; grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 999px; border: 1.5px solid rgb(var(--c-line)); display: inline-flex; align-items: center; justify-content: center; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .3s ease; }
.pq-card__go svg { width: 16px; height: 16px; }
.pq-card:hover .pq-card__go { background: rgb(var(--c-ink)); color: rgb(var(--c-bg)); border-color: rgb(var(--c-ink)); transform: rotate(-45deg); }

/* ---------- weightage page ---------- */
.pq-hero--w { padding-bottom: 24px; }
body.h-page.pq-page--w .qb-main { padding: 0 0 96px; }
.pq-page--w .note-box { border-radius: 16px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1200px) {
  .pq-layout { grid-template-columns: var(--pq-side) minmax(0, 1fr); }
  .pq-rail { display: none; }
}
@media (min-width: 901px) {
  .pq-tbwrap { padding-left: calc(32px + var(--pq-side) + var(--pq-gap)); }
}
@media (max-width: 900px) {
  .pq-wrap, .pq-tbwrap { padding-left: 20px; padding-right: 20px; }
  .pq-layout { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 72px; }
  .pq-side { display: none; }
  .pq-jump { display: block; flex: 1 1 100%; max-width: none !important; height: 44px; font-size: .9rem !important; }
  .pq-hero { padding: 24px 0 28px; }
  .pq-ch__copy { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pq-ch__n { margin-top: 18px; font-size: 4rem; }
  .pq-ch__t .h-eb { margin-top: 10px; }
  .pq-spark { max-width: none; }
  .pq-page .qb-entry { padding: 20px 18px 16px; border-radius: 14px; }
  .pq-page .qb-links { margin-left: 0; flex-basis: 100%; }
  .pq-page .qb-answer { padding: 16px 14px 10px; }
  .pq-stats > div { padding: 0 18px; }
  .pq-stats b { font-size: 2rem; }
  .pq-idx__ctas .h-btn { flex: 1 1 100%; justify-content: center; }
  .pq-cards { grid-template-columns: minmax(0, 1fr); }
  .pq-card { grid-template-columns: 46px minmax(0, 1fr) 34px; padding: 16px; }
  .pq-card__n { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pq-bar i, .pq-page .qb-answer { animation: none !important; }
  .pq-card, .pq-wl, .pq-pn, .pq-att__w, .pq-page .qb-toggle { transition: none !important; }
}
@media (max-width: 600px) {
  .pq-page .qb-q p, .pq-page .qb-a p { text-align: left; }
}

/* ---------- questions-per-attempt chart: never wider than the phone ---------- */
.pq-spark { min-width: 0; box-sizing: border-box; overflow: hidden; }
@media (max-width: 760px) {
  .pq-ch__grid { gap: 22px; }
  .pq-spark { flex-basis: 100%; padding: 16px 14px 12px; }
  .pq-spark figcaption { flex-wrap: wrap; }
  .pq-bars { gap: 3px; height: 104px; }
  .pq-bar { font-size: .56rem; letter-spacing: -.02em; }
  /* many attempts: label every other bar so the labels never collide */
  .pq-bars:has(.pq-bar:nth-child(11)) .pq-bar:nth-child(even) span { visibility: hidden; }
}

/* ---------- phones: the toolbar becomes a bottom bar with sheets ---------- */
.pq-scrim, .pq-done { display: none; }
.pq-bbtn { display: none !important; }
@media (max-width: 760px) { body.pq-bb .pq-bbtn { display: inline-flex !important; } }
@media (max-width: 760px) {
  body.pq-bb { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.pq-bb .qb-toolbar { position: fixed !important; top: auto !important; bottom: 0; left: 0; right: 0; z-index: 70; margin: 0; border-top: 1px solid rgb(var(--c-line)); border-bottom: 0; background: rgb(var(--c-surface)); backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.pq-bb .pq-tbwrap.qb-tb { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  body.pq-bb .qb-tb__right { display: contents; }
  body.pq-bb .qb-count, body.pq-bb .qb-hint { display: none !important; }
  body.pq-bb .qb-tb .qb-tb__btn, body.pq-bb .qb-aa { flex: 1 1 0; min-width: 0; }
  body.pq-bb .qb-tb .qb-tb__btn { position: relative; flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; padding: 4px 2px; border: 0; border-radius: 12px; background: none; color: rgb(var(--c-ink-2)); font: 600 .66rem/1.15 var(--sans); white-space: normal; text-align: center; }
  body.pq-bb .qb-aa__btn.qb-tb__btn { width: 100%; height: 100%; }
  body.pq-bb .qb-tb .qb-tb__btn svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  body.pq-bb .qb-tb .qb-tb__btn[aria-expanded="true"], body.pq-bb #qb-all[aria-pressed="true"] { color: rgb(var(--c-ink)); background: rgb(var(--c-amber-soft)); }
  body.pq-bb .qb-tb .qb-tb__btn:hover { border: 0; color: rgb(var(--c-ink)); }
  body.pq-bb .qb-badge { position: absolute; top: 4px; left: calc(50% + 6px); }
  /* icons for Answers and Aa, drawn in CSS so qb.js can keep changing their text */
  body.pq-bb #qb-all::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
  body.pq-bb .qb-aa__btn.qb-tb__btn { font: 600 1.05rem/1 var(--serif); }
  body.pq-bb .qb-aa__btn.qb-tb__btn::after { content: "Text size"; font: 600 .66rem/1.15 var(--sans); }
  body.pq-bb .qb-aa__pop { top: auto; bottom: calc(100% + 10px); right: 6px; }

  /* the sheets: filters, chapters, topics */
  body.pq-bb .pq-scrim { display: block; position: fixed; inset: 0; z-index: 68; background: rgb(15 17 21 / .45); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.pq-bb.pq-scrim-on .pq-scrim { opacity: 1; pointer-events: auto; }
  body.pq-bb .qb-fpanel.is-open, body.pq-sheet-ch .pq-side, body.pq-sheet-tp .pq-rail {
    display: block; position: fixed !important; left: 0; right: 0; top: auto !important; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 69;
    max-height: min(72vh, 620px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box;
    padding: 18px 16px 16px; background: rgb(var(--c-surface)); border: 1px solid rgb(var(--c-line)); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -18px 40px -18px rgb(0 0 0 / .35);
  }
  html.h-motion body.pq-bb .qb-fpanel.is-open, html.h-motion body.pq-sheet-ch .pq-side, html.h-motion body.pq-sheet-tp .pq-rail { animation: pq-sheet .25s cubic-bezier(.22,.61,.36,1); }
  body.pq-bb .qb-fpanel.is-open { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
  body.pq-bb .qb-fpanel.is-open::before { content: "Sort & filter"; grid-column: 1 / -1; font: 600 1.15rem var(--serif); color: rgb(var(--c-ink)); }
  body.pq-bb .qb-fpanel .qb-sel { min-height: 44px; }
  body.pq-bb .qb-fpanel .qb-chip span { min-height: 44px; box-sizing: border-box; display: flex; align-items: center; }
  body.pq-bb .pq-done { display: block; grid-column: 1 / -1; min-height: 48px; margin-top: 4px; border: 0; border-radius: 12px; background: rgb(var(--c-ink)); color: rgb(var(--c-bg)); font: 600 .95rem var(--sans); cursor: pointer; }
  body.pq-sheet-ch .pq-side__in, body.pq-sheet-tp .pq-rail__in { padding: 0; }
  body.pq-sheet-tp .pq-rail__w, body.pq-sheet-ch .pq-side__w { display: none; }
  body.pq-bb .pq-page .qb-entry, body.pq-bb .qb-entry { scroll-margin-top: 80px; }
}
@keyframes pq-sheet { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }

/* attempts covered: one sentence instead of a tag per attempt */
.pq-att__all { margin: 4px 0 0; font: 600 1.35rem/1.3 var(--serif); color: rgb(var(--c-ink)); max-width: none; }
.pq-att__all b { color: rgb(var(--c-amber)); font-weight: 600; }
.pq-att__n { margin: 8px 0 0; font-size: .84rem; color: rgb(var(--c-ink-2)); max-width: none; }
.pq-att figcaption { margin-bottom: 0; }
@media (max-width: 760px) { .pq-att__all { font-size: 1.15rem; } }

/* topics in the study material that no past paper has asked yet */
.pq-rail__more { margin-top: 22px; padding-top: 16px; border-top: 1px dashed rgb(var(--c-line)); }
.pq-more { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pq-more li { margin: 0; padding: 4px 10px; border-radius: 999px; border: 1px dashed rgb(var(--c-line)); font: 500 .78rem/1.3 var(--sans); color: rgb(var(--c-ink-3)); max-width: 100%; }

/* topic rail: heading under each provision number, and the high-weightage group (28 Oct 2026) */
.pq-topic > span { min-width: 0; }
.pq-topic__t { display: block; margin-top: 2px; font-weight: 400; font-size: .76rem; line-height: 1.35; color: rgb(var(--c-ink-3)); }
.pq-topic:hover .pq-topic__t, .pq-topic.is-on .pq-topic__t { color: rgb(var(--c-ink-2)); }
.pq-topics__h { margin: 0 0 6px; padding: 0 12px; font: 700 .7rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--c-ink-3)); max-width: none; }
.pq-topics__h--hw { color: rgb(var(--c-amber)); }
.pq-topics + .pq-topics__h { margin-top: 18px; }
.pq-topics--hw .pq-topic b { background: rgb(var(--c-amber-soft)); color: rgb(var(--c-amber)); }
.pq-topics--hw .pq-topic.is-on b { background: rgb(var(--c-amber)); color: rgb(var(--c-bg)); }
