/* ==========================================================================
   MCQs360 — main stylesheet
   Brand: Signature Lime #9FE870 / Deep Charcoal #0F1410 / Warm Off-White #F6F6F2
   ========================================================================== */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: optional; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: optional; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: optional; }
/* Metric-matched fallbacks: text keeps its size and wrapping while the web fonts load (no layout shift). */
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Roboto Bold"), local("Arial"); font-weight: 600 800; size-adjust: 96.8%; ascent-override: 96.1%; descent-override: 27.9%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Roboto"); font-weight: 400 700; size-adjust: 102.5%; ascent-override: 94.6%; descent-override: 24.4%; line-gap-override: 0%; }

:root {
	--lime: #9fe870;
	--lime-soft: #e8f7dc;
	--lime-ink: #3b7a1e;
	--ink: #0f1410;
	--ink-2: #1c241e;
	--muted: #68736b;
	--line: #e3e6df;
	--canvas: #f6f6f2;
	--card: #ffffff;
	--chip: #eef0ea;

	--ok: #2f9e44;
	--ok-bg: #e6f6e3;
	--ok-line: #5cbf5f;
	--no: #d63c3c;
	--no-bg: #fdecec;
	--no-line: #ef8a8a;

	--f-display: "Bricolage Grotesque", "Bricolage Fallback", system-ui, sans-serif;
	--f-body: "Instrument Sans", "Instrument Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--r-sm: 10px;
	--r: 14px;
	--r-lg: 22px;
	--r-pill: 999px;
	--shadow: 0 1px 2px rgba(15, 20, 16, .04), 0 8px 24px -12px rgba(15, 20, 16, .12);
	--shadow-lg: 0 2px 4px rgba(15, 20, 16, .04), 0 24px 48px -20px rgba(15, 20, 16, .22);
	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 32px);
	--head-h: 72px;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
	margin: 0;
	background: var(--canvas);
	color: var(--ink);
	font: 400 17px/1.6 var(--f-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--lime-ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--ink); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0; z-index: 1000; top: 12px; left: 12px;
	padding: 12px 18px; background: var(--ink); color: #fff; border-radius: var(--r-sm);
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: 820px; }
.mono { font: 500 12px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.center { text-align: center; }
.hl { background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); padding: 0 .08em; }
.ico { flex: none; }

/* Buttons ---------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px; border: 2px solid transparent; border-radius: var(--r-pill);
	font: 700 15px/1 var(--f-body); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
	transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); box-shadow: 0 8px 18px -10px rgba(15, 20, 16, .6); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #b2ee8b; }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 16px; }
.btn--block { width: 100%; }

.link-btn {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none;
	font: 600 15px/1.2 var(--f-body); color: var(--ink); text-decoration: none;
	border-bottom: 2px solid var(--lime);
}
.link-btn:hover { color: var(--lime-ink); }
.link-btn .ico { width: 16px; height: 16px; }

.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); }

/* Chips ------------------------------------------------------------------ */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px;
	border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line);
	font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color .15s, background-color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.is-active .chip__n { background: var(--lime); color: var(--ink); }
.chip__n { font: 500 11px/1 var(--f-mono); background: var(--chip); color: #4e5850; padding: 4px 7px; border-radius: var(--r-pill); }
.chips--lg .chip { min-height: 44px; font-size: 15px; padding: 0 16px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; margin-top: 24px; }
.chips--scroll li { flex: none; }

/* Header ----------------------------------------------------------------- */
.site-head {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-head { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-head { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-head { top: 0; } }
.head-row { display: flex; align-items: center; gap: 24px; height: var(--head-h); }
.brand { flex: none; display: block; }
.brand .logo { width: 150px; height: 31px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav__link {
	display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-pill);
	background: none; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--chip); }
.nav__link .ico { width: 16px; height: 16px; transition: transform .2s; }
.nav__link[aria-expanded="true"] .ico { transform: rotate(180deg); }
.nav__search, .nav__cta { display: none; }
.head-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: inline; }

.has-mega { position: static; }
.mega {
	position: absolute; left: 0; right: 0; top: 100%;
	background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; }
.mega__inner { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--gutter) 28px; }
.mega__label { color: var(--muted); margin-bottom: 14px; }
.mega__grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 16px; }
.mega__grid a {
	display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
	text-decoration: none; font-weight: 600; font-size: 15px;
}
.mega__grid a:hover { background: var(--lime-soft); }
.mega__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--chip); flex: none; }
.mega__ico .ico { width: 18px; height: 18px; }
.mega__grid a:hover .mega__ico { background: var(--lime); }
.mega__name { flex: 1; min-width: 0; }
.mega__count { font: 500 11px/1 var(--f-mono); color: var(--muted); }

.head-search { border-top: 1px solid var(--line); background: var(--card); }
.head-search form { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.head-search input { flex: 1; border: 0; background: none; font-size: 18px; padding: 8px 0; outline: none; min-width: 0; }
.head-search .ico { color: var(--muted); }

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 500 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lime-ink); margin-bottom: 22px; }
.eyebrow__bar { width: 40px; height: 5px; border-radius: 3px; background: var(--lime); }
.hero__title { font-size: clamp(40px, 6.2vw, 72px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin-bottom: 22px; }
.hero__lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 520px; margin-bottom: 30px; }
.hero__search {
	display: flex; align-items: center; gap: 10px; max-width: 560px; padding: 6px 6px 6px 18px;
	background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-pill); box-shadow: var(--shadow);
	transition: border-color .15s, box-shadow .15s;
}
.hero__search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--lime-soft); }
.hero__search .ico { color: var(--muted); }
.hero__search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; padding: 10px 0; }
.hero__search--inline { margin-top: 20px; }
.hero__chips { margin-top: 22px; }
.hero__card { position: relative; }
.hero__ring {
	position: absolute; width: 420px; height: 420px; right: -150px; top: -120px; border-radius: 50%;
	border: 56px solid var(--lime); opacity: .55; z-index: 0; pointer-events: none;
}
.hero__card .mcq { position: relative; z-index: 1; box-shadow: var(--shadow-lg); }

/* Stats ------------------------------------------------------------------ */
.stats { background: var(--ink); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 24px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid rgba(255, 255, 255, .1); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__n { font: 800 clamp(30px, 3.6vw, 44px)/1 var(--f-display); color: var(--lime); letter-spacing: -.03em; }
.stat__l { font-size: 15px; color: rgba(255, 255, 255, .72); }

/* Sections --------------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tint { background: var(--card); border-block: 1px solid var(--line); }
.section--promo { padding-top: 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section__head--tight { margin-bottom: 20px; align-items: center; }
.kicker { font: 700 13px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--lime-ink); margin-bottom: 12px; }
.section__title { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.section__lead { color: var(--muted); max-width: 420px; margin: 0; }

/* Subjects --------------------------------------------------------------- */
.subjects { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.subjects[data-collapsed="true"] .subject--more { display: none; }
.subject {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
	display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.subject:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.subject__link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.subject__ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--lime-soft); color: var(--ink); margin-bottom: 10px; transition: background-color .15s; }
.subject:hover .subject__ico { background: var(--lime); }
.subject__name { font: 700 20px/1.2 var(--f-display); letter-spacing: -.02em; }
.subject__count { color: var(--muted); }
.subject__topics { list-style: none; display: flex; flex-direction: column; gap: 4px; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto; }
.subject__topics a { font-size: 14px; color: var(--muted); text-decoration: none; }
.subject__topics a:hover { color: var(--ink); text-decoration: underline; }
.subjects-more { margin-top: 32px; }

/* How it works ----------------------------------------------------------- */
.how { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.how .section__lead { margin-top: 16px; }
.steps { list-style: none; display: grid; gap: 14px; background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 30px; }
.steps li { display: flex; gap: 18px; padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.steps li:last-child { border-bottom: 0; }
.steps .mono { color: var(--lime); font-size: 14px; padding-top: 4px; }
.steps h3 { font-size: 20px; margin-bottom: 4px; }
.steps p { margin: 0; color: rgba(255, 255, 255, .7); font-size: 15px; }

/* Promo cards ------------------------------------------------------------ */
.promo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.promo__card { border-radius: var(--r-lg); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; align-items: flex-start; min-height: 320px; }
.promo__card--dark { background: var(--ink); color: #fff; }
.promo__card--lime { background: var(--lime); color: var(--ink); }
.promo__brand { font: 700 17px/1 var(--f-display); margin-bottom: auto; }
.promo__card--dark .promo__brand { color: var(--lime); }
.promo__title { font: 800 clamp(32px, 4.2vw, 48px)/1.02 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; margin: 40px 0 14px; }
.promo__card--dark .promo__title span { color: var(--lime); }
.promo__text { font-size: 17px; margin-bottom: 24px; opacity: .85; }

/* Page head -------------------------------------------------------------- */
.page-head { padding: 28px 0 36px; border-bottom: 1px solid var(--line); background: var(--card); }
.page-head--slim { padding: 18px 0; background: transparent; border: 0; }
.page-head__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.page-head__title { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 12px; }
.page-head__desc { color: var(--muted); max-width: 680px; margin: 0; }
.page-head__desc p:last-child { margin: 0; }
.page-head__page { color: var(--muted); white-space: nowrap; }
.page-head .kicker { margin-top: 22px; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: #b9beb6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* Layout ----------------------------------------------------------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-top: 32px; padding-bottom: 80px; align-items: start; }
.mcq-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.mcq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }

/* MCQ card --------------------------------------------------------------- */
.mcq {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
	padding: clamp(20px, 3vw, 30px); scroll-margin-top: calc(var(--head-h) + 16px);
}
.mcq__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); margin-bottom: 14px; }
.mcq__sep { color: var(--muted); }
.mcq__cat { text-decoration: none; color: var(--muted); }
.mcq__cat:hover { color: var(--lime-ink); }
.mcq__q { font: 700 clamp(19px, 2vw, 22px)/1.3 var(--f-display); letter-spacing: -.015em; margin: 0 0 18px; overflow-wrap: anywhere; }
.mcq--single .mcq__q { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin-bottom: 22px; }
.mcq__q a { text-decoration: none; }
.mcq__q a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; }
.mcq__stem { margin: -6px 0 18px; color: var(--ink-2); }
.mcq__opts { list-style: none; display: grid; gap: 10px; }

.opt {
	position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px;
	padding: 10px 14px 10px 10px; text-align: left; background: var(--canvas); border: 1.5px solid transparent;
	border-radius: var(--r); font-size: 16px; line-height: 1.4; color: var(--ink);
	transition: background-color .15s, border-color .15s, transform .12s;
}
.opt:hover:not([disabled]) { border-color: var(--ink); background: #fff; }
.opt:active:not([disabled]) { transform: scale(.995); }
.opt__k {
	display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px;
	background: var(--card); border: 1px solid var(--line); font: 600 14px/1 var(--f-mono); transition: inherit;
}
.opt__t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt__state { flex: none; display: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; }
.opt__state .ico { width: 16px; height: 16px; }
.opt__state .i-ok, .opt__state .i-no { display: none; }
.opt[disabled] { cursor: default; color: var(--ink); }
.mcq.is-answered .opt:not(.is-correct):not(.is-wrong) { opacity: .62; }

.opt.is-correct { background: var(--ok-bg); border-color: var(--ok-line); }
.opt.is-correct .opt__k { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.is-correct .opt__state { display: grid; background: var(--ok); }
.opt.is-correct .i-ok { display: block; }
.opt.is-wrong { background: var(--no-bg); border-color: var(--no-line); }
.opt.is-wrong .opt__k { background: var(--no); border-color: var(--no); color: #fff; }
.opt.is-wrong .opt__state { display: grid; background: var(--no); }
.opt.is-wrong .i-no { display: block; }
.opt.is-picked { font-weight: 600; }
.opt.is-correct.is-picked { animation: m360-pop .35s ease; }
.opt.is-wrong { animation: m360-shake .4s ease; }
.opt.is-chosen { border-color: var(--ink); background: #fff; font-weight: 600; }
@keyframes m360-pop { 0% { transform: scale(1); } 40% { transform: scale(1.015); } 100% { transform: scale(1); } }
@keyframes m360-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

.mcq__feedback { margin: 14px 0 0; font-weight: 700; font-size: 15px; min-height: 0; }
.mcq__feedback:empty { display: none; }
.mcq__feedback.is-ok { color: var(--ok); }
.mcq__feedback.is-no { color: var(--no); }
.mcq__reveal { display: none; margin-top: 14px; padding: 16px 18px; border-radius: var(--r); background: var(--lime-soft); }
.mcq.is-answered .mcq__reveal { display: block; animation: m360-in .25s ease; }
@keyframes m360-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mcq__answer { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.mcq__answer .mono { color: var(--lime-ink); }
.mcq__answer--none { color: var(--ink-2); font-size: 15px; }
.mcq__explain { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(59, 122, 30, .2); }
.mcq__explain .mono { display: block; color: var(--lime-ink); margin-bottom: 8px; }
.mcq__explain p:last-child { margin: 0; }
.mcq__explain img { border-radius: var(--r-sm); margin-top: 8px; }
.mcq__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.mcq.is-answered .mcq__show { visibility: hidden; }
.mcq--plain .mcq__body { color: var(--ink-2); }

.mcq--single { padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.mcq--single .opt { min-height: 60px; font-size: 17px; }

/* Single question extras ------------------------------------------------- */
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.q-hint { color: var(--muted); margin: 14px 0 0; text-align: right; }
.related { margin-top: 56px; }
.related__title { display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; margin: 0; }
.discuss { margin-top: 56px; }
.comments { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); }
.comment-list { list-style: none; margin: 20px 0; display: grid; gap: 16px; }
.comment-list .children { list-style: none; margin: 12px 0 0 24px; }
.comment-body { padding: 16px; border-radius: var(--r); background: var(--canvas); font-size: 15px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.comment-metadata a { text-decoration: none; }
.comment-respond { margin-top: 20px; }
.comment-reply-title { font-size: 20px; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--canvas);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--ink); outline: none; background: #fff; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; }
.m360c-note { font-size: 13px; color: var(--muted); margin: 0; }
.m360c-msg { margin: 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--no-bg); color: #a12a2a; font-weight: 600; font-size: 14px; }
.m360-form { position: relative; display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); margin-top: 8px; }
.m360-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.m360-form__field { margin: 0; }
.m360-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.m360-form input, .m360-form select, .m360-form textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--canvas); font-size: 16px; }
.m360-form input:focus, .m360-form select:focus, .m360-form textarea:focus { border-color: var(--ink); outline: none; background: #fff; }
.m360-form [type="submit"] { justify-self: start; }
.m360-form [type="submit"][disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.m360-form__done { margin: 0; padding: 14px 16px; border-radius: var(--r-sm); background: var(--ok-bg); color: #1f6b2c; font-weight: 600; }
@media (max-width: 640px) { .m360-form__row { grid-template-columns: 1fr; } }
.comment-form [type="submit"][disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Subject guide (editorial content) */
.page-head__desc--lead { font-size: 18px; color: var(--ink-2); max-width: 760px; }
.guide { margin-top: 56px; display: grid; gap: 22px; }
.guide__block { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); }
.guide__block p { color: var(--ink-2); }
.guide__block p:last-child { margin-bottom: 0; }
.guide__h { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; margin: 0 0 14px; }
.guide__h3 { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.guide__facts { background: var(--lime-soft); border-color: transparent; }
.guide__facts ul { list-style: none; display: grid; gap: 10px; }
.guide__facts li { position: relative; padding-left: 28px; color: var(--ink-2); }
.guide__facts li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--lime-ink); }
.exams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.exams__col { background: var(--canvas); border-radius: var(--r); padding: 16px; }
.exams__country { color: var(--lime-ink); margin-bottom: 10px; }
.exams__col ul { list-style: none; display: grid; gap: 6px; font-size: 15px; }
.guide__tips { padding-left: 0; list-style: none; counter-reset: tip; display: grid; gap: 12px; }
.guide__tips li { counter-increment: tip; position: relative; padding-left: 44px; color: var(--ink-2); min-height: 30px; }
.guide__tips li::before { content: counter(tip, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 32px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--lime); font: 500 12px/1 var(--f-mono); }
.faq { display: grid; gap: 10px; }
.faq .guide__h, .faq--home .section__title { margin-bottom: 8px; }
.faq__item { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--chip); font-weight: 700; }
.faq__item[open] summary::after { content: "–"; background: var(--lime); }
.faq__q { font: 700 17px/1.35 var(--f-display); letter-spacing: -.01em; margin: 0; }
.faq__a { margin: 0; padding: 0 18px 18px; color: var(--ink-2); }
.guide__updated { color: var(--muted); margin: 0; }
.faq--home { margin-top: 8px; }
@media (max-width: 760px) { .exams { grid-template-columns: 1fr; } }

.about-topic { margin-top: 56px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 36px); }
.about-topic .related__title { margin-bottom: 16px; }
.about-topic .prose { font-size: 16px; color: var(--ink-2); }

/* Ads -------------------------------------------------------------------- */
.ad { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 24px 0; min-height: 280px; padding: 22px 12px 12px; border-radius: var(--r-lg); background: #eceee8; overflow: hidden; contain: layout; }
.ad__label { position: absolute; top: 6px; left: 0; right: 0; text-align: center; color: #5f675c; font-size: 10px; }
.ad ins { width: 100%; }
.ad.ad--empty { display: none; }
.mcq-list > .ad, .mcq-grid + .ad { margin: 0; }
.mcq-grid + .ad { margin-top: 18px; }
.ad--side { min-height: 620px; margin: 0; position: sticky; z-index: 1; top: calc(var(--head-h) + 20px); background: var(--canvas); padding: 18px 0 0; }
.admin-bar .ad--side { top: calc(var(--head-h) + 52px); }

/* Sidebar ---------------------------------------------------------------- */
.side { display: flex; flex-direction: column; gap: 18px; align-self: stretch; }
.score { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 24px; }
.score__label { color: var(--lime); margin-bottom: 16px; }
.score__row { display: flex; align-items: center; gap: 20px; }
.score__ring {
	--p: 0; flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
	background: conic-gradient(var(--lime) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0);
	position: relative; transition: --p .4s;
}
.score__ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--ink); }
.score__pct { position: relative; font: 800 24px/1 var(--f-display); }
.score__nums { margin: 0; display: grid; gap: 6px; flex: 1; }
.score__nums div { display: flex; justify-content: space-between; font-size: 14px; border-bottom: 1px dashed rgba(255, 255, 255, .14); padding-bottom: 5px; }
.score__nums dt { color: rgba(255, 255, 255, .7); }
.score__nums dd { margin: 0; font-weight: 700; font-family: var(--f-mono); }
.score__note { font-size: 13px; color: rgba(255, 255, 255, .55); margin: 16px 0; }
.score__actions { display: grid; gap: 10px; justify-items: center; }
.score__reset { color: rgba(255, 255, 255, .8); border-color: transparent; font-size: 14px; }
.score__reset:hover { color: var(--lime); }
.score.bump .score__ring { animation: m360-pop .35s ease; }

.side-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 14px 14px; }
.side-box__title { color: var(--muted); padding: 0 8px 10px; margin: 0; }
.side-list { list-style: none; max-height: 420px; overflow-y: auto; scrollbar-width: thin; }
.side-list a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; font-size: 15px; font-weight: 500; }
.side-list a:hover { background: var(--canvas); }
.side-list .is-current a { background: var(--lime-soft); font-weight: 700; }
.side-list__n { font: 500 12px/1.6 var(--f-mono); color: #4e5850; }

/* Pagination ------------------------------------------------------------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 36px; }
.pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 14px;
	border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 600;
}
.pager a.page-numbers:hover { border-color: var(--ink); }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .dots { border: 0; background: none; min-width: 20px; }
.pager .ico { width: 16px; height: 16px; }

/* Empty / 404 ------------------------------------------------------------ */
.empty { background: var(--card); border: 1px dashed #cdd2c9; border-radius: var(--r-lg); padding: 40px; text-align: center; }
.empty .mono { color: var(--muted); }
.empty .chips { justify-content: center; margin-top: 20px; }
.notfound { padding: clamp(56px, 10vw, 120px) 0; text-align: center; }
.notfound__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.notfound__code { font: 800 clamp(96px, 18vw, 180px)/1 var(--f-display); letter-spacing: -.05em; margin: 0; }
.notfound__code span { color: var(--lime); }
.notfound .hero__search { width: 100%; margin: 12px 0; }

/* Prose (pages, unparsed posts) ------------------------------------------ */
.page-body { padding-top: 40px; padding-bottom: 80px; }
.prose { font-size: 17px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 28px; margin-top: 1.6em; }
.prose h3 { font-size: 22px; margin-top: 1.4em; }
.prose a { color: var(--lime-ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: var(--r); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--canvas); }
.m360-details { margin-top: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--lime-soft); }
.m360-details summary { cursor: pointer; font-weight: 700; }

/* Hub pages (rebuilt legacy link pages) */
.hub-intro { font-size: 18px; color: var(--ink-2); max-width: 720px; margin-bottom: 32px; }
.hub-intro > * + * { margin-top: .9em; }
.prose .hub-grid, .hub-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.prose .hub-grid li + li { margin-top: 0; }
.hub-card {
	position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
	padding: 18px 44px 18px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
	text-decoration: none !important; color: var(--ink) !important; font-weight: 400 !important;
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.hub-card:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.hub-card__ico { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--lime-soft); }
.hub-card:hover .hub-card__ico { background: var(--lime); }
.hub-card__name { font: 700 17px/1.25 var(--f-display); letter-spacing: -.01em; }
.hub-card__n { color: var(--muted); font-size: 11px; }
.hub-card__go { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hub-card__go .ico { width: 18px; height: 18px; }
.hub-card:hover .hub-card__go { color: var(--ink); }

/* Legacy page buttons (core, Stackable, Shortcodes Ultimate) in brand style */
.prose .wp-block-button__link, .prose .ugb-button, .prose .stk-button, .prose .su-button {
	display: flex !important; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px !important;
	background: var(--card) !important; color: var(--ink) !important; border: 1.5px solid var(--line) !important;
	border-radius: var(--r) !important; font: 600 15px/1.3 var(--f-body) !important; text-decoration: none !important;
	box-shadow: none !important; text-shadow: none !important; transition: border-color .15s, background-color .15s;
}
.prose .wp-block-button__link:hover, .prose .ugb-button:hover, .prose .stk-button:hover, .prose .su-button:hover { border-color: var(--ink) !important; background: var(--lime-soft) !important; }
.prose .su-button span { background: none !important; border: 0 !important; color: inherit !important; padding: 0 !important; text-shadow: none !important; }
.prose .wp-block-buttons { gap: 10px; }
.prose blockquote { margin: 0; padding: 16px 20px; border-left: 4px solid var(--lime); background: var(--card); border-radius: 0 var(--r) var(--r) 0; }

/* Footer ----------------------------------------------------------------- */
.site-foot { background: var(--ink); color: rgba(255, 255, 255, .78); margin-top: 0; }
.foot-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 56px; padding-bottom: 48px; border-bottom: 1px solid rgba(255, 255, 255, .1); flex-wrap: wrap; }
.foot-cta__label { color: var(--lime); margin-bottom: 10px; }
.foot-cta__title { font: 800 clamp(26px, 3.4vw, 40px)/1.1 var(--f-display); letter-spacing: -.025em; color: #fff; margin: 0; }
.foot-cta__title span { color: var(--lime); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 48px; }
.foot-brand .logo { width: 170px; height: 35px; margin-bottom: 18px; }
.foot-brand p { font-size: 15px; max-width: 320px; }
.foot-col__title { color: rgba(255, 255, 255, .64); margin-bottom: 14px; }
.foot-col ul { list-style: none; display: grid; gap: 8px; }
.foot-col a { text-decoration: none; font-size: 15px; }
.foot-col a:hover { color: var(--lime); }
.foot-menu { margin-top: 8px !important; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; flex-wrap: wrap; }
.foot-base p { margin: 0; }
.to-top { color: var(--lime); text-decoration: none; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1100px) {
	.subjects { grid-template-columns: repeat(3, 1fr); }
	.mega__grid { grid-template-columns: repeat(3, 1fr); }
	.layout { grid-template-columns: minmax(0, 1fr) 280px; }
	.foot-grid { grid-template-columns: 1fr 1fr 1fr; }
	.foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
	:root { --head-h: 64px; }
	.brand .logo { width: 128px; height: 26px; }
	.head-cta { display: none; }
	.menu-toggle { display: inline-grid; }
	.search-toggle { display: none; }
	/* backdrop-filter would become the containing block of the fixed drawer */
	.site-head { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
	.nav {
		position: fixed; inset: var(--head-h) 0 0 0; z-index: 60; flex-direction: column; align-items: stretch; gap: 4px;
		background: var(--card); padding: 16px var(--gutter) 32px; overflow-y: auto;
		opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}
	.admin-bar .nav { top: calc(var(--head-h) + 46px); }
	.nav.is-open { opacity: 1; transform: none; visibility: visible; }
	.nav__search { display: flex; order: -1; align-items: center; gap: 8px; padding: 4px 4px 4px 16px; border: 1.5px solid var(--line); border-radius: var(--r-pill); margin-bottom: 12px; }
	.nav__search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; padding: 10px 0; font-size: 16px; }
	.nav__search button { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; }
	.nav__link { width: 100%; height: 52px; font-size: 17px; justify-content: space-between; border-radius: var(--r-sm); }
	.nav__cta { display: inline-flex; margin-top: 16px; min-height: 52px; }
	.mega { position: static; box-shadow: none; border: 0; opacity: 1; visibility: visible; transform: none; display: none; }
	.mega.is-open { display: block; }
	.mega__inner { padding: 4px 0 12px; }
	.mega__label { display: none; }
	.mega__grid { grid-template-columns: 1fr; }
	body.nav-open { overflow: hidden; }

	.hero__grid { grid-template-columns: 1fr; }
	.hero__ring { width: 300px; height: 300px; right: -120px; top: -60px; border-width: 40px; }
	.stats__grid { grid-template-columns: 1fr 1fr; }
	.stat { padding: 26px 16px; }
	.stat:nth-child(3) { border-left: 0; padding-left: 0; }
	.stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
	.how { grid-template-columns: 1fr; gap: 28px; }
	.layout { grid-template-columns: minmax(0, 1fr); }
	.side-box, .ad--side { display: none; }
	.ad { min-height: 300px; }
	.mcq-grid { grid-template-columns: minmax(0, 1fr); }
	.subjects { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.subjects { grid-template-columns: 1fr 1fr; gap: 10px; }
	.subject { padding: 16px; border-radius: var(--r); }
	.subject__topics { display: none; }
	.subject__name { font-size: 17px; }
	.subject__ico { width: 40px; height: 40px; margin-bottom: 6px; }
	.promo { grid-template-columns: 1fr; }
	.promo__card { min-height: 0; }
	.page-head__row { flex-direction: column; align-items: flex-start; }
	.foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
	.foot-cta .btn { width: 100%; }
	.hero__search { padding-left: 14px; }
	.hero__search .btn { padding: 0 16px; }
	.q-nav .btn { flex: 1; padding: 0 14px; }
	.q-hint { display: none; }
	.opt { font-size: 15px; gap: 12px; }
	.mcq--single .opt { font-size: 16px; min-height: 56px; }
	.score__row { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-head, .site-foot, .side, .q-nav, .mcq__foot, .related, .discuss { display: none !important; }
	.mcq__reveal { display: block !important; }
}
