/* preview5: fix the parent theme's back/home bar.
 * The parent's base CSS has a generic `nav { position:absolute; right:0; top:48px;
 * background:#11243e; ... }` rule meant for its mobile dropdown. It also catches the
 * injected back/home bar (.pcsm-home-return371 / .pcsm-article-return373) on legacy
 * routed pages (PYQ, tools, sections), turning it into a dark floating box at the
 * upper right. These scoped rules render it as an inline pill bar inside the content
 * flow instead. Loaded on every page because the parent injects the same bar into
 * singular pcsm_material and footer pages too.
 */
nav.pcsm-home-return371,
nav.pcsm-article-return373 {
	position: static;
	right: auto;
	top: auto;
	min-width: 0;
	background: transparent;
	padding: 0 0 14px;
	border-radius: 0;
	z-index: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
nav.pcsm-home-return371 a,
nav.pcsm-article-return373 a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 14px;
	background: #EEF3FA;
	border: 1px solid #C6D6EA;
	border-radius: 999px;
	color: #145093;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none;
}
nav.pcsm-home-return371 a:hover,
nav.pcsm-article-return373 a:hover {
	background: #DFEAF7;
	color: #0B1F3A;
}
@media (max-width: 600px) {
	nav.pcsm-home-return371,
	nav.pcsm-article-return373 {
		padding-bottom: 12px;
		gap: 6px;
	}
	nav.pcsm-home-return371 a,
	nav.pcsm-article-return373 a {
		padding: 6px 12px;
		font-size: 14px;
	}
}

/* ================= preview11 ================= */
/* Child header/footer render on legacy pages too (same look site-wide). Legacy
   CONTENT keeps the parent's own light styling: pin the light palette on the
   page so the child's dark-mode rules never darken legacy content. */
body.pcpro-legacy {
	--bg: #F5F7FB; --surface: #FFFFFF; --surface-2: #F8FAFD; --tint: #F5F7FB;
	--ink: #0F172A; --text: #1E293B; --muted: #5B6676; --heading: #0B1F3A;
	--line: #E3E8EF; --line-soft: #EDF1F6; --chip: #E8EEF8; --navy-3: #1C4170;
	--amber-wash: #FFFBEB; --ok-soft: #DCFCE7; --bad-soft: #FEE2E2; --amber-soft: #FEF3C7;
	--header-bg: rgba(255,255,255,.88);
	--shadow: 0 1px 2px rgba(11,31,58,.06), 0 8px 24px rgba(11,31,58,.07);
	--shadow-lg: 0 2px 4px rgba(11,31,58,.06), 0 18px 40px rgba(11,31,58,.12);
	background: #F5F7FB; color: #14233D;
}
/* Neutralize the child's element-level dark rules on legacy pages. */
body.pcpro-legacy .btn-primary { background: var(--navy); color: #fff; }
body.pcpro-legacy .panel-icon, body.pcpro-legacy .state-code { background: var(--navy); }
body.pcpro-legacy .site-footer, body.pcpro-legacy .page-hero { background-color: var(--navy); }
body.pcpro-legacy .search-form { background: var(--surface); color: var(--ink); }
body.pcpro-legacy .cal-date { border-color: #FDE3B0; }
body.pcpro-legacy .card-ph.g0 { background: linear-gradient(135deg, #12305A, #1C4170); }
body.pcpro-legacy .entry-content .pcsm-outline-head::before,
body.pcpro-legacy .entry-content .pcsm-outline-para::before { background: var(--amber); }
body.pcpro-legacy .entry-content details[open] > summary::after { background: var(--amber); }

/* Neutralize parent-theme header/nav/footer rules that would restyle the child header/footer. */
/* preview11n: parent style.css loads after main.css on legacy routes and wins the
   body font shorthand (system-ui), making the header render wider/bolder and
   collapsing the priority nav early. Restore the child font on header/footer so
   the header matches non-legacy pages exactly. */
body.pcpro-legacy .site-header, body.pcpro-legacy .site-footer { font-family: var(--font); }
body.pcpro-legacy header.site-header {
	display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap;
	padding: 0; background: var(--header-bg); color: var(--ink); gap: 0;
	box-shadow: none; border-bottom: 1px solid var(--line);
}
body.pcpro-legacy .site-header .brand { max-width: none; font-size: inherit; }
body.pcpro-legacy .site-header nav.main-nav {
	position: static; inset: auto; width: auto; min-width: 0; max-width: none; max-height: none;
	overflow: hidden; background: transparent; padding: 0; border: 0; border-radius: 0; box-shadow: none;
	display: none; margin-left: auto;
}
@supports (overflow-x: clip) {
	body.pcpro-legacy .site-header nav.main-nav { overflow-x: clip; overflow-y: visible; }
}
body.pcpro-legacy .site-header nav.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
html.js body.pcpro-legacy .site-header nav.main-nav ul { flex-wrap: nowrap; }
body.pcpro-legacy .site-header nav.main-nav a {
	display: block; min-height: 0; padding: 8px 11px; border: 0; border-radius: 10px;
	color: var(--ink); font-weight: 600; font-size: 15.5px; line-height: 1.45; white-space: nowrap;
}
body.pcpro-legacy .site-header nav.main-nav a:hover,
body.pcpro-legacy .site-header nav.main-nav a:focus-visible { background: var(--tint); color: var(--heading); outline: none; }
body.pcpro-legacy .site-header nav.main-nav .current-menu-item > a { background: var(--tint); color: var(--heading); box-shadow: inset 0 -2px 0 var(--amber); }
body.pcpro-legacy .site-header nav.main-nav .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 60;
	max-height: calc(100vh - var(--header-h, 72px) - 48px); overflow-y: auto;
	background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
/* preview11n: keep the More dropdown right-aligned (same as main.css) - a left:0
   dropdown overflows the ul right edge, inflates scrollWidth, and the priority
   nav then collapses 2 items too many on legacy routes. */
body.pcpro-legacy .site-header nav.main-nav .menu > li.nav-more .sub-menu { left: auto; right: 0; }
body.pcpro-legacy .site-header nav.main-nav li:hover > .sub-menu,
body.pcpro-legacy .site-header nav.main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
@media (min-width: 1100px) { body.pcpro-legacy .site-header nav.main-nav { display: block; flex: 1 1 auto; } }
body.pcpro-legacy .site-header nav.drawer-nav {
	position: fixed; inset: 0 0 0 auto; width: min(340px, calc(100vw - 32px)); max-width: none; max-height: none;
	background: var(--navy); padding: 0; border: 0; border-radius: 0; box-shadow: none; z-index: 90;
}
body.pcpro-legacy .site-header .brand-text { font-size: inherit; }
body.pcpro-legacy footer.site-footer { text-align: left; padding: 44px 0 0; font-size: inherit; background: var(--navy); color: #C9D6E8; }
body.pcpro-legacy > footer.site-footer a { color: inherit; }
body.pcpro-legacy .site-footer .footer-links a, body.pcpro-legacy .site-footer .widget a { color: #C9D6E8; }

/* Dark mode: menu371 context/related box (hard-coded light blue) inside articles. */
:root[data-theme="dark"] .article-body .pcsm-context394,
:root[data-theme="dark"] .entry-content .pcsm-context394 { background: var(--surface-2); border-left-color: var(--navy-3); color: var(--text); }
:root[data-theme="dark"] .article-body .pcsm-context394 a,
:root[data-theme="dark"] .entry-content .pcsm-context394 a { color: var(--navy-3); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .article-body .pcsm-context394,
	:root:not([data-theme="light"]) .entry-content .pcsm-context394 { background: var(--surface-2); border-left-color: var(--navy-3); color: var(--text); }
	:root:not([data-theme="light"]) .article-body .pcsm-context394 a,
	:root:not([data-theme="light"]) .entry-content .pcsm-context394 a { color: var(--navy-3); }
}

/* preview11: (a)(b)(c)(d) round badges for legacy PYQ/BPSC quiz options. */
.pcsm-pyq-app ol.opts { counter-reset: pyqopt; }
.pcsm-pyq-app ol.opts > li { counter-increment: pyqopt; }
.pcsm-pyq-app .omark { font-size: 0; }
.pcsm-pyq-app .omark::before {
	content: counter(pyqopt, lower-alpha); font-size: 13px; font-weight: 800;
	display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
	background: #12304F; color: #fff; margin-right: 8px; vertical-align: -3px;
}
.bq-opts { counter-reset: bqopt; }
.bq-optbtn { counter-increment: bqopt; }
.bq-omark { font-size: 0; margin-right: 0; }
.bq-omark::before {
	content: counter(bqopt, lower-alpha); font-size: 13px; font-weight: 800;
	display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
	background: #12304F; color: #fff; margin-right: 6px; vertical-align: -3px;
}
.bq-right .bq-omark::before { background: #1e8449; }
.bq-wrong .bq-omark::before { background: #c0392b; }

/* preview11f: legacy header stays on one row; the brand shrinks/ellipsizes instead of wrapping */
body.pcpro-legacy .header-inner { flex-wrap: nowrap; }
body.pcpro-legacy .site-header .brand { flex: 0 1 auto; min-width: 0; }
body.pcpro-legacy .site-header .brand-text { min-width: 0; }
body.pcpro-legacy .site-header .brand-name, body.pcpro-legacy .site-header .brand-tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
	body.pcpro-legacy .header-inner { gap: 8px; }
	body.pcpro-legacy .site-header .brand-mark { width: 34px; height: 34px; }
	body.pcpro-legacy .site-header .brand-name { font-size: 16px; }
	body.pcpro-legacy .site-header .brand-tag { display: none; }
}

/* Twin-section chips: Mains/Prelims pairs share one title (10 Nov 2026 list); tag classes already on the card, surface them so identical titles are distinguishable */
article.card.tag-prelims .card-title a::after,
article.card.tag-mains .card-title a::after {
	display: inline-block; margin-left: .4em; padding: .05em .45em;
	font-size: .62em; font-weight: 600; line-height: 1.5; vertical-align: middle;
	border: 1px solid currentColor; border-radius: 999px; opacity: .75;
}
article.card.tag-prelims .card-title a::after { content: 'प्रिलिम्स'; }
article.card.tag-mains .card-title a::after { content: 'मुख्य परीक्षा'; }

article.card.tag-prelims.tag-mains .card-title a::after { content: 'प्रिलिम्स + मुख्य परीक्षा'; }

/* 14 Nov: native theme nav a{padding:8px} was widening footer policy links (3/2/1 wrap); keep bottom block identical to home. */
.site-footer .footer-policy .footer-links a{padding:0!important;}
