/* NEET NCERT Mind Maps — base styles (placeholder look until the final design arrives) */
:root {
  /* Final design (B + C, Nov 2026): teal + saffron, Mukta for Hindi and English */
  --paper: #F4F7F7;
  --card: #ffffff;
  --ink: #12262A;
  --muted: #5A6E71;
  --line: #DCE6E7;
  --brand: #0B4F57;
  --brand-soft: #DDF0F1;
  --saffron: #F59E0B;
  --saffron-soft: #FFF4DB;
  --saffron-ink: #7A4A00;
  --accent: #0B4F57;        /* overridden per subject */
  --accent-soft: #DDF0F1;
  --good: #0E8A4F;
  --bad: #B91C1C;
  --warn: #B45309;
  --radius: 16px;
  --serif: "Mukta", "Noto Sans Devanagari", system-ui, sans-serif;
  --sans: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body[data-subject="physics"]   { --accent: #3730A3; --accent-soft: #E8E7FB; }
body[data-subject="chemistry"] { --accent: #0B4F57; --accent-soft: #DDF0F1; }
body[data-subject="biology"]   { --accent: #166534; --accent-soft: #E3F3E8; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 18px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .4em; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: rgba(247,244,238,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }
.topbar .spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg a { padding: 6px 14px; font-size: .9rem; text-decoration: none; color: var(--muted); }
.seg a.on { background: var(--accent); color: #fff; }

main { max-width: 1240px; margin: 0 auto; padding: 20px; }

/* Home */
.hero { padding: 28px 0 10px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero p { color: var(--muted); max-width: 680px; }
.subject { margin: 26px 0; }
.subject h2 { display: flex; align-items: center; gap: 10px; }
.subject h2 .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); }
.cls-label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.chap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.chap { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .95rem; }
.chap small { display: block; color: var(--muted); font-size: .78rem; }
.chap.ready { border-color: var(--sc); box-shadow: 0 2px 0 var(--sc); }
.chap.ready small { color: var(--sc); font-weight: 600; }
.chap.soon { opacity: .55; pointer-events: none; }

/* Chapter layout */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .88rem; margin-bottom: 10px; }
.crumbs a { text-decoration: none; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.crumbs a:last-child { background: var(--accent); color: #fff; border-color: var(--accent); }
.crumbs .sep { color: var(--line); }

.layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.mapbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; position: sticky; top: 70px; }
@media (max-width: 900px) { .mapbox { position: static; } }
.mapbox svg { width: 100%; height: auto; display: block; }
.map-hint { text-align: center; font-size: .82rem; color: var(--muted); margin: 4px 0 2px; }

/* SVG map */
.edge { fill: none; stroke: var(--line); stroke-width: 2.5; }
.n-center circle { fill: var(--accent); }
.n-center text { fill: #fff; font-family: var(--serif); font-weight: 700; }
.n-child { cursor: pointer; }
.n-child rect { fill: var(--card); stroke: var(--accent); stroke-width: 2; transition: fill .15s, transform .15s; }
.n-child:hover rect, .n-child:focus rect { fill: var(--accent-soft); }
.n-child text { fill: var(--ink); font-size: 15px; font-weight: 600; }
.n-child .meta { fill: var(--muted); font-size: 11.5px; font-weight: 500; }
.n-child text { font-size: 18px; }
.n-child .meta { font-size: 13.5px; }
.n-child.leaf rect { stroke-dasharray: 6 5; }
.n-child.done rect { stroke: var(--good); }
.n-child.active rect { fill: var(--accent); stroke: var(--accent); stroke-dasharray: none; }
.n-child.active text, .n-child.active .meta { fill: #fff; }
.n-child:focus-visible rect { stroke-width: 4; }
.n-child:focus { outline: none; }
.n-center.clickable { cursor: pointer; }
.n-back { cursor: pointer; }
.n-back rect { fill: var(--paper); stroke: var(--line); }
.n-back:hover rect { stroke: var(--accent); }
.n-back text { fill: var(--muted); font-size: 15px; font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.mapbox svg { animation: pop .25s ease-out; transform-origin: center; }

/* Card list (mobile map) */
.cardlist { display: none; }
.cardlist a.center { background: var(--accent); color: #fff; border-color: var(--accent); margin-left: 0; font-family: var(--serif); font-weight: 700; }
.cardlist a.center::before, .cardlist a.up::before { display: none; }
.cardlist a.up { margin-left: 0; border: 1px solid var(--line); color: var(--muted); }
.cardlist a.active { background: var(--accent-soft); border-style: solid; }
.cardlist a { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 12px 14px; margin: 6px 0 6px 14px; border: 2px solid var(--accent); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; position: relative; }
.cardlist a::before { content: ""; position: absolute; left: -16px; top: 50%; width: 14px; border-top: 2px solid var(--line); }
.cardlist a.leaf { border-style: dashed; }
.cardlist a small { color: var(--muted); font-weight: 500; white-space: nowrap; }
@media (max-width: 640px) { .mapbox svg, .map-hint { display: none; } .cardlist { display: block; } }

/* Synopsis panel */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.panel-head .ref { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel-head h2 { font-size: 1.45rem; margin-top: 4px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .78rem; text-decoration: none; }
a.pill:hover { background: var(--accent); color: #fff; }
.panel-body { padding: 16px 20px 20px; }
.syn p { margin: .5em 0; }
.syn ul, .syn ol { padding-left: 1.3em; margin: .4em 0; }
.syn li { margin: .2em 0; }
.syn table { border-collapse: collapse; width: 100%; margin: .7em 0; font-size: .92rem; }
.syn th, .syn td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.syn th { background: var(--paper); }
.syn blockquote { margin: .7em 0; padding: 8px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-family: var(--serif); font-size: 1.05rem; }
.syn .f, .formula { font-family: "Cambria Math", "STIX Two Math", var(--serif); font-size: 1.08rem; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; display: block; overflow-x: auto; }
.syn .errata { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
.syn .errata::before { content: "⚠ "; color: var(--warn); }
.diagram { margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fcfbf8; text-align: center; }
.diagram svg { max-width: 100%; height: auto; }
.diagram figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.box { margin-top: 14px; border-radius: 10px; padding: 10px 14px; }
.box h4 { margin: 0 0 4px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.box ul { margin: 0; padding-left: 1.2em; }
.box.points { background: var(--accent-soft); } .box.points h4 { color: var(--accent); }
.box.traps { background: #fef2f2; } .box.traps h4 { color: var(--bad); }
.box.formulas { background: var(--paper); border: 1px solid var(--line); } .box.formulas h4 { color: var(--muted); }
.box.formulas code { font-family: "Cambria Math", var(--serif); font-size: 1rem; }

.sub-list { margin-top: 16px; }
.sub-list h4 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.sub-list a { display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 5px 0; text-decoration: none; color: var(--ink); }
.sub-list a:hover { border-color: var(--accent); }
.sub-list a small { color: var(--muted); float: right; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fcfbf8; }
.btn { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
.progress { font-size: .82rem; color: var(--muted); align-self: center; margin-left: auto; }

/* Read mode */
.read { max-width: 820px; margin: 0 auto; }
.read section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 14px 0; }
.read .lvl-1 > h2 { font-size: 1.5rem; color: var(--accent); }
.read .node { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.read .node h3 { font-size: 1.15rem; }
.read .node .node { margin-left: 14px; }
.toc { columns: 2; font-size: .92rem; }
@media (max-width: 640px) { .toc { columns: 1; } }

/* Quiz overlay */
.overlay { position: fixed; inset: 0; background: rgba(29,36,51,.55); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.quiz { background: var(--card); border-radius: 18px; width: min(680px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.quiz-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.quiz-head .title { font-weight: 700; flex: 1; font-size: .95rem; }
.quiz-head .x { border: 0; background: none; font-size: 1.4rem; color: var(--muted); line-height: 1; }
.bar { height: 4px; background: var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.quiz-body { padding: 18px; }
.qmeta { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.qtext { font-size: 1.08rem; font-weight: 600; margin-bottom: 12px; }
.opt { display: block; width: 100%; text-align: left; padding: 11px 14px; margin: 7px 0; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt b { color: var(--muted); margin-right: 8px; }
.opt.right { border-color: var(--good); background: #f0fdf4; }
.opt.wrong { border-color: var(--bad); background: #fef2f2; }
.opt:disabled { cursor: default; }
.explain { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--paper); font-size: .95rem; }
.explain .verdict { font-weight: 700; }
.explain .verdict.ok { color: var(--good); } .explain .verdict.no { color: var(--bad); }
.quiz-foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.score { text-align: center; padding: 20px 10px; }
.score .big { font-family: var(--serif); font-size: 3rem; color: var(--accent); }
.review li { margin: 6px 0; }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 30px 20px 40px; }
.empty { color: var(--muted); padding: 40px; text-align: center; }

/* ===== Expanding tree (chapter view) ===== */
main.wide { max-width: none; padding: 16px 0 0; }
.tree-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px; padding: 0 20px 6px; max-width: 1240px; }
.tree-head h1 { font-size: 1.7rem; margin: 0; }
.tree-head .ref { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.legend { font-size: .82rem; color: var(--muted); margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg-node { display: inline-block; width: 22px; height: 14px; border: 2px solid var(--accent); border-radius: 5px; }
.lg-q { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: .72rem; }

.tree-wrap { overflow-x: auto; padding: 18px 20px 40px; scroll-padding: 20px; }
.tree { display: inline-block; min-width: 100%; }
.branch { display: flex; align-items: flex-start; position: relative; }
.node-row { display: flex; align-items: center; gap: 6px; flex: none; padding: 6px 0; min-height: 76px; }
.tnode { position: relative; text-align: left; width: 230px; padding: 10px 30px 10px 14px; border: 2px solid var(--accent); border-radius: 12px; background: var(--card); color: var(--ink); line-height: 1.3; transition: background .15s, box-shadow .15s; }
.tnode:hover { background: var(--accent-soft); }
.tnode .tt { display: block; font-weight: 650; font-size: .95rem; }
.tnode .tm { display: block; font-size: .74rem; color: var(--muted); margin-top: 3px; }
.tnode .chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: var(--accent); font-weight: 700; }
.is-leaf > .node-row .tnode { border-style: dashed; }
.is-open > .node-row .tnode { background: var(--accent); color: #fff; border-style: solid; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.is-open > .node-row .tnode .tm, .is-open > .node-row .tnode .chev { color: rgba(255,255,255,.85); }
.tnode.root { width: 200px; padding: 16px; border-radius: 16px; font-family: var(--serif); }
.tnode.root .tt { font-size: 1.15rem; }
.tnode.done:not(.root) { border-color: var(--good); }
.qchip { flex: none; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .78rem; padding: 6px 10px; }
.qchip:hover, .is-open > .node-row .qchip { background: var(--accent); color: #fff; }

/* connectors (horizontal tree) */
.kids { display: flex; flex-direction: column; margin-left: 28px; position: relative; padding: 0; }
.about-b, .detail-b { padding-top: 14px; }
.about-b .about, .detail-b .detail { margin-top: 0; }
.kids::before { content: ""; position: absolute; left: -28px; top: 38px; width: 28px; border-top: 2px solid var(--accent); }
.kids > .branch { padding-left: 26px; }
.kids > .branch::before { content: ""; position: absolute; left: 0; top: 38px; width: 26px; border-top: 2px solid var(--line); }
.kids > .branch::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.kids > .branch:first-child::after { top: 38px; }
.kids > .branch:last-child::after { bottom: auto; height: 38px; }
.kids > .branch:first-child:last-child::after { display: none; }
.kids > .branch:only-child::after { display: none; }
.kids > .branch.is-open::before, .kids > .detail-b::before { border-color: var(--accent); }

/* about card (first item of an open branch) */
.about-b { align-items: center; }
.about { width: 360px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbf8; margin: 6px 0; }
.about-t { width: 100%; display: flex; justify-content: space-between; gap: 10px; border: 0; background: none; padding: 9px 14px; font-size: .86rem; font-weight: 650; color: var(--muted); text-align: left; }
.about-t span:last-child { color: var(--accent); }
.about.open { width: 460px; background: var(--card); }
.about-body { padding: 0 16px 14px; font-size: .94rem; }

/* detail card (end of a branch) */
.detail { width: 560px; max-width: 86vw; background: var(--card); border: 2px solid var(--accent); border-radius: 16px; padding: 18px 20px; margin: 8px 0; box-shadow: 0 8px 28px rgba(0,0,0,.08); animation: grow .25s ease-out; }
@keyframes grow { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.detail h2 { font-size: 1.35rem; margin: 6px 0 8px; }
.d-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); }
.inline-q { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--accent-soft); }
.inline-q h3 { font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; }
.inline-q h3 small { font-family: var(--sans); font-size: .8rem; color: var(--muted); font-weight: 500; }
.iq { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.iq:last-child { border-bottom: 0; }
.iq .qtext { font-size: 1rem; }

/* phones: same tree, drawn top-to-bottom */
@media (max-width: 760px) {
  .tree-wrap { padding: 10px 12px 30px; overflow-x: visible; }
  .tree { display: block; }
  .branch { display: block; }
  .tnode { width: 100%; }
  .tnode.root { width: 100%; }
  .node-row { padding: 4px 0; }
  .kids { margin-left: 4px; padding: 0; }
  .kids::before { display: none; }
  .kids > .branch { padding-left: 12px; }
  .kids > .branch::before { top: 38px; width: 10px; }
  .kids > .branch::after { top: 0; bottom: 0; }
  .kids > .branch:first-child::after { top: 0; }
  .kids > .branch:last-child::after { bottom: auto; height: 38px; }
  .node-row { min-height: 0; }
  .about-b, .detail-b { padding-top: 6px; }
  .about, .about.open, .detail { width: 100%; max-width: none; }
  .detail { padding: 14px; }
}
/* keep the whole open path on screen: ancestors shrink once a deeper layer is open */
@media (min-width: 761px) {
  .tnode { width: 204px; }
  .kids { margin-left: 22px; } .kids::before { left: -22px; width: 22px; }
  .kids > .branch { padding-left: 20px; } .kids > .branch::before { width: 20px; }
  .branch.is-open:not(.is-sel) > .node-row .tnode { width: 158px; padding: 8px 24px 8px 10px; }
  .branch.is-open:not(.is-sel) > .node-row .tnode .tt { font-size: .84rem; }
  .detail { width: 540px; }
}

/* PYQ page: past NEET questions in NCERT order */
.pyq-page { max-width: 860px; }
.pyq-intro .kicker { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 8px 0 2px; }
.pyq-intro .ref { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.pyq-intro .muted { color: var(--muted); font-size: .95rem; }
.pyq-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin: 10px 0; font-size: .9rem; }
.pyq-tools .stat { color: var(--muted); }
.pyq-tools select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.secnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.secnav a { text-decoration: none; font-size: .85rem; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.secnav a b { color: var(--accent); }
.secnav a i { font-style: normal; color: var(--muted); margin-left: 2px; }
.pyq-sec { margin: 30px 0 10px; scroll-margin-top: 64px; }
.pyq-sec h2 { font-size: 1.35rem; }
.pyq-sec h2 span { color: var(--accent); }
.sec-ref { color: var(--muted); font-size: .85rem; margin: -2px 0 12px; }
.pyq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; scroll-margin-top: 64px; }
.pyq-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .82rem; }
.pyq-head .qn { font-weight: 700; color: var(--muted); }
.pyq-head .year { background: var(--accent); color: #fff; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pyq-head .tag { background: #fff7ed; color: var(--warn); border: 1px solid #fed7aa; padding: 1px 8px; border-radius: 999px; }
.pyq-head .state { margin-left: auto; font-weight: 700; }
.pyq .qtext { font-weight: 500; line-height: 1.65; }
.pyq .opt { display: flex; gap: 6px; align-items: baseline; }
.pyq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pyq-actions .btn { padding: 6px 14px; font-size: .9rem; }
.reveal { margin-top: 12px; }
.reveal[hidden] { display: none; }
.hint-text { background: var(--accent-soft); border-radius: 10px; padding: 9px 13px; margin: 0; font-size: .95rem; }
.answer { border-left: 3px solid var(--good); padding: 2px 0 2px 14px; }
.answer .ans-line { margin: 0 0 4px; }
.answer .verdict { font-weight: 700; } .answer .verdict.ok { color: var(--good); } .answer .verdict.no { color: var(--bad); }
.answer .check { color: var(--good); font-size: .82rem; margin: 0 0 6px; }
.answer .sol p, .answer .sol ul { margin: .35em 0; }
.answer .errata { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
.answer .errata::before { content: "⚠ "; color: var(--warn); }
.trap { background: #fef2f2; border-radius: 8px; padding: 7px 12px; font-size: .92rem; margin: 8px 0 0; }
.also { color: var(--muted); font-size: .85rem; font-style: italic; margin: 6px 0 0; }
.ncert h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
.excerpts { display: grid; gap: 12px; }
.excerpt { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.excerpt img { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.excerpt figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 7px 12px; font-size: .8rem; color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); }
.excerpt figcaption a { font-weight: 600; text-decoration: none; }
.pyq-note { color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 30px; }
@media (max-width: 640px) { .pyq { padding: 14px; } .pyq-sec h2 { font-size: 1.2rem; } }

/* PYQ page v2: exams, numerical answers, multi-concept section */
.pyq-head .year.jee { background: #1e3a8a; }
.pyq-head .when { color: var(--muted); }
.pyq-head .tag.num { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.pyq-head .state { margin-left: auto; font-weight: 700; font-size: .78rem; }
.pyq-head .state.ok { color: var(--good); } .pyq-head .state.no { color: var(--bad); }
.pyq-tools .filters { display: flex; gap: 12px; flex-wrap: wrap; }
.secnav a.multi { border-color: var(--accent); }
.paras { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.paras .para { font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 600; }
.paras .para.other { background: #fff7ed; color: var(--warn); }
.pyq-sec.multi h2 span { color: var(--warn); }
.numans { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.numans input { font: inherit; width: 9em; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); margin-left: 6px; }
.numans.right input { border-color: var(--good); background: #f0fdf4; } .numans.wrong input { border-color: var(--bad); background: #fef2f2; }
.empty-paras ul { columns: 2; padding-left: 1.2em; } .empty-paras small { color: var(--muted); }
@media (max-width: 640px) { .empty-paras ul { columns: 1; } }
.pyq-head .year.ncert { background: #7c2d12; } .pyq-head .year.exemplar { background: #6b21a8; } .pyq-head .year.practice { background: #475569; }

/* "← All chapters" link in the top bar of chapter pages */
.back-home { display: inline-flex; align-items: center; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--accent); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.back-home:hover { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 520px) { .topbar { gap: 8px; padding: 10px 12px; } .brand { font-size: 1rem; } .back-home { padding: 4px 10px; font-size: .82rem; } }

/* ===================================================================
   Final design (B + C combined, approved Nov 2026)
   B's split layout (paragraph list | NCERT + questions), C's Hindi-first
   type (Mukta) and teal/saffron colours. Overrides the placeholder look above.
   =================================================================== */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.2px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* Top bar */
.topbar { background: rgba(255,255,255,.96); gap: 18px; padding: 10px 22px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--sans); font-weight: 800; font-size: 1.2rem; }
.brand .word { color: var(--ink); }
.brand .word span { color: var(--saffron); margin: 0 1px; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand .mark i { width: 11px; height: 11px; border-radius: 3px; background: var(--saffron); display: block; }
.topnav { display: flex; gap: 18px; flex-wrap: wrap; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.topnav a:hover, .topnav a.on { color: var(--brand); }
.lang { display: inline-flex; background: #EEF4F4; border-radius: 10px; padding: 3px; }
.lang button { border: 0; background: transparent; color: var(--ink); border-radius: 8px; padding: 4px 12px; font-size: .9rem; }
.lang button.on { background: var(--brand); color: #fff; font-weight: 600; }
.seg { border-color: var(--line); }
.seg a.on { background: var(--brand); }
.back-home { color: var(--brand); }

/* Buttons */
.btn { border-radius: 12px; padding: 9px 18px; background: var(--brand); border-color: var(--brand); }
.btn.ghost { color: var(--brand); border-color: #C3D3D5; background: #fff; }
.btn.saffron { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.btn.big { padding: 14px 24px; font-size: 1.05rem; }

/* Home */
.home-hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding: 34px 0 26px; }
.home-hero .copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.home-hero .badge { align-self: flex-start; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; padding: 3px 14px; border-radius: 999px; }
.home-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; margin: 0; }
.home-hero p { margin: 0; color: #3F5558; font-size: 1.15rem; max-width: 32em; }
.home-hero .en { font-size: .95rem; color: var(--muted); }
.home-hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.home-hero .preview { flex: 1 1 460px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(11,79,87,.12); overflow: hidden; }
.preview .ph { padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.preview .ph b { color: var(--ink); }
.preview .cols { display: flex; flex-wrap: wrap; }
.preview .cols > div { flex: 1 1 220px; min-width: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 1rem; }
.preview .cols > div + div { background: #F8FBFB; border-left: 1px solid var(--line); }
.preview .lbl { font-size: .75rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.preview .q { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: .95rem; }
.preview .q b { color: var(--brand); }
.nline { display: flex; gap: 10px; align-items: flex-start; }
.nline .no { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #EEF4F4; color: var(--brand); font-weight: 800; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.nline.hot { background: var(--saffron-soft); border-radius: 10px; padding: 6px 8px; margin: 0 -8px; }
.nline.hot .no { background: var(--saffron); color: var(--ink); }
.band { background: var(--brand); color: #fff; border-radius: 18px; padding: 20px 26px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 8px 0 30px; }
.band .t { flex: 1 1 320px; min-width: 0; }
.band .t b { display: block; font-size: 1.35rem; }
.band .t span { color: #CFE6E8; }
.subj-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.subj-tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.subj-tile b { font-size: 1.5rem; }
.subj-tile span { color: var(--muted); }
.subj-tile .meter { height: 8px; background: #E6EEEF; border-radius: 99px; margin-top: 8px; overflow: hidden; }
.subj-tile .meter i { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.subj-tile .go { color: var(--brand); font-weight: 700; margin-top: 4px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; margin: 34px 0 10px; }
.steps div { display: flex; flex-direction: column; gap: 4px; }
.steps small { color: var(--warn); font-weight: 800; font-size: .9rem; }
.steps b { font-size: 1.2rem; }
.steps span { color: #3F5558; }
.home h2.sec { font-size: 1.8rem; margin: 30px 0 12px; }
.chap { border-radius: 14px; }
.chap.ready { box-shadow: none; border-width: 1.5px; }

/* PYQ page: split layout — paragraph list on the left, questions on the right */
.pyq-page { max-width: 1280px; }
.pyq-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 26px; align-items: start; }
.pyq-side { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.pyq-side .head { display: flex; justify-content: space-between; padding: 0 8px 8px; font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: .05em; }
.pyq-side a.p { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 10px; text-decoration: none; color: #3F5558; font-size: .95rem; line-height: 1.3; }
.pyq-side a.p:hover { background: #F1F6F6; }
.pyq-side a.p.cur { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.pyq-side .plist { display: flex; flex-direction: column; gap: 2px; }
.pyq-side a.p .t b { font-weight: inherit; }
.pyq-side a.p .n { white-space: nowrap; color: var(--muted); font-size: .85rem; }
.pyq-side a.p .n.recent { color: var(--saffron-ink); font-weight: 700; }
.pyq-side a.p.none { color: #8A9A9C; }
.revise { margin: 12px 4px 4px; padding: 14px; border-radius: 14px; background: var(--saffron-soft); border: 1px solid #F8D58A; display: flex; flex-direction: column; gap: 6px; }
.revise b { color: var(--saffron-ink); }
.revise a { color: var(--saffron-ink); font-size: .95rem; }
.revise p { margin: 0; font-size: .88rem; color: var(--saffron-ink); }
.revise .btn { margin-top: 4px; justify-content: center; }
.retry-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--saffron-soft); border: 1px solid #F8D58A; border-radius: 14px; padding: 12px 16px; margin: 10px 0; }
.trend { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.chip { font-size: .85rem; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: #EEF4F4; color: var(--brand); }
.chip.neet { background: #FDEBC8; color: var(--saffron-ink); }
.chip.recent { background: var(--brand-soft); color: var(--brand); }
.chip.never { background: #F1F5F5; color: var(--muted); font-weight: 600; }
.pyq-intro h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin: 4px 0; }
.pyq-intro .kicker { color: var(--saffron-ink); }
.pyq-sec h2 { font-size: 1.5rem; margin-bottom: 2px; }
.pyq-sec h2 span { color: var(--brand); }
.pyq { border-radius: 16px; padding: 18px 20px; }
.pyq-head .year { background: var(--brand); }
.pyq-head .year.neet { background: var(--saffron); color: var(--ink); }
.pyq .qtext { font-size: 1.12rem; font-weight: 600; }
.opt { border-radius: 12px; padding: 12px 14px; }
.opt.right { border: 2px solid var(--good); background: #E8F6EE; }
.opt.wrong { border: 2px solid var(--bad); background: #FDECEC; }
.hint-text { background: #F4F7F7; }
.answer { border-left-color: var(--good); }
.trap { background: var(--saffron-soft); color: var(--saffron-ink); }
.excerpt { border-radius: 12px; }
.pyq-note { font-size: .9rem; }
footer { font-size: .9rem; }
@media (max-width: 900px) {
  .pyq-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .pyq-side { position: static; max-height: none; padding: 10px; min-width: 0; }
  .pyq-side .head { display: none; }
  .pyq-side .plist { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .pyq-side a.p { flex: 0 0 auto; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
  .pyq-side a.p .tt { display: none; }
  .revise { margin: 10px 0 0; }
}
@media (max-width: 640px) { .topnav { order: 3; width: 100%; } .home-hero h1 { font-size: 2.1rem; } }

/* Chapter pages from the question bank (Nov 2026): Hindi draft tag, per-question language switch, removed topics */
.cls-label.sub { margin-top: 18px; text-transform: none; letter-spacing: 0; font-weight: 700; }
.pyq-head .tag.hi-draft { background: var(--saffron-soft); color: var(--saffron-ink); }
.pyq-head .tag.lang-sw { font: inherit; font-size: .8rem; font-weight: 700; border: 1px solid #C3D3D5; background: #fff; color: var(--brand); cursor: pointer; padding: 1px 10px; border-radius: 999px; }
.pyq-head .tag.lang-sw:hover { background: var(--brand-soft); }
.pyq-sec.dropped h2 span { color: var(--muted); }
.pyq-sec.dropped .pyq { opacity: .92; }
.ans-line small { color: var(--muted); font-weight: 600; }
.pyq-head { flex-wrap: wrap; row-gap: 4px; }
.pyq { overflow-wrap: anywhere; }
.pyq .sol table { display: block; max-width: 100%; overflow-x: auto; }
.pyq .topic { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }

/* Redrawn figures of diagram questions (assets/figures/<chapter>/<id>.svg; white background in both themes) */
.qfig { margin: 10px 0 12px; }
.qfig img { display: block; max-width: 100%; height: auto; max-height: 440px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
/* Option number "(1)" never breaks; option text wraps beside it */
.pyq .opt b { flex: none; min-width: 2.1em; white-space: nowrap; overflow-wrap: normal; }
.pyq .opt span { flex: 1; min-width: 0; }

/* NCERT crops at the top of each paragraph section (lines + figures), tap to open full size */
.para-ncert { display: grid; gap: 10px; margin: 6px 0 14px; }
.para-ncert .excerpt { max-width: 640px; }
.para-ncert .excerpt.fig { max-width: 560px; justify-self: center; width: 100%; }
.para-ncert .excerpt img, .excerpts .excerpt img { max-width: 100%; }
.para-ncert .excerpt a.zoom { display: block; }
.para-ncert .excerpt.txt { border-left: 4px solid var(--accent); }
.excerpt a.zoom, .excerpts .excerpt { overflow-x: auto; }
.excerpt img.sized { max-width: none; margin: 0; }

/* Four pillars on the home page (Nov 2026): NCERT + PYQ, CBT tests, Class 12 Boards, NEET counselling */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 4px 0 26px; }
.pillar { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; border-top: 5px solid var(--brand); }
.pillar.p2 { border-top-color: var(--saffron); } .pillar.p3 { border-top-color: #3730A3; } .pillar.p4 { border-top-color: #166534; }
.pillar small { font-weight: 800; color: var(--warn); }
.pillar b { font-size: 1.3rem; }
.pillar span { color: #3F5558; flex: 1; }
.pillar i { font-style: normal; font-weight: 700; color: var(--brand); }
.pillar:hover { box-shadow: 0 10px 30px rgba(11,79,87,.10); }

/* Class 12 Boards + Counselling pages */
.boards, .cns { max-width: 1180px; }
.bhero { padding: 26px 0 10px; display: flex; flex-direction: column; gap: 10px; }
.bhero .badge { align-self: flex-start; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; padding: 3px 14px; border-radius: 999px; }
.bhero h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.15; margin: 0; }
.bhero p { margin: 0; color: #3F5558; font-size: 1.1rem; max-width: 46em; }
.bhero.small h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.bhero .ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.back-link { display: inline-block; margin-top: 16px; color: var(--brand); font-weight: 600; text-decoration: none; }
.bswitch { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 14px 0; }
.bswitch button { text-align: left; font: inherit; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 16px; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); }
.bswitch button b { font-size: 1.3rem; }
.bswitch button small { color: var(--muted); }
.bswitch button.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.bsubj { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.bsubj a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 18px; font-weight: 600; }
.bsubj a.on { background: var(--sc, var(--brand)); border-color: var(--sc, var(--brand)); color: #fff; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.bcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.bcard h2 { font-size: 1.3rem; margin: 0 0 10px; }
.bpat { width: 100%; border-collapse: collapse; font-size: .98rem; }
.bpat th, .bpat td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.bpat th { color: var(--muted); font-size: .8rem; letter-spacing: .04em; }
.bpat td:last-child, .bpat th:last-child { text-align: right; }
.bpat tr.tot td { font-weight: 800; border-bottom: 0; }
.bmarks { display: flex; flex-wrap: wrap; gap: 10px; }
.bmarks span { flex: 1 1 90px; background: #F4F7F7; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; color: var(--muted); font-size: .9rem; }
.bmarks b { color: var(--ink); font-size: 1.35rem; }
.blinks { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 0; }
.blinks a { color: var(--brand); font-weight: 600; }
.empty-note { background: var(--saffron-soft); color: var(--saffron-ink); border-radius: 12px; padding: 12px 14px; margin: 0; }
.plist2 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plist2 li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.plist2 li a:first-child { flex: 1 1 200px; color: var(--ink); text-decoration: none; font-weight: 600; }
.plist2 li span { color: var(--muted); font-size: .9rem; }
.bchapters { margin: 24px 0 10px; }
.bhead { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.bhead h2 { font-size: 1.6rem; margin: 0; }
.btn.pdf { padding: 7px 14px; font-size: .95rem; }
.btn.pdf small { font-weight: 500; color: var(--muted); margin-left: 4px; }
.chap.bchap { display: flex; flex-direction: column; padding: 0; }
.chap.bchap > a { display: block; padding: 12px 14px 8px; color: inherit; text-decoration: none; }
.chap.bchap > a small { display: block; }
.chap.bchap .pdfs { display: flex; gap: 12px; padding: 0 14px 10px; font-size: .88rem; }
.chap.bchap .pdfs a { color: var(--brand); font-weight: 700; }
.bfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; }
.bfilter > span { color: var(--muted); font-weight: 600; }
.bfilter button[data-only] { font: inherit; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.bfilter button[data-only].on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.bfilter .btn { margin-left: auto; padding: 6px 14px; }
.bsec h2 { font-size: 1.45rem; margin: 26px 0 10px; }
.bq { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 0 0 12px; overflow-wrap: anywhere; }
.bq-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; font-size: .85rem; }
.bq-head .qn { font-weight: 800; color: var(--muted); margin-right: 2px; }
.bq-head span { padding: 1px 10px; border-radius: 999px; background: #EEF4F4; color: var(--brand); font-weight: 700; }
.bq-head .mk { background: var(--saffron); color: var(--ink); }
.bq-head .bd.rbse { background: #FDEBC8; color: var(--saffron-ink); }
.bq-head .nc { background: #F1F5F5; color: var(--muted); font-weight: 600; }
.bq-head .lang-sw { margin-left: auto; font: inherit; font-size: .8rem; font-weight: 700; border: 1px solid #C3D3D5; background: #fff; color: var(--brand); cursor: pointer; padding: 1px 10px; border-radius: 999px; }
.bq-q { font-size: 1.08rem; font-weight: 500; }
.bq-q p { margin: 0 0 8px; }
.bq-q .passage { background: #F4F7F7; border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 14px; font-weight: 400; }
.bq .opts { display: grid; gap: 8px; margin: 10px 0 4px; }
.bq .opt { text-align: left; font: inherit; display: flex; gap: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.bq .opt b { flex: none; min-width: 2.1em; }
.bq-act { margin: 10px 0 0; }
.bq-ans { margin-top: 12px; border-left: 4px solid var(--good); background: #F3FAF6; border-radius: 0 12px 12px 0; padding: 10px 16px; }
.bq-ans h4 { margin: 0 0 6px; color: var(--good); }
.bq-ans p { margin: 0 0 8px; }
.bq .seq { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .25em; border-bottom: 2px solid var(--ink, #22313a); padding: 2px 6px; margin: 4px 0; }
.bq .flow { display: inline-block; text-align: center; line-height: 1.5; padding: 4px 18px; margin: 4px 0; border-left: 3px solid var(--accent); }
table.mini { border-collapse: collapse; margin: 6px 0; } table.mini td, table.mini th { border: 1px solid var(--line, #cfd8da); padding: 3px 12px; text-align: center; }
.bq-ans .final { display: inline-block; border: 2px solid var(--good); border-radius: 6px; padding: 2px 10px; font-weight: 600; background: #fff; }
.bq-ans .step { margin: 0 0 4px; } .bq-ans .step b:first-child { color: var(--accent); }
.bq-ans u { text-decoration-color: var(--good); text-decoration-thickness: 2px; }
.bq-pts { margin-top: 8px; background: #fff; border: 1px dashed #B9D8C7; border-radius: 10px; padding: 8px 12px; }
.bq-pts ul { margin: 4px 0 0; padding-left: 20px; }
/* Counselling */
.cns-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0 20px; }
.cns-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; border-top: 5px solid var(--brand); min-width: 0; overflow-wrap: anywhere; }
.cns-card.raj { border-top-color: var(--saffron); } .cns-card.ayush { border-top-color: #166534; }
.cns-card h2 { margin: 0 0 8px; font-size: 1.3rem; }
.cns-card p { margin: 0; color: #3F5558; }
.cns-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.cns-toc { position: sticky; top: 74px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.cns-toc b { font-size: .8rem; color: var(--muted); letter-spacing: .05em; margin-bottom: 4px; }
.cns-toc a { color: #3F5558; text-decoration: none; padding: 5px 8px; border-radius: 8px; }
.cns-toc a:hover { background: #F1F6F6; color: var(--brand); }
.cns-sec { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 14px; overflow-wrap: anywhere; }
.cns-sec h2 { margin: 0 0 10px; font-size: 1.4rem; }
.cns-sec li { margin-bottom: 6px; }
.cns-sec table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; display: block; overflow-x: auto; }
.cns-sec th, .cns-sec td { text-align: left; padding: 7px 10px; border: 1px solid var(--line); vertical-align: top; }
.cns-sec th { background: #F4F7F7; }
.cns-sec ul.check { list-style: none; padding-left: 0; }
.cns-sec ul.check li::before { content: "☐ "; color: var(--brand); font-weight: 700; }
.cns-sec.soon { background: var(--saffron-soft); border-color: #F8D58A; }
.cns-sec.soon h2 { color: var(--saffron-ink); }
.cns-sec .links a { color: var(--brand); font-weight: 600; }
.cns-sec .disclaimer { color: var(--muted); font-size: .92rem; margin-bottom: 0; }
@media (max-width: 900px) { .cns-layout { grid-template-columns: minmax(0, 1fr); } .cns-toc { position: static; } }
