/* PoiskMO shared design system. Presentation only; WordPress/LP own all data and actions. */
:root {
	--accent: #e04b4b;
	--accent-button: #b93038;
	--accent-dark: #982730;
	--accent-soft: #fff1f0;
	--ink: #232624;
	--ink-soft: #454b47;
	--muted: #5b625d;
	--paper: #fff;
	--warm: #f5f6f3;
	--warm-2: #edefe9;
	--line: #dfe3dc;
	--line-dark: #aab2a7;
	--dark: #252b27;
	--radius-sm: 8px;
	--radius: 12px;
	--radius-lg: 16px;
	--shadow: 0 12px 32px rgb(35 48 36 / 10%);
	--ease-out: cubic-bezier(.23, 1, .32, 1);
	--ease-in-out: cubic-bezier(.77, 0, .175, 1);
	--ease-drawer: cubic-bezier(.32, .72, 0, 1);
	--press-duration: 120ms;
	--surface-duration: 180ms;
	--space-section: clamp(48px, 6vw, 80px);
	--lp-primary-color: var(--accent-button);
	--lp-secondary-color: var(--accent-dark);
	--lp-border-color: var(--line);
	--lp-color-base: var(--ink);
}
html { color-scheme: light; scroll-padding-top: 100px; }
body { color: var(--ink); font-size: 17px; line-height: 1.65; }
::selection { background: #f9cecb; color: #392121; }
:is(input, textarea) { caret-color: var(--accent-dark); }
:is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
:is(h1, h2, h3, h4) { text-wrap: balance; letter-spacing: -.025em; }
:is(p, li) { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 4px; }
:is(.primary-nav, .post-sidebar, #popup-sidebar, #popup-content, .pm-profile-table-scroll) {
	scrollbar-width: thin; scrollbar-color: #a5afa4 var(--warm);
}
.icon { width: 1.15em; height: 1.15em; stroke-width: 1.8; vertical-align: middle; }
:is(.entry-meta, time, .course-progress, .items-progress, .statistic-box__number, .results-grid, .registry-table) { font-variant-numeric: tabular-nums; }

/* Familiar button geometry. No transformations on labels or icon baselines. */
:is(.button-link, .header-join, .search-submit, .ct-button, .ss-button, .vr-button) {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 12px 20px; border: 1px solid var(--accent-button);
	border-radius: var(--radius-sm); background: var(--accent-button); color: #fff;
	font: 600 16px/1.35 var(--font); text-align: center; text-decoration: none;
	text-transform: none; letter-spacing: normal; box-shadow: none;
	transition: transform var(--press-duration) var(--ease-out), opacity var(--press-duration) var(--ease-out);
}
:is(.button-link, .header-join, .search-submit):hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
:is(.button-link--ghost, .ct-button--secondary, .ss-button--secondary, .vr-button--secondary) { background: #fff; border-color: var(--line-dark); color: var(--ink); }
.button-link--light { background: #fff; border-color: #fff; color: var(--accent-dark); }
:is(.icon-button, .menu-toggle, .slider-button) { border-radius: var(--radius-sm); min-width: 44px; min-height: 44px; }
:is(button, input, textarea, select) { font-family: var(--font); }
:is(button, a)[aria-disabled=true], button:disabled { cursor: not-allowed; }

/* Navigation: one baseline, compact desktop, complete scrolling on small screens. */
.site-header { border-color: var(--line); }
.site-header__inner { min-height: 76px; gap: 20px; }
.primary-menu > li > a { min-height: 44px; font-size: 15px; line-height: 1.35; }
.primary-menu > li { --menu-row-height: 44px; color: var(--ink); }
.primary-menu > li > a { color: inherit; border-bottom: 0; transition: none; }
.primary-menu > li > .submenu-toggle { transition: none; }
.primary-menu > li > a::after { display: none; content: none; }
/* One visual item owns the underline and color, including its disclosure arrow. */
.primary-menu > li::after { position: absolute; top: calc(var(--menu-row-height) - 2px); left: 8px; right: 8px; height: 2px; background: var(--accent-button); content: ""; opacity: 0; pointer-events: none; }
.primary-menu > li:is(:hover, :focus-within, .is-submenu-open, .current-menu-item, .current-menu-ancestor, .current-menu-parent, .current_page_item, .current_page_ancestor) { color: var(--accent-dark); }
.primary-menu > li:is(:hover, :focus-within, .is-submenu-open, .current-menu-item, .current-menu-ancestor, .current-menu-parent, .current_page_item, .current_page_ancestor)::after { opacity: 1; }
.primary-menu > .pm-account-menu { color: var(--accent-dark); }
@supports selector(:has(*)) {
	.primary-menu > li:has(> a:focus-visible, > .submenu-toggle:focus-visible)::before { position: absolute; top: 0; left: 0; right: 0; height: var(--menu-row-height); border-radius: var(--radius-sm); outline: 3px solid var(--accent-dark); outline-offset: 3px; content: ""; pointer-events: none; }
	.primary-menu > li > :is(a, .submenu-toggle):focus-visible { outline: none; }
}
.primary-menu .sub-menu { border-radius: var(--radius); border: 0; box-shadow: var(--shadow); padding: 8px; }
.primary-menu .sub-menu a { border-radius: var(--radius-sm); padding: 12px; }
.primary-menu .sub-menu a:hover { background: var(--accent-soft); }
.primary-menu .menu-item-has-children > .submenu-toggle { color: inherit; background: transparent; border: 0; }
.submenu-toggle::after { transition: none; }
.header-join { min-height: 44px; font-size: 14px; padding: 10px 16px; }
:is(.header-join, .button-link):hover { transform: none; }
.header-actions { align-items: center; }
.header-search .search-form { gap: 10px; }
.search-field { border-color: var(--line-dark); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }

/* The existing first screen, pared back to identity, message and real photography. */
.home-hero { margin: 28px 0 24px; background: var(--warm); border: 0; border-radius: var(--radius-lg); overflow: hidden; }
.home-hero__copy { padding: clamp(28px, 4vw, 52px); }
.home-hero__identity { padding: 0; border: 0; margin-bottom: 24px; font-size: 15px; line-height: 1.5; }
.home-hero__identity strong { margin-top: 4px; font-size: 19px; color: var(--accent-dark); }
.home-hero h1 { font-size: clamp(40px, 4.5vw, 64px); line-height: 1.08; letter-spacing: -.035em; }
.home-hero__lead { margin-top: 22px; font-size: 19px; line-height: 1.6; color: var(--ink-soft); }
.home-hero__visual { padding: 0; min-height: 420px; }
.home-hero__visual > img { border-radius: 0; height: 100%; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.hero-actions { margin-top: 28px; gap: 12px; }
.mission-strip { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mission-strip a { min-height: 84px; padding: 20px 24px; background: #fff; border: 0; border-radius: 0; }
.mission-strip a + a { border-left: 1px solid var(--line); }
.mission-strip strong { font-size: 16px; font-weight: 600; }
.mission-strip__icon { background: transparent; color: var(--accent-dark); }
.home-section { padding-top: var(--space-section); }
.home .eyebrow { display: none; }
.section-head { margin-bottom: 28px; }
.section-head h2, .about-grid h2, .join-banner h2, .results-band h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.18; }
.section-head__lead { max-width: 65ch; color: var(--ink-soft); }
.text-link, .story-link { color: var(--accent-dark); gap: 8px; }
.news-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.lead-story { border-radius: var(--radius); align-self: start; }
.lead-story__media { height: clamp(240px, 22vw, 300px); aspect-ratio: auto; }
.lead-story__tag { display: none; }
.lead-story__body { padding: 24px; }
.lead-story__body > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.lead-story h3 { font-size: clamp(24px, 2vw, 27px); line-height: 1.25; }
.lead-story time, .news-row time { text-transform: none; letter-spacing: 0; color: var(--muted); }
.news-row { padding-block: 20px; }
.news-row h3 { font-size: 21px; line-height: 1.35; }
.news-row__media { border-radius: var(--radius-sm); }
.results-band { margin-top: var(--space-section); padding-block: 52px; padding-inline: max(24px, calc((100vw - var(--content)) / 2)); gap: 48px; background: linear-gradient(115deg, #61282d 0%, #8d2d35 65%, #a23a40 100%); color: #fff; border: 0; border-radius: 0; isolation: isolate; }
.results-band::before { position: absolute; top: -170px; left: -100px; width: 340px; height: 340px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 52px; transform: rotate(32deg); content: ""; pointer-events: none; z-index: 0; }
.results-band::after { display: block; right: -100px; bottom: -180px; width: 440px; height: 440px; border: 70px solid rgb(255 255 255 / 8%); opacity: 1; pointer-events: none; z-index: 0; }
.results-band h2 { color: #fff; }
.results-band__intro { align-self: center; }
.results-band__intro p:last-child, .results-grid span { color: #fbe9e5; }
.results-grid div { border-color: rgb(255 255 255 / 22%); }
.results-grid strong { color: #fff; font-size: clamp(42px, 4vw, 58px); letter-spacing: -.03em; }
.project-card { border-radius: var(--radius); box-shadow: none; transform: none; }
.project-card:hover { transform: none; box-shadow: none; border-color: var(--line-dark); }
.project-card__media { height: 216px; }
.project-card__body { padding: 24px; }
.project-card small { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); }
.project-card strong { font-size: 25px; line-height: 1.25; }
.project-card em { color: var(--accent-dark); }
.about-grid { margin-top: var(--space-section); padding: 36px; background: linear-gradient(135deg, #fff4ef, var(--warm) 70%); border: 0; border-radius: var(--radius-lg); }
.about-grid__directions > div > span { background: transparent; color: var(--accent-dark); }
.map-section { margin-top: var(--space-section); }
.map-section__canvas { border-radius: var(--radius-lg); }
.partners-grid { gap: 20px; }
.partner-card { min-height: 180px; padding: 24px 18px; background: #fff; border-radius: var(--radius); box-shadow: none; }
.partner-card__logo { height: 72px; }
.partner-card strong { font-size: 15px; }
.join-banner { position: relative; isolation: isolate; overflow: hidden; margin-top: var(--space-section); padding: 36px; background: linear-gradient(115deg, #7c2830, #a6373e); border-radius: var(--radius-lg); }
.join-banner > * { position: relative; z-index: 1; }
.join-banner::after { display: block; position: absolute; width: 320px; height: 320px; right: -80px; bottom: -220px; border: 48px solid rgb(255 255 255 / 9%); border-radius: 50%; content: ""; pointer-events: none; z-index: 0; }
.join-banner p:not(.eyebrow) { color: #fff; }

/* Reading surfaces: no truncated measure, no stretched photo, clear category filters. */
.content-shell { padding-top: 0; }
.breadcrumbs { color: var(--muted); font-size: 14px; }
.page-article > .breadcrumbs { padding-block: 24px; }
.archive-header { margin-block: 32px; padding: 0; }
body.category .archive-header { margin-top: 32px; }
.archive-header h1 { font-size: clamp(32px, 4vw, 50px); line-height: 1.15; }
.archive-header p { max-width: 75ch; font-size: 18px; }
.post-card { border-radius: var(--radius); box-shadow: none; }
.post-card:hover { box-shadow: none; }
.post-card__body { padding: 24px; }
.post-card h2 { font-size: 24px; line-height: 1.3; }
.post-card__body > p { color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.post-card__category { top: auto; bottom: 12px; left: 12px; font-size: 12px; border-radius: 6px; }
.post-card__more { color: var(--accent-dark); }
.entry-meta { gap: 10px 16px; font-size: 14px; line-height: 1.5; }
.single-header { margin-block: 24px; }
.single-header h1 { letter-spacing: -.025em; line-height: 1.16; }
.single-article:not(.page-article) .entry-content { font-size: 18px; line-height: 1.8; }
.entry-content :is(h2, h3, h4) { margin-top: 1.75em; margin-bottom: .65em; line-height: 1.25; }
.entry-content p { margin-bottom: 1.1em; }
.entry-content blockquote { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.single-cover { border: 0; border-radius: var(--radius); background: var(--warm); }
.single-cover img { max-height: 360px; object-fit: contain; }
.sidebar-widget { padding: 24px; border-radius: var(--radius); background: var(--warm); border-color: var(--line); }
.sidebar-widget--accent { background: var(--dark); color: #fff; }
.sidebar-widget--accent .sidebar-widget__title, .sidebar-widget--accent .sidebar-widget__link { color: #fff; }
.sidebar-widget--accent p { color: #e2e8df; }
.sidebar-widget--accent .sidebar-widget__link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.sidebar-widget--accent :focus-visible { outline-color: #fff; }
.sidebar-widget--accent::after { display: none; }
.related-posts__head > .eyebrow { display: none; }
.post-toc { border-radius: var(--radius); }
.post-subscribe { background: var(--warm); border: 1px solid var(--line); border-radius: var(--radius); }
.post-subscribe__link { border-radius: var(--radius-sm); }
.pagination .page-numbers { min-width: 44px; min-height: 44px; border-radius: var(--radius-sm); line-height: 1.35; }
.pagination :is(.next, .prev) { width: auto; padding-inline: 20px; }
.registry-controls input { min-height: 48px; border-color: var(--line-dark); }
.registry-table-wrap { border-radius: var(--radius); }
.registry-table th { background: var(--warm); color: var(--ink); }
.registry-table tr:nth-child(even) { background: var(--warm); }
.registry-contact { border-radius: var(--radius); }

/* Existing paste-ready pages also inherit the theme, despite their embedded CSS. */
.medyany-theme :is(.poiskmo-about, .poiskmo-contacts, .pm-sudba, .pm-vr) { color: var(--ink); font-family: var(--font); }
.medyany-theme .poiskmo-contacts { --ct-ink: var(--ink); --ct-muted: var(--ink-soft); --ct-red: var(--accent-dark); --ct-button: var(--accent-button); --ct-line: var(--line); }
.medyany-theme :is(.poiskmo-about .ab-chair, .poiskmo-contacts .ct-chair) { background: var(--warm); border-color: var(--line); border-radius: var(--radius-lg); }
.medyany-theme :is(.ct-card, .ct-map-frame, .ct-social, .ab-member, .ss-card, .vr-card) { border-radius: var(--radius); }
.medyany-theme :is(.ss-hero, .vr-hero) { border-radius: var(--radius-lg); }
.medyany-theme :is(.ss-kicker, .vr-kicker, .ab-kicker) { text-transform: none; letter-spacing: 0; font-size: 14px; }
.medyany-theme :is(.ct-button, .ss-button, .vr-button) { border-radius: var(--radius-sm); }
.medyany-theme .ct-social:is(.ct-social--vk, .ct-social--max) { background: var(--warm); color: var(--ink); border-color: var(--line); }
.medyany-theme .ct-social:hover { color: var(--accent-dark); border-color: var(--accent-dark); }
.medyany-theme :is(.ct-intro, .ct-chair) > .ct-kicker { display: none; }
.medyany-theme .poiskmo-contacts .icon--external { width: 20px; height: 20px; flex: 0 0 20px; transform: rotate(-45deg); }
.medyany-theme .poiskmo-contacts .ct-social-arrow { display: inline-flex; align-items: center; }
.medyany-theme .ab-contacts a { border-radius: var(--radius-sm); border-color: var(--line); }
/* Older pasted pages contain inline styles: targeted compatibility, not a content rewrite. */
.medyany-theme .entry-content > :is(.poiskmo-documents, .poiskmo-join-page, .poiskmo-svoi-geroi) { gap: var(--space-section) !important; }
.medyany-theme .entry-content > :is(.poiskmo-documents, .poiskmo-join-page, .poiskmo-svoi-geroi) > section:first-child { border-radius: var(--radius-lg) !important; }
.medyany-theme :is(.poiskmo-documents, .poiskmo-join-page, .poiskmo-svoi-geroi) a[style*="display:inline-flex"] { align-items: center; justify-content: center; min-height: 48px; border-radius: var(--radius-sm) !important; line-height: 1.4; }
.medyany-theme :is(.poiskmo-documents, .poiskmo-join-page, .poiskmo-svoi-geroi) a[style*="background:#e04b4b"] { background: var(--accent-button) !important; color: #fff !important; }

/* One school system across overview, lessons, tests, enrollment and profile. */
.medyany-theme :is(.lp-single-course, #popup-course, #learn-press-profile, #learn-press-checkout, .lp-archive-courses) {
	--lp-primary-color: var(--accent-button); --lp-secondary-color: var(--accent-dark); --lp-border-color: var(--line); --lp-color-base: var(--ink);
	font-family: var(--font); color: var(--ink);
}
.medyany-theme :is(.lp-button, .pmcs-button, .pm-enrollment-submit) { border-radius: var(--radius-sm); font-family: var(--font); line-height: 1.4; }
.medyany-theme :is(.lp-single-course, #popup-course, #learn-press-profile) .lp-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; height: auto; padding: 12px 20px; margin: 0;
	border: 1px solid var(--accent-button); border-radius: var(--radius-sm);
	background: var(--accent-button); color: #fff; font: 600 16px/1.4 var(--font);
	text-align: center; text-indent: 0; box-shadow: none;
}
.medyany-theme :is(.lp-single-course, #popup-course, #learn-press-profile) .lp-button:hover:not(:disabled) { background: var(--accent-dark); color: #fff; }
.medyany-theme :is(.lp-single-course, #popup-course, #learn-press-profile) .lp-button:disabled { opacity: .6; }
body.single-lp_course .site-main { padding-top: 28px; }
.medyany-theme .lp-single-course .lp-single-course__header { background: var(--warm); border: 0; border-radius: var(--radius-lg); }
.medyany-theme .lp-single-course .lp-single-course__header::after { display: none; }
.medyany-theme .lp-single-course .lp-single-course__header__inner { padding: 28px 32px; }
.medyany-theme .lp-single-course .course-title { max-width: 30ch; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.18; margin-bottom: 16px; }
.medyany-theme .lp-single-course .learn-press-breadcrumb { margin-bottom: 18px; color: var(--muted); }
.medyany-theme .lp-single-course .course-instructor-category { margin-bottom: 10px; font-size: 15px; }
.medyany-theme .lp-single-course .lp-single-course-main { gap: 32px; grid-template-columns: minmax(0, 1fr) 360px; }
.medyany-theme .lp-single-course .lp-course-description { padding: 0 0 24px; background: #fff; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 18px; line-height: 1.75; }
.medyany-theme .lp-single-course .lp-single-course-main__right__inner { padding: 24px; border-color: var(--line); border-radius: var(--radius); box-shadow: none; }
.medyany-theme .lp-single-course .course-img { margin: -24px -24px 24px; border-radius: 11px 11px 0 0; overflow: hidden; }
.medyany-theme .lp-single-course .course-img img { max-height: 260px; object-fit: contain; background: var(--warm); }
.medyany-theme .lp-single-course .info-meta-item { padding-block: 12px; gap: 8px 12px; border-color: var(--line); }
.medyany-theme .lp-single-course .info-meta-left { color: var(--muted); font-size: 15px; }
.medyany-theme .lp-single-course .info-meta-right { color: var(--ink); font-size: 15px; font-weight: 600; }
.medyany-theme .lp-single-course .info-meta-left i { color: var(--accent-dark); }
/* Same library in LearnPress without replacing native forms or icon semantics. */
.medyany-theme :is(.lp-single-course, #popup-course) :is(.lp-icon-user-graduate, .lp-icon-file-o, .lp-icon-clock-o, .lp-icon-puzzle-piece, .lp-icon-signal) {
	display: inline-block; flex: 0 0 20px; width: 20px; height: 20px;
	background: currentColor; mask: var(--pm-icon) center / contain no-repeat;
	-webkit-mask: var(--pm-icon) center / contain no-repeat;
	vertical-align: middle;
}
.medyany-theme :is(.lp-single-course, #popup-course) :is(.lp-icon-user-graduate, .lp-icon-file-o, .lp-icon-clock-o, .lp-icon-puzzle-piece, .lp-icon-signal)::before { content: none; }
.lp-icon-user-graduate { --pm-icon: url('../icons/users.svg'); }
.lp-icon-file-o { --pm-icon: url('../icons/file-text.svg'); }
.lp-icon-clock-o { --pm-icon: url('../icons/clock.svg'); }
.lp-icon-puzzle-piece { --pm-icon: url('../icons/list-check.svg'); }
.lp-icon-signal { --pm-icon: url('../icons/chart-bar.svg'); }
.medyany-theme :is(.lp-single-course, #popup-course) :is(.course-item__info, .course-item__status) .course-item-ico {
	display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; background: currentColor;
	mask: var(--pm-icon, url('../icons/file-text.svg')) center / contain no-repeat;
	-webkit-mask: var(--pm-icon, url('../icons/file-text.svg')) center / contain no-repeat;
}
.medyany-theme :is(.lp-single-course, #popup-course) :is(.course-item__info, .course-item__status) .course-item-ico::before { content: none; }
.course-item-ico.lp_quiz { --pm-icon: url('../icons/list-check.svg'); }
.course-item-ico.locked { --pm-icon: url('../icons/lock.svg'); }
.course-item-ico:is(.completed, .passed, .finished) { --pm-icon: url('../icons/circle-check.svg'); }
.medyany-theme .lp-single-course .course-price .free { background: #eaf4ed; color: #245b38; font-size: 16px; }
.medyany-theme .lp-single-course .course-buttons .lp-button { width: 100%; }
.medyany-theme .lp-single-course .lp-course-curriculum { border-color: var(--line); border-radius: var(--radius); }
.medyany-theme .lp-single-course .lp-course-curriculum__title { font-size: 26px; line-height: 1.25; }
.medyany-theme .lp-single-course .lp-course-curriculum .course-section-header { background: var(--warm); padding: 18px 20px; }
.medyany-theme .lp-single-course .lp-course-curriculum .course-section__title { font-size: 17px; }
.medyany-theme .lp-single-course .lp-course-curriculum .course-item__link { padding: 16px 20px; min-height: 64px; }
.medyany-theme .lp-single-course .lp-course-curriculum .course-item-title { color: var(--ink); line-height: 1.5; }
.medyany-theme .lp-single-course .lp-course-curriculum .course-item__right { color: var(--muted); }
.medyany-theme .lp-single-course .lp-course-author { background: var(--warm); border: 0; border-radius: var(--radius); }

/* Player: independent panes stay intact, UI never animates the learning data. */
.medyany-theme #popup-course { --pm-player-sidebar: 320px; }
.medyany-theme #popup-course #popup-content { background: var(--warm); }
.medyany-theme #popup-course .content-item-wrap { border-radius: var(--radius); border-color: var(--line); box-shadow: none; }
.medyany-theme #popup-course .content-item-summary > .content-item-title { font-size: clamp(25px, 2.4vw, 36px); line-height: 1.25; letter-spacing: -.025em; }
.medyany-theme #popup-course .content-item-description { font-size: 18px; line-height: 1.8; }
.medyany-theme #popup-course #popup-footer .course-item-nav :is(.prev, .next) > a {
	display: flex; justify-content: center; align-items: center; width: 110px; min-width: 110px;
	min-height: 48px; padding: 12px 18px; border-radius: var(--radius-sm); line-height: 1.4;
	text-align: center; text-indent: 0; font-family: var(--font); color: var(--accent-dark); border-color: var(--line-dark);
}
.medyany-theme #popup-course #popup-footer .course-item-nav .next > a { background: var(--accent-button); border-color: var(--accent-button); color: #fff; }
.medyany-theme #popup-course .answer-options .answer-option { border-color: var(--line-dark); border-radius: var(--radius-sm); padding: 16px; background: #fff; }
.medyany-theme #popup-course .answer-options .answer-option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-button); }
.medyany-theme #popup-course .answer-options .option-title { font-size: 17px; line-height: 1.6; color: var(--ink); background: transparent; }
.medyany-theme #popup-course .answer-options .option-title-content { background: transparent; }
.medyany-theme #popup-course .quiz-result { border-color: var(--line); border-radius: var(--radius); background: var(--warm); }
.medyany-theme #popup-course #content-item-quiz .quiz-status > div { background: var(--warm); border-color: var(--line); border-radius: var(--radius-sm); }

/* Success/error/warning remain distinct, with readable text and predictable spacing. */
.medyany-theme :is(.learn-press-message, .lp-toast.toastify) { border-radius: var(--radius); font-family: var(--font); font-size: 16px; line-height: 1.6; padding: 18px 20px; }
.medyany-theme .learn-press-message:not(.fixed) { margin-block: 24px !important; }
.medyany-theme .lp-toast.toastify { padding: 18px 56px 18px 20px; max-width: min(480px, calc(100% - 32px)); }
.medyany-theme .pm-course-completed.learn-press-message.success { background: #edf7ef; font-size: 17px; font-weight: 600; }
.medyany-theme .lp-modal-dialog .lp-modal-content, .medyany-theme #lp-modal-window { border-radius: var(--radius-lg); }
.medyany-theme .lp-modal-dialog .lp-modal-header, .medyany-theme .lp-modal-dialog .lp-modal-footer { background: var(--warm); }

/* Enrollment is a free learning task, with one primary action. */
.medyany-theme.pm-enrollment-page .site-main { width: min(calc(100% - 48px), 1240px); }
.medyany-theme #learn-press-checkout :is(.pm-enrollment-intro, .pm-enrollment-auth, .pm-enrollment-account, #checkout-order.pm-enrollment-course) { border-color: var(--line); border-radius: var(--radius); }
.medyany-theme #learn-press-checkout :is(.pm-enrollment-intro, #checkout-order.pm-enrollment-course) { background: var(--warm); }
.medyany-theme #learn-press-checkout .pm-enrollment-name-note { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--warm); }
.medyany-theme #learn-press-checkout .pm-enrollment-vk { background: #0866d1; border-radius: var(--radius-sm); }
.medyany-theme #learn-press-checkout .pm-enrollment-vk .icon { flex: 0 0 28px; width: 28px; height: 28px; }
.medyany-theme #learn-press-checkout .pm-enrollment-vk > span { flex: 0 1 auto; min-width: 0; }
.medyany-theme #learn-press-checkout #checkout-payment #checkout-order-action .pm-enrollment-submit { background: var(--accent-button); border-color: var(--accent-button); }

/* Profile and certificate share the same typography and card rhythm. */
.medyany-theme #learn-press-profile :is(.wrapper-profile-header, #profile-content, #profile-sidebar) { border-radius: var(--radius); border-color: var(--line); }
.medyany-theme #learn-press-profile :is(.wrapper-profile-header, #profile-sidebar, .statistic-box) { background: var(--warm); }
.medyany-theme #learn-press-profile #profile-nav li.active > a { background: var(--accent-button); }
.medyany-theme #learn-press-profile .pm-profile-eyebrow { display: none; }
.medyany-theme #learn-press-profile .pm-profile-intro h1 { margin-top: 0; }
.medyany-theme #learn-press-profile .pm-profile-learning { background: var(--accent-soft); border-color: #e9c6c4; border-radius: var(--radius); }
.medyany-theme #learn-press-profile .pm-profile-learning > a { background: var(--accent-button); border-radius: var(--radius-sm); }
.medyany-theme #learn-press-profile .pm-profile-note { background: var(--warm); border: 1px solid var(--line); }
.medyany-theme #learn-press-profile .pm-profile-vk-button { background: #0866d1; border-radius: var(--radius-sm); }
.medyany-theme #learn-press-profile .statistic-box { border-radius: var(--radius-sm); border-color: var(--line); }
.medyany-theme #learn-press-profile .learn-press-filters :is(li.active a, a.active, li.active span[data-filter]) { background: var(--accent-button); border-color: var(--accent-button); }
.medyany-theme .pmcs-panel, .medyany-theme .pm-course-certificate .pmcs-panel {
	font-family: var(--font); padding: 24px; background: var(--warm); border: 1px solid var(--line);
	border-radius: var(--radius); box-shadow: none;
}
.medyany-theme .pmcs-panel > h2 { margin: 0 0 16px; padding: 0; font-size: 26px; line-height: 1.25; }
.medyany-theme .pmcs-panel .pmcs-button { font: 600 16px/1.4 var(--font); background: var(--accent-button); border-radius: var(--radius-sm); }
.medyany-theme .pmcs-panel .pmcs-help { margin-top: 16px; color: var(--muted); }

.site-footer { background: var(--warm); border-top: 1px solid var(--line); color: var(--ink); }
.site-footer__inner { padding-block: 48px 36px; }
.site-footer :is(a, .footer-title) { color: var(--ink); }
.site-footer a:is(:hover, :focus-visible) { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.site-footer .brand-link:is(:hover, :focus-visible) .brand-text > span { color: var(--accent-dark); }
.site-footer .footer-column h2 { color: var(--muted); text-transform: none; font-size: 16px; letter-spacing: 0; line-height: 1.4; }
.site-footer :is(p, address, .footer-brand .brand-text > span:last-child) { color: var(--ink-soft); }
.site-footer .footer-title { font-size: 17px; line-height: 1.35; }
.site-footer .footer-brand .brand-text > span:last-child { font-size: 15px; line-height: 1.5; }
.site-footer .footer-social-links a { background: #fff; color: var(--accent-dark); border: 1px solid var(--line-dark); border-radius: var(--radius-sm); }
.site-footer .footer-social-links a:is(:hover, :focus-visible) { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-dark); }
.site-footer__bottom { color: var(--muted); border-color: var(--line); line-height: 1.6; }

/* Pointer feedback only. Keyboard navigation and reading never wait for motion. */
@media (hover: hover) and (pointer: fine) {
	:is(.button-link, .header-join, .search-submit):active:not(:focus-visible) { transform: scale(.98); }
	.mission-strip a:hover { background: var(--warm); }
	.medyany-theme #popup-course .answer-options .answer-option:hover { border-color: var(--accent-button); background: #fff8f7; }
}
@media (max-width: 1180px) {
	.news-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.lead-story { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
	.lead-story__media { height: 100%; min-height: 240px; max-height: none; }
	.site-header__inner { min-height: 72px; }
	.primary-nav { overscroll-behavior: contain; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
	.primary-menu > li > a, .primary-menu .sub-menu a { font-size: 18px; line-height: 1.45; min-height: 48px; }
	.primary-menu > li { --menu-row-height: 48px; border-bottom: 1px solid var(--line); }
	.primary-menu > li > a { padding-block: 10px; }
	.primary-menu > li::after { left: 0; right: 0; }
	.has-js .primary-menu .menu-item-has-children { grid-template-columns: minmax(0, 1fr) 48px; }
	.primary-menu .menu-item-has-children > .submenu-toggle { width: 44px; height: 48px; border: 0; background: transparent; }
	.primary-menu .sub-menu { border: 0; box-shadow: none; border-radius: 0; }
	.primary-menu .sub-menu a { padding-block: 12px; }
	.primary-menu .sub-menu li > a { border-bottom: 0; border-radius: 0; }
	.primary-menu .sub-menu .sub-menu { padding-left: 12px; }
}
@media (max-width: 1000px) {
	.medyany-theme .lp-single-course .lp-single-course-main { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
}
@media (max-width: 900px) {
	.home-hero { grid-template-columns: 1fr; }
	.home-hero__visual { min-height: 0; }
	.home-hero__visual > img { height: auto; aspect-ratio: 16 / 8; }
	.mission-strip a + a { border-left: 0; border-top: 1px solid var(--line); }
	.results-band { padding-block: 40px; padding-inline: 28px; gap: 32px; }
	.medyany-theme .lp-single-course .lp-single-course-main { display: flex; flex-direction: column; }
	.medyany-theme .lp-single-course .lp-single-course-main__right { width: 100%; order: -1; }
	.medyany-theme .lp-single-course .course-img { display: none; }
	.medyany-theme .lp-single-course .info-metas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
	.medyany-theme .lp-single-course .lp-single-course-main__left { width: 100%; }
	.medyany-theme .lp-single-course .lp-single-course-main__right__inner { margin: 0; }
}
@media (max-width: 620px) {
	.site-header__inner { min-height: 64px; gap: 12px; }
	.home-hero { margin-top: 20px; }
	.home-hero__copy { padding: 28px 24px; }
	.home-hero h1 { font-size: clamp(36px, 10vw, 48px); }
	.home-hero__identity { font-size: 14px; margin-bottom: 20px; }
	.home-hero__identity strong { font-size: 17px; }
	.home-hero__lead { font-size: 18px; }
	.home-hero__visual { padding: 0; }
	.home-hero__visual > img { aspect-ratio: 16 / 9; border-radius: 0; }
	.hero-actions { display: grid; grid-template-columns: 1fr; }
	.hero-actions .button-link { width: 100%; }
	.mission-strip a { min-height: 72px; padding: 16px 20px; }
	.section-head { flex-wrap: wrap; gap: 12px; }
	.section-head .text-link { margin-left: 0; }
	.about-grid, .join-banner { padding: 24px; }
	.results-band { padding: 40px 24px; }
	.results-band::before { left: -230px; }
	.results-band::after { right: -250px; }
	.lead-story { display: block; }
	.lead-story__media { height: clamp(180px, 50vw, 220px); min-height: 0; max-height: none; }
	.lead-story__body > p { -webkit-line-clamp: 2; line-clamp: 2; }
	.post-card__body, .lead-story__body, .project-card__body { padding: 20px; }
	.news-row h3 { font-size: 18px; }
	.page-article > .breadcrumbs { padding-block: 20px; }
	.archive-header, body.category .archive-header { margin-block: 24px; }
	.single-article:not(.page-article) .entry-content { font-size: 17px; }
	.single-cover img { max-height: 260px; }
	.site-footer__inner { padding-block: 36px 24px; }
	.medyany-theme .lp-single-course .lp-single-course__header__inner { padding: 24px 20px; }
	.medyany-theme .lp-single-course .course-title { font-size: 30px; }
	.medyany-theme .lp-single-course .lp-single-course-main__right__inner { padding: 20px; }
	.medyany-theme .lp-single-course .info-metas { display: block; }
	.medyany-theme .lp-single-course .lp-course-description { font-size: 17px; }
	.medyany-theme #popup-course .content-item-description { font-size: 17px; }
	.medyany-theme #popup-course .answer-options .option-title { font-size: 16px; }
	.medyany-theme #popup-course .answer-options .answer-option { padding: 14px; }
	.medyany-theme.pm-enrollment-page .site-main { width: calc(100% - 32px); }
	.medyany-theme .pmcs-panel, .medyany-theme .pm-course-certificate .pmcs-panel { padding: 20px; }
	.medyany-theme #learn-press-profile .dashboard-statistic__row:has(> .statistic-box:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.medyany-theme #learn-press-profile .dashboard-statistic__row:has(> .statistic-box:nth-child(5)) > .statistic-box:first-child { grid-column: 1 / -1; }
	.medyany-theme #learn-press-profile .statistic-box { padding: 14px; gap: 8px; }
	.medyany-theme :is(.poiskmo-documents, .poiskmo-join-page, .poiskmo-svoi-geroi) :is(section, div)[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
	.medyany-theme :is(.poiskmo-documents, .poiskmo-join-page, .poiskmo-svoi-geroi) > section:first-child { padding: 24px !important; gap: 24px !important; }
	.medyany-theme :is(.poiskmo-documents, .poiskmo-join-page, .poiskmo-svoi-geroi) img { min-height: 0 !important; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	:is(.button-link, .header-join, .search-submit) { transition: opacity var(--press-duration) ease; transform: none; }
	:is(.button-link, .header-join, .search-submit):active { transform: none; opacity: .9; }
}
@media print {
	.site-footer, .site-header { display: none; }
}
