/*
Theme Name: Brainify
Theme URI: https://brainify.pk/
Author: Brainify
Description: A very light, fast theme for MCQ practice sites. Built for the Brainify Quiz Master plugin: class picker on the home page, one-tap Easy / Medium / Hard start, restyled quiz screens, FAQ and breadcrumb schema. No jQuery, no web fonts, one CSS file.
Version: 1.1.2
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brainify
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--brand: #4f46e5;
	--brand-700: #4338ca;
	--brand-900: #1e1b4b;
	--brand-50: #eef2ff;
	--brand-100: #e0e7ff;
	--violet: #7c3aed;
	--accent: #f59e0b;
	--accent-50: #fffbeb;
	--easy: #059669;
	--easy-50: #ecfdf5;
	--medium: #d97706;
	--medium-50: #fffbeb;
	--hard: #e11d48;
	--hard-50: #fff1f2;
	--ink: #0f172a;
	--text: #334155;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #f8fafc;
	--surface: #ffffff;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
	--shadow: 0 10px 30px -12px rgba(30, 27, 75, .25);
	--wrap: 1160px;
	--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   3. Buttons & chips
   ========================================================================== */
.btn {
	white-space: nowrap;
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .8em 1.35em; border-radius: 999px; border: 2px solid transparent;
	font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
	transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .7); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-accent { background: var(--accent); color: var(--brand-900); }
.btn-accent:hover { background: #fbbf24; color: var(--brand-900); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand-100); }
.btn-ghost:hover { background: var(--brand-50); }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-light:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.btn-sm { padding: .55em 1em; font-size: .9rem; }

.diff { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; padding: .5em .9em; border-radius: 999px; font-weight: 700; font-size: .88rem; text-decoration: none; border: 1.5px solid; transition: all .15s ease; }
.diff-easy { color: var(--easy); background: var(--easy-50); border-color: #a7f3d0; }
.diff-medium { color: var(--medium); background: var(--medium-50); border-color: #fde68a; }
.diff-hard { color: var(--hard); background: var(--hard-50); border-color: #fecdd3; }
.diff-easy:hover { background: var(--easy); color: #fff; border-color: var(--easy); }
.diff-medium:hover { background: var(--medium); color: #fff; border-color: var(--medium); }
.diff-hard:hover { background: var(--hard); color: #fff; border-color: var(--hard); }

.pill { display: inline-block; padding: .3em .75em; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .8rem; font-weight: 700; }
.pill-soon { background: #f1f5f9; color: var(--muted); }

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); font-size: 1.1rem; }
.brand .tld { color: var(--brand); }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: .55em .85em; border-radius: 999px; color: var(--text); font-weight: 600; font-size: .97rem; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--brand-50); color: var(--brand-700); }
.header-cta { display: flex; gap: 8px; }
.primary-nav .mobile-only { display: none; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; border-radius: 10px; cursor: pointer; color: var(--ink); }
.menu-toggle:hover { background: var(--brand-50); }

@media (max-width: 900px) {
	.menu-toggle { display: inline-flex; }
	.header-cta .btn-ghost { display: none; }
	.primary-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
	.primary-nav.is-open { display: block; }
	.primary-nav .mobile-only { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
	.primary-nav ul { flex-direction: column; align-items: stretch; padding: 10px 16px 16px; }
	.primary-nav a { padding: .8em 1em; }
	.header-cta { order: 2; }
	.menu-toggle { order: 3; margin-left: 0; }
	.header-inner { gap: 10px; }
	.brand { margin-right: auto; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ==========================================================================
   5. Hero + quick start
   ========================================================================== */
.hero {
	position: relative; overflow: hidden; color: #e0e7ff;
	background:
		radial-gradient(900px 400px at 85% -10%, rgba(245, 158, 11, .28), transparent 60%),
		radial-gradient(700px 500px at -10% 120%, rgba(124, 58, 237, .55), transparent 60%),
		linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #6d28d9 100%);
	padding: 56px 0 120px;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 .hl { background: linear-gradient(90deg, #fde68a, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.15rem; max-width: 52ch; color: #e0e7ff; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; padding: 0; list-style: none; }
.stats li { display: flex; flex-direction: column; }
.stats strong { color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.stats span { font-size: .85rem; color: #c7d2fe; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: .35em .85em; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }

/* Hero visual: a stacked sample question card */
.hero-visual { position: relative; }
.mock-card { background: #fff; color: var(--text); border-radius: 20px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .55); }
.mock-card + .mock-card { position: absolute; inset: auto -14px -22px 28px; z-index: -1; opacity: .5; transform: rotate(3deg); height: 60%; }
.mock-top { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.mock-q { font-weight: 700; color: var(--ink); font-size: 1.05rem; margin-bottom: 14px; }
.mock-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 8px; font-size: .95rem; }
.mock-opt .k { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #f1f5f9; font-weight: 700; font-size: .8rem; }
.mock-opt.is-right { border-color: #6ee7b7; background: var(--easy-50); color: #065f46; }
.mock-opt.is-right .k { background: var(--easy); color: #fff; }
.mock-progress { height: 8px; border-radius: 99px; background: #f1f5f9; overflow: hidden; margin-top: 14px; }
.mock-progress i { display: block; height: 100%; width: 62%; background: linear-gradient(90deg, var(--brand), var(--violet)); }

/* Quick start panel (overlaps hero) */
.quickstart { position: relative; margin-top: -84px; z-index: 2; scroll-margin-top: 80px; }
.qs-panel { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); padding: 28px; border: 1px solid var(--line); }
.qs-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.qs-head h2 { margin: 0; font-size: 1.5rem; }
.qs-head p { margin: 0; color: var(--muted); }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 800; margin-right: 8px; vertical-align: 2px; }
.grade-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.grade-tab {
	flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 92px;
	padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff;
	font: 800 1.15rem/1.1 var(--font); color: var(--ink); cursor: pointer; transition: all .15s ease;
}
.grade-tab small { font-size: .72rem; font-weight: 600; color: var(--muted); margin-top: 3px; }
.grade-tab:hover { border-color: var(--brand-100); background: var(--brand-50); }
.grade-tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .8); }
.grade-tab[aria-selected="true"] small { color: #c7d2fe; }
.grade-panel { margin-top: 8px; }
.js .grade-panel[hidden] { display: none; }
.grade-panel h3 { font-size: 1rem; color: var(--muted); font-weight: 600; margin: 8px 0 12px; }
.subject-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.subject-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.subject-row:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.subj-icon { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1rem; color: var(--brand-700); background: var(--brand-50); }
.subj-icon[data-c="1"] { color: #0369a1; background: #e0f2fe; }
.subj-icon[data-c="2"] { color: #047857; background: #d1fae5; }
.subj-icon[data-c="3"] { color: #b45309; background: #fef3c7; }
.subj-icon[data-c="4"] { color: #be123c; background: #ffe4e6; }
.subj-icon[data-c="5"] { color: #6d28d9; background: #ede9fe; }
.subj-body { flex: 1; min-width: 0; }
.subj-name { display: block; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.3; }
.subj-meta { font-size: .82rem; color: var(--muted); }
.subj-diffs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.subj-diffs .diff { min-width: 0; padding: .38em .8em; font-size: .8rem; }
.qs-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .92rem; color: var(--muted); }
.qs-empty { padding: 20px; border-radius: 12px; background: var(--bg); color: var(--muted); }

@media (max-width: 960px) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-visual { display: none; }
	.hero { padding: 40px 0 110px; }
}
@media (max-width: 520px) {
	.brand { font-size: 1.15rem; }
	.brand img, .brand-mark { width: 34px; height: 34px; }
	.header-cta .btn { padding: .5em .85em; font-size: .85rem; }
	.qs-head .btn { display: none; }
	.subj-icon { flex-basis: 38px; height: 38px; font-size: .9rem; }
	.qs-panel { padding: 18px; border-radius: 20px; }
	.subject-list { grid-template-columns: 1fr; }
	.grade-tab { min-width: 78px; padding: 8px 12px; }
	body { font-size: 16px; }
}

/* ==========================================================================
   6. Sections
   ========================================================================== */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.kicker { display: block; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.track { position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.track:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); color: var(--text); }
.track-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); }
.track:nth-child(2) .track-ico { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.track:nth-child(3) .track-ico { background: linear-gradient(135deg, #10b981, #059669); }
.track:nth-child(4) .track-ico { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.track h3 { margin-bottom: 6px; }
.track p { font-size: .95rem; color: var(--muted); flex: 1; }
.track .more { font-weight: 700; color: var(--brand); font-size: .92rem; }
.track .pill { position: absolute; top: 18px; right: 18px; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.steps li { counter-increment: s; padding: 24px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; margin-bottom: 14px; background: var(--brand-50); color: var(--brand-700); font-weight: 800; }
.steps h3 { font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: #fff; }
.plan h3 { margin-bottom: 4px; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: 8px 0 4px; }
.plan .price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 28px; position: relative; font-size: .96rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 16px; border-radius: 50%; background: var(--easy-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23059669'%3E%3Cpath d='M8 13.2 4.8 10l-1.1 1.1L8 15.4l9-9-1.1-1.1z'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan-featured { border: 2px solid var(--brand); box-shadow: var(--shadow); position: relative; }
.plan-featured .pill { position: absolute; top: -13px; left: 28px; background: var(--brand); color: #fff; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 700; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--text); }

.cta-band { border-radius: 24px; padding: 40px; color: #fff; background: radial-gradient(600px 200px at 90% 0, rgba(245, 158, 11, .35), transparent 70%), linear-gradient(135deg, #312e81, #4f46e5); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #c7d2fe; }

/* ==========================================================================
   7. Content pages, posts, breadcrumbs
   ========================================================================== */
.page-hero { background: linear-gradient(180deg, #fff, var(--bg)); border-bottom: 1px solid var(--line); padding: 28px 0 22px; }
.page-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 6px 0 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #cbd5e1; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }
.site-main { padding: 36px 0 64px; }
.content { max-width: 780px; margin: 0 auto; }
.content-wide { max-width: var(--wrap); }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; border-radius: 12px; overflow: hidden; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--brand-50); color: var(--brand-900); }
.entry-content blockquote { margin: 1.5em 0; padding: 16px 20px; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 12px 12px 0; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.entry-meta img { width: 28px; height: 28px; border-radius: 50%; }
.author-box { display: flex; gap: 16px; margin-top: 40px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.author-box img { width: 64px; height: 64px; border-radius: 50%; }
.author-box h3 { margin: 0 0 4px; font-size: 1.05rem; }
.author-box p { margin: 0; font-size: .95rem; color: var(--muted); }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); overflow: hidden; }
.post-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card .pc-body { padding: 18px 20px 22px; }
.post-card h2 { font-size: 1.15rem; margin: 0 0 6px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--brand); }
.post-card p { font-size: .95rem; color: var(--muted); margin: 0; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font: inherit; }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer { background: var(--brand-900); color: #c7d2fe; padding: 56px 0 28px; font-size: .95rem; }
.site-footer a { color: #e0e7ff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { color: #fff; font-size: 1rem; letter-spacing: 0; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(199, 210, 254, .15); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: #a5b4fc; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Mobile bottom bar */
.bottom-bar { display: none; }
@media (max-width: 700px) {
	.bottom-bar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(15, 23, 42, .06); }
	.bottom-bar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
	.bottom-bar a svg { width: 22px; height: 22px; }
	.bottom-bar a.is-active { color: var(--brand); }
	body { padding-bottom: 68px; }
}

/* ==========================================================================
   9. Brainify Quiz Master skin (overrides plugin CSS)
   ========================================================================== */
.bqm-skin .bqm-quiz-container { max-width: none; margin: 0; padding: 0; background: transparent; box-shadow: none; font-family: var(--font); }
.bqm-skin .bqm-quiz-container h2 { text-align: left; color: var(--ink); font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 18px; }
.bqm-skin .bqm-back-link { color: var(--brand); font-weight: 600; font-size: .95rem; }
.bqm-skin .bqm-selection-grid { gap: 14px; padding: 6px 0; }
.bqm-skin .bqm-grade-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bqm-skin .bqm-subject-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.bqm-skin .bqm-card { text-align: left; border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; background: #fff; box-shadow: none; }
.bqm-skin .bqm-card:hover { transform: translateY(-3px); border-color: var(--brand-100); box-shadow: var(--shadow); }
.bqm-skin .bqm-card h3 { font-size: 1.15rem; color: var(--ink); margin-bottom: 4px; }
.bqm-skin .bqm-card-meta { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.bqm-skin .bqm-btn-link { color: var(--brand); font-weight: 700; font-size: .92rem; }

.bqm-skin .bqm-btn, .bqm-skin input[type="submit"].bqm-btn { border-radius: 999px; padding: .75em 1.4em; font: 700 .98rem/1 var(--font); border: 0; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.bqm-skin .bqm-btn:hover { transform: translateY(-1px); }
.bqm-skin .bqm-btn-primary { background: var(--brand); color: #fff; }
.bqm-skin .bqm-btn-primary:hover { background: var(--brand-700); color: #fff; }
.bqm-skin .bqm-btn-secondary { background: #fff; color: var(--brand); border: 1.5px solid var(--brand-100); }
.bqm-skin .bqm-btn-secondary:hover { background: var(--brand-50); }
.bqm-skin .bqm-btn-warning { background: var(--accent); color: var(--brand-900); }

/* Difficulty picker: big colour-coded tiles */
.bqm-skin .bqm-difficulty-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 22px; justify-content: stretch; }
.bqm-skin .bqm-difficulty-card { max-width: none; min-width: 0; margin: 0; }
.bqm-skin .bqm-difficulty-card span { --c: var(--easy); --c50: var(--easy-50); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 16px 10px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--c); font-size: 1.15rem; font-weight: 800; box-shadow: none; transition: all .15s ease; }
.bqm-skin .bqm-difficulty-card span::after { font-size: .78rem; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.3; }
.bqm-skin .bqm-difficulty-card:nth-child(1) span::after { content: "Basics & definitions"; }
.bqm-skin .bqm-difficulty-card:nth-child(2) span { --c: var(--medium); --c50: var(--medium-50); }
.bqm-skin .bqm-difficulty-card:nth-child(2) span::after { content: "Understand & apply"; }
.bqm-skin .bqm-difficulty-card:nth-child(3) span { --c: var(--hard); --c50: var(--hard-50); }
.bqm-skin .bqm-difficulty-card:nth-child(3) span::after { content: "Exam-level, tricky"; }
.bqm-skin .bqm-difficulty-card:hover span { border-color: var(--c); background: var(--c50); }
.bqm-skin .bqm-difficulty-card input[type="radio"]:checked + span { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 12px 24px -12px var(--c); }
.bqm-skin .bqm-difficulty-card input[type="radio"]:checked + span::after { color: rgba(255, 255, 255, .9); }
.bqm-skin .bqm-difficulty-card input[type="radio"]:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.bqm-skin .bqm-difficulty-form input[type="submit"] { width: 100%; max-width: 320px; padding: 1em 1.4em; font-size: 1.05rem; }
@media (max-width: 520px) { .bqm-skin .bqm-difficulty-options { gap: 8px; } .bqm-skin .bqm-difficulty-card span { min-height: 92px; font-size: 1rem; } .bqm-skin .bqm-difficulty-card span::after { font-size: .7rem; } .bqm-skin .bqm-difficulty-form input[type="submit"] { max-width: none; } }

.bqm-skin .bqm-quiz-wrapper { background: transparent; border: 0; padding: 0; border-radius: 0; }
.bqm-skin .bqm-quiz-title { border-bottom: 0; padding-bottom: 0; }
.bqm-skin .entry-content > p:empty, .bqm-skin .bqm-quiz-container > p:empty { display: none; }
.bqm-skin .bqm-info-message, .bqm-skin .bqm-message { border-radius: 14px; padding: 14px 18px; border: 1px solid var(--line); background: #fff; }
.bqm-skin .bqm-message-error { background: var(--hard-50); border-color: #fecdd3; color: #9f1239; }
.bqm-skin .bqm-message-success { background: var(--easy-50); border-color: #a7f3d0; color: #065f46; }

/* Quiz questions */
.bqm-skin .bqm-quiz-title { font-size: 1.3rem; }
.bqm-skin .bqm-question-container { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.bqm-skin .bqm-question-container h4, .bqm-skin .bqm-question-text { color: var(--ink); font-size: 1.06rem; line-height: 1.5; }
.bqm-skin .bqm-difficulty-label { border-radius: 999px; font-size: .7rem; letter-spacing: .05em; padding: .3em .7em; }
.bqm-skin .bqm-options-list { display: grid; gap: 8px; margin-top: 12px; }
.bqm-skin .bqm-option-label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .12s ease, background-color .12s ease; margin: 0; }
.bqm-skin .bqm-option-label:hover { border-color: var(--brand-100); background: var(--brand-50); }
.bqm-skin .bqm-option-label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.bqm-skin .bqm-option-label input { accent-color: var(--brand); width: 18px; height: 18px; flex: 0 0 auto; }
.bqm-skin .bqm-quiz-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; margin-top: 6px; }
.bqm-skin .bqm-quiz-navigation .bqm-btn-warning { order: 3; flex: 1 0 100%; }
@media (min-width: 701px) { .bqm-skin .bqm-quiz-navigation .bqm-btn-warning { flex: 0 0 auto; order: 0; } }
.bqm-skin .bqm-quiz-navigation .bqm-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Results */
.bqm-skin .bqm-results-summary { background: linear-gradient(135deg, #312e81, #4f46e5); color: #e0e7ff; border-radius: 20px; padding: 24px; }
.bqm-skin .bqm-results-summary h3, .bqm-skin .bqm-results-summary strong { color: #fff; }
.bqm-skin .bqm-score-grid > div { background: rgba(255, 255, 255, .1); color: #c7d2fe; }
.bqm-skin .bqm-score-grid span { color: #fff; }
.bqm-skin .bqm-score-note { color: #c7d2fe; }
.bqm-skin .bqm-result-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 10px; }
.bqm-skin .bqm-feedback-correct { color: var(--easy); font-weight: 600; }

/* Pricing + forms */
.bqm-skin .bqm-pricing-card { border-radius: 20px; border: 1px solid var(--line); box-shadow: none; }
.bqm-skin .bqm-pricing-card:hover { box-shadow: var(--shadow); }
.bqm-skin .bqm-auth-form { max-width: 520px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.bqm-skin .bqm-input, .bqm-skin .bqm-auth-form input[type="text"], .bqm-skin .bqm-auth-form input[type="email"], .bqm-skin .bqm-auth-form input[type="password"], .bqm-skin .bqm-auth-form select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); font: inherit; background: #fff; }
.bqm-skin .bqm-input:focus, .bqm-skin .bqm-auth-form input:focus, .bqm-skin .bqm-auth-form select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--brand-50); }

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

/* First heading in content never adds extra top space */
.entry-content > :first-child, .entry-content > :first-child > :first-child, .bqm-skin .entry-content h2 { margin-top: 0; }
.bqm-skin .site-main { padding-top: 28px; }

/* Ads */
.ad-slot { margin: 28px auto; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
