/*
Theme Name: MCQ Theme
Description: Motyw platformy (tryb nocny i dzienny) do nauki z testami wielokrotnego wyboru (styl LEPoLEK). Działa razem z wtyczką MCQ Platform.
Version: 0.15.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mcq-theme
*/

/* Czcionka Inter (SIL OFL 1.1, patrz assets/fonts/LICENSE.txt) hostowana lokalnie: przeglądarka nie łączy się z Google Fonts. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/inter-latin-400.woff2) format("woff2"); unicode-range: U+0000-024F,U+0259,U+2000-206F,U+20AC,U+2122,U+2190-2193,U+2212,U+2215; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/inter-latin-500.woff2) format("woff2"); unicode-range: U+0000-024F,U+0259,U+2000-206F,U+20AC,U+2122,U+2190-2193,U+2212,U+2215; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/inter-latin-600.woff2) format("woff2"); unicode-range: U+0000-024F,U+0259,U+2000-206F,U+20AC,U+2122,U+2190-2193,U+2212,U+2215; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/inter-latin-700.woff2) format("woff2"); unicode-range: U+0000-024F,U+0259,U+2000-206F,U+20AC,U+2122,U+2190-2193,U+2212,U+2215; }
@font-face { font-family: Inter; font-style: normal; font-weight: 800; font-display: swap; src: url(assets/fonts/inter-latin-800.woff2) format("woff2"); unicode-range: U+0000-024F,U+0259,U+2000-206F,U+20AC,U+2122,U+2190-2193,U+2212,U+2215; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/inter-cyrillic-400.woff2) format("woff2"); unicode-range: U+0400-04FF,U+0301,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/inter-cyrillic-500.woff2) format("woff2"); unicode-range: U+0400-04FF,U+0301,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/inter-cyrillic-600.woff2) format("woff2"); unicode-range: U+0400-04FF,U+0301,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/inter-cyrillic-700.woff2) format("woff2"); unicode-range: U+0400-04FF,U+0301,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 800; font-display: swap; src: url(assets/fonts/inter-cyrillic-800.woff2) format("woff2"); unicode-range: U+0400-04FF,U+0301,U+2116; }

:root {
	color-scheme: dark;
	--mcq-primary: #f0a500;
	--mcq-primary-dark: #d18f00;
	--mcq-on-primary: #1b1608;
	--mcq-accent: #dea511;
	--mcq-ptext: #f0a500;            /* bursztyn użyty jako kolor tekstu (czytelny na tle) */
	--mcq-text: #dddde2;
	--mcq-strong: #ffffff;
	--mcq-soft: #b6b6c3;
	--mcq-muted: #68788b;
	--mcq-bg: #202329;
	--mcq-card: #2c2f34;
	--mcq-card2: #353a41;
	--mcq-track: #434850;
	--mcq-border: #45505e;
	--mcq-primary-bg: #3a3122;
	--mcq-primary-bg2: #4a3d27;
	--mcq-link: #f7b92a;
	--mcq-hair: rgba(255, 255, 255, .07);
	--mcq-hover: rgba(255, 255, 255, .05);
	--mcq-inset: rgba(0, 0, 0, .12);
	--mcq-quote: rgba(255, 255, 255, .03);
	--mcq-footer: #1a1c20;
	--mcq-hero: linear-gradient(135deg, #2a2112, #8f5f00);
	--mcq-hero-text: #ffffff;
	--mcq-cta: #2a2112;
	--mcq-ok: #09bc55;
	--mcq-ok-bg: rgba(9, 188, 85, .14);
	--mcq-bad: #f0524f;
	--mcq-bad-bg: rgba(240, 82, 79, .14);
	--mcq-bad-text: #ffb4b2;
	--mcq-warn: #ff9a3c;
	--mcq-warn-bg: rgba(255, 154, 60, .12);
	--mcq-shadow: none;
}
/* tryb dzienny — przełącznik w pasku narzędzi ustawia html[data-theme="light"] */
html[data-theme="light"] {
	color-scheme: light;
	--mcq-ptext: #965f00;
	--mcq-text: #2b3038;
	--mcq-strong: #14171c;
	--mcq-soft: #4d5767;
	--mcq-muted: #647285;
	--mcq-bg: #f2f4f7;
	--mcq-card: #ffffff;
	--mcq-card2: #eceff3;
	--mcq-track: #dde2e8;
	--mcq-border: #d3d9e1;
	--mcq-primary-bg: #fdf1d3;
	--mcq-primary-bg2: #fbe5ae;
	--mcq-link: #965f00;
	--mcq-hair: rgba(20, 23, 28, .09);
	--mcq-hover: rgba(20, 23, 28, .05);
	--mcq-inset: rgba(20, 23, 28, .04);
	--mcq-quote: rgba(20, 23, 28, .035);
	--mcq-footer: #e5e9ee;
	--mcq-hero: linear-gradient(135deg, #ffd35c, #f0a500);
	--mcq-hero-text: #1b1608;
	--mcq-cta: linear-gradient(135deg, #ffd35c, #f0a500);
	--mcq-ok: #0b8a43;
	--mcq-ok-bg: rgba(9, 188, 85, .13);
	--mcq-bad: #d12f2c;
	--mcq-bad-bg: rgba(240, 82, 79, .11);
	--mcq-bad-text: #a8231f;
	--mcq-warn: #b45309;
	--mcq-warn-bg: rgba(255, 154, 60, .16);
	--mcq-shadow: 0 1px 2px rgba(20, 23, 28, .06), 0 2px 8px rgba(20, 23, 28, .04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	min-height: 100vh; display: flex; flex-direction: column;
	margin: 0; background: var(--mcq-bg); color: var(--mcq-text);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6; font-size: 1rem;
}
img { max-width: 100%; height: auto; }
a { color: var(--mcq-link); }
h1, h2, h3, h4 { color: var(--mcq-strong); }
h1, h2, h3 { line-height: 1.25; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.container--narrow { max-width: 760px; }
.container--wide { max-width: 1440px; padding: 0 16px; }
@media (min-width: 720px) { .container--wide { padding: 0 32px; } }
/* pasek tytułu strony (biblioteka) — jak „Materiały” w LEPoLEK */
.page-bar { border-bottom: 1px solid var(--mcq-hair); margin-bottom: 24px; }
.page-bar .container { padding-top: 16px; padding-bottom: 16px; }
.page-bar-title { margin: 0; font-size: 1.25rem; font-weight: 500; line-height: 1.75rem; }
.page-wide { padding-bottom: 40px; }

.btn { display: inline-block; background: var(--mcq-primary); color: var(--mcq-on-primary) !important; border: 2px solid var(--mcq-primary); border-radius: 10px; padding: 10px 20px; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--mcq-primary-dark); border-color: var(--mcq-primary-dark); }
.btn--ghost:hover { border-color: var(--mcq-border); }
.btn--ghost { background: transparent; color: var(--mcq-soft) !important; border-color: var(--mcq-border); }
.btn--ghost:hover { background: var(--mcq-card); }
.btn--light { background: #fff; color: #7a5200 !important; border-color: #fff; }
html[data-theme="light"] .hero .btn--light, html[data-theme="light"] .cta .btn--light { background: #1b1608; color: #fff !important; border-color: #1b1608; }
.btn--lg { padding: 14px 28px; font-size: 1.05rem; }

/* header */
.site-header { background: var(--mcq-card); border-bottom: 1px solid var(--mcq-border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; line-height: 0; color: var(--mcq-strong); text-decoration: none; padding: 12px 0; }
.brand img { display: block; height: 38px; width: auto; }
.brand-mark { display: none !important; }
.nav-toggle { background: none; color: var(--mcq-text); border: 1px solid var(--mcq-border); border-radius: 8px; padding: 6px 12px; font-size: 15px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.site-nav { display: none; width: 100%; padding: 10px 0 16px; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 0; color: var(--mcq-text); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--mcq-strong); }
.site-nav .btn { color: var(--mcq-on-primary); text-align: center; margin-top: 6px; }
.site-nav .btn--ghost { color: var(--mcq-soft); }
.nav-actions { display: grid; gap: 8px; margin-top: 8px; }

/* pasek narzędzi: sklep, czcionka %, tryb dzienny/nocny, profil */
.header-tools { order: 1; display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-toggle { order: 2; margin-left: 8px; }
.site-nav { order: 3; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 9px; background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--mcq-soft); font-size: 13px; font-weight: 600; line-height: 1; font-family: inherit; text-decoration: none; cursor: pointer; }
.tool-btn:hover, .tool-btn[aria-expanded="true"] { background: var(--mcq-card2); color: var(--mcq-strong); }
.tool-btn:focus-visible, .fs-step:focus-visible, .fs-val:focus-visible, .tool-item:focus-visible { outline: 2px solid var(--mcq-primary); outline-offset: 2px; }
.tool-btn svg, .tool-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tool-btn--font { padding: 0 8px; }
.tool-a { font-size: 18px; font-weight: 700; line-height: 1; }
.tool-pct { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tool-ico { display: inline-flex; }
.tool-ico--moon { display: none; }
html[data-theme="light"] .tool-ico--sun { display: none; }
html[data-theme="light"] .tool-ico--moon { display: inline-flex; }
.tool-pop { position: relative; }
.tool-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; max-width: calc(100vw - 24px); background: var(--mcq-card); border: 1px solid var(--mcq-border); border-radius: 12px; padding: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, .32); }
.tool-menu[hidden] { display: none; }
@media (max-width: 819px) {
	.header-inner { position: relative; }
	.tool-pop { position: static; }
	.tool-menu { right: 18px; width: min(300px, calc(100vw - 36px)); }
}
.tool-menu-title { margin: 4px 6px 10px; color: var(--mcq-muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fs-row { display: flex; align-items: center; gap: 8px; }
.fs-step, .fs-val { height: 40px; border: 1px solid var(--mcq-border); border-radius: 10px; background: var(--mcq-bg); color: var(--mcq-strong); font-family: inherit; font-weight: 700; cursor: pointer; }
.fs-step { flex: none; width: 48px; font-size: .9375rem; }
.fs-step--plus { font-size: 1.0625rem; }
.fs-step:hover:not(:disabled), .fs-val:hover { border-color: var(--mcq-primary); }
.fs-step:disabled { opacity: .4; cursor: not-allowed; }
.fs-val { flex: 1; min-width: 72px; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.tool-who { display: grid; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--mcq-hair); }
.tool-who strong { color: var(--mcq-strong); font-size: .9375rem; overflow-wrap: anywhere; }
.tool-who span { color: var(--mcq-muted); font-size: .8125rem; overflow-wrap: anywhere; }
.tool-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; color: var(--mcq-text); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.tool-item:hover { background: var(--mcq-hover); color: var(--mcq-strong); }
.tool-item svg { color: var(--mcq-soft); }
.tool-item span { flex: 1; min-width: 0; }
.tool-badge { flex: none; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--mcq-primary-bg); color: var(--mcq-ptext); font-size: .75rem; font-style: normal; font-weight: 700; text-align: center; }
.tool-sep { height: 1px; margin: 4px 6px; background: var(--mcq-hair); }
/* ikona profilu: pełna sylwetka w ramce (jak w LEPoLEK) */
.tool-btn--profile { width: 40px; margin-left: 4px; border-color: var(--mcq-muted); color: var(--mcq-strong); }
.tool-btn--profile svg { fill: currentColor; stroke: none; }
.tool-btn--profile:hover, .tool-btn--profile[aria-expanded="true"] { border-color: var(--mcq-soft); }

/* logo: w trybie dziennym wariant z ciemnym napisem */
.brand-full--light, .footer-logo--light { display: none !important; }
html[data-theme="light"] .brand-full--dark, html[data-theme="light"] .footer-logo--dark { display: none !important; }
html[data-theme="light"] .footer-logo--light { display: block !important; }
@media (min-width: 560px) { html[data-theme="light"] .brand-full--light { display: block !important; } }

@media (max-width: 559px) {
	.brand-full { display: none !important; }
	.brand-mark { display: block !important; width: 38px; }
}

@media (min-width: 820px) {
	.nav-toggle { display: none; }
	.site-nav { order: 1; margin-left: auto; display: flex !important; align-items: center; gap: 24px; width: auto; padding: 0; }
	.header-tools { order: 2; margin-left: 16px; }
	.site-nav ul { display: flex; gap: 22px; }
	.nav-actions { display: flex; margin: 0; }
	.site-nav .btn { margin: 0; padding: 8px 16px; }
}

/* hero */
.hero { background: var(--mcq-hero); color: var(--mcq-hero-text); padding: 64px 0 72px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0 0 14px; }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 0 auto 28px; opacity: .92; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn--ghost { color: var(--mcq-hero-text) !important; border-color: currentColor; }
.hero .btn--ghost:hover { background: rgba(255,255,255,.12); }
html[data-theme="light"] .hero .btn--ghost:hover { background: rgba(27,22,8,.1); }
.hero h1 { color: inherit; }

/* strona główna z filmem (zamiast pomarańczowego hero) */
.showcase { padding: 48px 0 60px; text-align: center; background: radial-gradient(ellipse 90% 70% at 50% 0, var(--mcq-primary-bg), transparent 72%); border-bottom: 1px solid var(--mcq-border); }
.showcase h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0 0 12px; color: var(--mcq-strong); }
.showcase p { font-size: 1.1rem; max-width: 640px; margin: 0 auto 26px; color: var(--mcq-soft); }
.showcase .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.showcase-video { max-width: 960px; margin: 36px auto 0; }
.showcase-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--mcq-border); box-shadow: var(--mcq-shadow); }
.showcase-frame .showcase-media { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border: 0; object-fit: contain; background: #000; }
@media (max-width: 600px) { .showcase { padding: 32px 0 40px; } .showcase-video { margin-top: 26px; } .showcase-frame { border-radius: 12px; } }

.band { background: var(--mcq-card); border-bottom: 1px solid var(--mcq-border); }
.band .container { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding-top: 22px; padding-bottom: 22px; gap: 8px; }
.band strong { display: block; font-size: 1.7rem; color: var(--mcq-strong); }
.band span { color: var(--mcq-muted); font-size: .9rem; }

.section { padding: 56px 0; }
.section h2 { text-align: center; font-size: 1.7rem; margin: 0 0 8px; }
.section .lead { text-align: center; color: var(--mcq-muted); margin: 0 auto 32px; max-width: 560px; }
.features { display: grid; gap: 16px; grid-template-columns: 1fr; }
.feature { background: var(--mcq-card); border: 1px solid var(--mcq-border); border-radius: 14px; padding: 20px; box-shadow: var(--mcq-shadow); }
.feature .icon { font-size: 1.8rem; }
.feature h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.feature p { margin: 0; color: var(--mcq-muted); }
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: 1fr; }
.step { background: var(--mcq-card); border-radius: 14px; border: 1px solid var(--mcq-border); padding: 20px 20px 20px 64px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--mcq-primary); color: var(--mcq-on-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step h3 { margin: 0 0 4px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--mcq-muted); }
.cta { background: var(--mcq-cta); color: var(--mcq-hero-text); text-align: center; padding: 56px 0; }
.cta h2 { margin: 0 0 12px; color: inherit; }
.cta p { opacity: .9; margin: 0 0 24px; }

@media (min-width: 720px) {
	.features { grid-template-columns: repeat(3, 1fr); }
	.steps { grid-template-columns: repeat(3, 1fr); }
}

/* content */
.site-main { flex: 1 0 auto; min-height: 60vh; padding: 32px 0 56px; }
.site-main.is-front { padding: 0; }
.entry-title { margin: 0 0 18px; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.entry-content > *:first-child { margin-top: 0; }
.entry-meta { color: var(--mcq-muted); font-size: .9rem; margin-bottom: 14px; }
.badges span { display: inline-block; background: var(--mcq-primary-bg); color: var(--mcq-link); font-size: .8rem; padding: 2px 10px; border-radius: 999px; margin-right: 4px; }
.post-card { background: var(--mcq-card); border: 1px solid var(--mcq-border); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.post-card h2 { margin: 0 0 6px; font-size: 1.25rem; }
.post-card h2 a { text-decoration: none; color: inherit; }

/* footer */
.site-footer { background: var(--mcq-footer); color: var(--mcq-muted); padding: 28px 0; font-size: .9rem; text-align: center; }
.site-footer a { color: var(--mcq-soft); }
.site-footer .container { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: .85rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--mcq-soft); cursor: pointer; }
.footer-links button:hover { text-decoration: underline; }
/* Baner zgody na cookies (inc/consent.php): nie zasłania strony, oba przyciski wyglądają tak samo. */
.consent { position: fixed; z-index: 2000; left: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); box-sizing: border-box; padding: 18px 18px 16px; background: var(--mcq-card); color: var(--mcq-text); border: 1px solid var(--mcq-border); border-radius: 14px; box-shadow: 0 10px 34px rgba(0, 0, 0, .35); font-size: .875rem; line-height: 1.5; }
.consent[hidden] { display: none; }
.consent-title { margin: 0 0 6px; font-size: 1rem; line-height: 1.3; color: var(--mcq-strong); }
.consent-text { margin: 0 0 14px; }
.consent-text a { color: var(--mcq-link); white-space: nowrap; }
.consent-actions { display: flex; gap: 10px; }
.consent-btn { flex: 1 1 0; min-height: 44px; padding: 0 14px; background: transparent; color: var(--mcq-strong); border: 1px solid var(--mcq-ptext); border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.consent-btn:hover { background: var(--mcq-primary-bg); }
@media (max-width: 560px) { .consent { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 16px 14px 14px; } }
@media print { .consent { display: none; } }
.footer-brand { display: inline-flex; line-height: 0; opacity: .9; }
.footer-brand:hover { opacity: 1; }
.footer-brand img { display: block; height: 28px; width: auto; }

/* ---------- strona materiału (jak „Artykuł” w LEPoLEK) ---------- */
.single-mcq_resource .site-main { padding-top: 0; }
.art-bar { margin-bottom: 20px; }
.art-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.art-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; }
.art-chip { display: inline-block; max-width: 320px; height: 32px; line-height: 2rem; padding: 0 14px; border-radius: 16px; background: var(--mcq-primary-bg); color: var(--mcq-link); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-chip:hover { background: var(--mcq-primary-bg2); }
.art-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; background: var(--mcq-card); color: var(--mcq-strong); border: 1px solid var(--mcq-muted); border-radius: 8px; font-size: .875rem; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer; }
.art-btn:hover { background: var(--mcq-card2); border-color: var(--mcq-soft); }
.art-btn--primary { background: var(--mcq-primary); border-color: var(--mcq-primary); color: var(--mcq-on-primary); }
.art-btn--primary:hover { background: var(--mcq-primary-dark); border-color: var(--mcq-primary-dark); color: var(--mcq-on-primary); }
.art-page { padding-bottom: 48px; }

.art-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 0 0 20px; }
.art-nav-a { min-width: 0; max-width: 100%; }
.art-nav-a--prev { justify-self: start; }
.art-nav-a--next { justify-self: end; }
.art-nav-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-nav-ar { flex: none; font-size: 1.375rem; line-height: 1; color: var(--mcq-soft); }
.art-nav-pos { color: var(--mcq-muted); font-size: .8125rem; font-weight: 500; }
.art-nav--end { margin: 8px 0 0; grid-template-columns: 1fr 1fr; }

.art-title { margin: 0 0 28px; padding-left: 16px; border-left: 3px solid var(--mcq-primary); min-height: 32px; font-size: 1.75rem; font-weight: 700; line-height: 2rem; overflow-wrap: anywhere; }

.art-grid { display: block; }
.art-sections { max-width: 960px; }
.art-sec { background: var(--mcq-card); box-shadow: var(--mcq-shadow); border-radius: 12px; padding: 24px; margin: 0 0 16px; scroll-margin-top: 84px; }
.art-sec-title { position: relative; margin: 0 0 18px; padding: 0 0 14px 16px; border-bottom: 1px solid var(--mcq-hair); font-size: 1.125rem; font-weight: 500; line-height: 1.5rem; }
.art-sec-title::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 24px; border-radius: 2px; background: var(--mcq-primary); }
.art-sec-body { font-size: .875rem; line-height: 1.625; color: var(--mcq-text); overflow-wrap: anywhere; }
.art-sec-body > *:first-child { margin-top: 0; }
.art-sec-body > *:last-child { margin-bottom: 0; }
.art-sec-body p, .art-sec-body ul, .art-sec-body ol, .art-sec-body blockquote, .art-sec-body figure { margin: 0 0 12px; }
.art-sec-body ul, .art-sec-body ol { padding-left: 22px; }
.art-sec-body li { margin: 2px 0; }
.art-sec-body h3 { margin: 22px 0 8px; font-size: 1rem; font-weight: 500; line-height: 1.5rem; scroll-margin-top: 84px; }
.art-sec-body h4 { margin: 16px 0 6px; font-size: .875rem; font-weight: 600; }
.art-sec-body a { color: var(--mcq-link); }
.art-sec-body img { display: block; max-width: 100%; height: auto; margin: 12px auto; border-radius: 6px; }
.art-sec-body figcaption { margin-top: 4px; color: var(--mcq-muted); font-size: .75rem; text-align: center; }
.art-sec-body blockquote { padding: 8px 16px; border-left: 3px solid var(--mcq-border); background: var(--mcq-quote); color: var(--mcq-soft); }
.art-sec-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 12px; }
.art-sec-body th, .art-sec-body td { padding: 6px 10px; border: 1px solid var(--mcq-border); text-align: left; vertical-align: top; }
.art-sec-body th { background: var(--mcq-hover); color: var(--mcq-strong); font-weight: 600; }
.art-sec-body iframe, .art-sec-body video { max-width: 100%; }
.art-empty { color: var(--mcq-muted); }

/* spis sekcji */
.art-toc { margin: 0 0 16px; background: var(--mcq-card); border-radius: 12px; }
.art-toc-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; padding: 12px 16px; background: none; border: 0; color: var(--mcq-strong); font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.25rem; text-align: left; cursor: pointer; }
.art-toc-caret { width: 8px; height: 8px; border: solid var(--mcq-soft); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.art-toc.is-open .art-toc-caret { transform: rotate(-135deg); }
.art-toc-body { position: relative; padding: 8px; }
.art-toc-list, .art-toc-sub { list-style: none; margin: 0; padding: 0; }
.art-toc-sub { margin-left: 14px; }
.art-toc-a { position: relative; display: block; padding: 7px 12px; border-radius: 8px; color: var(--mcq-text); font-size: .875rem; font-weight: 600; line-height: 1.25rem; text-decoration: none; overflow-wrap: anywhere; }
.art-toc-a--sub { font-size: .8125rem; font-weight: 500; color: var(--mcq-soft); }
.art-toc-a:hover { background: var(--mcq-hover); color: var(--mcq-strong); }
.art-toc-a.is-active { background: var(--mcq-primary-bg); color: var(--mcq-strong); }
.art-toc-a.is-active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--mcq-primary); }
.art-toc--js .art-toc-toggle { display: flex; }
.art-toc--js:not(.is-open) .art-toc-body { display: none; }

@media (min-width: 900px) {
	.art-grid.has-toc { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 32px; align-items: start; }
	.art-toc { position: sticky; top: 84px; margin: 0; }
	.art-toc-body { max-height: calc(100vh - 108px); overflow-y: auto; overscroll-behavior: contain; }
	.art-toc--js .art-toc-toggle { display: none; }
	.art-toc--js:not(.is-open) .art-toc-body { display: block; }
}
@media (max-width: 599px) {
	.art-title { font-size: 1.375rem; line-height: 1.75rem; margin-bottom: 20px; }
	.art-sec { padding: 18px 16px; }
	.art-nav { grid-template-columns: 1fr 1fr; }
	.art-nav-pos { display: none; }
	.art-controls { width: 100%; }
	.art-chip { max-width: 100%; }
}

/* ---------- kraje: flagi, „Obsługiwane kraje”, strona kraju, przełącznik w nagłówku ---------- */
.mcq-flag { display: inline-block; width: 1.65em; height: 1.1em; border-radius: 3px; overflow: hidden; vertical-align: -.2em; box-shadow: 0 0 0 1px rgba(128, 128, 128, .35); flex: none; line-height: 0; }
.mcq-flag svg { display: block; width: 100%; height: 100%; }
.mcq-flag--lg { width: 66px; height: 44px; border-radius: 7px; }

.showcase .actions--countries, .hero .actions--countries { display: block; }
.countries-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; }
.countries-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: inherit; line-height: 1.2; }
.countries-chevron { width: 18px; height: 18px; flex: none; transition: transform .2s ease; }
.countries-toggle[aria-expanded="true"] .countries-chevron { transform: rotate(180deg); }
.countries { width: 100%; max-width: 940px; animation: countries-in .28s ease-out; }
.countries[hidden] { display: none; }
@keyframes countries-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .countries { animation: none; } .country-card, .countries-chevron { transition: none; } }
.countries-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.countries-list li { flex: 0 1 164px; min-width: 0; }
.country-card { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 20px 10px 16px; background: var(--mcq-card); border: 1px solid var(--mcq-border); border-radius: 14px; color: var(--mcq-text) !important; text-align: center; text-decoration: none; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.country-card:hover, .country-card:focus-visible { transform: translateY(-3px); border-color: var(--mcq-primary); background: var(--mcq-card2); }
.country-card:focus-visible { outline: 2px solid var(--mcq-primary); outline-offset: 2px; }
.country-card .mcq-flag { margin-bottom: 6px; }
.country-name { color: var(--mcq-strong); font-size: 1.08rem; font-weight: 700; line-height: 1.25; }
.country-exam { color: var(--mcq-ptext); font-size: .85rem; font-weight: 700; letter-spacing: .04em; }
.country-count { color: var(--mcq-muted); font-size: .8rem; }
.country-count.is-soon { font-style: italic; }
@media (max-width: 560px) { .countries-list { gap: 10px; } .countries-list li { flex: 0 1 calc(50% - 5px); } .country-card { padding: 16px 8px 14px; } .mcq-flag--lg { width: 58px; height: 39px; } }

.country-top { margin: 0 0 10px !important; max-width: none !important; font-size: .95rem !important; }
.country-back { color: var(--mcq-soft); text-decoration: none; }
.country-back:hover { color: var(--mcq-ptext); }
.country-badge { margin: 0 0 14px !important; max-width: none !important; }
.country-soon { margin: 18px auto 0 !important; font-size: .95rem !important; color: var(--mcq-muted) !important; }
.country-soon a { color: var(--mcq-ptext); }

.mcqp-country-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 8px; border: 1px solid var(--mcq-border); border-radius: 999px; background: var(--mcq-card); color: var(--mcq-text); font-size: .88rem; line-height: 1.5; vertical-align: middle; }
.mcqp-country-chip strong { color: var(--mcq-strong); font-weight: 700; }
.mcqp-country-chip em { font-style: normal; color: var(--mcq-ptext); font-weight: 600; }
.country-chip-row { margin: 0 0 12px; }
.page-bar .container { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-bar .country-chip-row { margin: 0; }

.tool-btn--country { padding: 0 10px; gap: 7px; }
.tool-btn--country .mcq-flag { font-size: .875rem; }
.tool-code { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.tool-menu--country { min-width: 240px; }
.tool-item .mcq-flag { font-size: 15px; }
.tool-exam { flex: none; color: var(--mcq-ptext); font-size: .78rem; font-style: normal; font-weight: 700; }
.tool-item.is-current { background: var(--mcq-primary-bg); color: var(--mcq-strong); }
.mcq-flag svg { fill: none; stroke: none; }
.tool-item .mcq-flag, .tool-btn .mcq-flag { flex: none; min-width: 0; }

/* Tryb aplikacji (Android): bez Sklepu — patrz inc/app-mode.php */
html.mcq-app-noshop .tool-btn--shop,
html.mcq-app-noshop .mcq-shop-item { display: none !important; }
/* …i bez przełącznika kraju: aplikacja dotyczy jednego kraju */
html.mcq-app-lock .tool-pop--country { display: none !important; }
