/* ==========================================================================
   TestPrep 2026 – theme.css
   Mobile-first. One file, no build step. Tokens on :root, dark mode automatic.
   ========================================================================== */

/* Pastel palette: soft periwinkle primary, mint / peach / lemon / lilac tints, charcoal text. */
:root {
	--tp-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--tp-bg: #f7f7fc;
	--tp-surface: #ffffff;
	--tp-surface-2: #eef0f8;
	--tp-text: #2c3040;
	--tp-muted: #6d7386;
	--tp-line: #e4e6f0;
	--tp-primary: #5b6ee1;
	--tp-primary-dark: #4557c4;
	--tp-primary-soft: #e6e9fb;
	--tp-accent: #ffb473;
	--tp-accent-dark: #e0904a;
	--tp-ok: #2f9e6b;
	--tp-ok-soft: #e1f5ea;
	--tp-bad: #e26d6d;
	--tp-bad-soft: #fde9e9;
	--tp-tint-1: #e6e9fb; /* periwinkle */
	--tp-tint-2: #dff4ea; /* mint */
	--tp-tint-3: #ffe9d6; /* peach */
	--tp-tint-4: #fff5cc; /* lemon */
	--tp-tint-5: #f1e4fa; /* lilac */
	--tp-tint-6: #dcf1fa; /* sky */
	--tp-hero-a: #e6e9fb;
	--tp-hero-b: #dff4ea;
	--tp-radius: 16px;
	--tp-shadow: 0 1px 2px rgba(44, 48, 64, .05), 0 6px 20px rgba(44, 48, 64, .06);
	--tp-max: 1180px;
	--tp-gutter: clamp(16px, 4vw, 32px);
}
@media (prefers-color-scheme: dark) {
	:root {
		--tp-bg: #14161f; --tp-surface: #1c1f2b; --tp-surface-2: #252938; --tp-text: #e9eaf2; --tp-muted: #a0a6ba; --tp-line: #2f3345;
		--tp-primary: #8b9af0; --tp-primary-dark: #6b7be0; --tp-primary-soft: #2a2f4d;
		--tp-accent: #f2b27a; --tp-accent-dark: #d8955a;
		--tp-ok: #5fcf97; --tp-ok-soft: #1c3a2c; --tp-bad: #f08a8a; --tp-bad-soft: #43242a;
		--tp-tint-1: #2a2f4d; --tp-tint-2: #1c3a2c; --tp-tint-3: #40302a; --tp-tint-4: #3d3a25; --tp-tint-5: #352a45; --tp-tint-6: #22343f;
		--tp-hero-a: #262a44; --tp-hero-b: #1e3a30;
		--tp-shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--tp-font); color: var(--tp-text); background: var(--tp-bg); }
img { max-width: 100%; height: auto; }
a { color: var(--tp-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 2.6vw + .8rem, 2.25rem); }
h2 { font-size: clamp(1.25rem, 1.4vw + .8rem, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: var(--tp-surface); padding: 8px 12px; width: auto; height: auto; clip: auto; }
.tp-container { max-width: var(--tp-max); margin: 0 auto; padding-inline: var(--tp-gutter); }
.tp-center { text-align: center; }
.tp-meta { color: var(--tp-muted); font-size: .9rem; }
.tp-link { background: none; border: 0; padding: 0; color: var(--tp-primary); font-weight: 600; }
.tp-link:hover { text-decoration: underline; }

/* ---------- Buttons (chunky, Duolingo-style bottom edge) ---------- */
.tp-btn { display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.25em; border-radius: 12px; border: 2px solid transparent; font-weight: 800; text-decoration: none !important; line-height: 1.2; transition: transform .05s ease, box-shadow .1s ease, background .15s; user-select: none; }
.tp-btn--primary { background: var(--tp-primary); color: #fff !important; box-shadow: 0 4px 0 var(--tp-primary-dark); }
.tp-btn--primary:hover { filter: brightness(1.05); }
.tp-btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tp-primary-dark); }
.tp-btn--ghost { background: var(--tp-surface); color: var(--tp-text); border-color: var(--tp-line); box-shadow: 0 3px 0 var(--tp-line); }
.tp-btn--ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tp-line); }
.tp-btn--ok { background: var(--tp-ok); color: #fff !important; box-shadow: 0 4px 0 #23805a; }
.tp-btn--sm { padding: .45em .85em; font-size: .9rem; border-radius: 10px; }
.tp-btn--lg { padding: .9em 1.6em; font-size: 1.05rem; }
.tp-btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Header ---------- */
.tp-header { position: sticky; top: 0; z-index: 50; background: var(--tp-surface); border-bottom: 1px solid var(--tp-line); }
.tp-header__inner { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.tp-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.05rem; color: var(--tp-text); white-space: nowrap; margin-right: auto; min-width: 0; }
.tp-logo:hover { text-decoration: none; }
.tp-logo img { max-height: 40px; width: auto; display: block; }
.tp-logo__mark { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--tp-primary); color: #fff; }
.tp-logo__text { overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.tp-nav { display: none; }
.tp-header__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tp-login-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 10px; font-weight: 700; color: var(--tp-text); }
.tp-login-link:hover { background: var(--tp-surface-2); text-decoration: none; }
.tp-login-link svg { flex: 0 0 22px; }
.tp-practice-link { display: none; }
.tp-mobile__cta { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 4px 0 12px; }
.tp-mobile__cta .tp-btn { justify-content: center; }
@media (max-width: 959px) { .tp-login-link span { display: none; } .tp-login-link { width: 40px; padding: 0; justify-content: center; } }
@media (min-width: 960px) { .tp-practice-link { display: inline-flex; } .tp-logo__text { max-width: 220px; } .tp-mobile__cta { display: none; } }
.tp-burger { width: 42px; height: 42px; border: 0; background: transparent; position: relative; border-radius: 10px; }
.tp-burger span, .tp-burger span::before, .tp-burger span::after { content: ""; display: block; width: 22px; height: 2.5px; background: var(--tp-text); border-radius: 2px; position: absolute; left: 10px; top: 20px; transition: .2s; }
.tp-burger span::before { top: -7px; left: 0; } .tp-burger span::after { top: 7px; left: 0; }
.tp-burger[aria-expanded="true"] span { background: transparent; }
.tp-burger[aria-expanded="true"] span::before { transform: rotate(45deg); top: 0; }
.tp-burger[aria-expanded="true"] span::after { transform: rotate(-45deg); top: 0; }

/* Mobile drawer */
.tp-mobile { border-top: 1px solid var(--tp-line); background: var(--tp-surface); max-height: calc(100vh - 62px); overflow: auto; padding: 12px var(--tp-gutter) 20px; }
.tp-search--mobile { margin-bottom: 8px; }
.tp-mobile ul { list-style: none; margin: 0; padding: 0; }
.tp-mobile__list > li { border-bottom: 1px solid var(--tp-line); }
.tp-mobile__list > li > a, .tp-mobile summary { display: block; padding: 12px 4px; font-weight: 700; color: var(--tp-text); cursor: pointer; list-style: none; }
.tp-mobile summary::-webkit-details-marker { display: none; }
.tp-mobile summary::after { content: "＋"; float: right; color: var(--tp-muted); }
.tp-mobile details[open] summary::after { content: "－"; }
.tp-mobile details ul { padding: 0 0 8px 12px; }
.tp-mobile details li a { display: block; padding: 7px 4px; color: var(--tp-text); font-weight: 500; }
.tp-mobile__group { padding: 10px 4px 2px 12px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-muted); font-weight: 700; }

/* Desktop nav with panels */
@media (min-width: 960px) {
	.tp-nav { display: block; }
	.tp-search--header { display: flex; width: clamp(200px, 24vw, 340px); }
	.tp-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
	.tp-nav__list > li { position: relative; }
	.tp-nav__top { display: block; padding: 9px 12px; border-radius: 10px; font-weight: 700; color: var(--tp-text); white-space: nowrap; }
	.tp-nav__list > li.has-panel > .tp-nav__top::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: 8px; opacity: .6; }
	.tp-nav__top:hover, .tp-nav__list > li:focus-within > .tp-nav__top, .tp-nav__top[aria-current="page"] { background: var(--tp-primary-soft); color: var(--tp-primary-dark); text-decoration: none; }
	.tp-panel { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: 14px; box-shadow: var(--tp-shadow); padding: 10px; min-width: 240px; }
	.tp-panel::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; } /* hover bridge */
	.tp-nav__list > li:hover > .tp-panel, .tp-nav__list > li:focus-within > .tp-panel { display: block; }
	.tp-panel--groups { display: none; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 18px; width: max-content; max-width: min(860px, calc(100vw - 32px)); padding: 16px 18px; }
	.tp-nav__list > li:hover > .tp-panel--groups, .tp-nav__list > li:focus-within > .tp-panel--groups { display: grid; }
	.tp-nav__list > li:nth-last-child(-n+2) > .tp-panel { left: auto; right: 0; }
	.tp-panel ul { list-style: none; margin: 0; padding: 0; }
	.tp-panel li a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--tp-text); font-weight: 500; font-size: .93rem; white-space: nowrap; }
	.tp-panel li a:hover { background: var(--tp-primary-soft); color: var(--tp-primary-dark); text-decoration: none; }
	.tp-panel__title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-muted); font-weight: 700; padding: 4px 10px 6px; }
	.tp-panel__list { columns: 1; }
	.tp-burger, .tp-mobile { display: none !important; }
}
@media (min-width: 1200px) { .tp-nav__top { padding-inline: 14px; } .tp-search--header { width: 340px; } }

/* ---------- Search ---------- */
.tp-search { position: relative; display: flex; gap: 6px; }
.tp-search input { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid var(--tp-line); border-radius: 12px; background: var(--tp-bg); color: var(--tp-text); }
.tp-search input:focus { outline: none; border-color: var(--tp-primary); background: var(--tp-surface); }
.tp-search--header { display: none; }
.tp-search--header input { padding: 9px 40px 9px 14px; border-radius: 999px; }
.tp-search--header button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--tp-muted); padding: 6px; display: grid; place-items: center; }
.tp-search--big input { padding: 14px 18px; font-size: 1.05rem; }
.tp-search__results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: 12px; box-shadow: var(--tp-shadow); z-index: 70; max-height: 60vh; overflow: auto; text-align: left; }
.tp-search__results a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--tp-line); color: var(--tp-text); }
.tp-search__results a:hover { background: var(--tp-surface-2); text-decoration: none; }
.tp-search__results a small { display: block; color: var(--tp-muted); }
.tp-search__results a b { color: var(--tp-ok); }
.tp-search__results .tp-search__more { text-align: center; color: var(--tp-primary); font-weight: 700; }

/* ---------- Hero ---------- */
.tp-hero { background: linear-gradient(120deg, var(--tp-hero-a) 0%, var(--tp-hero-b) 100%); color: var(--tp-text); padding-block: clamp(32px, 6vw, 72px); border-bottom: 1px solid var(--tp-line); }
.tp-hero__inner { display: grid; gap: 28px; align-items: center; }
.tp-hero h1 { font-size: clamp(1.9rem, 4vw + .5rem, 3.1rem); margin-bottom: .3em; }
.tp-hero p { font-size: 1.1rem; color: var(--tp-muted); max-width: 52ch; }
.tp-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.tp-hero__stats { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; font-size: .95rem; color: var(--tp-muted); }
.tp-hero__stats b { font-size: 1.15rem; color: var(--tp-text); }
.tp-hero__search { background: var(--tp-surface); color: var(--tp-text); padding: 20px; border-radius: 18px; box-shadow: var(--tp-shadow); border: 1px solid var(--tp-line); }
.tp-hero__hint { margin: 10px 0 0; color: var(--tp-muted); font-size: .9rem; }
@media (min-width: 900px) { .tp-hero__inner { grid-template-columns: 1.1fr .9fr; } }

/* ---------- Sections / grids / cards ---------- */
.tp-section { padding-block: clamp(28px, 5vw, 56px); }
.tp-section--alt { background: var(--tp-surface); border-block: 1px solid var(--tp-line); }
.tp-section--inner { margin-top: 32px; }
.tp-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tp-section__head h2 { margin: 0; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tp-grid--3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tp-two { display: grid; gap: 32px; }
@media (min-width: 820px) { .tp-two { grid-template-columns: 1fr 1fr; } .tp-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } }
.tp-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); box-shadow: var(--tp-shadow); color: var(--tp-text); transition: transform .08s, border-color .15s; }
.tp-card--link:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--tp-primary); }
.tp-card--accent { background: var(--tp-tint-3); border-color: transparent; }
.tp-card__icon { font-size: 1.5rem; line-height: 1; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--tp-tint-1); margin-bottom: 4px; }
.tp-grid > :nth-child(6n+2) .tp-card__icon { background: var(--tp-tint-2); }
.tp-grid > :nth-child(6n+3) .tp-card__icon { background: var(--tp-tint-3); }
.tp-grid > :nth-child(6n+4) .tp-card__icon { background: var(--tp-tint-4); }
.tp-grid > :nth-child(6n+5) .tp-card__icon { background: var(--tp-tint-5); }
.tp-grid > :nth-child(6n+6) .tp-card__icon { background: var(--tp-tint-6); }
.tp-card__title { font-weight: 800; line-height: 1.3; }
.tp-card__meta { color: var(--tp-muted); font-size: .85rem; }
.tp-card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; margin-bottom: 6px; }
.tp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--tp-primary-soft); color: var(--tp-primary-dark); font-size: .82rem; font-weight: 700; }
.tp-chip small { opacity: .7; font-weight: 500; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.tp-chips .tp-chip:hover { text-decoration: none; background: var(--tp-primary); color: #fff; }
.tp-streak-card { margin-top: 12px; display: inline-block; padding: 8px 14px; border-radius: 10px; background: var(--tp-tint-4); font-weight: 700; }
.tp-quiz__score { color: var(--tp-accent-dark); }
.tp-leaderboard { list-style: none; margin: 0; padding: 0; counter-reset: lb; }
.tp-leaderboard li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--tp-line); counter-increment: lb; }
.tp-leaderboard li::before { content: counter(lb); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--tp-surface-2); font-weight: 800; font-size: .85rem; }
.tp-leaderboard li span { flex: 1; }
.tp-leaderboard li em { font-style: normal; color: var(--tp-muted); }

/* ---------- Content + sidebar layout ---------- */
.tp-single { display: grid; gap: 32px; padding-block: 20px 48px; }
.tp-content { min-width: 0; }
.tp-sidebar { display: none; }
@media (min-width: 1024px) {
	.tp-single:not(.tp-single--wide) { grid-template-columns: minmax(0, 1fr) 300px; }
	.tp-sidebar { display: block; }
	.tp-sidebar__sticky { position: sticky; top: 76px; }
}
.widget { background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 16px 18px; margin-bottom: 16px; }
.widget-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tp-muted); margin-bottom: 8px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li a { display: block; padding: 5px 0; color: var(--tp-text); }
.tp-crumbs ol, .rank-math-breadcrumb p { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; padding: 0; font-size: .85rem; color: var(--tp-muted); }
.tp-crumbs li + li::before { content: "›"; margin-right: 4px; }
.rank-math-breadcrumb .separator { margin: 0 4px; }
.tp-archive__head { margin-bottom: 16px; }
.tp-archive__head h1 small { font-weight: 500; color: var(--tp-muted); font-size: .6em; }
.tp-archive__desc { color: var(--tp-muted); cursor: pointer; }
.tp-archive__desc[data-clamp]:not(.is-open)::after { content: "… more"; color: var(--tp-primary); font-weight: 700; }
.tp-archive__desc[data-clamp]:not(.is-open) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-archive__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.tp-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--tp-muted); cursor: pointer; }
.tp-archive__bottom { margin-top: 32px; }

/* ---------- MCQ page ---------- */
.tp-mcq-page__head { margin-bottom: 18px; }
.tp-question { font-size: clamp(1.25rem, 1.6vw + .8rem, 1.75rem); margin-top: 10px; }
.tp-options { display: grid; gap: 10px; }
.tp-option { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; background: var(--tp-surface); border: 2px solid var(--tp-line); border-radius: 12px; box-shadow: 0 3px 0 var(--tp-line); color: var(--tp-text); transition: .12s; }
.tp-option:hover { border-color: var(--tp-primary); background: var(--tp-primary-soft); }
.tp-option:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tp-line); }
.tp-option__label { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--tp-tint-1); color: var(--tp-primary-dark); font-weight: 800; font-size: .85rem; }
.tp-option__text { flex: 1; }
.tp-option.is-correct { background: var(--tp-ok-soft); border-color: var(--tp-ok); box-shadow: 0 3px 0 var(--tp-ok); }
.tp-option.is-correct .tp-option__label { background: var(--tp-ok); color: #fff; }
.tp-option.is-wrong { background: var(--tp-bad-soft); border-color: var(--tp-bad); box-shadow: 0 3px 0 var(--tp-bad); animation: tp-shake .3s; }
.tp-option.is-wrong .tp-option__label { background: var(--tp-bad); color: #fff; }
.tp-options.is-done .tp-option { pointer-events: none; }
.tp-options.is-done .tp-option:not(.is-correct):not(.is-wrong) { opacity: .55; }
.tp-options--compact { gap: 6px; }
.tp-options--compact .tp-option { padding: 8px 10px; box-shadow: none; }
.tp-hint { color: var(--tp-muted); font-size: .85rem; margin: 8px 0 0; }
.tp-answer { margin-top: 16px; }
.tp-answer__body { margin-top: 12px; padding: 14px 16px; border-left: 4px solid var(--tp-ok); background: var(--tp-ok-soft); border-radius: 0 12px 12px 0; }
.tp-answer__correct { margin: 0; font-size: 1.05rem; }
.tp-answer__explanation { margin-top: 8px; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.tp-prevnext { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0; }
.tp-prevnext__a { flex: 1; padding: 10px 12px; border: 1px solid var(--tp-line); border-radius: 12px; background: var(--tp-surface); color: var(--tp-text); font-size: .9rem; }
.tp-prevnext__a--next { text-align: right; }
.tp-prevnext__a span { color: var(--tp-muted); }
.tp-cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; background: var(--tp-tint-2); border-radius: var(--tp-radius); margin: 22px 0; }
.tp-cta-card p { margin: 0; color: var(--tp-muted); }
.tp-related { margin-top: 36px; }
.tp-list { display: grid; gap: 14px; }
.tp-mcq-card { background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 16px 18px; }
.tp-mcq-card__q { font-size: 1.05rem; margin-bottom: 12px; }
.tp-mcq-card__q a { color: var(--tp-text); }
.tp-mcq-card__n { color: var(--tp-muted); font-weight: 600; }
.tp-mcq-card__foot { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: .9rem; }
.tp-mcq-card .tp-answer__body { margin-top: 10px; padding: 10px 14px; }
.tp-post-card { display: grid; grid-template-columns: 1fr; gap: 12px; background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 16px; }
.tp-post-card__img img { border-radius: 10px; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
@media (min-width: 640px) { .tp-post-card { grid-template-columns: 200px 1fr; } }
.tp-author { display: flex; gap: 14px; align-items: center; margin-top: 28px; padding: 16px; background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.tp-author img { border-radius: 50%; }
.tp-author__name { font-weight: 800; }
.tp-author__bio { margin: 2px 0 0; color: var(--tp-muted); font-size: .9rem; }
.tp-article__head { margin-bottom: 16px; }
.tp-article__img { border-radius: var(--tp-radius); margin-bottom: 18px; width: 100%; }
.tp-prose { max-width: 72ch; }
.tp-prose--narrow { margin-inline: auto; }
.tp-prose img { border-radius: 10px; }
.tp-prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.tp-prose th, .tp-prose td { border: 1px solid var(--tp-line); padding: 8px 10px; }
.tp-prose blockquote { border-left: 4px solid var(--tp-primary); margin: 0; padding: 4px 16px; color: var(--tp-muted); }
.tp-empty { padding: 24px 0; }
.tp-jump { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .9rem; }
.tp-jump input { width: 80px; padding: 6px 8px; border: 2px solid var(--tp-line); border-radius: 8px; background: var(--tp-surface); color: var(--tp-text); }

/* Pagination */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--tp-surface); border: 2px solid var(--tp-line); color: var(--tp-text); font-weight: 700; }
.pagination .page-numbers.current { background: var(--tp-primary); border-color: var(--tp-primary); color: #fff; }
.pagination .page-numbers.dots { border: 0; background: none; }

/* Comments */
.tp-comments { margin-top: 36px; }
.tp-comments__list, .tp-comments__list ol { list-style: none; padding: 0; margin: 0; }
.tp-comments .comment { padding: 14px 0; border-bottom: 1px solid var(--tp-line); }
.tp-comments .comment .children { padding-left: 24px; }
.tp-comments .comment-meta { font-size: .85rem; color: var(--tp-muted); }
.tp-comments .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comment-form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.comment-form input:not([type=checkbox]):not([type=submit]), .comment-form textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--tp-line); border-radius: 10px; background: var(--tp-surface); color: var(--tp-text); }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }

/* ---------- Ads ---------- */
.tp-ad { position: relative; margin: 20px 0; min-height: 120px; border-radius: 10px; background: var(--tp-surface-2); overflow: hidden; }
.tp-ad__tag { position: absolute; top: 4px; left: 8px; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-muted); }
.tp-ad--answer { min-height: 100px; }
.tp-ad--sidebar { min-height: 250px; margin: 0; }
.tp-ad--infeed { min-height: 100px; }
.tp-ad--result { min-height: 100px; }
body.tp-focus .tp-ad:not(.tp-ad--result), body.tp-focus .tp-sidebar { display: none; }
@media (max-width: 1023px) { .tp-ad--sidebar { display: none; } }

/* ---------- Practice quiz ---------- */
.tp-practice { padding-block: 24px 60px; max-width: 760px; }
.tp-quiz { background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: 20px; padding: clamp(16px, 3vw, 28px); box-shadow: var(--tp-shadow); }
.tp-quiz__loading { text-align: center; color: var(--tp-muted); padding: 40px 0; }
.tp-quiz__top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.tp-quiz__close { border: 0; background: transparent; font-size: 1.4rem; color: var(--tp-muted); padding: 4px; }
.tp-progress { flex: 1; height: 14px; background: var(--tp-surface-2); border-radius: 999px; overflow: hidden; }
.tp-progress > span { display: block; height: 100%; width: 0; background: var(--tp-ok); border-radius: 999px; transition: width .3s ease; }
.tp-quiz__score { font-weight: 800; color: var(--tp-accent-dark); white-space: nowrap; }
.tp-quiz__cat { color: var(--tp-muted); font-size: .85rem; margin-bottom: 6px; }
.tp-quiz__q { font-size: clamp(1.2rem, 1.5vw + .8rem, 1.6rem); margin-bottom: 18px; }
.tp-quiz__feedback { margin-top: 18px; padding: 14px 16px; border-radius: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tp-quiz__feedback.ok { background: var(--tp-ok-soft); color: var(--tp-ok); }
.tp-quiz__feedback.bad { background: var(--tp-bad-soft); color: var(--tp-bad); }
.tp-quiz__feedback p { margin: 0; font-weight: 800; flex: 1 1 200px; }
.tp-quiz__feedback small { display: block; font-weight: 500; color: var(--tp-text); margin-top: 4px; }
.tp-quiz__result { text-align: center; }
.tp-quiz__big { font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 900; line-height: 1; margin: 12px 0; }
.tp-quiz__stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.tp-quiz__stats div { padding: 10px 16px; border-radius: 12px; background: var(--tp-surface-2); min-width: 90px; }
.tp-quiz__stats b { display: block; font-size: 1.3rem; }
.tp-quiz__stats span { font-size: .8rem; color: var(--tp-muted); text-transform: uppercase; letter-spacing: .05em; }
.tp-quiz__review { text-align: left; margin-top: 24px; }
.tp-quiz__review li { padding: 8px 0; border-bottom: 1px solid var(--tp-line); }
.tp-quiz__review li.ok::before { content: "✅ "; } .tp-quiz__review li.bad::before { content: "❌ "; }
.tp-quiz__review small { color: var(--tp-muted); display: block; }
.tp-quiz__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* ---------- Footer ---------- */
.tp-footer { background: var(--tp-surface); border-top: 1px solid var(--tp-line); margin-top: 40px; padding-block: 36px 24px; font-size: .92rem; }
.tp-footer__widgets { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tp-footer .widget { border: 0; padding: 0; background: none; margin: 0; }
.tp-footer ul { list-style: none; margin: 0; padding: 0; }
.tp-footer li a { display: block; padding: 3px 0; color: var(--tp-muted); }
.tp-footer__bottom { border-top: 1px solid var(--tp-line); margin-top: 28px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--tp-muted); }
.tp-footer__bottom p { margin: 0; }
.tp-social { display: flex; flex-wrap: wrap; gap: 12px; }
.tp-legal { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; }

/* Toast */
.tp-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--tp-text); color: var(--tp-surface); padding: 10px 16px; border-radius: 12px; z-index: 100; font-weight: 700; box-shadow: var(--tp-shadow); }
/* Defensive: hide leftovers from retired plugins if they are still active */
.mega-menu-toggle, .cbxwpbkmarktrig, .addtoany_share_save_container, .cbxwpbkmark-guest-login-wrap, #tawkchat-container, .saboxplugin-wrap { display: none !important; }

/* ---------- Forms (contact / submit MCQ) ---------- */
.tp-form { display: grid; gap: 14px; max-width: 720px; }
.tp-form label { display: block; font-weight: 700; font-size: .9rem; }
.tp-form input:not([type=checkbox]), .tp-form textarea, .tp-form select { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 2px solid var(--tp-line); border-radius: 10px; background: var(--tp-surface); color: var(--tp-text); font-weight: 400; }
.tp-form input:focus, .tp-form textarea:focus, .tp-form select:focus { outline: none; border-color: var(--tp-primary); }
.tp-form__row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tp-hp { position: absolute !important; left: -9999px; }
.tp-notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 700; }
.tp-notice--ok { background: var(--tp-ok-soft); color: var(--tp-ok); }
.tp-notice--bad { background: var(--tp-bad-soft); color: var(--tp-bad); }

/* ---------- Auth / account ---------- */
.tp-avatar { display: grid; place-items: center; width: 40px; height: 40px; }
.tp-avatar img { display: block; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--tp-primary-soft); }
.tp-auth { max-width: 460px; background: var(--tp-surface); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 20px; box-shadow: var(--tp-shadow); }
.tp-auth__intro { color: var(--tp-muted); margin-top: 0; }
.tp-tabs { display: flex; gap: 4px; background: var(--tp-surface-2); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.tp-tab { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 800; color: var(--tp-muted); }
.tp-tab.is-active { background: var(--tp-surface); color: var(--tp-text); box-shadow: var(--tp-shadow); }
.tp-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .9rem; }
.tp-check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500 !important; }
.tp-check input { width: auto !important; margin: 0 !important; display: inline !important; }
.tp-account__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tp-account__head img { border-radius: 50%; }
.tp-account__head h2 { margin: 0; }
.tp-account__stats { justify-content: flex-start; }
.tp-account__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.tp-contrib { list-style: none; padding: 0; margin: 0 0 24px; }
.tp-contrib li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--tp-line); }
.tp-contrib__status { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--tp-tint-4); }
.tp-contrib li.is-publish .tp-contrib__status { background: var(--tp-ok-soft); color: var(--tp-ok); }
.tp-contrib li.is-draft .tp-contrib__status { background: var(--tp-bad-soft); color: var(--tp-bad); }
.tp-contrib li small { margin-left: auto; }
.tp-account__profile summary { cursor: pointer; font-weight: 700; margin-bottom: 12px; }
.tp-contrib-line { margin: 6px 0 0; }
.tp-challenge { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 16px; background: var(--tp-tint-3); border-radius: var(--tp-radius); }
.tp-challenge__icon { font-size: 1.8rem; }
.tp-challenge p { margin: 0; color: var(--tp-muted); }

/* ---------- Core blocks used on rebuilt pages ---------- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.wp-block-button__link { display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.25em; border-radius: 12px; background: var(--tp-primary); color: #fff !important; font-weight: 800; box-shadow: 0 4px 0 var(--tp-primary-dark); text-decoration: none !important; }
.wp-block-button__link:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tp-primary-dark); }
.wp-block-columns { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 16px 0; }
.wp-block-column { min-width: 0; }
.tp-single--wide .tp-prose { max-width: none; }
.tp-single--wide .tp-prose > p, .tp-single--wide .tp-prose > ul, .tp-single--wide .tp-prose > ol, .tp-single--wide .tp-prose > h2, .tp-single--wide .tp-prose > h3 { max-width: 72ch; }

@keyframes tp-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
@media print { .tp-header, .tp-footer, .tp-sidebar, .tp-ad, .tp-actions, .tp-cta-card { display: none !important; } .tp-answer__body { display: block !important; } }
