/* Study With Me — hub pages (मुफ़्त किताबें · पढ़ने का तरीका · बोर्ड प्रश्न). Loaded after style.css. No libraries. */
.hubwrap { width: min(100% - 1.5rem, 1040px); margin-inline: auto; }
.hub-hero { padding: 1.4rem 0 .6rem; }
.hub-hero .kicker { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; color: #0f766e; }
.hub-hero h1 { margin: 0 0 .45rem; font-size: clamp(1.45rem, 5vw, 2rem); line-height: 1.25; }
.hub-hero p { margin: 0; color: var(--muted); max-width: 60ch; }
.hbtn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 40px; padding: .45rem 1rem; border-radius: 999px;
  font-weight: 700; font-size: .9rem; border: 1.5px solid transparent; background: var(--btn-grad); color: #fff; cursor: pointer; }
.hbtn:hover { filter: brightness(1.08); }
.hbtn.ghost { background: transparent; color: var(--brand-1); border-color: #c7d2fe; }
.hbtn.ghost:hover { background: #eef2ff; }
.hbtn.sm { min-height: 34px; padding: .3rem .8rem; font-size: .82rem; }
.notice { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 14px; background: var(--ok-soft); border: 1px solid #86efac; margin: .8rem 0 1rem; font-size: .9rem; }
.notice .ico { font-size: 1.4rem; line-height: 1.2; }
.notice p { margin: 0 0 .25rem; } .notice p:last-child { margin: 0; }
.notice.warn { background: var(--accent-soft); border-color: #fcd34d; }
.tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; padding: .14rem .5rem; border-radius: 999px; background: #f3f0ea; color: var(--muted); white-space: nowrap; }
.tag.bseb { background: #e0e7ff; color: #3730a3; } .tag.ncert { background: #fce7f3; color: #9d174d; }
.tag.free { background: var(--ok-soft); color: #166534; }
.tag.new { background: var(--accent-soft); color: #92400e; }

/* class jump cards */
.jump { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: .4rem 0 1rem; }
.jump a { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: translate .2s ease, border-color .2s ease; }
.jump a:hover { translate: 0 -2px; border-color: #5eead4; }
.jump b { font-size: 1.15rem; } .jump small { color: var(--muted); }

/* filter bar */
.fbar { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: .8rem; margin: 0 0 1rem; display: grid; gap: .6rem; }
.fsearch { display: flex; align-items: center; gap: .5rem; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 .7rem; background: var(--bg); }
.fsearch:focus-within { border-color: var(--science); }
.fsearch input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); padding: .65rem 0; outline: none; }
.frow { display: flex; gap: .4rem; align-items: center; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.frow > b { flex: 0 0 auto; font-size: .78rem; color: var(--muted); min-width: 3.6rem; }
.chip { flex: 0 0 auto; border: 1.5px solid var(--border); background: var(--card); color: var(--ink); border-radius: 999px; padding: .3rem .75rem; min-height: 36px; font-size: .84rem; font-weight: 600; }
.chip:hover { border-color: var(--science); }
.chip[aria-pressed="true"] { background: var(--brand-1); border-color: var(--brand-1); color: #fff; }
.fcount { margin: 0; font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.fcount b { color: var(--ink); }
.linkbtn { background: none; border: 0; color: var(--science); font-weight: 700; padding: .2rem; min-height: 32px; }

/* book sections + cards */
.bk-sec { margin: 1.2rem 0 1.6rem; }
.bk-sec > h2 { font-size: 1.2rem; margin: 0 0 .7rem; display: flex; align-items: center; gap: .45rem; }
.bk-sec > .secnote { margin: -.3rem 0 .8rem; font-size: .85rem; color: var(--muted); }
.bk-grid { display: grid; gap: .8rem; }
@media (min-width: 720px) { .bk-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.bk { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: .9rem 1rem; border-top: 4px solid var(--sc, var(--brand-1)); }
.bk[hidden], .bk-sec[hidden] { display: none !important; }
.s-science { --sc: var(--brand-2); } .s-maths { --sc: var(--brand-3); } .s-social { --sc: #d97706; } .s-hindi { --sc: #dc2626; }
.s-english { --sc: #2563eb; } .s-sanskrit { --sc: #ea580c; } .s-urdu { --sc: #059669; } .s-other { --sc: #64748b; }
.bk-top { display: flex; gap: .7rem; align-items: flex-start; }
.bk-ico { flex: 0 0 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in srgb, var(--sc) 14%, transparent); }
.bk h3 { margin: 0 0 .3rem; font-size: 1.02rem; line-height: 1.35; }
.bk-meta { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; }
.bk-free { margin: .6rem 0 .5rem; font-size: .82rem; color: #166534; font-weight: 600; }
.bk-free small { color: var(--muted); font-weight: 400; }
.bk-act { display: flex; flex-wrap: wrap; gap: .4rem; }
.bk-warn { font-size: .8rem; background: var(--accent-soft); color: #92400e; border-radius: 10px; padding: .45rem .6rem; margin: .5rem 0 0; }
.bk-ch { margin-top: .6rem; border-top: 1px dashed var(--border); padding-top: .4rem; }
.bk-ch summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--brand-1); padding: .35rem 0; list-style: none; display: flex; align-items: center; gap: .4rem; min-height: 36px; }
.bk-ch summary::-webkit-details-marker { display: none; }
.bk-ch summary::before { content: "▸"; transition: transform .2s; display: inline-block; }
.bk-ch[open] summary::before { transform: rotate(90deg); }
.chl { list-style: none; margin: .2rem 0 0; padding: 0; }
.chl li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .2rem .5rem; align-items: center; padding: .42rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.chl li:last-child { border-bottom: 0; }
.chl .n { width: 1.8rem; height: 1.8rem; border-radius: 8px; background: #f3f0ea; display: grid; place-items: center; font-weight: 700; font-size: .75rem; color: var(--muted); }
.chl .t { min-width: 0; overflow-wrap: anywhere; }
.chl a.pdf { font-weight: 700; font-size: .8rem; color: var(--brand-1); border: 1.5px solid #c7d2fe; border-radius: 999px; padding: .2rem .6rem; white-space: nowrap; min-height: 32px; display: inline-flex; align-items: center; }
.chl a.pdf:hover { background: #eef2ff; }
.chl a.pdf.off { color: #92400e; border-color: #fcd34d; }
.chl .sub { grid-column: 2 / -1; font-size: .74rem; color: var(--muted); }
.chl a.swm { grid-column: 2 / -1; justify-self: start; font-size: .8rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f59e0b, #ea580c); border-radius: 999px; padding: .25rem .7rem; }
.chl li.hit { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 8px; }
.chl li.ans .n { background: var(--ok-soft); color: var(--ok); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.featured { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: 16px; background: linear-gradient(135deg, #fff7ed, #ecfeff); border: 1.5px solid #fdba74; margin: 0 0 1rem; }
.featured .ico { font-size: 1.8rem; } .featured b { display: block; } .featured p { margin: .15rem 0 .4rem; font-size: .86rem; color: var(--muted); }

/* entrance animation — only when the user has no reduced-motion preference (JS adds .anim) */
@media (prefers-reduced-motion: no-preference) {
  .anim [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
  .anim [data-reveal].in { opacity: 1; transform: none; }
}

/* board questions page */
.yr { margin: 1.3rem 0 1.6rem; }
.yr > h2 { font-size: 1.2rem; margin: 0 0 .3rem; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.yr > .src { font-size: .82rem; color: var(--muted); margin: 0 0 .8rem; }
.yr h3.ty { font-size: 1rem; margin: 1rem 0 .6rem; color: var(--brand-1); }
.pq { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: .9rem 1rem; margin-bottom: .75rem; }
.pq-h { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .45rem; }
.mk { font-size: .72rem; font-weight: 800; padding: .14rem .55rem; border-radius: 999px; background: var(--brand-1); color: #fff; }
.mk.m2 { background: var(--brand-3); } .mk.m5 { background: #dc2626; } .mk.m3 { background: var(--brand-2); }
.pq-q { font-weight: 600; margin: 0 0 .5rem; }
.pq-q .en { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); margin-top: .2rem; }
.pq ol.op { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .3rem; }
@media (min-width: 640px) { .pq ol.op { grid-template-columns: 1fr 1fr; } }
.pq ol.op li { border: 1px solid var(--border); border-radius: 10px; padding: .35rem .6rem; font-size: .9rem; }
.pq ol.op li b { margin-right: .3rem; color: var(--muted); }
.pq.open ol.op li.ok { border-color: var(--ok); background: var(--ok-soft); font-weight: 600; }
.pq details.ans summary { cursor: pointer; font-weight: 700; color: var(--science); font-size: .88rem; min-height: 36px; display: flex; align-items: center; list-style: none; }
.pq details.ans summary::-webkit-details-marker { display: none; }
.pq details.ans summary::before { content: "👁 "; margin-right: .3rem; }
.pq details.ans[open] summary::before { content: "🙈 "; }
.pq .ans-b { background: var(--ok-soft); border-radius: 12px; padding: .6rem .8rem; font-size: .92rem; }
.pq .ans-b p { margin: .2rem 0; } .pq .ans-b ul { margin: .2rem 0; padding-left: 1.1rem; }
.pq .eqn { display: block; font-family: inherit; background: var(--card); border: 1px dashed #94a3b8; border-radius: 8px; padding: .35rem .6rem; margin: .35rem 0; overflow-x: auto; white-space: nowrap; }
.pq .srcl { font-size: .74rem; color: var(--muted); margin: .5rem 0 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 1rem; }
.tabs { display: flex; gap: .4rem; overflow-x: auto; margin: 0 0 .8rem; }

/* how-to-study */
.steps { list-style: none; margin: 1rem 0; padding: 0; counter-reset: st; position: relative; }
.steps::before { content: ""; position: absolute; left: 1.35rem; top: .5rem; bottom: .5rem; width: 3px; border-radius: 3px; background: linear-gradient(var(--brand-1), var(--brand-2), var(--brand-3)); opacity: .35; }
.steps > li { position: relative; padding-left: 3.6rem; margin-bottom: 1rem; }
.steps .sn { position: absolute; left: 0; top: .2rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem;
  background: var(--card); border: 3px solid var(--sc, var(--brand-1)); box-shadow: var(--shadow); }
.steps .card { margin: 0; border-left: 4px solid var(--sc, var(--brand-1)); }
.steps h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.steps h3 small { font-weight: 600; color: var(--muted); font-size: .78rem; margin-left: .3rem; }
.steps p { margin: .25rem 0; font-size: .93rem; }
.steps ul { margin: .3rem 0; padding-left: 1.1rem; font-size: .92rem; }
.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin: .5rem 0; }
.picker span { text-align: center; font-size: .8rem; font-weight: 700; padding: .5rem .3rem; border-radius: 12px; background: var(--bg); border: 1.5px dashed var(--border); }
.picker span b { display: block; font-size: 1.2rem; }
.week { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.week th, .week td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.week th { font-size: .8rem; color: var(--muted); }
.week td:first-child { font-weight: 800; white-space: nowrap; }
.tblwrap { overflow-x: auto; }
.tip-grid { display: grid; gap: .6rem; }
@media (min-width: 720px) { .tip-grid { grid-template-columns: 1fr 1fr; } }
.tip { display: flex; gap: .6rem; padding: .75rem .9rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.tip .ico { font-size: 1.4rem; }
.tip b { display: block; } .tip p { margin: .1rem 0 0; font-size: .88rem; color: var(--muted); }

/* dark theme */
html[data-theme="dark"] .hbtn.ghost { color: #c7d2fe; border-color: #3b4a8a; }
html[data-theme="dark"] .hbtn.ghost:hover { background: #1d2550; }
html[data-theme="dark"] .notice { border-color: #1f6b46; }
html[data-theme="dark"] .notice.warn { border-color: #6b5520; }
html[data-theme="dark"] .tag { background: #23284a; color: var(--muted); }
html[data-theme="dark"] .tag.bseb { background: #1e2a5a; color: #c7d2fe; } html[data-theme="dark"] .tag.ncert { background: #4a1832; color: #fbcfe8; }
html[data-theme="dark"] .tag.free { background: var(--ok-soft); color: #86efac; } html[data-theme="dark"] .tag.new { color: #fde68a; }
html[data-theme="dark"] .bk-free { color: #86efac; }
html[data-theme="dark"] .bk-ch summary, html[data-theme="dark"] .yr h3.ty { color: #93c5fd; }
html[data-theme="dark"] .chl .n, html[data-theme="dark"] .picker span { background: #23284a; }
html[data-theme="dark"] .chl a.pdf { color: #c7d2fe; border-color: #3b4a8a; }
html[data-theme="dark"] .chl a.pdf.off, html[data-theme="dark"] .bk-warn { color: #fde68a; border-color: #6b5520; }
html[data-theme="dark"] .chip[aria-pressed="true"] { background: #3b82f6; border-color: #3b82f6; }
html[data-theme="dark"] .featured { background: linear-gradient(135deg, #2a1d0f, #0f2a2e); border-color: #7c4a1a; }
html[data-theme="dark"] .hub-hero .kicker { color: #5eead4; }
html[data-theme="dark"] .notice, html[data-theme="dark"] .pq .ans-b { color: var(--ink); }
@media print { .fbar, .toolbar, .topnav, .site-footer .fsub { display: none !important; } .pq details.ans > .ans-b { display: block; } }

/* chemistry markup on hub pages (same look as chapter pages, scoped here) */
.hubpage .eq { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 8px; padding: .12rem .45rem; display: inline-block; margin: .1rem 0; white-space: nowrap; }
.hubpage .eq.skel { background: #fff7ed; border-color: #fdba74; }
.hubpage .eqb { margin: .45rem 0; overflow-x: auto; } .hubpage .eqb .eq { font-size: 1.02rem; padding: .35rem .7rem; }
.hubpage .eq sub, .hubpage .f sub { font-size: .72em; line-height: 0; } .hubpage .eq sup, .hubpage .f sup { font-size: .7em; line-height: 0; }
.hubpage .st { font-size: .75em; color: var(--muted); }
.hubpage .arr { margin: 0 .3em; font-weight: 700; color: #0f766e; }
.hubpage .arr.c { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1; margin: 0 .4em; }
.hubpage .arr.c .ct, .hubpage .arr.c .cb { font-size: .62em; font-weight: 600; color: #b45309; white-space: nowrap; }
.hubpage .arr.c .ca { font-size: 1.15em; letter-spacing: .3em; }
.pq-q p { margin: 0 0 .3rem; }
.pq .ans-b .tblwrap { margin: .3rem 0; }
html[data-theme="dark"] .hubpage .eq { background: #0f2e2c; border-color: #1f6f68; color: var(--ink); }
html[data-theme="dark"] .hubpage .eq.skel { background: #3a2412; border-color: #7c4a1a; }
html[data-theme="dark"] .hubpage .arr { color: #5eead4; }
.pq details.ans .s-hide, .pq details.ans[open] .s-show { display: none; }
.pq details.ans[open] .s-hide { display: inline; }
/* anchors land below the sticky header */
.hubpage [id] { scroll-margin-top: 150px; }
@media (min-width: 760px) { .hubpage [id] { scroll-margin-top: 90px; } }
