/*
Theme Name:   my Adhyapak
Theme URI:    https://myadhyapak.com/
Author:       my Adhyapak
Description:  Academic theme for the my Adhyapak examination preparation platform: light wood background, translucent reading panels, collapsible four-level course navigation, responsive course and examination directories. Requires the "my Adhyapak Core" plugin.
Version:      1.1.0
Requires at least: 6.3
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:  my-adhyapak-theme
Tags:         education, two-columns, left-sidebar, custom-logo, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--ink: #2b1d10;
	--ink-soft: #5a4632;
	--muted: #7a6550;
	--brown-900: #3b2612;
	--brown-700: #5b3a1e;
	--brown-500: #8a5a2b;
	--brown-300: #c9a275;
	--brown-100: #f3e7d6;
	--gold: #b8862f;
	--free: #2e7d32;
	--premium: #a35400;
	--panel-alpha: .88;
	--panel: rgba(255, 251, 244, var(--panel-alpha));
	--panel-strong: rgba(255, 252, 247, .96);
	--line: rgba(91, 58, 30, .16);
	--shadow: 0 1px 2px rgba(59, 38, 18, .06), 0 6px 22px rgba(59, 38, 18, .08);
	--radius: 14px;
	--radius-sm: 8px;
	--header-h: 64px;
	--sidebar-w: 300px;
	--font-body: "Noto Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-head: "Noto Serif", "Noto Serif Devanagari", Georgia, "Times New Roman", serif;
	--wood: url("assets/img/wood.jpg");
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
	margin: 0;
	color: var(--ink);
	font: 400 16px/1.65 var(--font-body);
	background-color: #e8d4b6;
	background-image: var(--wood);
	background-size: 1200px auto;
	background-repeat: repeat;
	background-attachment: fixed;
	text-rendering: optimizeLegibility;
}
body.bg-scroll { background-attachment: scroll; }
@media (max-width: 1024px) { body { background-attachment: scroll; } }

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--brown-500); text-underline-offset: 3px; }
a:hover { color: var(--brown-700); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--brown-900); line-height: 1.25; margin: 1.4em 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); margin-top: 0; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; z-index: 1000; top: 8px; left: 8px; background: #fff; padding: 10px 16px; border-radius: 8px; }
.ma-icon { width: 1em; height: 1em; vertical-align: -.125em; flex: none; }

/* ==========================================================================
   Buttons, tags
   ========================================================================== */
.ma-btn, .button, button.wp-element-button, input[type="submit"] {
	display: inline-flex; align-items: center; gap: .45em; justify-content: center;
	padding: .6em 1.1em; border-radius: 999px; border: 1px solid var(--brown-500);
	background: rgba(255, 255, 255, .7); color: var(--brown-700); font: 600 .95rem/1.2 var(--font-body);
	text-decoration: none; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.ma-btn:hover { background: var(--brown-100); color: var(--brown-900); }
.ma-btn--primary, input[type="submit"] { background: var(--brown-700); border-color: var(--brown-700); color: #fff; }
.ma-btn--primary:hover, input[type="submit"]:hover { background: var(--brown-900); color: #fff; }
.ma-btn--small { padding: .45em .9em; font-size: .85rem; }
.ma-tag { display: inline-block; padding: .15em .65em; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.6; }
.ma-tag--free { background: #e3f1e3; color: var(--free); }
.ma-tag--premium { background: #fbe9d3; color: var(--premium); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--brown-700); cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .6); border-color: var(--line); }
.icon-btn .ma-icon { width: 22px; height: 22px; }

/* ==========================================================================
   Panels
   ========================================================================== */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 2.6vw, 36px); }
@supports (backdrop-filter: blur(4px)) { .panel, .site-header, .ma-sidebar-wrap { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); } }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 236, .8); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(59, 38, 18, .12); }
.site-header__inner { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; min-height: var(--header-h); max-width: 1480px; margin: 0 auto; padding: 0 clamp(12px, 2vw, 24px); }
.brand { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; }
.brand__link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brown-900); min-width: 0; }
.brand__logo { height: 42px; width: auto; flex: none; }
.brand__logo img { height: 42px; width: auto; display: block; }
.brand__name { font: 700 1.35rem/1 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.brand__name em { font-style: normal; color: var(--brown-500); font-weight: 600; }
.primary-nav { flex: 1 1 auto; min-width: 0; }
.primary-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; overflow: hidden; }
.primary-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 600; white-space: nowrap; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: rgba(255, 255, 255, .6); color: var(--brown-900); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.drawer-toggle { display: none; }

.ma-social { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.ma-social a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: var(--brown-700); }
.ma-social a:hover { background: rgba(255, 255, 255, .7); color: var(--brown-900); }
.header-social { position: relative; display: flex; align-items: center; }
.social-toggle { display: none; }

.ma-lang { display: flex; align-items: center; gap: 4px; color: var(--brown-700); }
.ma-lang select { appearance: none; border: 1px solid var(--line); background: rgba(255, 255, 255, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235b3a1e'/%3E%3C/svg%3E") no-repeat right 10px center; border-radius: 999px; padding: 6px 26px 6px 10px; font: 600 .85rem var(--font-body); color: var(--brown-900); cursor: pointer; max-width: 9.5em; }

.ma-user { position: relative; }
.ma-user__btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.ma-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brown-700); color: #fff; font: 700 .9rem var(--font-body); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--brown-300); }
.ma-user__menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--panel-strong); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(59, 38, 18, .18); padding: 8px; z-index: 60; }
.ma-user__menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.ma-user__menu a:hover { background: var(--brown-100); }
.ma-user__name { margin: 4px 10px 8px; font-weight: 700; color: var(--brown-900); border-bottom: 1px solid var(--line); padding-bottom: 8px; }

@media (max-width: 1180px) { .primary-nav { display: none; } }
@media (max-width: 860px) {
	.ma-login-btn span { display: none; }
	.ma-login-btn { padding: .55em; border-radius: 50%; width: 40px; height: 40px; }
	.ma-login-btn .ma-icon { width: 20px; height: 20px; }
	.social-toggle { display: inline-flex; }
	.header-social .ma-social { display: none; position: absolute; right: 0; top: calc(100% + 10px); background: var(--panel-strong); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(59, 38, 18, .18); padding: 6px; z-index: 60; }
	.header-social.is-open .ma-social { display: flex; }
}
@media (max-width: 560px) {
	:root { --header-h: 56px; }
	.site-header__inner { gap: 8px; }
	.header-actions { gap: 4px; }
	.brand__name { font-size: 1.1rem; }
	.brand__logo, .brand__logo img { height: 34px; }
	.ma-lang .ma-icon { display: none; }
	.ma-lang select { max-width: 6.2em; padding-right: 22px; }
}
@media (max-width: 380px) { .ma-lang { display: none; } }

/* ==========================================================================
   Layout with sidebar
   ========================================================================== */
.site-layout { max-width: 1480px; margin: 0 auto; padding: clamp(12px, 2vw, 24px); display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: 24px; align-items: start; }
.site-layout--full { grid-template-columns: minmax(0, 1fr); }
.ma-sidebar-wrap { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; overscroll-behavior: contain; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: var(--brown-300) transparent; }
.admin-bar .ma-sidebar-wrap { top: calc(var(--header-h) + 48px); max-height: calc(100vh - var(--header-h) - 64px); }
.site-main { min-width: 0; }
.sidebar-collapsed .site-layout.has-sidebar { grid-template-columns: minmax(0, 1fr); }
.sidebar-collapsed .site-layout.has-sidebar .ma-sidebar-wrap { display: none; }
.content-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sidebar-collapse { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); border-radius: 999px; padding: 6px 12px; font: 600 .82rem var(--font-body); color: var(--brown-700); cursor: pointer; }
.sidebar-collapse:hover { background: #fff; }

@media (max-width: 1024px) {
	.site-layout, .sidebar-collapsed .site-layout.has-sidebar { grid-template-columns: minmax(0, 1fr); }
	.drawer-toggle { display: inline-flex; }
	.sidebar-collapse { display: none; }
	.ma-sidebar-wrap, .sidebar-collapsed .site-layout.has-sidebar .ma-sidebar-wrap {
		display: block; position: fixed; z-index: 90; top: 0; left: 0; bottom: 0; width: min(88vw, 340px); max-height: none;
		border-radius: 0 16px 16px 0; transform: translateX(-105%); transition: transform .25s ease; background: var(--panel-strong);
	}
	.admin-bar .ma-sidebar-wrap { top: 0; max-height: none; }
	.drawer-open .ma-sidebar-wrap { transform: none; }
	.drawer-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(43, 29, 16, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
	.drawer-open .drawer-overlay { opacity: 1; pointer-events: auto; }
	.drawer-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .ma-sidebar-wrap { transition: none; } }

/* ==========================================================================
   Sidebar tree
   ========================================================================== */
.ma-sidebar { padding: 14px 10px 18px; font-size: .93rem; }
.ma-sidebar__head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 8px; }
.ma-sidebar__title { font: 700 1.05rem var(--font-head); color: var(--brown-900); }
.ma-sidebar__close { display: none; border: 0; background: none; cursor: pointer; color: var(--brown-700); padding: 6px; border-radius: 8px; }
.ma-sidebar__close .ma-icon { width: 20px; height: 20px; }
@media (max-width: 1024px) { .ma-sidebar__close { display: inline-flex; } }
.ma-sidebar__search { padding: 0 4px 10px; position: relative; }
.ma-sidebar__search input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; background: rgba(255, 255, 255, .85); color: var(--ink); }
.ma-search-results { margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; max-height: 60vh; overflow: auto; }
.ma-search-results ul { list-style: none; margin: 0; padding: 4px; }
.ma-search-results a { display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.ma-search-results a:hover { background: var(--brown-100); }
.ma-sr__level { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brown-500); }
.ma-sr__title { font-weight: 600; }
.ma-sr__lock { font-size: .7rem; color: var(--premium); font-weight: 700; }
.ma-sr__trail { font-size: .78rem; color: var(--muted); }
.ma-search-results__msg { padding: 10px 12px; margin: 0; color: var(--muted); }

.ma-tree { list-style: none; margin: 0; padding: 0; }
.ma-tree .ma-tree { margin-left: 13px; padding-left: 8px; border-left: 1px dashed rgba(138, 90, 43, .28); }
.ma-node__row { display: flex; align-items: center; gap: 2px; border-radius: 8px; min-height: 34px; }
.ma-node__row:hover { background: rgba(255, 255, 255, .7); }
.ma-toggle, .ma-toggle-spacer { flex: none; width: 26px; height: 26px; }
.ma-toggle { display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; padding: 0; border-radius: 6px; cursor: pointer; color: var(--brown-500); }
.ma-toggle:hover { background: var(--brown-100); }
.ma-toggle .ma-icon { transition: transform .15s; width: 16px; height: 16px; }
.ma-toggle[aria-expanded="true"] .ma-icon { transform: rotate(90deg); }
.is-loading > .ma-node__row .ma-toggle .ma-icon { animation: ma-spin .8s linear infinite; }
@keyframes ma-spin { to { transform: rotate(360deg); } }
.ma-node__link { flex: 1 1 auto; min-width: 0; padding: 6px 6px 6px 2px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.ma-level-0 > .ma-node__row .ma-node__link { font-weight: 700; color: var(--brown-900); }
.ma-level-1 > .ma-node__row .ma-node__link { font-weight: 600; }
.ma-level-3 > .ma-node__row .ma-node__link { font-size: .9rem; color: var(--ink-soft); }
.is-current > .ma-node__row { background: var(--brown-700); }
.is-current > .ma-node__row .ma-node__link, .is-current > .ma-node__row .ma-toggle, .is-current > .ma-node__row .ma-node__lock, .is-current > .ma-node__row .ma-node__done { color: #fff; }
.is-current > .ma-node__row .ma-toggle:hover { background: rgba(255, 255, 255, .15); }
.ma-node__lock, .ma-node__done, .ma-node__progress { flex: none; display: inline-flex; margin-right: 6px; color: var(--brown-300); }
.ma-node__lock .ma-icon { width: 13px; height: 13px; }
.ma-node__done { color: var(--free); }
.ma-node__progress { font-size: .7rem; font-weight: 700; color: var(--free); }
.ma-node--empty { padding: 8px; color: var(--muted); }

/* ==========================================================================
   Breadcrumbs, article
   ========================================================================== */
.ma-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--muted); }
.ma-breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--brown-300); }
.ma-breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.ma-breadcrumbs a:hover { color: var(--brown-700); text-decoration: underline; }
.ma-breadcrumbs [aria-current] { color: var(--brown-900); font-weight: 600; }

.ma-article__head { margin-bottom: 1.2em; padding-bottom: 1em; border-bottom: 1px solid var(--line); }
.ma-article__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: .5em; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brown-500); }
.ma-article__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ma-article__lead { font-size: 1.08rem; color: var(--ink-soft); }
.ma-complete.is-done { background: #e3f1e3; border-color: var(--free); color: var(--free); }
.ma-complete .ma-icon { opacity: .35; }
.ma-complete.is-done .ma-icon { opacity: 1; }

/* Tabs */
.ma-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 1.5em; overflow-x: auto; scrollbar-width: none; }
.ma-tabs [role="tab"] { border: 0; background: none; padding: 10px 14px; font: 600 .95rem var(--font-body); color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.ma-tabs [role="tab"][aria-selected="true"] { color: var(--brown-900); border-bottom-color: var(--brown-500); }

/* Long-form reading */
.entry-content { font-size: 1.0625rem; line-height: 1.8; max-width: 80ch; overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { padding-bottom: .25em; border-bottom: 1px solid var(--line); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content blockquote { margin: 1.5em 0; padding: .8em 1.2em; border-left: 4px solid var(--brown-300); background: rgba(255, 255, 255, .5); border-radius: 0 8px 8px 0; }
.entry-content figure { margin: 1.5em 0; }
.entry-content img { border-radius: 8px; }
.entry-content figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.entry-content pre { background: #2b1d10; color: #f6ead8; padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.entry-content :not(pre) > code { background: var(--brown-100); padding: .1em .35em; border-radius: 4px; }
.entry-content .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.entry-content iframe, .entry-content video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }

/* Responsive tables */
.entry-content table, .ma-calendar { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.entry-content th, .entry-content td, .ma-calendar th, .ma-calendar td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.entry-content thead th, .ma-calendar thead th { background: rgba(138, 90, 43, .1); color: var(--brown-900); font-weight: 700; }
.entry-content tbody tr:nth-child(even), .ma-calendar tbody tr:nth-child(even) { background: rgba(255, 255, 255, .45); }
.wp-block-table, .ma-table-wrap, .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.wp-block-table table, .table-scroll table { min-width: 520px; }

/* Content boxes from block patterns */
.ma-box { padding: 1em 1.2em; border-radius: 10px; margin: 1.5em 0; border: 1px solid var(--line); }
.ma-box--facts { background: rgba(255, 244, 222, .8); border-left: 4px solid var(--gold); }
.ma-box--tip { background: rgba(232, 244, 233, .85); border-left: 4px solid var(--free); }
.ma-box h3 { margin-top: 0; }

/* Revision pointers */
.ma-revision { font-size: 1.05rem; }
.ma-revision ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.ma-revision li { background: rgba(255, 255, 255, .65); border: 1px solid var(--line); border-left: 4px solid var(--brown-300); border-radius: 8px; padding: 10px 14px; margin: 0; }

/* Focus / quick-revision mode */
.ma-focus .site-header, .ma-focus .ma-sidebar-wrap, .ma-focus .site-footer, .ma-focus .content-tools, .ma-focus .ma-breadcrumbs, .ma-focus .ma-children, .ma-focus .ma-related, .ma-focus .ma-pager { display: none !important; }
.ma-focus .site-layout { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.ma-focus .entry-content { font-size: 1.15rem; max-width: none; }
.ma-focus-exit { display: none; }
.ma-focus .ma-focus-exit { display: inline-flex; position: fixed; right: 14px; bottom: 14px; z-index: 100; box-shadow: var(--shadow); }

/* Lock */
.ma-lock__teaser { color: var(--ink-soft); margin-bottom: 1em; }
.ma-lock__box { text-align: center; padding: clamp(20px, 4vw, 40px); border: 1px dashed var(--brown-300); border-radius: var(--radius); background: rgba(255, 248, 236, .85); }
.ma-lock__icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brown-100); color: var(--brown-700); }
.ma-lock__icon .ma-icon { width: 26px; height: 26px; }
.ma-lock__title { margin: .6em 0 .3em; border: 0 !important; }
.ma-lock__text { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 1.2em; }
.ma-lock__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Children, related, pager */
.ma-children { margin-top: 2em; }
.ma-child-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ma-child-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); text-decoration: none; color: var(--ink); height: 100%; transition: border-color .15s, box-shadow .15s; }
.ma-child-list a:hover { border-color: var(--brown-300); box-shadow: var(--shadow); }
.ma-child__num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brown-100); color: var(--brown-700); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.ma-child__title { flex: 1 1 auto; font-weight: 600; display: grid; }
.ma-child__title small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.ma-child__icons { flex: none; display: inline-flex; gap: 6px; align-items: center; color: var(--brown-300); }
.is-done .ma-child__icons { color: var(--free); }
.ma-related { margin-top: 2em; }
.ma-related ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.ma-related a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); text-decoration: none; font-size: .9rem; }
.ma-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2.2em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.ma-pager a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .55); text-decoration: none; color: var(--ink); }
.ma-pager a:hover { border-color: var(--brown-300); background: #fff; }
.ma-pager__next { text-align: right; grid-column: 2; }
.ma-pager__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brown-500); display: inline-flex; gap: 4px; align-items: center; }
.ma-pager__next .ma-pager__label { justify-content: flex-end; }
.ma-pager__title { font-weight: 600; }
@media (max-width: 560px) { .ma-pager { grid-template-columns: 1fr; } .ma-pager__next { grid-column: 1; } }

/* Exam info */
.ma-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 1.5em; padding: 0; }
.ma-facts div { background: rgba(255, 255, 255, .6); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.ma-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ma-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.ma-timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--brown-300); }
.ma-timeline li { position: relative; padding: 0 0 12px 18px; }
.ma-timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brown-500); box-shadow: 0 0 0 3px var(--panel-strong); }
.ma-timeline time { font-weight: 700; color: var(--brown-700); display: block; font-size: .88rem; }
.ma-section-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.5em; }
.ma-section-nav a { padding: 5px 12px; border-radius: 999px; background: var(--brown-100); text-decoration: none; font-size: .85rem; font-weight: 600; }

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.ma-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1200px) { .ma-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .ma-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.has-sidebar .ma-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1280px) { .has-sidebar .ma-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .has-sidebar .ma-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .has-sidebar .ma-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ma-card { display: flex; flex-direction: column; background: var(--panel-strong); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; min-width: 0; }
.ma-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(59, 38, 18, .14); }
.ma-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--brown-700), var(--brown-500)); }
.ma-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-card__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .9); font: 700 clamp(1.6rem, 4vw, 2.4rem) var(--font-head); letter-spacing: .04em; }
.ma-card__media .ma-tag { position: absolute; top: 10px; left: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.ma-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1 1 auto; }
.ma-card__meta { margin: 0; font-size: .78rem; color: var(--muted); font-weight: 600; }
.ma-flag { font-size: 1.05em; }
.ma-card__title { margin: 0; font-size: 1.06rem; line-height: 1.3; }
.ma-card__title a { color: var(--brown-900); text-decoration: none; }
.ma-card__title a:hover { color: var(--brown-500); }
.ma-card__desc { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.ma-card__date { margin: 0; font-size: .85rem; color: var(--brown-700); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.ma-card__cta { margin-top: auto; align-self: flex-start; }
.ma-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
@media (max-width: 560px) {
	.ma-card__body { padding: 10px 11px 12px; }
	.ma-card__title { font-size: .95rem; }
	.ma-card__desc { font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
	.ma-card__cta { font-size: .78rem; padding: .4em .7em; }
}

.ma-countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.ma-country { display: grid; justify-items: center; gap: 2px; padding: 16px 10px; text-align: center; background: var(--panel-strong); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.ma-country:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ma-country__flag { font-size: 2.2rem; line-height: 1.1; }
.ma-country__name { font-weight: 700; color: var(--brown-900); }
.ma-country__count { font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) { .ma-countries { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .ma-country { padding: 10px 4px; } .ma-country__flag { font-size: 1.7rem; } .ma-country__name { font-size: .82rem; } }

.ma-resource-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ma-resource-list a { display: grid; gap: 1px; padding: 12px 14px; border-radius: 10px; background: var(--panel-strong); border: 1px solid var(--line); text-decoration: none; color: var(--ink); height: 100%; }
.ma-resource-list a:hover { border-color: var(--brown-300); }
.ma-resource-list__level { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--free); }
.ma-resource-list__title { font-weight: 700; color: var(--brown-900); }
.ma-resource-list__course { font-size: .82rem; color: var(--muted); }

/* Filters */
.ma-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0 0 1.4em; }
.ma-filters label { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.ma-filters select { min-width: 190px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; }

/* ==========================================================================
   Homepage
   ========================================================================== */
.home-main { max-width: 1480px; margin: 0 auto; padding: clamp(12px, 2vw, 24px); display: grid; gap: clamp(16px, 2.4vw, 28px); }
.home-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 1em; flex-wrap: wrap; }
.home-section__head h2 { margin: 0; }
.home-section__more { font-weight: 600; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }

.hero { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; min-height: clamp(260px, 42vw, 440px); box-shadow: var(--shadow); background: linear-gradient(120deg, rgba(59, 38, 18, .92), rgba(138, 90, 43, .82)); }
.hero__slide { position: absolute; inset: 0; display: flex; align-items: center; padding: clamp(24px, 6vw, 72px); opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; background-size: cover; background-position: center; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(43, 29, 16, .82) 0%, rgba(43, 29, 16, .45) 60%, rgba(43, 29, 16, .15) 100%); }
.hero__content { position: relative; max-width: 640px; color: #fff; }
.hero__content h2 { color: #fff; font-size: clamp(1.6rem, 1rem + 2.6vw, 2.9rem); margin: 0 0 .4em; }
.hero__content p { font-size: clamp(1rem, .9rem + .4vw, 1.2rem); opacity: .92; }
.hero .ma-btn--primary { background: var(--gold); border-color: var(--gold); }
.hero .ma-btn--primary:hover { background: #9c7023; }
.hero__dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; }
.hero__dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; padding: 0; }
.hero__dots button[aria-current="true"] { background: #fff; width: 26px; border-radius: 6px; }
.hero__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .2); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hero__arrow:hover { background: rgba(255, 255, 255, .35); }
.hero__arrow--prev { left: 12px; }
.hero__arrow--next { right: 12px; }
@media (max-width: 560px) { .hero__arrow { display: none; } }

.intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.intro__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.intro__stat { text-align: center; padding: 14px 6px; border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.intro__stat strong { display: block; font: 700 1.8rem var(--font-head); color: var(--brown-700); }
.intro__stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.intro__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } }

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.why-item { padding: 18px; border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.why-item h3 { margin: 0 0 .3em; font-size: 1.05rem; }
.why-item p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.why-item__num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brown-700); color: #fff; font-weight: 700; margin-bottom: 10px; }

.promo { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: linear-gradient(120deg, rgba(91, 58, 30, .94), rgba(138, 90, 43, .9)); color: #fff; }
.promo h2 { color: #fff; margin: 0 0 .2em; }
.promo p { margin: 0; opacity: .9; }
.promo .ma-btn--primary { background: var(--gold); border-color: var(--gold); }

/* Dashboard */
.ma-dashboard { display: grid; gap: 16px; }
.ma-dash-card { padding: 18px 20px; border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.ma-dash-card h2, .ma-dash-card h3 { margin-top: 0; }
.ma-dash-trail { color: var(--muted); font-size: .85rem; margin-bottom: .6em; }
.ma-progress { margin-bottom: 12px; }
.ma-progress__head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.ma-progress__bar { height: 8px; border-radius: 999px; background: var(--brown-100); overflow: hidden; }
.ma-progress__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brown-500), var(--gold)); border-radius: 999px; }
.ma-login form { max-width: 380px; }
.ma-login label { display: block; font-weight: 600; margin-bottom: 4px; }
.ma-login input[type="text"], .ma-login input[type="password"] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font: inherit; }

/* Generic pages, posts, pagination */
.page-head { margin-bottom: 1em; }
.page-head p { color: var(--ink-soft); }
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 2em; }
.nav-links .page-numbers { padding: 6px 12px; border-radius: 8px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); text-decoration: none; }
.nav-links .current { background: var(--brown-700); color: #fff; border-color: var(--brown-700); }
.post-list { display: grid; gap: 14px; }
.post-list article { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 0 0 .3em; font-size: 1.2rem; }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type="search"] { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); font: inherit; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: clamp(20px, 3vw, 36px); background: rgba(43, 29, 16, .9); color: #ecdcc6; }
@supports (backdrop-filter: blur(4px)) { .site-footer { backdrop-filter: blur(6px); } }
.site-footer a { color: #f6e7d2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__inner { max-width: 1480px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(12px, 2vw, 24px) 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 .8em; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .ma-social { display: flex; gap: 4px; margin-top: 12px; }
.site-footer .ma-social a { color: #f6e7d2; border: 1px solid rgba(255, 255, 255, .2); }
.site-footer__brand { font: 700 1.3rem var(--font-head); color: #fff; margin-bottom: .4em; display: block; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); text-align: center; padding: 14px; font-size: .85rem; color: #cdb89c; }
@media (max-width: 860px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* Print: clean notes */
@media print {
	body { background: #fff; }
	.site-header, .ma-sidebar-wrap, .site-footer, .content-tools, .ma-pager, .ma-related, .ma-tabs, .ma-article__actions { display: none !important; }
	.site-layout { display: block; padding: 0; }
	.panel { box-shadow: none; border: 0; background: #fff; padding: 0; }
	[role="tabpanel"][hidden] { display: block !important; }
}

/* Core "stripes" table style in theme colours */
.wp-block-table.is-style-stripes { border-bottom: 0; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: rgba(255, 255, 255, .5); }
.wp-block-table.is-style-stripes tbody tr:nth-child(even) { background: transparent; }

/* ==========================================================================
   v1.1 — Exam menu, exam hubs, exam-driven homepage
   ========================================================================== */
.ma-soon { display: inline-block; padding: .15em .6em; border-radius: 999px; background: #efe6d8; color: var(--muted); font-size: .72rem; font-weight: 700; }
.ma-btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.ma-note { color: var(--muted); font-size: .88rem; }
.ma-hint { color: var(--muted); font-size: .88rem; margin-bottom: .6em; }
.ma-card__icon { margin-right: 2px; }

/* Exam menu bar */
.xnav { border-top: 1px solid var(--line); background: rgba(255, 252, 246, .6); }
.xnav__inner { max-width: 1480px; margin: 0 auto; padding: 0 clamp(12px, 2vw, 24px); display: flex; align-items: center; gap: 12px; }
.xnav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 2px; flex: 1 1 auto; }
.xnav__item { position: relative; }
.xnav__top { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border: 0; background: none; font: 600 .92rem var(--font-body); color: var(--ink-soft); text-decoration: none; cursor: pointer; border-radius: 8px; white-space: nowrap; }
.xnav__top:hover, .xnav__item.is-open > .xnav__top { color: var(--brown-900); background: rgba(255, 255, 255, .75); }
.xnav__top .ma-icon { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .15s; }
.xnav__item.is-open > .xnav__top .ma-icon { transform: rotate(-90deg); }
.xnav__panel { display: none; position: absolute; left: 0; top: calc(100% + 4px); min-width: 260px; background: var(--panel-strong); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(59, 38, 18, .18); padding: 10px; z-index: 70; }
.xnav__item.is-open > .xnav__panel { display: block; }
@media (hover: hover) and (min-width: 1025px) { .xnav__item:hover > .xnav__panel { display: block; } }
.xnav__panel ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 6px; }
.xnav__panel li { break-inside: avoid; }
.xnav__panel a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.xnav__panel a:hover { background: var(--brown-100); }
.xnav__all { margin-top: 6px; border-top: 1px solid var(--line); font-weight: 700; color: var(--brown-500) !important; display: flex !important; gap: 4px; align-items: center; }
.xnav__search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .8); padding: 2px 4px 2px 12px; flex: none; }
.xnav__search input { border: 0; background: none; font: inherit; width: 150px; padding: 6px 0; color: var(--ink); }
.xnav__search input:focus { outline: none; }
.xnav__search button { border: 0; background: none; color: var(--brown-700); cursor: pointer; display: inline-flex; padding: 6px; }
.xnav-toggle { display: none; }
@media (max-width: 1024px) {
	.xnav-toggle { display: inline-flex; }
	.xnav { display: none; max-height: calc(100vh - var(--header-h)); overflow: auto; background: var(--panel-strong); }
	.xnav.is-open { display: block; }
	.xnav__inner { flex-direction: column; align-items: stretch; padding-top: 10px; padding-bottom: 14px; }
	.xnav__search { order: -1; }
	.xnav__search input { width: 100%; flex: 1; }
	.xnav__list { flex-direction: column; }
	.xnav__top { width: 100%; justify-content: space-between; padding: 12px; }
	.xnav__panel { position: static; box-shadow: none; border: 0; background: rgba(243, 231, 214, .5); min-width: 0; margin: 0 0 6px; }
}

/* Exam hub */
.xpage { max-width: 1240px; margin: 0 auto; padding: clamp(12px, 2vw, 24px); display: grid; gap: clamp(14px, 2vw, 22px); }
.xhero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: center; padding: clamp(22px, 4vw, 48px); border-radius: calc(var(--radius) + 4px); background: linear-gradient(125deg, rgba(59, 38, 18, .95), rgba(138, 90, 43, .9)); color: #fff; box-shadow: var(--shadow); }
.xhero h1 { color: #fff; margin: .2em 0 .3em; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); display: flex; align-items: center; gap: .35em; }
.xhero__icon { font-size: .85em; }
.xhero__lead { font-size: clamp(1rem, .95rem + .3vw, 1.2rem); opacity: .92; max-width: 46ch; }
.xhero__kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; font-size: .85rem; font-weight: 600; }
.xhero__kicker a { color: #f3e7d6; text-decoration: none; background: rgba(255, 255, 255, .12); padding: 3px 10px; border-radius: 999px; }
.xhero__kicker a:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.xhero .ma-btn--primary { background: var(--gold); border-color: var(--gold); }
.xhero__cards { position: relative; min-height: 230px; }
.xcard { position: absolute; inset: 0 0 34px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px; border-radius: 16px; background: rgba(255, 250, 242, .96); color: var(--ink); opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.xcard.is-active { opacity: 1; visibility: visible; }
.xcard h2 { color: var(--brown-900); font-size: 1.25rem; margin: 0; }
.xcard p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.xcard .ma-btn { margin-top: auto; }
.xcard__icon { font-size: 1.8rem; }
.xhero__cards .hero__dots { bottom: 4px; }
.hero__pause { width: 22px !important; height: 10px !important; border-radius: 4px !important; background: transparent !important; border: 2px solid rgba(255, 255, 255, .6) !important; position: relative; }
.hero__pause::before { content: ""; position: absolute; inset: 1px 6px; border-left: 2px solid #fff; border-right: 2px solid #fff; }
.hero__pause[aria-pressed="true"]::before { border-right: 0; border-left: 6px solid #fff; border-top: 3px solid transparent; border-bottom: 3px solid transparent; inset: -1px 5px; }
@media (max-width: 860px) { .xhero { grid-template-columns: 1fr; } }

.xfind h2 { margin: 0 0 .6em; }
.xfind__box, .cfind__box { display: flex; align-items: center; gap: 10px; border: 1px solid var(--brown-300); border-radius: 999px; background: #fff; padding: 4px 6px 4px 16px; color: var(--muted); }
.xfind__box input, .cfind__box input { flex: 1; min-width: 0; border: 0; font: 400 1rem var(--font-body); padding: 10px 0; background: none; color: var(--ink); }
.xfind__box input:focus, .cfind__box input:focus { outline: none; }
.xfind__box:focus-within, .cfind__box:focus-within { box-shadow: 0 0 0 3px rgba(184, 134, 47, .35); }
.xfind .ma-section-nav { margin: 14px 0 0; align-items: center; }
.xfind .ma-section-nav span { font-weight: 700; font-size: .85rem; color: var(--muted); margin-right: 4px; }
.xfind__empty, .cfind__empty { margin: 10px 0 0; color: var(--muted); }
.xsec { scroll-margin-top: calc(var(--header-h) + 60px); }
.xsec > h2 { margin-top: 0; }
.xsec h3 { font-size: 1.08rem; }
.is-filtered-out { display: none !important; }

.ma-xtable { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.ma-xtable th, .ma-xtable td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.ma-xtable thead th { background: var(--brown-700); color: #fff; font-weight: 700; }
.ma-xtable tbody th { font-weight: 600; background: rgba(255, 255, 255, .55); }
.ma-xtable td { text-align: center; }
.ma-xtable tr.is-total th, .ma-xtable tr.is-total td { font-weight: 800; background: var(--brown-100); }
.ma-marking { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ma-marking__item { padding: 14px; border-radius: 12px; background: #e8f4e9; border: 1px solid rgba(46, 125, 50, .25); display: grid; gap: 2px; }
.ma-marking__item strong { font: 800 1.6rem var(--font-head); color: var(--free); }
.ma-marking__item.is-neg { background: #fbebe6; border-color: rgba(180, 60, 30, .25); }
.ma-marking__item.is-neg strong { color: #b23c17; }

.ma-syl { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .6); margin-bottom: 10px; overflow: hidden; }
.ma-syl summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 700; color: var(--brown-900); }
.ma-syl summary::-webkit-details-marker { display: none; }
.ma-syl__name { flex: 1; font-size: 1.05rem; }
.ma-syl__count { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--brown-100); padding: 2px 10px; border-radius: 999px; }
.ma-syl summary .ma-icon, .ma-faq summary .ma-icon { transition: transform .15s; color: var(--brown-500); flex: none; }
.ma-syl[open] summary .ma-icon, .ma-faq[open] summary .ma-icon { transform: rotate(90deg); }
.ma-syl__body { padding: 0 18px 14px; border-top: 1px solid var(--line); }
.ma-syl__body h4 { margin: 1em 0 .3em; font-size: .95rem; color: var(--brown-500); text-transform: uppercase; letter-spacing: .04em; }
.ma-syl__body ol { columns: 2; column-gap: 28px; padding-left: 1.6em; margin: .6em 0; }
.ma-syl__body li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 640px) { .ma-syl__body ol { columns: 1; } }

.ma-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ma-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: 14px; background: var(--panel-strong); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.ma-tile:hover { border-color: var(--brown-300); box-shadow: var(--shadow); }
.ma-tile h3 { margin: 0; font-size: 1.02rem; }
.ma-tile p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.ma-tile__icon { font-size: 1.7rem; line-height: 1; }
.ma-tile__link { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.ma-tiles--compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 560px) { .ma-tiles, .ma-tiles--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ma-tile { padding: 12px; } }

.ma-mocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ma-mock { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--panel-strong); border: 1px solid var(--line); }
.ma-mock__top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ma-mock__exam { font-size: .78rem; font-weight: 700; text-decoration: none; background: var(--brown-100); padding: 2px 10px; border-radius: 999px; }
.ma-mock h3 { margin: 0; font-size: 1.05rem; }
.ma-mock__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0; padding: 0; font-size: .88rem; color: var(--ink-soft); }
.ma-mock__facts strong { color: var(--brown-900); }
.ma-mock__lang { margin: 0; font-size: .85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ma-mock__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }

.ma-years { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.ma-years a, .ma-years span { display: inline-block; padding: 9px 18px; border-radius: 10px; font-weight: 700; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); text-decoration: none; }
.ma-years span { color: var(--muted); }
.ma-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ma-steps li { counter-increment: s; position: relative; padding: 16px 16px 16px 60px; border-radius: 14px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.ma-steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--brown-700); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.ma-steps h3 { margin: 0 0 .2em; }
.ma-steps p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.ma-cards-num { list-style: none; padding: 0; margin: 0 0 1em; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ma-cards-num li { padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); border-top: 4px solid var(--gold); }
.ma-cards-num h3 { margin: 0 0 .25em; }
.ma-cards-num p { margin: 0; color: var(--ink-soft); }
.ma-faq { border-bottom: 1px solid var(--line); }
.ma-faq summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 4px; cursor: pointer; font-weight: 700; list-style: none; }
.ma-faq summary::-webkit-details-marker { display: none; }
.ma-faq p { margin: 0 4px 14px; color: var(--ink-soft); }
.ma-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.ma-chips li { padding: 6px 14px; border-radius: 999px; background: var(--brown-100); font-weight: 600; }

/* Homepage: preparing-for + category groups */
.cfind { margin-bottom: 1.2em; }
.cfind__box .ma-btn { flex: none; }
.cfind__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cfind__tags button { border: 1px solid var(--line); background: rgba(255, 255, 255, .75); border-radius: 999px; padding: 7px 14px; font: 600 .88rem var(--font-body); color: var(--brown-700); cursor: pointer; }
.cfind__tags button[aria-pressed="true"] { background: var(--brown-700); color: #fff; border-color: var(--brown-700); }
.cgroup { margin-top: 1.4em; }
.cgroup__title { font-size: 1.15rem; margin: 0 0 .7em; padding-bottom: .3em; border-bottom: 2px solid var(--brown-100); }
.cgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1200px) { .cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.ccard { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--panel-strong); border: 1px solid var(--line); transition: box-shadow .15s, transform .15s; }
.ccard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ccard__icon { font-size: 1.9rem; line-height: 1; }
.ccard h4 { margin: 0; font: 700 1.05rem var(--font-head); }
.ccard h4 a { color: var(--brown-900); text-decoration: none; }
.ccard p { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.ccard__exams { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 2px 0 0; padding: 0; }
.ccard__exams a { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--brown-100); text-decoration: none; color: var(--brown-700); }
.ccard__more { margin-top: auto; padding-top: 4px; font-weight: 700; font-size: .88rem; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 560px) { .ccard { padding: 12px; } .ccard__exams { display: none; } .ccard h4 { font-size: .95rem; } }

.ma-updates { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ma-update { padding: 16px; border-radius: 14px; background: var(--panel-strong); border: 1px solid var(--line); border-left: 4px solid var(--gold); display: grid; gap: 4px; }
.ma-update time { font-size: .8rem; font-weight: 700; color: var(--brown-500); }
.ma-update__exam { font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.ma-update h3 { margin: 0; font-size: 1rem; }
.xcard::before { content: none; }
.xpage { grid-template-columns: minmax(0, 1fr); }
.xpage > *, .xsec > * { min-width: 0; }
.ma-marking + .entry-content { margin-top: 1em; }
@media (max-width: 560px) { .xhero { padding: 20px 16px; } .xcard { padding: 16px; } .ma-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ma-facts div { padding: 8px 10px; } }
@media (max-width: 860px) { .xhero__cards { min-height: 270px; } }
